MZ@ !L!This program cannot be run in DOS mode. $CQ000h000m0i0j0o0Rich0PEdboT"   0p`A`9@@(P0`P@8.text `.data @.pdata0 @@.idata:@ @@.rsrcP@@.reloc`@B0@boT) 8@5RSDS>ǝ>RMJsuQF12Resources.pdbH(u .H(H\$ UHH e3H2-+EHHtH;tHHyHM z.HE HE\.H1EX.H1E\.HH1EL.HMH3EH3HMHE.EH HH3EH3EH#HEH HH H\$HH ]B  4 2P-oTF12Resources.dll2-+] f0NDT+L@@@AA@@h@,A@@@@AA@DisableThreadLibraryCalls0QueryPerformanceCounterGetCurrentProcessIdGetCurrentThreadIdGetSystemTimeAsFileTimeGetTickCountKERNEL32.dll(@Xh  H H I 0I I I I( I@ LX ,Jp ZJ J J \L K LM8M0QHQ`NRxRS`SShMMM N8JNPROhOxNNNOOPLP(P@PXPp\Q"QTpT6KdKTRI0UHbU`UxKVKKL0VaPpghgh|hh0ib__^(i@iXlp&mm nznnNo|p p0oHj`kxkkDlisps`r s8(tPthrtpPqqqHuu(4v@wXBxpx8yy(zz {n{:}0}H}`D~x~rR{H| |8ЀP$hF ~(@vXvpwlwh؆8H0ދHv`xNR2 *8Phtԏ,N(@j@zjX̓p6|Tޒ  0_0 <H v` •x  < | @! !8!FP!~h!Ș!!!`!!К!"@("ҙ@"X"p"B"_"""N"##Μ0#H#d`#Yx#Y#^#Y#Z# Z#*Z$[ $"\8$t\P$\h$]$@]$]$]$^$R^$r]%^Z(%Z@%ZX%[p%Z%:[%%Ν%:%&l&0&ޞH&`&Jx&r&&Ɵ&&&T' 'Ƞ8'P'rh'>'n''С''J'(((P@(X(ޣp(&(((ޤ(()<):0)TH)`)lx)))f)))V* *8*ܨP*"h*n*d**Ʃ**Z*+(+<@+X+ʫp++ʭ+\+++ ,T,0,H,@`,x,,V,,T,,-6 -8-P-h-д-F-ĵ-2--4-Է.R(.@.fX.p.l.ֺ.8.. .~//\0/H/`/nx//N///ʽ/0x 080@P0h0f0 0 0 0 0 0 0 0 1 1 (1 81 H1 X1 h1 x1 1 1 1 1 1 1 1 1 2 2 (2 82 H2 X2 h2 x2 2 2 2 2 2 2 2 2 3 3 (3 83 H3 X3 h3 x3 3 3 3 3 3 3 3 3 4 4 (4 84 H4 X4 h4 x4 4 4 4 4 4 4 4 4 5 5 (5 85 H5 X5 h5 x5 5 5 5 5 5 5 5 5 6 6 (6 86 H6 X6 h6 x6 6 6 6 6 6 6 6 6 7 7 (7 87 H7 X7 h7 x7 7 7 7 7 7 7 7 7 8 8 (8 88 H8 X8 h8 x8 8 8 8 8 8 8 8 8 9 9 (9 89 H9 X9 h9 x9 9 9 9 9 9 9 9 9 : : (: 8: H: X: h: x: : : : : : : : : ; ; (; 8; H; X; h; x; ; ; ; ; ; ; ; ; < < (< 8< H< X< h< x< < < < < < < < < = = (= 8= H= X= h= x= = = = = = = = = > > (> 8> H> X> h> x> > > > > > > > > ? ? (? 8? H? X? h? x? ? ? ? ? ? ? ? ? @ @ (@ 8@ H@ X@ h@ x@ @ @ @ @ @ @ @ @ A A (A 8A HA XA hA xA A A A A A A A A B B (B 8B HB XB hB xB B B B B B B B B C C (C 8C HC XC hC xC C C C C C C C C D D (D 8D HD XD hD xD D D D D D D D D E E (E 8E HE XE hE xE E E E E E E E E F F (F 8F HF XF hF xF F F F F F F F F G G (G 8G HG XG hG xG G G G G G G G G H H (H 8H HH XH hH xH H H HO@06Wj}l @B0 (Dp0gJ0 @ Tm%mxH!s@=Tpo#w8$2WZz_XbPbqOHtvs TC8@E xX#xyEy+4Gu< JO0*J{`$~pQT `vpG?XH6XM[m@ A$Mh%*x0U5;Mp@@<-PT<-H =AhN=4?<J < < <8 <j<b = =X=`=aș=`=X=8< <f h=8=/ h= `=}==2(;=p;K,4=O@>h>@>>>>8>>4@>E>E>>>6>x >x>%>HHHH HC HHH pH>:p!?X xyH`H#0HHHHsL<wL zL*LLLe'HL0L`Z[[[]>@B\s K\9R\ X\X\ LUxZhZY\F"8|\ }\~\b x\\X\*p\`\X\0n(])]HJHH*]Y-].]^S{T{U{j{k{ l{ u{Rw{/]f.0^] _]`]nJ^^{@{({x{8{ {{؝{{D>|0>{K0{. |C {gpP|{8e|w| ;?| |BX|p|E |`| |5H|| H}}@} (} 3} ?}`@} }~ } }m}1(E}]}T;L}0 }8} </<~x~8~S0}~&~~W~fVs@BG, j _'XX&]&+ +0+H+h+H,E H!,,0,j H=,q , &h&e &X;yßpٟ^P۟FdN;0$™@Np 0 0\ g XʦGK-X=9OCHOOSER/CHOOSER.CSSCHOOSER/CHOOSER.HTMLCHOOSER/CHOOSER.JSCOMMON/ASSERT.JSCOMMON/MESSAGETHROTTLE.JSCOMMON/BUTTON.CSSCOMMON/COMMON.CSSCOMMON/COMMONMERGED.JSCOMMON/COMMONMINIMAL.JSCOMMON/CSSUTILITIES.JS!COMMON/CUTCOPYPASTECONTEXTMENU.JSCOMMON/DATATREEVIEW.CSSCOMMON/ENCODINGUTILITIES.JSCOMMON/HTMLTREEVIEW.CSSCOMMON/ISDEBUGBUILD.JSCOMMON/LISTBOX.CSSCOMMON/PLUGIN.JSCOMMON/REMOTEEDITSTACK.JSCOMMON/REMOTEHELPERS.JSCOMMON/TOOLWINDOW.CSSCOMMON/TRACE.JSCOMMON/ETWDATACOLLECTOR.JSCOMMON/CONTROLS/CONTROLS.CSSCOMMON/IMAGES/ADD_ROW.PNGCOMMON/IMAGES/CHECKMARK.PNGCOMMON/IMAGES/CLOSE.PNGCOMMON/IMAGES/COLUMNMOVE.PNGCOMMON/IMAGES/COMMON_ICONS.PNGCOMMON/IMAGES/CRITICAL.PNGCOMMON/IMAGES/F12LOGO.PNGCOMMON/IMAGES/HELP.PNGCOMMON/IMAGES/I_DELETE.PNGCOMMON/IMAGES/I_NEXT.PNGCOMMON/IMAGES/I_PREVIOUS.PNGCOMMON/IMAGES/I_WARNING.PNG#COMMON/IMAGES/ITEMCOLLAPSEDICON.PNG"COMMON/IMAGES/ITEMEXPANDEDICON.PNGCOMMON/IMAGES/MAXIMIZE.PNGCOMMON/IMAGES/MINIMIZE.PNGCOMMON/IMAGES/MISC_ICONS.PNGCOMMON/IMAGES/OPTIONS.PNGCOMMON/IMAGES/REFRESH.PNGCOMMON/IMAGES/RESTORE.PNGCOMMON/IMAGES/TREE_ICONS.PNGCOMMON/IMAGES/TABCLOSE.PNG+COMMON/IMAGES/COLORPICKER/ALPHACOLORBAR.PNG1COMMON/IMAGES/COLORPICKER/CHECKEREDBACKGROUND.PNG.COMMON/IMAGES/COLORPICKER/EYEDROPPERBUTTON.PNG)COMMON/IMAGES/COLORPICKER/HUECOLORBAR.PNG/COMMON/IMAGES/COLORPICKER/LIGHTNESSCOLORBAR.PNG0COMMON/IMAGES/COLORPICKER/SATURATIONCOLORBAR.PNG*COMMON/IMAGES/COLORPICKER/SLIDERBUTTON.PNG+COMMON/INTELLISENSE/INTELLISENSELISTBOX.CSS0COMMON/INTELLISENSE/INTELLISENSEREMOTEHELPERS.JS"COMMON/LISTCONTROL/LISTCONTROL.CSS$COMMON/OBJECTVIEW/OBJECTTREEVIEW.CSS*COMMON/OBJECTVIEW/TREEVIEWREMOTEHELPERS.JS&COMMON/OBJECTVIEW/TREEVIEWUTILITIES.JSCOMMON/REMOTE/RPC.JSCOMMON/TOOLWINDOW.F12.CSSCONSOLE/CONSOLE.CSSCONSOLE/CONSOLE.HTMLCONSOLE/CONSOLEMERGED.JSCONSOLE/MANIFEST.JSONCONSOLE/REMOTE.JSCONSOLE/REMOTEMAIN.JS CONSOLE/IMAGES/I_CLEAR-INPUT.PNG"CONSOLE/IMAGES/I_CONSOLE-INPUT.PNGCONSOLE/IMAGES/I_ERROR.PNGCONSOLE/IMAGES/I_EXECUTE.PNGCONSOLE/IMAGES/I_INFO.PNG!CONSOLE/IMAGES/I_TOGGLE-MULTI.PNG"CONSOLE/IMAGES/I_TOGGLE-SINGLE.PNG&CONSOLE/IMAGES/I_CLEAR-ON-NAVIGATE.PNGCONSOLE/CONSOLE.F12.CSS DOM/DOM.HTMLDOM/DOMEXPLORER.CSSDOM/DOMEXPLORERMERGED.JSDOM/EVENTS.CSSDOM/EXPANDINGLISTVIEW.CSSDOM/INSPECT.HTMLDOM/LAYOUT.CSSDOM/MANIFEST.JSONDOM/DOMEXPLORERREMOTE.JS"DOM/STYLES/STYLEVIEW/STYLEVIEW.CSS(DOM/STYLES/WINNINGVIEW/WINNINGSTYLES.CSS&DOM/STYLES/CHANGESVIEW/CHANGESVIEW.CSS#DOM/IMAGES/BREADCRUMBSCROLLLEFT.PNG(DOM/IMAGES/BREADCRUMBSCROLLLEFTHOVER.PNG$DOM/IMAGES/BREADCRUMBSCROLLRIGHT.PNG)DOM/IMAGES/BREADCRUMBSCROLLRIGHTHOVER.PNGDOM/IMAGES/I_ERROR.PNGDOM/IMAGES/I_INSPECT.PNGDOM/IMAGES/RED_SQUIGGLY.PNGDOM/IMAGES/I_REFRESH.PNGDOM/IMAGES/I_JUST_MY_CODE.PNGDOM/IMAGES/I_SHOW-LAYOUT.PNG$DOM/IMAGES/I_SHOW_PSEUDO_CLASSES.PNGDOM/DOMEXPLORER.F12.CSSDEBUGGER/DEBUGGERMERGED.JSDEBUGGER/DEBUGGER.HTMLDEBUGGER/GRIDCONTROL.CSSDEBUGGER/DEBUGGER.CSSDEBUGGER/MANIFEST.JSON5DEBUGGER/BREAKPOINTS/EVENTBREAKPOINTDESCRIPTIONS.JSON$DEBUGGER/BREAKPOINTS/BREAKPOINTS.CSS/DEBUGGER/BREAKPOINTS/IMAGES/BREAKPOINTGLYPH.PNG5DEBUGGER/BREAKPOINTS/IMAGES/CONDITIONALBREAKPOINT.PNG4DEBUGGER/BREAKPOINTS/IMAGES/TRACEPOINTBREAKPOINT.PNG2DEBUGGER/BREAKPOINTS/IMAGES/BREAKPOINTDISABLED.PNG1DEBUGGER/BREAKPOINTS/IMAGES/BREAKPOINTUNBOUND.PNG4DEBUGGER/BREAKPOINTS/IMAGES/DELETEALLBREAKPOINTS.PNG4DEBUGGER/BREAKPOINTS/IMAGES/SELECTALLBREAKPOINTS.PNG5DEBUGGER/BREAKPOINTS/IMAGES/EDITCURRENTBREAKPOINT.PNG2DEBUGGER/BREAKPOINTS/IMAGES/ADDEVENTBREAKPOINT.PNG2DEBUGGER/BREAKPOINTS/IMAGES/ADDEVENTTRACEPOINT.PNG/DEBUGGER/BREAKPOINTS/IMAGES/EVENTBREAKPOINT.PNG:DEBUGGER/BREAKPOINTS/IMAGES/EVENTBREAKPOINTCONDITIONAL.PNG7DEBUGGER/BREAKPOINTS/IMAGES/EVENTBREAKPOINTDISABLED.PNG6DEBUGGER/BREAKPOINTS/IMAGES/EVENTBREAKPOINTUNBOUND.PNG/DEBUGGER/BREAKPOINTS/IMAGES/EVENTTRACEPOINT.PNG7DEBUGGER/BREAKPOINTS/IMAGES/EVENTTRACEPOINTDISABLED.PNG6DEBUGGER/BREAKPOINTS/IMAGES/EVENTTRACEPOINTUNBOUND.PNG DEBUGGER/CALLSTACK/CALLSTACK.CSS.DEBUGGER/CALLSTACK/IMAGES/ACTIVEFRAMEGLYPH.PNG5DEBUGGER/CALLSTACK/IMAGES/INSTRUCTIONPOINTERGLYPH.PNG)DEBUGGER/CALLSTACK/IMAGES/PAUSEWORKER.PNG/DEBUGGER/CALLSTACK/IMAGES/TOGGLEASYNCFRAMES.PNG-DEBUGGER/CALLSTACK/IMAGES/TOGGLEJMCFRAMES.PNGDEBUGGER/EDITOR/EDITOR.CSSDEBUGGER/EDITOR/VS/CSS.JS$DEBUGGER/EDITOR/EDITORDEFINITIONS.JSDEBUGGER/EDITOR/VS/LOADER.JSDEBUGGER/EDITOR/VS/NLS.JS,DEBUGGER/EDITOR/VS/BASE/WORKER/WORKERMAIN.JS;DEBUGGER/EDITOR/VS/BASE/WORKER/WORKERMAINCOMPATIBILITY.HTML.DEBUGGER/EDITOR/VS/BASE/WORKER/WORKERSERVER.JS2DEBUGGER/EDITOR/VS/BASE/WORKER/WORKERSERVER.NLS.JS7DEBUGGER/EDITOR/VS/BASE/WORKER/WORKERSERVER.NLS.KEYS.JS8DEBUGGER/EDITOR/VS/BASE/UI/SCROLLBAR/IMPL/ARROW-DOWN.PNG8DEBUGGER/EDITOR/VS/BASE/UI/SCROLLBAR/IMPL/ARROW-LEFT.PNG9DEBUGGER/EDITOR/VS/BASE/UI/SCROLLBAR/IMPL/ARROW-RIGHT.PNG6DEBUGGER/EDITOR/VS/BASE/UI/SCROLLBAR/IMPL/ARROW-UP.PNG5DEBUGGER/EDITOR/VS/BASE/UI/WIDGETS/CASE-SENSITIVE.PNG3DEBUGGER/EDITOR/VS/BASE/UI/WIDGETS/RED-SQUIGGLY.PNG,DEBUGGER/EDITOR/VS/BASE/UI/WIDGETS/REGEX.SVG1DEBUGGER/EDITOR/VS/BASE/UI/WIDGETS/WHOLE-WORD.PNG7DEBUGGER/EDITOR/VS/BASE/UI/WIDGETS/TOOLBAR/ELLIPSIS.SVG?DEBUGGER/EDITOR/VS/BASE/UI/WIDGETS/TOOLBAR/ELLIPSIS-INVERSE.SVG)DEBUGGER/EDITOR/VS/EDITOR/EDITOR.MAIN.CSS(DEBUGGER/EDITOR/VS/EDITOR/EDITOR.MAIN.JS,DEBUGGER/EDITOR/VS/EDITOR/EDITOR.MAIN.NLS.JS1DEBUGGER/EDITOR/VS/EDITOR/EDITOR.MAIN.NLS.KEYS.JS/DEBUGGER/EDITOR/VS/EDITOR/CSS/DEFAULT-THEME.CSS*DEBUGGER/EDITOR/VS/EDITOR/CSS/VS-THEME.CSS,DEBUGGER/EDITOR/VS/EDITOR/CSS/ARROW-LEFT.PNG-DEBUGGER/EDITOR/VS/EDITOR/CSS/ARROW-RIGHT.PNG-DEBUGGER/EDITOR/VS/EDITOR/CSS/ERROR-GLYPH.PNG0DEBUGGER/EDITOR/VS/EDITOR/CSS/GREEN-SQUIGGLY.PNG.DEBUGGER/EDITOR/VS/EDITOR/CSS/RED-SQUIGGLY.PNG/DEBUGGER/EDITOR/VS/EDITOR/CSS/WARNING-GLYPH.PNG8DEBUGGER/EDITOR/VS/EDITOR/MODES/MONARCH/MONARCHWORKER.JS<DEBUGGER/EDITOR/VS/EDITOR/MODES/MONARCH/MONARCHWORKER.NLS.JSADEBUGGER/EDITOR/VS/EDITOR/MODES/MONARCH/MONARCHWORKER.NLS.KEYS.JS*DEBUGGER/EDITOR/VS/LANGUAGES/NULLWORKER.JS.DEBUGGER/EDITOR/VS/LANGUAGES/NULLWORKER.NLS.JS3DEBUGGER/EDITOR/VS/LANGUAGES/NULLWORKER.NLS.KEYS.JS6DEBUGGER/EDITOR/VS/EDITOR/WORKER/EDITORWORKERSERVER.JS:DEBUGGER/EDITOR/VS/EDITOR/WORKER/EDITORWORKERSERVER.NLS.JS?DEBUGGER/EDITOR/VS/EDITOR/WORKER/EDITORWORKERSERVER.NLS.KEYS.JS9DEBUGGER/EDITOR/VS/LANGUAGES/COFFEESCRIPT/COFFEESCRIPT.JS=DEBUGGER/EDITOR/VS/LANGUAGES/COFFEESCRIPT/COFFEESCRIPT.NLS.JSBDEBUGGER/EDITOR/VS/LANGUAGES/COFFEESCRIPT/COFFEESCRIPT.NLS.KEYS.JS-DEBUGGER/EDITOR/VS/LANGUAGES/CSHARP/CSHARP.JS1DEBUGGER/EDITOR/VS/LANGUAGES/CSHARP/CSHARP.NLS.JS6DEBUGGER/EDITOR/VS/LANGUAGES/CSHARP/CSHARP.NLS.KEYS.JS5DEBUGGER/EDITOR/VS/LANGUAGES/CSS/SERVICES/BROWSERS.JS9DEBUGGER/EDITOR/VS/LANGUAGES/CSS/SERVICES/BROWSERS.NLS.JS>DEBUGGER/EDITOR/VS/LANGUAGES/CSS/SERVICES/BROWSERS.NLS.KEYS.JS'DEBUGGER/EDITOR/VS/LANGUAGES/CSS/CSS.JS+DEBUGGER/EDITOR/VS/LANGUAGES/CSS/CSS.NLS.JS0DEBUGGER/EDITOR/VS/LANGUAGES/CSS/CSS.NLS.KEYS.JS-DEBUGGER/EDITOR/VS/LANGUAGES/CSS/CSSWORKER.JS1DEBUGGER/EDITOR/VS/LANGUAGES/CSS/CSSWORKER.NLS.JS6DEBUGGER/EDITOR/VS/LANGUAGES/CSS/CSSWORKER.NLS.KEYS.JS5DEBUGGER/EDITOR/VS/LANGUAGES/CSS/MONACOPARTICIPANT.JS9DEBUGGER/EDITOR/VS/LANGUAGES/CSS/MONACOPARTICIPANT.NLS.JS>DEBUGGER/EDITOR/VS/LANGUAGES/CSS/MONACOPARTICIPANT.NLS.KEYS.JS)DEBUGGER/EDITOR/VS/LANGUAGES/HTML/HTML.JS-DEBUGGER/EDITOR/VS/LANGUAGES/HTML/HTML.NLS.JS2DEBUGGER/EDITOR/VS/LANGUAGES/HTML/HTML.NLS.KEYS.JS/DEBUGGER/EDITOR/VS/LANGUAGES/HTML/HTMLWORKER.JS3DEBUGGER/EDITOR/VS/LANGUAGES/HTML/HTMLWORKER.NLS.JS8DEBUGGER/EDITOR/VS/LANGUAGES/HTML/HTMLWORKER.NLS.KEYS.JS5DEBUGGER/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPT.JS9DEBUGGER/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPT.NLS.JS>DEBUGGER/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPT.NLS.KEYS.JS;DEBUGGER/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPTWORKER.JS?DEBUGGER/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPTWORKER.NLS.JSDDEBUGGER/EDITOR/VS/LANGUAGES/JAVASCRIPT/JAVASCRIPTWORKER.NLS.KEYS.JS3DEBUGGER/EDITOR/VS/LANGUAGES/PLAINTEXT/PLAINTEXT.JS7DEBUGGER/EDITOR/VS/LANGUAGES/PLAINTEXT/PLAINTEXT.NLS.JS<DEBUGGER/EDITOR/VS/LANGUAGES/PLAINTEXT/PLAINTEXT.NLS.KEYS.JS5DEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPT.JS9DEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPT.NLS.JS>DEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPT.NLS.KEYS.JS<DEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPTWORKER2.JS@DEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPTWORKER2.NLS.JSEDEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/TYPESCRIPTWORKER2.NLS.KEYS.JSADEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/LIB/TYPESCRIPTSERVICES.JSEDEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/LIB/TYPESCRIPTSERVICES.NLS.JSJDEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/LIB/TYPESCRIPTSERVICES.NLS.KEYS.JSKDEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/FILENAMESUGGESTIONS.JSODEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/FILENAMESUGGESTIONS.NLS.JSTDEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/FILENAMESUGGESTIONS.NLS.KEYS.JSFDEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/NLSPARTICIPANT.JSJDEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/NLSPARTICIPANT.NLS.JSODEBUGGER/EDITOR/VS/LANGUAGES/TYPESCRIPT/PARTICIPANTS/NLSPARTICIPANT.NLS.KEYS.JS'DEBUGGER/EDITOR/VS/LANGUAGES/XML/XML.JS+DEBUGGER/EDITOR/VS/LANGUAGES/XML/XML.NLS.JS0DEBUGGER/EDITOR/VS/LANGUAGES/XML/XML.NLS.KEYS.JS-DEBUGGER/EDITOR/VS/LANGUAGES/XML/XMLWORKER.JS1DEBUGGER/EDITOR/VS/LANGUAGES/XML/XMLWORKER.NLS.JS6DEBUGGER/EDITOR/VS/LANGUAGES/XML/XMLWORKER.NLS.KEYS.JS+DEBUGGER/EDITOR/VS/LANGUAGES/VSXML/VSXML.JS/DEBUGGER/EDITOR/VS/LANGUAGES/VSXML/VSXML.NLS.JS4DEBUGGER/EDITOR/VS/LANGUAGES/VSXML/VSXML.NLS.KEYS.JS+DEBUGGER/FORMATTER/SOURCEMAPPARSERWORKER.JS"DEBUGGER/FORMATTER/FORMATWORKER.JS'DEBUGGER/FORMATTER/SOURCEMAPMAPPINGS.JSDEBUGGER/FORMATTER/BASE64.JS&DEBUGGER/FORMATTER/HTMLSCRIPTFINDER.JS%DEBUGGER/FORMATTER/SOURCEMAPPARSER.JS'DEBUGGER/FORMATTER/SOURCESPANBUILDER.JS%DEBUGGER/FORMATTER/WORKERMESSAGING.JSDEBUGGER/IMAGES/BREAKALL.PNG%DEBUGGER/IMAGES/BREAKONEXCEPTIONS.PNGDEBUGGER/IMAGES/BREAKWORKER.PNGDEBUGGER/IMAGES/CONTINUE.PNGDEBUGGER/IMAGES/CSSFILEICON.PNGDEBUGGER/IMAGES/FILEPICKER.PNG!DEBUGGER/IMAGES/FILESNODEICON.PNG DEBUGGER/IMAGES/FUNCTIONICON.PNG DEBUGGER/IMAGES/HTMLFILEICON.PNGDEBUGGER/IMAGES/TSFILEICON.PNG#DEBUGGER/IMAGES/LIBRARYCODEICON.PNGDEBUGGER/IMAGES/MYCODEICON.PNGDEBUGGER/IMAGES/NEXTTAB.PNG$DEBUGGER/IMAGES/NOTAFUNCTIONICON.PNGDEBUGGER/IMAGES/PREVTAB.PNGDEBUGGER/IMAGES/RETURNVALUE.PNG%DEBUGGER/IMAGES/TOGGLEPRETTYPRINT.PNG"DEBUGGER/IMAGES/TOGGLEWORDWRAP.PNG#DEBUGGER/IMAGES/TOGGLESOURCEMAP.PNG"DEBUGGER/IMAGES/SCRIPTFILEICON.PNGDEBUGGER/IMAGES/SEARCH.PNGDEBUGGER/IMAGES/STEPINTO.PNGDEBUGGER/IMAGES/STEPOUT.PNGDEBUGGER/IMAGES/STEPOVER.PNG!DEBUGGER/MANAGER/COMMONSTRUCTS.JSDEBUGGER/REMOTE/REMOTE.JS DEBUGGER/REMOTE/DEBUGPROVIDER.JS(DEBUGGER/REMOTE/DIAGNOSTICSOMPROVIDER.JSDEBUGGER/REMOTE/JITREMOTE.JS"DEBUGGER/TABCONTROL/TABCONTROL.CSS$DEBUGGER/WATCHES/IMAGES/ADDWATCH.PNG%DEBUGGER/WATCHES/IMAGES/DELETEALL.PNGDEBUGGER/WATCHES/WATCHES.CSSEMULATION/EMULATION.CSSEMULATION/EMULATION.HTMLEMULATION/EMULATIONMERGED.JSEMULATION/EMULATION.JSONEMULATION/INFOBUTTON.PNGEMULATION/I_PERSISTSETTINGS.PNGEMULATION/I_RESETSETTINGS.PNGEMULATION/MANIFEST.JSONEMULATION/REMOTE.JSEMULATION/REMOTEMAIN.JSHEADER/HEADER.CSSHEADER/HEADER.HTMLHEADER/HEADERMERGED.JSHEADER/IMAGES/BADGEALERT.PNGHEADER/IMAGES/BADGEBREAK.PNGHEADER/IMAGES/BADGEERROR.PNGHEADER/IMAGES/BADGEINFO.PNGHEADER/IMAGES/BADGERUNNING.PNGHEADER/IMAGES/CLOSE.PNGHEADER/IMAGES/CONSOLE.PNGHEADER/IMAGES/DOCK.PNGHEADER/IMAGES/EMULATION.PNG HEADER/IMAGES/EMULATIONCOMBO.PNGHEADER/IMAGES/FEEDBACK.PNGHEADER/IMAGES/FOREGROUND.PNGHEADER/IMAGES/HELP.PNGHEADER/IMAGES/OVERFLOW.PNGHEADER/IMAGES/UNDOCK.PNG#HEADER/IMAGES/NAVOVERFLOW_BREAK.PNG"HEADER/IMAGES/NAVOVERFLOW_INFO.PNG#HEADER/IMAGES/NAVOVERFLOW_START.PNG%HEADER/IMAGES/NAVOVERFLOW_WARNING.PNGHEADER/IMAGES/CHECKMARK.PNGHEADER/IMAGES/NEXTTAB.PNGHEADER/IMAGES/PREVTAB.PNGHEADER/MANIFEST.JSONHEADER/REMOTE/REMOTE.JS)PERFTOOLS/COMMON/CONTROLS/GRIDCONTROL.CSS(PERFTOOLS/COMMON/CONTROLS/HUBCONTROLS.JS)PERFTOOLS/COMMON/CONTROLS/MENUCONTROL.CSS,PERFTOOLS/COMMON/CONTROLS/MULTILINEGRAPH.CSS&PERFTOOLS/COMMON/CONTROLS/RENDERER.CSS#PERFTOOLS/COMMON/CONTROLS/RULER.CSS'PERFTOOLS/COMMON/CONTROLS/SCROLLBAR.CSS/PERFTOOLS/COMMON/CONTROLS/SOURCEINFOTOOLTIP.CSS&PERFTOOLS/COMMON/CONTROLS/SWIMLANE.CSSPERFTOOLS/COMMON/COMMON.F12.CSS#PERFTOOLS/COMMON/TOKENEXTRACTOR.CSS"PERFTOOLS/COMMON/DIAGNOSTICSHUB.JS%PERFTOOLS/COMMON/IMAGES/CHECKMARK.PNG+PERFTOOLS/COMMON/IMAGES/CUSTOMMARK5_18X.PNG&PERFTOOLS/COMMON/IMAGES/I_APPEVENT.PNG"PERFTOOLS/COMMON/IMAGES/I_OPEN.PNG"PERFTOOLS/COMMON/IMAGES/I_SAVE.PNG'PERFTOOLS/COMMON/IMAGES/I_SORT_DOWN.PNG%PERFTOOLS/COMMON/IMAGES/I_SORT_UP.PNG#PERFTOOLS/COMMON/IMAGES/I_START.PNG"PERFTOOLS/COMMON/IMAGES/I_STOP.PNG&PERFTOOLS/COMMON/IMAGES/I_USERMARK.PNG%PERFTOOLS/COMMON/IMAGES/I_WARNING.PNG-PERFTOOLS/COMMON/IMAGES/ITEMCOLLAPSEDICON.PNG,PERFTOOLS/COMMON/IMAGES/ITEMEXPANDEDICON.PNG PERFTOOLS/COMMON/COMMONMERGED.JSPERFTOOLS/COMMON/PLUGIN.CSSPERFTOOLS/COMMON/PLUGIN.JS%PERFTOOLS/COMMON/PERFREMOTEHELPERS.JSPERFTOOLS/MEMORY/MANIFEST.JSON#PERFTOOLS/MEMORY/MEMORYANALYZER.CSS'PERFTOOLS/MEMORY/MEMORYANALYZER.F12.CSS$PERFTOOLS/MEMORY/MEMORYANALYZER.HTML(PERFTOOLS/MEMORY/MEMORYANALYZERMERGED.JSPERFTOOLS/MEMORY/REMOTE.JS%PERFTOOLS/MEMORY/SNAPSHOTTILEVIEW.CSS$PERFTOOLS/MEMORY/IMAGES/I_FOLDIN.PNG"PERFTOOLS/MEMORY/IMAGES/I_INFO.PNG&PERFTOOLS/MEMORY/IMAGES/I_SNAPSHOT.PNG+PERFTOOLS/MEMORY/IMAGES/I_TABLE_OPTIONS.PNG0PERFTOOLS/MEMORY/IMAGES/STATUS_HEAP_DECREASE.PNG0PERFTOOLS/MEMORY/IMAGES/STATUS_HEAP_INCREASE.PNG(PERFTOOLS/MEMORY/IMAGES/TAKESNAPSHOT.PNG+PERFTOOLS/MEMORY/JS/CONTROLS/TABCONTROL.CSS/PERFTOOLS/VISUALPROFILER/DATACATEGORYSTYLES.CSS&PERFTOOLS/VISUALPROFILER/MANIFEST.JSON+PERFTOOLS/VISUALPROFILER/VISUALPROFILER.CSS/PERFTOOLS/VISUALPROFILER/VISUALPROFILER.F12.CSS,PERFTOOLS/VISUALPROFILER/VISUALPROFILER.HTML0PERFTOOLS/VISUALPROFILER/VISUALPROFILERMERGED.JS:PERFTOOLS/VISUALPROFILER/IMAGES/I_CHECKERED_BACKGROUND.PNG>PERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CHARTSELECTION_CLEAR.PNG6PERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CHARTZOOM_IN.PNG9PERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CHARTZOOM_RESET.PNGFPERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CONTEXT_CHARTSELECTION_CLEAR.PNGOPERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CONTEXT_CHARTSELECTION_CLEAR_DISABLED.PNG>PERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CONTEXT_CHARTZOOM_IN.PNGGPERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CONTEXT_CHARTZOOM_IN_DISABLED.PNGAPERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CONTEXT_CHARTZOOM_RESET.PNGJPERFTOOLS/VISUALPROFILER/IMAGES/I_F12_CONTEXT_CHARTZOOM_RESET_DISABLED.PNG7PERFTOOLS/VISUALPROFILER/IMAGES/I_FILTERING_OPTIONS.PNG4PERFTOOLS/VISUALPROFILER/IMAGES/I_FRAME_GROUPING.PNG0PERFTOOLS/VISUALPROFILER/JS/CONTROLS/DIVIDER.CSS8PERFTOOLS/VISUALPROFILER/JS/HUBGRAPHS/MULTILINEGRAPH.CSS/PERFTOOLS/VISUALPROFILER/JS/HUBGRAPHS/RULER.CSS9PERFTOOLS/VISUALPROFILER/JS/HUBGRAPHS/STACKEDBARCHART.CSS2PERFTOOLS/VISUALPROFILER/JS/HUBGRAPHS/SWIMLANE.CSSPLUGINHOST/PLUGIN.F12.JSPLUGINHOST/POPUPWINDOW.HTMLPLUGINHOST/POPUPWINDOW.CSS"PLUGINHOST/THEME/CLOSEERRORBOX.PNGPLUGINHOST/THEME/F12.CSS!PLUGINHOST/THEME/HELPERRORBOX.PNGPLUGINHOST/THEME/LIGHT.JSON"PLUGINHOST/THEME/HIGHCONTRAST.JSONPLUGINHOST/THEME/PLUGIN.CSS!PLUGINHOST/THEME/I_ALERTERROR.PNGNETWORK/MANIFEST.JSONPROFILER/MANIFEST.JSONMUI4VS_VERSION_INFO XD% XD%?StringFileInfo040904B0LCompanyNameMicrosoft CorporationdFileDescriptionF12 Developer Tools Resourcest*FileVersion11.00.9600.17496 (winblue_r5.141121-1500)BInternalNameF12Resources.dll.LegalCopyright Microsoft Corporation. All rights reserved.JOriginalFilenameF12Resources.dllDProductNameInternet ExplorerFProductVersion11.00.9600.17496DVarFileInfo$Translation html, body { margin: 0; padding: 0; width: 100%; height: 100%; } body { background-color: #FFFFFF; font-family: Segoe UI Light; font-size: small; color: #000000; line-height: 1.1em; overflow: hidden; -ms-user-select: none; user-select: none; } #grid { width: 100%; height: 100%; border-top: 4px solid #000000; display: -ms-grid; -ms-grid-columns: 52px 1fr 28px 28px; -ms-grid-rows: 32px 1fr; } .headerImg { background-position: 0 0; background-size: 56px; background-repeat: no-repeat; cursor: pointer; height: 22px; } .headerImg:hover { background-position: -28px 0; } #f12Logo { background-image: url("../common/images/f12Logo.png"); background-position: center -3px; background-repeat: no-repeat; background-size: 32px 32px; display: inline-block; background-color: #000000; -ms-grid-column: 1; -ms-grid-row: 1; } #headerTitle { font-size: large; margin-left: 8px; margin-top: 6px; cursor: default; user-select: none; -ms-grid-column: 2; -ms-grid-row: 1; } #refreshCmd { background-image: url('../common/images/refresh.png'); -ms-grid-column: 3; -ms-grid-row: 1; } #closeCmd { background-image: url('../common/images/close.png'); -ms-grid-column: 4; -ms-grid-row: 1; } #targets { -ms-grid-column: 1; -ms-grid-column-span: 4; -ms-grid-row: 2; overflow-y: auto; margin: 5px 3px 0 6px; } .target { margin: 4px; display: inline-block; width: 192px; cursor: pointer; position: relative; } .preview { height: 108px; width: 192px; background-color: #606060; } .title { background-color: #1E1E1E; position: absolute; bottom: 0; left: 0; color: #FFFFFF; padding-left: 2px; height: 20px; width: 190px; transition: height 0.3s ease; } F12 Chooser
Choose a target to debug
var pluginAPI = window.external; var chooser = { animateTitleStart: function (titleNode) { titleNode.style.height = "60px"; titleNode.style.whiteSpace = "normal" }, animateTitleEnd: function (titleNode) { titleNode.style.height = "20px"; titleNode.style.whiteSpace = "nowrap"; }, addTarget: function chooser_addTargetfunction(id, url, title, screenshot, processExeName, packageName, pid) { if(id == null || isNaN(id)){ throw new Error("id is not optional number") } if(!url){ throw new Error("url is not optional") } if(!title){ title = chooser.createShortenedUrlText(url); } if (screenshot) { screenshot = "data:image/png;base64," + screenshot; } if (!processExeName) { processExeName = "unknown"; } if(pid == null || isNaN(pid)){ pid = "unknown"; } var targetEl = document.createElement("div"); targetEl.className = "target" targetEl.setAttribute("data-id", id); // all this to avoid a capture on attachEl targetEl.addEventListener("click", function targetClick(e) { var id = e.currentTarget.getAttribute("data-id"); chooser.selectTarget(id); }); targetEl.addEventListener("mouseover", function titleEl_mouseover(e) { var nodeList = e.currentTarget.querySelectorAll(".title"); if (nodeList && nodeList[0]) { chooser.animateTitleStart(nodeList[0]);; } }); targetEl.addEventListener("mouseout", function titleEl_mouseover(e) { var nodeList = e.currentTarget.querySelectorAll(".title"); if (nodeList && nodeList[0]) { chooser.animateTitleEnd(nodeList[0]); } }); var imgEl = document.createElement("div"); imgEl.className = "preview"; imgEl.style.backgroundRepeat = "no-repeat"; var titleEl = document.createElement("div"); titleEl.className = "title cutText"; titleEl.appendChild(document.createTextNode(title)); targetEl.appendChild(imgEl); targetEl.appendChild(titleEl); var targetsEl = document.getElementById("targets"); targetsEl.appendChild(targetEl); }, removeTargets: function chooser_removeTargets() { var targetsEl = document.getElementById("targets"); targetsEl.innerHTML = ""; }, removeTarget: function chooser_removeTarget(){ }, selectTarget: function chooser_targetSelected(id) { pluginAPI.selectInstanceByIndex(id); }, createShortenedUrlText: function (url) { var shortenedText = url; // Remove a query string if any var indexOfHash = shortenedText.indexOf("#"); var indexOfQuestionMark = shortenedText.indexOf("?"); var index = -1; if (indexOfHash > -1 && indexOfQuestionMark > -1) { index = Math.min(indexOfHash, indexOfQuestionMark); } else if (indexOfHash > -1) { index = indexOfHash; } else if (indexOfQuestionMark > -1) { index = indexOfQuestionMark; } if (index > -1) { shortenedText = shortenedText.substring(0, index); } index = shortenedText.lastIndexOf("/"); // While the last character is '/', truncate it and find the next / or the start of the string while (index !== -1 && index === (shortenedText.length - 1)) { // Remove last '/' shortenedText = shortenedText.substring(0, shortenedText.length - 1); index = shortenedText.lastIndexOf("/"); } if (index > -1) { shortenedText = shortenedText.substring(index + 1); } return shortenedText; } } document.addEventListener("DOMContentLoaded", function chooserDOMContentLoaed(){ function loadInstances() { chooser.removeTargets(); var instancesArray = pluginAPI.getWebInstances(); for (var i = 0; i < instancesArray.length; i++) { var instance = instancesArray[i]; var id = i; var url = ""; try { url = instance.document.location.toString(); } catch (e) { try{ if (instance.document.URLUnencoded) { url = instance.document.URLUnencoded; } else if (instance.document.url) { url = instance.document.url; } } catch (e) { url = "unknown"; } } var title= ""; try{ title = instance.document.title.toString(); } catch(e){ title = "unknown"; } var image = instance.base64Image; var processExeName = instance.processExeName; var packageName = instance.packageName; var pid = instance.processId; chooser.addTarget( i, url, title, image, processExeName, packageName, pid); } } loadInstances(); document.getElementById("closeCmd").addEventListener("click", function () { window.external.cancel(); }); document.getElementById("refreshCmd").addEventListener("click", function () { loadInstances(); }); window.setInterval(function () { var titles = document.querySelectorAll(".title"); if (titles) { var randIndex = Math.round(Math.random() * titles.length); var title = titles[randIndex]; if (title) { chooser.animateTitleStart(title); window.setTimeout(function () { if (title) { chooser.animateTitleEnd(title); } }, 2600); } } }, 3000); }); var F12; (function (F12) { (function (Tools) { (function (Utility) { "use strict"; var Assert = (function () { function Assert() { } Assert.isTrue = function (condition, message) { if (!condition) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly false."; Assert.fail(message); } }; Assert.isFalse = function (condition, message) { if (condition) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly true."; Assert.fail(message); } }; Assert.isNull = function (value, message) { if (value !== null) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not null."; message += " '" + value + "'"; Assert.fail(message); } }; Assert.isUndefined = function (value, message) { if (undefined !== void 0) { message = "Internal error. Unexpectedly undefined has been redefined."; message += " '" + undefined + "'"; Assert.fail(message); } if (value !== undefined) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not undefined."; message += " '" + value + "'"; Assert.fail(message); } }; Assert.hasValue = function (value, message) { if (undefined !== void 0) { message = "Internal error. Unexpectedly undefined has been redefined."; message += " '" + undefined + "'"; Assert.fail(message); } if (value === null || value === undefined) { message = message ? "Internal error. " + message : ("Internal error. Unexpectedly " + (value === null ? "null" : "undefined") + "."); Assert.fail(message); } }; Assert.areEqual = function (value1, value2, message) { if (value1 !== value2) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not equal."; message += " '" + value1 + "' !== '" + value2 + "'."; Assert.fail(message); } }; Assert.areNotEqual = function (value1, value2, message) { if (value1 === value2) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly equal."; message += " '" + value1 + "' === '" + value2 + "'."; Assert.fail(message); } }; Assert.fail = function (message) { var error = new Error((message || "Assert failed.") + "\n"); try { throw error; } catch (ex) { if (Common && Common.ErrorHandling) { Common.ErrorHandling.reportErrorGivenStack(ex); } throw ex; } }; Assert.failDebugOnly = function (message) { if (isDebugBuild) { Assert.fail(message); } }; return Assert; })(); Utility.Assert = Assert; })(Tools.Utility || (Tools.Utility = {})); var Utility = Tools.Utility; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { "use strict"; var MessageThrottle = (function () { function MessageThrottle() { this._packetCount = 0; this._data = ""; } MessageThrottle.splitMessage = function (data) { var length = data.length; var count = Math.max(1, Math.ceil(length / MessageThrottle.MAX_MESSAGE_LENGTH)); var messages = []; for (var i = 0; i < count; i++) { var start = i * MessageThrottle.MAX_MESSAGE_LENGTH; var end = start + Math.min(MessageThrottle.MAX_MESSAGE_LENGTH, length - start); var part = data.slice(start, end); var msg = { n: count, data: part }; messages.push(JSON.stringify(msg)); } return messages; }; MessageThrottle.prototype.combineMessages = function (message) { var packet = JSON.parse(message.data); if (packet.n >= 1) { this._data += packet.data || ""; this._packetCount++; if (this._packetCount === packet.n) { var data = this._data; this._packetCount = 0; this._data = ""; message.data = data; message.handled = false; } else { message.handled = true; } } else { message.handled = true; } }; MessageThrottle.MAX_MESSAGE_LENGTH = 1024 * 32; return MessageThrottle; })(); Common.MessageThrottle = MessageThrottle; var PortThrottler = (function (_super) { __extends(PortThrottler, _super); function PortThrottler(port) { _super.call(this); this._messageHandlers = []; this._port = port; } Object.defineProperty(PortThrottler.prototype, "name", { get: function () { return this._port.name; }, enumerable: true, configurable: true }); PortThrottler.prototype.initialize = function () { this._port.addEventListener("message", this.onmessage.bind(this)); }; PortThrottler.prototype.postMessage = function (data) { var packets = MessageThrottle.splitMessage(data); var x, n; for (x = 0, n = packets.length; x < n; x++) { var p = packets[x]; this._port.postMessage(p); } return true; }; PortThrottler.prototype.addEventListener = function (type, listener) { if (type !== "message") { throw new Error("Invalid event type"); } this._messageHandlers.push(listener); }; PortThrottler.prototype.removeEventListener = function (type, listener) { if (type !== "message") { throw new Error("Invalid event type"); } while (true) { var i = this._messageHandlers.indexOf(listener); if (i === -1) { break; } this._messageHandlers.splice(i, 1); } }; PortThrottler.prototype.onmessage = function (message) { this.combineMessages(message); if (!message.handled) { var x, n; for (x = 0, n = this._messageHandlers.length; x < n; x++) { var h = this._messageHandlers[x]; h(message); } } }; return PortThrottler; })(MessageThrottle); Common.PortThrottler = PortThrottler; })(Common || (Common = {})); /* Button control. */ button, input[type=button], input[type=reset], input[type=submit] { min-width: 90px; padding: 4px 8px; border-width: 2px; border-style: solid; background-clip: padding-box; font-size: 11pt; font-weight: 600; } button ::selection, input[type=button] ::selection, input[type=reset] ::selection, input[type=submit] ::selection { background: transparent; } /* Button control colors. */ button, input[type=button], input[type=submit], input[type=reset], input[type=file]::-ms-browse { background-color: transparent; color: rgb(0, 0, 0); border: 1px solid #FFFFFF; } button[type=submit], input[type=submit] { background-clip: padding-box; background-color: rgb(70, 23, 180); } button:hover, input[type=button]:hover, input[type=reset]:hover, input[type=file]::-ms-browse:hover { background-color: rgba(255, 255, 255, 0.13); border-color: rgb(255, 255, 255); } button[type=submit]:hover, input[type=submit]:hover { background-clip: padding-box; background-color: rgb(95, 55, 190); border-color: rgb(255, 255, 255); } button:hover:active, button[type=submit]:hover:active, input[type=button]:hover:active, input[type=reset]:hover:active, input[type=submit]:hover:active, input[type=file]::-ms-browse:hover:active { background-clip: border-box; background-color: rgb(255, 255, 255); border-color: transparent; color: rgb(0, 0, 0); } button:disabled, button[type=submit]:disabled, input[type=button]:disabled, input[type=reset]:disabled, input[type=submit]:disabled, input[type=file]:disabled::-ms-browse, button:disabled:active, button[type=submit]:disabled:active, input[type=button]:disabled:active, input[type=reset]:disabled:active, input[type=submit]:disabled:active, input[type=file]:disabled::-ms-browse:active { background-color: transparent; border-color: rgba(255, 255, 255, 0.4); color: rgba(255, 255, 255, 0.4); } button[selected=true], input[type=button][selected=true], input[type=reset][selected=true], input[type=file][selected=true] { color: #333333; /*[{plugin-filetab-hot-color}]*/ background-color: #FFF3CD; /* [{plugin-contextmenu-hover-color}]*/ border: 1px solid #E5C365; /* [1px solid {host-command-bar-selected-border-color}]*/ } /* Toolbar Button control. */ .toolbar button, .toolbar input[type=button], .toolbar input[type=reset], .toolbar input[type=submit] { cursor: default; padding: 0 5px 0 5px; display: inline-block; border: 1px solid transparent; vertical-align: middle; background-clip: padding-box; font-size: 9pt; font-weight: normal; } .toolbar button img, .toolbar input[type=button] img, .toolbar input[type=reset] img, .toolbar input[type=submit] img { margin: 2px 4px 0 -2px; vertical-align: middle; } /* Button control colors. */ .toolbar button, .toolbar input[type=button], .toolbar input[type=submit], .toolbar input[type=reset], .toolbar input[type=file]::-ms-browse { background-color: transparent; border-color: rgb(255, 255, 255); color: #BFBFBF; padding-right: 4px; } .toolbar button:hover, .toolbar input[type=button]:hover, .toolbar input[type=reset]:hover, .toolbar input[type=file]::-ms-browse:hover { color: #333333; /*[{plugin-filetab-hot-color}]*/ } .toolbar button:hover:active, .toolbar button[type=submit]:hover:active, .toolbar input[type=button]:hover:active, .toolbar input[type=reset]:hover:active, .toolbar input[type=submit]:hover:active, .toolbar input[type=file]::-ms-browse:hover:active { color: #333333; /*[{plugin-filetab-hot-color}]*/ } .toolbar button:disabled, .toolbar button[type=submit]:disabled, .toolbar input[type=button]:disabled, .toolbar input[type=reset]:disabled, .toolbar input[type=submit]:disabled, .toolbar input[type=file]:disabled::-ms-browse, .toolbar button:disabled:active, .toolbar button[type=submit]:disabled:active, .toolbar input[type=button]:disabled:active, .toolbar input[type=reset]:disabled:active, .toolbar input[type=submit]:disabled:active, .toolbar input[type=file]:disabled::-ms-browse:active { background-color: transparent; border: 1px solid transparent; color: #808080; /*[{plugin-inactive-color}]*/ } .toolbar button[selected=true], .toolbar input[type=button][selected=true], .toolbar input[type=reset][selected=true], .toolbar input[type=file][selected=true] { color: #333333; /*[{plugin-filetab-hot-color}]*/ } body { background-color: #FFFFFF; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: small; color: #000000; margin: 0; padding: 0; line-height: 1.1em; } button{ text-transform: uppercase; cursor: pointer; padding: 4px 8px 4px 8px; border: solid 1px #BFBFBF; font-size: x-small; color: #000000; background-color: #FFFFFF; } button:hover{ border-color: #000000; } dt{ font-weight: bold; } dd{ } .cutText{ overflow: hidden; text-overflow: ellipsis; white-space:nowrap; }// // Copyright (C) Microsoft. All rights reserved. // // // assert.ts var F12; (function (F12) { (function (Tools) { (function (Utility) { "use strict"; var Assert = (function () { function Assert() { } Assert.isTrue = function (condition, message) { if (!condition) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly false."; Assert.fail(message); } }; Assert.isFalse = function (condition, message) { if (condition) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly true."; Assert.fail(message); } }; Assert.isNull = function (value, message) { if (value !== null) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not null."; message += " '" + value + "'"; Assert.fail(message); } }; Assert.isUndefined = function (value, message) { if (undefined !== void 0) { message = "Internal error. Unexpectedly undefined has been redefined."; message += " '" + undefined + "'"; Assert.fail(message); } if (value !== undefined) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not undefined."; message += " '" + value + "'"; Assert.fail(message); } }; Assert.hasValue = function (value, message) { if (undefined !== void 0) { message = "Internal error. Unexpectedly undefined has been redefined."; message += " '" + undefined + "'"; Assert.fail(message); } if (value === null || value === undefined) { message = message ? "Internal error. " + message : ("Internal error. Unexpectedly " + (value === null ? "null" : "undefined") + "."); Assert.fail(message); } }; Assert.areEqual = function (value1, value2, message) { if (value1 !== value2) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not equal."; message += " '" + value1 + "' !== '" + value2 + "'."; Assert.fail(message); } }; Assert.areNotEqual = function (value1, value2, message) { if (value1 === value2) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly equal."; message += " '" + value1 + "' === '" + value2 + "'."; Assert.fail(message); } }; Assert.fail = function (message) { var error = new Error((message || "Assert failed.") + "\n"); try { throw error; } catch (ex) { if (Common && Common.ErrorHandling) { Common.ErrorHandling.reportErrorGivenStack(ex); } throw ex; } }; Assert.failDebugOnly = function (message) { if (isDebugBuild) { Assert.fail(message); } }; return Assert; })(); Utility.Assert = Assert; })(Tools.Utility || (Tools.Utility = {})); var Utility = Tools.Utility; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // IControl.ts var Common; (function (Common) { "use strict"; })(Common || (Common = {})); // EventSource.ts var Common; (function (Common) { "use strict"; var EventSource = (function () { function EventSource() { this._handlers = null; this._eventsRunning = 0; } EventSource.prototype.addHandler = function (handler) { var _this = this; F12.Tools.Utility.Assert.isTrue(typeof handler === "function", "handler must be function"); if (!this._handlers) { this._handlers = []; } this._handlers.push(handler); return { unregister: function () { return _this.removeHandler(handler); } }; }; EventSource.prototype.addOne = function (handler) { var registration = this.addHandler(function (args) { registration.unregister(); handler(args); }); return registration; }; EventSource.prototype.removeHandler = function (handler) { F12.Tools.Utility.Assert.hasValue(this._handlers && this._handlers.length, "Shouldn't call remove before add"); var i = this._handlers.length; while (i--) { if (this._handlers[i] === handler) { if (this._eventsRunning > 0) { this._handlers[i] = null; } else { this._handlers.splice(i, 1); } return; } } F12.Tools.Utility.Assert.fail("Called remove on a handler which wasn't added"); }; EventSource.prototype.invoke = function (args) { if (this._handlers) { this._eventsRunning++; for (var i = 0; i < this._handlers.length; i++) { this._handlers[i] && this._handlers[i](args); } this._eventsRunning--; if (this._eventsRunning === 0) { this.cleanupNullHandlers(); } } }; EventSource.prototype.invokeAsync = function (args) { if (this._handlers) { this._eventsRunning++; var promises = []; for (var i = 0; i < this._handlers.length; i++) { var promise = this._handlers[i] && this._handlers[i](args); if (promise && promise.then) { promises.push(promise); } } this._eventsRunning--; if (this._eventsRunning === 0) { this.cleanupNullHandlers(); } return Plugin.Promise.join(promises); } return Plugin.Promise.wrap(null); }; EventSource.prototype.cleanupNullHandlers = function () { for (var i = this._handlers.length - 1; i >= 0; i--) { if (!this._handlers[i]) { this._handlers.splice(i, 1); } } }; return EventSource; })(); Common.EventSource = EventSource; })(Common || (Common = {})); // IEventRegistration.ts var Common; (function (Common) { "use strict"; })(Common || (Common = {})); // IEventHandler.ts var Common; (function (Common) { "use strict"; })(Common || (Common = {})); // ObservableCollection.ts var Common; (function (Common) { "use strict"; var ObservableCollection = (function () { function ObservableCollection(list) { if (typeof list === "undefined") { list = []; } this._list = list.slice(0); this.propertyChanged = new Common.EventSource(); this.collectionChanged = new Common.EventSource(); } Object.defineProperty(ObservableCollection.prototype, "length", { get: function () { return this._list.length; }, enumerable: true, configurable: true }); ObservableCollection.prototype.push = function () { var items = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { items[_i] = arguments[_i + 0]; } var insertionIndex = this._list.length; var newLength = Array.prototype.push.apply(this._list, items); this.propertyChanged.invoke(ObservableCollection.LengthProperty); this.invokeCollectionChanged(0 /* Add */, items, insertionIndex); return newLength; }; ObservableCollection.prototype.pop = function () { var oldItem = this._list.pop(); this.propertyChanged.invoke(ObservableCollection.LengthProperty); this.invokeCollectionChanged(1 /* Remove */, null, null, [oldItem], this._list.length); return oldItem; }; ObservableCollection.prototype.splice = function (index, removeCount) { var items = []; for (var _i = 0; _i < (arguments.length - 2); _i++) { items[_i] = arguments[_i + 2]; } var args = [index, removeCount]; if (items) { Array.prototype.push.apply(args, items); } var removedItems = Array.prototype.splice.apply(this._list, args); var itemsRemoved = removedItems.length > 0; var itemsAdded = items && items.length > 0; if (itemsRemoved || itemsAdded) { this.propertyChanged.invoke(ObservableCollection.LengthProperty); if (itemsRemoved) { this.invokeCollectionChanged(1 /* Remove */, null, null, removedItems, index); } if (itemsAdded) { this.invokeCollectionChanged(0 /* Add */, items, index, null, null); } } return removedItems; }; ObservableCollection.prototype.indexOf = function (searchElement, fromIndex) { return this._list.indexOf(searchElement, fromIndex); }; ObservableCollection.prototype.lastIndexOf = function (searchElement, fromIndex) { if (typeof fromIndex === "undefined") { fromIndex = -1; } return this._list.lastIndexOf(searchElement, fromIndex); }; ObservableCollection.prototype.clear = function () { this._list = []; this.propertyChanged.invoke(ObservableCollection.LengthProperty); this.invokeCollectionChanged(3 /* Clear */); }; ObservableCollection.prototype.filter = function (callbackfn, thisArg) { return this._list.filter(callbackfn, thisArg); }; ObservableCollection.prototype.map = function (callbackfn, thisArg) { return this._list.map(callbackfn, thisArg); }; ObservableCollection.prototype.getItem = function (index) { return this._list[index]; }; ObservableCollection.prototype.resetItems = function (items) { this._list = []; var newLength = Array.prototype.push.apply(this._list, items); this.propertyChanged.invoke(ObservableCollection.LengthProperty); this.invokeCollectionChanged(2 /* Reset */); return newLength; }; ObservableCollection.prototype.invokeCollectionChanged = function (action, newItems, newStartingIndex, oldItems, oldStartingIndex) { var event = { action: action, newItems: newItems, newStartingIndex: newStartingIndex, oldItems: oldItems, oldStartingIndex: oldStartingIndex }; this.collectionChanged.invoke(event); }; ObservableCollection.LengthProperty = "length"; return ObservableCollection; })(); Common.ObservableCollection = ObservableCollection; })(Common || (Common = {})); // Observable.ts var Common; (function (Common) { "use strict"; var Observable = (function () { function Observable() { this.propertyChanged = new Common.EventSource(); } Observable.fromObject = function (obj) { if (typeof obj.propertyChanged !== "undefined") { return obj; } var returnValue = new Observable(); var backingData = {}; Object.defineProperties(returnValue, ObservableHelpers.expandProperties(obj, backingData, returnValue)); returnValue["_backingData"] = backingData; return returnValue; }; return Observable; })(); Common.Observable = Observable; var ObservableHelpers = (function () { function ObservableHelpers() { } ObservableHelpers.defineProperty = function (classToExtend, propertyName, defaultValue, onChanged, onChanging) { var backingFieldName = "_" + propertyName; Object.defineProperty(classToExtend.prototype, propertyName, { get: function () { if (typeof this[backingFieldName] === "undefined") { this[backingFieldName] = defaultValue; } return this[backingFieldName]; }, set: function (newValue) { var oldValue = this[backingFieldName]; if (newValue !== oldValue) { if (onChanging) { onChanging(this, oldValue, newValue); } this[backingFieldName] = newValue; var observable = this; observable.propertyChanged.invoke(propertyName); if (onChanged) { onChanged(this, oldValue, newValue); } } } }); }; ObservableHelpers.describePropertyForObjectShape = function (propertyName, objectShape, backingDataStore, invokableObserver) { var returnValue = { get: function () { return backingDataStore[propertyName]; }, enumerable: true }; var propertyValue = objectShape[propertyName]; if (typeof propertyValue === "object") { backingDataStore[propertyName] = Observable.fromObject(propertyValue); returnValue.set = function (value) { if (value !== backingDataStore[propertyName]) { backingDataStore[propertyName] = Observable.fromObject(value); invokableObserver.propertyChanged.invoke(propertyName); } }; } else { backingDataStore[propertyName] = propertyValue; returnValue.set = function (value) { if (value !== backingDataStore[propertyName]) { backingDataStore[propertyName] = value; invokableObserver.propertyChanged.invoke(propertyName); } }; } return returnValue; }; ObservableHelpers.expandProperties = function (objectShape, backingDataStore, invokableObserver) { var properties = {}; for (var propertyName in objectShape) { properties[propertyName] = ObservableHelpers.describePropertyForObjectShape(propertyName, objectShape, backingDataStore, invokableObserver); } return properties; }; return ObservableHelpers; })(); Common.ObservableHelpers = ObservableHelpers; })(Common || (Common = {})); // IObservable.ts var Common; (function (Common) { "use strict"; })(Common || (Common = {})); // CollectionChangedAction.ts var Common; (function (Common) { "use strict"; (function (CollectionChangedAction) { CollectionChangedAction[CollectionChangedAction["Add"] = 0] = "Add"; CollectionChangedAction[CollectionChangedAction["Remove"] = 1] = "Remove"; CollectionChangedAction[CollectionChangedAction["Reset"] = 2] = "Reset"; CollectionChangedAction[CollectionChangedAction["Clear"] = 3] = "Clear"; })(Common.CollectionChangedAction || (Common.CollectionChangedAction = {})); var CollectionChangedAction = Common.CollectionChangedAction; ; })(Common || (Common = {})); // Binding.ts var Common; (function (Common) { "use strict"; Common.targetAccessViaProperty = { getValue: function (target, prop) { return target[prop]; }, isValueSupported: function (value, isConverter) { return value !== undefined && (isConverter || value !== null); }, setValue: function (target, prop, value) { target[prop] = value; } }; Common.targetAccessViaAttribute = { getValue: function (target, prop) { return target.getAttribute(prop); }, isValueSupported: function (value, isConverter) { return true; }, setValue: function (target, prop, value) { if (value === null || value === undefined) { target.removeAttribute(prop); } else { target.setAttribute(prop, value); } } }; var Binding = (function () { function Binding(source, sourceExpression, destination, destinationProperty, converter, mode, targetAccess) { var _this = this; F12.Tools.Utility.Assert.hasValue(sourceExpression, "sourceExpression"); F12.Tools.Utility.Assert.hasValue(destination, "destination"); F12.Tools.Utility.Assert.hasValue(destinationProperty, "destinationProperty"); mode = mode || Binding.ONE_WAY_MODE; var expressionParts = sourceExpression.split("."); this._source = null; this._sourceChangedRegistration = null; this._destChangedRegistration = null; this._sourceProperty = expressionParts[0]; this._childBinding = null; this._paused = false; this._twoWay = false; this._converter = converter; this._destination = destination; this._destinationProperty = destinationProperty; this._targetAccess = targetAccess || Common.targetAccessViaProperty; if (expressionParts.length > 1) { expressionParts.splice(0, 1); this._childBinding = new Binding(null, expressionParts.join("."), destination, destinationProperty, converter, mode, this._targetAccess); } else if (mode.toLowerCase() === Binding.TWO_WAY_MODE) { this._twoWay = true; this._destChangedRegistration = this.attachChangeHandler(destination, function (e) { var propertyName = e; if (typeof propertyName !== "string" || propertyName === null || propertyName === _this._destinationProperty) { _this.updateSourceFromDest(); } }); } this.setSource(source); } Binding.prototype.isForDestination = function (destination, destinationProperty) { return destination === this._destination && destinationProperty === this._destinationProperty; }; Binding.prototype.unbind = function () { this._source = null; if (this._sourceChangedRegistration) { this._sourceChangedRegistration.unregister(); this._sourceChangedRegistration = null; } if (this._childBinding) { this._childBinding.unbind(); this._childBinding = null; } if (this._destChangedRegistration) { this._destChangedRegistration.unregister(); this._destChangedRegistration = null; } }; Binding.prototype.updateSourceFromDest = function () { if (this._source && this._twoWay) { this._paused = true; var destValue = this._targetAccess.getValue(this._destination, this._destinationProperty); if (this._converter) { destValue = this._converter.convertFrom(destValue); } this._source[this._sourceProperty] = destValue; this._paused = false; } }; Binding.prototype.updateDestination = function () { if (this._paused) { return; } this._paused = true; var value = this.getValue(); if (this._childBinding) { this._childBinding.setSource(value); } else { var hasConverter = !!this._source && !!this._converter; if (hasConverter) { value = this._converter.convertTo(value); } if (this._targetAccess.isValueSupported(value, !!hasConverter)) { this._targetAccess.setValue(this._destination, this._destinationProperty, value); } } this._paused = false; }; Binding.prototype.setSource = function (source) { var _this = this; if (this._sourceChangedRegistration) { this._sourceChangedRegistration.unregister(); this._sourceChangedRegistration = null; } this._source = source; if (this._source) { this._sourceChangedRegistration = this.attachChangeHandler(this._source, function (propertyName) { if (typeof propertyName !== "string" || propertyName === null || propertyName === _this._sourceProperty) { _this.updateDestination(); } }); } this.updateDestination(); this.updateSourceFromDest(); }; Binding.prototype.attachChangeHandler = function (obj, handler) { if (obj.propertyChanged) { return obj.propertyChanged.addHandler(handler); } else { var element = obj; if ((element.tagName === "INPUT" || element.tagName === "SELECT") && element.addEventListener && element.removeEventListener) { element.addEventListener("change", handler); return { unregister: function () { return element.removeEventListener("change", handler); } }; } } }; Binding.prototype.getValue = function () { return this._source && this._source[this._sourceProperty]; }; Binding.ONE_WAY_MODE = "oneway"; Binding.TWO_WAY_MODE = "twoway"; return Binding; })(); Common.Binding = Binding; })(Common || (Common = {})); // CommonConverters.ts var Common; (function (Common) { "use strict"; var CommonConverters = (function () { function CommonConverters() { } CommonConverters.initialize = function () { CommonConverters.AriaConverterElement = document.createElement("span"); CommonConverters.HtmlTooltipFromResourceConverter = CommonConverters.getHtmlTooltipFromResourceConverter(); CommonConverters.IntToStringConverter = CommonConverters.getIntToStringConverter(); CommonConverters.InvertBool = CommonConverters.invertBoolConverter(); CommonConverters.JsonHtmlTooltipToInnerTextConverter = CommonConverters.getJsonHtmlTooltipToInnerTextConverter(); CommonConverters.NullPermittedConverter = CommonConverters.getNullPermittedConverter(); CommonConverters.ResourceConverter = CommonConverters.getResourceConverter(); CommonConverters.StringToBooleanConverter = CommonConverters.getStringToBooleanConverter(); CommonConverters.StringToIntConverter = CommonConverters.getStringToIntConverter(); CommonConverters.ThemedImageConverter = CommonConverters.getThemedImageConverter(); }; CommonConverters.getResourceConverter = function () { return { convertTo: function (from) { return Plugin.Resources.getString(from); }, convertFrom: null }; }; CommonConverters.getThemedImageConverter = function () { return { convertTo: function (from) { return Plugin.Theme.getValue(from); }, convertFrom: null }; }; CommonConverters.getStringToBooleanConverter = function () { return { convertTo: function (from) { return from === "true" ? true : false; }, convertFrom: function (from) { return from ? "true" : "false"; } }; }; CommonConverters.getStringToIntConverter = function () { return { convertTo: function (from) { return from >> 0; }, convertFrom: function (from) { return from.toString(); } }; }; CommonConverters.getIntToStringConverter = function () { return { convertTo: function (from) { return from.toString(); }, convertFrom: function (from) { return from >> 0; } }; }; CommonConverters.invertBoolConverter = function () { return { convertTo: function (from) { return !from; }, convertFrom: function (to) { return !to; } }; }; CommonConverters.getHtmlTooltipFromResourceConverter = function () { return { convertTo: function (from) { return JSON.stringify({ content: Plugin.Resources.getString(from), contentContainsHTML: true }); }, convertFrom: null }; }; CommonConverters.getJsonHtmlTooltipToInnerTextConverter = function () { return { convertTo: function (from) { if (from.match(CommonConverters.JSONRegex)) { try { var options = JSON.parse(from); if (options.contentContainsHTML) { CommonConverters.AriaConverterElement.innerHTML = options.content; var text = CommonConverters.AriaConverterElement.innerText; CommonConverters.AriaConverterElement.innerHTML = ""; return text; } else { return options.content; } } catch (ex) { } } return from; }, convertFrom: null }; }; CommonConverters.getNullPermittedConverter = function () { return { convertTo: function (from) { return from; }, convertFrom: function (to) { return to; } }; }; CommonConverters.JSONRegex = /^\{.*\}$/; return CommonConverters; })(); Common.CommonConverters = CommonConverters; CommonConverters.initialize(); })(Common || (Common = {})); // IConverter.ts var Common; (function (Common) { "use strict"; })(Common || (Common = {})); // ITemplateRepository.ts var Common; (function (Common) { "use strict"; })(Common || (Common = {})); // ScriptTemplateRepository.ts var ControlTemplates; (function (ControlTemplates) { var PlaceHolder = (function () { function PlaceHolder() { } return PlaceHolder; })(); })(ControlTemplates || (ControlTemplates = {})); var Common; (function (Common) { "use strict"; var ScriptTemplateRepository = (function () { function ScriptTemplateRepository(container) { F12.Tools.Utility.Assert.hasValue(container, "Invalid template container."); this._container = container; this._registeredTemplates = {}; } ScriptTemplateRepository.prototype.getTemplateString = function (templateId) { F12.Tools.Utility.Assert.isTrue(!!templateId, "Invalid template ID."); var template; template = this._registeredTemplates[templateId]; if (!template) { var container = this._container; var templateParts = templateId.split("."); for (var i = 0; i < templateParts.length; i++) { var part = templateParts[i]; container = container[part]; F12.Tools.Utility.Assert.isTrue(!!container, "Couldn't find the template with the given ID '" + templateId + "'."); } template = container; } F12.Tools.Utility.Assert.areEqual(typeof template, "string", "The given template name doesn't point to a template."); return template; }; ScriptTemplateRepository.prototype.registerTemplateString = function (templateId, html) { F12.Tools.Utility.Assert.isTrue(!!templateId, "Invalid template ID."); F12.Tools.Utility.Assert.isUndefined(this._registeredTemplates[templateId], "Template with id '" + templateId + "' already registered."); this._registeredTemplates[templateId] = html; }; return ScriptTemplateRepository; })(); Common.ScriptTemplateRepository = ScriptTemplateRepository; Common.templateRepository = new ScriptTemplateRepository(ControlTemplates); })(Common || (Common = {})); // TemplateDataAttributes.ts var Common; (function (Common) { "use strict"; var TemplateDataAttributes = (function () { function TemplateDataAttributes() { } TemplateDataAttributes.BINDING = "data-binding"; TemplateDataAttributes.CONTROL = "data-control"; TemplateDataAttributes.NAME = "data-name"; TemplateDataAttributes.CONTROL_TEMPLATE_ID = TemplateDataAttributes.CONTROL + "-templateId"; TemplateDataAttributes.CONTROL_BINDING = "data-controlbinding"; TemplateDataAttributes.OPTIONS = "data-options"; TemplateDataAttributes.TEMPLATE_ID_OPTION = TemplateDataAttributes.OPTIONS + "-templateId"; return TemplateDataAttributes; })(); Common.TemplateDataAttributes = TemplateDataAttributes; })(Common || (Common = {})); // TemplateLoader.ts var Common; (function (Common) { "use strict"; var TemplateLoader = (function () { function TemplateLoader(repository) { F12.Tools.Utility.Assert.hasValue(repository, "Invalid template repository."); this._parsingNode = document.createElement("div"); this._repository = repository; this._templateCache = {}; this._visitedControls = {}; this._visitedTemplates = {}; } Object.defineProperty(TemplateLoader.prototype, "repository", { get: function () { return this._repository; }, enumerable: true, configurable: true }); TemplateLoader.getControlType = function (controlName) { F12.Tools.Utility.Assert.isTrue(!!controlName, "Invalid control name."); var controlType = window; var nameParts = controlName.split("."); for (var i = 0; i < nameParts.length; i++) { var part = nameParts[i]; controlType = controlType[part]; F12.Tools.Utility.Assert.hasValue(controlType, "Couldn't find the control with the given name '" + controlName + "'."); } F12.Tools.Utility.Assert.areEqual(typeof controlType, "function", "The given control '" + controlName + "' doesn't represent a control type which implements IControl."); return controlType; }; TemplateLoader.prototype.loadTemplate = function (templateId) { var cachedElement = this._templateCache[templateId]; if (!cachedElement) { var template = this._repository.getTemplateString(templateId); F12.Tools.Utility.Assert.isFalse(this._visitedTemplates[templateId], "Detected a recursive template. TemplateId '" + templateId + "' is part of the parents hierarchy."); this._visitedTemplates[templateId] = true; try { cachedElement = this.loadTemplateUsingHtml(template); } finally { this._visitedTemplates[templateId] = false; } this._templateCache[templateId] = cachedElement; } var rootElement = cachedElement.cloneNode(true); rootElement = this.resolvePlaceholders(rootElement); return rootElement; }; TemplateLoader.prototype.loadTemplateUsingHtml = function (templateHtml) { this._parsingNode.innerHTML = templateHtml; F12.Tools.Utility.Assert.areEqual(this._parsingNode.childElementCount, 1, "Template should have only one root element."); var rootElement = this._parsingNode.children[0]; this._parsingNode.removeChild(rootElement); return rootElement; }; TemplateLoader.prototype.getControlInstance = function (controlName, templateId) { F12.Tools.Utility.Assert.isTrue(!!controlName, "Invalid control name."); var controlType = TemplateLoader.getControlType(controlName); var control; if (Common.TemplateControl.prototype.isPrototypeOf(controlType.prototype) || Common.TemplateControl.prototype === controlType.prototype) { control = new controlType(templateId); } else { control = new controlType(); } F12.Tools.Utility.Assert.hasValue(control.rootElement, "The given control '" + controlName + "' doesn't represent a control type which implements IControl."); if (control.rootElement.control !== control) { control.rootElement.control = control; } return control; }; TemplateLoader.prototype.resolvePlaceholders = function (root) { if (root.hasAttribute(Common.TemplateDataAttributes.CONTROL)) { root = this.resolvePlaceholder(root); } else { var placeholders = root.querySelectorAll("div[" + Common.TemplateDataAttributes.CONTROL + "]"); var placeholdersCount = placeholders.length; for (var i = 0; i < placeholdersCount; i++) { var node = placeholders[i]; this.resolvePlaceholder(node); } } return root; }; TemplateLoader.prototype.resolvePlaceholder = function (node) { F12.Tools.Utility.Assert.isFalse(node.hasChildNodes(), "Control placeholders cannot have children."); var controlName = node.getAttribute(Common.TemplateDataAttributes.CONTROL); var templateId = node.getAttribute(Common.TemplateDataAttributes.CONTROL_TEMPLATE_ID); var controlVisistedKey = controlName + (templateId ? "," + templateId : ""); F12.Tools.Utility.Assert.isFalse(this._visitedControls[controlVisistedKey], "Detected a recursive control. Control '" + controlVisistedKey + "' is part of the parents hierarchy."); this._visitedControls[controlVisistedKey] = true; try { var controlInstance = this.getControlInstance(controlName, templateId); } finally { this._visitedControls[controlVisistedKey] = false; } var controlNode = controlInstance.rootElement; for (var i = 0; i < node.attributes.length; i++) { var sourceAttribute = node.attributes[i]; controlNode.setAttribute(sourceAttribute.name, sourceAttribute.value); } if (node.parentElement) { node.parentElement.replaceChild(controlNode, node); } return controlNode; }; return TemplateLoader; })(); Common.TemplateLoader = TemplateLoader; Common.templateLoader = new TemplateLoader(Common.templateRepository); })(Common || (Common = {})); // TemplateControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { "use strict"; var TemplateControl = (function (_super) { __extends(TemplateControl, _super); function TemplateControl(templateId) { _super.call(this); this.onInitializeOverride(); this._templateId = templateId; this.setRootElementFromTemplate(); } Object.defineProperty(TemplateControl.prototype, "model", { get: function () { return this._model; }, set: function (value) { if (this._model !== value) { this._model = value; this.propertyChanged.invoke(TemplateControl.ModelPropertyName); this.onModelChanged(); } }, enumerable: true, configurable: true }); Object.defineProperty(TemplateControl.prototype, "tabIndex", { get: function () { if (this._tabIndex) { return this._tabIndex; } return 0; }, set: function (value) { if (this._tabIndex !== value) { var oldValue = this._tabIndex; this._tabIndex = value >> 0; this.propertyChanged.invoke(TemplateControl.TabIndexPropertyName); this.onTabIndexChanged(oldValue, this._tabIndex); } }, enumerable: true, configurable: true }); Object.defineProperty(TemplateControl.prototype, "templateId", { get: function () { return this._templateId; }, set: function (value) { if (this._templateId !== value) { this._templateId = value; this._binding.unbind(); this.setRootElementFromTemplate(); this.propertyChanged.invoke(TemplateControl.TemplateIdPropertyName); } }, enumerable: true, configurable: true }); TemplateControl.initialize = function () { Common.ObservableHelpers.defineProperty(TemplateControl, TemplateControl.ClassNamePropertyName, null, function (obj, oldValue, newValue) { return obj.onClassNameChanged(oldValue, newValue); }); Common.ObservableHelpers.defineProperty(TemplateControl, TemplateControl.IsEnabledPropertyName, true, function (obj) { return obj.onIsEnabledChanged(); }); Common.ObservableHelpers.defineProperty(TemplateControl, TemplateControl.IsVisiblePropertyName, true, function (obj) { return obj.onIsVisibleChanged(); }); Common.ObservableHelpers.defineProperty(TemplateControl, TemplateControl.TooltipPropertyName, null, function (obj) { return obj.onTooltipChanged(); }); }; TemplateControl.prototype.getBinding = function (destination, destinationProperty) { var binding; if (this._binding) { binding = this._binding.findBinding(destination, destinationProperty); } return binding; }; TemplateControl.prototype.onApplyTemplate = function () { this.onClassNameChanged(null, this.className); this.onIsVisibleChanged(); this.onTabIndexChanged(null, this._tabIndex); this.onTooltipChanged(); }; TemplateControl.prototype.onInitializeOverride = function () { }; TemplateControl.prototype.onModelChanged = function () { }; TemplateControl.prototype.onTemplateChanging = function () { }; TemplateControl.prototype.getNamedControl = function (name) { var element = this.getNamedElement(name); if (!element) { return null; } return element.control; }; TemplateControl.prototype.getNamedElement = function (name) { var elements = []; elements.push(this.rootElement); while (elements.length > 0) { var element = elements.pop(); if (element.getAttribute(Common.TemplateDataAttributes.NAME) === name) { return element; } if (element.children && (!element.hasAttribute(Common.TemplateDataAttributes.CONTROL) || element === this.rootElement)) { var childrenCount = element.children.length; for (var i = 0; i < childrenCount; i++) { elements.push(element.children[i]); } } } return null; }; TemplateControl.prototype.onIsEnabledChangedOverride = function () { }; TemplateControl.prototype.onIsVisibleChangedOverride = function () { }; TemplateControl.prototype.onTabIndexChangedOverride = function () { }; TemplateControl.prototype.onTooltipChangedOverride = function () { }; TemplateControl.prototype.onClassNameChanged = function (oldValue, newValue) { if (this.rootElement) { if (oldValue) { var oldClasses = oldValue.split(" "); for (var i = 0; i < oldClasses.length; i++) { this.rootElement.classList.remove(oldClasses[i]); } } if (newValue) { var newClasses = newValue.split(" "); for (var i = 0; i < newClasses.length; i++) { this.rootElement.classList.add(newClasses[i]); } } } }; TemplateControl.prototype.onIsEnabledChanged = function () { if (this.rootElement) { if (this.isEnabled) { this.rootElement.classList.remove(TemplateControl.CLASS_DISABLED); this.rootElement.removeAttribute("aria-disabled"); this.onTabIndexChanged(this._tabIndex, this._tabIndex); } else { this.rootElement.classList.add(TemplateControl.CLASS_DISABLED); this.rootElement.setAttribute("aria-disabled", true); this.rootElement.tabIndex = -1; } this.onIsEnabledChangedOverride(); } }; TemplateControl.prototype.onIsVisibleChanged = function () { if (this.rootElement) { if (this.isVisible) { this.rootElement.classList.remove(TemplateControl.CLASS_HIDDEN); this.rootElement.removeAttribute("aria-hidden"); this.onTabIndexChanged(this._tabIndex, this._tabIndex); } else { this.rootElement.classList.add(TemplateControl.CLASS_HIDDEN); this.rootElement.setAttribute("aria-hidden", "true"); this.rootElement.tabIndex = -1; } this.onIsVisibleChangedOverride(); } }; TemplateControl.prototype.onTabIndexChanged = function (oldValue, newValue) { if (this.rootElement) { if (this.isEnabled && this.isVisible) { if (oldValue || newValue || newValue === 0) { this.rootElement.tabIndex = newValue; } } if (oldValue !== newValue) { this.onTabIndexChangedOverride(); } } }; TemplateControl.prototype.onTooltipChanged = function () { if (this.rootElement) { this.onTooltipChangedOverride(); } }; TemplateControl.prototype.setRootElementFromTemplate = function () { var previousRoot; this.onTemplateChanging(); if (this.rootElement) { previousRoot = this.rootElement; this.rootElement.control = null; } if (this._templateId) { this.rootElement = Common.templateLoader.loadTemplate(this._templateId); } else { this.rootElement = document.createElement("div"); } if (previousRoot) { var attr = previousRoot.attributes.getNamedItem(Common.TemplateDataAttributes.NAME); if (attr) { this.rootElement.setAttribute(attr.name, attr.value); } } this.rootElement.control = this; this._binding = new Common.TemplateDataBinding(this); if (previousRoot && previousRoot.parentElement) { previousRoot.parentElement.replaceChild(this.rootElement, previousRoot); } this.onApplyTemplate(); }; TemplateControl.CLASS_DISABLED = "disabled"; TemplateControl.CLASS_HIDDEN = "BPT-hidden"; TemplateControl.ClassNamePropertyName = "className"; TemplateControl.IsEnabledPropertyName = "isEnabled"; TemplateControl.IsVisiblePropertyName = "isVisible"; TemplateControl.ModelPropertyName = "model"; TemplateControl.TabIndexPropertyName = "tabIndex"; TemplateControl.TemplateIdPropertyName = "templateId"; TemplateControl.TooltipPropertyName = "tooltip"; return TemplateControl; })(Common.Observable); Common.TemplateControl = TemplateControl; TemplateControl.initialize(); })(Common || (Common = {})); // TemplateDataBinding.ts var Common; (function (Common) { "use strict"; var TemplateDataBinding = (function () { function TemplateDataBinding(control) { this._bindings = TemplateDataBinding.bind(control); } TemplateDataBinding.prototype.findBinding = function (destination, destinationProperty) { var binding; if (this._bindings) { for (var i = 0; i < this._bindings.length; i++) { var currBinding = this._bindings[i]; if (currBinding.isForDestination(destination, destinationProperty)) { binding = currBinding; break; } } } return binding; }; TemplateDataBinding.prototype.unbind = function () { if (this._bindings) { for (var i = 0; i < this._bindings.length; i++) { this._bindings[i].unbind(); } } this._bindings = null; }; TemplateDataBinding.buildBindingCommand = function (target, element, targetName, bindingSource, value) { var targetAccess = Common.targetAccessViaProperty; if (target === element) { if (targetName.substr(0, TemplateDataBinding.STYLE_PREFIX.length) === TemplateDataBinding.STYLE_PREFIX) { target = element.style; targetName = targetName.substr(TemplateDataBinding.STYLE_PREFIX.length); } else if (targetName.substr(0, TemplateDataBinding.ATTRIBUTE_PREFIX.length) === TemplateDataBinding.ATTRIBUTE_PREFIX) { targetName = targetName.substr(TemplateDataBinding.ATTRIBUTE_PREFIX.length); targetAccess = Common.targetAccessViaAttribute; } else if (targetName.substr(0, TemplateDataBinding.CONTROL_PREFIX.length) === TemplateDataBinding.CONTROL_PREFIX) { var elementControlLink = element; target = elementControlLink.control; targetName = targetName.substr(TemplateDataBinding.CONTROL_PREFIX.length); } } var bindingCommand = { target: target, targetAccess: targetAccess, targetName: targetName, source: bindingSource, value: value }; return bindingCommand; }; TemplateDataBinding.extractBindingCommandsForBinding = function (commands, target, element, allBindings, isControlBinding) { var bindings = allBindings.split(","); var bindingsCount = bindings.length; for (var i = 0; i < bindingsCount; i++) { var binding = bindings[i]; var keyValue = binding.split(":", 2); F12.Tools.Utility.Assert.areEqual(keyValue.length, 2, "Invalid binding syntax, the keyvalue pair should have the syntax target:source '" + binding + "'."); var targetName = keyValue[0].trim(); var sourceSyntax = keyValue[1].trim(); var bindingSource = TemplateDataBinding.parseSourceSyntax(sourceSyntax); if (!isControlBinding) { bindingSource.name = TemplateDataBinding.MODEL_PREFIX + bindingSource.name; } var bindingCommand = TemplateDataBinding.buildBindingCommand(target, element, targetName, bindingSource, null); F12.Tools.Utility.Assert.isTrue(!!bindingCommand.targetName, "Invalid binding syntax. Target name is missing '" + binding + "'."); commands.push(bindingCommand); } }; TemplateDataBinding.extractBindingCommandsForOptions = function (commands, target, element, allOptions) { var options = allOptions.split(","); var optionsCount = options.length; for (var i = 0; i < optionsCount; i++) { var option = options[i]; var keyValue = option.split(":", 2); F12.Tools.Utility.Assert.areEqual(keyValue.length, 2, "Invalid options syntax, the keyvalue pair should have the syntax target:source '" + option + "'."); var targetName = keyValue[0].trim(); var valueSyntax = keyValue[1].trim(); var valueSource = TemplateDataBinding.parseSourceSyntax(valueSyntax); var value = valueSource.name; if (valueSource.converter && valueSource.converter.convertTo) { value = valueSource.converter.convertTo(value); } var bindingCommand = TemplateDataBinding.buildBindingCommand(target, element, targetName, null, value); F12.Tools.Utility.Assert.isTrue(!!bindingCommand.targetName, "Invalid option syntax. Target name is missing '" + option + "'."); commands.push(bindingCommand); } }; TemplateDataBinding.getBindingCommands = function (control) { var bindingCommands; var elements = []; elements.push(control.rootElement); while (elements.length > 0) { var element = elements.pop(); var childControl = element.control; var target = element; if (childControl && childControl !== control) { target = childControl; } if (target) { var attr; attr = element.getAttributeNode(Common.TemplateDataAttributes.BINDING); if (attr) { bindingCommands = bindingCommands || []; TemplateDataBinding.extractBindingCommandsForBinding(bindingCommands, target, element, attr.value, false); element.removeAttributeNode(attr); } attr = element.getAttributeNode(Common.TemplateDataAttributes.CONTROL_BINDING); if (attr) { bindingCommands = bindingCommands || []; TemplateDataBinding.extractBindingCommandsForBinding(bindingCommands, target, element, attr.value, true); element.removeAttributeNode(attr); } attr = element.getAttributeNode(Common.TemplateDataAttributes.OPTIONS); if (attr) { bindingCommands = bindingCommands || []; var optionsTarget = childControl || element; TemplateDataBinding.extractBindingCommandsForOptions(bindingCommands, optionsTarget, element, attr.value); element.removeAttributeNode(attr); } } if (element.children && (!element.hasAttribute(Common.TemplateDataAttributes.CONTROL) || element === control.rootElement)) { var childrenCount = element.children.length; for (var i = 0; i < childrenCount; i++) { elements.push(element.children[i]); } } } return bindingCommands; }; TemplateDataBinding.bind = function (control) { var bindings; var bindingCommands = TemplateDataBinding.getBindingCommands(control); if (bindingCommands) { bindings = []; var bindingCommandsCount = bindingCommands.length; for (var i = 0; i < bindingCommandsCount; i++) { var bindingCommand = bindingCommands[i]; if (bindingCommand.source) { var binding = new Common.Binding(control, bindingCommand.source.name, bindingCommand.target, bindingCommand.targetName, bindingCommand.source.converter, bindingCommand.source.mode, bindingCommand.targetAccess); bindings.push(binding); } else if (bindingCommand.value !== undefined) { bindingCommand.targetAccess.setValue(bindingCommand.target, bindingCommand.targetName, bindingCommand.value); } } } return bindings && bindings.length > 0 ? bindings : null; }; TemplateDataBinding.getConverterInstance = function (identifier) { var obj = window; var parts = identifier.split("."); for (var i = 0; i < parts.length; i++) { var part = parts[i]; obj = obj[part]; F12.Tools.Utility.Assert.hasValue(obj, "Couldn't find the converter instance with the given name '" + identifier + "'."); } F12.Tools.Utility.Assert.hasValue(obj.convertFrom || obj.convertTo, "The converter instance with the given name '" + identifier + "' doesn't point to a valid converter instance."); return obj; }; TemplateDataBinding.parseSourceSyntax = function (syntax) { F12.Tools.Utility.Assert.isTrue(!!syntax, "Invalid binding syntax."); var parts = syntax.split(";"); var bindingSource = { name: parts[0].trim() }; for (var i = 1; i < parts.length; i++) { var keyValue = parts[i].split("=", 2); F12.Tools.Utility.Assert.areEqual(keyValue.length, 2, "Invalid binding syntax, the keyvalue pair should have the syntax key=value."); switch (keyValue[0].trim().toLowerCase()) { case "mode": bindingSource.mode = keyValue[1].trim().toLowerCase(); break; case "converter": bindingSource.converter = TemplateDataBinding.getConverterInstance(keyValue[1].trim()); break; } } return bindingSource; }; TemplateDataBinding.ATTRIBUTE_PREFIX = "attr-"; TemplateDataBinding.MODEL_PREFIX = "model."; TemplateDataBinding.STYLE_PREFIX = "style."; TemplateDataBinding.CONTROL_PREFIX = "control."; return TemplateDataBinding; })(); Common.TemplateDataBinding = TemplateDataBinding; })(Common || (Common = {})); // ControlUtilities.ts var Common; (function (Common) { (function (Controls) { "use strict"; (function (NavigationDirection) { NavigationDirection[NavigationDirection["Next"] = 0] = "Next"; NavigationDirection[NavigationDirection["Previous"] = 1] = "Previous"; })(Controls.NavigationDirection || (Controls.NavigationDirection = {})); var NavigationDirection = Controls.NavigationDirection; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ContentControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var ContentControl = (function (_super) { __extends(ContentControl, _super); function ContentControl(templateId) { _super.call(this, templateId); } ContentControl.initialize = function () { Common.ObservableHelpers.defineProperty(ContentControl, "content", null); }; return ContentControl; })(Common.TemplateControl); Controls.ContentControl = ContentControl; ContentControl.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // PopupControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; (function (TabPressKind) { TabPressKind[TabPressKind["None"] = 0] = "None"; TabPressKind[TabPressKind["Tab"] = 1] = "Tab"; TabPressKind[TabPressKind["ShiftTab"] = 2] = "ShiftTab"; })(Controls.TabPressKind || (Controls.TabPressKind = {})); var TabPressKind = Controls.TabPressKind; var PopupControl = (function (_super) { __extends(PopupControl, _super); function PopupControl(templateId) { var _this = this; this._blurHandler = function (e) { return _this.onBlur(e); }; this._focusOutHandler = function (e) { return _this.onFocusOut(e); }; this._keyHandler = function (e) { return _this.onKeyEvent(e); }; this._mouseHandler = function (e) { return _this.onDocumentMouseHandler(e); }; this._targetButtonClickHandler = function () { return _this.onTargetButtonClick(); }; this._targetButtonKeyHandler = function (e) { return _this.onTargetButtonKeyUp(e); }; this._windowResizeHandler = function (e) { return _this.onWindowResize(e); }; _super.call(this, templateId); } PopupControl.initialize = function () { Common.ObservableHelpers.defineProperty(PopupControl, "targetButtonElement", null, function (obj, oldValue, newValue) { return obj.onTargetButtonElementChanged(oldValue, newValue); }); }; PopupControl.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); if (this.rootElement) { this.rootElement.classList.add(PopupControl.CLASS_POPUP); } this.onTargetButtonElementChanged(null, this.targetButtonElement); }; PopupControl.prototype.onInitializeOverride = function () { _super.prototype.onInitializeOverride.call(this); this.isVisible = false; }; PopupControl.prototype.onTemplateChanging = function () { if (this.rootElement) { this.rootElement.classList.remove(PopupControl.CLASS_POPUP); } }; PopupControl.prototype.onIsVisibleChangedOverride = function () { var _this = this; _super.prototype.onIsVisibleChangedOverride.call(this); if (this.isVisible) { window.setImmediate(function () { _this.rootElement.focus(); }); this._tabLastPressed = 0 /* None */; if (this.targetButtonElement && !this.disablePopupActiveIndicator) { this.targetButtonElement.classList.add(PopupControl.CLASS_POPUP_ACTIVE_ONTARGET); } this.setPopupPosition(); window.addEventListener("resize", this._windowResizeHandler); document.addEventListener("focusout", this._focusOutHandler, true); document.addEventListener("mousedown", this._mouseHandler, true); document.addEventListener("mouseup", this._mouseHandler, true); document.addEventListener("mousewheel", this._mouseHandler, true); document.addEventListener("click", this._mouseHandler, true); this.rootElement.addEventListener("blur", this._blurHandler, true); this.rootElement.addEventListener("keydown", this._keyHandler); this.rootElement.addEventListener("keyup", this._keyHandler); } else { if (this.targetButtonElement) { this.targetButtonElement.classList.remove(PopupControl.CLASS_POPUP_ACTIVE_ONTARGET); if (!this._skipTargetButtonFocus) { window.setImmediate(function () { if (_this.targetButtonElement) { _this.targetButtonElement.focus(); } }); } } window.removeEventListener("resize", this._windowResizeHandler); document.removeEventListener("focusout", this._focusOutHandler, true); document.removeEventListener("mousedown", this._mouseHandler, true); document.removeEventListener("mouseup", this._mouseHandler, true); document.removeEventListener("mousewheel", this._mouseHandler, true); document.removeEventListener("click", this._mouseHandler, true); this.rootElement.removeEventListener("blur", this._blurHandler, true); this.rootElement.removeEventListener("keydown", this._keyHandler); this.rootElement.removeEventListener("keyup", this._keyHandler); } }; PopupControl.prototype.onKeyDownOverride = function (e) { return false; }; PopupControl.prototype.onKeyUpOverride = function (e) { return false; }; PopupControl.prototype.show = function (x, y) { this.isVisible = true; if (x !== undefined && y !== undefined) { this.rootElement.style.left = (x - this.rootElement.offsetWidth) + "px"; this.rootElement.style.top = y + "px"; } }; PopupControl.prototype.updatePopupPosition = function () { this.setPopupPosition(); }; PopupControl.totalOffsetLeft = function (elem) { var offsetLeft = 0; do { if (!isNaN(elem.offsetLeft)) { offsetLeft += elem.offsetLeft; } } while(elem = elem.offsetParent); return offsetLeft; }; PopupControl.totalOffsetTop = function (elem) { var offsetTop = 0; do { if (!isNaN(elem.offsetTop)) { offsetTop += elem.offsetTop; } } while(elem = elem.offsetParent); return offsetTop; }; PopupControl.prototype.setPopupPosition = function () { this.rootElement.style.left = "0px"; this.rootElement.style.top = "0px"; if (!this.targetButtonElement) { return; } var viewportTop = this.viewportMargin ? (this.viewportMargin.top || 0) : 0; var viewportBottom = window.innerHeight - (this.viewportMargin ? (this.viewportMargin.bottom || 0) : 0); var viewportLeft = this.viewportMargin ? (this.viewportMargin.left || 0) : 0; var viewportRight = window.innerWidth - (this.viewportMargin ? (this.viewportMargin.right || 0) : 0); var targetRect = this.targetButtonElement.getBoundingClientRect(); var targetViewportLeft = Math.round(targetRect.left); var targetViewportTop = Math.round(targetRect.top); var scrollTopTotal = 0; var scrollLeftTotal = 0; var elem = this.rootElement.offsetParent; while (elem) { scrollLeftTotal += elem.scrollLeft; scrollTopTotal += elem.scrollTop; elem = elem.offsetParent; } var zeroOffsetLeft = PopupControl.totalOffsetLeft(this.rootElement); var zeroOffsetTop = PopupControl.totalOffsetTop(this.rootElement); var left = targetViewportLeft; var right = left + this.rootElement.offsetWidth; if (right > viewportRight) { var newRight = targetViewportLeft + this.targetButtonElement.offsetWidth; var newLeft = newRight - this.rootElement.offsetWidth; if (newLeft >= viewportLeft) { left = newLeft; right = newRight; } } this.rootElement.style.left = scrollLeftTotal + left - zeroOffsetLeft + "px"; var top = targetViewportTop + this.targetButtonElement.offsetHeight; var bottom = top + this.rootElement.offsetHeight; if (bottom > viewportBottom) { var newBottom = targetViewportTop; var newTop = newBottom - this.rootElement.offsetHeight; if (newTop >= viewportTop) { top = newTop; bottom = newBottom; } } if (parseInt(window.getComputedStyle(this.rootElement).borderTopWidth) > 0 && parseInt(window.getComputedStyle(this.targetButtonElement).borderBottomWidth) > 0) { top--; } this.rootElement.style.top = scrollTopTotal + top - zeroOffsetTop + "px"; }; PopupControl.prototype.onBlur = function (e) { if (!this.keepVisibleOnBlur && !document.hasFocus() && !this._tabLastPressed) { this.isVisible = false; } }; PopupControl.prototype.onTargetButtonElementChanged = function (oldValue, newValue) { if (oldValue) { oldValue.removeAttribute("aria-haspopup"); oldValue.removeAttribute("aria-owns"); if (this._targetButtonClickEvtReg) { this._targetButtonClickEvtReg.unregister(); this._targetButtonClickEvtReg = null; } oldValue.removeEventListener("click", this._targetButtonClickHandler); oldValue.removeEventListener("keyup", this._targetButtonKeyHandler); } if (newValue) { newValue.setAttribute("aria-haspopup", "true"); newValue.setAttribute("aria-owns", this.rootElement.id); var targetControl = newValue.control; if (targetControl && targetControl instanceof Controls.Button) { var targetButton = targetControl; this._targetButtonClickEvtReg = targetButton.click.addHandler(this._targetButtonClickHandler); } else { newValue.addEventListener("click", this._targetButtonClickHandler); newValue.addEventListener("keyup", this._targetButtonKeyHandler); } } }; PopupControl.prototype.onTargetButtonClick = function () { this.show(); }; PopupControl.prototype.onTargetButtonKeyUp = function (e) { if (e.keyCode === 32 /* Space */ || e.keyCode === 13 /* Enter */) { this.show(); e.preventDefault(); e.stopImmediatePropagation(); } }; PopupControl.prototype.onWindowResize = function (e) { this.isVisible = false; }; PopupControl.prototype.onFocusOut = function (e) { if (e.relatedTarget && e.relatedTarget !== this.rootElement && !this.rootElement.contains(e.relatedTarget)) { if (this._tabLastPressed !== 0 /* None */) { var tabbableChildren = this.rootElement.querySelectorAll("[tabindex]"); var tabbableElement = this.rootElement; if (this._tabLastPressed === 1 /* Tab */) { for (var i = 0; i < tabbableChildren.length; i++) { var element = tabbableChildren.item(i); if (element.tabIndex >= 0 && element.offsetParent) { tabbableElement = element; break; } } } else { for (var i = tabbableChildren.length - 1; i >= 0; i--) { var element = tabbableChildren.item(i); if (element.tabIndex >= 0 && element.offsetParent) { tabbableElement = element; break; } } } window.setImmediate(function () { tabbableElement.focus(); }); } else { this.isVisible = false; window.setImmediate(function () { if (e.target) { e.target.focus(); } }); } } return false; }; PopupControl.prototype.onDocumentMouseHandler = function (e) { var withinPopup = this.rootElement.contains(e.target); if (!withinPopup) { var withinTargetButton = this.targetButtonElement && this.targetButtonElement.contains(e.target); if (!withinTargetButton) { var elementUnderPoint = document.elementFromPoint(e.x, e.y); withinPopup = this.rootElement.contains(elementUnderPoint); if (!withinPopup) { this._skipTargetButtonFocus = true; try { this.isVisible = false; } finally { this._skipTargetButtonFocus = false; } } } else { if (e.type === "click" && this.dismissOnTargetButtonClick) { this.isVisible = false; } e.stopImmediatePropagation(); e.preventDefault(); } } }; PopupControl.prototype.onKeyEvent = function (e) { e.stopImmediatePropagation(); Common.preventIEKeys(e); this._tabLastPressed = e.keyCode === 9 /* Tab */ ? (e.shiftKey ? 2 /* ShiftTab */ : 1 /* Tab */) : 0 /* None */; if (e.type === "keyup") { var handled = this.onKeyUpOverride(e); if (!handled) { switch (e.keyCode) { case 27 /* Escape */: this.isVisible = false; break; } } } else if (e.type === "keydown") { this.onKeyDownOverride(e); } return false; }; PopupControl.CLASS_POPUP = "BPT-popup"; PopupControl.CLASS_POPUP_ACTIVE_ONTARGET = "BPT-popupActive"; return PopupControl; })(Common.TemplateControl); Controls.PopupControl = PopupControl; PopupControl.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // Button.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var Button = (function (_super) { __extends(Button, _super); function Button(templateId) { var _this = this; this._mouseHandler = function (e) { return _this.onMouseEvent(e); }; this._keyHandler = function (e) { return _this.onKeyboardEvent(e); }; this.click = new Common.EventSource(); _super.call(this, templateId || "Common.defaultButtonTemplate"); } Button.initialize = function () { Common.ObservableHelpers.defineProperty(Button, Button.IsPressedPropertyName, false, function (obj, oldValue, newValue) { return obj.onIsPressedChanged(oldValue, newValue); }); }; Button.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); if (this.rootElement) { if (!this.rootElement.hasAttribute("role")) { this.rootElement.setAttribute("role", "button"); } this.rootElement.addEventListener("click", this._mouseHandler); this.rootElement.addEventListener("mousedown", this._mouseHandler); this.rootElement.addEventListener("mouseup", this._mouseHandler); this.rootElement.addEventListener("mouseleave", this._mouseHandler); this.rootElement.addEventListener("keydown", this._keyHandler); this.rootElement.addEventListener("keyup", this._keyHandler); this.onIsPressedChanged(null, this.isPressed); } }; Button.prototype.onTemplateChanging = function () { _super.prototype.onTemplateChanging.call(this); if (this.rootElement) { this.rootElement.removeEventListener("click", this._mouseHandler); this.rootElement.removeEventListener("mousedown", this._mouseHandler); this.rootElement.removeEventListener("mouseup", this._mouseHandler); this.rootElement.removeEventListener("mouseleave", this._mouseHandler); this.rootElement.removeEventListener("keydown", this._keyHandler); this.rootElement.removeEventListener("keyup", this._keyHandler); } }; Button.prototype.onTooltipChangedOverride = function () { _super.prototype.onTooltipChangedOverride.call(this); if (this.tooltip) { this.rootElement.setAttribute("data-plugin-vs-tooltip", this.tooltip); this.rootElement.setAttribute("aria-label", Common.CommonConverters.JsonHtmlTooltipToInnerTextConverter.convertTo(this.tooltip)); } else { this.rootElement.removeAttribute("data-plugin-vs-tooltip"); this.rootElement.removeAttribute("aria-label"); } }; Button.prototype.press = function (e) { if (this.isEnabled) { this.click.invoke(e); } }; Button.prototype.onIsPressedChanged = function (oldValue, newValue) { if (this.rootElement) { if (newValue) { this.rootElement.classList.add(Button.CLASS_PRESSED); } else { this.rootElement.classList.remove(Button.CLASS_PRESSED); } } }; Button.prototype.onMouseEvent = function (e) { if (this.isEnabled) { var stopPropagation = false; switch (e.type) { case "click": this.rootElement.focus(); this.click.invoke(e); stopPropagation = true; break; case "mousedown": this.isPressed = true; break; case "mouseup": case "mouseleave": this.isPressed = false; break; default: F12.Tools.Utility.Assert.fail("Unexpected"); } if (stopPropagation) { e.stopImmediatePropagation(); e.preventDefault(); } } }; Button.prototype.onKeyboardEvent = function (e) { if (this.isEnabled && (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */)) { switch (e.type) { case "keydown": this.isPressed = true; break; case "keyup": if (this.isPressed) { this.isPressed = false; this.click.invoke(e); } break; default: F12.Tools.Utility.Assert.fail("Unexpected"); } } }; Button.CLASS_PRESSED = "pressed"; Button.IsPressedPropertyName = "isPressed"; return Button; })(Controls.ContentControl); Controls.Button = Button; Button.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // MenuControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var MenuControl = (function (_super) { __extends(MenuControl, _super); function MenuControl(templateId) { var _this = this; this._focusInHandler = function (e) { return _this.onFocusIn(e); }; this._selectedIndex = -1; this._menuItemsClickRegistration = []; this._menuItemsPropChangedRegistration = []; this.menuItems = []; _super.call(this, templateId || "Common.menuControlTemplate"); } MenuControl.initialize = function () { Common.ObservableHelpers.defineProperty(MenuControl, MenuControl.MenuItemsTemplateIdPropertyName, null, function (obj, oldValue, newValue) { return obj.onMenuTemplateIdChanged(oldValue, newValue); }); Common.ObservableHelpers.defineProperty(MenuControl, MenuControl.SelectedItemPropertyName, null, function (obj) { return obj.onSelectedItemChanged(); }); }; MenuControl.prototype.addClickHandlerToMenuItem = function (menuItemName, clickHandler) { var element = this.getNamedElement(menuItemName); if (element && element.control) { element.control.click.addHandler(clickHandler); } }; MenuControl.prototype.onIsVisibleChangedOverride = function () { _super.prototype.onIsVisibleChangedOverride.call(this); if (this.isVisible) { this.rootElement.addEventListener("focusin", this._focusInHandler); this.selectedItem = null; for (var i = 0; i < this.menuItems.length; i++) { this.menuItems[i].rootElement.classList.remove(MenuControl.CLASS_SELECTED); } } else { this.rootElement.removeEventListener("focusin", this._focusInHandler); } }; MenuControl.prototype.onKeyUpOverride = function (e) { var handled = false; switch (e.keyCode) { case 40 /* ArrowDown */: this.changeSelection(0 /* Next */); handled = true; break; case 38 /* ArrowUp */: this.changeSelection(1 /* Previous */); handled = true; break; case 32 /* Space */: case 13 /* Enter */: this.pressSelectedItem(); handled = true; break; } if (!handled) { handled = _super.prototype.onKeyUpOverride.call(this, e); } return handled; }; MenuControl.prototype.onMenuItemClick = function () { if (this.dismissOnMenuItemClick) { this.isVisible = false; } }; MenuControl.prototype.onMenuItemPropertyChanged = function (menuItem, propertyName) { if (propertyName === "isChecked" || propertyName === "groupName") { if (menuItem.groupName && menuItem.isChecked) { for (var index = 0; index < this.menuItems.length; index++) { var item = this.menuItems[index]; if (item !== menuItem && item.groupName === menuItem.groupName && item.isChecked) { item.isChecked = false; } } } } }; MenuControl.prototype.onMenuTemplateIdChanged = function (oldValue, newValue) { while (this._menuItemsPropChangedRegistration.length > 0) { this._menuItemsPropChangedRegistration.pop().unregister(); } while (this._menuItemsClickRegistration.length > 0) { this._menuItemsClickRegistration.pop().unregister(); } if (newValue) { this.menuItems = []; this.selectedItem = null; this._menuItemsPropChangedRegistration = []; this._menuItemsClickRegistration = []; var menuItemElements = this.rootElement.querySelectorAll("li[" + Common.TemplateDataAttributes.CONTROL + "]"); for (var index = 0; index < menuItemElements.length; index++) { var menuItemElement = menuItemElements[index]; F12.Tools.Utility.Assert.isTrue(!!menuItemElement.control, "All menuItemElements must have a control"); var menuItem = menuItemElement.control; this.menuItems.push(menuItem); this._menuItemsPropChangedRegistration.push(menuItem.propertyChanged.addHandler(this.onMenuItemPropertyChanged.bind(this, menuItem))); this._menuItemsClickRegistration.push(menuItem.click.addHandler(this.onMenuItemClick.bind(this))); } } }; MenuControl.prototype.onSelectedItemChanged = function () { if (!this.selectedItem) { this.setSelectedIndex(-1, false); } else { var itemIndex = this.menuItems.indexOf(this.selectedItem); if (itemIndex !== this._selectedIndex) { this.setSelectedIndex(itemIndex, false); } } }; MenuControl.prototype.onFocusIn = function (e) { var menuItemIndex = 0; for (; menuItemIndex < this.menuItems.length; menuItemIndex++) { var menuItem = this.menuItems[menuItemIndex]; if (menuItem.rootElement.contains(e.target)) { break; } } if (menuItemIndex < this.menuItems.length) { this.setSelectedIndex(menuItemIndex, false); } }; MenuControl.prototype.changeSelection = function (direction) { if (this.menuItems.length === 0) { return; } var step = (direction === 0 /* Next */) ? 1 : -1; var startingMenuItem = this.menuItems[this._selectedIndex]; var newMenuItem; var newIndex = this._selectedIndex; do { newIndex = (newIndex + step) % this.menuItems.length; if (newIndex < 0) { newIndex = this.menuItems.length - 1; } newMenuItem = this.menuItems[newIndex]; if (!startingMenuItem) { startingMenuItem = newMenuItem; } else if (newMenuItem === startingMenuItem) { break; } } while(!(newMenuItem.isVisible && newMenuItem.isEnabled)); if (newMenuItem.isVisible && newMenuItem.isEnabled) { this.setSelectedIndex(newIndex, true); } }; MenuControl.prototype.pressSelectedItem = function () { var selectedItem = this.menuItems[this._selectedIndex]; if (selectedItem) { selectedItem.press(); } }; MenuControl.prototype.setSelectedIndex = function (newIndex, setFocus) { if (this._selectedIndex >= 0 && this._selectedIndex < this.menuItems.length) { this.menuItems[this._selectedIndex].rootElement.classList.remove(MenuControl.CLASS_SELECTED); } this._selectedIndex = newIndex; var menuItem = this.menuItems[this._selectedIndex]; if (menuItem) { menuItem.rootElement.classList.add(MenuControl.CLASS_SELECTED); if (setFocus) { menuItem.rootElement.focus(); } this.selectedItem = menuItem; } }; MenuControl.CLASS_SELECTED = "selected"; MenuControl.MenuItemsTemplateIdPropertyName = "menuItemsTemplateId"; MenuControl.SelectedItemPropertyName = "selectedItem"; return MenuControl; })(Controls.PopupControl); Controls.MenuControl = MenuControl; MenuControl.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // MenuItem.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var MenuItem = (function (_super) { __extends(MenuItem, _super); function MenuItem(templateId) { var _this = this; this._mouseHandler = function (e) { return _this.onMouseEvent(e); }; this._keyUpHandler = function (e) { return _this.onKeyUp(e); }; this._domEventHanlder = function (e) { return _this.onDomAttributeModified(e); }; _super.call(this, templateId || "Common.menuItemTemplate"); this.click = new Common.EventSource(); } MenuItem.initialize = function () { Common.ObservableHelpers.defineProperty(MenuItem, MenuItem.GroupNamePropertyName, null); Common.ObservableHelpers.defineProperty(MenuItem, MenuItem.IsChecked, false, function (obj, oldValue, newValue) { return obj.onIsCheckedChanged(oldValue, newValue); }); }; MenuItem.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); if (this.rootElement) { this.rootElement.addEventListener("click", this._mouseHandler); this.rootElement.addEventListener("mousedown", this._mouseHandler); this.rootElement.addEventListener("mouseup", this._mouseHandler); this.rootElement.addEventListener("mouseleave", this._mouseHandler); this.rootElement.addEventListener("keyup", this._keyUpHandler); this.rootElement.addEventListener("DOMAttrModified", this._domEventHanlder); } this.onIsCheckedChanged(null, this.isChecked); }; MenuItem.prototype.onIsEnabledChangedOverride = function () { _super.prototype.onIsEnabledChangedOverride.call(this); if (this.isEnabled) { this.rootElement.removeAttribute("disabled"); } else { this.rootElement.setAttribute("disabled"); } }; MenuItem.prototype.onKeyUpOverride = function (e) { return false; }; MenuItem.prototype.onMouseClickOverride = function (e) { return false; }; MenuItem.prototype.onTemplateChanging = function () { _super.prototype.onTemplateChanging.call(this); if (this.rootElement) { this.rootElement.removeEventListener("click", this._mouseHandler); this.rootElement.removeEventListener("mousedown", this._mouseHandler); this.rootElement.removeEventListener("mouseup", this._mouseHandler); this.rootElement.removeEventListener("mouseleave", this._mouseHandler); this.rootElement.removeEventListener("keyup", this._keyUpHandler); this.rootElement.removeEventListener("DOMAttrModified", this._domEventHanlder); } }; MenuItem.prototype.press = function (e) { if (this.isEnabled) { this.click.invoke(e); } }; MenuItem.prototype.onDomAttributeModified = function (e) { if (e.attrName === "aria-checked") { var checked = e.newValue === "true"; if (this.isChecked !== checked) { this.isChecked = checked; } } }; MenuItem.prototype.onIsCheckedChanged = function (oldValue, newValue) { if (this.rootElement) { if (newValue) { this.rootElement.classList.remove(MenuItem.CLASS_HIDDEN_CHECK_MARK); } else { this.rootElement.classList.add(MenuItem.CLASS_HIDDEN_CHECK_MARK); } this.rootElement.setAttribute("aria-checked", "" + newValue); this.rootElement.focus(); } }; MenuItem.prototype.onKeyUp = function (e) { if (this.isEnabled) { var handled = this.onKeyUpOverride(e); if (!handled) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { this.press(e); handled = true; } } if (handled) { e.stopImmediatePropagation(); } } }; MenuItem.prototype.onMouseEvent = function (e) { if (this.isEnabled) { switch (e.type) { case "click": var handled = this.onMouseClickOverride(e); if (!handled) { this.press(e); } break; case "mousedown": case "mouseup": case "mouseleave": break; default: F12.Tools.Utility.Assert.fail("Unexpected"); } e.stopImmediatePropagation(); } }; MenuItem.CLASS_HIDDEN_CHECK_MARK = "hiddenCheckMark"; MenuItem.GroupNamePropertyName = "groupName"; MenuItem.IsChecked = "isChecked"; return MenuItem; })(Controls.ContentControl); Controls.MenuItem = MenuItem; MenuItem.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // CheckBoxMenuItem.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var CheckBoxMenuItem = (function (_super) { __extends(CheckBoxMenuItem, _super); function CheckBoxMenuItem(templateId) { _super.call(this, templateId || "Common.menuItemCheckBoxTemplate"); } CheckBoxMenuItem.prototype.onKeyUpOverride = function (e) { var handled = false; if (e.key === Common.Keys.SPACEBAR) { this.isChecked = !this.isChecked; handled = true; } if (!handled) { handled = _super.prototype.onKeyUpOverride.call(this, e); } return handled; }; CheckBoxMenuItem.prototype.press = function (e) { var checkBox = this.getNamedElement("BPT-menuItemCheckBox"); if (!e || e.srcElement !== checkBox) { this.isChecked = !this.isChecked; _super.prototype.press.call(this, e); } }; return CheckBoxMenuItem; })(Common.Controls.MenuItem); Controls.CheckBoxMenuItem = CheckBoxMenuItem; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // TextBoxMenuItem.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var TextBoxMenuItem = (function (_super) { __extends(TextBoxMenuItem, _super); function TextBoxMenuItem(templateId) { var _this = this; this._focusInHandler = function (e) { return _this.onFocusIn(e); }; _super.call(this, templateId || "Common.menuItemTextBoxTemplate"); } TextBoxMenuItem.initialize = function () { Common.ObservableHelpers.defineProperty(TextBoxMenuItem, TextBoxMenuItem.PlaceholderPropertyName, null); }; TextBoxMenuItem.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); this._textBox = this.getNamedElement("BPT-menuItemTextBox"); F12.Tools.Utility.Assert.isTrue(!!this._textBox, "Expecting a textbox with the name BPT-menuItemTextBox"); this.rootElement.addEventListener("focusin", this._focusInHandler); }; TextBoxMenuItem.prototype.onKeyUpOverride = function (e) { var handled = false; if (e.srcElement === this._textBox && e.keyCode === 27 /* Escape */) { e.stopImmediatePropagation(); handled = true; } if (!handled) { handled = _super.prototype.onKeyUpOverride.call(this, e); } return handled; }; TextBoxMenuItem.prototype.onTemplateChanging = function () { _super.prototype.onTemplateChanging.call(this); if (this.rootElement) { this.rootElement.removeEventListener("focusin", this._focusInHandler); } }; TextBoxMenuItem.prototype.press = function (e) { }; TextBoxMenuItem.prototype.onFocusIn = function (e) { this._textBox.focus(); }; TextBoxMenuItem.PlaceholderPropertyName = "placeholder"; return TextBoxMenuItem; })(Common.Controls.MenuItem); Controls.TextBoxMenuItem = TextBoxMenuItem; TextBoxMenuItem.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ComboBoxMenuItem.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var ComboBoxMenuItem = (function (_super) { __extends(ComboBoxMenuItem, _super); function ComboBoxMenuItem(templateId) { var _this = this; this._focusInHandler = function (e) { return _this.onFocusIn(e); }; _super.call(this, templateId || "Common.menuItemComboBoxTemplate"); } ComboBoxMenuItem.initialize = function () { Common.ObservableHelpers.defineProperty(ComboBoxMenuItem, "items", null); Common.ObservableHelpers.defineProperty(ComboBoxMenuItem, "selectedValue", null); }; ComboBoxMenuItem.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); this._selectElement = this.getNamedElement("BPT-menuItemComboBox"); F12.Tools.Utility.Assert.isTrue(!!this._selectElement, "Expecting a combobox with the name BPT-menuItemComboBox"); this.rootElement.addEventListener("focusin", this._focusInHandler); }; ComboBoxMenuItem.prototype.onKeyUpOverride = function (e) { var handled = false; if (e.srcElement === this._selectElement && e.key === Common.Keys.SPACEBAR || e.key === Common.Keys.ENTER || e.key === Common.Keys.DOWN || e.key === Common.Keys.UP) { handled = true; } if (!handled) { handled = _super.prototype.onKeyUpOverride.call(this, e); } return handled; }; ComboBoxMenuItem.prototype.onTemplateChanging = function () { _super.prototype.onTemplateChanging.call(this); if (this.rootElement) { this.rootElement.removeEventListener("focusin", this._focusInHandler); } }; ComboBoxMenuItem.prototype.press = function (e) { }; ComboBoxMenuItem.prototype.onFocusIn = function (e) { this._selectElement.focus(); }; return ComboBoxMenuItem; })(Common.Controls.MenuItem); Controls.ComboBoxMenuItem = ComboBoxMenuItem; ComboBoxMenuItem.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // Panel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var Panel = (function (_super) { __extends(Panel, _super); function Panel(templateId) { _super.call(this, templateId); } Panel.initialize = function () { }; Panel.prototype.addClickHandlerToButton = function (buttonName, clickHandler) { var element = this.getNamedElement(buttonName); if (element && element.control) { element.control.click.addHandler(clickHandler); } }; return Panel; })(Common.TemplateControl); Controls.Panel = Panel; Panel.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // TextBox.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var TextBox = (function (_super) { __extends(TextBox, _super); function TextBox(templateId) { var _this = this; this._keyboardHandler = function (e) { return _this.onKeyboardEvent(e); }; _super.call(this, templateId || "Common.defaultTextBoxTemplate"); } Object.defineProperty(TextBox.prototype, "focusableElement", { get: function () { return this.rootElement; }, enumerable: true, configurable: true }); TextBox.initialize = function () { Common.ObservableHelpers.defineProperty(TextBox, TextBox.PlaceholderPropertyName, ""); Common.ObservableHelpers.defineProperty(TextBox, TextBox.ReadonlyPropertyName, false, function (obj) { return obj.onReadonlyChanged(); }); Common.ObservableHelpers.defineProperty(TextBox, TextBox.TextPropertyName, ""); }; TextBox.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); this._inputRootElement = (this.getNamedElement(TextBox.InputElementName) || this.rootElement); F12.Tools.Utility.Assert.isTrue(!!this._inputRootElement, "Expecting a root element for the input element in TextBox."); this._textBinding = this.getBinding(this._inputRootElement, "value"); this._inputRootElement.addEventListener("keydown", this._keyboardHandler); this._inputRootElement.addEventListener("keypress", this._keyboardHandler); this._inputRootElement.addEventListener("input", this._keyboardHandler); }; TextBox.prototype.onIsEnabledChangedOverride = function () { _super.prototype.onIsEnabledChangedOverride.call(this); if (this.isEnabled) { this.rootElement.removeAttribute("disabled"); } else { this.rootElement.setAttribute("disabled"); } }; TextBox.prototype.onTemplateChanging = function () { _super.prototype.onTemplateChanging.call(this); if (this._inputRootElement) { this._inputRootElement.removeEventListener("keypress", this._keyboardHandler); this._inputRootElement.removeEventListener("keydown", this._keyboardHandler); this._inputRootElement.removeEventListener("input", this._keyboardHandler); } }; TextBox.prototype.onKeyboardEvent = function (e) { if (this.isEnabled) { switch (e.type) { case "keydown": if (e.key === Common.Keys.ENTER) { if (this._textBinding) { this._textBinding.updateSourceFromDest(); } } break; case "keypress": if (this.clearOnEscape && e.keyCode === 27 /* Escape */) { this._inputRootElement.value = ""; if (this._textBinding) { this._textBinding.updateSourceFromDest(); } e.stopImmediatePropagation(); e.preventDefault(); } break; case "input": if (this.updateOnInput) { if (this._textBinding) { this._textBinding.updateSourceFromDest(); } } break; default: F12.Tools.Utility.Assert.fail("Unexpected"); } } }; TextBox.prototype.onReadonlyChanged = function () { if (this._inputRootElement) { this._inputRootElement.readOnly = this.readonly; } }; TextBox.PlaceholderPropertyName = "placeholder"; TextBox.ReadonlyPropertyName = "readonly"; TextBox.TextPropertyName = "text"; TextBox.InputElementName = "_textBoxRoot"; return TextBox; })(Common.TemplateControl); Controls.TextBox = TextBox; TextBox.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ToggleButton.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var ToggleButton = (function (_super) { __extends(ToggleButton, _super); function ToggleButton(templateId) { var _this = this; this._modificationHandler = function (e) { return _this.onModificationEvent(e); }; _super.call(this, templateId); this.toggleIsCheckedOnClick = true; this.click.addHandler(function (e) { if (_this.toggleIsCheckedOnClick) { _this.isChecked = !_this.isChecked; } }); } ToggleButton.initialize = function () { Common.ObservableHelpers.defineProperty(Controls.Button, "isChecked", false, function (obj, oldValue, newValue) { return obj.onIsCheckedChanged(oldValue, newValue); }); }; ToggleButton.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); if (this.rootElement) { this.rootElement.addEventListener("DOMAttrModified", this._modificationHandler); this.onIsCheckedChanged(null, this.isChecked); } }; ToggleButton.prototype.onTemplateChanging = function () { _super.prototype.onTemplateChanging.call(this); if (this.rootElement) { this.rootElement.removeEventListener("DOMAttrModified", this._modificationHandler); } }; ToggleButton.prototype.onIsCheckedChanged = function (oldValue, newValue) { if (this.rootElement) { if (!this._isChangingAriaPressed) { this._isChangingAriaPressed = true; this.rootElement.setAttribute("aria-pressed", newValue + ""); this._isChangingAriaPressed = false; } if (newValue) { this.rootElement.classList.add(ToggleButton.CLASS_CHECKED); } else { this.rootElement.classList.remove(ToggleButton.CLASS_CHECKED); } } }; ToggleButton.prototype.onModificationEvent = function (e) { if (!this._isChangingAriaPressed && this.isEnabled && e.attrName === "aria-pressed" && e.attrChange === e.MODIFICATION) { this._isChangingAriaPressed = true; this.isChecked = e.newValue === "true"; this._isChangingAriaPressed = false; } }; ToggleButton.CLASS_CHECKED = "checked"; return ToggleButton; })(Controls.Button); Controls.ToggleButton = ToggleButton; ToggleButton.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ToolbarControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var ToolbarControl = (function (_super) { __extends(ToolbarControl, _super); function ToolbarControl(templateId) { var _this = this; this._activeIndex = -1; this._controls = []; this._controlsPropChangedRegistration = []; this._focusInHandler = function (e) { return _this.onFocusIn(e); }; this._toolbarKeyHandler = function (e) { return _this.onToolbarKeyboardEvent(e); }; this._toolbarPanel = null; _super.call(this, templateId || "Common.defaultToolbarTemplate"); if (Plugin.F12) { Plugin.F12.addEventListener("hostinfochanged", function (e) { return _this.onHostInfoChanged(e); }); this.onHostInfoChanged(Plugin.F12.getHostInfo()); } } ToolbarControl.initialize = function () { Common.ObservableHelpers.defineProperty(ToolbarControl, ToolbarControl.PanelTemplateIdPropertyName, "", function (obj, oldValue, newValue) { return obj.onPanelTemplateIdChanged(oldValue, newValue); }); Common.ObservableHelpers.defineProperty(ToolbarControl, ToolbarControl.TitlePropertyName, ""); }; ToolbarControl.prototype.getActiveElement = function () { if (this._activeIndex >= 0 && this._activeIndex < this._controls.length) { return this._controls[this._activeIndex].rootElement; } return null; }; ToolbarControl.prototype.moveToControl = function (direction) { var step = (direction === 0 /* Next */) ? 1 : this._controls.length - 1; var focusedElement = document.activeElement; if (this._controls.length === 0 || this._activeIndex === -1 || !focusedElement) { return; } var startIndex = this._activeIndex; for (var i = 0; i < this._controls.length; i++) { if (this._controls[i].rootElement === focusedElement) { startIndex = i; break; } } var currentIndex = startIndex; while (startIndex !== (currentIndex = (currentIndex + step) % this._controls.length)) { var control = this._controls[currentIndex]; if (control.isVisible && control.isEnabled) { this.setActiveIndex(currentIndex, true); break; } } }; ToolbarControl.prototype.onFocusIn = function (e) { var controlIndex = 0; for (; controlIndex < this._controls.length; controlIndex++) { var control = this._controls[controlIndex]; if (control.rootElement.contains(e.target)) { break; } } if (controlIndex < this._controls.length) { this.setActiveIndex(controlIndex); } }; ToolbarControl.prototype.onPanelTemplateIdChanged = function (oldValue, newValue) { if (this._toolbarPanel) { this._toolbarPanel.removeEventListener("focusin", this._focusInHandler); this._toolbarPanel.removeEventListener("keydown", this._toolbarKeyHandler); this._toolbarPanel = null; } while (this._controlsPropChangedRegistration.length > 0) { this._controlsPropChangedRegistration.pop().unregister(); } if (newValue) { this._controls = []; this.setActiveIndex(-1); this._toolbarPanel = this.getNamedElement(ToolbarControl.TOOLBAR_PANEL_ELEMENT_NAME); F12.Tools.Utility.Assert.hasValue(this._toolbarPanel, "Expecting a toolbar panel with the name: " + ToolbarControl.TOOLBAR_PANEL_ELEMENT_NAME); this._toolbarPanel.addEventListener("focusin", this._focusInHandler); this._toolbarPanel.addEventListener("keydown", this._toolbarKeyHandler); for (var elementIndex = 0; elementIndex < this._toolbarPanel.children.length; elementIndex++) { var element = this._toolbarPanel.children[elementIndex]; if (element.control) { F12.Tools.Utility.Assert.isTrue(element.control instanceof Common.TemplateControl, "We only support controls of type TemplateControl in the Toolbar"); var control = element.control; this._controls.push(control); this._controlsPropChangedRegistration.push(control.propertyChanged.addHandler(this.onChildControlPropertyChanged.bind(this, control))); } } } this.setTabStop(); }; ToolbarControl.prototype.onHostInfoChanged = function (e) { var scaledControlAreaWidth = 6 * (screen.logicalXDPI / screen.deviceXDPI); var toolbarContents = this.rootElement.querySelector(".BPT-ToolbarContents"); F12.Tools.Utility.Assert.hasValue(toolbarContents, "Unable to find an element with selector .BPT-ToolbarContents in the toolbar on hostInfoChanged"); if (toolbarContents) { toolbarContents.style.marginRight = scaledControlAreaWidth + "px"; } }; ToolbarControl.prototype.onToolbarKeyboardEvent = function (e) { if (e.keyCode === 37 /* ArrowLeft */) { this.moveToControl(1 /* Previous */); e.stopPropagation(); } else if (e.keyCode === 39 /* ArrowRight */) { this.moveToControl(0 /* Next */); e.stopPropagation(); } }; ToolbarControl.prototype.onChildControlPropertyChanged = function (childControl, propertyName) { if (propertyName === Common.TemplateControl.IsEnabledPropertyName || propertyName === Common.TemplateControl.IsVisiblePropertyName) { if (this._activeIndex === -1) { this.setTabStop(); } else { var currentActiveControl = this._controls[this._activeIndex]; if (childControl === currentActiveControl) { if (!(childControl.isEnabled && childControl.isVisible)) { this.setTabStop(this._activeIndex); } } } } }; ToolbarControl.prototype.setTabStop = function (startAt) { this.setActiveIndex(-1); startAt = startAt || 0; if (startAt < 0 || startAt >= this._controls.length) { return; } var currentIndex = startAt; var foundTabStop = false; do { var control = this._controls[currentIndex]; if (!foundTabStop && control.isVisible && control.isEnabled) { this.setActiveIndex(currentIndex); foundTabStop = true; } else { control.tabIndex = -1; } } while(startAt !== (currentIndex = (currentIndex + 1) % this._controls.length)); }; ToolbarControl.prototype.setActiveIndex = function (newIndex, setFocus) { if (this._activeIndex >= 0 && this._activeIndex < this._controls.length) { this._controls[this._activeIndex].tabIndex = -1; } this._activeIndex = newIndex; var control = this._controls[this._activeIndex]; if (control) { control.tabIndex = 1; if (setFocus) { control.rootElement.focus(); } } }; ToolbarControl.TOOLBAR_PANEL_ELEMENT_NAME = "_toolbarPanel"; ToolbarControl.PanelTemplateIdPropertyName = "panelTemplateId"; ToolbarControl.TitlePropertyName = "title"; return ToolbarControl; })(Controls.Panel); Controls.ToolbarControl = ToolbarControl; ToolbarControl.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ItemsControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var ItemsControl = (function (_super) { __extends(ItemsControl, _super); function ItemsControl(templateId) { _super.call(this, templateId); } ItemsControl.initialize = function () { Common.ObservableHelpers.defineProperty(ItemsControl, "items", "", function (obj, oldValue, newValue) { return obj.onItemsChange(oldValue, newValue); }); Common.ObservableHelpers.defineProperty(ItemsControl, "itemContainerControl", "", function (obj, oldValue, newValue) { return obj.onItemContainerControlChange(oldValue, newValue); }); }; ItemsControl.prototype.getIndex = function (item) { F12.Tools.Utility.Assert.isTrue(!!this._collection, "Expecting a non-null collection in the ItemsControl"); var index = this._collection.indexOf(item); if (index !== -1) { return index; } }; ItemsControl.prototype.getItem = function (index) { F12.Tools.Utility.Assert.isTrue(!!this._collection, "Expecting a non-null collection in the ItemsControl"); return this._collection.getItem(index); }; ItemsControl.prototype.getItemCount = function () { if (!this._collection) { return 0; } return this._collection.length; }; ItemsControl.prototype.onTooltipChangedOverride = function () { _super.prototype.onTooltipChangedOverride.call(this); this.updateTooltip(this.tooltip); }; ItemsControl.prototype.disposeItemContainerOverride = function (control) { }; ItemsControl.prototype.prepareItemContainerOverride = function (control, item) { }; ItemsControl.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); this.panelRootElement = this.getNamedElement(ItemsControl.PanelRootElementName) || this.rootElement; F12.Tools.Utility.Assert.isTrue(!!this.panelRootElement, "Expecting a root element for the panel in ItemsControl."); this.updateTooltip(this.tooltip); this.regenerateItemControls(); }; ItemsControl.prototype.onTemplateChanging = function () { this.updateTooltip(null); this.removeAllItemControls(); _super.prototype.onTemplateChanging.call(this); }; ItemsControl.prototype.onItemsChangedOverride = function () { }; ItemsControl.prototype.onItemContainerControlChangedOverride = function () { }; ItemsControl.prototype.onCollectionChangedOverride = function (args) { }; ItemsControl.prototype.onItemsChange = function (oldValue, newValue) { if (this._collectionChangedRegistration) { this._collectionChangedRegistration.unregister(); this._collectionChangedRegistration = null; } this._collection = null; if (this.items) { if (this.items.collectionChanged) { this._collectionChangedRegistration = this.items.collectionChanged.addHandler(this.onCollectionChanged.bind(this)); this._collection = this.items; } else { this._collection = new Common.ObservableCollection(this.items); } } this.regenerateItemControls(); this.onItemsChangedOverride(); }; ItemsControl.prototype.onItemContainerControlChange = function (oldValue, newValue) { this._itemContainerClassType = null; this._itemContainerTemplateId = null; this._itemContainerIsTemplateControl = false; if (this.itemContainerControl) { var parts = this.itemContainerControl.split(/[()]/, 2); if (parts && parts.length > 0) { var className = parts[0]; if (className) { className = className.trim(); } F12.Tools.Utility.Assert.isTrue(!!className, "Invalid itemContainerControl value. The control class name is required."); var templateId = parts[1]; if (templateId) { templateId = templateId.trim(); } this._itemContainerClassType = Common.TemplateLoader.getControlType(className); this._itemContainerTemplateId = templateId; this._itemContainerIsTemplateControl = this._itemContainerClassType === Common.TemplateControl || this._itemContainerClassType.prototype instanceof Common.TemplateControl; } } this.regenerateItemControls(); this.onItemContainerControlChangedOverride(); }; ItemsControl.prototype.onCollectionChanged = function (args) { switch (args.action) { case 0 /* Add */: this.insertItemControls(args.newStartingIndex, args.newItems.length); break; case 3 /* Clear */: this.removeAllItemControls(); break; case 1 /* Remove */: this.removeItemControls(args.oldStartingIndex, args.oldItems.length); break; case 2 /* Reset */: this.regenerateItemControls(); break; } this.onCollectionChangedOverride(args); }; ItemsControl.prototype.createItemControl = function (item) { var control = new this._itemContainerClassType(this._itemContainerTemplateId); this.prepareItemContainer(control, item); return control; }; ItemsControl.prototype.disposeItemContainer = function (control) { this.disposeItemContainerOverride(control); if (control && control.model) { control.model = null; } }; ItemsControl.prototype.prepareItemContainer = function (control, item) { if (this._itemContainerIsTemplateControl) { control.model = item; } this.prepareItemContainerOverride(control, item); }; ItemsControl.prototype.regenerateItemControls = function () { this.removeAllItemControls(); if (!this._collection) { return; } this.insertItemControls(0, this._collection.length); }; ItemsControl.prototype.insertItemControls = function (itemIndex, count) { if (!this._itemContainerClassType) { return; } var end = itemIndex + count; F12.Tools.Utility.Assert.isTrue(end <= this._collection.length, "Unexpected range after inserting into items."); F12.Tools.Utility.Assert.isTrue(itemIndex <= this.panelRootElement.childElementCount, "Collection and child elements mismatch."); if (itemIndex === this.panelRootElement.childElementCount) { for (var i = itemIndex; i < end; i++) { var item = this._collection.getItem(i); var control = this.createItemControl(item); this.panelRootElement.appendChild(control.rootElement); } } else { var endNode = this.panelRootElement.childNodes.item(itemIndex); for (var i = itemIndex; i < end; i++) { var item = this._collection.getItem(i); var control = this.createItemControl(item); this.panelRootElement.insertBefore(control.rootElement, endNode); } } }; ItemsControl.prototype.removeAllItemControls = function () { if (this.panelRootElement) { var children = this.panelRootElement.children; var childrenLength = children.length; for (var i = 0; i < childrenLength; i++) { var control = children[i].control; this.disposeItemContainer(control); } this.panelRootElement.innerHTML = ""; } }; ItemsControl.prototype.removeItemControls = function (itemIndex, count) { for (var i = itemIndex + count - 1; i >= itemIndex; i--) { var element = this.panelRootElement.children[i]; if (element) { var control = element.control; this.disposeItemContainer(control); this.panelRootElement.removeChild(element); } } }; ItemsControl.prototype.updateTooltip = function (tooltip) { if (this.panelRootElement) { if (tooltip) { this.panelRootElement.setAttribute("data-plugin-vs-tooltip", tooltip); this.panelRootElement.setAttribute("aria-label", tooltip); } else { this.panelRootElement.removeAttribute("data-plugin-vs-tooltip"); this.panelRootElement.removeAttribute("aria-label"); } } }; ItemsControl.PanelRootElementName = "_panel"; return ItemsControl; })(Common.TemplateControl); Controls.ItemsControl = ItemsControl; ItemsControl.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // RibbonControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var RibbonControl = (function (_super) { __extends(RibbonControl, _super); function RibbonControl(templateId) { var _this = this; this._currentOffset = 0; this._backwardScrollHandler = function () { return _this.scrollBackward(); }; this._forwardScrollHandler = function () { return _this.scrollForward(); }; this._onFocusInHandler = function (e) { return _this.onFocusIn(e); }; this._onFocusOutHandler = function (e) { return _this.onFocusOut(e); }; this._onKeyDownhandler = function (e) { return _this.onKeyDown(e); }; _super.call(this, templateId); this.selectedItem = null; } Object.defineProperty(RibbonControl.prototype, "selectedItem", { get: function () { return this._selectedItem; }, set: function (value) { if (value !== this._selectedItem) { var itemIndex = this.getItemCount() === 0 ? undefined : this.getIndex(value); if (itemIndex !== undefined) { this._selectedItem = value; this.selectedIndex = itemIndex; } else { this._selectedItem = null; this.selectedIndex = null; } this.propertyChanged.invoke(RibbonControl.SelectedItemPropertyName); } }, enumerable: true, configurable: true }); RibbonControl.initialize = function () { Common.ObservableHelpers.defineProperty(RibbonControl, RibbonControl.IsVerticalPropertyName, false, function (obj) { return obj.onIsVerticalChanged(); }); Common.ObservableHelpers.defineProperty(RibbonControl, RibbonControl.ScrollIncrementPropertyName, 1, function (obj) { return obj.updateButtons(); }); Common.ObservableHelpers.defineProperty(RibbonControl, RibbonControl.ScrollPositionPropertyName, 0, function (obj) { return obj.onScrollPositionChanged(); }); Common.ObservableHelpers.defineProperty(RibbonControl, RibbonControl.SelectedIndexPropertyName, null, function (obj, oldValue, newValue) { return obj.onSelectedIndexChanged(oldValue, newValue); }); }; RibbonControl.prototype.scrollBackward = function () { this.scrollPosition = Math.max(this.scrollPosition - this.scrollIncrement, 0); }; RibbonControl.prototype.scrollForward = function () { if (this.scrollPosition + this.scrollIncrement < this.getItemCount()) { this.scrollPosition += this.scrollIncrement; } }; RibbonControl.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); this._panelTabIndex = this.panelRootElement.tabIndex; this.panelRootElement.classList.add(RibbonControl.PANEL_CLASS); this.onIsVerticalChanged(); this.initializeButtons(); this.initializeKeyboard(); this.refresh(); }; RibbonControl.prototype.onTemplateChanging = function () { if (this.panelRootElement) { this.cleanupKeyboard(); this.cleanupButtons(); this.selectedIndex = null; this.scrollPosition = 0; this.panelRootElement.classList.remove(RibbonControl.HORIZONTAL_PANEL_CLASS); this.panelRootElement.classList.remove(RibbonControl.PANEL_CLASS); this._panelTabIndex = null; } _super.prototype.onTemplateChanging.call(this); }; RibbonControl.prototype.onItemsChangedOverride = function () { _super.prototype.onItemsChangedOverride.call(this); this.resetState(); }; RibbonControl.prototype.onCollectionChangedOverride = function (args) { _super.prototype.onCollectionChangedOverride.call(this, args); this.resetState(); }; RibbonControl.prototype.refresh = function () { this.onScrollPositionChanged(); this.displaySelected(); this.updateButtons(); }; RibbonControl.prototype.onIsVerticalChanged = function () { this.setOffset(0); if (!this.isVertical) { this._lengthProperty = "offsetWidth"; this._offsetProperty = "offsetLeft"; this._positioningProperty = "left"; this.panelRootElement.classList.add(RibbonControl.HORIZONTAL_PANEL_CLASS); } else { this._lengthProperty = "offsetHeight"; this._offsetProperty = "offsetTop"; this._positioningProperty = "top"; this.panelRootElement.classList.remove(RibbonControl.HORIZONTAL_PANEL_CLASS); } this.refresh(); }; RibbonControl.prototype.onScrollPositionChanged = function () { this.updateButtons(); if (this.getItemCount() === 0) { F12.Tools.Utility.Assert.areEqual(0, this.scrollPosition); this.setOffset(0); return; } F12.Tools.Utility.Assert.isTrue(this.scrollPosition >= 0 && this.scrollPosition < this.getItemCount(), "Scrolled to invalid position"); var displayChild = (this.panelRootElement.children[this.scrollPosition]); this.setOffset(this._currentOffset + displayChild[this._offsetProperty]); }; RibbonControl.prototype.onSelectedIndexChanged = function (oldValue, newValue) { if (oldValue !== null && oldValue < this.getItemCount()) { F12.Tools.Utility.Assert.isTrue(oldValue >= 0 && oldValue < this.getItemCount(), "Invalid existing index " + oldValue); this.panelRootElement.children[oldValue].classList.remove(RibbonControl.SELECTED_ITEM_CLASS); } if (newValue === null) { this.selectedItem = null; } else { F12.Tools.Utility.Assert.isTrue(this.selectedIndex >= 0 && this.selectedIndex < this.getItemCount(), "Invalid new index " + this.selectedIndex); this.selectedItem = this.getItem(newValue); } this.displaySelected(); }; RibbonControl.prototype.displaySelected = function () { if (this.selectedIndex !== null) { var selectedElement = this.panelRootElement.children[this.selectedIndex]; F12.Tools.Utility.Assert.isTrue(!!selectedElement, "No HTML element for selected index: " + this.selectedIndex); this.scrollIntoView(selectedElement); selectedElement.classList.add(RibbonControl.SELECTED_ITEM_CLASS); } }; RibbonControl.prototype.onFocusIn = function (e) { var itemIndex = 0; var numItems = this.panelRootElement.children.length; for (; itemIndex < numItems; itemIndex++) { var itemElement = this.panelRootElement.children[itemIndex]; if (itemElement.contains(e.target)) { this.makeTabbable(itemElement); if (this.selectedIndex === itemIndex) { this.displaySelected(); } else { this.selectedIndex = itemIndex; } return; } } if (this.selectedIndex !== null) { e.preventDefault(); this.setFocus(this.panelRootElement.children[this.selectedIndex]); } }; RibbonControl.prototype.onFocusOut = function (e) { if (!e.relatedTarget || (e.relatedTarget !== this.panelRootElement && !this.panelRootElement.contains(e.relatedTarget))) { this.makeTabbable(this.panelRootElement); } }; RibbonControl.prototype.onKeyDown = function (e) { var handled = false; var backwardKey = this.isVertical ? 38 /* ArrowUp */ : 37 /* ArrowLeft */; var forwardKey = this.isVertical ? 40 /* ArrowDown */ : 39 /* ArrowRight */; switch (e.keyCode) { case forwardKey: this.focusNext(); handled = true; break; case backwardKey: this.focusPrevious(); handled = true; break; } if (handled) { e.stopImmediatePropagation(); } return handled; }; RibbonControl.prototype.focusPrevious = function () { var newIndex; if (this.getItemCount() > 0) { if (this.selectedIndex === null) { newIndex = this.getItemCount() - 1; } else { F12.Tools.Utility.Assert.isTrue((this.selectedIndex >= 0) && (this.selectedIndex < this.getItemCount()), "Invalid selected index"); newIndex = Math.max(this.selectedIndex - 1, 0); } this.setFocus(this.panelRootElement.children[newIndex]); } }; RibbonControl.prototype.focusNext = function () { var newIndex; if (this.getItemCount() > 0) { if (this.selectedIndex === null) { newIndex = 0; } else { F12.Tools.Utility.Assert.isTrue((this.selectedIndex >= 0) && (this.selectedIndex < this.getItemCount()), "Invalid selected index"); newIndex = Math.min(this.selectedIndex + 1, this.getItemCount() - 1); } this.setFocus(this.panelRootElement.children[newIndex]); } }; RibbonControl.prototype.scrollIntoView = function (element) { if (this.isForwardEdgeOutOfView(element)) { for (var position = this.scrollPosition; position < this.getItemCount(); position += this.scrollIncrement) { if (this.isInView(element, position)) { this.scrollPosition = position; return; } } F12.Tools.Utility.Assert.fail("Could not find a scroll setting that brings element fully into view - is your scrollIncrement too big or your panel incorrectly sized?"); } else if (this.isBackwardEdgeOutOfView(element)) { for (var position = this.scrollPosition; position >= 0; position -= this.scrollIncrement) { if (this.isInView(element, position)) { this.scrollPosition = position; return; } } F12.Tools.Utility.Assert.fail("Could not find a scroll setting that brings element fully into view - is your scrollIncrement too big or your panel incorrectly sized?"); } }; RibbonControl.prototype.isInView = function (element, position) { return (!this.isForwardEdgeOutOfView(element, position) && !this.isBackwardEdgeOutOfView(element, position)); }; RibbonControl.prototype.isBackwardEdgeOutOfView = function (element, position) { if ((position === undefined) || (position === null)) { position = this.scrollPosition; } var relativeOffset = element[this._offsetProperty] - this.panelRootElement.children[position][this._offsetProperty]; return (relativeOffset < 0); }; RibbonControl.prototype.isForwardEdgeOutOfView = function (element, position) { if ((position === undefined) || (position === null)) { position = this.scrollPosition; } var positionedChild = this.panelRootElement.children[position]; var elementEnd = element[this._offsetProperty] + element[this._lengthProperty]; var relativeEndOffset = positionedChild[this._offsetProperty] + this.panelRootElement[this._lengthProperty] - elementEnd; return (relativeEndOffset < 0); }; RibbonControl.prototype.updateButtons = function () { if (this._backwardScrollButton) { F12.Tools.Utility.Assert.hasValue(this._forwardScrollButton); this._backwardScrollButton.isEnabled = (this.scrollPosition > 0); this._forwardScrollButton.isEnabled = (this.scrollPosition + this.scrollIncrement < this.getItemCount()); } }; RibbonControl.prototype.makeTabbable = function (element) { this.panelRootElement.removeAttribute("tabIndex"); if (this.selectedIndex !== null) { this.panelRootElement.children[this.selectedIndex].removeAttribute("tabIndex"); } F12.Tools.Utility.Assert.hasValue(this._panelTabIndex); element.tabIndex = this._panelTabIndex; }; RibbonControl.prototype.setOffset = function (offset) { this._currentOffset = offset; var children = this.panelRootElement.children; for (var i = 0; i < children.length; i++) { children[i].style[this._positioningProperty] = (-offset) + "px"; } }; RibbonControl.prototype.setFocus = function (element) { if (!element.contains(document.activeElement)) { element.focus(); this.panelRootElement.scrollLeft = 0; this.panelRootElement.scrollTop = 0; } }; RibbonControl.prototype.resetState = function () { this.selectedIndex = null; this.scrollPosition = 0; this.refresh(); }; RibbonControl.prototype.initializeButtons = function () { this._backwardScrollButton = this.getNamedControl(RibbonControl.BackwardScrollButtonName); F12.Tools.Utility.Assert.hasValue(this._backwardScrollButton, "RibbonControl template must have a backward button control named " + RibbonControl.BackwardScrollButtonName + " as a direct child"); this._forwardScrollButton = this.getNamedControl(RibbonControl.ForwardScrollButtonName); F12.Tools.Utility.Assert.hasValue(this._backwardScrollButton, "RibbonControl template must have a forward button control named " + RibbonControl.ForwardScrollButtonName + " as a direct child"); this._backwardScrollButton.click.addHandler(this._backwardScrollHandler); this._forwardScrollButton.click.addHandler(this._forwardScrollHandler); this.updateButtons(); }; RibbonControl.prototype.cleanupButtons = function () { if (this._backwardScrollButton) { F12.Tools.Utility.Assert.hasValue(this._forwardScrollButton); this._backwardScrollButton.isEnabled = false; this._forwardScrollButton.isEnabled = false; this._backwardScrollButton.click.removeHandler(this._backwardScrollHandler); this._forwardScrollButton.click.removeHandler(this._forwardScrollHandler); this._backwardScrollButton = null; this._forwardScrollButton = null; } }; RibbonControl.prototype.initializeKeyboard = function () { this.rootElement.removeAttribute("tabIndex"); this._backwardScrollButton.rootElement.removeAttribute("tabIndex"); this._forwardScrollButton.rootElement.removeAttribute("tabIndex"); this.getNamedElement(Controls.ItemsControl.PanelRootElementName).addEventListener("focusin", this._onFocusInHandler); this.getNamedElement(Controls.ItemsControl.PanelRootElementName).addEventListener("focusout", this._onFocusOutHandler); this.getNamedElement(Controls.ItemsControl.PanelRootElementName).addEventListener("keydown", this._onKeyDownhandler); }; RibbonControl.prototype.cleanupKeyboard = function () { this.getNamedElement(Controls.ItemsControl.PanelRootElementName).removeEventListener("focusin", this._onFocusInHandler); this.getNamedElement(Controls.ItemsControl.PanelRootElementName).removeEventListener("focusout", this._onFocusOutHandler); this.getNamedElement(Controls.ItemsControl.PanelRootElementName).removeEventListener("keydown", this._onKeyDownhandler); }; RibbonControl.HORIZONTAL_PANEL_CLASS = "BPT-horizontalRibbonPanel"; RibbonControl.PANEL_CLASS = "BPT-ribbonPanel"; RibbonControl.SELECTED_ITEM_CLASS = "BPT-selected"; RibbonControl.BackwardScrollButtonName = "_backwardScrollButton"; RibbonControl.ForwardScrollButtonName = "_forwardScrollButton"; RibbonControl.IsVerticalPropertyName = "isVertical"; RibbonControl.ScrollIncrementPropertyName = "scrollIncrement"; RibbonControl.ScrollPositionPropertyName = "scrollPosition"; RibbonControl.SelectedIndexPropertyName = "selectedIndex"; RibbonControl.SelectedItemPropertyName = "selectedItem"; return RibbonControl; })(Controls.ItemsControl); Controls.RibbonControl = RibbonControl; RibbonControl.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ColorUtilities.ts var Common; (function (Common) { "use strict"; var RgbaColor = (function () { function RgbaColor(red, green, blue, alpha) { this.red = red; this.green = green; this.blue = blue; this.alpha = alpha; this.assertValid(); } RgbaColor.getString = function (color) { var rgba = new RgbaColor(0, 0, 0, 0); rgba.setFromString(color); var normalizedString = RgbaColor.DUMMY_ELEMENT.style.color; if ((!normalizedString) || (normalizedString === "inherit") || (normalizedString === "currentColor") || (normalizedString === "invert")) { return ""; } return rgba.toString(); }; RgbaColor.prototype.setFromString = function (color) { RgbaColor.DUMMY_ELEMENT.style.color = ""; RgbaColor.DUMMY_ELEMENT.style.color = color; var normalizedString = RgbaColor.DUMMY_ELEMENT.style.color; if ((!normalizedString) || (normalizedString === "inherit") || (normalizedString === "currentColor") || (normalizedString === "invert")) { return false; } else if (normalizedString === "transparent") { return this.setFromRgba(this.red, this.green, this.blue, 0); } var computedString = document.parentWindow.getComputedStyle(RgbaColor.DUMMY_ELEMENT).color; for (var i = 0; i < RgbaColor.RGBA_REGEXPS.length; i++) { var result = RgbaColor.RGBA_REGEXPS[i].exec(computedString); if (result !== null) { return this.setFromRgba(this.toNumber(RegExp["$1"]), this.toNumber(RegExp["$2"]), this.toNumber(RegExp["$3"]), RegExp["$4"] ? this.toNumber(RegExp["$4"]) : 1); } } F12.Tools.Utility.Assert.fail("Unexpected computed color string format"); return false; }; RgbaColor.prototype.setFromHsla = function (hsla) { hsla.assertValid(); var m1; var m2; var h = hsla.hue / 360; var s = hsla.saturation / 100; var l = hsla.lightness / 100; if (l <= 0.5) { m2 = l * (s + 1); } else { m2 = l + s - l * s; } m1 = l * 2 - m2; return this.setFromRgba(Math.round(this.hslToRgbHelper(m1, m2, h + 1 / 3) * 255), Math.round(this.hslToRgbHelper(m1, m2, h) * 255), Math.round(this.hslToRgbHelper(m1, m2, h - 1 / 3) * 255), hsla.alpha); }; RgbaColor.prototype.setFromRgba = function (red, green, blue, alpha) { if ((this.red !== red) || (this.green !== green) || (this.blue !== blue) || (this.alpha !== alpha)) { this.red = red; this.green = green; this.blue = blue; this.alpha = alpha; this.assertValid(); return true; } return false; }; RgbaColor.prototype.toString = function () { if (this.alpha === 0) { return RgbaColor.TRANSPARENT_STRING; } return "rgba(" + this.red + ", " + this.green + ", " + this.blue + ", " + this.alpha + ")"; }; RgbaColor.prototype.assertValid = function () { F12.Tools.Utility.Assert.isTrue((this.red >= 0) && (this.red <= 255), "Invalid red channel"); F12.Tools.Utility.Assert.isTrue((this.green >= 0) && (this.green <= 255), "Invalid green channel"); F12.Tools.Utility.Assert.isTrue((this.blue >= 0) && (this.blue <= 255), "Invalid blue channel"); F12.Tools.Utility.Assert.isTrue((this.alpha >= 0) && (this.alpha <= 1), "Invalid alpha"); }; RgbaColor.prototype.hslToRgbHelper = function (m1, m2, h) { if (h < 0) { h = h + 1; } if (h > 1) { h = h - 1; } if (h * 6 < 1) { return m1 + (m2 - m1) * h * 6; } if (h * 2 < 1) { return m2; } if (h * 3 < 2) { return m1 + (m2 - m1) * (2 / 3 - h) * 6; } return m1; }; RgbaColor.prototype.toNumber = function (value) { return +value; }; RgbaColor.DUMMY_ELEMENT = document.createElement("div"); RgbaColor.RGBA_REGEXPS = [ /^ *rgba\(([0-9]+), *([0-9]+), *([0-9]+), *([0-9.]+)\) *$/, /^ *rgb\(([0-9]+), *([0-9]+), *([0-9]+)\) *$/ ]; RgbaColor.TRANSPARENT_STRING = "rgba(0, 0, 0, 0)"; return RgbaColor; })(); Common.RgbaColor = RgbaColor; var HslaColor = (function () { function HslaColor(hue, saturation, lightness, alpha) { this.hue = hue; this.saturation = saturation; this.lightness = lightness; this.alpha = alpha; this.assertValid(); } HslaColor.prototype.setFromRgba = function (rgba) { rgba.assertValid(); var red = rgba.red / 255; var green = rgba.green / 255; var blue = rgba.blue / 255; var hue; var saturation; var lightness; var alpha = rgba.alpha; var max = Math.max(red, green, blue); var min = Math.min(red, green, blue); var chroma = max - min; lightness = Math.round(0.5 * (max + min) * 100); if (chroma === 0) { saturation = 0; hue = this.hue; } else { var hueProportion; if (red === max) { hueProportion = ((green - blue) / chroma) % 6; } else if (green === max) { hueProportion = ((blue - red) / chroma) + 2; } else { F12.Tools.Utility.Assert.areEqual(blue, max); hueProportion = ((red - green) / chroma) + 4; } hue = Math.round((hueProportion * 60) + 360) % 360; saturation = Math.round(chroma / (1 - Math.abs(max + min - 1)) * 100); } return this.setFromHsla(hue, saturation, lightness, alpha); }; HslaColor.prototype.setFromHsla = function (hue, saturation, lightness, alpha) { if ((this.hue !== hue) || (this.saturation !== saturation) || (this.lightness !== lightness) || (this.alpha !== alpha)) { this.hue = hue; this.saturation = saturation; this.lightness = lightness; this.alpha = alpha; this.assertValid(); return true; } return false; }; HslaColor.prototype.assertValid = function () { F12.Tools.Utility.Assert.isTrue((this.hue >= 0) && (this.hue < 360), "Invalid hue"); F12.Tools.Utility.Assert.isTrue((this.saturation >= 0) && (this.saturation <= 100), "Invalid saturation"); F12.Tools.Utility.Assert.isTrue((this.lightness >= 0) && (this.lightness <= 100), "Invalid lightness"); F12.Tools.Utility.Assert.isTrue((this.alpha >= 0) && (this.alpha <= 1), "Invalid alpha"); }; return HslaColor; })(); Common.HslaColor = HslaColor; })(Common || (Common = {})); // ColorSlidersControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { "use strict"; var ColorSlidersConverters = (function () { function ColorSlidersConverters() { } ColorSlidersConverters.initialize = function () { ColorSlidersConverters.AlphaConverter = ColorSlidersConverters.getAlphaConverter(); }; ColorSlidersConverters.getAlphaConverter = function () { return { convertTo: function (from) { return (from * 100).toString(); }, convertFrom: function (from) { return from / 100; } }; }; return ColorSlidersConverters; })(); Common.ColorSlidersConverters = ColorSlidersConverters; ColorSlidersConverters.initialize(); })(Common || (Common = {})); var Common; (function (Common) { (function (Controls) { "use strict"; var ColorPickerSlidersControl = (function (_super) { __extends(ColorPickerSlidersControl, _super); function ColorPickerSlidersControl(templateId) { this._rgba = new Common.RgbaColor(0, 0, 0, 1.00); this._hsla = new Common.HslaColor(180, 0, 0, 1.00); this._color = "rgba(0, 0, 0, 1)"; _super.call(this, templateId || "Common.slidersPaneTemplate"); } Object.defineProperty(ColorPickerSlidersControl.prototype, "color", { get: function () { return this._color; }, set: function (value) { if ((value) && (value !== this._color)) { this._color = value; if (this._rgba.setFromString(value)) { if (this._hsla.setFromRgba(this._rgba)) { this.propertyChanged.invoke(ColorPickerSlidersControl.HuePropertyName); this.propertyChanged.invoke(ColorPickerSlidersControl.SaturationPropertyName); this.propertyChanged.invoke(ColorPickerSlidersControl.LightnessPropertyName); this.propertyChanged.invoke(ColorPickerSlidersControl.AlphaPropertyName); } } this.propertyChanged.invoke(ColorPickerSlidersControl.ColorPropertyName); } }, enumerable: true, configurable: true }); Object.defineProperty(ColorPickerSlidersControl.prototype, "hue", { get: function () { return this._hsla.hue; }, set: function (value) { if (value !== this._hsla.hue) { this._hsla.hue = value; if (this._rgba.setFromHsla(this._hsla)) { this._color = this._rgba.toString(); this.propertyChanged.invoke(ColorPickerSlidersControl.ColorPropertyName); } this.propertyChanged.invoke(ColorPickerSlidersControl.HuePropertyName); } }, enumerable: true, configurable: true }); Object.defineProperty(ColorPickerSlidersControl.prototype, "saturation", { get: function () { return this._hsla.saturation; }, set: function (value) { if (value !== this._hsla.saturation) { this._hsla.saturation = value; if (this._rgba.setFromHsla(this._hsla)) { this._color = this._rgba.toString(); this.propertyChanged.invoke(ColorPickerSlidersControl.ColorPropertyName); } this.propertyChanged.invoke(ColorPickerSlidersControl.SaturationPropertyName); } }, enumerable: true, configurable: true }); Object.defineProperty(ColorPickerSlidersControl.prototype, "lightness", { get: function () { return this._hsla.lightness; }, set: function (value) { if (value !== this._hsla.lightness) { this._hsla.lightness = value; if (this._rgba.setFromHsla(this._hsla)) { this._color = this._rgba.toString(); this.propertyChanged.invoke(ColorPickerSlidersControl.ColorPropertyName); } this.propertyChanged.invoke(ColorPickerSlidersControl.LightnessPropertyName); } }, enumerable: true, configurable: true }); Object.defineProperty(ColorPickerSlidersControl.prototype, "alpha", { get: function () { return this._hsla.alpha; }, set: function (value) { if (value !== this._hsla.alpha) { this._hsla.alpha = value; if (this._rgba.setFromHsla(this._hsla)) { this._color = this._rgba.toString(); this.propertyChanged.invoke(ColorPickerSlidersControl.ColorPropertyName); } this.propertyChanged.invoke(ColorPickerSlidersControl.AlphaPropertyName); } }, enumerable: true, configurable: true }); ColorPickerSlidersControl.DUMMY_ELEMENT = document.createElement("div"); ColorPickerSlidersControl.RGBA_REGEXPS = [ /^ *rgba\(([0-9]+), *([0-9]+), *([0-9]+), *([0-9.]+)\) *$/, /^ *rgb\(([0-9]+), *([0-9]+), *([0-9]+)\) *$/ ]; ColorPickerSlidersControl.AlphaPropertyName = "alpha"; ColorPickerSlidersControl.ColorPropertyName = "color"; ColorPickerSlidersControl.HuePropertyName = "hue"; ColorPickerSlidersControl.LightnessPropertyName = "lightness"; ColorPickerSlidersControl.SaturationPropertyName = "saturation"; return ColorPickerSlidersControl; })(Common.TemplateControl); Controls.ColorPickerSlidersControl = ColorPickerSlidersControl; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ColorPickerControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var ColorPickerControl = (function (_super) { __extends(ColorPickerControl, _super); function ColorPickerControl(templateId) { _super.call(this, templateId || "Common.defaultColorPickerTemplate"); this.color = "rgba(0, 0, 0, 1)"; this.paletteColors = new Common.ObservableCollection(); this.dismissOnTargetButtonClick = true; } Object.defineProperty(ColorPickerControl.prototype, "color", { get: function () { return this._color; }, set: function (value) { if (value && value !== this._color) { this._color = value; this.propertyChanged.invoke(ColorPickerControl.ColorPropertyName); } }, enumerable: true, configurable: true }); ColorPickerControl.initialize = function () { Common.ObservableHelpers.defineProperty(ColorPickerControl, ColorPickerControl.CancellationColorPropertyName, null); Common.ObservableHelpers.defineProperty(ColorPickerControl, ColorPickerControl.IsCompactViewPropertyName, false, function (obj) { return obj.onIsCompactViewChanged(); }); Common.ObservableHelpers.defineProperty(ColorPickerControl, ColorPickerControl.IsEyedropperActivePropertyName, false, function (obj) { return obj.onIsEyedropperActiveChanged(); }); Common.ObservableHelpers.defineProperty(ColorPickerControl, ColorPickerControl.IsPaletteLoadingPropertyName, false); Common.ObservableHelpers.defineProperty(ColorPickerControl, ColorPickerControl.IsSlidersShownPropertyName, false, function (obj) { return obj.onIsSlidersShownChanged(); }); Common.ObservableHelpers.defineProperty(ColorPickerControl, ColorPickerControl.PaletteColorsPropertyName, null); }; ColorPickerControl.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); this._palette = this.getNamedControl(ColorPickerControl.PALETTE_NAME); F12.Tools.Utility.Assert.hasValue(this._palette, "Color picker template must have a ribbon control named " + ColorPickerControl.PALETTE_NAME); }; ColorPickerControl.prototype.onTemplateChanging = function () { if (this._palette) { this._palette = null; } _super.prototype.onTemplateChanging.call(this); }; ColorPickerControl.prototype.onIsVisibleChangedOverride = function () { _super.prototype.onIsVisibleChangedOverride.call(this); if (this.isVisible) { this.cancellationColor = this.color; this._palette.refresh(); } else { this.cancellationColor = null; } }; ColorPickerControl.prototype.onKeyDownOverride = function (e) { var handled = this.onCustomKeyDown ? this.onCustomKeyDown(e) : false; return handled; }; ColorPickerControl.prototype.onKeyUpOverride = function (e) { var handled = false; switch (e.keyCode) { case 27 /* Escape */: this.color = this.cancellationColor; break; case 13 /* Enter */: this.isVisible = false; handled = true; break; } if (!handled) { handled = _super.prototype.onKeyUpOverride.call(this, e); } return handled; }; ColorPickerControl.prototype.onIsCompactViewChanged = function () { var colorPane = this.getNamedElement("selectedColorPane"); if (colorPane) { if (this.isCompactView) { colorPane.classList.add(Common.TemplateControl.CLASS_HIDDEN); colorPane.setAttribute("aria-hidden", "true"); } else { colorPane.classList.remove(Common.TemplateControl.CLASS_HIDDEN); colorPane.removeAttribute("aria-hidden"); } } }; ColorPickerControl.prototype.onIsEyedropperActiveChanged = function () { this.keepVisibleOnBlur = this.isEyedropperActive; }; ColorPickerControl.prototype.onIsSlidersShownChanged = function () { this.updateSlidersMaxHeight(); }; ColorPickerControl.prototype.updateSlidersMaxHeight = function () { var slidersPane = this.getNamedElement(ColorPickerControl.SLIDERS_CONTROL_NAME); if (!slidersPane) { return; } var viewportTop = this.viewportMargin ? (this.viewportMargin.top || 0) : 0; var viewportBottom = window.innerHeight - (this.viewportMargin ? (this.viewportMargin.bottom || 0) : 0); slidersPane.style.maxHeight = ""; this.updatePopupPosition(); var slidersPaneRect = slidersPane.getBoundingClientRect(); var overflowDelta = Math.floor(slidersPaneRect.bottom) - viewportBottom; if (overflowDelta > 0) { if (this.targetButtonElement) { var targetRect = this.targetButtonElement.getBoundingClientRect(); var aboveSpace = Math.abs(targetRect.top - viewportTop); var belowSpace = Math.abs(targetRect.bottom - viewportBottom); if (aboveSpace > belowSpace) { var colorPickerRect = this.rootElement.getBoundingClientRect(); overflowDelta = Math.max(0, Math.floor(viewportTop + colorPickerRect.height - targetRect.top)); } } var proposedSlidersPaneHeight = slidersPane.scrollHeight - overflowDelta; slidersPane.style.maxHeight = Math.max(30, proposedSlidersPaneHeight) + "px"; } else { slidersPane.style.maxHeight = ""; } this.updatePopupPosition(); }; ColorPickerControl.PALETTE_NAME = "_colorPalette"; ColorPickerControl.SLIDERS_CONTROL_NAME = "slidersPane"; ColorPickerControl.CancellationColorPropertyName = "cancellationColor"; ColorPickerControl.ColorPropertyName = "color"; ColorPickerControl.IsCompactViewPropertyName = "isCompactView"; ColorPickerControl.IsEyedropperActivePropertyName = "isEyedropperActive"; ColorPickerControl.IsPaletteLoadingPropertyName = "isPaletteLoading"; ColorPickerControl.IsSlidersShownPropertyName = "isSlidersShown"; ColorPickerControl.PaletteColorsPropertyName = "paletteColors"; return ColorPickerControl; })(Controls.PopupControl); Controls.ColorPickerControl = ColorPickerControl; ColorPickerControl.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // channel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { "use strict"; var Channel = (function () { function Channel(traceWriter) { this._uid = 0; this._handlers = []; this._processors = []; this._callbacks = {}; this._pendingMessages = []; this._pendingTimeout = null; this._traceWriter = traceWriter; } Channel.prototype.post = function (engine, message) { var messages = [message]; var i, n; for (i = 0, n = this._processors.length; i < n; i++) { var p = this._processors[i]; var generated = []; var j, o; for (j = 0, o = messages.length; j < o; j++) { var m = messages[j]; var result = p.processor(m); generated = generated.concat(result); } messages = generated; } for (i = 0, n = messages.length; i < n; i++) { var m = messages[i]; this.runSendMessage(engine.engineId, engine.portName, m); } }; Channel.prototype.loadScript = function (engineId, fileName) { throw new Error("Not implemented"); }; Channel.prototype.runSendMessage = function (engineId, portName, message) { throw new Error("Not implemented"); }; Channel.prototype.call = function (engine, command, args, callback, preMessageCallback) { var _this = this; var uidString = this.getUid(); if (callback) { this._callbacks[uidString] = { synced: true, callback: callback || null }; } var callbackUids = []; var newArgs = []; if (args) { for (var i = 0; i < args.length; i++) { if (typeof (args[i]) === "function") { var callbackuid = this.getUid(); callbackUids.push(callbackuid); this._callbacks[callbackuid] = { synced: false, callback: args[i] }; newArgs[i] = { uid: callbackuid, type: "callback" }; } else { newArgs[i] = args[i]; } } } var jsonObj = { uid: uidString, command: command, args: newArgs }; var sendMessageToRemote = function (engine, message, preMessageCallback) { if (preMessageCallback) { preMessageCallback(message, args[0]); } try { _this.post(engine, message); } catch (e) { return; } }; if (!this._pendingMessages[engine.engineId]) { this._pendingMessages[engine.engineId] = {}; } var engineMessages = this._pendingMessages[engine.engineId]; if (!engineMessages[engine.portName]) { engineMessages[engine.portName] = []; } engineMessages[engine.portName].push(jsonObj); if (!this._pendingTimeout) { this._pendingTimeout = setTimeout(function () { for (var engineId in _this._pendingMessages) { var portName; var engineMessages = _this._pendingMessages[engineId]; for (portName in engineMessages) { var messages = engineMessages[portName]; if (messages.length > 0) { var json = JSON.stringify(messages); engineMessages[portName] = []; _this._pendingTimeout = null; sendMessageToRemote({ engineId: +engineId, portName: portName }, json, preMessageCallback); } } } }, 0); } return callbackUids; }; Channel.prototype.onmessage = function (data) { this._traceWriter.raiseEvent(405 /* Console_Message_Start */); window.msWriteProfilerMark("ConsoleWindow:BeginOnMessage"); var m = { engine: { engineId: data.engineId, portName: data.portName }, data: data.data, handled: false }; try { var i, n; for (i = 0, n = this._handlers.length; i < n; i++) { var h = this._handlers[i]; h.handler(m); if (m.handled) { return; } } this.fireCallbacks(m); } finally { window.msWriteProfilerMark("ConsoleWindow:EndOnMessage"); this._traceWriter.raiseEvent(406 /* Console_Message_Stop */); } }; Channel.prototype.getUid = function () { return "uid" + (this._uid++).toString(36); }; Channel.prototype.addCallback = function (uid, callback) { this._callbacks[uid] = callback; }; Channel.prototype.addMessageProcessor = function (stepName, processor) { this._processors.push({ stepName: stepName, processor: processor }); }; Channel.prototype.addMessageHandler = function (stepName, handler) { this._handlers.push({ stepName: stepName, handler: handler }); }; Channel.prototype.clearCallbacks = function () { this._callbacks = {}; }; Channel.prototype.fireCallbacks = function (message) { var msgs = JSON.parse(message.data); for (var i = 0; i < msgs.length; i++) { var obj = msgs[i]; if (obj && obj.args) { obj.args.push(message.engine); } if (this._callbacks[obj.uid]) { this._callbacks[obj.uid].callback.apply(this, obj.args); if (this._callbacks[obj.uid] && this._callbacks[obj.uid].synced) { delete this._callbacks[obj.uid]; } } else if (obj.uid === "scriptError") { Common.ErrorHandling.reportErrorDetails(obj.args[0]); } } return message; }; return Channel; })(); Common.Channel = Channel; var VSChannel = (function (_super) { __extends(VSChannel, _super); function VSChannel(proxy, traceWriter) { _super.call(this, traceWriter); this._proxy = proxy; this._proxy.addEventListener("message", this.onmessage.bind(this)); } VSChannel.prototype.runSendMessage = function (engineId, portName, message) { return this._proxy._post("sendMessage", engineId, portName, message); }; VSChannel.prototype.loadScript = function (engineId, fileName) { this._proxy._post("loadScript", engineId, fileName); }; return VSChannel; })(Channel); Common.VSChannel = VSChannel; var IEChannel = (function (_super) { __extends(IEChannel, _super); function IEChannel(external, traceWriter) { _super.call(this, traceWriter); this._external = external; this._external.addEventListener("connect", this.onConnect.bind(this)); } IEChannel.prototype.runSendMessage = function (engineId, portName, message) { this._port.postMessage(message); }; IEChannel.prototype.loadScript = function (engineId, fileName) { this._external.loadScriptInProc(fileName); }; IEChannel.prototype.onConnect = function (port) { this._port = port; this._port.addEventListener("message", this.onmessage.bind(this)); }; return IEChannel; })(Channel); Common.IEChannel = IEChannel; })(Common || (Common = {})); // Common.templates.ts var ControlTemplates; (function (ControlTemplates) { var Common = (function () { function Common() { } Common.defaultButtonTemplate = "\
\ "; Common.iconButton24x24 = "\
\ \
\ "; Common.menuButton33x24 = "\
\ \
\ "; Common.menuButton33x24x5 = "\
\ \
\ "; Common.iconButton = "\
\ \
\ "; Common.labeledIconButton = "\
\ \ \
\ "; Common.defaultToolbarTemplate = "\
\
\ \
\
\
\ "; Common.toolbarTemplateWithSearchBox = "\
\
\ \
\
\ \
\
\
\
\
\
\
\
\
\ "; Common.menuControlTemplate = "\
\
\
\ "; Common.menuItemTemplate = "\
  • \
    \ \
  • \ "; Common.menuItemCheckMarkTemplate = "\
  • \ \ \
  • \ "; Common.menuItemCheckBoxTemplate = "\
  • \ \ \
  • \ "; Common.menuItemComboBoxTemplate = "\
  • \
    \
  • \ "; Common.menuItemTextBoxTemplate = "\
  • \
    \
  • \ "; Common.defaultComboBoxTemplate = "\ \ "; Common.defaultComboBoxItemTemplate = "\ \ "; Common.defaultTextBoxTemplate = "\ \ "; Common.stackPanelTemplate = "\
    \
    \
    \
    \ "; Common.defaultColorPickerTemplate = "\
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \
    \ "; Common.paletteItemsControlTemplate = "\
    \
    \
    \
    \
    \ "; Common.slidersPaneTemplate = "\
    \ \
    \ \ \
    \ \ \
    \ \ \
    \ \
    \ "; Common.selectedColorTemplate = "\
    \ \
    \ "; Common.paletteColorTemplate = "\
    \ \
    \ "; Common.arrowButton = "\
    \ "; Common.paletteProgressTemplate = "\ \ "; return Common; })(); ControlTemplates.Common = Common; })(ControlTemplates || (ControlTemplates = {})); // ComboBox.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { "use strict"; var ComboBox = (function (_super) { __extends(ComboBox, _super); function ComboBox(templateId) { var _this = this; this._mouseHandler = function (e) { return _this.onMouseEvent(e); }; _super.call(this, templateId || "Common.defaultComboBoxTemplate"); this.itemContainerControl = "Common.TemplateControl(Common.defaultComboBoxItemTemplate)"; } Object.defineProperty(ComboBox.prototype, "focusableElement", { get: function () { return this.rootElement; }, enumerable: true, configurable: true }); ComboBox.initialize = function () { Common.ObservableHelpers.defineProperty(ComboBox, ComboBox.SelectedValuePropertyName, ""); }; ComboBox.prototype.onApplyTemplate = function () { _super.prototype.onApplyTemplate.call(this); if (this.rootElement) { this.rootElement.addEventListener("mouseover", this._mouseHandler); } }; ComboBox.prototype.onTemplateChanging = function () { _super.prototype.onTemplateChanging.call(this); if (this.rootElement) { this.rootElement.removeEventListener("mouseover", this._mouseHandler); } }; ComboBox.prototype.onItemsChangedOverride = function () { this.propertyChanged.invoke(ComboBox.SelectedValuePropertyName); }; ComboBox.prototype.onItemContainerControlChangedOverride = function () { this.propertyChanged.invoke(ComboBox.SelectedValuePropertyName); }; ComboBox.prototype.onCollectionChangedOverride = function (args) { this.propertyChanged.invoke(ComboBox.SelectedValuePropertyName); }; ComboBox.prototype.onIsEnabledChangedOverride = function () { _super.prototype.onIsEnabledChangedOverride.call(this); if (this.isEnabled) { this.rootElement.removeAttribute("disabled"); } else { this.rootElement.setAttribute("disabled"); } }; ComboBox.prototype.onMouseEvent = function (e) { if (this.isEnabled) { switch (e.type) { case "mouseover": var currentValue = this.selectedValue; var itemCount = this.getItemCount(); for (var i = 0; i < itemCount; i++) { var item = this.getItem(i); if (item.value === currentValue) { if (item.tooltip) { Plugin.Tooltip.show({ content: item.tooltip }); } } } break; default: F12.Tools.Utility.Assert.fail("Unexpected"); } e.stopImmediatePropagation(); e.preventDefault(); } }; ComboBox.SelectedValuePropertyName = "selectedValue"; return ComboBox; })(Controls.ItemsControl); Controls.ComboBox = ComboBox; ComboBox.initialize(); })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // NavigationUtilities.ts var Common; (function (Common) { "use strict"; var NavigationUtilities = (function () { function NavigationUtilities() { } NavigationUtilities.registerFocusHandlers = function (pluginId) { if (Plugin.F12) { NavigationUtilities.LastActiveElement = document.head.parentElement; NavigationUtilities.LastActiveElement.setActive(); Plugin.F12.Communications.registerMethodHandler("showfocus", function (show) { return NavigationUtilities.showFocus(show, pluginId); }); } }; NavigationUtilities.registerNavigationFrames = function (navigationFrames) { NavigationUtilities.NavigationFrames = navigationFrames; if (Plugin.F12 && !NavigationUtilities.Registered) { Plugin.F12.addEventListener("navigatesubframes", function (e) { return NavigationUtilities.navigateFrames(e.isForward, e.useActiveElement); }); NavigationUtilities.Registered = true; } }; NavigationUtilities.enableNavigation = function () { NavigationUtilities.Enabled = true; }; NavigationUtilities.disableNavigation = function () { NavigationUtilities.Enabled = false; }; NavigationUtilities.makeNavigationFrameFromTarget = function (container, navigationTarget) { return NavigationUtilities.makeNavigationFrameFromCallback(container, function () { return navigationTarget; }); }; NavigationUtilities.makeNavigationFrameFromCallback = function (container, getTargetCallback) { return { container: container, getNavigationTarget: getTargetCallback }; }; NavigationUtilities.navigateFrames = function (forward, useActiveElement) { var containers = []; var targets = []; var targetIndex = -1; var step = (forward ? 1 : -1); if (!NavigationUtilities.Enabled) { return false; } if (!NavigationUtilities.navigateFrames || NavigationUtilities.navigateFrames.length === 0) { return true; } for (var frameIndex = 0; frameIndex < NavigationUtilities.NavigationFrames.length; frameIndex++) { var frame = NavigationUtilities.NavigationFrames[frameIndex]; containers.push(frame.container); targets.push(frame.getNavigationTarget()); } if (useActiveElement) { var activeElement = document.activeElement; var closestContainer; for (var containerIndex = 0; containerIndex < containers.length; containerIndex++) { var currentContainer = containers[containerIndex]; if (currentContainer.contains(activeElement)) { if (closestContainer) { if (closestContainer.contains(currentContainer)) { closestContainer = currentContainer; } } else { closestContainer = currentContainer; } } } if (closestContainer) { targetIndex = containers.indexOf(closestContainer) + step; } } else { targetIndex = forward ? 0 : NavigationUtilities.NavigationFrames.length - 1; } while (targetIndex >= 0 && targetIndex < targets.length) { var target = targets[targetIndex]; if (target) { target.focus(); return false; } targetIndex += step; } return true; }; NavigationUtilities.showFocus = function (show, pluginId) { var rootElement = document.head.parentElement; var activeElement = document.activeElement; var lastActiveElement = NavigationUtilities.LastActiveElement; if (show) { if (activeElement && activeElement !== rootElement) { activeElement.focus(); } else if (NavigationUtilities.shouldFocus(lastActiveElement) && lastActiveElement !== rootElement) { lastActiveElement.focus(); } else { var forward = true; if (pluginId === Plugin.F12.PluginId.Console) { forward = false; } NavigationUtilities.navigateFrames(forward, false); } } else { if (activeElement && activeElement !== rootElement) { NavigationUtilities.LastActiveElement = activeElement; } rootElement.setActive(); } return false; }; NavigationUtilities.shouldFocus = function (element) { return (element && document.body.contains(element) && element.style.display !== "none" && element.style.visibility !== "hidden" && !element.disabled && element.tabIndex >= 0); }; NavigationUtilities.Enabled = true; NavigationUtilities.Registered = false; return NavigationUtilities; })(); Common.NavigationUtilities = NavigationUtilities; })(Common || (Common = {})); // errorHandling.ts var Common; (function (Common) { "use strict"; var ErrorHandling = (function () { function ErrorHandling() { } ErrorHandling.reportErrorGivenStack = function (error) { var message = error.message; var stack = error.stack; var firstCloseParen = stack.indexOf(")"); if (firstCloseParen > 0) { stack = stack.substr(0, firstCloseParen + 1); } var result = ErrorHandling.StackRegex.exec(stack); if (result) { var file = result[3]; var line = parseInt(result[4], 10); var column = parseInt(result[5], 10); window.reportError(message, file, line, error.stack, column); } }; ErrorHandling.reportErrorDetails = function (errorDetails) { window.reportError(errorDetails.message, errorDetails.file, errorDetails.line, errorDetails.additionalInfo, errorDetails.column); }; ErrorHandling.StackRegex = new RegExp(".* at ([^(]+) \(.*/23/([^:]+):([0-9]+):([0-9]+)\)", "gim"); return ErrorHandling; })(); Common.ErrorHandling = ErrorHandling; })(Common || (Common = {})); if (typeof window !== "undefined") { window.reportError = function (message, file, line, additionalInfo, column) { message = message || ""; file = file || ""; line = line || 0; additionalInfo = additionalInfo || ""; column = column || 0; if (isDebugBuild) { var externalObj; if (window.parent.getExternalObj) { externalObj = window.parent.getExternalObj(); } else if (window.external) { externalObj = window.external; } if (externalObj) { var component = (window.errorComponent ? window.errorComponent : "Common"); console.error([component, message, file, line, column].join("\r\n")); if (window.errorDisplayHandler) { window.errorDisplayHandler(message, file, line, additionalInfo, column); } } } if (Plugin && Plugin.Diagnostics && Plugin.Diagnostics.reportError) { Plugin.Diagnostics.reportError(message, file, line, additionalInfo, column); } }; window.onerror = function (message, file, line, columnNumber) { var column = 0; var additionalInfo = ""; if (arguments) { if (arguments[3] && typeof arguments[3] === "number") { column = arguments[3]; } if (arguments[4] && arguments[4] instanceof Error) { additionalInfo = "Error number: " + arguments[4].number; additionalInfo += "\r\nStack: " + arguments[4].stack; } } window.reportError(message, file, line, additionalInfo, column); return true; }; } // KeyCodes.ts var Common; (function (Common) { "use strict"; var Keys = (function () { function Keys() { } Keys.C = "c"; Keys.DEL = "Del"; Keys.DOWN = "Down"; Keys.END = "End"; Keys.ENTER = "Enter"; Keys.F10 = "F10"; Keys.HOME = "Home"; Keys.LEFT = "Left"; Keys.RIGHT = "Right"; Keys.SPACEBAR = "Spacebar"; Keys.UP = "Up"; return Keys; })(); Common.Keys = Keys; (function (KeyCodes) { KeyCodes[KeyCodes["Backspace"] = 8] = "Backspace"; KeyCodes[KeyCodes["Tab"] = 9] = "Tab"; KeyCodes[KeyCodes["Enter"] = 13] = "Enter"; KeyCodes[KeyCodes["Shift"] = 16] = "Shift"; KeyCodes[KeyCodes["Control"] = 17] = "Control"; KeyCodes[KeyCodes["Alt"] = 18] = "Alt"; KeyCodes[KeyCodes["CapsLock"] = 20] = "CapsLock"; KeyCodes[KeyCodes["Escape"] = 27] = "Escape"; KeyCodes[KeyCodes["Space"] = 32] = "Space"; KeyCodes[KeyCodes["PageUp"] = 33] = "PageUp"; KeyCodes[KeyCodes["PageDown"] = 34] = "PageDown"; KeyCodes[KeyCodes["End"] = 35] = "End"; KeyCodes[KeyCodes["Home"] = 36] = "Home"; KeyCodes[KeyCodes["ArrowLeft"] = 37] = "ArrowLeft"; KeyCodes[KeyCodes["ArrowFirst"] = 37] = "ArrowFirst"; KeyCodes[KeyCodes["ArrowUp"] = 38] = "ArrowUp"; KeyCodes[KeyCodes["ArrowRight"] = 39] = "ArrowRight"; KeyCodes[KeyCodes["ArrowDown"] = 40] = "ArrowDown"; KeyCodes[KeyCodes["ArrowLast"] = 40] = "ArrowLast"; KeyCodes[KeyCodes["Insert"] = 45] = "Insert"; KeyCodes[KeyCodes["Delete"] = 46] = "Delete"; KeyCodes[KeyCodes["A"] = 65] = "A"; KeyCodes[KeyCodes["B"] = 66] = "B"; KeyCodes[KeyCodes["C"] = 67] = "C"; KeyCodes[KeyCodes["D"] = 68] = "D"; KeyCodes[KeyCodes["E"] = 69] = "E"; KeyCodes[KeyCodes["F"] = 70] = "F"; KeyCodes[KeyCodes["G"] = 71] = "G"; KeyCodes[KeyCodes["H"] = 72] = "H"; KeyCodes[KeyCodes["I"] = 73] = "I"; KeyCodes[KeyCodes["J"] = 74] = "J"; KeyCodes[KeyCodes["K"] = 75] = "K"; KeyCodes[KeyCodes["L"] = 76] = "L"; KeyCodes[KeyCodes["M"] = 77] = "M"; KeyCodes[KeyCodes["N"] = 78] = "N"; KeyCodes[KeyCodes["O"] = 79] = "O"; KeyCodes[KeyCodes["P"] = 80] = "P"; KeyCodes[KeyCodes["Q"] = 81] = "Q"; KeyCodes[KeyCodes["R"] = 82] = "R"; KeyCodes[KeyCodes["S"] = 83] = "S"; KeyCodes[KeyCodes["T"] = 84] = "T"; KeyCodes[KeyCodes["U"] = 85] = "U"; KeyCodes[KeyCodes["V"] = 86] = "V"; KeyCodes[KeyCodes["W"] = 87] = "W"; KeyCodes[KeyCodes["X"] = 88] = "X"; KeyCodes[KeyCodes["Y"] = 89] = "Y"; KeyCodes[KeyCodes["Z"] = 90] = "Z"; KeyCodes[KeyCodes["ContextMenu"] = 93] = "ContextMenu"; KeyCodes[KeyCodes["Multiply"] = 106] = "Multiply"; KeyCodes[KeyCodes["Plus"] = 107] = "Plus"; KeyCodes[KeyCodes["Minus"] = 109] = "Minus"; KeyCodes[KeyCodes["F1"] = 112] = "F1"; KeyCodes[KeyCodes["F2"] = 113] = "F2"; KeyCodes[KeyCodes["F3"] = 114] = "F3"; KeyCodes[KeyCodes["F4"] = 115] = "F4"; KeyCodes[KeyCodes["F5"] = 116] = "F5"; KeyCodes[KeyCodes["F6"] = 117] = "F6"; KeyCodes[KeyCodes["F7"] = 118] = "F7"; KeyCodes[KeyCodes["F8"] = 119] = "F8"; KeyCodes[KeyCodes["F9"] = 120] = "F9"; KeyCodes[KeyCodes["F10"] = 121] = "F10"; KeyCodes[KeyCodes["F11"] = 122] = "F11"; KeyCodes[KeyCodes["F12"] = 123] = "F12"; KeyCodes[KeyCodes["Comma"] = 188] = "Comma"; KeyCodes[KeyCodes["Period"] = 190] = "Period"; })(Common.KeyCodes || (Common.KeyCodes = {})); var KeyCodes = Common.KeyCodes; (function (MouseButtons) { MouseButtons[MouseButtons["LeftButton"] = 0] = "LeftButton"; MouseButtons[MouseButtons["MiddleButton"] = 1] = "MiddleButton"; MouseButtons[MouseButtons["RightButton"] = 2] = "RightButton"; })(Common.MouseButtons || (Common.MouseButtons = {})); var MouseButtons = Common.MouseButtons; (function (KeyFlags) { KeyFlags[KeyFlags["None"] = 0x0] = "None"; KeyFlags[KeyFlags["Shift"] = 0x1] = "Shift"; KeyFlags[KeyFlags["Ctrl"] = 0x2] = "Ctrl"; KeyFlags[KeyFlags["Alt"] = 0x4] = "Alt"; })(Common.KeyFlags || (Common.KeyFlags = {})); var KeyFlags = Common.KeyFlags; function blockBrowserAccelerators() { document.addEventListener("keydown", function (e) { return preventIEKeys(e); }); document.addEventListener("contextmenu", function (e) { e.preventDefault(); e.stopPropagation(); return false; }); window.addEventListener("mousewheel", function (e) { if (e.ctrlKey) { e.preventDefault(); e.stopPropagation(); return false; } }); } Common.blockBrowserAccelerators = blockBrowserAccelerators; function HasAnyOfAltCtrlShiftKeyFlags(e) { return e.shiftKey || e.ctrlKey || e.altKey; } Common.HasAnyOfAltCtrlShiftKeyFlags = HasAnyOfAltCtrlShiftKeyFlags; function HasOnlyCtrlKeyFlags(e) { return e.ctrlKey && !e.shiftKey && !e.altKey; } Common.HasOnlyCtrlKeyFlags = HasOnlyCtrlKeyFlags; function preventIEKeys(e) { if (e.keyCode === 116 /* F5 */ || e.keyCode === 117 /* F6 */ || (e.keyCode === 121 /* F10 */ && e.shiftKey) || (e.keyCode === 70 /* F */ && e.ctrlKey)) { e.preventDefault(); e.stopPropagation(); return false; } return true; } Common.preventIEKeys = preventIEKeys; })(Common || (Common = {})); // ButtonHelpers.ts var Common; (function (Common) { "use strict"; var ButtonHelpers = (function () { function ButtonHelpers() { } ButtonHelpers.changeButtonStatus = function (buttonDiv, enabled, pressed) { var wasEnabled = ButtonHelpers.isEnabled(buttonDiv); if (enabled && !wasEnabled) { buttonDiv.classList.remove("toolbarButtonStateDisabled"); buttonDiv.setAttribute("aria-disabled", "false"); } else if (!enabled && wasEnabled) { buttonDiv.classList.add("toolbarButtonStateDisabled"); buttonDiv.setAttribute("aria-disabled", "true"); } if (typeof pressed === "boolean") { ButtonHelpers.IsChangingAriaPressed = true; if (pressed) { buttonDiv.setAttribute("aria-pressed", "true"); buttonDiv.classList.add("toolbarButtonStateActive"); } else { buttonDiv.setAttribute("aria-pressed", "false"); buttonDiv.classList.remove("toolbarButtonStateActive"); } ButtonHelpers.IsChangingAriaPressed = false; } }; ButtonHelpers.isEnabled = function (buttonDiv) { return !buttonDiv.classList.contains("toolbarButtonStateDisabled"); }; ButtonHelpers.isValidEvent = function (event) { return (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) && ButtonHelpers.isEnabled(event.currentTarget); }; ButtonHelpers.setButtonTooltip = function (buttonDiv, tooltipResourceName, lookupResourceName) { if (typeof lookupResourceName === "undefined") { lookupResourceName = true; } var tooltip = (lookupResourceName ? Plugin.Resources.getString(tooltipResourceName) : tooltipResourceName); buttonDiv.setAttribute("data-plugin-vs-tooltip", tooltip); buttonDiv.setAttribute("aria-label", tooltip); }; ButtonHelpers.setupButton = function (buttonDiv, tooltipResourceName, clickHandler, isEnabled, lookupResourceName) { if (typeof isEnabled === "undefined") { isEnabled = true; } if (typeof lookupResourceName === "undefined") { lookupResourceName = true; } if (typeof tooltipResourceName === "string") { ButtonHelpers.setButtonTooltip(buttonDiv, tooltipResourceName, lookupResourceName); buttonDiv.setAttribute("role", "button"); } if (clickHandler) { buttonDiv.addEventListener("click", function (event) { return ButtonHelpers.onButtonPress(event, clickHandler); }); buttonDiv.addEventListener("keydown", function (event) { return ButtonHelpers.onButtonPress(event, clickHandler); }); buttonDiv.addEventListener("DOMAttrModified", function (event) { if (!ButtonHelpers.IsChangingAriaPressed && ButtonHelpers.isEnabled(buttonDiv) && event.attrName === "aria-pressed" && event.attrChange === event.MODIFICATION) { clickHandler(event); } }); } buttonDiv.addEventListener("mousedown", ButtonHelpers.onButtonMouseDown); buttonDiv.addEventListener("mouseenter", ButtonHelpers.onButtonMouseEnter); buttonDiv.addEventListener("mouseleave", ButtonHelpers.onButtonMouseLeave); buttonDiv.addEventListener("mouseup", ButtonHelpers.onButtonMouseUp); if (!isEnabled) { ButtonHelpers.changeButtonStatus(buttonDiv, false); } }; ButtonHelpers.onButtonMouseDown = function (event) { var buttonDiv = event.currentTarget; if (ButtonHelpers.isEnabled(buttonDiv)) { buttonDiv.classList.add("toolbarButtonMouseDown"); } else { event.stopImmediatePropagation(); } }; ButtonHelpers.onButtonMouseEnter = function (event) { var buttonDiv = event.currentTarget; if (ButtonHelpers.isEnabled(buttonDiv)) { buttonDiv.classList.add("toolbarButtonMouseHover"); } else { event.preventDefault(); event.stopImmediatePropagation(); } }; ButtonHelpers.onButtonMouseLeave = function (event) { var buttonDiv = event.currentTarget; buttonDiv.classList.remove("toolbarButtonMouseHover"); buttonDiv.classList.remove("toolbarButtonMouseDown"); }; ButtonHelpers.onButtonMouseUp = function (event) { var buttonDiv = event.currentTarget; buttonDiv.classList.remove("toolbarButtonMouseDown"); }; ButtonHelpers.onButtonPress = function (event, clickHandler) { if (ButtonHelpers.isValidEvent(event)) { clickHandler(event); event.preventDefault(); event.stopImmediatePropagation(); } }; return ButtonHelpers; })(); Common.ButtonHelpers = ButtonHelpers; })(Common || (Common = {})); // CssUtilities.ts var Common; (function (Common) { "use strict"; var CssUtilities = (function () { function CssUtilities() { } CssUtilities.addClasses = function (originalClasses, addClasses) { var newClasses = originalClasses ? originalClasses.split(" ") : []; var addList = addClasses ? addClasses.split(" ") : []; for (var i = 0; i < addList.length; i++) { if (newClasses.indexOf(addList[i]) === -1) { newClasses.push(addList[i]); } } return newClasses.join(" "); }; CssUtilities.removeClasses = function (originalClasses, removeClasses) { var classes = originalClasses ? originalClasses.split(" ") : []; var removeList = removeClasses ? removeClasses.split(" ") : []; var newClasses = []; for (var i = 0; i < classes.length; i++) { if (removeList.indexOf(classes[i]) === -1) { newClasses.push(classes[i]); } } return newClasses.join(" "); }; return CssUtilities; })(); Common.CssUtilities = CssUtilities; })(Common || (Common = {})); // Diagnostics.ts var Common; (function (Common) { "use strict"; })(Common || (Common = {})); var Diagnostics; (function (Diagnostics) { "use strict"; })(Diagnostics || (Diagnostics = {})); // DiagnosticsOM.ts var DiagnosticsOM; (function (DiagnosticsOM) { "use strict"; })(DiagnosticsOM || (DiagnosticsOM = {})); // encodingUtilities.ts var Common; (function (Common) { "use strict"; var EncodingUtilities = (function () { function EncodingUtilities() { } EncodingUtilities.escapeRegExp = function (value) { return String.prototype.replace.call(value, EncodingUtilities.ESCAPE_USER_INPUT_REGEX, "\\$&"); }; EncodingUtilities.escapeRegExpWithWildCard = function (value) { return String.prototype.replace.call(value, EncodingUtilities.ESCAPE_USER_INPUT_REGEX, function (match) { var newValue; if (match === "\*") { newValue = ".*"; } else { newValue = "\\" + match; } return newValue; }); }; EncodingUtilities.wrapInQuotes = function (stringToWrap) { return "\"" + String.prototype.replace.call(stringToWrap, /\\"/g, "\"") + "\""; }; EncodingUtilities.unescapeHtml = function (htmlString) { if ((typeof htmlString) !== "string") { if (htmlString === null || htmlString === undefined) { return ""; } htmlString = "" + htmlString; } return (String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(htmlString, />/g, ">"), /</g, "<"), /'/g, "'"), /"/g, "\""), /&/g, "&")); }; EncodingUtilities.escapeHtml = function (htmlString) { if ((typeof htmlString) !== "string") { if (htmlString === null || htmlString === undefined) { return ""; } htmlString = "" + htmlString; } return (String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(htmlString, /&/g, "&"), /"/g, """), /'/g, "'"), //g, ">")); }; EncodingUtilities.ESCAPE_USER_INPUT_REGEX = /([.+?^=!:${}()|\[\]\/\\])|(\*)/g; return EncodingUtilities; })(); Common.EncodingUtilities = EncodingUtilities; })(Common || (Common = {})); // DiagnosticsBridge.ts var Common; (function (Common) { "use strict"; var DiagnosticsPort = (function () { function DiagnosticsPort(proxy, portName) { this._proxy = proxy; this._portName = portName; } Object.defineProperty(DiagnosticsPort.prototype, "name", { get: function () { return this._portName; }, enumerable: true, configurable: true }); DiagnosticsPort.prototype.postMessage = function (data) { this._proxy._post("sendMessage", this._portName, data); return true; }; DiagnosticsPort.prototype.addEventListener = function (type, listener) { if (type === "message") { this._proxy.addEventListener(type, listener); } }; DiagnosticsPort.prototype.removeEventListener = function (type, listener) { if (type === "message") { this._proxy.removeEventListener(type, listener); } }; return DiagnosticsPort; })(); var IEDiagnosticsBridge = (function () { function IEDiagnosticsBridge(externalObj) { this._externalObj = externalObj; } IEDiagnosticsBridge.prototype.loadScriptInProc = function (fileName) { this._externalObj.loadScriptInProc(fileName); }; IEDiagnosticsBridge.prototype.createPort = function (port) { return port; }; IEDiagnosticsBridge.prototype.addEventListener = function (type, listener) { this._externalObj.addEventListener(type, listener); }; IEDiagnosticsBridge.prototype.removeEventListener = function (type, listener) { this._externalObj.removeEventListener(type, listener); }; IEDiagnosticsBridge.prototype.fireAttachedEvent = function () { this._externalObj.fireAttachedEvent(); }; IEDiagnosticsBridge.prototype.fireDetachedEvent = function () { this._externalObj.fireDetachedEvent(); }; return IEDiagnosticsBridge; })(); Common.IEDiagnosticsBridge = IEDiagnosticsBridge; var DiagnosticsBridge = (function () { function DiagnosticsBridge(proxy) { this._proxy = proxy; } DiagnosticsBridge.prototype.loadScriptInProc = function (fileName) { this._proxy._post("loadScript", fileName); }; DiagnosticsBridge.prototype.createPort = function (port) { return new DiagnosticsPort(this._proxy, port.portName); }; DiagnosticsBridge.prototype.addEventListener = function (type, listener) { this._proxy.addEventListener(type, listener); }; DiagnosticsBridge.prototype.removeEventListener = function (type, listener) { this._proxy.removeEventListener(type, listener); }; DiagnosticsBridge.prototype.fireAttachedEvent = function () { }; DiagnosticsBridge.prototype.fireDetachedEvent = function () { }; return DiagnosticsBridge; })(); Common.DiagnosticsBridge = DiagnosticsBridge; })(Common || (Common = {})); // toolwindow.ts var Common; (function (Common) { "use strict"; var ToolWindowHelpers = (function () { function ToolWindowHelpers() { } ToolWindowHelpers.initializeToolWindow = function () { document.addEventListener("mousedown", function () { $m(document.body).removeClass("showFocus"); }, true); $m(document).bind("contextmenu", function () { return false; }); $m(document).bind("keydown", function (event) { if (event.keyCode === 116 /* F5 */ || (event.keyCode === 121 /* F10 */ && event.shiftKey)) { event.preventDefault(); event.stopPropagation(); return false; } else if (event.keyCode === 9 /* Tab */) { $m(document.body).addClass("showFocus"); } }); $m(".BPT-ToolbarButton").bind("mousedown", function (event) { var element = $m(this); if (!element.hasClass("BPT-ToolbarButton-StateDisabled")) { element.addClass("BPT-ToolbarButton-MouseDown"); } else { event.stopImmediatePropagation(); } }); $m(".BPT-ToolbarButton").bind("mouseup", function () { $m(this).removeClass("BPT-ToolbarButton-MouseDown"); }); $m(".BPT-ToolbarButton").bind("mouseleave", function () { $m(this).removeClass("BPT-ToolbarButton-MouseDown BPT-ToolbarButton-MouseHover"); }); $m(".BPT-ToolbarButton").bind("mouseenter", function (event) { var element = $m(this); if (!element.hasClass("BPT-ToolbarButton-StateDisabled")) { element.addClass("BPT-ToolbarButton-MouseHover"); } else { event.preventDefault(); event.stopImmediatePropagation(); } }); $m(".BPT-ToolbarButton").bind("click keydown", function (event) { if (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) { var element = $m(this); if (!element.hasClass("BPT-ToolbarButton-StateDisabled")) { var thisElement = element.get(0); if (document.activeElement !== thisElement) { thisElement.focus(); } } else { event.preventDefault(); event.stopImmediatePropagation(); } } }); $m(".BPT-ToolbarToggleButton").bind("click keydown", function (event) { if (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) { var element = $m(this); if (!element.hasClass("BPT-ToolbarButton-StateDisabled")) { var thisElement = element.get(0); if (document.activeElement !== thisElement) { thisElement.focus(); } if (element.hasClass("BPT-ToolbarToggleButton-StateOn")) { element.removeClass("BPT-ToolbarToggleButton-StateOn"); element.attr("aria-pressed", false); } else { element.addClass("BPT-ToolbarToggleButton-StateOn"); element.attr("aria-pressed", true); } } else { event.preventDefault(); event.stopImmediatePropagation(); } } }); $m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("keydown", function (event) { if (($m(this).parent().hasClass("BPT-TabCycle-Horizontal") && (event.keyCode === 37 /* ArrowLeft */ || event.keyCode === 39 /* ArrowRight */)) || ($m(this).parent().hasClass("BPT-TabCycle-Vertical") && (event.keyCode === 38 /* ArrowUp */ || event.keyCode === 40 /* ArrowDown */))) { var currentElement = $m(this); var newElement = ((event.keyCode === 37 /* ArrowLeft */ || event.keyCode === 38 /* ArrowUp */) ? currentElement.prev(".BPT-TabCycle-Item").first() : currentElement.next(".BPT-TabCycle-Item").first()); if (newElement.length > 0) { newElement.attr("tabindex", "1"); newElement.trigger("focus"); newElement.trigger("click"); currentElement.removeAttr("tabindex"); } } }); $m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("mousedown", function (event) { var oldElement = $m(this).siblings(".BPT-TabCycle-Item").matchAttr("tabindex", "1"); var newElement = $m(this); if (newElement.length > 0) { newElement.attr("tabindex", "1"); newElement.trigger("focus"); oldElement.removeAttr("tabindex"); } }); }; ToolWindowHelpers.registerErrorComponent = function (component, errorDisplayHandler) { window.errorComponent = component; window.errorDisplayHandler = errorDisplayHandler; }; ToolWindowHelpers.loadString = function (resourceId) { var params = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { params[_i] = arguments[_i + 1]; } if (params.length === 1 && Array.isArray(params[0])) { params = params[0]; } return Plugin.Resources.getString.apply(this, ["/Common/" + resourceId].concat(params)); }; ToolWindowHelpers.codeMarker = function (codeMarker) { Plugin.VS.Internal.CodeMarkers.fire(codeMarker); }; ToolWindowHelpers.scrollIntoView = function (element, scrollContainer) { if (element && element.getBoundingClientRect) { var elementRect = element.getBoundingClientRect(); var containerRect = scrollContainer.getBoundingClientRect(); var elementTopIsAboveViewport = elementRect.top < containerRect.top; var elementBottomIsBelowViewport = elementRect.bottom > containerRect.bottom; if (elementTopIsAboveViewport || elementBottomIsBelowViewport) { element.scrollIntoView(true); return true; } } return false; }; ToolWindowHelpers.getSortedObjectProperties = function (objectToSort) { var sortedPropNames = []; for (var propName in objectToSort) { sortedPropNames.push(propName); } sortedPropNames.sort(Common.ToolWindowHelpers.naturalSort); return sortedPropNames; }; ToolWindowHelpers.getSortedArrayProperties = function (arrayToSort, key, highPriorityValue) { var i; var sortedProps = []; for (i = 0; i < arrayToSort.length; i++) { sortedProps.push({ property: arrayToSort[i][key], realIndex: i }); } sortedProps.sort(function (a, b) { if (highPriorityValue) { if (a.property === highPriorityValue && b.property === highPriorityValue) { return 0; } else if (a.property === highPriorityValue) { return -1; } else if (b.property === highPriorityValue) { return 1; } } return Common.ToolWindowHelpers.naturalSort(a.property, b.property); }); var sortedList = []; for (i = 0; i < sortedProps.length; i++) { sortedList.push(sortedProps[i].realIndex); } return sortedList; }; ToolWindowHelpers.naturalSort = function (a, b) { var regexSortGroup = /(\d+)|(\D+)/g; var aGroups = String(a).toLocaleLowerCase().match(regexSortGroup); var bGroups = String(b).toLocaleLowerCase().match(regexSortGroup); if (!aGroups && bGroups) { return -1; } else if (aGroups && !bGroups) { return 1; } else if (!aGroups && !bGroups) { return 0; } while (aGroups.length > 0 && bGroups.length > 0) { var aFront = aGroups.shift(); var bFront = bGroups.shift(); var aAsDigit = parseInt(aFront, 10); var bAsDigit = parseInt(bFront, 10); if (isNaN(aAsDigit) && isNaN(bAsDigit)) { if (aFront !== bFront) { return aFront.localeCompare(bFront); } } else if (isNaN(aAsDigit)) { return 1; } else if (isNaN(bAsDigit)) { return -1; } else { if (aAsDigit !== bAsDigit) { return (aAsDigit - bAsDigit); } } } return aGroups.length - bGroups.length; }; ToolWindowHelpers.createShortenedUrlText = function (url) { if (!url) { return url; } var shortenedText = url; var javascriptPrefix = "javascript:"; if (shortenedText.toLowerCase().substr(0, javascriptPrefix.length) === javascriptPrefix) { return "javascript:"; } var indexOfHash = shortenedText.indexOf("#"); var indexOfQuestionMark = shortenedText.indexOf("?"); var index = -1; if (indexOfHash > -1 && indexOfQuestionMark > -1) { index = Math.min(indexOfHash, indexOfQuestionMark); } else if (indexOfHash > -1) { index = indexOfHash; } else if (indexOfQuestionMark > -1) { index = indexOfQuestionMark; } if (index > -1) { shortenedText = shortenedText.substring(0, index); } index = Math.max(shortenedText.lastIndexOf("/"), shortenedText.lastIndexOf("\\")); while (index !== -1 && index === (shortenedText.length - 1)) { shortenedText = shortenedText.substring(0, shortenedText.length - 1); index = Math.max(shortenedText.lastIndexOf("/"), shortenedText.lastIndexOf("\\")); } if (index > -1) { shortenedText = shortenedText.substring(index + 1); } return shortenedText; }; ToolWindowHelpers.getTruncatedFileName = function (filePath, maxLength) { if (typeof maxLength === "undefined") { maxLength = 20; } if (!filePath) { return filePath; } var fileName = Common.ToolWindowHelpers.createShortenedUrlText(filePath); if (fileName.length > maxLength) { var index = maxLength / 2 - 2; fileName = fileName.substr(0, index) + this.loadString("Ellipsis") + fileName.substr(fileName.length - index); } return fileName; }; ToolWindowHelpers.createFileLinkText = function (fileUrl, line, column, maxLength) { var linkText = fileUrl ? this.getTruncatedFileName(fileUrl, maxLength) : ""; if (line) { if (fileUrl) { linkText += " "; } linkText += "(" + line; if (column) { linkText += ", " + column; } linkText += ")"; } return linkText; }; ToolWindowHelpers.pathCombine = function (firstPart, secondPart) { var separators = /[\/\\]/; if (!secondPart) { return firstPart; } else if (this.isAbsoluteUrl(secondPart) || !firstPart) { return secondPart; } else if (secondPart.charAt(0) === "/" && this.isAbsoluteUrl(firstPart)) { return this.getRoot(firstPart) + secondPart; } else if (firstPart.charAt(firstPart.length - 1).match(separators) || secondPart.charAt(0).match(separators)) { return firstPart + secondPart; } else { var separator = ((firstPart + secondPart).lastIndexOf("\\") >= 0 ? "\\" : "/"); return firstPart + separator + secondPart; } }; ToolWindowHelpers.getRoot = function (url) { return url.substring(0, url.indexOf("/", url.indexOf("://") + 3)); }; ToolWindowHelpers.isAbsoluteUrl = function (url) { if (this.isUncPath(url) || this.pathStartsWithDriveLetter(url)) { return true; } if (!!url.match(/^file:\/{2,3}\./i)) { return false; } return !!url.match(/^[a-zA-Z][\w\+\-\.]*:/) || this.isDataURI(url); }; ToolWindowHelpers.isUncPath = function (url) { return !!url.match(/^\\\\/); }; ToolWindowHelpers.pathStartsWithDriveLetter = function (url) { return !!url.match(/^[A-Za-z]:/); }; ToolWindowHelpers.isFileURI = function (url) { return url.length > 5 && url.substr(0, 5).toLocaleLowerCase() === "file:"; }; ToolWindowHelpers.isDataURI = function (url) { return url.length > 5 && url.substr(0, 5).toLocaleLowerCase() === "data:"; }; ToolWindowHelpers.addFileProtocolIfNeeded = function (url) { if ((Common.ToolWindowHelpers.pathStartsWithDriveLetter(url) || Common.ToolWindowHelpers.isUncPath(url)) && !Common.ToolWindowHelpers.isFileURI(url)) { url = "file:///" + url; } return url; }; ToolWindowHelpers.truncateProtocolFromUrl = function (url) { return url.replace(/^[a-zAZ][\w\+\-\.]*:(\/\/)?/g, ""); }; ToolWindowHelpers.parseBase64DataUriContent = function (url) { if (!ToolWindowHelpers.isDataURI(url) || url.indexOf("base64,") === -1) { return null; } try { return window.atob(url.substr(url.indexOf("base64,") + 7)); } catch (ex) { return null; } }; ToolWindowHelpers.parseDataUriMimeType = function (url) { if (!ToolWindowHelpers.isDataURI(url) || url.indexOf(";") === -1) { return null; } return url.substring(5, url.indexOf(";")); }; ToolWindowHelpers.hasSelectedText = function () { var selectedText = window.getSelection().toString(); return !!selectedText; }; ToolWindowHelpers.getSelectedText = function () { var selectedText = window.getSelection().toString(); return selectedText; }; ToolWindowHelpers.copySelectedTextToClipboard = function () { var selectedText = window.getSelection().toString(); if (selectedText) { var compactText = selectedText.replace(/[\r\n]+/g, "\r\n"); clipboardData.setData("Text", compactText); return true; } return false; }; ToolWindowHelpers.isDarkThemeBackground = function (element) { if (element) { var backgroundColor; while ((!backgroundColor || backgroundColor === "transparent") && element && element.length > 0) { backgroundColor = element.css("background-color"); element = element.parent(); } if (backgroundColor) { var rgbParts = backgroundColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); if (rgbParts && rgbParts.length === 4) { var brightness = ((parseInt(rgbParts[1], 10) * 299) + (parseInt(rgbParts[2], 10) * 587) + (parseInt(rgbParts[3], 10) * 114)) / 1000; return (brightness < 127); } } } return false; }; ToolWindowHelpers.isContextMenuUp = function () { return Common.ToolWindowHelpers.ContextMenuIsUp; }; ToolWindowHelpers.contextMenuUp = function (flag) { Common.ToolWindowHelpers.ContextMenuIsUp = flag; }; ToolWindowHelpers.nodeInDocument = function (node) { if (node) { while (node = node.parentNode) { if (node === document) { return true; } } } return false; }; ToolWindowHelpers.isFocusGood = function () { var nowFocus = document.querySelector(":focus"); return nowFocus && nowFocus.tagName !== "BODY"; }; ToolWindowHelpers.fireCustomEvent = function (element, eventName) { var customEvent = document.createEvent("CustomEvent"); customEvent.initEvent(eventName, true, true); element.dispatchEvent(customEvent); }; ToolWindowHelpers.getExtension = function (url) { if (!url) { return ""; } url = this.createShortenedUrlText(url); var indexOfDot = url.lastIndexOf("."); var extension; if (indexOfDot < 0) { return ""; } else { return url.substr(indexOfDot).toLowerCase(); } }; ToolWindowHelpers.guessMimeTypeFromUrlExtension = function (url) { switch (this.getExtension(url)) { case ".html": case ".htm": return "text/html"; case ".xml": case ".svg": return "text/xml"; case ".ts": return "text/typescript"; case ".js": return "text/javascript"; case ".css": return "text/css"; case ".coffee": return "text/coffeescript"; case ".cs": return "text/x-csharp"; default: return "text/plain"; } }; ToolWindowHelpers.ContextMenuIsUp = false; ToolWindowHelpers.CodeMarkers = { perfBrowserTools_DiagnosticsToolWindowsConsoleReady: 23609, perfBrowserTools_DiagnosticsToolWindowsDomExplorerReady: 23610, perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectBegin: 23611, perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectEnd: 23612, perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectInteractive: 23613, perfBrowserTools_DiagnosticsToolWindowsConsoleEvalBegin: 23614, perfBrowserTools_DiagnosticsToolWindowsConsoleEvalEnd: 23615, perfBrowserTools_DiagnosticsToolWindowsDataTreeToggleBegin: 23616, perfBrowserTools_DiagnosticsToolWindowsDataTreeToggleEnd: 23617, perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleBegin: 23618, perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleEnd: 23619, perfBrowserTools_DiagnosticsToolWindowsDomExplorerRefreshBegin: 23620, perfBrowserTools_DiagnosticsToolWindowsDomExplorerRefreshEnd: 23621, perfBrowserTools_DiagnosticsToolWindowsDomExplorerAttributeChanged: 23622, perfBrowserTools_DiagnosticsToolWindowsDomExplorerTabChanged: 23623, perfBrowserTools_DiagnosticsToolWindowsNetworkExplorerReady: 23624 }; ToolWindowHelpers.AreCodeMarkersEnabled = false; return ToolWindowHelpers; })(); Common.ToolWindowHelpers = ToolWindowHelpers; })(Common || (Common = {})); // Proxy.ts "use strict"; var Proxy = (function () { function Proxy(diagnosticsBridge) { this._uid = 0; this._callbacks = {}; this._pendingTimeout = null; this.remotePort = null; this._diagnosticsBridge = diagnosticsBridge; } Proxy.prototype.callRemote = function (command, args, callback, preMessageCallback) { var _this = this; var uidString = this.getUid(); if (callback) { this._callbacks[uidString] = { synced: true, callback: callback || null }; } var callbackUids = []; var newArgs = []; if (args) { for (var i = 0; i < args.length; i++) { if (typeof (args[i]) === "function") { var callbackuid = this.getUid(); callbackUids.push(callbackuid); this._callbacks[callbackuid] = { synced: false, callback: args[i] }; newArgs[i] = { uid: callbackuid, type: "callback" }; } else { newArgs[i] = args[i]; } } } var jsonObj = { uid: uidString, command: command, args: newArgs }; var sendMessageToRemote = function (message, preMessageCallback) { if (_this.remotePort) { if (preMessageCallback) { preMessageCallback(message, args[0]); } try { _this.remotePort.postMessage(message); } catch (e) { return; } } }; this._pendingMessages.push(jsonObj); if (!this._pendingTimeout) { this._pendingTimeout = setTimeout(function () { var message = JSON.stringify(_this._pendingMessages); _this._pendingMessages = []; _this._pendingTimeout = null; sendMessageToRemote(message, preMessageCallback); }, 0); } return callbackUids; }; Proxy.prototype.clearCallBacks = function (uids) { var _this = this; if (uids) { uids.forEach(function (uid) { delete _this._callbacks[uid]; }); } else { this._callbacks = {}; } }; Proxy.prototype.fireCallbacks = function (data) { var msgs = JSON.parse(data); for (var i = 0; i < msgs.length; i++) { var obj = msgs[i]; if (this._callbacks[obj.uid]) { this._callbacks[obj.uid].callback.apply(this, obj.args); if (this._callbacks[obj.uid] && this._callbacks[obj.uid].synced) { delete this._callbacks[obj.uid]; } } else if (obj.uid === "scriptError") { window.reportError(obj.args[0].message, obj.args[0].file, obj.args[0].line, obj.args[0].additionalInfo); } } }; Proxy.prototype.initializeProxy = function (onMessageCallback, onAttachCallback, onDetachCallback, onBreakCallback, onRunCallback) { var _this = this; this._pendingMessages = []; this._onMessageCallback = onMessageCallback; this._onAttachCallback = onAttachCallback; this._onDetachCallback = onDetachCallback || (function () { return false; }); this._onBreakCallback = onBreakCallback || (function () { return false; }); this._onRunCallback = onRunCallback || (function () { return false; }); this._diagnosticsBridge.addEventListener("attach", function () { return _this.onAttach(); }); this._diagnosticsBridge.addEventListener("break", function () { return _this.onBreak(); }); this._diagnosticsBridge.addEventListener("connect", function (p) { return _this.onConnect(p); }); this._diagnosticsBridge.addEventListener("detach", function () { return _this.onDetach(); }); this._diagnosticsBridge.addEventListener("run", function () { return _this.onRun(); }); this.onAttach(); }; Proxy.prototype.onAttach = function () { this.hideWarningSection(); this._onAttachCallback(); }; Proxy.prototype.onDetach = function () { if (this.remotePort) { this.remotePort.removeEventListener("message", this._onMessageCallback); this.remotePort = null; } this._callbacks = {}; this._pendingMessages = []; this._pendingTimeout = null; this._onDetachCallback(); this.postWarning("DiagnosticsDisabled"); }; Proxy.prototype.onBreak = function () { if (this._onBreakCallback) { this._onBreakCallback(); } }; Proxy.prototype.onRun = function () { if (this._onRunCallback) { this._onRunCallback(); } }; Proxy.prototype.onConnect = function (port) { var createdPort = this._diagnosticsBridge.createPort(port); var throttle = new Common.PortThrottler(createdPort); throttle.initialize(); this.remotePort = throttle; this.remotePort.addEventListener("message", this._onMessageCallback); }; Proxy.prototype.getUid = function () { return "uid" + (this._uid++).toString(36); }; Proxy.prototype.hideWarningSection = function () { $m("#warningSection").hide(); }; Proxy.prototype.postWarning = function (msg) { $m("#warningMessageText").text(Common.ToolWindowHelpers.loadString(msg)); $m("#warningSection").show(); }; return Proxy; })(); // trace.ts var Common; (function (Common) { "use strict"; (function (TraceEvents) { TraceEvents[TraceEvents["Timeline_Zoom_Start"] = 0x65] = "Timeline_Zoom_Start"; TraceEvents[TraceEvents["Timeline_Zoom_Stop"] = 0x66] = "Timeline_Zoom_Stop"; TraceEvents[TraceEvents["Timeline_GridSort_Start"] = 0x67] = "Timeline_GridSort_Start"; TraceEvents[TraceEvents["Timeline_GridSort_Stop"] = 0x68] = "Timeline_GridSort_Stop"; TraceEvents[TraceEvents["Timeline_LoadGraphs_Start"] = 0x69] = "Timeline_LoadGraphs_Start"; TraceEvents[TraceEvents["Timeline_LoadGraphs_Stop"] = 0x6a] = "Timeline_LoadGraphs_Stop"; TraceEvents[TraceEvents["Timeline_GridScrolled"] = 0x6b] = "Timeline_GridScrolled"; TraceEvents[TraceEvents["Timeline_GridUpdatedForTimeSelection"] = 0x6c] = "Timeline_GridUpdatedForTimeSelection"; TraceEvents[TraceEvents["Timeline_UserSelectedTimeSlice_Start"] = 0x6d] = "Timeline_UserSelectedTimeSlice_Start"; TraceEvents[TraceEvents["Timeline_UserSelectedTimeSlice_Stop"] = 0x6e] = "Timeline_UserSelectedTimeSlice_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterBackground_Start"] = 0x6f] = "Timeline_GridUpdatedForFilterBackground_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterBackground_Stop"] = 0x70] = "Timeline_GridUpdatedForFilterBackground_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterNetwork_Start"] = 0x71] = "Timeline_GridUpdatedForFilterNetwork_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterNetwork_Stop"] = 0x72] = "Timeline_GridUpdatedForFilterNetwork_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterMeasures_Start"] = 0x73] = "Timeline_GridUpdatedForFilterMeasures_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterMeasures_Stop"] = 0x74] = "Timeline_GridUpdatedForFilterMeasures_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterFrames_Start"] = 0x75] = "Timeline_GridUpdatedForFilterFrames_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterFrames_Stop"] = 0x76] = "Timeline_GridUpdatedForFilterFrames_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterName_Start"] = 0x77] = "Timeline_GridUpdatedForFilterName_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterName_Stop"] = 0x78] = "Timeline_GridUpdatedForFilterName_Stop"; TraceEvents[TraceEvents["Memory_TakeSnapshot_Start"] = 0xc9] = "Memory_TakeSnapshot_Start"; TraceEvents[TraceEvents["Memory_TakeSnapshot_Stop"] = 0xca] = "Memory_TakeSnapshot_Stop"; TraceEvents[TraceEvents["Memory_CompareSnapshot_Start"] = 0xcb] = "Memory_CompareSnapshot_Start"; TraceEvents[TraceEvents["Memory_CompareSnapshot_Stop"] = 0xcc] = "Memory_CompareSnapshot_Stop"; TraceEvents[TraceEvents["Memory_ViewSnapshot_Start"] = 0xcd] = "Memory_ViewSnapshot_Start"; TraceEvents[TraceEvents["Memory_ViewSnapshot_Stop"] = 0xce] = "Memory_ViewSnapshot_Stop"; TraceEvents[TraceEvents["Memory_GridSort_Start"] = 0xcf] = "Memory_GridSort_Start"; TraceEvents[TraceEvents["Memory_GridSort_Stop"] = 0xd0] = "Memory_GridSort_Stop"; TraceEvents[TraceEvents["Memory_DisplayFirstLevelSnapshotData_Start"] = 0xd1] = "Memory_DisplayFirstLevelSnapshotData_Start"; TraceEvents[TraceEvents["Memory_DisplayFirstLevelSnapshotData_Stop"] = 0xd2] = "Memory_DisplayFirstLevelSnapshotData_Stop"; TraceEvents[TraceEvents["Memory_ToolReady_Start"] = 0xd3] = "Memory_ToolReady_Start"; TraceEvents[TraceEvents["Memory_ToolReady_Stop"] = 0xd4] = "Memory_ToolReady_Stop"; TraceEvents[TraceEvents["Memory_GridFilterResponse_Start"] = 0xd5] = "Memory_GridFilterResponse_Start"; TraceEvents[TraceEvents["Memory_GridFilterResponse_Stop"] = 0xd6] = "Memory_GridFilterResponse_Stop"; TraceEvents[TraceEvents["Memory_UpdateObjectReferenceGraph_Start"] = 0xd7] = "Memory_UpdateObjectReferenceGraph_Start"; TraceEvents[TraceEvents["Memory_UpdateObjectReferenceGraph_Stop"] = 0xd8] = "Memory_UpdateObjectReferenceGraph_Stop"; TraceEvents[TraceEvents["Memory_ProcessingSnapshot_Start"] = 0xd9] = "Memory_ProcessingSnapshot_Start"; TraceEvents[TraceEvents["Memory_ProcessingSnapshot_Stop"] = 0xda] = "Memory_ProcessingSnapshot_Stop"; TraceEvents[TraceEvents["Memory_ProcessingDiffSnapshot_Start"] = 0xdb] = "Memory_ProcessingDiffSnapshot_Start"; TraceEvents[TraceEvents["Memory_ProcessingDiffSnapshot_Stop"] = 0xdc] = "Memory_ProcessingDiffSnapshot_Stop"; TraceEvents[TraceEvents["Debugger_StepOver_Start"] = 0x12d] = "Debugger_StepOver_Start"; TraceEvents[TraceEvents["Debugger_StepInto_Start"] = 0x12e] = "Debugger_StepInto_Start"; TraceEvents[TraceEvents["Debugger_StepOut_Start"] = 0x12f] = "Debugger_StepOut_Start"; TraceEvents[TraceEvents["Debugger_OnBreak_Start"] = 0x130] = "Debugger_OnBreak_Start"; TraceEvents[TraceEvents["Debugger_OnBreak_Stop"] = 0x131] = "Debugger_OnBreak_Stop"; TraceEvents[TraceEvents["Debugger_PrettyPrint_Start"] = 0x132] = "Debugger_PrettyPrint_Start"; TraceEvents[TraceEvents["Debugger_PrettyPrint_Stop"] = 0x133] = "Debugger_PrettyPrint_Stop"; TraceEvents[TraceEvents["Debugger_CloseDocument_Start"] = 0x136] = "Debugger_CloseDocument_Start"; TraceEvents[TraceEvents["Debugger_CloseDocument_Stop"] = 0x137] = "Debugger_CloseDocument_Stop"; TraceEvents[TraceEvents["Debugger_RevealRange_Start"] = 0x13a] = "Debugger_RevealRange_Start"; TraceEvents[TraceEvents["Debugger_RevealRange_Stop"] = 0x13b] = "Debugger_RevealRange_Stop"; TraceEvents[TraceEvents["Debugger_CallstackController_GoTo_Start"] = 0x13c] = "Debugger_CallstackController_GoTo_Start"; TraceEvents[TraceEvents["Debugger_CallstackController_GoTo_Stop"] = 0x13d] = "Debugger_CallstackController_GoTo_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetAllEnabledStates_Start"] = 0x13e] = "Debugger_BreakpointController_SetAllEnabledStates_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetAllEnabledStates_Stop"] = 0x13f] = "Debugger_BreakpointController_SetAllEnabledStates_Stop"; TraceEvents[TraceEvents["Debugger_EditorWindow_NavigateTo_Start"] = 0x140] = "Debugger_EditorWindow_NavigateTo_Start"; TraceEvents[TraceEvents["Debugger_EditorWindow_NavigateTo_Stop"] = 0x141] = "Debugger_EditorWindow_NavigateTo_Stop"; TraceEvents[TraceEvents["Debugger_Editor_SetModel_Start"] = 0x142] = "Debugger_Editor_SetModel_Start"; TraceEvents[TraceEvents["Debugger_Editor_SetModel_Stop"] = 0x143] = "Debugger_Editor_SetModel_Stop"; TraceEvents[TraceEvents["Debugger_Editor_CreateModel_Start"] = 0x144] = "Debugger_Editor_CreateModel_Start"; TraceEvents[TraceEvents["Debugger_Editor_CreateModel_Stop"] = 0x145] = "Debugger_Editor_CreateModel_Stop"; TraceEvents[TraceEvents["Debugger_Editor_Create_Start"] = 0x146] = "Debugger_Editor_Create_Start"; TraceEvents[TraceEvents["Debugger_Editor_Create_Stop"] = 0x147] = "Debugger_Editor_Create_Stop"; TraceEvents[TraceEvents["Debugger_Editor_Layout_Start"] = 0x148] = "Debugger_Editor_Layout_Start"; TraceEvents[TraceEvents["Debugger_Editor_Layout_Stop"] = 0x149] = "Debugger_Editor_Layout_Stop"; TraceEvents[TraceEvents["Debugger_Editor_ChangeViewZones_Start"] = 0x14a] = "Debugger_Editor_ChangeViewZones_Start"; TraceEvents[TraceEvents["Debugger_Editor_ChangeViewZones_Stop"] = 0x14b] = "Debugger_Editor_ChangeViewZones_Stop"; TraceEvents[TraceEvents["Debugger_Editor_RevealPosition_Start"] = 0x14c] = "Debugger_Editor_RevealPosition_Start"; TraceEvents[TraceEvents["Debugger_Editor_RevealPosition_Stop"] = 0x14d] = "Debugger_Editor_RevealPosition_Stop"; TraceEvents[TraceEvents["Debugger_Editor_SaveViewState_Start"] = 0x14e] = "Debugger_Editor_SaveViewState_Start"; TraceEvents[TraceEvents["Debugger_Editor_SaveViewState_Stop"] = 0x14f] = "Debugger_Editor_SaveViewState_Stop"; TraceEvents[TraceEvents["Debugger_Editor_RestoreViewState_Start"] = 0x150] = "Debugger_Editor_RestoreViewState_Start"; TraceEvents[TraceEvents["Debugger_Editor_RestoreViewState_Stop"] = 0x151] = "Debugger_Editor_RestoreViewState_Stop"; TraceEvents[TraceEvents["Debugger_EditorWindow_CreateDataTipFromPosition_Start"] = 0x152] = "Debugger_EditorWindow_CreateDataTipFromPosition_Start"; TraceEvents[TraceEvents["Debugger_EditorWindow_CreateDataTipFromPosition_Stop"] = 0x153] = "Debugger_EditorWindow_CreateDataTipFromPosition_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetEnabledState_Start"] = 0x154] = "Debugger_BreakpointController_SetEnabledState_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetEnabledState_Stop"] = 0x155] = "Debugger_BreakpointController_SetEnabledState_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_BreakpointChanged_Start"] = 0x156] = "Debugger_BreakpointController_BreakpointChanged_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_BreakpointChanged_Stop"] = 0x157] = "Debugger_BreakpointController_BreakpointChanged_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointWindow_BreakpointChanged_Start"] = 0x158] = "Debugger_BreakpointWindow_BreakpointChanged_Start"; TraceEvents[TraceEvents["Debugger_BreakpointWindow_BreakpointChanged_Stop"] = 0x159] = "Debugger_BreakpointWindow_BreakpointChanged_Stop"; TraceEvents[TraceEvents["Debugger_WatchWindowView_RefreshView_Start"] = 0x15a] = "Debugger_WatchWindowView_RefreshView_Start"; TraceEvents[TraceEvents["Debugger_WatchWindowView_RefreshView_Stop"] = 0x15b] = "Debugger_WatchWindowView_RefreshView_Stop"; TraceEvents[TraceEvents["Debugger_StepDocument_Start"] = 0x15c] = "Debugger_StepDocument_Start"; TraceEvents[TraceEvents["Debugger_ToggleJMC_Start"] = 0x15d] = "Debugger_ToggleJMC_Start"; TraceEvents[TraceEvents["Debugger_ToggleJMC_Stop"] = 0x15e] = "Debugger_ToggleJMC_Stop"; TraceEvents[TraceEvents["Debugger_ToggleCallstackLibraryFrames_Start"] = 0x15f] = "Debugger_ToggleCallstackLibraryFrames_Start"; TraceEvents[TraceEvents["Debugger_ToggleCallstackLibraryFrames_Stop"] = 0x160] = "Debugger_ToggleCallstackLibraryFrames_Stop"; TraceEvents[TraceEvents["Debugger_SpecifyUrlAsJMCType_Start"] = 0x161] = "Debugger_SpecifyUrlAsJMCType_Start"; TraceEvents[TraceEvents["Debugger_SpecifyUrlAsJMCType_Stop"] = 0x162] = "Debugger_SpecifyUrlAsJMCType_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_DataLoad_Start"] = 0x163] = "Debugger_Persistence_DataLoad_Start"; TraceEvents[TraceEvents["Debugger_Persistence_DataLoad_Stop"] = 0x164] = "Debugger_Persistence_DataLoad_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_AddBreakpoints_Start"] = 0x165] = "Debugger_Persistence_AddBreakpoints_Start"; TraceEvents[TraceEvents["Debugger_Persistence_AddBreakpoints_Stop"] = 0x166] = "Debugger_Persistence_AddBreakpoints_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_AddWatches_Start"] = 0x167] = "Debugger_Persistence_AddWatches_Start"; TraceEvents[TraceEvents["Debugger_Persistence_AddWatches_Stop"] = 0x168] = "Debugger_Persistence_AddWatches_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_TabOpen_Start"] = 0x169] = "Debugger_Persistence_TabOpen_Start"; TraceEvents[TraceEvents["Debugger_Persistence_TabOpen_Stop"] = 0x16a] = "Debugger_Persistence_TabOpen_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_SaveState_Start"] = 0x16b] = "Debugger_Persistence_SaveState_Start"; TraceEvents[TraceEvents["Debugger_Persistence_SaveState_Stop"] = 0x16c] = "Debugger_Persistence_SaveState_Stop"; TraceEvents[TraceEvents["Debugger_SourceMap_ToggleSourceMap_Start"] = 0x16d] = "Debugger_SourceMap_ToggleSourceMap_Start"; TraceEvents[TraceEvents["Debugger_SourceMap_ToggleSourceMap_Stop"] = 0x16e] = "Debugger_SourceMap_ToggleSourceMap_Stop"; TraceEvents[TraceEvents["Debugger_SourceMap_ParseSourceMapAsync_Start"] = 0x16f] = "Debugger_SourceMap_ParseSourceMapAsync_Start"; TraceEvents[TraceEvents["Debugger_SourceMap_ParseSourceMapAsync_Stop"] = 0x170] = "Debugger_SourceMap_ParseSourceMapAsync_Stop"; TraceEvents[TraceEvents["Debugger_Editor_GetOrCreateMode_Start"] = 0x171] = "Debugger_Editor_GetOrCreateMode_Start"; TraceEvents[TraceEvents["Debugger_Editor_GetOrCreateMode_Stop"] = 0x172] = "Debugger_Editor_GetOrCreateMode_Stop"; TraceEvents[TraceEvents["Debugger_OnAddDocuments_Info"] = 0x173] = "Debugger_OnAddDocuments_Info"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Build_Start"] = 0x174] = "Debugger_Intellisense_ListBox_Build_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Build_Stop"] = 0x175] = "Debugger_Intellisense_ListBox_Build_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Reset_Start"] = 0x176] = "Debugger_Intellisense_ListBox_Reset_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Reset_Stop"] = 0x177] = "Debugger_Intellisense_ListBox_Reset_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Filter_Start"] = 0x178] = "Debugger_Intellisense_Menu_Filter_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Filter_Stop"] = 0x179] = "Debugger_Intellisense_Menu_Filter_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Layout_Start"] = 0x17a] = "Debugger_Intellisense_Menu_Layout_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Layout_Stop"] = 0x17b] = "Debugger_Intellisense_Menu_Layout_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Expression_Start"] = 0x17c] = "Debugger_Intellisense_Provider_Get_Expression_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Expression_Stop"] = 0x17d] = "Debugger_Intellisense_Provider_Get_Expression_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Update_Start"] = 0x17e] = "Debugger_Intellisense_Provider_Update_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Update_Stop"] = 0x17f] = "Debugger_Intellisense_Provider_Update_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Items_Start"] = 0x180] = "Debugger_Intellisense_Provider_Get_Items_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Items_Stop"] = 0x181] = "Debugger_Intellisense_Provider_Get_Items_Stop"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Start"] = 0x182] = "Debugger_AsyncStackProvider_GetFrames_Start"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Stop"] = 0x183] = "Debugger_AsyncStackProvider_GetFrames_Stop"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Timeout"] = 0x184] = "Debugger_AsyncStackProvider_GetFrames_Timeout"; TraceEvents[TraceEvents["Console_Window_Create_Start"] = 0x191] = "Console_Window_Create_Start"; TraceEvents[TraceEvents["Console_Window_Create_Stop"] = 0x192] = "Console_Window_Create_Stop"; TraceEvents[TraceEvents["Console_Attach_Start"] = 0x193] = "Console_Attach_Start"; TraceEvents[TraceEvents["Console_Attach_Stop"] = 0x194] = "Console_Attach_Stop"; TraceEvents[TraceEvents["Console_Message_Start"] = 0x195] = "Console_Message_Start"; TraceEvents[TraceEvents["Console_Message_Stop"] = 0x196] = "Console_Message_Stop"; TraceEvents[TraceEvents["Console_Input_Start"] = 0x197] = "Console_Input_Start"; TraceEvents[TraceEvents["Console_Input_Stop"] = 0x198] = "Console_Input_Stop"; TraceEvents[TraceEvents["Console_Output_Start"] = 0x199] = "Console_Output_Start"; TraceEvents[TraceEvents["Console_Output_Stop"] = 0x19a] = "Console_Output_Stop"; TraceEvents[TraceEvents["Console_Output_Render_Start"] = 0x19b] = "Console_Output_Render_Start"; TraceEvents[TraceEvents["Console_Output_Render_Stop"] = 0x19c] = "Console_Output_Render_Stop"; TraceEvents[TraceEvents["Console_Item_Toggle_Start"] = 0x19d] = "Console_Item_Toggle_Start"; TraceEvents[TraceEvents["Console_Item_Toggle_Stop"] = 0x19e] = "Console_Item_Toggle_Stop"; TraceEvents[TraceEvents["Console_HtmlLines_Expand_Start"] = 0x19f] = "Console_HtmlLines_Expand_Start"; TraceEvents[TraceEvents["Console_HtmlLines_Expand_Stop"] = 0x1a0] = "Console_HtmlLines_Expand_Stop"; TraceEvents[TraceEvents["Console_Context_Menu_Loading_Start"] = 0x1a1] = "Console_Context_Menu_Loading_Start"; TraceEvents[TraceEvents["Console_Context_Menu_Loading_Stop"] = 0x1a2] = "Console_Context_Menu_Loading_Stop"; TraceEvents[TraceEvents["Console_Scroll_Start"] = 0x1a3] = "Console_Scroll_Start"; TraceEvents[TraceEvents["Console_Scroll_Stop"] = 0x1a4] = "Console_Scroll_Stop"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Build_Start"] = 0x1a5] = "Console_Intellisense_ListBox_Build_Start"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Build_Stop"] = 0x1a6] = "Console_Intellisense_ListBox_Build_Stop"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Reset_Start"] = 0x1a7] = "Console_Intellisense_ListBox_Reset_Start"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Reset_Stop"] = 0x1a8] = "Console_Intellisense_ListBox_Reset_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Filter_Start"] = 0x1a9] = "Console_Intellisense_Menu_Filter_Start"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Filter_Stop"] = 0x1aa] = "Console_Intellisense_Menu_Filter_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Layout_Start"] = 0x1ab] = "Console_Intellisense_Menu_Layout_Start"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Layout_Stop"] = 0x1ac] = "Console_Intellisense_Menu_Layout_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Expression_Start"] = 0x1ad] = "Console_Intellisense_Provider_Get_Expression_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Expression_Stop"] = 0x1ae] = "Console_Intellisense_Provider_Get_Expression_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Update_Start"] = 0x1af] = "Console_Intellisense_Provider_Update_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Update_Stop"] = 0x1b0] = "Console_Intellisense_Provider_Update_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Items_Start"] = 0x1b1] = "Console_Intellisense_Provider_Get_Items_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Items_Stop"] = 0x1b2] = "Console_Intellisense_Provider_Get_Items_Stop"; TraceEvents[TraceEvents["Dom_Window_Create_Start"] = 501] = "Dom_Window_Create_Start"; TraceEvents[TraceEvents["Dom_Window_Create_Stop"] = 502] = "Dom_Window_Create_Stop"; TraceEvents[TraceEvents["Dom_ExpandNode_Start"] = 503] = "Dom_ExpandNode_Start"; TraceEvents[TraceEvents["Dom_ExpandNode_Stop"] = 504] = "Dom_ExpandNode_Stop"; TraceEvents[TraceEvents["Dom_UndoRedo_Start"] = 505] = "Dom_UndoRedo_Start"; TraceEvents[TraceEvents["Dom_UndoRedo_Stop"] = 506] = "Dom_UndoRedo_Stop"; TraceEvents[TraceEvents["Dom_DragDrop_Start"] = 507] = "Dom_DragDrop_Start"; TraceEvents[TraceEvents["Dom_DragDrop_Stop"] = 508] = "Dom_DragDrop_Stop"; TraceEvents[TraceEvents["Dom_AddAttribute_Start"] = 509] = "Dom_AddAttribute_Start"; TraceEvents[TraceEvents["Dom_AddAttribute_Stop"] = 510] = "Dom_AddAttribute_Stop"; TraceEvents[TraceEvents["Dom_Intellisense_Start"] = 511] = "Dom_Intellisense_Start"; TraceEvents[TraceEvents["Dom_Intellisense_Stop"] = 512] = "Dom_Intellisense_Stop"; TraceEvents[TraceEvents["Dom_SelectElement_Start"] = 513] = "Dom_SelectElement_Start"; TraceEvents[TraceEvents["Dom_SelectElement_Stop"] = 514] = "Dom_SelectElement_Stop"; TraceEvents[TraceEvents["Dom_CutElement_Start"] = 515] = "Dom_CutElement_Start"; TraceEvents[TraceEvents["Dom_CutElement_Stop"] = 516] = "Dom_CutElement_Stop"; TraceEvents[TraceEvents["Dom_PasteElement_Start"] = 517] = "Dom_PasteElement_Start"; TraceEvents[TraceEvents["Dom_PasteElement_Stop"] = 518] = "Dom_PasteElement_Stop"; TraceEvents[TraceEvents["Dom_CollapseElement_Start"] = 519] = "Dom_CollapseElement_Start"; TraceEvents[TraceEvents["Dom_CollapseElement_Stop"] = 520] = "Dom_CollapseElement_Stop"; TraceEvents[TraceEvents["Dom_StylesTabLoad_Start"] = 521] = "Dom_StylesTabLoad_Start"; TraceEvents[TraceEvents["Dom_StylesTabLoad_Stop"] = 522] = "Dom_StylesTabLoad_Stop"; TraceEvents[TraceEvents["Dom_StylesTab_Intellisense_Start"] = 523] = "Dom_StylesTab_Intellisense_Start"; TraceEvents[TraceEvents["Dom_StylesTab_Intellisense_Stop"] = 524] = "Dom_StylesTab_Intellisense_Stop"; TraceEvents[TraceEvents["Dom_TreeItemExpand_Start"] = 525] = "Dom_TreeItemExpand_Start"; TraceEvents[TraceEvents["Dom_TreeItemExpand_Stop"] = 526] = "Dom_TreeItemExpand_Stop"; TraceEvents[TraceEvents["Dom_ComputedTabLoad_Start"] = 527] = "Dom_ComputedTabLoad_Start"; TraceEvents[TraceEvents["Dom_ComputedTabLoad_Stop"] = 528] = "Dom_ComputedTabLoad_Stop"; TraceEvents[TraceEvents["Dom_ChangesTabLoad_Start"] = 529] = "Dom_ChangesTabLoad_Start"; TraceEvents[TraceEvents["Dom_ChangesTabLoad_Stop"] = 530] = "Dom_ChangesTabLoad_Stop"; TraceEvents[TraceEvents["Dom_LayoutTabLoad_Start"] = 531] = "Dom_LayoutTabLoad_Start"; TraceEvents[TraceEvents["Dom_LayoutTabLoad_Stop"] = 532] = "Dom_LayoutTabLoad_Stop"; TraceEvents[TraceEvents["Dom_EventsTabLoad_Start"] = 533] = "Dom_EventsTabLoad_Start"; TraceEvents[TraceEvents["Dom_EventsTabLoad_Stop"] = 534] = "Dom_EventsTabLoad_Stop"; TraceEvents[TraceEvents["Dom_TreeItemCollapse_Start"] = 535] = "Dom_TreeItemCollapse_Start"; TraceEvents[TraceEvents["Dom_TreeItemCollapse_Stop"] = 536] = "Dom_TreeItemCollapse_Stop"; TraceEvents[TraceEvents["Dom_Search_Start"] = 537] = "Dom_Search_Start"; TraceEvents[TraceEvents["Dom_Search_Stop"] = 538] = "Dom_Search_Stop"; TraceEvents[TraceEvents["Dom_RemoteInjection_Start"] = 539] = "Dom_RemoteInjection_Start"; TraceEvents[TraceEvents["Dom_RemoteInjection_Stop"] = 540] = "Dom_RemoteInjection_Stop"; TraceEvents[TraceEvents["Dom_EnterEditAsHtml_Start"] = 541] = "Dom_EnterEditAsHtml_Start"; TraceEvents[TraceEvents["Dom_EnterEditAsHtml_Stop"] = 542] = "Dom_EnterEditAsHtml_Stop"; TraceEvents[TraceEvents["Dom_CommitEditAsHtml_Start"] = 543] = "Dom_CommitEditAsHtml_Start"; TraceEvents[TraceEvents["Dom_CommitEditAsHtml_Stop"] = 544] = "Dom_CommitEditAsHtml_Stop"; TraceEvents[TraceEvents["Dom_CommitEditAttribute_Start"] = 545] = "Dom_CommitEditAttribute_Start"; TraceEvents[TraceEvents["Dom_CommitEditAttribute_Stop"] = 546] = "Dom_CommitEditAttribute_Stop"; TraceEvents[TraceEvents["Dom_ShowColorPicker_Start"] = 547] = "Dom_ShowColorPicker_Start"; TraceEvents[TraceEvents["Dom_ShowColorPicker_Stop"] = 548] = "Dom_ShowColorPicker_Stop"; TraceEvents[TraceEvents["Dom_HideColorPicker_Start"] = 549] = "Dom_HideColorPicker_Start"; TraceEvents[TraceEvents["Dom_HideColorPicker_Stop"] = 550] = "Dom_HideColorPicker_Stop"; TraceEvents[TraceEvents["Dom_SetColorUsingColorPicker_Start"] = 551] = "Dom_SetColorUsingColorPicker_Start"; TraceEvents[TraceEvents["Dom_SetColorUsingColorPicker_Stop"] = 552] = "Dom_SetColorUsingColorPicker_Stop"; TraceEvents[TraceEvents["Emulation_Window_Create_Start"] = 0x259] = "Emulation_Window_Create_Start"; TraceEvents[TraceEvents["Emulation_Window_Create_Stop"] = 0x25a] = "Emulation_Window_Create_Stop"; TraceEvents[TraceEvents["Generic_Debug_1_Start"] = 0x2bd] = "Generic_Debug_1_Start"; TraceEvents[TraceEvents["Generic_Debug_1_Stop"] = 0x2be] = "Generic_Debug_1_Stop"; TraceEvents[TraceEvents["Generic_Debug_2_Start"] = 0x2bf] = "Generic_Debug_2_Start"; TraceEvents[TraceEvents["Generic_Debug_2_Stop"] = 0x2c0] = "Generic_Debug_2_Stop"; TraceEvents[TraceEvents["Generic_Debug_3_Start"] = 0x2c1] = "Generic_Debug_3_Start"; TraceEvents[TraceEvents["Generic_Debug_3_Stop"] = 0x2c2] = "Generic_Debug_3_Stop"; TraceEvents[TraceEvents["Generic_Debug_4_Start"] = 0x2c3] = "Generic_Debug_4_Start"; TraceEvents[TraceEvents["Generic_Debug_4_Stop"] = 0x2c4] = "Generic_Debug_4_Stop"; TraceEvents[TraceEvents["Generic_Debug_5_Start"] = 0x2c5] = "Generic_Debug_5_Start"; TraceEvents[TraceEvents["Generic_Debug_5_Stop"] = 0x2c6] = "Generic_Debug_5_Stop"; TraceEvents[TraceEvents["Generic_Debug_6_Start"] = 0x2c7] = "Generic_Debug_6_Start"; TraceEvents[TraceEvents["Generic_Debug_6_Stop"] = 0x2c8] = "Generic_Debug_6_Stop"; TraceEvents[TraceEvents["Generic_Debug_7_Start"] = 0x2c9] = "Generic_Debug_7_Start"; TraceEvents[TraceEvents["Generic_Debug_7_Stop"] = 0x2ca] = "Generic_Debug_7_Stop"; TraceEvents[TraceEvents["Generic_Debug_8_Start"] = 0x2cb] = "Generic_Debug_8_Start"; TraceEvents[TraceEvents["Generic_Debug_8_Stop"] = 0x2cc] = "Generic_Debug_8_Stop"; TraceEvents[TraceEvents["Generic_Debug_9_Start"] = 0x2cd] = "Generic_Debug_9_Start"; TraceEvents[TraceEvents["Generic_Debug_9_Stop"] = 0x2ce] = "Generic_Debug_9_Stop"; TraceEvents[TraceEvents["Header_InitializeTabs_Start"] = 0x321] = "Header_InitializeTabs_Start"; TraceEvents[TraceEvents["Header_InitializeTabs_Stop"] = 0x322] = "Header_InitializeTabs_Stop"; })(Common.TraceEvents || (Common.TraceEvents = {})); var TraceEvents = Common.TraceEvents; (function (TraceEventsWithKey) { TraceEventsWithKey[TraceEventsWithKey["Debugger_OpenDocument_Start"] = 0x134] = "Debugger_OpenDocument_Start"; TraceEventsWithKey[TraceEventsWithKey["Debugger_OpenDocument_Stop"] = 0x135] = "Debugger_OpenDocument_Stop"; TraceEventsWithKey[TraceEventsWithKey["Debugger_SwitchDocument_Start"] = 0x138] = "Debugger_SwitchDocument_Start"; TraceEventsWithKey[TraceEventsWithKey["Debugger_SwitchDocument_Stop"] = 0x139] = "Debugger_SwitchDocument_Stop"; })(Common.TraceEventsWithKey || (Common.TraceEventsWithKey = {})); var TraceEventsWithKey = Common.TraceEventsWithKey; var DefaultTraceWriter = (function () { function DefaultTraceWriter() { } DefaultTraceWriter.prototype.raiseEvent = function (eventId) { }; DefaultTraceWriter.prototype.raiseEventWithMessage = function (eventId, traceMessage) { }; DefaultTraceWriter.prototype.raiseEventWithKey = function (eventId, key, traceMessage) { }; return DefaultTraceWriter; })(); Common.DefaultTraceWriter = DefaultTraceWriter; var TraceWriter = (function () { function TraceWriter(performanceTracer) { if (!performanceTracer && Plugin) { if (Plugin.F12) { performanceTracer = Plugin.F12.TraceWriter; } else if (Plugin.VS) { performanceTracer = Plugin.VS.Utilities.createExternalObject("PerformanceTraceExtension", "{D76A409F-7234-4B71-9BFD-DEF3DC4CCCA6}"); } } this._performanceTracer = performanceTracer; } TraceWriter.prototype.raiseEventWithKey = function (eventId, key, traceMessage) { if (this._performanceTracer) { this._performanceTracer.raiseEventWithKey(eventId, key, traceMessage); } }; TraceWriter.prototype.raiseEventWithMessage = function (eventId, traceMessage) { if (this._performanceTracer) { this._performanceTracer.raiseEvent(eventId, traceMessage); } }; TraceWriter.prototype.raiseEvent = function (eventId) { this.raiseEventWithMessage(eventId, ""); }; return TraceWriter; })(); Common.TraceWriter = TraceWriter; })(Common || (Common = {})); // htmlTreeView.ts "use strict"; var HtmlTreeView = (function () { function HtmlTreeView() { } Object.defineProperty(HtmlTreeView, "first", { get: function () { return $m("#tree").find(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); }, enumerable: true, configurable: true }); Object.defineProperty(HtmlTreeView, "last", { get: function () { return $m("#tree").find(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").last(); }, enumerable: true, configurable: true }); HtmlTreeView.init = function (item, treeChangeCallBack, traceWriter) { HtmlTreeView.TreeChangeCallBack = treeChangeCallBack; HtmlTreeView.TraceWriter = traceWriter; var rootElement = $m("
    ").addClass("BPT-HtmlTree"); item.append(rootElement); var useDarkTheme = Common.ToolWindowHelpers.isDarkThemeBackground(rootElement); if (useDarkTheme) { rootElement.addClass("BPT-Tree-DarkTheme"); } else { rootElement.removeClass("BPT-Tree-DarkTheme"); } if (!rootElement.data("attachedHandlers")) { var container = rootElement.parent(".BPT-HtmlTree-Container"); container.bind("mousedown", function HtmlTreeView$mousedown(event) { $m(this).data("mouseActivate", true); var element = $m(event.target); if (element.hasClass("BPT-HtmlTree-ChildCollection-ShowAll")) { return; } var row = element.closest(".BPT-HtmlTreeItem"); if (row.length > 0) { row = HtmlTreeView.findChildByClickProximity(row, event); var selectedElement = HtmlTreeView.getSelected(row); var focusAndScrollIntoView = row.get(0) !== selectedElement.get(0); HtmlTreeView.select(row, focusAndScrollIntoView); } }); container.bind("click", function HtmlTreeView$click(event) { var element = $m(event.target); if (element.hasClass("BPT-HtmlTree-ChildCollection-ShowAll")) { return; } }); container.bind("mousedown", function HtmlTreeView$click(event) { var element = $m(event.target); if (element.hasClass("BPT-HtmlTreeItem-ExpandIcon")) { var row = element.closest(".BPT-HtmlTreeItem"); if (row.length > 0) { HtmlTreeView.toggle(row); } } }); container.bind("dblclick", function HtmlTreeView$dblclick(event) { var element = $m(event.target); var item = element.closest(".BPT-HtmlTreeItem, .BPT-HTML-Attribute-Section, .BPT-HTML-Attribute, .BPT-HTML-Text, .BPT-HtmlTree-ChildCollection-Pager"); if (item.length > 0) { if (item.hasClass("BPT-HtmlTreeItem")) { if (item.hasClass("BPT-HtmlTreeItem-Collapsed") || item.hasClass("BPT-HtmlTreeItem-Expanded")) { if (!element.hasClass("BPT-HtmlTreeItem-ExpandIcon")) { HtmlTreeView.toggle(item); } } } else if (item.hasClass("BPT-HTML-Attribute-Section") || item.hasClass("BPT-HTML-Attribute") || item.hasClass("BPT-HTML-Text")) { var row = item.parents(".BPT-HtmlTreeItem").first(); if (row.length > 0) { var editCallback = row.data("editCallback"); editCallback = (editCallback ? editCallback : row.parent().data("editCallback")); if (editCallback) { editCallback(row, item); event.stopPropagation(); } } } } }); container.bind("focus", function HtmlTreeView$focus(event) { var element = $m(this); if (!element.data("mouseActivate")) { var selected = HtmlTreeView.getSelected(element.children(".BPT-HtmlTree")); if (selected.length === 0) { selected = HtmlTreeView.select(element.find(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first()); } HtmlTreeView.focusSelected(); var wasScrolled = HtmlTreeView.scrollItemIntoView(selected); if (wasScrolled) { event.preventDefault(); return false; } } event.preventDefault(); element.data("mouseActivate", false); }); container.bind("keydown", function HtmlTreeView$keydown(event) { if ($m("#tree").find(".BPT-EditBox").length > 0) { return true; } var noKeys = !event.shiftKey && !event.ctrlKey && !event.altKey; var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; var ctrlKey = event.ctrlKey && !event.shiftKey && !event.altKey; if (event.keyCode >= 37 /* ArrowFirst */ && event.keyCode <= 40 /* ArrowLast */ && noKeys) { var activeElement = document.activeElement; if (activeElement && activeElement.type === "text") { return; } var selected = HtmlTreeView.getSelected($m(this).children().first()); var moveUp = function HtmlTreeView$keydown$moveUp(toParent) { var newElement = HtmlTreeView.findNextElementUp(selected, toParent); if (newElement && newElement.length > 0) { HtmlTreeView.select(newElement); event.preventDefault(); return false; } }; var moveDown = function HtmlTreeView$keydown$moveDown() { var newElement = HtmlTreeView.findNextElementDown(selected); if (newElement && newElement.length > 0) { HtmlTreeView.select(newElement); event.preventDefault(); return false; } }; if (selected.length > 0) { switch (event.keyCode) { case 37 /* ArrowLeft */: if (selected.hasClass("BPT-HtmlTreeItem-Expanded")) { HtmlTreeView.toggle(selected); } else { moveUp(true); } break; case 38 /* ArrowUp */: moveUp(); break; case 39 /* ArrowRight */: if (selected.hasClass("BPT-HtmlTreeItem-Collapsed")) { HtmlTreeView.toggle(selected); } else if (selected.hasClass("BPT-HtmlTreeItem-Expanded")) { moveDown(); } break; case 40 /* ArrowDown */: moveDown(); break; } } else { selected = $m("#tree"); moveDown(); } event.preventDefault(); return false; } else if (event.keyCode === 32 /* Space */ && noKeys) { var selectedNode = HtmlTreeView.getSelected($m(this).children().first()); var isShowAllLink = selectedNode.hasClass("BPT-HtmlTree-ChildCollection-ShowAll"); if (isShowAllLink) { selectedNode.click(); event.stopPropagation(); return false; } if (document.activeElement && document.activeElement.type !== "text") { event.preventDefault(); return false; } } else if (event.keyCode === 13 /* Enter */ && (noKeys || ctrlKey)) { var editAsHtml = ctrlKey; if (document.activeElement && document.activeElement.type !== "text") { var selectedNode = HtmlTreeView.getSelected($m(this).children().first()); var isShowAllLink = selectedNode.hasClass("BPT-HtmlTree-ChildCollection-ShowAll"); if (isShowAllLink) { selectedNode.click(); event.stopPropagation(); return false; } var editCallback = selectedNode.data("editCallback"); editCallback = (editCallback ? editCallback : selectedNode.parent().data("editCallback")); if (editCallback) { editCallback(selectedNode, null, editAsHtml); event.stopPropagation(); return false; } } } else if ((event.keyCode === 36 /* Home */ || event.keyCode === 35 /* End */) && (noKeys || ctrlKey)) { var newElement = event.keyCode === 36 /* Home */ ? HtmlTreeView.first : HtmlTreeView.last; if (newElement && newElement.length > 0) { HtmlTreeView.select(newElement); event.preventDefault(); return false; } } }); container = null; rootElement.data("attachedHandlers", true); } return this; }; HtmlTreeView.scrollItemIntoView = function (item) { if (!item || !item.length) { return false; } var isShowAllLink = item.hasClass("BPT-HtmlTree-ChildCollection-ShowAll"); if (isShowAllLink) { return Common.ToolWindowHelpers.scrollIntoView(item.get(0), item.closest(".BPT-HtmlTree-ScrollContainer").get(0)); } else { return Common.ToolWindowHelpers.scrollIntoView(item.children(".BPT-HtmlTreeItem-Header").get(0), item.closest(".BPT-HtmlTree-ScrollContainer").get(0)); } }; HtmlTreeView.findNextElementUp = function (item, toParent) { var newElement = null; var sibling = item.prev(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").last(); if (sibling.length > 0 && !toParent) { newElement = sibling.find(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").last(); if (newElement.length === 0) { newElement = sibling; } } else { newElement = item.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); } return newElement; }; HtmlTreeView.findNextElementDown = function (item) { var newElement = item.find(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); newElement = (newElement.length > 0 ? newElement : item.next(".BPT-HtmlTreeItem").first()); var searchedParent = item; while (newElement.length === 0) { searchedParent = searchedParent.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); if (searchedParent.length === 0) { break; } newElement = searchedParent.next(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); } return newElement; }; HtmlTreeView.destroy = function (item) { if (item.data("attachedHandlers")) { item.children(".BPT-HtmlTree-Container").unbind(".htmlTreeView"); item.data("attachedHandlers", false); } }; HtmlTreeView.addRootElement = function (item, uid, tag, rootTagToShow, toggleCallback, editCallback, selectCallback) { if (toggleCallback) { item.data("toggleCallback", toggleCallback); } var newElements = [{ uid: uid, tag: tag, text: "", hasChildren: (toggleCallback ? true : false), attributes: null, rootTagToShow: rootTagToShow }]; return HtmlTreeView.addElements(item, newElements, toggleCallback, editCallback, selectCallback).children().first(); }; HtmlTreeView.addElements = function (item, elements, toggleCallback, editCallback, selectCallback, keepExistingElements, stopAutoScroll, virtualElementCount) { if (typeof keepExistingElements === "undefined") { keepExistingElements = false; } if (typeof stopAutoScroll === "undefined") { stopAutoScroll = false; } var childrenCollection = document.createElement("div"); childrenCollection.classList.add("BPT-HtmlTree-ChildCollection"); var isShowingAll = true; var elementCount = virtualElementCount || elements.length; if (!item.data("forceShowAll")) { if (elementCount > HtmlTreeView.InitialElementLimit) { elementCount = HtmlTreeView.InitialElementLimit; isShowingAll = false; } } var existingIdMap = {}; if (keepExistingElements) { var existingElements = item.children(".BPT-HtmlTree-ChildCollection").children(); for (var elementIndex = 0; elementIndex < existingElements.length; elementIndex++) { var uid = $m(existingElements.get(elementIndex)).attr("data-id"); existingIdMap[uid] = true; } } var whitespaceRegex = /^\s+|\s+$/; for (var i = 0, len = elements.length; i < len; i++) { var id = elements[i].uid; var tag = elements[i].tag; var text = elements[i].text; var isExpandable = elements[i].hasChildren; var attributes = elements[i].attributes; var rootTagToShow = elements[i].rootTagToShow; if (!tag && (!text || !text.replace(whitespaceRegex, ""))) { continue; } if (keepExistingElements && existingIdMap[id]) { var replaceMe = document.createElement("div"); replaceMe.classList.add("replaceMe"); replaceMe.setAttribute("data-id", id); childrenCollection.appendChild(replaceMe); continue; } var header = document.createElement("span"); var footer = document.createElement("span"); var collapsedFooter = document.createElement("span"); if (tag === "#document") { header.classList.add("BPT-HTML-Document"); footer.classList.add("BPT-HTML-Document"); collapsedFooter.classList.add("BPT-HTML-Document"); if (rootTagToShow) { var tagName = document.createElement("span"); tagName.classList.add("BPT-HTML-Tag"); tagName.appendChild(document.createTextNode(rootTagToShow)); header.appendChild(tagName); var endTagName = document.createElement("span"); endTagName.classList.add("BPT-HTML-Tag"); endTagName.appendChild(document.createTextNode(rootTagToShow)); footer.appendChild(endTagName); var collapsedEndTagName = document.createElement("span"); collapsedEndTagName.classList.add("BPT-HTML-Tag"); collapsedEndTagName.appendChild(document.createTextNode(rootTagToShow)); collapsedFooter.appendChild(collapsedEndTagName); } } else if (tag === "#doctype") { header.classList.add("BPT-HTML-DocType"); footer.classList.add("BPT-HTML-DocType"); collapsedFooter.classList.add("BPT-HTML-DocType"); } else if (tag === "#comment") { header.classList.add("BPT-HTML-Comment"); header.appendChild(document.createTextNode("")); collapsedFooter.classList.add("BPT-HTML-Comment"); collapsedFooter.appendChild(document.createTextNode("-->")); } else if (tag === null || tag === undefined) { footer.classList.add("BPT-HTML-Text"); collapsedFooter.classList.add("BPT-HTML-Text"); } else { var openTagName = document.createElement("span"); openTagName.classList.add("BPT-HTML-Tag"); openTagName.appendChild(document.createTextNode(tag)); header.appendChild(openTagName); if (attributes && attributes.length > 0) { for (var j = 0; j < attributes.length; j++) { var attrName = attributes[j].name; var attributeSection = document.createElement("span"); attributeSection.classList.add("BPT-HTML-Attribute-Section"); attributeSection.setAttribute("data-attrName", attrName); var attributeNode = document.createElement("span"); attributeNode.classList.add("BPT-HTML-Attribute"); attributeNode.appendChild(document.createTextNode(attrName)); attributeSection.appendChild(attributeNode); var attrValue = HtmlTreeView.prepareAttributeValueForDisplay(attributes[j].value); var attributeValue = document.createElement("span"); attributeValue.classList.add("BPT-HTML-Value"); attributeValue.appendChild(document.createTextNode(attrValue)); attributeSection.appendChild(attributeValue); header.appendChild(attributeSection); } } var endTagName = document.createElement("span"); endTagName.classList.add("BPT-HTML-Tag"); endTagName.appendChild(document.createTextNode(tag)); footer.appendChild(endTagName); var collapsedEndTagName = document.createElement("span"); collapsedEndTagName.classList.add("BPT-HTML-Tag"); collapsedEndTagName.appendChild(document.createTextNode(tag)); collapsedFooter.appendChild(collapsedEndTagName); } var textContent = undefined; if (text) { textContent = document.createElement("span"); textContent.classList.add("BPT-HTML-Text"); textContent.appendChild(document.createTextNode(text)); } var collapsedFooterElement = document.createElement("span"); collapsedFooterElement.classList.add("BPT-HtmlTreeItem-CollapsedFooter"); if (isExpandable) { var ellipsesElement = document.createElement("span"); ellipsesElement.classList.add("BPT-HtmlTreeItem-Ellipsis"); ellipsesElement.appendChild(document.createTextNode("...")); collapsedFooterElement.appendChild(ellipsesElement); } var collapsedFooterContainer = document.createElement("span"); collapsedFooterContainer.classList.add("BPT-HTML"); collapsedFooterContainer.appendChild(collapsedFooter); collapsedFooterElement.appendChild(collapsedFooterContainer); var newElement = document.createElement("div"); newElement.classList.add("BPT-HtmlTreeItem"); newElement.setAttribute("data-id", id); newElement.setAttribute("data-tag", tag ? tag : "#text"); var headerElement = document.createElement("div"); headerElement.classList.add("BPT-HtmlTreeItem-Header"); if (tag === "#document" && !rootTagToShow) { textContent = undefined; collapsedFooterElement = undefined; newElement.classList.add("BPT-HtmlTreeItem-HiddenRoot"); newElement.classList.add("BPT-HtmlTreeItem-Collapsed"); } else if (isExpandable) { newElement.classList.add("BPT-HtmlTreeItem-Collapsed"); var expandIcon = document.createElement("div"); expandIcon.classList.add("BPT-HtmlTreeItem-ExpandIcon"); newElement.appendChild(expandIcon); headerElement.setAttribute("role", "group"); headerElement.setAttribute("aria-expanded", "false"); HtmlTreeView.addDOMAttrModifiedHandler(headerElement); } else { headerElement.setAttribute("role", "treeitem"); } if (item.attr("data-tag") === "NodeList" || item.attr("data-tag") === "HtmlCollection") { var textElement = document.createElement("span"); textElement.classList.add("BPT-HTML"); textElement.classList.add("BPT-HTML-Text"); textElement.classList.add("BPT-HTML-Numbering"); textElement.appendChild(document.createTextNode(i + "")); headerElement.appendChild(textElement); } var headerSub = document.createElement("span"); headerSub.classList.add("BPT-HTML"); headerSub.appendChild(header); if (textContent) { headerSub.appendChild(textContent); } headerElement.appendChild(headerSub); if (collapsedFooterElement) { headerElement.appendChild(collapsedFooterElement); } newElement.appendChild(headerElement); var footerElement = document.createElement("div"); footerElement.classList.add("BPT-HtmlTreeItem-Footer"); var footerWrapper = document.createElement("span"); footerWrapper.classList.add("BPT-HTML"); footerWrapper.appendChild(footer); footerElement.appendChild(footerWrapper); newElement.appendChild(footerElement); childrenCollection.appendChild(newElement); } var children = $m(childrenCollection); if (!isShowingAll) { var fullNumber = virtualElementCount; if (!fullNumber) { fullNumber = elements.length; } children.append($m("
    ").attr("role", "button").addClass("BPT-HtmlTree-ChildCollection-ShowAll").addClass("BPT-HtmlTreeItem").appendText(elementCount + " ... " + fullNumber)); } if (toggleCallback || editCallback || selectCallback) { children.data("toggleCallback", toggleCallback); children.data("editCallback", editCallback); children.data("selectCallback", selectCallback); } var isFirstRow = !(item.hasClass("BPT-HtmlTreeItem")); if (isFirstRow) { item.children(".BPT-HtmlTree").append(children); } else { if (keepExistingElements) { var existingChildrenCollection = item.children(".BPT-HtmlTree-ChildCollection"); if (existingChildrenCollection.length > 0) { var replaceableChildren = children.children(".replaceMe"); for (var index = 0; index < replaceableChildren.length; index++) { var replaceableChild = $m(replaceableChildren.get(index)); var idToReplace = replaceableChild.attr("data-id"); var existingElement = existingChildrenCollection.children(".BPT-HtmlTreeItem").matchAttr("data-id", idToReplace); replaceableChild.replaceWith(existingElement); } var selectedId = HtmlTreeView.getSelected(item).attr("data-id"); if (selectedId && existingIdMap[selectedId]) { var found = children.children().matchAttr("data-id", selectedId); if (found.length === 0) { HtmlTreeView.select(item.closest(".BPT-HtmlTreeItem")); } } existingChildrenCollection.remove(); } } item.children(".BPT-HtmlTreeItem-Header").after(children); } if (!isShowingAll) { var row = item; var showAll = children.children(".BPT-HtmlTree-ChildCollection-ShowAll"); if (showAll.length > 0) { showAll.bind("click", function HtmlTreeView$addElements$showAll$click(event) { if (event.type === "click") { row.data("forceShowAll", true); HtmlTreeView.toggle(row); HtmlTreeView.toggle(row); row = null; HtmlTreeView.focusSelected(); } }); } } if (!stopAutoScroll) { window.setTimeout(function HtmlTreeView$addElement$conditionalScroll() { var child = children.children().last(); var scrollContainer = child.closest(".BPT-HtmlTree-ScrollContainer").get(0); if (scrollContainer) { var x = scrollContainer.scrollLeft; if (Common.ToolWindowHelpers.scrollIntoView(child.children(".BPT-HtmlTreeItem-Header").get(0), scrollContainer)) { children.parent().get(0).scrollIntoView(true); scrollContainer.scrollLeft = x; } } }, 0); } return children; }; HtmlTreeView.prepareAttributeValueForDisplay = function (value) { if (value && value.length > 50) { var prefix = value.substring(0, 5).toLowerCase(); if (prefix === "data:") { var prefixEndIndex = 25; var commaIndex = value.indexOf(","); if (commaIndex > 0) { prefixEndIndex = commaIndex; } value = value.substring(0, prefixEndIndex + 2) + "..." + value.substring(value.length - 10); } } return value; }; HtmlTreeView.addAttribute = function (item, name, value) { var attributes = $m("").addClass("BPT-HTML-Attribute-Section").attr("data-attrName", name).appendText(" "); attributes.append($m("").addClass("BPT-HTML-Attribute").appendText(name)); attributes.append($m("").addClass("BPT-HTML-Value").appendText(value)); var existingAttributes = item.find(".BPT-HtmlTreeItem-Header .BPT-HTML").children().first().children(".BPT-HTML-Attribute-Section"); if (existingAttributes.length === 0) { item.find(".BPT-HtmlTreeItem-Header .BPT-HTML-Tag").first().after(attributes); } else { $m(existingAttributes.get(existingAttributes.length - 1)).after(attributes); } return attributes; }; HtmlTreeView.showLoading = function (item, text) { if (!item.hasClass("BPT-HtmlTreeItem-ShowingLoader")) { var newRow = $m("
    ").addClass("BPT-HtmlTreeItem").addClass("BPT-HtmlTreeItem-Loading").appendText(text); item.children(".BPT-HtmlTreeItem-Header").append(newRow); item.addClass("BPT-HtmlTreeItem-ShowingLoader"); } return item; }; HtmlTreeView.hideLoading = function (item) { if (item.hasClass("BPT-HtmlTreeItem-ShowingLoader")) { item.removeClass("BPT-HtmlTreeItem-ShowingLoader"); item.children(".BPT-HtmlTreeItem-Header").children(".BPT-HtmlTreeItem-Loading").remove(); } return item; }; HtmlTreeView.getChildren = function (item) { return item.children(".BPT-HtmlTree-ChildCollection").children(".BPT-HtmlTreeItem"); }; HtmlTreeView.isCollapsed = function (item) { return item.hasClass("BPT-HtmlTreeItem-Collapsed"); }; HtmlTreeView.isExpanded = function (item) { return item.hasClass("BPT-HtmlTreeItem-Expanded"); }; HtmlTreeView.isExpandable = function (item) { return item.hasClass("BPT-HtmlTreeItem-Collapsed") || item.hasClass("BPT-HtmlTreeItem-Expanded"); }; HtmlTreeView.changeExpandableState = function (item, nowExpandable) { var header = item.children(".BPT-HtmlTreeItem-Header"); if (nowExpandable) { var expandIcon = $m("
    ").addClass("BPT-HtmlTreeItem-ExpandIcon"); item.prepend(expandIcon); item.find(".BPT-HtmlTreeItem-CollapsedFooter").prepend($m("").addClass("BPT-HtmlTreeItem-Ellipsis").appendText("...")); item.find(".BPT-HTML-Text").remove(); item.addClass("BPT-HtmlTreeItem-Collapsed"); header.attr("aria-expanded", "false"); header.attr("role", "group"); HtmlTreeView.addDOMAttrModifiedHandler(header.get(0)); } else { item.find(".BPT-HtmlTreeItem-ExpandIcon").remove(); HtmlTreeView.removeDOMAttrModifiedHandler(header.get(0)); header.removeAttr("aria-expanded"); item.find(".BPT-HtmlTreeItem-CollapsedFooter").find(".BPT-HtmlTreeItem-Ellipsis").remove(); item.removeClass("BPT-HtmlTreeItem-Collapsed"); header.attr("role", "treeitem"); } return item; }; HtmlTreeView.toggle = function (item, onExpandComplete) { var toggleCallback = item.data("toggleCallback"); toggleCallback = (toggleCallback ? toggleCallback : item.parent().data("toggleCallback")); if (toggleCallback) { Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleBegin); var header = item.children(".BPT-HtmlTreeItem-Header").get(0); HtmlTreeView.removeDOMAttrModifiedHandler(header); if (item.hasClass("BPT-HtmlTreeItem-Collapsed")) { if (item.parents(".BPT-HtmlTreeItem").length < HtmlTreeView.DOM_TREE_DEPTH_LIMIT) { var expandCompleteCallback = onExpandComplete; if (HtmlTreeView.TraceWriter) { HtmlTreeView.TraceWriter.raiseEvent(525 /* Dom_TreeItemExpand_Start */); expandCompleteCallback = function (a) { if (onExpandComplete) { onExpandComplete(a); } HtmlTreeView.TraceWriter.raiseEvent(526 /* Dom_TreeItemExpand_Stop */); }; } item.removeClass("BPT-HtmlTreeItem-Collapsed"); toggleCallback(true, item, item.attr("data-id"), expandCompleteCallback); item.addClass("BPT-HtmlTreeItem-Expanded"); header.setAttribute("aria-expanded", "true"); } } else { if (item.hasClass("BPT-HtmlTreeItem-HiddenRoot")) { return item; } if (HtmlTreeView.TraceWriter) { HtmlTreeView.TraceWriter.raiseEvent(535 /* Dom_TreeItemCollapse_Start */); } item.removeClass("BPT-HtmlTreeItem-Expanded"); toggleCallback(false, item, item.attr("data-id")); item.children(".BPT-HtmlTree-ChildCollection").remove(); item.addClass("BPT-HtmlTreeItem-Collapsed"); header.setAttribute("aria-expanded", "false"); if (HtmlTreeView.TraceWriter) { HtmlTreeView.TraceWriter.raiseEvent(536 /* Dom_TreeItemCollapse_Stop */); } Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleEnd); } HtmlTreeView.addDOMAttrModifiedHandler(header); if (HtmlTreeView.TreeChangeCallBack) { HtmlTreeView.TreeChangeCallBack(); } } return item; }; HtmlTreeView.expandElementChains = function (chains, complete) { HtmlTreeView.expandElementChain(chains[0], function () { if (chains.length > 1) { HtmlTreeView.expandElementChains(chains.slice(1, chains.length), complete); } else if (complete) { complete(); } }); }; HtmlTreeView.expandElementChain = function (chain, complete) { var root = $m("[data-id=\"" + chain[0] + "\"]"); var expandNext = function () { if (chain.length > 1) { HtmlTreeView.expandElementChain(chain.slice(1, chain.length), complete); } else if (complete) { complete(); } }; if (HtmlTreeView.isCollapsed(root)) { HtmlTreeView.toggle(root, expandNext); } else { expandNext(); } }; HtmlTreeView.getSelected = function (item) { if (item.hasClass("BPT-HtmlTreeItem-Selected")) { return item; } var rootElement = item.closest(".BPT-HtmlTree"); rootElement = (rootElement.length > 0 ? rootElement : item); return rootElement.find(".BPT-HtmlTreeItem-Selected").first(); }; HtmlTreeView.focusSelected = function (adjustFocus) { if (typeof adjustFocus === "undefined") { adjustFocus = true; } var element; var selected = document.querySelectorAll(".BPT-HtmlTreeItem-Selected"); if (selected.length > 1) { for (var i = 1; i < selected.length; i++) { element = selected[i]; element.classList.remove("BPT-HtmlTreeItem-Selected"); } } element = HtmlTreeView.adjustTabindex(); adjustFocus = adjustFocus && !HtmlTreeView.currentFocusOnInput(); if (!adjustFocus) { return; } if (selected.length > 0 && selected[0].classList.contains("BPT-HtmlTree-ChildCollection-ShowAll")) { selected[0].focus(); Common.ToolWindowHelpers.scrollIntoView(selected[0], $m(selected[0]).closest(".BPT-HtmlTree-ScrollContainer").get(0)); } else if (element) { element.focus(); var scrollContainer = $m(element).closest(".BPT-HtmlTree-ScrollContainer").get(0); var left = scrollContainer.scrollLeft; if (left) { var negativeXOffset = $m(element).closest(".BPT-HtmlTreeItem").get(0).getBoundingClientRect().left; if (negativeXOffset < 0) { left = Math.max(left + negativeXOffset, 0); scrollContainer.scrollLeft = left; } } } }; HtmlTreeView.adjustTabindex = function () { var tree = document.querySelector("#tree"); var element; if (!tree) { return element; } tree.removeAttribute("tabindex"); var nodeList = tree.querySelectorAll("[tabindex='1']"); for (var i = 0; i < nodeList.length; i++) { nodeList[i].removeAttribute("tabindex"); } element = tree.querySelector(".BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header, .BPT-HtmlTreeItem-Selected.BPT-HtmlTree-ChildCollection-ShowAll") || tree; element.setAttribute("tabindex", "1"); return element; }; HtmlTreeView.findChildByClickProximity = function (item, event) { var children = item.find(".BPT-HtmlTreeItem"); var x = event.clientX; var y = event.clientY; for (var i = 0; i < children.length; i++) { var child = children.get(i); var offset = child.getBoundingClientRect(); if (offset.top <= y && y <= offset.bottom) { item = $m(child); } } return item; }; HtmlTreeView.select = function (item, adjustFocus) { if (typeof adjustFocus === "undefined") { adjustFocus = true; } var rootItem = item.closest(".BPT-HtmlTree"); var selectedElement = rootItem.find(".BPT-HtmlTreeItem-Selected"); HtmlTreeViewDragDrop.removeDraggable(rootItem, selectedElement); HtmlTreeViewDragDrop.removeDroppable(rootItem); selectedElement.removeClass("BPT-HtmlTreeItem-Selected"); var isShowAllLink = selectedElement.hasClass("BPT-HtmlTree-ChildCollection-ShowAll"); if (isShowAllLink) { selectedElement.removeAttr("tabindex"); } else { selectedElement.children(".BPT-HtmlTreeItem-Header").removeAttr("tabindex"); } item.addClass("BPT-HtmlTreeItem-Selected"); HtmlTreeView.focusSelected(adjustFocus); isShowAllLink = item.hasClass("BPT-HtmlTree-ChildCollection-ShowAll"); var selectCallback = item.data("selectCallback") || item.parent().data("selectCallback"); if (selectCallback) { selectCallback(item, item.attr("data-id"), item.attr("data-tag")); } if (!isShowAllLink && HtmlTreeViewDragDrop.canDrag(item.attr("data-tag"))) { HtmlTreeViewDragDrop.addDraggable(rootItem, item); } return item; }; HtmlTreeView.clear = function (item) { var selectedChild = item.children().find(".BPT-HtmlTreeItem-Selected"); if (selectedChild.length > 0) { HtmlTreeView.select(item); } item.children(".BPT-HtmlTree-ChildCollection").remove(); if (item.hasClass("BPT-HtmlTree-Container")) { item.removeAttr("tabindex"); } return item; }; HtmlTreeView.getTextContent = function (element) { if (element && element.firstChild) { return element.firstChild.nodeValue; } return ""; }; HtmlTreeView.onDOMAttrModified = function (evt) { if (evt.attrName === "aria-expanded") { var element = evt.target; var parent = element.parentNode; var toExpand = evt.newValue === "true"; var currentExpanded = parent.classList.contains("BPT-HtmlTreeItem-Expanded"); var currentCollapsed = parent.classList.contains("BPT-HtmlTreeItem-Collapsed"); if ((toExpand && currentCollapsed) || (!toExpand && currentExpanded)) { HtmlTreeView.toggle($m(element.parentNode)); } } }; HtmlTreeView.addDOMAttrModifiedHandler = function (e) { e.addEventListener("DOMAttrModified", HtmlTreeView.onDOMAttrModified); }; HtmlTreeView.removeDOMAttrModifiedHandler = function (e) { e.removeEventListener("DOMAttrModified", HtmlTreeView.onDOMAttrModified); }; HtmlTreeView.isTextArea = function (e) { if (!e) { return false; } var s = e.tagName; if (typeof s !== "string") { return false; } return s.toUpperCase() === "TEXTAREA"; }; HtmlTreeView.isInputText = function (e) { if (!e) { return false; } var s = e.tagName; if (typeof s !== "string") { return false; } return s.toUpperCase() === "INPUT" && e.hasAttribute("type") && e.getAttribute("type") === "text"; }; HtmlTreeView.currentFocusOnInput = function () { var e = document.activeElement; return HtmlTreeView.isTextArea(e) || HtmlTreeView.isInputText(e); }; HtmlTreeView.InitialElementLimit = 200; HtmlTreeView.TraceWriter = null; HtmlTreeView.DOM_TREE_DEPTH_LIMIT = 64; return HtmlTreeView; })(); // htmlTreeViewDragDrop.ts var HtmlTreeViewDragDrop = (function () { function HtmlTreeViewDragDrop() { } HtmlTreeViewDragDrop.init = function (channel, engine, doc, supportsMutation, traceWriter) { HtmlTreeViewDragDrop.Channel = channel; HtmlTreeViewDragDrop.Engine = engine; HtmlTreeViewDragDrop.Document = doc; HtmlTreeViewDragDrop.SupportsMutation = supportsMutation; HtmlTreeViewDragDrop.TraceWriter = traceWriter; }; HtmlTreeViewDragDrop.proxyReparent = function (dragFromDataId, dropTargetDataId, dropAction, postOpCallback) { HtmlTreeViewDragDrop.Channel.call(HtmlTreeViewDragDrop.Engine(), "reparent", [dragFromDataId, dropTargetDataId, dropAction], postOpCallback); }; HtmlTreeViewDragDrop.registerEventCallback = function (event, callback, mark) { if (!HtmlTreeViewDragDrop.EventCallback.hasOwnProperty(event)) { HtmlTreeViewDragDrop.EventCallback[event] = []; } HtmlTreeViewDragDrop.EventCallback[event].push({ callback: callback, mark: mark }); return true; }; HtmlTreeViewDragDrop.unregisterEventCallback = function (event, callback) { if (!HtmlTreeViewDragDrop.EventCallback.hasOwnProperty(event)) { return false; } var arr = HtmlTreeViewDragDrop.EventCallback[event]; var len = arr.length; for (var i = 0; i < len; i++) { if (arr[i].callback === callback) { arr.splice(i, 1); if (HtmlTreeViewDragDrop.EventCallback[event].length === 0) { delete HtmlTreeViewDragDrop.EventCallback[event]; } return true; } } return false; }; HtmlTreeViewDragDrop.canDrag = function (tagLowerCase) { return ["html", "head", "body", "script", "noscript", "#doctype"].indexOf(tagLowerCase) < 0; }; HtmlTreeViewDragDrop.addDraggable = function (rootItem, item) { var children = item.children(".BPT-HtmlTreeItem-Header"); children.attr("draggable", "true"); for (var i = 0, len = item.length; i < len; i++) { var element = item.get(i); if (element) { if (element.classList) { element.classList.add(HtmlTreeViewDragDrop.DraggableClass); } if (element.addEventListener) { element.addEventListener("dragstart", HtmlTreeViewDragDrop.doDragStart, false); element.addEventListener("drag", HtmlTreeViewDragDrop.doDrag, false); element.addEventListener("dragend", HtmlTreeViewDragDrop.doDragEnd, false); } } } var rootTarget = rootItem.get(0); if (rootTarget) { rootTarget.addEventListener("dragenter", HtmlTreeViewDragDrop.doDropTargetEnter, false); rootTarget.addEventListener("dragover", HtmlTreeViewDragDrop.doDropTargetOver, false); rootTarget.addEventListener("dragleave", HtmlTreeViewDragDrop.doDropTargetLeave, false); rootTarget.addEventListener("drop", HtmlTreeViewDragDrop.doDropTargetDrop, false); } }; HtmlTreeViewDragDrop.removeDraggable = function (rootItem, item) { var children = item.children(".BPT-HtmlTreeItem-Header"); children.attr("draggable", "false"); for (var i = 0, len = item.length; i < len; i++) { var element = item.get(i); if (element) { if (element.classList) { element.classList.remove(HtmlTreeViewDragDrop.DraggableClass); } if (element.removeEventListener) { element.removeEventListener("dragstart", HtmlTreeViewDragDrop.doDragStart, false); element.removeEventListener("drag", HtmlTreeViewDragDrop.doDrag, false); element.removeEventListener("dragend", HtmlTreeViewDragDrop.doDragEnd, false); } } } if (rootItem.length > 0) { var rootTarget = rootItem.get(0); rootTarget.removeEventListener("dragenter", HtmlTreeViewDragDrop.doDropTargetEnter, false); rootTarget.removeEventListener("dragover", HtmlTreeViewDragDrop.doDropTargetOver, false); rootTarget.removeEventListener("dragleave", HtmlTreeViewDragDrop.doDropTargetLeave, false); rootTarget.removeEventListener("drop", HtmlTreeViewDragDrop.doDropTargetDrop, false); } }; HtmlTreeViewDragDrop.doDragStart = function (event) { event.stopPropagation(); if (event.srcElement.tagName === "TEXTAREA" || event.srcElement.tagName === "INPUT") { event.preventDefault(); return; } event.dataTransfer.effectAllowed = "move"; event.dataTransfer.setData("Text", ""); var item = $m(this); if (HtmlTreeViewDragDrop.AutoCollapseOnDragStart) { if (HtmlTreeView.isExpanded(item)) { HtmlTreeView.toggle(item); } } var rootItem = item.closest(HtmlTreeViewDragDrop.TreeSelector); HtmlTreeViewDragDrop.addDroppable(rootItem, item); var dragItem = rootItem.find(HtmlTreeViewDragDrop.DragSelector); if (dragItem.get(0) !== item.get(0)) { throw "Bad invariance in doDragStart: dragItem.get(0) !== item.get(0)"; } HtmlTreeViewDragDrop.LastTimeStamp = event.timeStamp; }; HtmlTreeViewDragDrop.doDrag = function (event) { var scrollContainerItem = $m(this).closest(HtmlTreeViewDragDrop.ScrollContainerSelector); if (scrollContainerItem.length !== 1) { return; } var millisecondDelta = event.timeStamp - HtmlTreeViewDragDrop.LastTimeStamp; var scrollContainer = scrollContainerItem.get(0); var above = HtmlTreeViewDragDrop.calcAbove(event, scrollContainer); var below = HtmlTreeViewDragDrop.calcBelow(event, scrollContainer); var step = HtmlTreeViewDragDrop.AutoscrollPixelsPerSecond; var landing = 10; if (above) { if (above > landing) { step += (above - landing) * HtmlTreeViewDragDrop.AutoscrollAcceleration; } step = Math.ceil(step * millisecondDelta / 1000); if (step > scrollContainer.scrollTop) { step = scrollContainer.scrollTop; } if (step) { scrollContainer.scrollTop -= step; } } else if (below) { if (below > landing) { step += (below - landing) * HtmlTreeViewDragDrop.AutoscrollAcceleration; } step = Math.ceil(step * millisecondDelta / 1000); if ((step + scrollContainer.scrollTop + scrollContainer.offsetHeight) > scrollContainer.scrollHeight) { step = scrollContainer.scrollHeight - scrollContainer.scrollTop - scrollContainer.offsetHeight; } if (step) { scrollContainer.scrollTop += step; } } HtmlTreeViewDragDrop.LastTimeStamp = event.timeStamp; }; HtmlTreeViewDragDrop.calcAbove = function (event, element) { if (!event || !element) { return NaN; } var delta = element.offsetTop - event.clientY; if (delta < 0) { delta = 0; } return delta; }; HtmlTreeViewDragDrop.calcBelow = function (event, element) { if (!event || !element) { return NaN; } var delta = event.clientY - element.offsetHeight; if (delta < 0) { delta = 0; } return delta; }; HtmlTreeViewDragDrop.raise = function (event, arg) { var count = 0; if (!HtmlTreeViewDragDrop.EventCallback.hasOwnProperty(event)) { return count; } var arr = HtmlTreeViewDragDrop.EventCallback[event].slice(0); var len = arr.length; for (var i = 0; i < len; i++) { arr[i].callback(event, arr[i].mark, arg); } return count; }; HtmlTreeViewDragDrop.doDragEnd = function (event) { var dragFromItem = $m(this); var rootItem = dragFromItem.closest(HtmlTreeViewDragDrop.TreeSelector); if (event.dataTransfer.dropEffect === "none") { HtmlTreeViewDragDrop.raise("drag", "cancel"); HtmlTreeViewDragDrop.removeDroppable(rootItem); return; } if (HtmlTreeViewDragDrop.TraceWriter) { HtmlTreeViewDragDrop.TraceWriter.raiseEvent(507 /* Dom_DragDrop_Start */); } var before = rootItem.find(HtmlTreeViewDragDrop.DropHereBeforeSelector); var after = rootItem.find(HtmlTreeViewDragDrop.DropHereAfterSelector); var dropTargetItem; var dropAction = HtmlTreeViewDragDrop.DropAction.Unknown; if (before.length === 1) { dropTargetItem = before.parent(); if (before.hasClass(HtmlTreeViewDragDrop.HeaderClass)) { dropAction = HtmlTreeViewDragDrop.DropAction.BeforeSibling; } else { if (HtmlTreeView.isExpanded(dropTargetItem)) { dropAction = HtmlTreeViewDragDrop.DropAction.LastChild; } else { dropAction = HtmlTreeViewDragDrop.DropAction.BeforeSibling; } } } else if (after.length === 1) { dropTargetItem = after.parent(); if (after.hasClass(HtmlTreeViewDragDrop.FooterClass)) { dropAction = HtmlTreeViewDragDrop.DropAction.AfterSibling; } else if (HtmlTreeView.isExpanded(dropTargetItem)) { dropAction = HtmlTreeViewDragDrop.DropAction.FirstChild; } else { dropAction = HtmlTreeViewDragDrop.DropAction.AfterSibling; } } else { HtmlTreeViewDragDrop.raise("drag", "cancel"); HtmlTreeViewDragDrop.removeDroppable(rootItem); return; } HtmlTreeViewDragDrop.removeDroppable(rootItem); if (dropAction && dropTargetItem && dropTargetItem.length === 1) { var dragFromId = dragFromItem.attr("data-id"); var dropTargetId = dropTargetItem.attr("data-id"); if (dragFromId && dropTargetId) { if (HtmlTreeView.isExpanded(dragFromItem)) { HtmlTreeView.toggle(dragFromItem); } HtmlTreeViewDragDrop.proxyReparent(dragFromId, dropTargetId, dropAction, function () { if (HtmlTreeViewDragDrop.SupportsMutation()) { var millisecondDelay = 1000 / 4; window.setTimeout(function () { HtmlTreeViewDragDrop.selectBy(dropTargetId, dropAction); }, millisecondDelay); } else { var targetParents = dropTargetItem.parents(HtmlTreeViewDragDrop.ItemSelector).not(HtmlTreeViewDragDrop.HiddenRootSelector); var fromParents = dragFromItem.parents(HtmlTreeViewDragDrop.ItemSelector).not(HtmlTreeViewDragDrop.HiddenRootSelector); var targetParentChain = []; var fromParentChain = []; targetParents.each(function (i, e) { targetParentChain[(targetParents.length - 1) - i] = e.getAttribute("data-id"); }); fromParents.each(function (i, e) { fromParentChain[(fromParents.length - 1) - i] = e.getAttribute("data-id"); }); if (dropAction !== HtmlTreeViewDragDrop.DropAction.BeforeSibling && dropAction !== HtmlTreeViewDragDrop.DropAction.AfterSibling) { targetParentChain.push(dropTargetItem.attr("data-id")); } var closestCommonAncestor; for (var i = 0; i < targetParentChain.length && i < fromParentChain.length; i++) { if (targetParentChain[i] !== fromParentChain[i]) { break; } closestCommonAncestor = targetParentChain[i]; } var root = $m("[data-id=" + closestCommonAncestor + "]"); HtmlTreeView.toggle(root); HtmlTreeView.expandElementChains([targetParentChain, fromParentChain], function () { HtmlTreeViewDragDrop.selectBy(dropTargetId, dropAction); }); } }); } } HtmlTreeViewDragDrop.LastExpandIcon = undefined; HtmlTreeViewDragDrop.raise("drag", "complete"); if (HtmlTreeViewDragDrop.TraceWriter) { HtmlTreeViewDragDrop.TraceWriter.raiseEvent(508 /* Dom_DragDrop_Stop */); } }; HtmlTreeViewDragDrop.selectBy = function (nearId, dropAction) { var item; if (dropAction === HtmlTreeViewDragDrop.DropAction.FirstChild) { item = $m("div.BPT-HtmlTreeItem[data-id=\"" + nearId + "\"] > div.BPT-HtmlTree-ChildCollection > div.BPT-HtmlTreeItem:first-child"); } else if (dropAction === HtmlTreeViewDragDrop.DropAction.LastChild) { item = $m("div.BPT-HtmlTreeItem[data-id=\"" + nearId + "\"] > div.BPT-HtmlTree-ChildCollection > div.BPT-HtmlTreeItem:last-child"); } else if (dropAction === HtmlTreeViewDragDrop.DropAction.BeforeSibling) { var nearElement = $m(HtmlTreeViewDragDrop.ItemSelector + "[data-id=\"" + nearId + "\"]").get(0); if (nearElement && nearElement.previousSibling) { item = $m(nearElement.previousSibling); } } else if (dropAction === HtmlTreeViewDragDrop.DropAction.AfterSibling) { item = $m(HtmlTreeViewDragDrop.ItemSelector + "[data-id=\"" + nearId + "\"] + div.BPT-HtmlTreeItem"); } if (item && item.length === 1) { HtmlTreeView.select(item); } }; HtmlTreeViewDragDrop.getHoverElement = function (x, y) { if (typeof x === "number" && typeof y === "number") { return (document.elementFromPoint(x, y)); } }; HtmlTreeViewDragDrop.getHoverHeaderFooterElement = function (x, y) { if (typeof x === "number" && typeof y === "number") { var headerFooter = $m(document.elementFromPoint(x, y)).closest(HtmlTreeViewDragDrop.HeaderFooterSelector); var element = headerFooter.get(0); if (element) { var parent = element.parentNode; if (parent && !parent.classList.contains(HtmlTreeViewDragDrop.HiddenRootClass)) { return element; } } } }; HtmlTreeViewDragDrop.markHover = function (lastHoverItem, currentHoverElement) { if (currentHoverElement) { currentHoverElement.classList.add(HtmlTreeViewDragDrop.HoverClass); } for (var i = 0, len = lastHoverItem.length; i < len; i++) { var hoverElement = lastHoverItem.get(i); if (hoverElement !== currentHoverElement) { hoverElement.classList.remove(HtmlTreeViewDragDrop.HoverClass); } } return currentHoverElement ? true : false; }; HtmlTreeViewDragDrop.nearby = function (a, b, drift) { if (b + drift < a || b - drift > a) { return false; } return true; }; HtmlTreeViewDragDrop.autoExpand = function (event) { HtmlTreeViewDragDrop.autoExpandUpdate(event) || HtmlTreeViewDragDrop.autoExpandIcon(event) || HtmlTreeViewDragDrop.autoExpandNonExpandable(event); }; HtmlTreeViewDragDrop.autoExpandUpdate = function (event) { var nearby = HtmlTreeViewDragDrop.nearby; var element = HtmlTreeViewDragDrop.getHoverElement(event.clientX, event.clientY); if (!HtmlTreeViewDragDrop.LastExpandIcon || HtmlTreeViewDragDrop.LastExpandIcon.element !== element) { HtmlTreeViewDragDrop.LastExpandIcon = { element: element, timeStamp: event.timeStamp, clientX: event.clientX, clientY: event.clientY }; return true; } if (!nearby(event.clientX, HtmlTreeViewDragDrop.LastExpandIcon.clientX, HtmlTreeViewDragDrop.AutoexpandPixelDrift) || !nearby(event.clientY, HtmlTreeViewDragDrop.LastExpandIcon.clientY, HtmlTreeViewDragDrop.AutoexpandPixelDrift)) { HtmlTreeViewDragDrop.LastExpandIcon = { element: element, timeStamp: event.timeStamp, clientX: event.clientX, clientY: event.clientY }; return true; } return false; }; HtmlTreeViewDragDrop.autoExpandIcon = function (event) { if ((event.timeStamp - HtmlTreeViewDragDrop.LastExpandIcon.timeStamp) < HtmlTreeViewDragDrop.AutoexpandDisclosureTriangleMillisecondDelay) { return false; } var element = HtmlTreeViewDragDrop.getHoverElement(event.clientX, event.clientY); if (!element || !element.classList.contains(HtmlTreeViewDragDrop.ExpandIconClass)) { return false; } var htmlTreeElement = element.parentNode; if (htmlTreeElement && htmlTreeElement.classList.contains(HtmlTreeViewDragDrop.CollapsedClass) && ($m(htmlTreeElement).children(HtmlTreeViewDragDrop.HeaderSelector).hasClass(HtmlTreeViewDragDrop.DropBeforeClass) || $m(htmlTreeElement).children(HtmlTreeViewDragDrop.HeaderSelector).hasClass(HtmlTreeViewDragDrop.DropAfterClass))) { HtmlTreeViewDragDrop.LastExpandIcon = undefined; var rootItem = $m(htmlTreeElement).closest(HtmlTreeViewDragDrop.TreeSelector); var dragItem = rootItem.find(HtmlTreeViewDragDrop.DragSelector); HtmlTreeViewDragDrop.removeDroppable(rootItem); HtmlTreeView.toggle($m(htmlTreeElement), function () { HtmlTreeViewDragDrop.addDroppable(rootItem, dragItem); }); return true; } return false; }; HtmlTreeViewDragDrop.autoExpandNonExpandable = function (event) { if ((event.timeStamp - HtmlTreeViewDragDrop.LastExpandIcon.timeStamp) < HtmlTreeViewDragDrop.AutoexpandNonExpandableMillisecondDelay) { return false; } var element = HtmlTreeViewDragDrop.getHoverElement(event.clientX, event.clientY); if (!element) { return false; } var htmlTreeItem = $m(element).closest(HtmlTreeViewDragDrop.ItemSelector); if (htmlTreeItem.length !== 1 || htmlTreeItem.hasClass(HtmlTreeViewDragDrop.CollapsedClass) || htmlTreeItem.hasClass(HtmlTreeViewDragDrop.ExpandedClass) || !htmlTreeItem.attr("data-tag") || htmlTreeItem.attr("data-tag") === "#text") { return false; } if (htmlTreeItem.children(HtmlTreeViewDragDrop.HeaderSelector).hasClass(HtmlTreeViewDragDrop.DropBeforeClass) || htmlTreeItem.children(HtmlTreeViewDragDrop.HeaderSelector).hasClass(HtmlTreeViewDragDrop.DropAfterClass)) { HtmlTreeViewDragDrop.LastExpandIcon = undefined; var rootItem = htmlTreeItem.closest(HtmlTreeViewDragDrop.TreeSelector); var dragItem = rootItem.find(HtmlTreeViewDragDrop.DragSelector); HtmlTreeViewDragDrop.removeDroppable(rootItem); HtmlTreeView.changeExpandableState(htmlTreeItem, true); HtmlTreeView.toggle(htmlTreeItem, function () { HtmlTreeViewDragDrop.addDroppable(rootItem, dragItem); }); return true; } return false; }; HtmlTreeViewDragDrop.doDropTargetEnter = function (event) { var rootElement = event.currentTarget; var rootItem = $m(rootElement); var lastHoverItem = rootItem.find(HtmlTreeViewDragDrop.HoverSelector); var nowHoverItem = HtmlTreeViewDragDrop.getHoverHeaderFooterElement(event.clientX, event.clientY); HtmlTreeViewDragDrop.markHover(lastHoverItem, nowHoverItem); event.dataTransfer.dropEffect = "move"; event.preventDefault(); event.stopPropagation(); }; HtmlTreeViewDragDrop.doDropTargetOver = function (event) { var rootElement = event.currentTarget; var lastHoverItem = $m(rootElement).find(HtmlTreeViewDragDrop.HoverSelector); var nowHoverItem = HtmlTreeViewDragDrop.getHoverHeaderFooterElement(event.clientX, event.clientY); HtmlTreeViewDragDrop.markHover(lastHoverItem, nowHoverItem); event.dataTransfer.dropEffect = "move"; HtmlTreeViewDragDrop.autoExpand(event); event.preventDefault(); event.stopPropagation(); return false; }; HtmlTreeViewDragDrop.doDropTargetLeave = function (event) { var rootElement = event.currentTarget; var lastHoverItem = $m(rootElement).find(HtmlTreeViewDragDrop.HoverSelector); HtmlTreeViewDragDrop.markHover(lastHoverItem); event.preventDefault(); event.stopPropagation(); }; HtmlTreeViewDragDrop.doDropTargetDrop = function (event) { var rootElement = event.currentTarget; var hoverElement = $m(rootElement).find(HtmlTreeViewDragDrop.HoverSelector); if (hoverElement.hasClass(HtmlTreeViewDragDrop.DropAfterClass)) { hoverElement.addClass(HtmlTreeViewDragDrop.DropHereAfterClass); } else if (hoverElement.hasClass(HtmlTreeViewDragDrop.DropBeforeClass)) { hoverElement.addClass(HtmlTreeViewDragDrop.DropHereBeforeClass); } event.preventDefault(); event.stopPropagation(); }; HtmlTreeViewDragDrop.isParent = function (parent, child) { if (!child) { return false; } var node = child.parentNode; while (node) { if (node === parent) { return true; } node = node.parentNode; } return false; }; HtmlTreeViewDragDrop.isScopeItem = function (element) { var tagLowerCase = element.getAttribute("data-tag"); return ["html", "head", "body", "frame", "iframe", "script", "noscript"].indexOf(tagLowerCase) >= 0; }; HtmlTreeViewDragDrop.findDragScope = function (chain) { for (var i = 0; i < chain.length; i++) { var element = chain.get(i); if (HtmlTreeViewDragDrop.isScopeItem(element)) { return $m(element); } } return null; }; HtmlTreeViewDragDrop.filterSubDragScope = function (dropTargets, dragItem) { var result = []; if (dropTargets.length > 0) { var element = dropTargets.get(0); var isScopeItem = HtmlTreeViewDragDrop.isScopeItem(element); result.push({ element: element, open: !isScopeItem }); } var i = 1; var len = dropTargets.length; while (i < len) { var element = dropTargets.get(i); if (HtmlTreeViewDragDrop.isScopeItem(element)) { result.push({ element: element, open: false }); i++; var skipChildren = $m(element).find(HtmlTreeViewDragDrop.ItemSelector); var j = 0; while (j < skipChildren.length && skipChildren.get(j) === dropTargets.get(i)) { j++; i++; } } else { result.push({ element: element, open: true }); i++; } } return result; }; HtmlTreeViewDragDrop.addDroppable = function (rootItem, dragItem) { if (!rootItem) { throw "Bad parameter in addDroppable: !rootItem"; } if (!dragItem) { throw "Bad parameter in addDroppable: !dragItem"; } if (dragItem.length !== 1) { throw "Bad parameter in addDroppable: dragItem.length !== 1"; } var dragParentChain = dragItem.parents(HtmlTreeViewDragDrop.ItemSelector).not(HtmlTreeViewDragDrop.HiddenRootSelector); var dragScopeItem = HtmlTreeViewDragDrop.findDragScope(dragParentChain); var potentialDropTargets = dragScopeItem ? dragScopeItem.find(HtmlTreeViewDragDrop.ItemSelector).not(HtmlTreeViewDragDrop.HiddenRootSelector) : rootItem.find(HtmlTreeViewDragDrop.ItemSelector).not(HtmlTreeViewDragDrop.HiddenRootSelector); var dropTargets = HtmlTreeViewDragDrop.filterSubDragScope(potentialDropTargets, dragItem); var dropBefore = true; var dragElement = dragItem.get(0); for (var i = 0, len = dropTargets.length; i < len; i++) { var possibleDropTarget = dropTargets[i].element; var isOpen = dropTargets[i].open; var isParentOfDrag = HtmlTreeViewDragDrop.isParent(possibleDropTarget, dragElement); var isChildOfDrag = HtmlTreeViewDragDrop.isParent(dragElement, possibleDropTarget); var possibleDropTargetItem = $m(possibleDropTarget); if (possibleDropTarget === dragElement) { dropBefore = false; possibleDropTargetItem.addClass(HtmlTreeViewDragDrop.DragClass); } else if (isChildOfDrag) { } else if (!possibleDropTargetItem.attr("data-id")) { } else if (dropBefore) { possibleDropTargetItem.children(HtmlTreeViewDragDrop.HeaderSelector).addClass(HtmlTreeViewDragDrop.DropBeforeClass); if (isParentOfDrag) { possibleDropTargetItem.children(HtmlTreeViewDragDrop.FooterSelector).addClass(HtmlTreeViewDragDrop.DropAfterClass); } else if (isOpen) { possibleDropTargetItem.children(HtmlTreeViewDragDrop.FooterSelector).addClass(HtmlTreeViewDragDrop.DropBeforeClass); } } else { if (isOpen || possibleDropTargetItem.hasClass(HtmlTreeViewDragDrop.CollapsedClass)) { possibleDropTargetItem.children(HtmlTreeViewDragDrop.HeaderSelector).addClass(HtmlTreeViewDragDrop.DropAfterClass); } possibleDropTargetItem.children(HtmlTreeViewDragDrop.FooterSelector).addClass(HtmlTreeViewDragDrop.DropAfterClass); } } }; HtmlTreeViewDragDrop.removeDroppable = function (rootItem) { if (!rootItem) { throw "Bad parameter in removeDroppable: !rootItem"; } rootItem.find(HtmlTreeViewDragDrop.DragSelector).removeClass(HtmlTreeViewDragDrop.DragClass); rootItem.find(HtmlTreeViewDragDrop.DropBeforeSelector).removeClass(HtmlTreeViewDragDrop.DropBeforeClass); rootItem.find(HtmlTreeViewDragDrop.DropAfterSelector).removeClass(HtmlTreeViewDragDrop.DropAfterClass); rootItem.find(HtmlTreeViewDragDrop.DropHereBeforeSelector).removeClass(HtmlTreeViewDragDrop.DropHereBeforeClass); rootItem.find(HtmlTreeViewDragDrop.DropHereAfterSelector).removeClass(HtmlTreeViewDragDrop.DropHereAfterClass); rootItem.find(HtmlTreeViewDragDrop.HoverSelector).removeClass(HtmlTreeViewDragDrop.HoverClass); }; HtmlTreeViewDragDrop.DropAction = { Unknown: "", BeforeSibling: "before sibling", AfterSibling: "after sibling", FirstChild: "first child", LastChild: "last child" }; HtmlTreeViewDragDrop.AutoCollapseOnDragStart = false; HtmlTreeViewDragDrop.CollapsedClass = "BPT-HtmlTreeItem-Collapsed"; HtmlTreeViewDragDrop.DragClass = "BPT-HtmlTreeItem-Drag"; HtmlTreeViewDragDrop.DraggableClass = "BPT-HtmlTreeItem-Draggable"; HtmlTreeViewDragDrop.DropAfterClass = "BPT-HtmlTreeItem-DropAfter"; HtmlTreeViewDragDrop.DropBeforeClass = "BPT-HtmlTreeItem-DropBefore"; HtmlTreeViewDragDrop.DropHereAfterClass = "BPT-HtmlTreeItem-DoDropHereAfter"; HtmlTreeViewDragDrop.DropHereBeforeClass = "BPT-HtmlTreeItem-DoDropHereBefore"; HtmlTreeViewDragDrop.ExpandedClass = "BPT-HtmlTreeItem-Expanded"; HtmlTreeViewDragDrop.ExpandIconClass = "BPT-HtmlTreeItem-ExpandIcon"; HtmlTreeViewDragDrop.FooterClass = "BPT-HtmlTreeItem-Footer"; HtmlTreeViewDragDrop.HeaderClass = "BPT-HtmlTreeItem-Header"; HtmlTreeViewDragDrop.HiddenRootClass = "BPT-HtmlTreeItem-HiddenRoot"; HtmlTreeViewDragDrop.HoverClass = "BPT-HtmlTreeItem-Hover"; HtmlTreeViewDragDrop.DragSelector = ".BPT-HtmlTreeItem-Drag"; HtmlTreeViewDragDrop.DropAfterSelector = ".BPT-HtmlTreeItem-DropAfter"; HtmlTreeViewDragDrop.DropBeforeSelector = ".BPT-HtmlTreeItem-DropBefore"; HtmlTreeViewDragDrop.DropHereAfterSelector = ".BPT-HtmlTreeItem-DoDropHereAfter"; HtmlTreeViewDragDrop.DropHereBeforeSelector = ".BPT-HtmlTreeItem-DoDropHereBefore"; HtmlTreeViewDragDrop.FooterSelector = ".BPT-HtmlTreeItem-Footer"; HtmlTreeViewDragDrop.HeaderFooterSelector = ".BPT-HtmlTreeItem-Footer,.BPT-HtmlTreeItem-Header"; HtmlTreeViewDragDrop.HeaderSelector = ".BPT-HtmlTreeItem-Header"; HtmlTreeViewDragDrop.HiddenRootSelector = ".BPT-HtmlTreeItem-HiddenRoot"; HtmlTreeViewDragDrop.HoverSelector = ".BPT-HtmlTreeItem-Hover"; HtmlTreeViewDragDrop.ItemSelector = ".BPT-HtmlTreeItem"; HtmlTreeViewDragDrop.ScrollContainerSelector = ".BPT-HtmlTree-ScrollContainer"; HtmlTreeViewDragDrop.TreeSelector = ".BPT-HtmlTree"; HtmlTreeViewDragDrop.AutoscrollPixelsPerSecond = 30; HtmlTreeViewDragDrop.AutoscrollAcceleration = 5; HtmlTreeViewDragDrop.LastTimeStamp = 0; HtmlTreeViewDragDrop.AutoexpandDisclosureTriangleMillisecondDelay = 500; HtmlTreeViewDragDrop.AutoexpandNonExpandableMillisecondDelay = 1000; HtmlTreeViewDragDrop.AutoexpandPixelDrift = 2; HtmlTreeViewDragDrop.LastExpandIcon = undefined; HtmlTreeViewDragDrop.EventCallback = {}; return HtmlTreeViewDragDrop; })(); // m.ts function $m(arg) { if (typeof arg === "string") { var matches = arg.match(/<(\w+?)>/); if (matches) { return new $mList("", document.createElement(matches[1])); } else { var list; list = document.querySelectorAll(arg); return new $mList(arg, list); } } return new $mList("", arg); } // mList.ts "use strict"; var $mList = (function () { function $mList(selector, nodeListOrNode) { this.selector = selector; if (nodeListOrNode === null) { this._array = []; } else if (nodeListOrNode.length !== undefined) { this._array = []; var nodeList = nodeListOrNode; var len = nodeList.length; for (var i = 0; i < len; i++) { this._array.push(new $mNode(nodeList[i])); } } else { this._array = [new $mNode(nodeListOrNode)]; } } Object.defineProperty($mList.prototype, "length", { get: function () { return this._array.length; }, enumerable: true, configurable: true }); $mList.prototype.is = function (s) { if (s === ":hidden") { for (var i = 0; i < this.length; i++) { if (!this._array[i].is(":hidden")) { return false; } } return true; } if (s === ":visible") { return !this.is(":hidden"); } throw "$mNode.is(s: string) : boolean - can only be called with :hidden or :visible"; }; $mList.prototype.scrollTop = function (value) { if (this.length === 0) { return; } return this._array[0].scrollTop(); }; $mList.prototype.scrollLeft = function (value) { if (this.length === 0) { return; } return this._array[0].scrollLeft(); }; $mList.prototype.data = function (key, value) { if (this.length === 0) { return; } return this._array[0].data(key, value); }; $mList.prototype.attr = function (attributeName, setValue) { if (this.length === 0) { return; } if (setValue !== undefined) { for (var i = 0; i < this.length; i++) { this._array[i].setAttr(attributeName, setValue); } return this; } else { return this._array[0].attr(attributeName); } }; $mList.prototype.removeAttr = function (attributeName) { for (var i = 0; i < this.length; i++) { this._array[i].removeAttr(attributeName); } return this; }; $mList.prototype.matchAttr = function (attributeName, value) { var result = new $mList(this.selector + " → matchAttr", null); var len = this.length; for (var i = 0; i < len; i++) { var node = this._array[i]; if (node.matchAttr(attributeName, value)) { result.push(node); } } return result; }; $mList.prototype.addClass = function (className) { for (var i = 0; i < this.length; i++) { this._array[i].addClass(className); } return this; }; $mList.prototype.removeClass = function (s) { var len = this.length; for (var i = 0; i < len; i++) { this._array[i].removeClass(s); } return this; }; $mList.prototype.hasClass = function (className) { for (var i = 0; i < this.length; i++) { if (this._array[i].hasClass(className)) { return true; } } return false; }; $mList.prototype.hide = function () { var len = this.length; for (var i = 0; i < len; i++) { this._array[i].hide(); } return this; }; $mList.prototype.show = function () { var len = this.length; for (var i = 0; i < len; i++) { this._array[i].show(); } return this; }; $mList.prototype.placeholder = function (s) { var len = this.length; for (var i = 0; i < len; i++) { this._array[i].placeholder(s); } return this; }; $mList.prototype.focus = function () { if (this.length >= 1) { this._array[0].focus(); } return this; }; $mList.prototype.text = function (s) { if (s === undefined) { if (this.length > 0) { return this._array[0].text(); } return; } var len = this.length; for (var i = 0; i < len; i++) { this._array[i].text(s); } return this; }; $mList.prototype.html = function (htmlString) { if (htmlString === undefined) { if (this.length > 0) { return this._array[0].html(); } return; } var len = this.length; for (var i = 0; i < len; i++) { this._array[i].html(htmlString); } return this; }; $mList.prototype.each = function (fn) { var len = this.length; for (var i = 0; i < len; i++) { fn.call(this._array[i].get(), i, this._array[i].get()); } }; $mList.prototype.parent = function (s) { if (s !== undefined) { if (!$mList.isClassSelector(s)) { return; } s = s.substr(1); } var result = new $mList(this.selector + " → parent", null); var len = this.length; for (var i = 0; i < len; i++) { var parent = this._array[i].parent(s); if (parent) { result.push(parent); } } return result; }; $mList.prototype.parents = function (s) { if (!$mList.isClassSelector(s)) { return; } s = s.substr(1); var result = new $mList(this.selector + " → parents", null); var len = this.length; for (var i = 0; i < len; i++) { var subResult = this._array[i].parents(s); if (subResult && subResult.length) { for (var j = 0; j < subResult.length; j++) { result.push(subResult[j]); } } } return result; }; $mList.prototype.children = function (s) { if (s !== undefined) { if (!$mList.isClassSelector(s)) { return; } s = s.substr(1); } var result = new $mList(this.selector + " → children", null); var len = this.length; for (var i = 0; i < len; i++) { var element = this._array[i].get(); var sibling = element.firstChild; while (sibling) { if (sibling.nodeType === 1) { var node = new $mNode(sibling); if (s === undefined || node.hasClass(s)) { result.push(node); } } sibling = sibling.nextSibling; } } return result; }; $mList.prototype.siblings = function (s) { if (s !== undefined) { if (!$mList.isClassSelector(s)) { return; } s = s.substr(1); } var result = new $mList(this.selector + " → siblings", null); var len = this.length; for (var i = 0; i < len; i++) { var thisChild = this._array[i].get(); var element = this._array[i].get().parentNode; var sibling = element.firstChild; while (sibling) { if (sibling.nodeType === 1 && sibling !== thisChild) { var node = new $mNode(sibling); if (s === undefined || node.hasClass(s)) { result.push(node); } } sibling = sibling.nextSibling; } } return result; }; $mList.prototype.next = function (s) { if (s !== undefined) { if (!$mList.isClassSelector(s)) { return; } s = s.substr(1); } var result = new $mList(this.selector + " → next", null); var len = this.length; for (var i = 0; i < len; i++) { var child = this._array[i].get().nextSibling; while (child) { var node = new $mNode(child); if (s === undefined || node.hasClass(s)) { result.push(node); return result; } child = child.nextSibling; } } return result; }; $mList.prototype.prev = function (s) { if (s !== undefined) { if (!$mList.isClassSelector(s)) { return; } s = s.substr(1); } var result = new $mList(this.selector + " → prev", null); var len = this.length; for (var i = 0; i < len; i++) { var child = this._array[i].get().previousSibling; while (child) { var node = new $mNode(child); if (s === undefined || node.hasClass(s)) { result.push(node); return result; } child = child.previousSibling; } } return result; }; $mList.prototype.appendTo = function (item) { if (item.length === 1) { var len = this.length; var parent = item.get(0); for (var i = 0; i < len; i++) { parent.appendChild(this.get(i)); } } return this; }; $mList.prototype.after = function (item) { if (item.length > 0) { var len = this.length; for (var i = 0; i < len; i++) { var child = this.get(i); var parent = child.parentNode; if (child.nextSibling) { for (var j = 0; j < item.length; j++) { parent.insertBefore(item.get(j), child.nextSibling); } } else { for (var j = 0; j < item.length; j++) { parent.appendChild(item.get(j)); } } } } return this; }; $mList.prototype.not = function (s) { if (!$mList.isClassSelector(s)) { return; } s = s.substr(1); var result = new $mList(this.selector + " → not", null); var len = this.length; for (var i = 0; i < len; i++) { var node = this._array[i]; if (!node.hasClass(s)) { result.push(node); } } return result; }; $mList.prototype.slice = function (start, end) { var result = new $mList(this.selector + " → slice", null); var len = this.length; if (typeof end === "undefined" || end > len) { end = len; } for (var i = start; i < end; i++) { var node = this._array[i]; result.push(node); } return result; }; $mList.prototype.closest = function (s) { var classes = s.split(/[ ,]+/); for (var classIndex = 0; classIndex < classes.length; classIndex++) { if (!$mList.isClassSelector(classes[classIndex])) { return; } classes[classIndex] = classes[classIndex].substr(1); } var result = new $mList(this.selector + " → closest", null); var len = this.length; for (var i = 0; i < len; i++) { var element = this._array[i].closest(classes); if (element) { result.push(element); } } return result; }; $mList.prototype.find = function (subselector) { var result = new $mList(this.selector + " → find", null); var len = this.length; for (var i = 0; i < len; i++) { var element = this._array[i].get(); var nodeList = element.querySelectorAll(subselector); if (nodeList) { for (var j = 0, nodeListLen = nodeList.length; j < nodeListLen; j++) { result.push(new $mNode(nodeList[j])); } } } return result; }; $mList.prototype.remove = function () { var result = new $mList(this.selector + " → remove", null); var len = this.length; for (var i = 0; i < len; i++) { this._array[i].remove(); } return result; }; $mList.prototype.prepend = function (item) { if (item.length > 0) { var len = this.length; for (var i = 0; i < len; i++) { for (var j = item.length - 1; j >= 0; j--) { this._array[i].prepend(item._array[j].get()); } } } return this; }; $mList.prototype.append = function (item) { if (item.length > 0) { var len = this.length; for (var i = 0; i < len; i++) { for (var j = 0; j < item.length; j++) { this._array[i].append(item._array[j].get()); } } } return this; }; $mList.prototype.appendText = function (s) { var len = this.length; for (var i = 0; i < len; i++) { var child = this._array[i]; child.append(document.createTextNode(s)); } return this; }; $mList.prototype.replaceWith = function (item) { var len = this.length; if (len > 0 && item.length === 1) { for (var i = 0; i < len; i++) { this._array[i].replaceWith(item._array[0]); } } return this; }; $mList.prototype.select = function () { var len = this.length; for (var i = 0; i < len; i++) { this._array[i].select(); } return this; }; $mList.prototype.val = function (s) { var len = this.length; if (s !== undefined) { for (var i = 0; i < len; i++) { this._array[i].val(s); } return this; } if (len === 0) { return; } return this._array[0].val(s); }; $mList.prototype.css = function (keyOrMap, value) { var len = this.length; if (value !== undefined) { for (var i = 0; i < len; i++) { this._array[i].css(keyOrMap, value); } return this; } if (len === 0) { return; } return this._array[0].css(keyOrMap); }; $mList.prototype.click = function () { var len = this.length; for (var i = 0; i < len; i++) { this._array[i].click(); } return this; }; $mList.prototype.dblclick = function () { var len = this.length; for (var i = 0; i < len; i++) { this._array[i].dblclick(); } return this; }; $mList.prototype.bindTarget = function (target, events, fn, arg) { return this.changeBinding(target, true, events, fn, arg); }; $mList.prototype.bind = function (events, fn, arg) { return this.changeBinding(undefined, true, events, fn, arg); }; $mList.prototype.unbind = function (events, fn) { return this.changeBinding(undefined, false, events, fn); }; $mList.prototype.trigger = function (events, extra) { var eventList = events.split(" "); var len = this.length; for (var i = 0; i < len; i++) { for (var j = 0; j < eventList.length; j++) { var event = eventList[j]; if ($mList.DomEvents.indexOf(event) >= 0) { this._array[i].triggerEvent(event, extra); } else { this._array[i].triggerSpecial(event, extra); } } } return this; }; $mList.prototype.get = function (n) { if (n < 0) { n = n + this.length; } if (n >= this.length || n < 0) { return null; } return this._array[n].get(); }; $mList.prototype.first = function () { var result = new $mList(this.selector + " → first", null); if (this.length > 0) { result.push(this._array[0]); } return result; }; $mList.prototype.last = function () { var result = new $mList(this.selector + " → last", null); if (this.length > 0) { result.push(this._array[this.length - 1]); } return result; }; $mList.prototype.position = function () { var len = this.length; if (len > 0) { return this._array[0].position(); } return; }; $mList.prototype.height = function () { var len = this.length; if (len > 0) { return this._array[0].height(); } return; }; $mList.prototype.outerHeight = function (includeMargin) { var len = this.length; if (len > 0) { return this._array[0].outerHeight(includeMargin); } return; }; $mList.prototype.width = function () { var len = this.length; if (len > 0) { return this._array[0].width(); } return; }; $mList.prototype.outerWidth = function (includeMargin) { var len = this.length; if (len > 0) { return this._array[0].outerWidth(includeMargin); } return; }; $mList.isClassSelector = function (selector) { if (selector[0] !== ".") { return false; } if (selector.indexOf(",") !== -1) { return false; } if (selector.indexOf("#") !== -1) { return false; } if (selector.indexOf(">") !== -1) { return false; } if (selector.indexOf(" ") !== -1) { return false; } if (selector.indexOf("[") !== -1) { return false; } return true; }; $mList.prototype.push = function (mNode) { this._array.push(mNode); }; $mList.prototype.changeBinding = function (target, isBind, events, fn, arg) { var eventList = events.split(" "); var len = this.length; for (var i = 0; i < len; i++) { for (var j = 0; j < eventList.length; j++) { var event = eventList[j]; if ($mList.DomEvents.indexOf(event) >= 0) { this._array[i].changeEventBinding(isBind, target, event, fn, arg); } else { this._array[i].changeSpecialBinding(isBind, target, event, fn, arg); } } } return this; }; $mList.DomEvents = [ "click", "dblclick", "mousedown", "mouseup", "mousemove", "mouseover", "mouseout", "contextmenu", "focus", "blur", "focusin", "focusout", "keydown", "keyup", "keypress", "change", "reset", "select", "submit" ]; return $mList; })(); // mNode.ts var $mNode = (function () { function $mNode(node) { this.length = 1; this._node = node; } $mNode.prototype.get = function () { return this._node; }; $mNode.prototype.is = function (s) { if (!(this._node instanceof HTMLElement)) { throw "$mNode.is(s: string) : boolean - can only be called on HTML elements"; } var element = this._node; if (s === ":hidden") { return element.style.display === "none"; } else if (s === ":visible") { return element.style.display !== "none"; } throw "$mNode.is(s: string) : boolean - can only be called with :hidden or :visible"; }; $mNode.prototype.hide = function () { if (!(this._node instanceof HTMLElement) && !(this._node instanceof SVGElement)) { throw "$mNode.hide(): IQueryNode - can only be called on HTML or SVG elements"; } var element = this._node; element.style.display = "none"; return this; }; $mNode.prototype.show = function () { if (!(this._node instanceof HTMLElement) && !(this._node instanceof SVGElement)) { throw "$mNode.show(): IQueryNode - can only be called on HTML or SVG elements"; } var element = this._node; element.style.display = ""; var style = element.ownerDocument.parentWindow.getComputedStyle(element); var display = style.display; if (display === "none") { element.style.display = "block"; } return this; }; $mNode.prototype.placeholder = function (s) { if (!(this._node instanceof HTMLInputElement)) { throw "$mNode.placeholder(s: string): IQueryNode - can only be called on HTMLInput elements"; } var element = this._node; element.placeholder = s; return this; }; $mNode.prototype.focus = function () { var element = this._node; element.focus(); return this; }; $mNode.prototype.scrollTop = function (value) { if (!(this._node instanceof HTMLElement)) { throw "$mNode.scrollTop(value?: number): number - can only be called on HTML elements"; } var element = this._node; if (value !== undefined) { return element.scrollTop; } element.scrollTop = value; return value; }; $mNode.prototype.addClass = function (className) { if (!(this._node instanceof HTMLElement)) { throw "$mNode.addClass(className: string) - can only be called on HTML elements"; } var element = this._node; if (!element.classList.contains(className)) { element.classList.add(className); } }; $mNode.prototype.removeClass = function (className) { if (!(this._node instanceof HTMLElement)) { throw "$mNode.removeClass(className: string) - can only be called on HTML elements"; } var element = this._node; if (element.classList.contains(className)) { element.classList.remove(className); } }; $mNode.prototype.hasClass = function (className) { if (!(this._node instanceof HTMLElement)) { return false; } var element = this._node; return element.classList && element.classList.contains(className); }; $mNode.prototype.scrollLeft = function (value) { if (!(this._node instanceof Element)) { throw "$mNode.scrollLeft(value?: number): number - can only be called on Elements"; } var element = this._node; if (value !== undefined) { return element.scrollLeft; } element.scrollLeft = value; return value; }; $mNode.prototype.data = function (key, value) { var data = this._node[$mNode.DATA_KEY]; if (!data) { this._node[$mNode.DATA_KEY] = data = {}; } if (key === undefined) { return data; } if (value !== undefined) { data[key] = value; } else { return data[key]; } return data; }; $mNode.prototype.attr = function (attributeName) { if (!(this._node instanceof Element)) { throw "$mNode.attr(attributeName: string): string - can only be called on Elements"; } var element = this._node; var result = element[attributeName]; if (result === undefined) { result = element.getAttribute(attributeName); } return result === null ? undefined : result; }; $mNode.prototype.removeAttr = function (attributeName) { if (!(this._node instanceof Element)) { throw "$mNode.removeAttr(attributeName: string): string - can only be called on Elements"; } var element = this._node; element.removeAttribute(attributeName); }; $mNode.prototype.matchAttr = function (attributeName, value) { if (!(this._node instanceof Element)) { throw "$mNode.matchAttr(attributeName: string, value: string) - can only be called on Elements"; } var element = this._node; return element.getAttribute(attributeName) === value; }; $mNode.prototype.setAttr = function (attributeName, setValue) { if (!(this._node instanceof Element)) { throw "$mNode.setAttr(attributeName: string, setValue: any): void - can only be called on Elements"; } var element = this._node; element.setAttribute(attributeName, setValue); }; $mNode.prototype.parent = function (s) { if (!(this._node instanceof HTMLElement)) { return; } var parentNode = this._node.parentNode; return s === undefined || parentNode.classList.contains(s) ? new $mNode(parentNode) : undefined; }; $mNode.prototype.parents = function (s) { if (!(this._node instanceof HTMLElement)) { throw "$mNode.parents(s: string): IQueryNode - can only be called on HTML elements"; } var node = this._node; var results = []; while (node.parentNode instanceof HTMLElement) { var node = node.parentNode; if (node.classList.contains(s)) { results.push(new $mNode(node)); } } return results; }; $mNode.prototype.text = function (s) { if (!(this._node instanceof HTMLElement)) { throw "$mNode.text(s?: string): string - can only be called on HTML elements"; } var element = this._node; if (s === undefined) { return element.innerText; } element.innerText = s; return s; }; $mNode.prototype.html = function (htmlString) { if (!(this._node instanceof HTMLElement)) { throw "$mNode.html(htmlString?: string): string - can only be called on HTML elements"; } var element = this._node; if (htmlString === undefined) { return element.innerHTML; } element.innerHTML = htmlString; return htmlString; }; $mNode.prototype.remove = function () { if (this._node.parentNode) { this._node.parentNode.removeChild(this._node); } }; $mNode.prototype.prepend = function (node) { this._node.insertBefore(node, this._node.firstChild); }; $mNode.prototype.append = function (node) { this._node.appendChild(node); }; $mNode.prototype.replaceWith = function (node) { var parent = this._node.parentNode; if (parent) { var nextSibling = this._node.nextSibling; parent.removeChild(this._node); var replacement = node._node; if (nextSibling) { parent.insertBefore(replacement, nextSibling); } else { parent.appendChild(replacement); } } }; $mNode.prototype.select = function () { if (!(this._node instanceof HTMLElement)) { throw "$mNode.select() - can only be called on HTML elements"; } var element = this._node; element.select(); }; $mNode.prototype.val = function (s) { if (!(this._node instanceof HTMLInputElement)) { throw "$mNode.val(): string - can only be called on HTMLInput elements"; } var element = this._node; if (s === undefined) { var value = element.value; if (typeof value === "string") { return value.replace(/\r/g, ""); } if (value === undefined || value === null) { return ""; } return value; } element.value = s; }; $mNode.prototype.closest = function (classes) { var element = this._node; while (element) { if (element.classList) { for (var i = 0; i < classes.length; i++) { if (element.classList.contains(classes[i])) { return new $mNode(element); } } } element = element.parentNode; } }; $mNode.prototype.css = function (keyOrMap, value) { if (keyOrMap && typeof keyOrMap === "object") { var map = keyOrMap; for (var key in map) { this.css(key, map[key]); } } else { var key = keyOrMap; var element = this._node; if (value !== undefined) { element.style[key] = value; } return element.style ? element.style[key] : undefined; } }; $mNode.prototype.click = function () { if (!(this._node instanceof HTMLElement)) { throw "$mNode.click(): IQueryNode - can only be called on HTML elements"; } var element = this._node; element.click(); return this; }; $mNode.prototype.dblclick = function () { if (!(this._node instanceof HTMLElement)) { throw "$mNode.dblclick(): IQueryNode - can only be called on HTML elements"; } var element = this._node; element.fireEvent("ondblclick"); }; $mNode.prototype.changeEventBinding = function (isBind, target, event, fn, arg) { var element = this._node; var name = "on" + event; var oldBinding = element[name]; var newBinding; var currentFuncs = oldBinding && oldBinding.boundFuncList ? oldBinding.boundFuncList : []; var index; if (isBind) { currentFuncs.push(fn); } else if (fn) { index = currentFuncs.indexOf(fn); if (index >= 0) { currentFuncs.splice(index, 1); } } else { currentFuncs = []; } if (currentFuncs.length) { if (target === undefined) { target = element; } newBinding = function (e) { var i; var bubble = true; e.target = target; for (i = 0; i < currentFuncs.length; i++) { var result = currentFuncs[i].call(target, e, arg); if (!result && typeof result === "boolean") { e.preventDefault(); e.stopPropagation(); bubble = false; } } return bubble; }; newBinding.boundFuncList = currentFuncs; } element[name] = newBinding; return this; }; $mNode.prototype.triggerEvent = function (event, extra) { var element = this._node; var trigger = element[event]; if (trigger) { trigger.call(element, {}, extra); } return this; }; $mNode.prototype.changeSpecialBinding = function (isBind, target, event, fn, arg) { var element = this._node; var key = $mNode.BINDING_KEY + event; element[key] = isBind ? fn : undefined; return this; }; $mNode.prototype.triggerSpecial = function (event, extra) { var element = this._node; var key = $mNode.BINDING_KEY + event; var trigger = element[key]; if (trigger) { trigger.call(element, {}, extra); } return this; }; $mNode.prototype.position = function () { var element = this._node; var position = { top: element.offsetTop, left: element.offsetLeft }; return position; }; $mNode.prototype.height = function () { var element = this._node; var height = element.getBoundingClientRect().height; var compStyle = window.getComputedStyle(element, null); height -= parseInt(compStyle.paddingTop, 10); height -= parseInt(compStyle.paddingBottom, 10); height -= parseInt(compStyle.borderTopWidth, 10); height -= parseInt(compStyle.borderBottomWidth, 10); return height; }; $mNode.prototype.outerHeight = function (includeMargin) { var element = this._node; var outerHeight = element.getBoundingClientRect().height; if (includeMargin) { var compStyle = window.getComputedStyle(element, null); outerHeight += parseInt(compStyle.marginTop, 10); outerHeight += parseInt(compStyle.marginBottom, 10); } return outerHeight; }; $mNode.prototype.width = function () { var element = this._node; var width = element.getBoundingClientRect().width; var compStyle = window.getComputedStyle(element, null); width -= parseInt(compStyle.paddingLeft, 10); width -= parseInt(compStyle.paddingRight, 10); width -= parseInt(compStyle.borderLeftWidth, 10); width -= parseInt(compStyle.borderRightWidth, 10); return width; }; $mNode.prototype.outerWidth = function (includeMargin) { var element = this._node; var outerWidth = element.getBoundingClientRect().width; if (includeMargin) { var compStyle = window.getComputedStyle(element, null); outerWidth += parseInt(compStyle.marginLeft, 10); outerWidth += parseInt(compStyle.marginRight, 10); } return outerWidth; }; $mNode.BINDING_KEY = "$BPT$Binding$"; $mNode.DATA_KEY = "$BPT$QueryData$"; return $mNode; })(); // dataTreeView.ts "use strict"; var DataTreeView = (function () { function DataTreeView() { } DataTreeView.getChildren = function (item) { if (item.hasClass("BPT-DataTree-Container")) { return item.children().first().children(".BPT-DataTreeItem-ChildCollection").children(".BPT-DataTreeItem"); } return item.children(".BPT-DataTreeItem-ChildCollection").children(".BPT-DataTreeItem"); }; DataTreeView.getName = function (item) { var nameNode = item.find("span.BPT-DataTreeItem-Name").first(); var cssName = nameNode.children(".BPT-HTML-CSS-Name"); return (cssName.length === 1 ? cssName : nameNode); }; DataTreeView.getValue = function (item) { var valueNode = item.find("span.BPT-DataTreeItem-Value").first(); var cssValue = valueNode.children(".BPT-HTML-CSS-Value"); return (cssValue.length === 1 ? cssValue : valueNode); }; DataTreeView.clear = function (item) { item.children(".BPT-DataTreeItem-ChildCollection").remove(); if (item.hasClass("BPT-DataTree-Container")) { item.children().first().children(".BPT-DataTreeItem-ChildCollection").remove(); } return item; }; return DataTreeView; })(); // App.ts var Common; (function (Common) { "use strict"; var App = (function () { function App() { } Object.defineProperty(App.prototype, "diagnosticsBridge", { get: function () { return this._diagnosticsBridge; }, enumerable: true, configurable: true }); App.prototype.main = function () { var externalObj; if (window.parent.getExternalObj) { externalObj = window.parent.getExternalObj(); } else if (window.external) { externalObj = window.external; } if (Plugin && Plugin.F12) { this._diagnosticsBridge = new Common.IEDiagnosticsBridge(externalObj); } else { var proxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("F12.Common.Bridge.IDomBridge", this, true); this._diagnosticsBridge = new Common.DiagnosticsBridge(proxy); } if (document.documentMode < 10) { window.navigate("about:blank"); return; } this.onStartup(); }; App.prototype.onStartup = function () { }; return App; })(); Common.App = App; })(Common || (Common = {})); // range.ts var Common; (function (Common) { (function (Templating) { "use strict"; var Range = (function () { function Range(firstIndex, lastIndex, content, isFromComplexBlock, isStart, rangeType) { this.firstIndex = firstIndex; this.lastIndex = lastIndex; this.content = content; this.isFromComplexBlock = isFromComplexBlock; this.isStart = isStart; this.rangeType = rangeType; } return Range; })(); Templating.Range = Range; })(Common.Templating || (Common.Templating = {})); var Templating = Common.Templating; })(Common || (Common = {})); // rangeFinder.ts var Common; (function (Common) { (function (Templating) { "use strict"; var RangeFinder = (function () { function RangeFinder() { } RangeFinder.prototype.findRanges = function (text) { var result = []; if (!text || text.length === 0) { return result; } result = result.concat(this.internalFindRanges("##forEach(", ")##", text, "forEach", true)); result = result.concat(this.internalFindRanges("##endForEach##", null, text, "forEach", false)); result = result.concat(this.internalFindRanges("##if(", ")##", text, "if", true)); result = result.concat(this.internalFindRanges("##endIf##", null, text, "if", false)); result = result.concat(this.internalFindRanges("##include(", ")##", text, "include", false)); result.sort(this.compareRanges); result = result.concat(this.findRemainingRanges(text, result)); result.sort(this.compareRanges); return result; }; RangeFinder.prototype.compareRanges = function (a, b) { if (a.firstIndex === b.firstIndex) { return 0; } return a.firstIndex < b.firstIndex ? -1 : 1; }; RangeFinder.prototype.internalFindRanges = function (startsWith, endsWith, textToSearch, rangeType, isStart) { var indexStartsWith; var minimumIndex = 0; var indexEndsWith; var results = []; var content; var lastIndex; while (minimumIndex < textToSearch.length) { indexStartsWith = textToSearch.indexOf(startsWith, minimumIndex); indexEndsWith = null; content = null; lastIndex = null; if (indexStartsWith === -1) { return results; } if (endsWith) { minimumIndex = indexStartsWith + startsWith.length + 1; if (minimumIndex >= textToSearch.length) { return results; } indexEndsWith = textToSearch.indexOf(endsWith, minimumIndex); if (indexEndsWith === -1) { return results; } content = textToSearch.substring(indexStartsWith + startsWith.length, indexEndsWith); lastIndex = indexEndsWith + endsWith.length - 1; } else { lastIndex = indexStartsWith + startsWith.length - 1; } results.push(new Templating.Range(indexStartsWith, lastIndex, content, true, isStart, rangeType)); minimumIndex = results[results.length - 1].lastIndex + 1; } return results; }; RangeFinder.prototype.findRemainingRanges = function (text, rangesFound) { var result = []; if (rangesFound.length === 0) { result.push(new Templating.Range(0, text.length - 1, text, false, false, "text")); return result; } var startIndex = 0; var precedingGapLength; for (var i = 0; i < rangesFound.length; i++) { precedingGapLength = rangesFound[i].firstIndex - startIndex; if (precedingGapLength > 0) { result.push(new Templating.Range(startIndex, startIndex + precedingGapLength - 1, text.substring(startIndex, startIndex + precedingGapLength), false, false, "text")); } startIndex = rangesFound[i].lastIndex + 1; } if (startIndex < text.length - 1) { result.push(new Templating.Range(startIndex, text.length - 1, text.substring(startIndex, text.length), false, false, "text")); } return result; }; return RangeFinder; })(); Templating.RangeFinder = RangeFinder; })(Common.Templating || (Common.Templating = {})); var Templating = Common.Templating; })(Common || (Common = {})); // block.ts var Common; (function (Common) { (function (Templating) { "use strict"; var Block = (function () { function Block() { this.blocks = []; } Block.prototype.addBlock = function (block) { this.blocks.push(block); }; Block.prototype.process = function (obj) { return ""; }; return Block; })(); Templating.Block = Block; })(Common.Templating || (Common.Templating = {})); var Templating = Common.Templating; })(Common || (Common = {})); // ifBlock.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Templating) { "use strict"; var IfBlock = (function (_super) { __extends(IfBlock, _super); function IfBlock(range, text) { _super.call(this); this._negate = false; this._decisionVariable = range.content; if (this._decisionVariable[0] === "!") { this._negate = true; this._decisionVariable = this._decisionVariable.substr(1); } this.containerType = "if"; } IfBlock.prototype.process = function (obj) { var result = ""; var decisionValue = obj[this._decisionVariable]; if (typeof decisionValue === "function") { var decisionFunction = decisionValue; decisionValue = decisionFunction.call(obj); } if (this._negate) { decisionValue = !decisionValue; } if (decisionValue) { for (var i = 0; i < this.blocks.length; i++) { result = result + this.blocks[i].process(obj); } } return result; }; return IfBlock; })(Templating.Block); Templating.IfBlock = IfBlock; })(Common.Templating || (Common.Templating = {})); var Templating = Common.Templating; })(Common || (Common = {})); // forEachBlock.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Templating) { "use strict"; var ForEachBlock = (function (_super) { __extends(ForEachBlock, _super); function ForEachBlock(range, text) { _super.call(this); this._iterationVariable = range.content; this.containerType = "forEach"; } ForEachBlock.prototype.process = function (obj) { var result = ""; var collection = obj[this._iterationVariable]; var i, j; for (i = 0; i < collection.length; i++) { var item = collection[i]; for (j = 0; j < this.blocks.length; j++) { result = result + this.blocks[j].process(item); } } return result; }; return ForEachBlock; })(Templating.Block); Templating.ForEachBlock = ForEachBlock; })(Common.Templating || (Common.Templating = {})); var Templating = Common.Templating; })(Common || (Common = {})); // textBlock.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Templating) { "use strict"; var TextBlock = (function (_super) { __extends(TextBlock, _super); function TextBlock(range) { _super.call(this); this._text = range.content; this.containerType = "text"; } TextBlock.prototype.process = function (model) { var replaceWhat; var text = this._text; while (replaceWhat = this.findNextDelimitedString(text)) { var propertyPath = replaceWhat.substring(TextBlock.DelimiterLength, replaceWhat.length - TextBlock.DelimiterLength); var replaceWith = ""; var subModel = model; propertyPath.split(".").forEach(function (value, index, array) { if (!subModel) { return; } subModel = subModel[value]; }); if (typeof subModel !== "undefined" && subModel !== null) { if (typeof subModel === "string") { replaceWith = subModel; } else { replaceWith = subModel.toString(); } } replaceWith = replaceWith.replace(TextBlock.GTRegex, ">").replace(TextBlock.LTRegex, "<").replace(TextBlock.DoubleQuoteRegex, """).replace(TextBlock.SingleQuoteRegex, "'").replace(TextBlock.DollarRegex, "$$$$"); text = text.replace(replaceWhat, replaceWith); } return text; }; TextBlock.prototype.findNextDelimitedString = function (s) { var allResults = TextBlock.DelimiterRegex.exec(s); if (!allResults) { return null; } return allResults[0]; }; TextBlock.DelimiterRegex = /%%[$a-zA-Z_][$a-zA-Z0-9_]*(\.[$a-zA-Z_][$a-zA-Z0-9_]*)*%%/; TextBlock.GTRegex = />/g; TextBlock.LTRegex = /= newList.length) { this._deleteCallback(oldList[oldIndex++]); } else if (oldIndex >= oldList.length) { this._insertBeforeCallback(newList[newIndex++], oldIndex < oldList.length ? oldList[oldIndex] : null); } else if (newList[newIndex][this._idPropertyName] === oldList[oldIndex][this._idPropertyName]) { if (this._isChanged(newList[newIndex], oldList[oldIndex])) { this._updateCallback(newList[newIndex], oldList[oldIndex]); if (this._clearDirtyFlag) { this._clearDirtyFlag(newList[newIndex]); } } newIndex++; oldIndex++; } else if (newList[newIndex][this._sortPropertyName] > oldList[oldIndex][this._sortPropertyName]) { this._deleteCallback(oldList[oldIndex++]); } else { this._insertBeforeCallback(newList[newIndex++], oldList[oldIndex]); } } }; return ListReconciler; })(); ModelView.ListReconciler = ListReconciler; })(Common.ModelView || (Common.ModelView = {})); var ModelView = Common.ModelView; })(Common || (Common = {})); // reconcilingListView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (ModelView) { "use strict"; var ReconcilingListView = (function (_super) { __extends(ReconcilingListView, _super); function ReconcilingListView(htmlElementSource, listViewDivId, defaultItemTemplateId, model, alternateTemplates, localizer, idPropertyName, sortPropertyName, isChanged, clearDirtyFlag) { _super.call(this, htmlElementSource, listViewDivId, defaultItemTemplateId, model, alternateTemplates, localizer); this.objectsPreviouslyRendered = []; this.htmlElementSource = htmlElementSource; this.listViewDivId = listViewDivId; this.idPropertyName = idPropertyName; this._sortPropertyName = sortPropertyName; if (this.idPropertyName && this._sortPropertyName) { this.listReconciler = new ModelView.ListReconciler(idPropertyName, sortPropertyName, this.insertBefore.bind(this), this.update.bind(this), this.deleteItem.bind(this), isChanged, clearDirtyFlag); } } ReconcilingListView.prototype.renderView = function () { if (!this.listReconciler) { _super.prototype.renderView.call(this); return; } this.preViewProcessing(); this.listReconciler.reconcile(this.objectsPreviouslyRendered, this.model.cache); this.objectsPreviouslyRendered = this.model.cache.slice(0); this.postViewProcessing(); if (this.renderViewCallback) { this.renderViewCallback(); } }; ReconcilingListView.prototype.beforeUpdate = function (newThing, oldThing, updatedElement) { }; ReconcilingListView.prototype.afterUpdate = function (newThing, oldThing, updatedElement) { }; ReconcilingListView.prototype.beforeDelete = function (oldThing, deletedElement) { }; ReconcilingListView.prototype.afterDelete = function () { }; ReconcilingListView.prototype.clearView = function () { _super.prototype.clearView.call(this); this.objectsPreviouslyRendered = []; }; ReconcilingListView.prototype.insertBefore = function (newThing, insertBefore) { var newElement = this.renderItem(newThing, ReconcilingListView.ListItemClassName); if (!insertBefore) { this.listRoot.appendChild(newElement); return; } var insertBeforeElement = this.listRoot.querySelector("[data-listid='" + insertBefore[this.idPropertyName] + "']"); if (insertBeforeElement) { this.listRoot.insertBefore(newElement, insertBeforeElement); } else { this.listRoot.appendChild(newElement); } }; ReconcilingListView.prototype.update = function (newThing, oldThing) { var oldElement = this.listRoot.querySelector("[data-listid='" + oldThing[this.idPropertyName] + "']"); if (oldElement) { this.beforeUpdate(newThing, oldThing, oldElement); var newElementText = this.renderItemText(newThing); oldElement.outerHTML = newElementText; oldElement.classList.add(ReconcilingListView.ListItemClassName); this.afterUpdate(newThing, oldThing, oldElement); } }; ReconcilingListView.prototype.deleteItem = function (thingToDelete) { var oldElement = this.listRoot.querySelector("[data-listid='" + thingToDelete[this.idPropertyName] + "']"); if (oldElement) { this.beforeDelete(thingToDelete, oldElement); oldElement.removeNode(true); this.afterDelete(); } }; ReconcilingListView.ListItemClassName = "BPT-List-Item"; return ReconcilingListView; })(ModelView.ListView); ModelView.ReconcilingListView = ReconcilingListView; })(Common.ModelView || (Common.ModelView = {})); var ModelView = Common.ModelView; })(Common || (Common = {})); // control.ts var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var Control = (function () { function Control(root) { this._rootElement = root; if (typeof this._rootElement === "undefined") { this._rootElement = document.createElement("div"); this._rootElement.style.width = this._rootElement.style.height = "100%"; } else if (this._rootElement === null) { throw new Error("Invalid root element for Control."); } } Object.defineProperty(Control.prototype, "rootElement", { get: function () { return this._rootElement; }, set: function (newRoot) { if (!newRoot) { throw new Error("Invalid root"); } var oldRoot = this._rootElement; this._rootElement = newRoot; if (oldRoot && oldRoot.parentNode) { oldRoot.parentNode.replaceChild(newRoot, oldRoot); } }, enumerable: true, configurable: true }); Object.defineProperty(Control.prototype, "parent", { get: function () { return this._parent; }, set: function (newParent) { if (this._parent !== newParent) { this._parent = newParent; if (this._parent && !this._parent.rootElement.contains(this._rootElement)) { this._parent.appendChild(this); } this.onParentChanged(); } }, enumerable: true, configurable: true }); Control.prototype.appendChild = function (child) { this._rootElement.appendChild(child.rootElement); child.parent = this; }; Control.prototype.removeChild = function (child) { if (child.rootElement.parentElement) { this._rootElement.removeChild(child.rootElement); child.parent = null; } }; Control.prototype.onParentChanged = function () { }; return Control; })(); Legacy.Control = Control; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // contentControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var ContentControl = (function (_super) { __extends(ContentControl, _super); function ContentControl() { _super.call(this); } Object.defineProperty(ContentControl.prototype, "content", { get: function () { return this._content; }, set: function (newContent) { if (this._content !== newContent) { if (this._content) { this.removeChild(this._content); } this._content = newContent; this.appendChild(this._content); this.onContentChanged(); } }, enumerable: true, configurable: true }); ContentControl.prototype.appendChild = function (child) { if (this.rootElement.children.length !== 0) { throw new Error("Only one child is allowed in a content control."); } _super.prototype.appendChild.call(this, child); }; ContentControl.prototype.onContentChanged = function () { }; return ContentControl; })(Legacy.Control); Legacy.ContentControl = ContentControl; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // templateControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var TemplateControl = (function (_super) { __extends(TemplateControl, _super); function TemplateControl(templateName, templateRepository) { _super.call(this); this._idPostfix = TemplateControl.GlobalIdPostfix++; if (templateName) { this.setTemplateFromName(templateName, templateRepository); } } TemplateControl.prototype.setTemplateFromName = function (templateName, templateRepository) { if (templateRepository) { var htmlContent = templateRepository.getTemplateString(templateName); this.setTemplateFromHTML(htmlContent); } else { var root = this.getTemplateElementCopy(templateName); this.adjustElementIds(root); this.rootElement = root; } }; TemplateControl.prototype.setTemplateFromHTML = function (htmlContent) { var root = this.getTemplateElementFromHTML(htmlContent); this.adjustElementIds(root); this.rootElement = root; }; TemplateControl.prototype.findElement = function (id) { var fullId = id + this._idPostfix; return this.forAllSelfAndDescendants(this.rootElement, function (elem) { if (elem.id && elem.id === fullId) { return false; } return true; }); }; TemplateControl.prototype.findElementsByClassName = function (className) { var elements = []; this.forAllSelfAndDescendants(this.rootElement, function (elem) { if (elem.classList && elem.classList.contains(className)) { elements.push(elem); } return true; }); return elements; }; TemplateControl.prototype.getTemplateElementCopy = function (templateName) { var templateElement = document.getElementById(templateName); if (!templateElement) { throw new Error("Couldn't find the template with name: " + templateName); } if (templateElement.tagName.toLowerCase() !== "script") { throw new Error("Expecting the template container to be a script element."); } return this.getTemplateElementFromHTML(templateElement.innerHTML); }; TemplateControl.prototype.getTemplateElementFromHTML = function (htmlContent) { var root = this.getTemplateRootElement(); root.innerHTML = htmlContent; if (root.childElementCount === 1) { root = root.firstElementChild; } return root; }; TemplateControl.prototype.getTemplateRootElement = function () { var div = document.createElement("div"); div.style.width = div.style.height = "100%"; return div; }; TemplateControl.prototype.adjustElementIds = function (root) { var idPostfix = this._idPostfix; this.forAllSelfAndDescendants(root, function (elem) { if (elem.id) { elem.id = elem.id + idPostfix; } return true; }); }; TemplateControl.prototype.forAllSelfAndDescendants = function (root, func) { var brokeAtElement = null; if (!func(root)) { brokeAtElement = root; } else { if (root.children) { var children = root.children; var childrenLength = children.length; for (var i = 0; i < childrenLength; i++) { brokeAtElement = this.forAllSelfAndDescendants(children[i], func); if (brokeAtElement) { break; } } } } return brokeAtElement; }; TemplateControl.GlobalIdPostfix = 1; return TemplateControl; })(Common.Controls.Legacy.Control); Legacy.TemplateControl = TemplateControl; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // CutCopyPasteContextMenu.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var CutCopyPasteContextMenu = (function () { function CutCopyPasteContextMenu(element, onModifyCallback) { var _this = this; this._element = element; this._onModifyCallback = onModifyCallback; this._isActive = false; this._element.addEventListener("contextmenu", function (e) { return _this.handleContextMenu(e); }); if (this._element instanceof HTMLInputElement) { this._element.addEventListener("keyup", function (e) { return _this.handleKeyUp(e); }); } } Object.defineProperty(CutCopyPasteContextMenu.prototype, "isActive", { get: function () { return this._isActive; }, enumerable: true, configurable: true }); CutCopyPasteContextMenu.prototype.show = function (clientX, clientY) { var _this = this; var x = clientX; var y = clientY; var selectedText = ""; if (this._element instanceof HTMLInputElement) { var inputElement = this._element; var copyStart = inputElement.selectionStart; var copyEnd = inputElement.selectionEnd; selectedText = inputElement.value.substring(copyStart, copyEnd); if (x <= 0 || y <= 0) { var range = inputElement.createTextRange(); range.move("character", copyStart); x = range.offsetLeft; y = range.offsetTop; } } else { var selections = window.getSelection(); if (selections.rangeCount === 1) { var selectionRange = selections.getRangeAt(0); if (selectionRange.startContainer.parentNode === this._element && selectionRange.endContainer.parentNode === this._element) { selectedText = selectionRange.toString(); } } } var menuItems = []; if (this._element instanceof HTMLInputElement) { menuItems.push({ id: "menuInputBoxCut", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CutMenuText"), accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlX") }); } menuItems.push({ id: "menuInputBoxCopy", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyMenuText"), accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlC") }); if (this._element instanceof HTMLInputElement) { menuItems.push({ id: "menuInputBoxPaste", type: 1 /* command */, label: Plugin.Resources.getString("/Common/PasteMenuText"), accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlV") }); } var callback = function (menuId, menuItem, targetId) { _this.invokeContextMenu(menuId, menuItem, selectedText, copyStart, copyEnd); }; var contextMenu = Plugin.ContextMenu.create(menuItems, null, null, null, callback); contextMenu.addEventListener("dismiss", function () { contextMenu.dispose(); _this._isActive = false; }); contextMenu.attach(this._element); this._isActive = true; contextMenu.show(x, y); }; CutCopyPasteContextMenu.prototype.invokeContextMenu = function (menuId, menuItem, selectedText, copyStart, copyEnd) { if (!selectedText) { selectedText = this._element.textContent || this._element.value; } var pasteText = clipboardData.getData("Text"); var inputElement = this._element; switch (menuItem.id) { case "menuInputBoxCut": clipboardData.setData("Text", selectedText); inputElement.value = inputElement.value.substring(0, copyStart) + inputElement.value.substring(copyEnd); if (this._onModifyCallback) { this._onModifyCallback(); } this._element.focus(); inputElement.setSelectionRange(copyStart, copyStart); break; case "menuInputBoxPaste": if (pasteText) { var range = inputElement.createTextRange(); range.move("character", copyStart); range.moveEnd("character", copyEnd - copyStart); range.text = pasteText; if (this._onModifyCallback) { this._onModifyCallback(); } this._element.focus(); inputElement.setSelectionRange(inputElement.value.length, inputElement.value.length); } break; case "menuInputBoxCopy": clipboardData.setData("Text", selectedText); this._element.focus(); break; } }; CutCopyPasteContextMenu.prototype.handleContextMenu = function (event) { this.show(event.clientX, event.clientY); event.stopImmediatePropagation(); event.preventDefault(); return false; }; CutCopyPasteContextMenu.prototype.handleKeyUp = function (e) { if (e.keyCode === 121 /* F10 */ && e.shiftKey && !e.ctrlKey && !e.altKey) { this.show(0, 0); e.stopImmediatePropagation(); e.preventDefault(); return false; } }; return CutCopyPasteContextMenu; })(); Debugger.CutCopyPasteContextMenu = CutCopyPasteContextMenu; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // listBox.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var ListBoxItem = (function () { function ListBoxItem(value, text, info, itemClass) { this.index = -1; this.value = value; this.text = text; this.info = info || ""; this.itemClass = itemClass || ""; } return ListBoxItem; })(); Legacy.ListBoxItem = ListBoxItem; var ListBox = (function (_super) { __extends(ListBox, _super); function ListBox(templateName, listItemElementType, listItemElementClass) { var _this = this; _super.call(this, templateName); if (!templateName) { this.setTemplateFromHTML("
      "); } this.rootElement.setAttribute("tabindex", "0"); this.rootElement.setAttribute("role", "listbox"); this.rootElement.onkeydown = function (e) { return _this.onKeyDown(e); }; this._listItemElementType = listItemElementType || "li"; this._listItemElementClass = listItemElementClass || ""; this._listItemContainers = []; this._selectedIndex = -1; if (!this.rootElement.id) { this.rootElement.id = ListBox.getUniqueID(); } } Object.defineProperty(ListBox.prototype, "selectedItemChanged", { get: function () { return this._onSelectedItemChanged; }, set: function (value) { this._onSelectedItemChanged = value; }, enumerable: true, configurable: true }); Object.defineProperty(ListBox.prototype, "selectedIndexChanged", { get: function () { return this._onSelectedIndexChanged; }, set: function (value) { this._onSelectedIndexChanged = value; }, enumerable: true, configurable: true }); Object.defineProperty(ListBox.prototype, "itemDoubleClicked", { get: function () { return this._onItemDoubleClicked; }, set: function (value) { this._onItemDoubleClicked = value; }, enumerable: true, configurable: true }); Object.defineProperty(ListBox.prototype, "listItems", { get: function () { return this._listItems; }, set: function (value) { this.fireBuildListBoxStartEvent(); this.selectedIndex = -1; this._listItems = []; var itemIdx = 0; if (value) { for (; itemIdx < value.length; ++itemIdx) { var item = value[itemIdx]; item.index = itemIdx; this._listItems.push(item); if (itemIdx < this._listItemContainers.length) { this._listItemContainers[itemIdx].item = item; this._listItemContainers[itemIdx].rootElement.style.display = "list-item"; this._listItemContainers[itemIdx].rootElement.removeAttribute("aria-hidden"); } else { var itemContainer = this.createListItemContainer(item); this._listItemContainers.push(itemContainer); this.appendChild(itemContainer); } } } this.resetUnusedItems(itemIdx); this.fireBuildListBoxEndEvent(); }, enumerable: true, configurable: true }); Object.defineProperty(ListBox.prototype, "listItemHeight", { get: function () { if (typeof this._listItemHeight === "undefined") { if (this.listItems.length > 0) { this._listItemHeight = this._listItemContainers[0].rootElement.offsetHeight; } else { return ListBox.DEFAULT_LIST_ITEM_HEIGHT; } } return this._listItemHeight; }, enumerable: true, configurable: true }); Object.defineProperty(ListBox.prototype, "itemContainers", { get: function () { return this._listItemContainers; }, enumerable: true, configurable: true }); Object.defineProperty(ListBox.prototype, "selectedIndex", { get: function () { return this._selectedIndex; }, set: function (value) { if (this._selectedIndex !== value) { var oldIdx = this._selectedIndex; this._selectedIndex = value; if (oldIdx >= 0) { var oldItem = this._listItemContainers[oldIdx]; oldItem.selected = false; } if (value >= 0 && value < this._listItemContainers.length) { var newItem = this._listItemContainers[value]; newItem.selected = true; if (value !== oldIdx) { if (this._onSelectedIndexChanged) { this._onSelectedIndexChanged(value); } if (this._onSelectedItemChanged) { this._onSelectedItemChanged(this._listItems[value]); } } } } }, enumerable: true, configurable: true }); Object.defineProperty(ListBox.prototype, "selectedItem", { get: function () { var i = this.selectedIndex; if (i >= 0) { return this._listItems[i]; } return null; }, set: function (value) { var oldIdx = this.selectedIndex; var newIdx = this._listItems.indexOf(value); this.selectedIndex = newIdx; }, enumerable: true, configurable: true }); ListBox.prototype.scrollIntoView = function (item, alignToTop) { var index = this._listItems.indexOf(item); if (index >= 0) { var itemElement = this._listItemContainers[index].rootElement; var rect = itemElement.getBoundingClientRect(); var topLeftCornerElement = document.elementFromPoint(rect.left + 1, rect.top + 1); var bottomRightCornerElement = document.elementFromPoint(rect.right - 1, rect.bottom - 1); if (topLeftCornerElement !== itemElement || bottomRightCornerElement !== itemElement) { this._listItemContainers[index].rootElement.scrollIntoView(alignToTop); } } }; ListBox.prototype.createListItemContainer = function (item) { return new ListBoxItemContainer(this, item, this._listItemElementType, this._listItemElementClass); }; ListBox.prototype.fireBuildListBoxStartEvent = function () { }; ListBox.prototype.fireBuildListBoxEndEvent = function () { }; ListBox.prototype.fireResetListBoxStartEvent = function () { }; ListBox.prototype.fireResetListBoxEndEvent = function () { }; ListBox.getUniqueID = function () { return "Common-Controls-Legacy-ListBox-" + ListBox.CurrentUniqueID++; }; ListBox.prototype.resetUnusedItems = function (startingIndex) { this.fireResetListBoxStartEvent(); for (var i = startingIndex; i < this._listItemContainers.length; ++i) { this._listItemContainers[i].rootElement.style.display = "none"; this._listItemContainers[i].rootElement.setAttribute("aria-hidden", "true"); this._listItemContainers[i].item = null; } this.fireResetListBoxEndEvent(); }; ListBox.prototype.onKeyDown = function (e) { var noKeys = !event.shiftKey && !event.ctrlKey && !event.altKey; if (e.keyCode === 38 /* ArrowUp */ && noKeys) { if (this.selectedIndex > 0) { this.selectedIndex--; this.scrollIntoView(this.selectedItem, true); } } else if (e.keyCode === 40 /* ArrowDown */ && noKeys) { if (this.selectedIndex < (this._listItemContainers.length - 1)) { this.selectedIndex++; this.scrollIntoView(this.selectedItem, false); } } }; ListBox.DEFAULT_LIST_ITEM_HEIGHT = 10; ListBox.CurrentUniqueID = 0; return ListBox; })(Legacy.TemplateControl); Legacy.ListBox = ListBox; var ListBoxItemContainer = (function (_super) { __extends(ListBoxItemContainer, _super); function ListBoxItemContainer(owner, item, elementType, elementClass) { var _this = this; _super.call(this, document.createElement(elementType)); this._owner = owner; this._item = item; this.rootElement.innerText = item.text; this.rootElement.value = item.value; if (item.itemClass && item.itemClass.length > 0) { this.rootElement.classList.add(item.itemClass); } if (elementClass !== "") { this.rootElement.classList.add(elementClass); } this.rootElement.onmouseover = function () { if (_this._item && _this._item.info) { Plugin.Tooltip.show({ content: _this._item.info }); } return true; }; this.rootElement.setAttribute("role", "option"); this.rootElement.onmousedown = function (e) { return _this.onMouseDown(e); }; this.rootElement.onclick = function (e) { return _this.onMouseDown(e); }; this.rootElement.ondblclick = function (e) { return _this.onDoubleClicked(e); }; if (!this.rootElement.getAttribute("id")) { this.rootElement.setAttribute("id", ListBoxItemContainer.getUniqueID()); } } Object.defineProperty(ListBoxItemContainer.prototype, "selectedChanged", { get: function () { return this._onSelectChanged; }, set: function (value) { this._onSelectChanged = value; }, enumerable: true, configurable: true }); Object.defineProperty(ListBoxItemContainer.prototype, "selected", { get: function () { return this._selected; }, set: function (value) { var selectedChanged = value !== this._selected; this._selected = value; if (selectedChanged) { if (value) { this.rootElement.setAttribute("selected", "selected"); this.rootElement.setAttribute("aria-selected", "true"); this._owner.selectedItem = this._item; } else { this.rootElement.removeAttribute("selected"); this.rootElement.removeAttribute("aria-selected"); } } if (this._onSelectChanged && selectedChanged) { this._onSelectChanged(value); } }, enumerable: true, configurable: true }); Object.defineProperty(ListBoxItemContainer.prototype, "item", { get: function () { return this._item; }, set: function (value) { if (value && typeof value.text === "string") { this._item = value; if (this.rootElement.firstChild) { this.rootElement.firstChild.nodeValue = this._item.text; } else { this.rootElement.innerText = this._item.text; } this.rootElement.setAttribute("aria-label", this._item.text); } else { this._item = null; if (this.rootElement.firstChild) { this.rootElement.firstChild.nodeValue = ""; } this.rootElement.removeAttribute("aria-label"); } }, enumerable: true, configurable: true }); ListBoxItemContainer.getUniqueID = function () { return "Common-Controls-Legacy-ListBoxItemContainer-" + ListBoxItemContainer.CurrentUniqueID++; }; ListBoxItemContainer.prototype.onMouseDown = function (e) { this.selected = true; this._owner.rootElement.focus(); }; ListBoxItemContainer.prototype.onDoubleClicked = function (e) { this.selected = true; this._owner.rootElement.focus(); if (this._owner.itemDoubleClicked) { this._owner.itemDoubleClicked(this._item); } }; ListBoxItemContainer.CurrentUniqueID = 0; ListBoxItemContainer.CONTENT_ELEMENT_ID = "content"; return ListBoxItemContainer; })(Legacy.Control); Legacy.ListBoxItemContainer = ListBoxItemContainer; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // choiceCommitSource.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; (function (ChoiceCommitSource) { ChoiceCommitSource[ChoiceCommitSource["Tab"] = 0] = "Tab"; ChoiceCommitSource[ChoiceCommitSource["Enter"] = 1] = "Enter"; ChoiceCommitSource[ChoiceCommitSource["DoubleClick"] = 2] = "DoubleClick"; })(Intellisense.ChoiceCommitSource || (Intellisense.ChoiceCommitSource = {})); var ChoiceCommitSource = Intellisense.ChoiceCommitSource; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // intellisenseListBox.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Intellisense) { "use strict"; var IntellisenseChoice = (function (_super) { __extends(IntellisenseChoice, _super); function IntellisenseChoice(optionName, info) { _super.call(this, optionName, optionName, info); } Object.defineProperty(IntellisenseChoice.prototype, "optionName", { get: function () { return this.text; }, enumerable: true, configurable: true }); return IntellisenseChoice; })(Common.Controls.Legacy.ListBoxItem); Intellisense.IntellisenseChoice = IntellisenseChoice; var IntellisenseListBox = (function (_super) { __extends(IntellisenseListBox, _super); function IntellisenseListBox(templateName, listItemElementType, listItemElementClass, traceProvider) { var _this = this; _super.call(this, templateName, listItemElementType, listItemElementClass || "intellisenseListBoxItem"); this.itemDoubleClicked = function (item) { return _this.optionDoubleClicked(item); }; this._traceProvider = traceProvider; this._currentEtwKey = -1; } Object.defineProperty(IntellisenseListBox.prototype, "intellisenseChoiceSelected", { get: function () { return this._intellisenseChoiceSelected; }, set: function (value) { this._intellisenseChoiceSelected = value; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseListBox.prototype, "currentEtwKey", { get: function () { return this._currentEtwKey; }, set: function (key) { this._currentEtwKey = key; }, enumerable: true, configurable: true }); IntellisenseListBox.prototype.optionDoubleClicked = function (intellisenseChoice) { if (this._intellisenseChoiceSelected) { this._intellisenseChoiceSelected(intellisenseChoice, 2 /* DoubleClick */); } }; IntellisenseListBox.prototype.fireBuildListBoxStartEvent = function () { if (this._traceProvider) { this._traceProvider.fireBuildListBoxStartEvent(this.currentEtwKey); } }; IntellisenseListBox.prototype.fireBuildListBoxEndEvent = function () { if (this._traceProvider) { this._traceProvider.fireBuildListBoxEndEvent(this.currentEtwKey); } }; IntellisenseListBox.prototype.fireResetListBoxStartEvent = function () { if (this._traceProvider) { this._traceProvider.fireResetListBoxStartEvent(this.currentEtwKey); } }; IntellisenseListBox.prototype.fireResetListBoxEndEvent = function () { if (this._traceProvider) { this._traceProvider.fireResetListBoxEndEvent(this.currentEtwKey); } }; return IntellisenseListBox; })(Common.Controls.Legacy.ListBox); Intellisense.IntellisenseListBox = IntellisenseListBox; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // IntellisenseContext.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; var IntellisenseContext = (function () { function IntellisenseContext(textEditorBridge, intellisenseMenu, intellisenseProvider, events) { this._textEditorBridge = textEditorBridge; this._intellisenseMenu = intellisenseMenu; this._intellisenseProvider = intellisenseProvider; this._isInitialized = false; this._deactivationHandler = this.uninitialize.bind(this); this._events = events; if (this._events) { this._events.addEventListener("deactivated", this._deactivationHandler); } } Object.defineProperty(IntellisenseContext.prototype, "textEditorBridge", { get: function () { return this._textEditorBridge; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseContext.prototype, "intellisenseMenu", { get: function () { return this._intellisenseMenu; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseContext.prototype, "intellisenseProvider", { get: function () { return this._intellisenseProvider; }, enumerable: true, configurable: true }); IntellisenseContext.prototype.initialize = function (target) { if (this._isInitialized) { return; } this.textEditorBridge.attach(target); this.intellisenseMenu.attach(this.textEditorBridge); this.intellisenseProvider.attach(this); this._isInitialized = true; }; IntellisenseContext.prototype.uninitialize = function () { if (!this._isInitialized) { return; } this._isInitialized = false; if (this._events) { this._events.removeEventListener("deactivated", this._deactivationHandler); } this.intellisenseProvider.detach(); this.intellisenseMenu.detach(); this.textEditorBridge.detach(); }; return IntellisenseContext; })(); Intellisense.IntellisenseContext = IntellisenseContext; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // inputElementTextEditorBridge.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; var InputElementTextEditorBridge = (function () { function InputElementTextEditorBridge() { var _this = this; this._lastSelectionLength = -1; this._lastCaretPosition = -1; this._timerFunction = function () { return _this.timer_elapsed(); }; } Object.defineProperty(InputElementTextEditorBridge.prototype, "onTextChanged", { get: function () { return this._onTextChanged; }, set: function (value) { this._onTextChanged = value; }, enumerable: true, configurable: true }); Object.defineProperty(InputElementTextEditorBridge.prototype, "onCaptureKeyDown", { get: function () { return this._onCaptureKeyDown; }, set: function (value) { this._onCaptureKeyDown = value; }, enumerable: true, configurable: true }); Object.defineProperty(InputElementTextEditorBridge.prototype, "onBlur", { get: function () { return this._onBlur; }, set: function (value) { this._onBlur = value; }, enumerable: true, configurable: true }); Object.defineProperty(InputElementTextEditorBridge.prototype, "onCaretPositionChanged", { get: function () { return this._onCaretPositionChanged; }, set: function (value) { this._onCaretPositionChanged = value; }, enumerable: true, configurable: true }); Object.defineProperty(InputElementTextEditorBridge.prototype, "onSelectionLengthChanged", { get: function () { return this._onSelectionLengthChanged; }, set: function (value) { this._onSelectionLengthChanged = value; }, enumerable: true, configurable: true }); Object.defineProperty(InputElementTextEditorBridge.prototype, "onMenuRequested", { get: function () { return this._onMenuRequested; }, set: function (value) { this._onMenuRequested = value; }, enumerable: true, configurable: true }); Object.defineProperty(InputElementTextEditorBridge.prototype, "caretPosition", { get: function () { if (this._editor) { try { return this._editor.selectionEnd; } catch (ex) { return -1; } } return -1; }, set: function (value) { if (this._editor && Common.ToolWindowHelpers.nodeInDocument(this._editor)) { var valueChanged = this.caretPosition !== value; this._editor.setSelectionRange(value, value); if (valueChanged) { this.fireCaretPositionChanged(); } } }, enumerable: true, configurable: true }); Object.defineProperty(InputElementTextEditorBridge.prototype, "selectionLength", { get: function () { if (this._editor) { try { return this._editor.selectionEnd - this._editor.selectionStart; } catch (ex) { return -1; } } return -1; }, set: function (value) { if (this._editor && Common.ToolWindowHelpers.nodeInDocument(this._editor)) { this._editor.setSelectionRange(this._editor.selectionStart, this._editor.selectionStart + value); var valueChanged = this._lastSelectionLength !== this.selectionLength; this._lastSelectionLength = this.selectionLength; if (valueChanged) { this.fireSelectionLengthChanged(); } } }, enumerable: true, configurable: true }); Object.defineProperty(InputElementTextEditorBridge.prototype, "text", { get: function () { if (this._editor) { return this._editor.value; } return null; }, set: function (value) { if (this._editor) { this._editor.value = value; } }, enumerable: true, configurable: true }); InputElementTextEditorBridge.prototype.getPlacementTarget = function (index) { if (this._editor) { if (!this._lastPlacementTarget || this._lastPlacementTargetIndex !== index) { var range = this._editor.createTextRange(); range.move("textedit", -1); range.move("character", index); this._lastPlacementTarget = range.getBoundingClientRect(); this._lastPlacementTargetIndex = index; var editorRect = this._editor.getBoundingClientRect(); if (this._lastPlacementTarget.right < editorRect.left || this._lastPlacementTarget.right > editorRect.right || this._lastPlacementTarget.top < editorRect.top || this._lastPlacementTarget.bottom > editorRect.bottom) { var top = Math.max(this._lastPlacementTarget.top, editorRect.top); var bottom = Math.min(this._lastPlacementTarget.bottom, editorRect.bottom); var xPos = Math.max(Math.min(this._lastPlacementTarget.right, editorRect.right), editorRect.left); this._lastPlacementTarget = { top: top, bottom: bottom, right: xPos, left: xPos, height: bottom - top, width: 0 }; } } return this._lastPlacementTarget; } return null; }; InputElementTextEditorBridge.prototype.attach = function (textEditor) { var _this = this; this._editor = InputElementTextEditorBridge.validateTextEditorElement(textEditor); if (this._editor) { this._isAttached = true; this._inputHandler = function (event) { _this.editor_input(event); }; this._editor.addEventListener("input", this._inputHandler); this._blurHandler = function (focusEvent) { _this.editor_blur(focusEvent); }; this._editor.addEventListener("blur", this._blurHandler); this._focusHandler = function (focusEvent) { _this.editor_focus(focusEvent); }; this._editor.addEventListener("focus", this._focusHandler); this._captureKeyDownHandler = function (e) { _this.editor_captureKeyDown(e); }; this._editor.addEventListener("keydown", this._captureKeyDownHandler, true); this._editor.setAttribute("aria-autocomplete", "list"); this._editor.setAttribute("aria-haspopup", "true"); if (document.activeElement === this._editor) { this.startTimer(); } return true; } return false; }; InputElementTextEditorBridge.prototype.detach = function () { if (!this._isAttached) { return; } this._isAttached = false; if (this._editor) { this._editor.onselect = null; this._editor.removeEventListener("input", this._inputHandler); this._editor.removeEventListener("blur", this._blurHandler); this._editor.removeEventListener("focus", this._focusHandler); this._editor.removeEventListener("keydown", this._captureKeyDownHandler, true); this._inputHandler = null; this._blurHandler = null; this._focusHandler = null; this._captureKeyDownHandler = null; this._editor.removeAttribute("aria-autocomplete"); this._editor.removeAttribute("aria-haspopup"); this._editor = null; } this.fireOnBlur(); }; InputElementTextEditorBridge.prototype.insertText = function (startPos, endPos, text) { var range = this._editor.createTextRange(); var useUndo = range.queryCommandSupported("ms-beginUndoUnit"); if (useUndo) { range.execCommand("ms-beginUndoUnit"); } range.move("character", startPos); range.moveEnd("character", endPos - startPos); range.text = text; this.caretPosition = startPos + text.length; if (useUndo) { range.execCommand("ms-endUndoUnit"); } }; InputElementTextEditorBridge.prototype.setActiveDescendant = function (id) { if (id) { this._editor.setAttribute("aria-activedescendant", id); } else { this._editor.removeAttribute("aria-activedescendant"); } }; InputElementTextEditorBridge.prototype.setListBox = function (id) { if (id) { this._editor.setAttribute("aria-controls", id); } else { this._editor.removeAttribute("aria-controls"); } }; InputElementTextEditorBridge.prototype.focusEditor = function () { this._editor.focus(); }; InputElementTextEditorBridge.validateTextEditorElement = function (textEditor) { var textEditorElement = textEditor; var textEditorInterface = textEditorElement; if (typeof (textEditorInterface.createTextRange) === "undefined" || typeof (textEditorInterface.selectionStart) === "undefined" || typeof (textEditorInterface.selectionEnd) === "undefined" || typeof (textEditorInterface.setSelectionRange) === "undefined" || typeof (textEditorInterface.value) === "undefined") { return null; } return textEditorElement; }; InputElementTextEditorBridge.prototype.startTimer = function () { if (!this._timerActivated) { this._timerId = window.setInterval(this._timerFunction, InputElementTextEditorBridge.TIMER_INTERVAL); this._timerActivated = true; } }; InputElementTextEditorBridge.prototype.resetTimer = function () { if (this._timerActivated) { this.stopTimer(); this.startTimer(); } }; InputElementTextEditorBridge.prototype.stopTimer = function () { if (this._timerActivated) { this._timerActivated = false; window.clearInterval(this._timerId); } }; InputElementTextEditorBridge.prototype.timer_elapsed = function () { if (this._lastCaretPosition !== this.caretPosition || this._lastSelectionLength !== this.selectionLength) { this.stopTimer(); if (this._isAttached) { if (this._lastCaretPosition !== this.caretPosition) { this.fireCaretPositionChanged(); this._lastCaretPosition = this.caretPosition; } if (this._lastSelectionLength !== this.selectionLength) { this.fireSelectionLengthChanged(); this._lastSelectionLength = this.selectionLength; } } this.startTimer(); } }; InputElementTextEditorBridge.prototype.editor_input = function (event) { this.fireTextChanged(); }; InputElementTextEditorBridge.prototype.editor_captureKeyDown = function (keyEvent) { if (keyEvent.keyCode === 32 /* Space */ && keyEvent.ctrlKey) { this.fireMenuRequested(); keyEvent.preventDefault(); return; } if (this._onCaptureKeyDown) { this._onCaptureKeyDown(keyEvent); } }; InputElementTextEditorBridge.prototype.editor_blur = function (focusEvent) { this.fireOnBlur(); }; InputElementTextEditorBridge.prototype.editor_focus = function (focusEvent) { this.startTimer(); }; InputElementTextEditorBridge.prototype.fireOnBlur = function () { this.stopTimer(); this._lastPlacementTarget = null; if (this._onBlur) { this._onBlur(); } }; InputElementTextEditorBridge.prototype.fireTextChanged = function () { this._lastCaretPosition = this.caretPosition; this._lastPlacementTarget = null; if (this._onTextChanged) { this._onTextChanged(this._editor.value); } this.resetTimer(); }; InputElementTextEditorBridge.prototype.fireCaretPositionChanged = function () { this._lastPlacementTarget = null; if (this._onCaretPositionChanged) { this._onCaretPositionChanged(this.caretPosition); } }; InputElementTextEditorBridge.prototype.fireSelectionLengthChanged = function () { if (this._onSelectionLengthChanged) { this._onSelectionLengthChanged(this.selectionLength); } }; InputElementTextEditorBridge.prototype.fireMenuRequested = function () { if (this._onMenuRequested) { this._onMenuRequested(); } }; InputElementTextEditorBridge.TIMER_INTERVAL = 100; return InputElementTextEditorBridge; })(); Intellisense.InputElementTextEditorBridge = InputElementTextEditorBridge; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // intellisenseMenu.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; var IntellisenseMenu = (function () { function IntellisenseMenu(listBoxTemplateName, listItemElementType, listItemElementClass, maxMenuItems, autoSuppressMenu, menuTraceProvider, listBoxTraceProvider) { var _this = this; this._listBox = new Intellisense.IntellisenseListBox(listBoxTemplateName, listItemElementType, listItemElementClass, listBoxTraceProvider); this._listBox.rootElement.style.position = "absolute"; this._listBox.rootElement.style.display = "none"; this._isAttached = false; this._placementTargetIndex = 0; this._isDeferringLayout = false; this._suppressMenu = false; this._alreadyForcedOpen = false; this._ignoreCommit = false; this._willMenuBeOpen = false; if (maxMenuItems) { this._maxMenuItems = maxMenuItems; } else { this._maxMenuItems = IntellisenseMenu.MAX_MENU_ITEMS; } this._resizeListener = function () { _this._resizeListenerHasFired = true; _this._windowInnerHeight = window.innerHeight; _this._windowInnerWidth = window.innerWidth; _this._toolbarOffsetHeight = 0; _this._listBoxOffsetWidthIsStale = true; _this._listBoxOffsetHeightIsStale = true; var toolbarElement = document.getElementById("toolbar"); if (toolbarElement) { _this._toolbarOffsetHeight = toolbarElement.offsetHeight; } }; this._resizeListenerHasFired = false; window.addEventListener("resize", this._resizeListener); this._autoSuppressMenuEnabled = autoSuppressMenu ? true : false; this._traceProvider = menuTraceProvider; this._currentEtwKey = -1; } Object.defineProperty(IntellisenseMenu.prototype, "placementTargetIndex", { get: function () { return this._placementTargetIndex; }, set: function (value) { this._placementTargetIndex = value; this._lastTextEditorPlacementTarget = null; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "currentEtwKey", { get: function () { return this._currentEtwKey; }, set: function (key) { this._currentEtwKey = key; this._listBox.currentEtwKey = key; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "isOpen", { get: function () { return this._isAttached; }, set: function (value) { this._willMenuBeOpen = value; if (value !== this.isOpen) { if (value && !this.suppressMenu) { this.show(); } else { this.hide(); this._alreadyForcedOpen = false; } } }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "hasSelection", { get: function () { return this.isOpen && !this.isDeferringLayout && !this._ignoreCommit && !!this._selectedOption; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "currentSelection", { get: function () { return this._selectedOption; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "intellisenseChoices", { get: function () { if (this._listBox) { return this._options; } return []; }, set: function (value) { this._options = value; this._filteredOptions = value; this._selectedOption = null; this.listBoxListItems = null; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "filteredIntellisenseChoices", { get: function () { return this._filteredOptions; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "willIntellisenseMenuBeOpen", { get: function () { return this._willMenuBeOpen; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "menuListBox", { get: function () { return this._listBox; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "onClosing", { get: function () { return this._onClosing; }, set: function (value) { this._onClosing = value; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "onOpened", { get: function () { return this._onOpened; }, set: function (value) { this._onOpened = value; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "onChoiceCommitted", { get: function () { return this._onChoiceCommitted; }, set: function (value) { this._onChoiceCommitted = value; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "onSelectionChanged", { get: function () { return this._onSelectionChanged; }, set: function (value) { this._onSelectionChanged = value; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "forbiddenBottomLeftRect", { get: function () { return this._forbiddenBottomLeftRect; }, set: function (value) { this._forbiddenBottomLeftRect = value; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "suppressMenu", { get: function () { return this._suppressMenu && this._autoSuppressMenuEnabled; }, set: function (value) { this._suppressMenu = value; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "isDeferringLayout", { get: function () { return this._isDeferringLayout; }, set: function (value) { if (value) { this.stopDeferredRenderTimer(); this.startDeferredRenderTimer(); } else { this.stopDeferredRenderTimer(); } }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "listBoxListItems", { get: function () { return this._listBox.listItems; }, set: function (items) { this._listBox.listItems = items; this._listBoxOffsetWidthIsStale = true; this._listBoxOffsetHeightIsStale = true; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "listBoxOffsetWidth", { get: function () { if (this._listBoxOffsetWidthIsStale) { this._listBoxOffsetWidth = this._listBox.rootElement.offsetWidth; this._listBoxOffsetWidthIsStale = false; } return this._listBoxOffsetWidth; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseMenu.prototype, "listBoxOffsetHeight", { get: function () { if (this._listBoxOffsetHeightIsStale) { this._listBoxOffsetHeight = this._listBox.rootElement.offsetHeight; this._listBoxOffsetHeightIsStale = false; } return this._listBoxOffsetHeight; }, enumerable: true, configurable: true }); IntellisenseMenu.prototype.forceOpen = function () { if (this._filteredOptions && this._filteredOptions.length > 0) { this.suppressMenu = false; this.isOpen = true; this.listBoxListItems = this._filteredOptions; this.isDeferringLayout = false; this.updateLayout(!this._alreadyForcedOpen); this.updateListBoxSelection(); this._alreadyForcedOpen = true; } }; IntellisenseMenu.prototype.attach = function (textEditorBridge) { var _this = this; if (!this._textEditorBridge) { document.body.appendChild(this._listBox.rootElement); this._textEditorBridge = textEditorBridge; this._textEditorBridge.onBlur = function () { return _this.textEditorBridge_blur(); }; } this._textEditorBridge.setListBox(this._listBox.rootElement.id); }; IntellisenseMenu.prototype.detach = function () { if (this._textEditorBridge) { this.isOpen = false; this._textEditorBridge.onBlur = null; this._textEditorBridge.setListBox(null); this._textEditorBridge = null; document.body.removeChild(this._listBox.rootElement); } }; IntellisenseMenu.prototype.setFilter = function (filter) { var _this = this; this.fireSetFilterStartEvent(); this._selectedOption = this.setFilterInternal(filter); this.fireSetFilterEndEvent(); if (this._filteredOptions.length > this._maxMenuItems) { this._willMenuBeOpen = true; this.isDeferringLayout = true; return; } else if (this._filteredOptions.length === 1 && this._selectedOption && this._selectedOption.text === filter) { this._willMenuBeOpen = false; window.setImmediate(function () { return _this.isOpen = false; }); return; } this._willMenuBeOpen = true; this.listBoxListItems = this._filteredOptions; this.updateLayout(this.isDeferringLayout); this.isDeferringLayout = false; this.updateListBoxSelection(); }; IntellisenseMenu.prototype.getTextEditorPlacementTarget = function (updateFromEditorBridge) { if (!this._lastTextEditorPlacementTarget || updateFromEditorBridge) { this._lastTextEditorPlacementTarget = this._textEditorBridge.getPlacementTarget(this.placementTargetIndex); } return this._lastTextEditorPlacementTarget; }; IntellisenseMenu.prototype.startDeferredRenderTimer = function () { var _this = this; if (!this._isDeferringLayout) { var etwKey = this.currentEtwKey; this._deferredRenderTimerId = window.setTimeout(function () { return _this.deferredRenderTimer_elapsed(etwKey); }, IntellisenseMenu.DEFERRED_RENDER_TIMER_INTERVAL); this._ignoreCommit = true; this._isDeferringLayout = true; } }; IntellisenseMenu.prototype.stopDeferredRenderTimer = function () { if (this._isDeferringLayout) { this._ignoreCommit = false; this._isDeferringLayout = false; window.clearTimeout(this._deferredRenderTimerId); } }; IntellisenseMenu.prototype.deferredRenderTimer_elapsed = function (etwKey) { var _this = this; this._isDeferringLayout = false; this.currentEtwKey = etwKey; if (this.isOpen) { this.forceOpen(); window.setTimeout(function () { return _this._ignoreCommit = false; }, IntellisenseMenu.DEFERRED_RENDER_TIMER_INTERVAL); } }; IntellisenseMenu.prototype.updateListBoxSelection = function () { if (this._selectedOption) { this._listBox.selectedItem = this._selectedOption; this._listBox.scrollIntoView(this._selectedOption, false); } else if (this.listBoxListItems.length > 0) { this._listBox.selectedIndex = -1; this._listBox.scrollIntoView(this.listBoxListItems[0], false); } }; IntellisenseMenu.prototype.setFilterInternal = function (filter) { if (filter && filter.length > 0 && this._options) { var upperCaseFilter = filter.toUpperCase(); var filteredItems = this._options.filter(function (value, index, array) { return value.optionName.toUpperCase().indexOf(upperCaseFilter) !== -1; }, this); if (filteredItems.length === 0) { filteredItems = this._options.filter(function (value, index, array) { var upperCaseOption = value.optionName.toUpperCase(); return upperCaseOption.indexOf(upperCaseFilter) !== -1 || upperCaseFilter.indexOf(upperCaseOption) === 0; }, this); } if (filteredItems.length > 0) { this._filteredOptions = filteredItems; var matchingOptionIndex = this.getMatchingOption(filteredItems, filter, true); if (matchingOptionIndex < 0) { matchingOptionIndex = this.getMatchingOption(filteredItems, filter, false); if (matchingOptionIndex < 0) { return null; } } return this._filteredOptions[matchingOptionIndex]; } } else { this._filteredOptions = this._options; } return null; }; IntellisenseMenu.prototype.getMatchingOption = function (items, filter, caseSensitive) { var testString = caseSensitive ? filter : filter.toUpperCase(); for (var i = 0; i < items.length; ++i) { var optionName = caseSensitive ? items[i].optionName : items[i].optionName.toUpperCase(); if (optionName.indexOf(testString) === 0) { return i; } } return -1; }; IntellisenseMenu.prototype.textEditorBridge_blur = function () { if (document.activeElement !== this._listBox.rootElement) { this.hide(); } else if (document.activeElement === this._listBox.rootElement) { this._textEditorBridge.focusEditor(); } }; IntellisenseMenu.prototype.updateLayout = function (setHorizontal) { if (!this.isOpen || !this.listBoxListItems || this.listBoxListItems.length === 0) { return; } this.fireUpdateLayoutStartEvent(); var oldLeft = this._listBox.rootElement.style.left; if (!this._resizeListenerHasFired) { this._resizeListener(); } var target = this.getTextEditorPlacementTarget(setHorizontal); var x = target.right; var y = target.bottom; this._listBox.rootElement.style.display = "block"; this._listBox.rootElement.style.top = "0"; this._listBox.rootElement.style.left = "0"; this._listBox.rootElement.style.width = ""; this._listBox.rootElement.style.minWidth = IntellisenseMenu.MIN_MENU_WIDTH + "px"; this._listBox.rootElement.style.maxHeight = IntellisenseMenu.MAX_MENU_HEIGHT + "px"; var offsetHeight = this.listBoxOffsetHeight; var offsetWidth = this.listBoxOffsetWidth; var leftLimit = 0; if (this._forbiddenBottomLeftRect) { leftLimit = (this._forbiddenBottomLeftRect.top - y) < offsetHeight ? this._forbiddenBottomLeftRect.width : 0; } var bottomHeight = this._windowInnerHeight - y - 2; if (target.top > bottomHeight) { y = target.top - offsetHeight; if (y < this._toolbarOffsetHeight) { y = Math.max(target.top - IntellisenseMenu.MAX_MENU_HEIGHT, this._toolbarOffsetHeight); var maxHeight = target.top - y; this._listBox.rootElement.style.top = y + "px"; this._listBox.rootElement.style.maxHeight = maxHeight + "px"; } else { this._listBox.rootElement.style.top = y + "px"; } } else { this._listBox.rootElement.style.top = y + "px"; if (bottomHeight < IntellisenseMenu.MAX_MENU_HEIGHT) { this._listBox.rootElement.style.maxHeight = bottomHeight + "px"; } } if (x + offsetWidth < this._windowInnerWidth) { this._listBox.rootElement.style.left = x + "px"; } else if (x - offsetWidth > leftLimit) { this._listBox.rootElement.style.left = (x - offsetWidth) + "px"; } else { var left = Math.max(this._windowInnerWidth - offsetWidth, leftLimit); var right = Math.min(left + offsetWidth, this._windowInnerWidth); this._listBox.rootElement.style.left = left + "px"; this._listBox.rootElement.style.width = (right - left) + "px"; this._listBox.rootElement.style.minWidth = ""; } if (this._listBox.selectedItem) { this._listBox.scrollIntoView(this._listBox.selectedItem, false); } this.fireUpdateLayoutEndEvent(); }; IntellisenseMenu.prototype.show = function () { var _this = this; if (this._isAttached) { return; } this._isAttached = true; this.suppressMenu = false; this.updateLayout(true); this._listBox.intellisenseChoiceSelected = function (intellisenseChoice, choiceCommitSource) { return _this.listBox_intellisenseChoiceSelected(intellisenseChoice, choiceCommitSource); }; this._listBox.selectedItemChanged = function (newItem) { return _this.listBox_selectedItemChanged(newItem); }; this._textEditorBridge.onCaptureKeyDown = function (keyEvent) { return _this.editor_captureKeyDown(keyEvent); }; this._listBox.rootElement.setAttribute("aria-expanded", "true"); if (this._listBox.selectedItem) { this.listBox_selectedItemChanged(this._listBox.selectedItem); } if (this._onOpened) { this._onOpened(); } }; IntellisenseMenu.prototype.hide = function () { if (!this._isAttached) { return; } this._isAttached = false; this._willMenuBeOpen = false; if (this._onClosing) { this._onClosing(); } this._textEditorBridge.setActiveDescendant(null); this._listBox.intellisenseChoiceSelected = null; this._listBox.selectedItemChanged = null; this._textEditorBridge.onCaptureKeyDown = null; this._listBox.rootElement.style.display = "none"; this._listBox.rootElement.removeAttribute("aria-expanded"); }; IntellisenseMenu.prototype.listBox_intellisenseChoiceSelected = function (intellisenseChoice, commitSource) { this.fireValueCommitted(intellisenseChoice, commitSource); }; IntellisenseMenu.prototype.listBox_selectedItemChanged = function (newItem) { if (newItem) { this._selectedOption = newItem; this._textEditorBridge.setActiveDescendant(this._listBox.itemContainers[newItem.index].rootElement.id); if (this._onSelectionChanged) { this._onSelectionChanged(newItem); } } }; IntellisenseMenu.prototype.calculateListPageSize = function () { return Math.round(this.listBoxOffsetHeight / this._listBox.listItemHeight); }; IntellisenseMenu.prototype.setListBoxSelectedIndex = function (index, alignSelectedItemToTop) { index = Math.max(0, Math.min(this.listBoxListItems.length - 1, index)); this._listBox.selectedIndex = index; this._listBox.scrollIntoView(this._listBox.selectedItem, alignSelectedItemToTop); }; IntellisenseMenu.prototype.editor_captureKeyDown = function (keyEvent) { if (this.isDeferringLayout) { return; } if (keyEvent.keyCode === 38 /* ArrowUp */) { this.setListBoxSelectedIndex(this._listBox.selectedIndex - 1, true); keyEvent.stopImmediatePropagation(); keyEvent.preventDefault(); return; } else if (keyEvent.keyCode === 40 /* ArrowDown */) { this.setListBoxSelectedIndex(this._listBox.selectedIndex + 1, false); keyEvent.stopImmediatePropagation(); keyEvent.preventDefault(); return; } else if (keyEvent.keyCode === 33 /* PageUp */) { var indexOffset = this.calculateListPageSize(); this.setListBoxSelectedIndex(this._listBox.selectedIndex - indexOffset, true); keyEvent.stopImmediatePropagation(); keyEvent.preventDefault(); return; } else if (keyEvent.keyCode === 34 /* PageDown */) { var indexOffset = this.calculateListPageSize(); this.setListBoxSelectedIndex(this._listBox.selectedIndex + indexOffset, false); keyEvent.stopImmediatePropagation(); keyEvent.preventDefault(); return; } else if (keyEvent.keyCode === 13 /* Enter */) { if (this.fireSelectedValueCommitted(1 /* Enter */)) { keyEvent.stopImmediatePropagation(); keyEvent.preventDefault(); } return; } else if (keyEvent.keyCode === 9 /* Tab */) { if (this.fireSelectedValueCommitted(0 /* Tab */)) { keyEvent.stopImmediatePropagation(); keyEvent.preventDefault(); } return; } else if (keyEvent.keyCode === 32 /* Space */) { this.hide(); return; } else if (keyEvent.keyCode === 27 /* Escape */) { this.hide(); keyEvent.preventDefault(); keyEvent.stopImmediatePropagation(); this.suppressMenu = true; return; } }; IntellisenseMenu.prototype.fireValueCommitted = function (intellisenseChoice, commitSource) { if (this._onChoiceCommitted && intellisenseChoice) { this._onChoiceCommitted(intellisenseChoice, commitSource); return true; } return false; }; IntellisenseMenu.prototype.fireSelectedValueCommitted = function (commitSource) { if (this._listBox && this._listBox.selectedItem !== null) { return this.fireValueCommitted(this._listBox.selectedItem, commitSource); } return false; }; IntellisenseMenu.prototype.fireSetFilterStartEvent = function () { if (this._traceProvider) { this._traceProvider.fireSetFilterStartEvent(this.currentEtwKey); } }; IntellisenseMenu.prototype.fireSetFilterEndEvent = function () { if (this._traceProvider) { this._traceProvider.fireSetFilterEndEvent(this.currentEtwKey); } }; IntellisenseMenu.prototype.fireUpdateLayoutStartEvent = function () { if (this._traceProvider) { this._traceProvider.fireUpdateLayoutStartEvent(this.currentEtwKey); } }; IntellisenseMenu.prototype.fireUpdateLayoutEndEvent = function () { if (this._traceProvider) { this._traceProvider.fireUpdateLayoutEndEvent(this.currentEtwKey); } }; IntellisenseMenu.MAX_MENU_HEIGHT = 300; IntellisenseMenu.MIN_MENU_WIDTH = 200; IntellisenseMenu.MAX_MENU_ITEMS = 50; IntellisenseMenu.DEFERRED_RENDER_TIMER_INTERVAL = 200; return IntellisenseMenu; })(); Intellisense.IntellisenseMenu = IntellisenseMenu; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // intellisenseProviderBase.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; var GetIntellisenseChoicesCancelToken = (function () { function GetIntellisenseChoicesCancelToken() { this._isCanceled = false; } Object.defineProperty(GetIntellisenseChoicesCancelToken.prototype, "isCanceled", { get: function () { return this._isCanceled; }, enumerable: true, configurable: true }); GetIntellisenseChoicesCancelToken.prototype.cancel = function () { this._isCanceled = true; }; return GetIntellisenseChoicesCancelToken; })(); Intellisense.GetIntellisenseChoicesCancelToken = GetIntellisenseChoicesCancelToken; var IntellisenseProviderBase = (function () { function IntellisenseProviderBase() { this._lastTextValue = ""; this._lastSearchExpression = ""; this._searchExpressionUpdated = false; this._currentSearchToken = ""; this._currentSearchTokenStart = -1; this._currentSearchTokenEnd = -1; this._currentIntellisenseChoicesPromise = null; this._menuShouldOpenAfterPromiseCompletes = false; this._currentIntellisenseChoices = null; this._performingCommit = false; this._nextETWKey = 0; } Object.defineProperty(IntellisenseProviderBase.prototype, "textEditorBridge", { get: function () { return this._intellisenseContext.textEditorBridge; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseProviderBase.prototype, "intellisenseMenu", { get: function () { return this._intellisenseContext.intellisenseMenu; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseProviderBase.prototype, "currentSearchToken", { get: function () { return this._currentSearchToken; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseProviderBase.prototype, "currentSearchTokenStart", { get: function () { return this._currentSearchTokenStart; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseProviderBase.prototype, "currentSearchTokenEnd", { get: function () { return this._currentSearchTokenEnd; }, enumerable: true, configurable: true }); Object.defineProperty(IntellisenseProviderBase.prototype, "onIntellisenseResultsAvailable", { get: function () { return this._onIntellisenseResultsAvailable; }, set: function (value) { this._onIntellisenseResultsAvailable = value; }, enumerable: true, configurable: true }); IntellisenseProviderBase.prototype.attach = function (intellisenseContext) { var _this = this; this._intellisenseContext = intellisenseContext; this.textEditorBridge.onTextChanged = function (text) { return _this.textEditorBridge_textChanged(text); }; this.textEditorBridge.onCaretPositionChanged = function (caretPosition) { return _this.textEditorBridge_caretPositionChanged(caretPosition); }; this.textEditorBridge.onSelectionLengthChanged = function (selectionLength) { return _this.textEditorBridge_selectionLengthChanged(selectionLength); }; this.textEditorBridge.onMenuRequested = function () { return _this.textEditorBridge_menuRequested(); }; this.intellisenseMenu.onSelectionChanged = function (selection) { return _this.intellisenseMenu_selectionChanged(selection); }; this.intellisenseMenu.onChoiceCommitted = function (choice, commitSource) { return _this.intellisenseMenu_choiceCommitted(choice, commitSource); }; this.intellisenseMenu.onClosing = function () { return _this.intellisenseMenu_closing(); }; this._lastTextValue = this.textEditorBridge.text; }; IntellisenseProviderBase.prototype.detach = function () { if (this._currentIntellisenseChoicesPromise) { this._currentIntellisenseChoicesPromise.cancel(); this._currentIntellisenseChoicesPromise = null; this._menuShouldOpenAfterPromiseCompletes = false; } this._currentSearchToken = ""; this._currentSearchTokenStart = -1; this._currentSearchTokenEnd = -1; this._currentIntellisenseChoices = null; this._lastTextValue = ""; this.textEditorBridge.onTextChanged = null; this.textEditorBridge.onCaretPositionChanged = null; this.textEditorBridge.onSelectionLengthChanged = null; this.textEditorBridge.onMenuRequested = null; this.intellisenseMenu.onSelectionChanged = null; this.intellisenseMenu.onChoiceCommitted = null; this.intellisenseMenu.onClosing = null; this._intellisenseContext = null; }; IntellisenseProviderBase.prototype.getCurrentFilteredIntellisenseCompletionList = function () { if (this._currentIntellisenseChoices && this._currentIntellisenseChoices.length > 0) { return this.intellisenseMenu.filteredIntellisenseChoices; } return []; }; IntellisenseProviderBase.prototype.clearLastValues = function () { this._currentSearchToken = ""; this._currentSearchTokenStart = -1; this._currentSearchTokenEnd = -1; this._currentIntellisenseChoices = null; this._lastTextValue = ""; }; IntellisenseProviderBase.prototype.getCurrentExpression = function (text, caretPosition, etwKey) { if (typeof etwKey === "undefined") { etwKey = -1; } this.fireGetCurrentExpressionStartEvent(etwKey); var startSubStr = text.substr(0, caretPosition); var endSubStr = text.substr(caretPosition); var nonResult = { text: "", offset: caretPosition }; var nextCharIsInsideSingleQuoteString = false; var nextCharIsInsideDoubleQuoteString = false; var nextCharIsEscaped = false; if (startSubStr && startSubStr.length > 0) { for (var i = 0; i < startSubStr.length; ++i) { var nextCharIsInsideString = nextCharIsInsideSingleQuoteString || nextCharIsInsideDoubleQuoteString; if (startSubStr[i] === "\\" && nextCharIsInsideString) { nextCharIsEscaped = true; } else { if (startSubStr[i] === "'" && !nextCharIsEscaped) { nextCharIsInsideSingleQuoteString = !nextCharIsInsideSingleQuoteString && !nextCharIsInsideDoubleQuoteString; } else if (startSubStr[i] === "\"" && !nextCharIsEscaped) { nextCharIsInsideDoubleQuoteString = !nextCharIsInsideSingleQuoteString && !nextCharIsInsideDoubleQuoteString; } nextCharIsEscaped = false; } } if (nextCharIsInsideSingleQuoteString || nextCharIsInsideDoubleQuoteString) { this.fireGetCurrentExpressionEndEvent(etwKey); return nonResult; } } var varMatch = startSubStr.match(/var\s+\S+$/); if (varMatch && varMatch.length > 0) { this.fireGetCurrentExpressionEndEvent(etwKey); return nonResult; } var startMatch = startSubStr.match(IntellisenseProviderBase.JAVASCRIPT_BEGIN_EXPRESSION_REGEX); var expressionStart = ""; if (startMatch) { expressionStart = startMatch[0]; } var endMatch = endSubStr.match(IntellisenseProviderBase.JAVASCRIPT_END_EXPRESSION_REGEX); var expressionEnd = ""; if (endMatch) { expressionEnd = endMatch[0]; } var resultText = expressionStart + expressionEnd; if (resultText.match(/^\d/)) { this.fireGetCurrentExpressionEndEvent(etwKey); return nonResult; } this.fireGetCurrentExpressionEndEvent(etwKey); return { text: expressionStart + expressionEnd, offset: startSubStr.length - expressionStart.length }; }; IntellisenseProviderBase.prototype.getSearchTokenFromFullExpression = function (expression) { var result = { text: "", offset: expression.length }; var match = expression.match(IntellisenseProviderBase.JAVASCRIPT_BEGIN_SEARCH_TOKEN_REGEX); if (match && match.length > 0) { result.text = match[0]; result.offset = expression.length - result.text.length; return result; } return result; }; IntellisenseProviderBase.prototype.getIntellisenseChoices = function (searchExpression, completeCallback, cancelToken, etwKey) { completeCallback(null); }; IntellisenseProviderBase.prototype.onMenuSelectionChanged = function (value) { }; IntellisenseProviderBase.prototype.onMenuChoiceCommitted = function (value, commitSource) { this.textEditorBridge.insertText(this.currentSearchTokenStart, this.currentSearchTokenEnd, value.text); }; IntellisenseProviderBase.prototype.onMenuClosing = function () { }; IntellisenseProviderBase.prototype.fireGetCurrentExpressionStartEvent = function (key) { }; IntellisenseProviderBase.prototype.fireGetCurrentExpressionEndEvent = function (key) { }; IntellisenseProviderBase.prototype.fireUpdateIntellisenseStartEvent = function (key) { }; IntellisenseProviderBase.prototype.fireUpdateIntellisenseEndEvent = function (key) { }; IntellisenseProviderBase.prototype.getIntellisenseChoicesAsync = function (searchExpression, etwKey) { var _this = this; var cancelToken = new GetIntellisenseChoicesCancelToken(); return new Plugin.Promise(function (complete) { _this.getIntellisenseChoices(searchExpression, complete, cancelToken, etwKey); }, function () { cancelToken.cancel(); _this.fireUpdateIntellisenseEndEvent(etwKey); }); }; IntellisenseProviderBase.prototype.updateIntellisense = function (text, caretPosition, forceMenuOpen) { var _this = this; if (typeof forceMenuOpen === "undefined") { forceMenuOpen = false; } if (this._performingCommit) { return; } var etwKey = this._nextETWKey++; var expression = this.getCurrentExpression(text, caretPosition, etwKey); if (expression.text.length > 0 || forceMenuOpen) { this.fireUpdateIntellisenseStartEvent(etwKey); var newSearchToken = this.getSearchTokenFromFullExpression(expression.text); var searchTokenUpdated = newSearchToken.text !== this._currentSearchToken || forceMenuOpen; var searchTokenIsFresh = (!newSearchToken.text.match("^" + this._currentSearchToken) && !this._currentSearchToken.match("^" + newSearchToken.text)) || newSearchToken.text.length === 1; this._currentSearchToken = newSearchToken.text; this._currentSearchTokenEnd = expression.offset + expression.text.length; this._currentSearchTokenStart = this._currentSearchTokenEnd - this._currentSearchToken.length; var searchExpression = expression.text.substr(0, newSearchToken.offset - 1); var searchRequiresNewPromise = (searchTokenUpdated && searchTokenIsFresh) || this._lastSearchExpression !== searchExpression; var newSearchExpression = this._searchExpressionUpdated; this._searchExpressionUpdated = false; var menuWasOpen = this.intellisenseMenu.isOpen; var menuShouldOpenAfterPromiseCompletes = this._menuShouldOpenAfterPromiseCompletes; if (searchRequiresNewPromise || !this._currentIntellisenseChoices) { if (this._currentIntellisenseChoicesPromise) { this._currentIntellisenseChoicesPromise.cancel(); this._currentIntellisenseChoicesPromise = null; this._menuShouldOpenAfterPromiseCompletes = false; } this.intellisenseMenu.isOpen = false; this.intellisenseMenu.placementTargetIndex = this.currentSearchTokenStart; if (expression.text.indexOf(".") !== 0 && expression.text.indexOf("..") < 0) { this._currentIntellisenseChoicesPromise = this.getIntellisenseChoicesAsync(searchExpression, etwKey); this._lastSearchExpression = searchExpression; newSearchExpression = true; } } var newCharWasWhitespace = false; if (caretPosition > 0 && text.length >= caretPosition) { var lastChar = text[caretPosition - 1]; newCharWasWhitespace = !!lastChar.match(/\s/); } var menuWillBeOpen = this.intellisenseMenu.isOpen || menuWasOpen || menuShouldOpenAfterPromiseCompletes || forceMenuOpen; if (this._lastTextValue.length === (text.length - 1) && !newCharWasWhitespace && (this._currentSearchToken.length === 1 || newSearchExpression)) { menuWillBeOpen = true; } else { this._searchExpressionUpdated = newSearchExpression; } if (this._currentIntellisenseChoicesPromise) { this._menuShouldOpenAfterPromiseCompletes = menuWillBeOpen; this._currentIntellisenseChoicesPromise.done(function (result) { _this._currentIntellisenseChoices = result; _this.updateMenu(text, searchTokenUpdated, menuWillBeOpen, forceMenuOpen, etwKey); _this._currentIntellisenseChoicesPromise = null; _this._menuShouldOpenAfterPromiseCompletes = false; }); } else { this.updateMenu(text, searchTokenUpdated, menuWillBeOpen, forceMenuOpen, etwKey); } } else { this.intellisenseMenu.isOpen = false; this.intellisenseMenu.intellisenseChoices = null; this._currentSearchToken = ""; this._currentSearchTokenStart = -1; this._currentSearchTokenEnd = -1; this._currentIntellisenseChoices = null; this.fireOnIntellisenseResultsAvailable(); } this._lastTextValue = text; }; IntellisenseProviderBase.prototype.updateMenu = function (text, searchTokenUpdated, menuWillBeOpen, forceMenuOpen, etwKey) { this.intellisenseMenu.currentEtwKey = etwKey; if (this._currentIntellisenseChoices && this._currentIntellisenseChoices.length > 0) { if (menuWillBeOpen) { if (this.intellisenseMenu.intellisenseChoices !== this._currentIntellisenseChoices) { this.intellisenseMenu.intellisenseChoices = this._currentIntellisenseChoices; searchTokenUpdated = true; } if (searchTokenUpdated) { this.intellisenseMenu.setFilter(this._currentSearchToken); } this.fireOnIntellisenseResultsAvailable(); } if (forceMenuOpen) { this.intellisenseMenu.forceOpen(); } else { this.intellisenseMenu.isOpen = menuWillBeOpen; } } else { this.fireOnIntellisenseResultsAvailable(); } this.fireUpdateIntellisenseEndEvent(etwKey); }; IntellisenseProviderBase.prototype.fireOnIntellisenseResultsAvailable = function () { if (this._onIntellisenseResultsAvailable) { this._onIntellisenseResultsAvailable(); } }; IntellisenseProviderBase.prototype.textEditorBridge_textChanged = function (text) { this.updateIntellisense(text, this.textEditorBridge.caretPosition); }; IntellisenseProviderBase.prototype.textEditorBridge_caretPositionChanged = function (caretPosition) { if (this.textEditorBridge.selectionLength === 0) { this.updateIntellisense(this.textEditorBridge.text, caretPosition); } }; IntellisenseProviderBase.prototype.textEditorBridge_selectionLengthChanged = function (selectionLength) { if (selectionLength > 0) { this.intellisenseMenu.isOpen = false; } }; IntellisenseProviderBase.prototype.textEditorBridge_menuRequested = function () { this.updateIntellisense(this.textEditorBridge.text, this.textEditorBridge.caretPosition, true); }; IntellisenseProviderBase.prototype.intellisenseMenu_selectionChanged = function (value) { this.onMenuSelectionChanged(value); }; IntellisenseProviderBase.prototype.intellisenseMenu_choiceCommitted = function (value, commitSource) { this._performingCommit = true; this.onMenuChoiceCommitted(value, commitSource); this.intellisenseMenu.isOpen = false; this._lastTextValue = this.textEditorBridge.text; this.textEditorBridge.focusEditor(); this._performingCommit = false; }; IntellisenseProviderBase.prototype.intellisenseMenu_closing = function () { this.onMenuClosing(); }; IntellisenseProviderBase.VALID_JAVASCRIPT_VARIABLE_LETTERS = "$0-9A-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7-\u09C8\u09CB-\u09CE\u09D7\u09DC-\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47-\u0B48\u0B4B-\u0B4D\u0B56-\u0B57\u0B5C-\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82-\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C58-\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF2\u0D02-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2-\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18-\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772-\u1773\u1780-\u17D3\u17D7\u17DC-\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C-\u200D\u203F-\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC-\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33-\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA"; IntellisenseProviderBase.JAVASCRIPT_BEGIN_EXPRESSION_REGEX = new RegExp("[\\." + IntellisenseProviderBase.VALID_JAVASCRIPT_VARIABLE_LETTERS + "]+$"); IntellisenseProviderBase.JAVASCRIPT_END_EXPRESSION_REGEX = new RegExp("^[" + IntellisenseProviderBase.VALID_JAVASCRIPT_VARIABLE_LETTERS + "]+"); IntellisenseProviderBase.JAVASCRIPT_BEGIN_SEARCH_TOKEN_REGEX = new RegExp("[" + IntellisenseProviderBase.VALID_JAVASCRIPT_VARIABLE_LETTERS + "]+$"); IntellisenseProviderBase.JAVASCRIPT_VALID_JS_VARIABLENAME_REGEX = new RegExp("^[" + IntellisenseProviderBase.VALID_JAVASCRIPT_VARIABLE_LETTERS + "]+$"); return IntellisenseProviderBase; })(); Intellisense.IntellisenseProviderBase = IntellisenseProviderBase; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // staticContentProvider.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; var StaticContentProvider = (function () { function StaticContentProvider(breakUpFilterTextByWhitespace) { if (typeof breakUpFilterTextByWhitespace === "undefined") { breakUpFilterTextByWhitespace = true; } this._breakUpFilterTextByWhitespace = breakUpFilterTextByWhitespace; } Object.defineProperty(StaticContentProvider.prototype, "choices", { get: function () { return this._choices; }, set: function (theChoices) { this._choices = theChoices; if (this._onIntellisenseResultsAvailable) { this._onIntellisenseResultsAvailable(); } if (this._intellisenseContext) { this._intellisenseContext.intellisenseMenu.intellisenseChoices = theChoices; } }, enumerable: true, configurable: true }); Object.defineProperty(StaticContentProvider.prototype, "onIntellisenseResultsAvailable", { get: function () { return this._onIntellisenseResultsAvailable; }, set: function (value) { this._onIntellisenseResultsAvailable = value; }, enumerable: true, configurable: true }); Object.defineProperty(StaticContentProvider.prototype, "onShouldOpenOnTextChange", { get: function () { return this._onShouldOpenOnTextChange; }, set: function (value) { this._onShouldOpenOnTextChange = value; }, enumerable: true, configurable: true }); StaticContentProvider.prototype.attach = function (intellisenseContext) { var _this = this; this._intellisenseContext = intellisenseContext; this._intellisenseContext.textEditorBridge.onTextChanged = function (text) { return _this.textEditorBridge_textChanged(text); }; this._intellisenseContext.textEditorBridge.onCaretPositionChanged = function (caretPosition) { return _this.textEditorBridge_caretPositionChanged(caretPosition); }; this._intellisenseContext.textEditorBridge.onSelectionLengthChanged = function (selectionLength) { return _this.textEditorBridge_selectionLengthChanged(selectionLength); }; this._intellisenseContext.textEditorBridge.onMenuRequested = function () { return _this.textEditorBridge_menuRequested(); }; this._intellisenseContext.intellisenseMenu.onChoiceCommitted = function (choice, commitSource) { return _this.intellisenseMenu_choiceCommitted(choice, commitSource); }; this._intellisenseContext.intellisenseMenu.intellisenseChoices = this._choices; }; StaticContentProvider.prototype.detach = function () { this._intellisenseContext.textEditorBridge.onTextChanged = null; this._intellisenseContext.textEditorBridge.onCaretPositionChanged = null; this._intellisenseContext.textEditorBridge.onSelectionLengthChanged = null; this._intellisenseContext.textEditorBridge.onMenuRequested = null; this._intellisenseContext.intellisenseMenu.onSelectionChanged = null; this._intellisenseContext.intellisenseMenu.onChoiceCommitted = null; this._intellisenseContext.intellisenseMenu.onClosing = null; this._intellisenseContext = null; }; StaticContentProvider.prototype.getCurrentFilteredIntellisenseCompletionList = function () { return this._intellisenseContext.intellisenseMenu.filteredIntellisenseChoices; }; StaticContentProvider.prototype.clearLastValues = function () { }; StaticContentProvider.prototype.onMenuChoiceCommitted = function (value, commitSource) { this.closeMenu(); this.insertText(this._token.leftIndex, this._token.rightIndex, value.text); }; StaticContentProvider.prototype.insertText = function (leftIndex, rightIndex, text) { this._intellisenseContext.textEditorBridge.insertText(leftIndex, rightIndex, text); }; StaticContentProvider.prototype.updateIntellisense = function (text, caretPosition, forceMenuOpen) { this._token = this.findTokenWhereCaretResides(text, caretPosition); this.setFilter(this._token.text); if (forceMenuOpen || (this._choices && this._choices.length > 0 && this._token.text && this._token.text.length > 0) && (!this._onShouldOpenOnTextChange || this._onShouldOpenOnTextChange(text))) { this.openMenu(forceMenuOpen); } else { this.closeMenu(); } }; StaticContentProvider.prototype.setFilter = function (filterText) { this._intellisenseContext.intellisenseMenu.setFilter(filterText); }; StaticContentProvider.prototype.openMenu = function (forceMenuOpen) { if (forceMenuOpen) { this._intellisenseContext.intellisenseMenu.forceOpen(); } else { this._intellisenseContext.intellisenseMenu.isOpen = true; } }; StaticContentProvider.prototype.closeMenu = function () { this._intellisenseContext.intellisenseMenu.isOpen = false; }; StaticContentProvider.isAtLeftEndOrHasWhiteSpaceToTheLeft = function (text, position) { if (position < 0) { return true; } var ch = text.charAt(position); return ch === " " || ch === "\t"; }; StaticContentProvider.isAtRightEndOrHasWhiteSpaceToTheRight = function (text, position) { if (position >= text.length) { return true; } var ch = text.charAt(position); return ch === " " || ch === "\t"; }; StaticContentProvider.prototype.findTokenWhereCaretResides = function (text, caretPosition) { if (!this._breakUpFilterTextByWhitespace) { return { leftIndex: 0, rightIndex: text.length, text: text }; } var left = caretPosition; while (!StaticContentProvider.isAtLeftEndOrHasWhiteSpaceToTheLeft(text, left - 1)) { left--; } var right = caretPosition; while (!StaticContentProvider.isAtRightEndOrHasWhiteSpaceToTheRight(text, right)) { right++; } return { leftIndex: left, rightIndex: (right), text: text.substring(left, right) }; }; StaticContentProvider.prototype.textEditorBridge_textChanged = function (text) { this.updateIntellisense(text, this._intellisenseContext.textEditorBridge.caretPosition); }; StaticContentProvider.prototype.textEditorBridge_caretPositionChanged = function (caretPosition) { if (this._intellisenseContext.textEditorBridge.selectionLength === 0) { this.updateIntellisense(this._intellisenseContext.textEditorBridge.text, caretPosition); } }; StaticContentProvider.prototype.textEditorBridge_selectionLengthChanged = function (selectionLength) { if (selectionLength > 0) { this._intellisenseContext.intellisenseMenu.isOpen = false; } }; StaticContentProvider.prototype.textEditorBridge_menuRequested = function () { this.updateIntellisense(this._intellisenseContext.textEditorBridge.text, this._intellisenseContext.textEditorBridge.caretPosition, true); }; StaticContentProvider.prototype.intellisenseMenu_choiceCommitted = function (value, commitSource) { this.onMenuChoiceCommitted(value, commitSource); }; return StaticContentProvider; })(); Intellisense.StaticContentProvider = StaticContentProvider; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // IIntellisenseMenu.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // IIntellisenseProvider.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // ITextEditorBridge.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // intellisenseRemoteHelpers.ts var Common; (function (Common) { (function (Intellisense) { "use strict"; var IntellisenseRemoteHelpers = (function () { function IntellisenseRemoteHelpers(context) { this._context = context; } IntellisenseRemoteHelpers.evaluateProperty = function (object, propertyName, currentWindowContext, retrieveProperty) { var getPropertyDescriptor = function (object, propertyName) { if (object) { try { var descriptor = currentWindowContext.Object.getOwnPropertyDescriptor(object, propertyName); if (descriptor) { return descriptor; } else { return getPropertyDescriptor(currentWindowContext.Object.getPrototypeOf(object), propertyName); } } catch (e) { if (e.name === "TypeError") { return {}; } else { return; } } } return object; }; var getValueProperty = function (object, propertyName, descriptor) { if (descriptor) { if (typeof descriptor.value !== "undefined" && descriptor.value !== null) { return descriptor.value; } else { var currentType = typeof object; if (currentType !== "object" && currentType !== "function") { object = new currentWindowContext.Object(object); } if (descriptor.get && /\[native code\]/.test(descriptor.get.toString())) { return retrieveProperty(object, propertyName); } else if (typeof descriptor.get === "undefined") { return retrieveProperty(object, propertyName); } } } return; }; return object && getValueProperty(object, propertyName, getPropertyDescriptor(object, propertyName)); }; IntellisenseRemoteHelpers.getObjectContextPropertiesNames = function (context) { var propertyNames = []; if (context.object !== null && context.object !== undefined) { var currentType = typeof context.object; if (currentType !== "object" || currentType !== "function") { context.object = new context.windowContext.Object(context.object); } var result = Common.RemoteHelpers.getValidWindow(context.windowContext, context.object); if (result.isValid) { context.object = context.windowContext = result.window; } var currentPropertyNames = context.windowContext.Object.getOwnPropertyNames(context.object); if (currentPropertyNames) { propertyNames = currentPropertyNames; } var prototype = context.windowContext.Object.getPrototypeOf(context.object); while (prototype) { var prototypeProperties = context.windowContext.Object.getOwnPropertyNames(prototype); propertyNames = Array.prototype.concat.call(propertyNames, prototypeProperties); prototype = context.windowContext.Object.getPrototypeOf(prototype); } } return propertyNames; }; IntellisenseRemoteHelpers.prototype.getIntellisenseItemsForExpression = function (expression) { return this.getIntellisenseItemsForExpressionUsingWindowContext(expression, this._context.currentWindowContext, this._context.currentWindowContext.window, []); }; IntellisenseRemoteHelpers.prototype.getIntellisenseItemsForExpressionUsingWindowContext = function (expression, windowContext, searchObject, locals) { var current = this.getObjectContextForExpressionUsingEvaluator(expression, windowContext, searchObject, IntellisenseRemoteHelpers.evaluateProperty); var includeKeywordsAndLocals = expression.length === 0 && windowContext === searchObject; return this.getIntellisenseItemsForObjectContext(current, IntellisenseRemoteHelpers.getObjectContextPropertiesNames, includeKeywordsAndLocals, locals); }; IntellisenseRemoteHelpers.prototype.getObjectContextForExpressionUsingEvaluator = function (expression, currentWindowContext, currentObject, evaluator) { var items = expression.split("."); for (var i = 0; i < items.length && items[i].length > 0; ++i) { var retrievePropertyFunc = Common.PropertyEvaluationIgnoreList.propertyEvaluationFunction(currentWindowContext, currentObject); currentObject = evaluator(currentObject, items[i], currentWindowContext, retrievePropertyFunc); var result = Common.RemoteHelpers.getValidWindow(currentWindowContext, currentObject); if (result.isValid) { currentObject = currentWindowContext = result.window; } } return { object: currentObject, windowContext: currentWindowContext }; }; IntellisenseRemoteHelpers.prototype.getIntellisenseItemsForObjectContext = function (context, propertyNameCallback, includeKeywordsAndLocals, locals) { var propertyNames = propertyNameCallback(context); if (includeKeywordsAndLocals) { propertyNames = Array.prototype.concat.call(propertyNames, IntellisenseRemoteHelpers.JSKeywords); propertyNames = Array.prototype.concat.call(propertyNames, locals); } var choices = []; for (var i = 0, len = propertyNames.length; i < len; i++) { if (!String.prototype.match.call(propertyNames[i], /^\d/)) { choices.push({ name: propertyNames[i], info: "" }); } } var simpleCompare = function (a, b) { if (a < b) { return -1; } else if (a > b) { return 1; } else { return 0; } }; choices = Array.prototype.sort.call(choices, function (a, b) { var result = simpleCompare(a.name.toLowerCase(), b.name.toLowerCase()); if (result === 0) { return simpleCompare(b.name, a.name); } else { return result; } }); for (var i = 1; i < choices.length;) { if (choices[i - 1].name === choices[i].name) { choices.splice(i, 1); } else { i++; } } return { choices: choices }; }; IntellisenseRemoteHelpers.JSKeywords = [ "break", "case", "catch", "const", "continue", "debugger", "default", "delete", "do", "else", "finally", "for", "function", "if", "in", "instanceof", "let", "new", "return", "switch", "this", "throw", "try", "var", "void", "while", "with", "typeof", "false", "true", "cd", "dir", "select", "$", "$$" ]; return IntellisenseRemoteHelpers; })(); Intellisense.IntellisenseRemoteHelpers = IntellisenseRemoteHelpers; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); // objectTreeView.ts var Common; (function (Common) { (function (ObjectView) { "use strict"; var Measurements = (function () { function Measurements() { this._cellOffset = 0; this._rowHeight = 0; this._unitEx = 0; } Object.defineProperty(Measurements.prototype, "cellOffset", { get: function () { return this._cellOffset; }, enumerable: true, configurable: true }); Object.defineProperty(Measurements.prototype, "rowHeight", { get: function () { return this._rowHeight; }, enumerable: true, configurable: true }); Object.defineProperty(Measurements.prototype, "unitEx", { get: function () { return this._unitEx; }, enumerable: true, configurable: true }); Measurements.prototype.update = function (container) { var measurementContainer = DomHelpers.createElement("div", "listview-grid"); measurementContainer.style.display = "block"; measurementContainer.style.position = "absolute"; measurementContainer.style.left = "-5000px"; measurementContainer.style.top = "-5000px"; measurementContainer.style.width = "1000px"; measurementContainer.style.height = "500px"; (container || document.body).appendChild(measurementContainer); var row = DomHelpers.createElement("div", "listview-grid-row grid-row-normal"); row.tabIndex = -1; row.setAttribute("role", "listitem"); measurementContainer.appendChild(row); var cell = DomHelpers.createElement("div", "listview-grid-cell"); cell.style.width = "100px"; cell.innerText = "1"; row.appendChild(cell); this._rowHeight = row.offsetHeight; this._cellOffset = cell.offsetWidth - 100; var textUnit = DomHelpers.createElement("div"); textUnit.style.overflow = "hidden"; textUnit.style.width = "1em"; textUnit.style.height = "1ex"; cell.appendChild(textUnit); this._unitEx = textUnit.offsetHeight; (container || document.body).removeChild(measurementContainer); }; return Measurements; })(); ObjectView.Measurements = Measurements; (function (DomHelpers) { function createElement(type, className) { var element = document.createElement(type); if (className) { element.className = className; } return element; } DomHelpers.createElement = createElement; function findClosestElement(element, selector, within) { var stop = within || document.body; var closest = element; while (closest && closest !== stop) { if (closest.msMatchesSelector(selector)) { return closest; } closest = closest.parentElement; } return null; } DomHelpers.findClosestElement = findClosestElement; })(ObjectView.DomHelpers || (ObjectView.DomHelpers = {})); var DomHelpers = ObjectView.DomHelpers; var ObjectTreeView = (function () { function ObjectTreeView(container, toggleCallback, selectCallback, editCallback, clickCallback, renderFunction) { this._isTabbingOut = false; this._delayedRenderRequestCount = 0; this._containerElement = container; this._toggleCallback = toggleCallback; this._selectCallback = selectCallback; this._editCallback = editCallback; this._clickCallback = clickCallback; this._nameColumnWidth = ObjectTreeView.DefaultColumnSize; this._isInitialResize = true; this._autoScrollEnabled = true; this._scrollPadding = 5; this._hasIndent = true; this._renderFunction = renderFunction; if (!this._renderFunction) { this._renderFunction = function (expression, msec, language) { return window.setTimeout(expression, msec, language); }; } this.initialize(); } Object.defineProperty(ObjectTreeView.prototype, "onUpdated", { get: function () { return this._onUpdated; }, set: function (callback) { this._onUpdated = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "postRenderCallback", { get: function () { return this._postRenderCallback; }, set: function (callback) { this._postRenderCallback = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "notifyToggleCallback", { get: function () { return this._notifyToggleCallback; }, set: function (callback) { this._notifyToggleCallback = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "scrollPadding", { get: function () { return this._scrollPadding; }, set: function (value) { this._scrollPadding = value; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "hasIndent", { get: function () { return this._hasIndent; }, set: function (value) { this._hasIndent = value; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "onBeforeRendering", { get: function () { return this._onBeforeRendering; }, set: function (callback) { this._onBeforeRendering = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "onRendered", { get: function () { return this._onRendered; }, set: function (callback) { this._onRendered = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "onBeforeItemToggle", { get: function () { return this._onBeforeItemToggle; }, set: function (callback) { this._onBeforeItemToggle = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "onItemToggled", { get: function () { return this._onItemToggled; }, set: function (callback) { this._onItemToggled = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "onBeforeScroll", { get: function () { return this._onBeforeScroll; }, set: function (callback) { this._onBeforeScroll = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ObjectTreeView.prototype, "onScrollCompleted", { get: function () { return this._onScrollCompleted; }, set: function (callback) { this._onScrollCompleted = callback; }, enumerable: true, configurable: true }); ObjectTreeView.prototype.resize = function () { this.onResize(null); }; ObjectTreeView.prototype.addItems = function (items, linkedTo, linkAsSiblings, preventScrollToItem, addBeforeSibling) { var _this = this; var parentContext = null; var linkedContext = null; var scrollInfo = null; var unfilteredIndexStart = 0; var filteredIndexStart = 0; F12.Tools.Utility.Assert.isFalse(addBeforeSibling && !linkAsSiblings, "addBeforeSibling (true) can only be used with linkAsSiblings (true) in objectTreeView addItems"); var unfilteredItems = []; var filteredItems = []; for (var i = 0; i < items.length; i++) { items[i].isStale = linkedTo && linkedTo.isStale; if (items[i].additionalClass === "consoleItemInput") { this._autoScrollEnabled = true; } var lastItem; if (i > 0) { lastItem = items[i - 1]; } else if (this._filteredList && this._filteredList.length > 0) { lastItem = this.getItem(this._filteredList.length - 1); } var isIncluded = (!this._filter || this._filter(items[i])) && this.separatorFilter(items[i], lastItem); var id = items[i].id; if (items[i].htmlLines && items[i].htmlLines.length > 0) { for (var j = 0; j < items[i].htmlLines.length; j++) { unfilteredItems.push(id + "::" + j); if (isIncluded) { filteredItems.push(id + "::" + j); } } } else { unfilteredItems.push(id); if (isIncluded) { filteredItems.push(id); } } } if (linkedTo) { parentContext = this._dataContextMap[linkedTo.id]; linkedContext = parentContext; if (linkAsSiblings) { parentContext = linkedContext.parentContext; } } if (parentContext || linkedContext) { var attachTo = linkedContext.item; unfilteredIndexStart = this.getIndexOfItem(this._unfilteredList, attachTo) + 1; filteredIndexStart = this.getIndexOfItem(this._filteredList, attachTo) + 1; if (!linkAsSiblings) { unfilteredIndexStart += (parentContext ? parentContext.descendantCount : 0); filteredIndexStart += (parentContext ? parentContext.expandedCount : 0); } else if (addBeforeSibling) { unfilteredIndexStart -= 1; filteredIndexStart -= 1; F12.Tools.Utility.Assert.isTrue(unfilteredIndexStart >= 0); F12.Tools.Utility.Assert.isTrue(filteredIndexStart >= 0); if (unfilteredIndexStart < 0) { unfilteredIndexStart = 0; } if (filteredIndexStart < 0) { filteredIndexStart = 0; } } if (parentContext) { parentContext.children = (parentContext.children || []).concat(items); this.updateContextCounts(parentContext, unfilteredItems.length, filteredItems.length); } var index = filteredIndexStart - 1; if (index + filteredItems.length >= this._currentViewport.last - this._scrollPadding - 1) { if (filteredItems.length + 1 < this._currentViewport.unboundLast - this._currentViewport.unboundFirst - this._scrollPadding * 2) { scrollInfo = { index: index + filteredItems.length, top: false }; } else { scrollInfo = { index: index, top: true }; } } } else { unfilteredIndexStart = this._unfilteredList.length; filteredIndexStart = this._filteredList.length; } for (var i = 0; i < items.length; i++) { var htmlLinesCount = items[i].htmlLines && items[i].htmlLines.length > 0 ? items[i].htmlLines.length - 1 : 0; this._dataContextMap[items[i].id] = { item: items[i], children: [], parentContext: parentContext, descendantCount: htmlLinesCount, expandedCount: htmlLinesCount }; } if (this._unfilteredList.length === 0 || unfilteredIndexStart === this._unfilteredList.length) { this._unfilteredList = this._unfilteredList.concat(unfilteredItems); } else { this.spliceArray(this._unfilteredList, unfilteredItems, unfilteredIndexStart); } if (this._filteredList.length === 0 || filteredIndexStart === this._filteredList.length) { this._filteredList = this._filteredList.concat(filteredItems); } else { this.spliceArray(this._filteredList, filteredItems, filteredIndexStart); } this.requestRender(true); if (!preventScrollToItem && scrollInfo) { this._delayedScrollFunction = function () { _this.scrollIndexIntoView(scrollInfo.index, scrollInfo.top); }; } }; ObjectTreeView.prototype.updateItemLines = function (item, oldLineCount) { var id = item.id; var unfilteredIndexStart = this.getIndexOfItem(this._unfilteredList, item); var filteredIndexStart = this.getIndexOfItem(this._filteredList, item); if (unfilteredIndexStart >= 0) { var unfilteredItems = []; var filteredItems = []; for (var i = 0; i < item.htmlLines.length; i++) { unfilteredItems.push(id + "::" + i); if (filteredIndexStart >= 0) { filteredItems.push(id + "::" + i); } } var args = [unfilteredIndexStart, oldLineCount].concat(unfilteredItems); Array.prototype.splice.apply(this._unfilteredList, args); if (filteredIndexStart >= 0) { args = [filteredIndexStart, oldLineCount].concat(filteredItems); Array.prototype.splice.apply(this._filteredList, args); } this.updateContextCounts(this._dataContextMap[item.id], unfilteredItems.length - oldLineCount, filteredItems.length - oldLineCount); } this.requestRender(true); }; ObjectTreeView.prototype.selectItem = function (item, forceFocus) { var _this = this; if (typeof forceFocus === "undefined") { forceFocus = true; } if (this._delayedRenderCookie) { this._delayedSelectFunction = function () { return _this.selectItem(item, forceFocus); }; return false; } var rows = this._gridElement.querySelectorAll(".listview-grid-row"); for (var i = 0; i < rows.length; i++) { var row = rows.item(i); var index = parseInt(row.getAttribute("data-index"), 10); if (this.getItem(index) === item && (!item.htmlLines || this.getLineIndex(this._filteredList[index]) === 0)) { this.selectRow(row, forceFocus, false); return true; } } var index = this.getIndexOfItem(this._filteredList, item, false); if (index > -1) { this.scrollIndexIntoView(index, true); var row = document.getElementById("row_" + index); if (row) { this.selectRow(row, forceFocus, false); return true; } } return false; }; ObjectTreeView.prototype.markItemsAsStale = function (staleTargetEngine) { for (var i = 0, n = this._unfilteredList.length; i < n; i++) { var itemId = this.getItemId(this._unfilteredList[i]); var listItem = this._dataContextMap[itemId].item; var targetEngine = listItem.engine; if (targetEngine && targetEngine.engineId === staleTargetEngine.engineId) { listItem.isStale = !staleTargetEngine.targetId || (targetEngine.targetId === staleTargetEngine.targetId); } } this.requestRender(true); }; ObjectTreeView.prototype.selectRow = function (row, forceFocus, selectItem) { var _this = this; if (typeof selectItem === "undefined") { selectItem = true; } if (row && row.classList.contains("listview-grid-row")) { var newIndex = parseInt(row.getAttribute("data-index"), 10); if (newIndex !== this._selectedIndex || forceFocus) { this._selectedIndex = newIndex; this._selectedRow = row; var lineIndex = this.getLineIndex(this._filteredList[this._selectedIndex]); if (lineIndex >= 1 && selectItem) { var newIndex = this._selectedIndex - lineIndex; this.selectItem(this.getItem(newIndex)); return; } if (this._delayedSelectCookie) { window.clearTimeout(this._delayedSelectCookie); } this._delayedSelectCookie = window.setTimeout(function () { if (_this._selectedRow) { var rows = _this._gridElement.querySelectorAll(".listview-grid-row-selected"); for (var i = 0; i < rows.length; i++) { rows.item(i).classList.remove("listview-grid-row-selected"); } var item = _this.getItem(_this._selectedIndex); if (!item) { _this._delayedSelectCookie = null; return; } var row = _this._selectedRow; var lineCount = 0; while (lineCount < (item.htmlLines ? item.htmlLines.length : 1) && row) { row.classList.add("listview-grid-row-selected"); row = row.nextSibling; lineCount++; } if (forceFocus || _this.isFocusWithin()) { _this._selectedRow.focus(); } else { _this.scrollIndexIntoView(_this._selectedIndex); } _this.updateGroupLine(); if (_this._selectCallback) { _this._selectCallback(item); } } _this._delayedSelectCookie = null; }, 10); } } }; ObjectTreeView.prototype.toggleRow = function (row) { var index = parseInt(row.getAttribute("data-index"), 10); if (!isNaN(index)) { var treeIcon = row.querySelector(".listview-icon-tree"); if (treeIcon) { this.toggleRowAt(index); } } }; ObjectTreeView.prototype.setRowState = function (index, newState) { var item = this.getItem(index); if (!item) { return; } var context = this._dataContextMap[item.id]; var isCollapsed = context.descendantCount <= (item.htmlLines ? item.htmlLines.length - 1 : 0); if ((newState === ObjectTreeView.EXPAND_ROW && isCollapsed) || (newState === ObjectTreeView.COLLAPSE_ROW && !isCollapsed)) { this.toggleRowAt(index); } }; ObjectTreeView.prototype.toggleRowAt = function (index) { var _this = this; var item = this.getItem(index); if (!item) { return; } if (this._onBeforeItemToggle) { this._onBeforeItemToggle(); } var context = this._dataContextMap[item.id]; if (context.descendantCount <= (item.htmlLines ? item.htmlLines.length - 1 : 0)) { if (this._toggleCallback) { this._toggleCallback(context.item); } } else { var lineCount = (item.htmlLines ? item.htmlLines.length - 1 : 0); var unfilteredRemoveCount = (context.descendantCount - lineCount); var filteredRemoveCount = (context.expandedCount - lineCount); var start = this.getIndexOfItem(this._unfilteredList, item); var removed = this._unfilteredList.splice(start + 1 + lineCount, unfilteredRemoveCount); for (var i = 0; i < removed.length; i++) { var id = this.getItemId(removed[i]); this._dataContextMap[id] = null; } if (this._selectedIndex > index + lineCount && this._selectedIndex < index + 1 + lineCount + filteredRemoveCount) { this._selectedIndex = index; } this._filteredList.splice(index + 1 + lineCount, filteredRemoveCount); this.updateContextCounts(context, -unfilteredRemoveCount, -filteredRemoveCount); this.requestRender(true, index); if (this._onUpdated) { this._onUpdated([item]); } } setTimeout(function () { if (_this._notifyToggleCallback) { _this._notifyToggleCallback(); } }); if (this._onItemToggled) { this._onItemToggled(); } }; ObjectTreeView.prototype.setButtonState = function (item, buttonIndex, isEnabled, isChecked) { if (item.buttonItems) { var rows = this._gridElement.querySelectorAll(".listview-grid-row"); for (var i = 0; i < rows.length; i++) { var row = rows.item(i); var index = parseInt(row.getAttribute("data-index"), 10); if (this.getItem(index) === item && this.getLineIndex(this._filteredList[index]) === 0) { var button = row.querySelector("[listview-button-index=\"" + buttonIndex + "\"]"); if (button) { Common.ButtonHelpers.changeButtonStatus(button, isEnabled); var buttonItem = item.buttonItems[buttonIndex]; buttonItem.isEnabled = isEnabled; if (isEnabled) { buttonItem.isChecked = isChecked; var tooltip = isChecked ? buttonItem.checkedTooltip : buttonItem.uncheckedTooltip; button.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString(tooltip)); button.setAttribute("aria-label", Plugin.Resources.getString(tooltip)); var buttonDiv = button.querySelector(".buttonIcon.icon_16x16"); if (buttonDiv) { if (isChecked) { buttonDiv.classList.add("checked"); } else { buttonDiv.classList.remove("checked"); } } } } } } } }; ObjectTreeView.prototype.setFilter = function (filter) { var _this = this; this._filter = filter; var map = {}; for (var i = 0; i < this._filteredList.length; i++) { map[this._filteredList[i]] = true; } var newList = []; var currentSelectedItemIndex = -1; if (this._selectedIndex > -1) { var currentSelectedItem = this.getSelectedItem(); if (currentSelectedItem) { currentSelectedItemIndex = this.getIndexOfItem(this._unfilteredList, currentSelectedItem); } this._selectedIndex = -1; } var previousFilteredItem; for (var i = 0; i < this._unfilteredList.length; i++) { var fullId = this._unfilteredList[i]; var context = this._dataContextMap[this.getItemId(fullId)]; var expandChange = 0; var wasInOldView = !!map[fullId]; if (filter(context.item) && this.separatorFilter(context.item, previousFilteredItem)) { previousFilteredItem = context.item; newList.push(fullId); if (!wasInOldView) { expandChange = 1; } if (i >= currentSelectedItemIndex && this._selectedIndex === -1) { this._selectedIndex = newList.length - 1; } } else if (wasInOldView) { expandChange = -1; if (i === currentSelectedItemIndex) { if (newList && newList.length > 0) { this._selectedIndex = newList.length - 1; } } } if (expandChange) { var currentContext = context.parentContext; if (currentContext) { while (currentContext) { currentContext.expandedCount += expandChange; currentContext = currentContext.parentContext; } } } } this._filteredList = newList; if (this._selectedIndex === -1) { this._selectedRow = null; } else { this._delayedScrollFunction = function () { return _this.scrollIndexIntoView(_this._selectedIndex, true); }; } this.requestRender(true); }; ObjectTreeView.prototype.sortFilteredList = function (getSortString) { var _this = this; this._filteredList.sort(function (a, b) { var a = getSortString(_this._dataContextMap[_this.getItemId(a)].item); var b = getSortString(_this._dataContextMap[_this.getItemId(b)].item); var result = Common.ToolWindowHelpers.naturalSort(a.toLowerCase(), b.toLowerCase()); if (result === 0) { return Common.ToolWindowHelpers.naturalSort(b, a); } else { return result; } }); }; ObjectTreeView.prototype.getItemCount = function () { return this._filteredList.length; }; ObjectTreeView.prototype.getUnfilteredItemCount = function () { return this._unfilteredList.length; }; ObjectTreeView.prototype.getItemAt = function (index) { if (index >= 0 && index < this._filteredList.length) { return this.getItem(index); } return null; }; ObjectTreeView.prototype.getSelectedItem = function () { if (this._selectedIndex >= 0 && this._selectedIndex < this._filteredList.length) { return this.getItem(this._selectedIndex); } return null; }; ObjectTreeView.prototype.getSelectedRow = function () { if (this._selectedRow) { return this._selectedRow; } else if (this._selectedIndex >= 0 && this._selectedIndex < this._filteredList.length) { this.scrollIndexIntoView(this._selectedIndex); return document.getElementById("row_" + this._selectedIndex); } return null; }; ObjectTreeView.prototype.getItemChildren = function (item) { if (this._dataContextMap[item.id]) { return this._dataContextMap[item.id].children; } return null; }; ObjectTreeView.prototype.isItemExpanded = function (item) { return (this._dataContextMap[item.id] && this._dataContextMap[item.id].descendantCount > (item.htmlLines ? item.htmlLines.length - 1 : 0)); }; ObjectTreeView.prototype.isItemCollapsed = function (item) { return (this._dataContextMap[item.id] && this._dataContextMap[item.id].descendantCount <= (item.htmlLines ? item.htmlLines.length - 1 : 0)); }; ObjectTreeView.prototype.removeItem = function (item, preventRedraw) { if (!item) { return; } var context = this._dataContextMap[item.id]; if (context) { var index = this.getIndexOfItem(this._filteredList, item); if (index !== -1) { this._filteredList.splice(index, context.expandedCount + 1); } var unfilteredIndex = this.getIndexOfItem(this._unfilteredList, item); var removed = this._unfilteredList.splice(unfilteredIndex, context.descendantCount + 1); for (var i = 0; i < removed.length; i++) { var id = this.getItemId(removed[i]); this._dataContextMap[id] = null; } var currentContext = context.parentContext; if (currentContext && currentContext.children) { var i = currentContext.children.indexOf(item); if (i > -1) { currentContext.children.splice(i, 1); } this.updateContextCounts(context, -(context.descendantCount + 1), -(context.expandedCount + 1)); } var itemToSelect; if (this._selectedIndex === index) { itemToSelect = this.getItem(Math.min(index, this._filteredList.length - 1)); } else if (this._selectedIndex > index) { itemToSelect = this.getItem(Math.min(this._selectedIndex - context.expandedCount, this._filteredList.length - 1)); } if (itemToSelect) { this.selectItem(itemToSelect); } this.requestRender(!preventRedraw); } }; ObjectTreeView.prototype.scrollToBottom = function () { var _this = this; if (!this._delayedRenderCookie) { this._rootElement.scrollTop = this._rootElement.scrollHeight; } else { this._delayedScrollFunction = function () { _this.scrollToBottom(); }; } }; ObjectTreeView.prototype.remeasure = function () { this._measurements.update(); this.requestRender(true); }; ObjectTreeView.prototype.refresh = function () { this.requestRender(true); }; ObjectTreeView.prototype.clear = function () { if (this._delayedSelectCookie) { clearTimeout(this._delayedSelectCookie); this._delayedSelectCookie = null; } if (this._delayedFocusCookie) { clearTimeout(this._delayedFocusCookie); this._delayedFocusCookie = null; } this._dataContextMap = {}; this._filteredList = []; this._unfilteredList = []; this._selectedIndex = -1; this._selectedRow = null; this._groupLineElement.style.display = "none"; if (this._onUpdated) { this._onUpdated(null); } this.executePendingRenderRequest(true); }; ObjectTreeView.prototype.expandAllItems = function (rootIndex, filter) { var item = this.getItem(rootIndex); if (!item) { return; } var rootContext = this._dataContextMap[item.id]; if (rootContext) { this.expandDescendants(rootContext.item, filter); } }; ObjectTreeView.prototype.collapseAllItems = function (rootIndex) { var item = this.getItem(rootIndex); if (!item) { return; } var rootContext = this._dataContextMap[item.id]; if (rootContext) { var item = rootContext.item; if (this.isItemExpanded(item)) { this.toggleRowAt(this.getIndexOfItem(this._filteredList, item)); } } }; ObjectTreeView.prototype.getTreeViewItemIndent = function (index) { var indent = (-1); var item = this.getItem(index); if (item) { indent = 0; if (this._dataContextMap) { var context = this._dataContextMap[item.id]; if (context) { indent = this.getIndent(context); } } } return indent; }; ObjectTreeView.prototype.getIndex = function (item) { return this.getIndexOfItem(this._filteredList, item); }; ObjectTreeView.prototype.isAutoScrollToItemEnabled = function (item) { var isLastItem = false; var htmlLinesCount = 1; if (item && item.htmlLines) { htmlLinesCount = item.htmlLines.length; } isLastItem = this.getIndex(item) === (this.getItemCount() - htmlLinesCount); if (this._scrollBottom >= this._measurements.rowHeight * Math.max(0, this._filteredList.length - htmlLinesCount)) { this._autoScrollEnabled = true; } return this._autoScrollEnabled && isLastItem; }; ObjectTreeView.prototype.onDOMAttrModified = function (evt) { if (evt.attrName === "aria-expanded") { var element = evt.target; var toExpand = evt.newValue === "true"; var currentExpanded = element.classList.contains("listview-grid-row-expanded"); var currentCollapsed = element.classList.contains("listview-grid-row-collapsed"); if ((toExpand && currentCollapsed) || (!toExpand && currentExpanded)) { this.toggleRow(element); } } }; ObjectTreeView.prototype.addDOMAttrModifiedHandler = function (e) { e.addEventListener("DOMAttrModified", this.onDOMAttrModified.bind(this)); }; ObjectTreeView.prototype.initialize = function () { var _this = this; this._rootElement = DomHelpers.createElement("div", "listview"); this._rootElement.setAttribute("tabindex", "1"); this._rootElement.setAttribute("role", "tree"); this._containerElement.appendChild(this._rootElement); this._spacerTopElement = DomHelpers.createElement("span", "listview-grid-content-spacer"); this._rootElement.appendChild(this._spacerTopElement); this._rootElement.appendChild(DomHelpers.createElement("div", "")); this._gridElement = DomHelpers.createElement("div", "listview-grid"); this._rootElement.appendChild(this._gridElement); this._groupLineElement = DomHelpers.createElement("div", "listview-grid-groupline"); this._rootElement.appendChild(this._groupLineElement); this._separatorElement = DomHelpers.createElement("div", "listview-grid-separator"); this._separatorElement.style.left = (ObjectTreeView.SeparatorOffset + this._nameColumnWidth) + "px"; this._rootElement.appendChild(this._separatorElement); this._rootElement.appendChild(DomHelpers.createElement("div", "")); this._spacerBottomElement = DomHelpers.createElement("span", "listview-grid-content-spacer"); this._rootElement.appendChild(this._spacerBottomElement); window.addEventListener("resize", function (e) { return _this.onResize(e); }); this._rootElement.addEventListener("scroll", function (e) { return _this.onScroll(e); }); this._rootElement.addEventListener("mousedown", function (e) { return _this.onMouseDown(e); }); this._rootElement.addEventListener("dblclick", function (e) { return _this.onMouseDblClick(e); }); this._rootElement.addEventListener("keydown", function (e) { return _this.onKeyDown(e); }); this._rootElement.addEventListener("copy", function (e) { return _this.onCopy(e); }); this._rootElement.addEventListener("focus", function (e) { return _this.onFocus(e); }, true); this._rootElement.addEventListener("blur", function (e) { return _this.onBlur(e); }, true); this._measurements = new Measurements(); window.setTimeout(function () { _this._measurements.update(_this._containerElement); }, 10); this.resetViewport(); this._scrollHeight = 0; this._scrollBottom = this._rootElement.clientHeight + this._rootElement.scrollTop; this._dataContextMap = {}; this._unfilteredList = []; this._filteredList = []; this._linesMap = {}; this._errorLabel = Common.ToolWindowHelpers.loadString("SingleError", [""]); this._infoLabel = Common.ToolWindowHelpers.loadString("SingleMessage", [""]); this._warningLabel = Common.ToolWindowHelpers.loadString("SingleWarning", [""]); this._isStaleLabel = Common.ToolWindowHelpers.loadString("ConsoleStaleMessage"); }; ObjectTreeView.prototype.resetViewport = function () { this._currentViewport = { first: Number.MAX_VALUE, last: -1, scrollTop: 0, spaceTop: 0, spaceBottom: 0, unboundFirst: Number.MAX_VALUE, unboundLast: -1 }; }; ObjectTreeView.prototype.getViewportRowInfo = function () { var maxCount = Math.max(0, this._filteredList.length - 1); var rh = this._measurements.rowHeight; var maxTop = (maxCount + 2) * rh - this._rootElement.clientHeight; if (this._rootElement.scrollTop > maxTop) { this._rootElement.scrollTop = maxTop; } var top = this._rootElement.scrollTop; var bottom = top + this._rootElement.clientHeight; var unboundFirst = Math.floor(top / rh) - this._scrollPadding; var unboundLast = Math.ceil(bottom / rh) + this._scrollPadding; var first = Math.min(maxCount, Math.max(0, unboundFirst)); var last = Math.max(0, Math.min(maxCount, unboundLast)); var spaceTop = Math.max(0, first * rh); var spaceBottom = Math.max(0, (maxCount - last) * rh); return { first: first, last: last, scrollTop: top, spaceTop: spaceTop, spaceBottom: spaceBottom, unboundFirst: unboundFirst, unboundLast: unboundLast }; }; ObjectTreeView.prototype.sizeSpacer = function (spacerElement, height) { if (spacerElement.firstChild) { spacerElement.removeChild(spacerElement.firstChild); } if (height < ObjectTreeView.MaxSpacerSize) { spacerElement.style.height = height + "px"; spacerElement.style.display = "block"; } else { var fragment = document.createDocumentFragment(); spacerElement.style.height = "auto"; spacerElement.style.display = "inline"; var div = document.createElement("div"); div.style.height = (height % ObjectTreeView.MaxSpacerSize) + "px"; fragment.appendChild(div); var count = Math.floor(height / ObjectTreeView.MaxSpacerSize); for (var i = 0; i < count; i++) { div = document.createElement("div"); div.style.height = ObjectTreeView.MaxSpacerSize + "px"; fragment.appendChild(div); } var span = document.createElement("span"); span.style.display = "inline-block"; span.appendChild(fragment); spacerElement.appendChild(span); } }; ObjectTreeView.prototype.requestRender = function (forceRedraw, selectNewIndex) { var _this = this; if (!this._delayedRenderCookie) { this._delayedRenderCookie = this._renderFunction(function () { return _this.executePendingRenderRequest(forceRedraw, selectNewIndex); }, ObjectTreeView.DelayedRenderInterval); } else { this._delayedRenderRequestCount++; } if (this._delayedRenderRequestCount > ObjectTreeView.MaxDelayedRenderRequestCount) { if (this._delayedRenderCookie) { window.clearTimeout(this._delayedRenderCookie); } this.executePendingRenderRequest(forceRedraw, selectNewIndex); } }; ObjectTreeView.prototype.executePendingRenderRequest = function (forceRedraw, selectNewIndex) { if (this._onBeforeRendering) { this._onBeforeRendering(); } this._delayedRenderCookie = null; this._delayedRenderRequestCount = 0; this.performRender(forceRedraw, selectNewIndex); if (this._delayedScrollFunction) { this._delayedScrollFunction(); this._delayedScrollFunction = null; } if (this._delayedSelectFunction) { this._delayedSelectFunction(); this._delayedSelectFunction = null; } }; ObjectTreeView.prototype.getLabelForAddedClasses = function (classes) { if (!classes) { return ""; } var result; if (classes.lastIndexOf("consoleItemError") >= 0) { result = this._errorLabel; } else if (classes.lastIndexOf("consoleItemInfo") >= 0) { result = this._infoLabel; } else if (classes.lastIndexOf("consoleItemWarn") >= 0) { result = this._warningLabel; } if (result && classes.lastIndexOf("Stale") >= 0) { result = this._isStaleLabel + " " + result; } else if (!result) { result = ""; } return result; }; ObjectTreeView.prototype.performRender = function (forceRedraw, selectNewIndex) { var _this = this; this._ignoreScroll = true; var newViewport = this.getViewportRowInfo(); this._gridElement.style.height = this._gridElement.clientHeight + "px"; this.sizeSpacer(this._spacerTopElement, newViewport.spaceTop); this.sizeSpacer(this._spacerBottomElement, newViewport.spaceBottom); this._separatorElement.style.top = newViewport.scrollTop + "px"; if (forceRedraw) { while (this._gridElement.hasChildNodes()) { var rowToRemove = this._gridElement.lastChild; if (this._selectedRow === rowToRemove) { if (this.isFocusWithin()) { var scrollY = this._rootElement.scrollTop; this._rootElement.focus(); this._rootElement.scrollTop = scrollY; } this._selectedRow = null; } this._gridElement.removeChild(rowToRemove); } this.resetViewport(); } var fragmentTop = document.createDocumentFragment(); var fragmentBottom = document.createDocumentFragment(); for (var i = newViewport.first; i <= newViewport.last && i < this._filteredList.length; i++) { if (i < this._currentViewport.first || i > this._currentViewport.last) { var item = this.getItem(i); if (!item) { continue; } var context = this._dataContextMap[item.id]; var indent = this.getIndent(context); var isSingleCell = (item.name === null || item.name === undefined); var lineIndex = (item.htmlLines && item.htmlLines.length > 0 ? this.getLineIndex(this._filteredList[i]) : -1); var isExpanded = (context.descendantCount > (item.htmlLines ? item.htmlLines.length - 1 : 0)); var isSelected = (this.getSelectedItem() === item); var ariaLabel = ""; var itemClasses = "listview-grid-row" + (item.additionalClass ? " " + item.additionalClass : ""); var row = DomHelpers.createElement("div", itemClasses); row.tabIndex = -1; row.id = "row_" + i; row.setAttribute("data-index", "" + i); row.setAttribute("role", "treeitem"); row.style.height = (this._measurements.rowHeight) + "px"; if (isSelected) { row.classList.add("listview-grid-row-selected"); } var fragment = (i < this._currentViewport.first ? fragmentTop : fragmentBottom); fragment.appendChild(row); if (item.isSeparator) { ariaLabel = item.value; row.appendChild(DomHelpers.createElement("div", "listview-horizontal-separator")); } else if (!isSingleCell) { if (item.hasIcon) { var iconCell = DomHelpers.createElement("div", "listview-grid-cell " + (lineIndex <= 0 ? "listview-grid-cell-icon" : "listview-grid-cell-icon-space")); iconCell.style.position = "absolute"; iconCell.style.left = ((indent - 1) * ObjectTreeView.IndentWidth) + "px"; row.appendChild(iconCell); if (lineIndex <= 0 && item.additionalClass) { ariaLabel = this.getLabelForAddedClasses(item.additionalClass) + " "; } } var nameCell = DomHelpers.createElement("div", "listview-grid-cell listview-grid-cell-resize"); nameCell.innerText = (lineIndex <= 0 ? item.name : ""); if (lineIndex <= 0 && item.name) { ariaLabel = ariaLabel + item.name + " "; } nameCell.style.textIndent = ((indent + 1) * ObjectTreeView.IndentWidth) + "px"; nameCell.style.width = this._nameColumnWidth + "px"; row.appendChild(nameCell); if (item.hasChildren && (lineIndex === -1 || lineIndex === 0)) { var treeIcon = DomHelpers.createElement("div", "listview-icon-tree"); treeIcon.classList.add(isExpanded ? "listview-icon-tree-expanded" : "listview-icon-tree-collapsed"); row.setAttribute("aria-expanded", isExpanded ? "true" : "false"); this.addDOMAttrModifiedHandler(row); treeIcon.style.left = (indent * ObjectTreeView.IndentWidth + 3) + "px"; row.appendChild(treeIcon); } var valueCell = DomHelpers.createElement("div", "listview-grid-cell listview-grid-cell-value"); if (lineIndex === -1) { valueCell.innerText = item.value; ariaLabel = ariaLabel + item.value; } else { valueCell.innerHTML = item.htmlLines[lineIndex]; if (lineIndex === 0) { for (var labelLine = 0; labelLine < item.htmlLines.length; labelLine++) { ariaLabel = ariaLabel + (item.htmlLines[labelLine]).replace(/<[^>]*>/g, "") + " "; } } } row.appendChild(valueCell); } else { var cellIndent = this._hasIndent ? (indent + (item.hasIcon ? -1 : 1)) : 0; var indentCell = DomHelpers.createElement("div", "listview-grid-cell listview-grid-cell-indent"); indentCell.style.width = (cellIndent * ObjectTreeView.IndentWidth) + "px"; row.appendChild(indentCell); if (item.hasIcon) { var iconCell = DomHelpers.createElement("div", "listview-grid-cell " + (lineIndex <= 0 ? "listview-grid-cell-icon" : "listview-grid-cell-icon-space")); if (lineIndex <= 0 && item.additionalClass) { ariaLabel = this.getLabelForAddedClasses(item.additionalClass) + " "; } row.appendChild(iconCell); } if (item.buttonItems) { for (var index = 0; index < item.buttonItems.length; index++) { var button = item.buttonItems[index]; var buttonCell = DomHelpers.createElement("div", "listview-grid-cell iconShell_16x16 " + button.buttonClass); buttonCell.setAttribute("listview-button-index", "" + index); var buttonDiv = DomHelpers.createElement("div", "buttonIcon icon_16x16" + (button.isChecked ? " checked" : "")); buttonCell.appendChild(buttonDiv); Common.ButtonHelpers.setupButton(buttonCell, button.isChecked ? button.checkedTooltip : button.uncheckedTooltip, button.clickHandler); row.appendChild(buttonCell); } } if (item.hasChildren) { if (item.hasIcon) { iconCell.style.marginRight = "16px"; cellIndent += 2; } if (lineIndex === -1 || lineIndex === 0) { var treeIcon = DomHelpers.createElement("div", "listview-icon-tree"); treeIcon.classList.add(isExpanded ? "listview-icon-tree-expanded" : "listview-icon-tree-collapsed"); row.setAttribute("aria-expanded", isExpanded ? "true" : "false"); this.addDOMAttrModifiedHandler(row); treeIcon.style.left = (cellIndent * ObjectTreeView.IndentWidth - 13) + "px"; row.appendChild(treeIcon); } } var valueCell = DomHelpers.createElement("div", "listview-grid-cell listview-grid-cell-full listview-grid-cell-value"); if (lineIndex === -1) { valueCell.innerText = item.value; ariaLabel = ariaLabel + item.value; } else { valueCell.innerHTML = item.htmlLines[lineIndex]; if (lineIndex === 0) { for (var labelLine = 0; labelLine < item.htmlLines.length; labelLine++) { ariaLabel = ariaLabel + (item.htmlLines[labelLine]).replace(/<[^>]*>/g, "") + " "; } } if (isSelected) { row.classList.add("listview-grid-row-selected"); } } row.appendChild(valueCell); } var list = row.querySelectorAll(".BPT-Tooltip-Item"); for (var j = 0; j < list.length; j++) { var node = list[j]; if (node instanceof HTMLElement) { node.addEventListener("mouseover", function (ev) { var tooltip = node.getAttribute("data-tooltip"); Plugin.Host.getDocumentLocation(tooltip).done(function (loc) { Plugin.Tooltip.show({ content: loc }); }); }); } } if (item.hasChildren) { row.classList.add(isExpanded ? "listview-grid-row-expanded" : "listview-grid-row-collapsed"); } if ((lineIndex === -1 || lineIndex === item.htmlLines.length - 1)) { var currentContext = context; var drawLine = item.hasSeparator; var nextItemIsSeparator = (i < newViewport.last) && (this.getItem(i + 1).isSeparator); if (!drawLine && context.parentContext) { currentContext = context.parentContext; while (currentContext && i === this.getIndexOfItem(this._filteredList, currentContext.item) + currentContext.expandedCount) { if (currentContext.item.hasSeparator) { drawLine = true; break; } currentContext = currentContext.parentContext; } } if (drawLine && !nextItemIsSeparator) { var lineIndent = this.getIndent(currentContext); var underline = DomHelpers.createElement("div", "listview-grid-underline"); underline.style.left = ((lineIndent - 1) * ObjectTreeView.IndentWidth) + "px"; row.appendChild(underline); } } row.setAttribute("aria-label", ariaLabel); } else if (i === this._currentViewport.first) { i = this._currentViewport.last; } } for (var i = this._currentViewport.first; i <= this._currentViewport.last; i++) { if (i < newViewport.first || i > newViewport.last) { var row = document.getElementById("row_" + i); if (row) { if (this._selectedRow === row) { if (this.isFocusWithin()) { var scrollY = this._rootElement.scrollTop; this._rootElement.focus(); this._rootElement.scrollTop = scrollY; } this._selectedRow = null; } row.parentElement.removeChild(row); } } else if (i === newViewport.first) { i = newViewport.last; } } this._gridElement.insertBefore(fragmentTop, this._gridElement.firstChild); this._gridElement.appendChild(fragmentBottom); this._gridElement.style.height = "auto"; if (!isNaN(selectNewIndex)) { this._selectedIndex = selectNewIndex; this._selectedRow = null; } var scrolledSelectedOutOfView = (this._selectedIndex >= 0) && (this._selectedIndex < newViewport.unboundFirst || this._selectedIndex > newViewport.unboundLast) && (this._selectedIndex >= this._currentViewport.unboundFirst && this._selectedIndex <= this._currentViewport.unboundLast); if (this._selectedIndex >= 0 && !this._selectedRow && !scrolledSelectedOutOfView) { var toSelect = document.getElementById("row_" + this._selectedIndex); if (toSelect) { this._selectedRow = toSelect; } this.updateGroupLine(); } else if (forceRedraw) { this.updateGroupLine(); } this._currentViewport = newViewport; this._ignoreScroll = false; setTimeout(function () { if (_this._postRenderCallback) { _this._postRenderCallback(); _this._postRenderCallback = null; } }); if (this._onRendered) { this._onRendered(); } this._rootElement.setAttribute("tabindex", this._filteredList.length > 0 ? "1" : "-1"); }; ObjectTreeView.prototype.getItemId = function (fullId) { var indexStart = fullId.lastIndexOf("::"); if (indexStart > -1) { fullId = fullId.substring(0, indexStart); } return fullId; }; ObjectTreeView.prototype.getLineIndex = function (fullId) { var lineIndex = -1; if (fullId) { var indexStart = fullId.lastIndexOf("::"); if (indexStart > -1) { lineIndex = parseInt(fullId.substring(indexStart + 2), 10); } } return lineIndex; }; ObjectTreeView.prototype.getIndexOfItem = function (list, item, lastLineOfInput) { if (typeof lastLineOfInput === "undefined") { lastLineOfInput = true; } var rootLineId = this.getItemId(item.id); if (item.additionalClass === "consoleItemInput" && lastLineOfInput) { rootLineId = rootLineId + (item.htmlLines && item.htmlLines.length > 0 ? ("::" + (item.htmlLines.length - 1).toString()) : ""); } else { rootLineId = rootLineId + (item.htmlLines && item.htmlLines.length > 0 ? "::0" : ""); } return list.indexOf(rootLineId); }; ObjectTreeView.prototype.getItem = function (index) { if (index >= 0 && index < this._filteredList.length) { var id = this.getItemId(this._filteredList[index]); if (this._dataContextMap[id]) { return this._dataContextMap[id].item; } } return null; }; ObjectTreeView.prototype.isFocusWithin = function () { return (this._rootElement.querySelectorAll(":focus").length > 0); }; ObjectTreeView.prototype.scrollIndexIntoView = function (index, alignToTop) { if (!document.getElementById("row_" + index) || alignToTop || index < this._currentViewport.unboundFirst + this._scrollPadding || index >= this._currentViewport.unboundLast - this._scrollPadding - 1) { if (alignToTop) { this._rootElement.scrollTop = Math.min((this._filteredList.length * this._measurements.rowHeight) - this._rootElement.clientHeight, index * this._measurements.rowHeight); } else { var item = this.getItem(index); var htmlLinesCount = 1; if (item && item.htmlLines) { htmlLinesCount = item.htmlLines.length; } this._rootElement.scrollTop = ((index + htmlLinesCount + 1) * this._measurements.rowHeight) - this._rootElement.clientHeight; } this.performRender(); } }; ObjectTreeView.prototype.getIndent = function (context) { if (!this._hasIndent) { return 0; } var indent = (context.item.hasIcon ? 1 : 0); while (context && context.parentContext) { context = context.parentContext; indent += (context.item.hasIcon ? 2 : 1); } return indent; }; ObjectTreeView.prototype.updateGroupLine = function () { var setLineHeight = false; if (this._selectedIndex >= 0 && this._selectedIndex < this._filteredList.length) { var item = this.getItem(this._selectedIndex); if (item) { var context = this._dataContextMap[item.id]; if (context && context.expandedCount > (item.htmlLines ? item.htmlLines.length - 1 : 0)) { this._groupLineElement.style.display = "inline-block"; this._groupLineElement.style.top = (this._selectedIndex * this._measurements.rowHeight + this._measurements.rowHeight) + "px"; this._groupLineElement.style.left = ((this.getIndent(context) + 1) * ObjectTreeView.IndentWidth - 4) + "px"; this._groupLineElement.style.height = (context.expandedCount * this._measurements.rowHeight + 1) + "px"; setLineHeight = true; } } } if (!setLineHeight) { this._groupLineElement.style.display = "none"; } }; ObjectTreeView.prototype.updateContextCounts = function (context, descentantCountChange, expandedCountChange) { var currentContext = context; while (currentContext) { currentContext.descendantCount += descentantCountChange; currentContext.expandedCount += expandedCountChange; currentContext = currentContext.parentContext; } }; ObjectTreeView.prototype.spliceArray = function (array, toAdd, insertAt) { var args; var limit = 200000; var parts = ~~(toAdd.length / limit); for (var i = 0; i < parts; i++) { var start = (i * limit); args = [insertAt + start, 0].concat(toAdd.slice(start, limit)); Array.prototype.splice.apply(array, args); } var mod = toAdd.length % limit; if (mod > 0) { args = [insertAt + (toAdd.length - mod), 0].concat(toAdd.slice((toAdd.length - mod), toAdd.length)); Array.prototype.splice.apply(array, args); } }; ObjectTreeView.prototype.moveSelectionUp = function (toParent) { if (toParent) { var index = parseInt(this._selectedRow.getAttribute("data-index"), 10); var item = this.getItem(index); var context = this._dataContextMap[item.id]; if (context.parentContext) { this.selectItem(context.parentContext.item); } } else { var up = this._selectedIndex - 1; if (up >= 0 && up < this._filteredList.length) { this.selectItem(this.getItem(up)); } } }; ObjectTreeView.prototype.moveSelectionDown = function () { var item = this.getSelectedItem(); var down = this._selectedIndex + (item.htmlLines && item.htmlLines.length > 0 ? item.htmlLines.length : 1); if (down >= 0 && down < this._filteredList.length) { this.selectItem(this.getItem(down)); } }; ObjectTreeView.prototype.onDocumentMouseMove = function (e) { var diff = e.clientX - this._separatorStartX; this._nameColumnWidth = Math.max(ObjectTreeView.MinColumnSize, this._nameColumnWidth + diff); this._separatorElement.style.left = (ObjectTreeView.SeparatorOffset + this._nameColumnWidth) + "px"; this._separatorStartX = Math.max(ObjectTreeView.MinColumnSize, e.clientX); return true; }; ObjectTreeView.prototype.onDocumentMouseUp = function (e) { this._separatorElement.classList.remove("listview-grid-separator-visible"); var nameCells = this._gridElement.querySelectorAll(".listview-grid-cell-resize"); for (var i = 0; i < nameCells.length; i++) { nameCells.item(i).style.width = this._nameColumnWidth + "px"; } var fullSpanningCells = this._gridElement.querySelectorAll(".listview-grid-cell-full-content"); for (var i = 0; i < fullSpanningCells.length; i++) { fullSpanningCells.item(i).style.left = -this._nameColumnWidth + "px"; } document.removeEventListener("mousemove", this._boundDocMouseMoveCallback); document.removeEventListener("mouseup", this._boundDocMouseUpCallback); return true; }; ObjectTreeView.prototype.onMouseDown = function (e) { var _this = this; var target = e.target; var clicked = DomHelpers.findClosestElement(target, ".listview-grid-row, .listview-grid-separator"); if (clicked) { if (clicked.classList.contains("listview-grid-row")) { this.selectRow(clicked, true); if (target.classList.contains("listview-grid-cell-clicksection") && this._clickCallback) { var index = parseInt(clicked.getAttribute("data-index"), 10); var item = this.getItem(index); if (item) { this._clickCallback(item, clicked, target, e.button); } } if (target.classList.contains("listview-icon-tree") && e.which === 1) { clicked.focus(); this.toggleRow(clicked); } } else { this._separatorStartX = e.clientX; this._separatorElement.classList.add("listview-grid-separator-visible"); this._boundDocMouseMoveCallback = function (e) { return _this.onDocumentMouseMove(e); }; this._boundDocMouseUpCallback = function (e) { return _this.onDocumentMouseUp(e); }; document.addEventListener("mousemove", this._boundDocMouseMoveCallback); document.addEventListener("mouseup", this._boundDocMouseUpCallback); } } }; ObjectTreeView.prototype.onMouseDblClick = function (e) { var target = e.target; var row = DomHelpers.findClosestElement(target, ".listview-grid-row"); if (row && e.which === 1) { if (target.classList.contains("listview-grid-cell-editsection") && this._editCallback) { var index = parseInt(row.getAttribute("data-index"), 10); var item = this.getItem(index); this._editCallback(item, row, target); } else if (!target.classList.contains("listview-icon-tree")) { this.toggleRow(row); } } }; ObjectTreeView.prototype.onKeyDown = function (e) { if ((e.keyCode >= 37 /* ArrowFirst */ && e.keyCode <= 40 /* ArrowLast */) || e.keyCode === 109 /* Minus */ || e.keyCode === 107 /* Plus */) { if (this._selectedIndex >= 0) { if (!this._selectedRow) { this.scrollIndexIntoView(this._selectedIndex, true); var row = document.getElementById("row_" + this._selectedIndex); if (row) { this.selectRow(row, false); } } if (!this._selectedRow) { return true; } var index = parseInt(this._selectedRow.getAttribute("data-index"), 10); var item = this.getItem(index); if (!item) { return true; } var context = this._dataContextMap[item.id]; var isExpanded = (context.descendantCount > (item.htmlLines ? item.htmlLines.length - 1 : 0)); switch (event.keyCode) { case 109 /* Minus */: case 37 /* ArrowLeft */: if (this._hasIndent) { if (isExpanded) { this.toggleRow(this._selectedRow); } else { var parent = context.parentContext; if (parent && parent.item && this.getIndex(parent.item) >= 0) { this.selectItem(parent.item); } } } break; case 38 /* ArrowUp */: this.moveSelectionUp(); break; case 107 /* Plus */: case 39 /* ArrowRight */: if (!isExpanded) { this.toggleRow(this._selectedRow); } break; case 40 /* ArrowDown */: this.moveSelectionDown(); break; } } e.preventDefault(); return false; } else if (e.keyCode === 65 /* A */ && e.ctrlKey) { e.preventDefault(); return false; } else if (e.keyCode === 32 /* Space */) { e.preventDefault(); return false; } else if (e.keyCode === 9 /* Tab */) { this._isTabbingOut = true; this._rootElement.focus(); } else if (e.keyCode === 67 /* C */ && Common.HasOnlyCtrlKeyFlags(e)) { var textToCopy = window.getSelection().toString(); if (!textToCopy || textToCopy.length === 0) { var selectedItem = this.getSelectedItem(); if (selectedItem && selectedItem.getCopyText) { clipboardData.setData("Text", selectedItem.getCopyText()); e.preventDefault(); return false; } } } }; ObjectTreeView.prototype.onFocus = function (e) { var _this = this; this._rootElement.classList.add("listview-grid-focus-within"); if (e.target === this._rootElement && this._selectedRow && !this._isTabbingOut) { if (!this._delayedFocusCookie) { this._delayedFocusCookie = window.setTimeout(function () { var scrollLeftPosition = _this._rootElement.scrollLeft; var scrollTop = _this._rootElement.scrollTop; if (_this._selectedRow) { _this._selectedRow.focus(); } _this._rootElement.scrollLeft = scrollLeftPosition; _this._rootElement.scrollTop = scrollTop; clearTimeout(_this._delayedFocusCookie); _this._delayedFocusCookie = null; }, ObjectTreeView.DelayedRenderInterval); } } this._isTabbingOut = false; }; ObjectTreeView.prototype.onBlur = function (e) { this._rootElement.classList.remove("listview-grid-focus-within"); }; ObjectTreeView.prototype.onResize = function (e) { this.requestRender(this._isInitialResize); this._isInitialResize = false; this._rootElement.scrollTop = this._scrollBottom - this._rootElement.clientHeight; }; ObjectTreeView.prototype.onScroll = function (e) { if (!this._ignoreScroll) { if (this._onBeforeScroll) { this._onBeforeScroll(); } var newScrollBottom = this._rootElement.clientHeight + this._rootElement.scrollTop; var totalFilteredListHeight = this._measurements.rowHeight * this._filteredList.length; if (this._filteredList.length > 0 && newScrollBottom > (this._filteredList.length - 1) * this._measurements.rowHeight) { newScrollBottom = totalFilteredListHeight; } if (newScrollBottom < this._scrollBottom) { this._autoScrollEnabled = false; } else if (!this._autoScrollEnabled) { this._autoScrollEnabled = newScrollBottom >= totalFilteredListHeight; } if (newScrollBottom !== this._scrollBottom) { this._scrollBottom = newScrollBottom; if (totalFilteredListHeight > this._rootElement.clientHeight) { this.requestRender(); } } if (this._onScrollCompleted) { this._onScrollCompleted(); } } }; ObjectTreeView.prototype.onCopy = function (e) { var selectedText = Common.ToolWindowHelpers.getSelectedText(); if (selectedText) { var compactText = selectedText.replace(/[\r\n]+/g, "\r\n"); clipboardData.setData("Text", compactText); } e.preventDefault(); e.stopImmediatePropagation(); return false; }; ObjectTreeView.prototype.expandDescendants = function (item, filter) { if (filter && filter(item)) { if (this.isItemExpanded(item)) { this.toggleRowAt(this.getIndexOfItem(this._filteredList, item)); } return; } if (!this.isItemExpanded(item)) { this._toggleCallback(item); } if (item.hasChildren) { var children = this.getItemChildren(item); for (var i = 0; i < children.length; i++) { this.expandDescendants(children[i], filter); } } }; ObjectTreeView.prototype.separatorFilter = function (item, previousItem) { if (!item || !previousItem) { return true; } else if (item.isSeparator && previousItem.isSeparator) { return false; } return true; }; ObjectTreeView.DefaultColumnSize = 170; ObjectTreeView.IndentWidth = 16; ObjectTreeView.MaxSpacerSize = 1500000; ObjectTreeView.MinColumnSize = 50; ObjectTreeView.SeparatorOffset = 8; ObjectTreeView.MaxDelayedRenderRequestCount = 500; ObjectTreeView.DelayedRenderInterval = 50; ObjectTreeView.EXPAND_ROW = 1; ObjectTreeView.COLLAPSE_ROW = -1; return ObjectTreeView; })(); ObjectView.ObjectTreeView = ObjectTreeView; })(Common.ObjectView || (Common.ObjectView = {})); var ObjectView = Common.ObjectView; })(Common || (Common = {})); // treeViewUtilities.ts var Common; (function (Common) { (function (ObjectView) { "use strict"; var TreeViewUtils = (function () { function TreeViewUtils() { } TreeViewUtils.getDetailedTypeOf = function (value, constructors) { if (value === undefined) { return "undefined"; } var type = (typeof value); if (type === "object" && constructors) { if (value) { for (var i = 0; i < constructors.length; i++) { var arrayCon = (constructors[i] && constructors[i].array ? constructors[i].array : (new Array()).constructor); var dateCon = (constructors[i] && constructors[i].date ? constructors[i].date : (new Date()).constructor); var regexCon = (constructors[i] && constructors[i].regex ? constructors[i].regex : (new RegExp("")).constructor); try { if (value.constructor === arrayCon) { return "array"; } else if (value.constructor === dateCon) { return "date"; } else if (value.constructor === regexCon) { return "regex"; } } catch (e) { } } } else { return "null"; } return "object"; } return type; }; TreeViewUtils.getVisibleHtmlElementText = function (element) { if ($m(element).is(":visible")) { if (element.nodeType === 3) { return element.nodeValue; } var visibleText = "", i = 0; while (element.childNodes[i]) { visibleText += TreeViewUtils.getVisibleHtmlElementText(element.childNodes[i]); i++; } return visibleText; } return ""; }; TreeViewUtils.createPadding = function (levels, singleLevelPadding) { if (levels === 0) { return ""; } var padding = ""; for (var i = 0; i < levels; i++) { padding += singleLevelPadding; } return padding; }; TreeViewUtils.getIndentedObjectString = function (obj, detailedType, stringPadding, indentString, newLineString, useEncodeHtml, useTrim) { var text = ""; var objectString = "" + obj; if ((/\S/).test(objectString)) { var indentCount = 0; var finalLines = []; if (detailedType === "string") { if (useEncodeHtml) { objectString = Common.EncodingUtilities.escapeHtml(objectString); } text = objectString.replace(/(\r\n|\n\r|\r|\n)/g, newLineString); } else { var lines = objectString.replace(/^\s+|\s+$/g, "").split(/[\r\n]+/); for (var lineIndex = 0; lineIndex < lines.length; lineIndex++) { if (lines[lineIndex] !== "") { var indent = ""; var lineText = lines[lineIndex]; if (useEncodeHtml) { lineText = Common.EncodingUtilities.escapeHtml(lineText); } lineText = lineText.replace(/^\s+|\s+$/g, ""); if (detailedType === "function") { if ((/^\}/).test(lineText)) { indentCount--; } for (var i = 0; i < indentCount; i++) { indent += indentString; } if ((/\{$/).test(lineText)) { indentCount++; } } finalLines.push(indent + lineText); } } var lineBreaks = newLineString; if (detailedType === "function" && finalLines.length === 3) { finalLines[1] = finalLines[1].replace(/^( )+/, "").replace(/^\s+|\s+$/g, ""); finalLines[2] = finalLines[2].replace(/^\s+|\s+$/g, ""); lineBreaks = " "; } text = finalLines.join(lineBreaks); } } return text; }; TreeViewUtils.propertyNameCompare = function (a, b) { var aValue; var bValue; if (!isNaN(aValue = parseInt(a, 10)) && !isNaN(bValue = parseInt(b, 10))) { return aValue - bValue; } else { var al = a.toLowerCase(); var bl = b.toLowerCase(); if (al === bl) { return TreeViewUtils.stringValueCompare(a, b); } else { return TreeViewUtils.stringValueCompare(al, bl); } } }; TreeViewUtils.stringValueCompare = function (a, b) { if (a < b) { return -1; } else if (a > b) { return 1; } else { return 0; } }; TreeViewUtils.ConsoleNotifyType = { assert: "consoleItemError", error: "consoleItemError", info: "consoleItemInfo", log: "consoleItemLog", warn: "consoleItemWarn", internalMessage: "internalMessage" }; TreeViewUtils.ConsoleInternalMessage = { startGroup: "startGroup", startGroupCollapsed: "startGroupCollapsed", endGroup: "endGroup", displayTraceStyles: "displayTraceStyles" }; TreeViewUtils.ConsoleUITypeStrings = { functionName: "[function]", objectName: "[object]", arrayName: "[array]", emptyArray: " [ ]", emptyObject: " { }", expandableArray: " [...]", expandableObject: " {...}" }; TreeViewUtils.ConsoleFilterId = { all: -1, error: 0, warning: 1, message: 2, log: 3 }; return TreeViewUtils; })(); ObjectView.TreeViewUtils = TreeViewUtils; var TreeViewValueStringBuilder = (function () { function TreeViewValueStringBuilder() { } TreeViewValueStringBuilder.createValueString = function (properties, detailedType, incomplete) { if (typeof incomplete === "undefined") { incomplete = false; } if (!properties || typeof (properties) !== "object") { return; } var valueString; var isFirstProperty = true; var headToken = ""; var appendPropertyName; var tailToken = ""; switch (detailedType) { case "object": headToken = headToken + "{"; appendPropertyName = true; tailToken = "}" + tailToken; break; case "array": headToken = headToken + "["; appendPropertyName = false; tailToken = "]" + tailToken; properties = properties.filter(function (element, index, array) { return !isNaN(parseInt(element.propertyName, 10)); }); break; default: return; } valueString = headToken; for (var i = 0; i < properties.length; i++) { if (properties[i].propertyName.substr(0, 2) === "__" || properties[i].propertyName === "[functions]") { continue; } if (!isFirstProperty) { valueString += ", "; } isFirstProperty = false; if (appendPropertyName) { valueString += TreeViewValueStringBuilder.createPropertyNameToken(properties[i]); valueString += ": "; } valueString += TreeViewValueStringBuilder.createPropertyValueToken(properties[i]); if (i > 20) { incomplete = true; break; } } if (incomplete) { tailToken = " ..." + tailToken; } valueString = valueString + tailToken; return valueString; }; TreeViewValueStringBuilder.createPropertyValueString = function (propertyValue, obj) { try { switch (propertyValue.detailedType) { case "array": var delimiterIndex = propertyValue.value.indexOf(":"); if (delimiterIndex !== -1) { return "Array[" + Common.EncodingUtilities.escapeHtml(obj.length) + "]"; break; } case "object": var delimiterIndex = propertyValue.name.indexOf(" "); if (delimiterIndex !== -1) { return (propertyValue.name.substr(delimiterIndex + 1, propertyValue.name.length - delimiterIndex - 2)) + " {...}"; break; } } } catch (ex) { } return propertyValue.detailedType; }; TreeViewValueStringBuilder.formatPropertyValueString = function (valueString) { if (valueString && typeof (valueString) === "string") { var newValueString = valueString.length > 15 ? valueString.substr(0, 12) + "...\"" : valueString; newValueString = String.prototype.replace.call(newValueString, /(\r\n|\n\r|\r|\n)/g, " "); newValueString = Common.EncodingUtilities.escapeHtml(newValueString); return newValueString; } return valueString; }; TreeViewValueStringBuilder.createPropertyValueToken = function (property) { var className; switch (property.propertyValue.detailedType) { case "undefined": className = "valueStringToken-Undefined"; break; case "null": className = "valueStringToken-Null"; break; case "boolean": className = "valueStringToken-Boolean"; break; case "number": className = "valueStringToken-Number"; break; case "string": className = "valueStringToken-String"; break; case "function": className = "valueStringToken-Function"; break; case "array": className = "valueStringToken-Array"; break; case "object": className = "valueStringToken-Object"; break; default: className = "valueStringToken-Default"; } return "" + property.propertyValue.valueString + ""; }; TreeViewValueStringBuilder.createPropertyNameToken = function (property) { var className = "valueStringToken-PropertyName"; var escapedPropertyName = Common.EncodingUtilities.escapeHtml(property.propertyName); return "" + escapedPropertyName + ""; }; return TreeViewValueStringBuilder; })(); ObjectView.TreeViewValueStringBuilder = TreeViewValueStringBuilder; var TreeViewStringFormatter = (function () { function TreeViewStringFormatter() { } TreeViewStringFormatter.formatConsoleMessage = function () { var args = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { args[_i] = arguments[_i + 0]; } var regex = /%%|%([sbxXideEfF])/g; var argumentIndex = 0; var formatString = TreeViewStringFormatter.convertToString(args[argumentIndex++]); var getReplacementString = function (matchedValue) { if (argumentIndex >= args.length) { return matchedValue; } switch (matchedValue) { case "%%": return "%"; break; case "%d": case "%i": return TreeViewStringFormatter.convertToInteger(args[argumentIndex++]); break; case "%f": return TreeViewStringFormatter.convertToNumber(args[argumentIndex++]); break; case "%s": return TreeViewStringFormatter.convertToString(args[argumentIndex++]); break; case "%b": return TreeViewStringFormatter.convertToBase(args[argumentIndex++], 2); break; case "%x": case "%X": return TreeViewStringFormatter.convertToBase(args[argumentIndex++], 16); break; case "%E": case "%e": return TreeViewStringFormatter.convertToExponential(args[argumentIndex++]); break; default: return matchedValue; } }; var result = formatString.replace(regex, getReplacementString); for (var i = argumentIndex; i < args.length; i++) { result = (result.length > 0) ? (result + " " + TreeViewStringFormatter.convertToString(args[i])) : (TreeViewStringFormatter.convertToString(args[i])); } return result.slice(0, 1024); }; TreeViewStringFormatter.convertToString = function (value) { var result; try { if (value === undefined || value === null) { result = String(value); } else { result = value.toString(); if (typeof (result) !== "string") { result = "[object Object]"; } } } catch (e) { result = "[object Object]"; } return result; }; TreeViewStringFormatter.convertToInteger = function (value) { var numericValue = TreeViewStringFormatter.convertToNumber(value); if (isNaN(numericValue)) { return numericValue.toString(); } return Math.round(numericValue - numericValue % 1).toString(); }; TreeViewStringFormatter.convertToBase = function (value, base) { var numericValue = TreeViewStringFormatter.convertToNumber(value); if (isNaN(numericValue)) { return numericValue.toString(); } var prefix = { "2": "0b", "8": "0", "16": "0x" }[base] || ""; return prefix.toString() + ((numericValue < 0) ? (numericValue >>> 0).toString(base) : numericValue.toString(base)); }; TreeViewStringFormatter.convertToExponential = function (value) { var numericValue = TreeViewStringFormatter.convertToNumber(value); if (isNaN(numericValue)) { return numericValue.toString(); } return numericValue.toExponential(); }; TreeViewStringFormatter.convertToNumber = function (value) { return (isNaN(value) || value === null) ? Number(TreeViewStringFormatter.convertToString(value)) : Number(value); }; return TreeViewStringFormatter; })(); ObjectView.TreeViewStringFormatter = TreeViewStringFormatter; })(Common.ObjectView || (Common.ObjectView = {})); var ObjectView = Common.ObjectView; })(Common || (Common = {})); // treeViewItems.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (ObjectView) { "use strict"; (function (TreeViewNotifyType) { TreeViewNotifyType[TreeViewNotifyType["None"] = 0] = "None"; TreeViewNotifyType[TreeViewNotifyType["Assert"] = 1] = "Assert"; TreeViewNotifyType[TreeViewNotifyType["Error"] = 2] = "Error"; TreeViewNotifyType[TreeViewNotifyType["Info"] = 3] = "Info"; TreeViewNotifyType[TreeViewNotifyType["Log"] = 4] = "Log"; TreeViewNotifyType[TreeViewNotifyType["Warn"] = 5] = "Warn"; })(ObjectView.TreeViewNotifyType || (ObjectView.TreeViewNotifyType = {})); var TreeViewNotifyType = ObjectView.TreeViewNotifyType; (function (ViewableTypeFlags) { ViewableTypeFlags[ViewableTypeFlags["Object"] = 1] = "Object"; ViewableTypeFlags[ViewableTypeFlags["Html"] = 2] = "Html"; })(ObjectView.ViewableTypeFlags || (ObjectView.ViewableTypeFlags = {})); var ViewableTypeFlags = ObjectView.ViewableTypeFlags; var TreeViewItem = (function () { function TreeViewItem(value, hasChildren, hasIcon, hasSeparator, name, additionalClass, htmlLines, fullHtmlLines, notifyType) { if (typeof notifyType === "undefined") { notifyType = 0 /* None */; } this._id = TreeViewItem.IdCounter++; this._name = name; this._value = value; this._hasChildren = hasChildren; this._hasIcon = hasIcon; this._hasSeparator = hasSeparator; this._additionalClass = additionalClass; this._htmlLines = htmlLines; this._fullHtmlLines = fullHtmlLines; this._buttonItems = null; this._notifyType = notifyType; } Object.defineProperty(TreeViewItem.prototype, "id", { get: function () { return "" + this._id; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "engine", { get: function () { return this._engine; }, set: function (value) { this._engine = value; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "isStale", { get: function () { return this._isStale; }, set: function (value) { if (this._isStale) { return; } this._isStale = value; if (this._isStale) { var additionalClass; switch (this._notifyType) { case 2 /* Error */: additionalClass = " consoleItemErrorStale"; break; case 3 /* Info */: additionalClass = " consoleItemInfoStale"; break; case 5 /* Warn */: additionalClass = " consoleItemWarnStale"; break; } this._additionalClass += additionalClass; } }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "name", { get: function () { return this._name; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "notifyType", { get: function () { return this._notifyType; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "value", { get: function () { return this._value; }, set: function (val) { this._value = val; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "hasChildren", { get: function () { return this._hasChildren; }, set: function (value) { this._hasChildren = value; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "hasIcon", { get: function () { return this._hasIcon; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "buttonItems", { get: function () { return this._buttonItems; }, set: function (value) { this._buttonItems = value; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "hasSeparator", { get: function () { return this._hasSeparator; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "additionalClass", { get: function () { return this._additionalClass; }, set: function (value) { this._additionalClass = value; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "htmlLines", { get: function () { return this._htmlLines; }, set: function (lines) { if (this._htmlLines) { if (this._htmlLines.length !== lines.length) { throw new Error("The number of lines cannot be changed for a TreeView item after initialization"); } } this._htmlLines = lines; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewItem.prototype, "consoleItemId", { get: function () { return this._id; }, enumerable: true, configurable: true }); TreeViewItem.encodeValueForListItem = function (value, detailedType, isExpandable, limitToSingleLine, appendEllipses) { if (typeof appendEllipses === "undefined") { appendEllipses = true; } var text = ""; var htmlLines = null; if (!detailedType) { detailedType = Common.ObjectView.TreeViewUtils.getDetailedTypeOf(value); } switch (detailedType) { case "array": text = (value || Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.arrayName); if (appendEllipses) { text += (isExpandable ? Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.expandableArray : Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.emptyArray); } break; case "object": text = (value || Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.objectName); if (appendEllipses) { text += (isExpandable ? Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.expandableObject : Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.emptyObject); } break; case "null": text = "null"; break; case "undefined": text = "undefined"; break; default: text = "" + value; htmlLines = TreeViewItem.getHtmlTextLines(text, detailedType); if (detailedType !== "string" && htmlLines.length === 1) { text = Common.EncodingUtilities.unescapeHtml(htmlLines[0]); htmlLines = null; } else if (limitToSingleLine && htmlLines.length > 1) { text = TreeViewItem.getFirstLine(value); htmlLines.splice(0, 0, "" + htmlLines[0].replace("
      ", "").replace("
      ", "") + " ...
      "); text += " ..."; } break; } return { value: text, htmlLines: htmlLines }; }; TreeViewItem.getHtmlTextLines = function (objectString, detailedType) { var finalLines = null; if (typeof objectString === "string") { objectString = objectString.replace(/(\r\n|\n\r|\r|\n)/g, "\r\n"); var lines = objectString.split("\r\n"); if (lines.length > 0) { var indentCount = 0; finalLines = []; for (var lineIndex = 0; lineIndex < lines.length; lineIndex++) { if (detailedType === "string" || lines[lineIndex] !== "") { var indent = ""; var lineText = lines[lineIndex]; lineText = Common.EncodingUtilities.escapeHtml(lineText); if (detailedType === "string") { lineText = "
      " + lineText + "
      "; } else { lineText = lineText.replace(/^\s+|\s+$/g, ""); } if (detailedType === "function") { if ((/^\}/).test(lineText)) { indentCount--; } for (var i = 0; i < indentCount; i++) { indent += "   "; } if ((/\{$/).test(lineText)) { indentCount++; } } finalLines.push(indent + lineText); } } if (detailedType === "function" && finalLines.length === 3) { finalLines[1] = finalLines[1].replace(/^( )+/, ""); finalLines[2] = finalLines[2]; finalLines = [finalLines.join(" ")]; } } } return finalLines; }; TreeViewItem.getHtmlTreeLines = function (elementObject, nodeIndex) { var id = elementObject.uid; var tag = elementObject.tag; var safeTag = Common.EncodingUtilities.escapeHtml(tag); var text = elementObject.text; var isExpandable = elementObject.hasChildren; var attributes = elementObject.attributes; var rootTagToShow = elementObject.rootTagToShow; var header, headerText = "", rowHeader = ""; var footer, footerText = "", rowFooter = ""; if (tag === "#document") { var rootHeader = ""; var rootFooter = ""; if (rootTagToShow) { var safeRootTag = Common.EncodingUtilities.escapeHtml(rootTagToShow); rootHeader = "<" + safeRootTag + ">"; rootFooter = "</" + safeRootTag + ">"; headerText = "<" + safeRootTag + ">"; footerText = ""; } header = "" + rootHeader + ""; footer = "" + rootFooter + ""; } else if (tag === "#doctype") { header = ""; footer = ""; } else if (tag === "#comment") { header = "<!--"; footer = "-->"; headerText = ""; rowHeader = ""; rowFooter = ""; } else if (tag === null || tag === undefined) { header = ""; footer = ""; } else { var attributesHtml = ""; var attributesText = ""; if (attributes && attributes.length > 0) { for (var j = 0; j < attributes.length; j++) { attributesHtml += " " + Common.EncodingUtilities.escapeHtml(attributes[j].name) + "=\"" + "" + Common.EncodingUtilities.escapeHtml(attributes[j].value) + "\""; attributesText += " " + Common.EncodingUtilities.escapeHtml(attributes[j].name) + "=\"" + Common.EncodingUtilities.escapeHtml(attributes[j].value) + "\""; } } header = "<" + safeTag + "" + attributesHtml + ">"; headerText = "<" + safeTag + attributesText + ">"; footer = "</" + safeTag + ">"; footerText = ""; } var elipsis = (isExpandable ? "..." : ""); var collapsedFooter = (isExpandable ? "" + elipsis + footer + "" : footer); var nodeNumber = ""; if (nodeIndex !== null && !isNaN(nodeIndex)) { nodeNumber = "" + nodeIndex + ""; } var containerStart = ""; var containerEnd = ""; var lines = []; if (!text) { lines.push(containerStart + nodeNumber + header + collapsedFooter + containerEnd); } else { var textLines = TreeViewItem.getHtmlTextLines(text, "string"); if (textLines.length <= 1) { headerText += text; var inlineText = "" + textLines[0] + ""; lines.push(containerStart + nodeNumber + header + inlineText + collapsedFooter + containerEnd); } else { headerText += text; footerText = ""; lines.push(containerStart + header + "" + textLines[0] + "" + rowFooter + containerEnd); for (var i = 1; i < textLines.length - 1; i++) { lines.push(containerStart + rowHeader + "" + textLines[i] + "" + rowFooter + containerEnd); } lines.push(containerStart + rowHeader + "" + textLines[textLines.length - 1] + "" + collapsedFooter + containerEnd); } } if (isExpandable) { lines.push(containerStart + "" + footer + "" + containerEnd); } return { headerText: headerText, footerText: footerText, htmlLines: lines }; }; TreeViewItem.getFirstLine = function (value) { var firstLine = value; if (firstLine) { var fullText = firstLine.replace(/(\r\n|\n\r|\r|\n)/g, "\r\n"); var lines = fullText.split("\r\n"); if (lines.length > 0) { for (var lineIndex = 0; lineIndex < lines.length; lineIndex++) { var lineText = lines[lineIndex].replace(/^\s+|\s+$/g, ""); if (lineText.length > 0) { firstLine = lineText; break; } } } } return firstLine; }; TreeViewItem.prototype.getCopyText = function (indent) { if (typeof indent === "undefined") { indent = ""; } return indent + this._value; }; TreeViewItem.prototype.getWatchExpression = function () { return; }; TreeViewItem.prototype.expandLines = function () { if (this._fullHtmlLines && this._fullHtmlLines.length > 0) { this._htmlLines = this._fullHtmlLines.slice(1); this._value = Common.EncodingUtilities.unescapeHtml(this._htmlLines[0]); for (var i = 1; i < this._htmlLines.length; i++) { this._value += "\r\n"; this._value += Common.EncodingUtilities.unescapeHtml(this._htmlLines[i]); } return true; } return false; }; TreeViewItem.prototype.setButtonCheckState = function (buttonIndex, value) { if (this._buttonItems && this._buttonItems.length > buttonIndex) { this._buttonItems[buttonIndex].isChecked = value; } }; TreeViewItem.IdCounter = -1; TreeViewItem.TextCopyIndent = " "; return TreeViewItem; })(); ObjectView.TreeViewItem = TreeViewItem; var TreeViewInputItem = (function (_super) { __extends(TreeViewInputItem, _super); function TreeViewInputItem(command, onCompleteCallback) { var listValue = TreeViewItem.encodeValueForListItem(command, "string"); _super.call(this, listValue.value, false, true, true, null, "consoleItemInput", listValue.htmlLines); this._inputCommand = command; this._onCompleteCallback = onCompleteCallback; this._outputItem = null; } TreeViewInputItem.prototype.getCopyText = function (indent) { if (typeof indent === "undefined") { indent = ""; } return indent + this._inputCommand; }; TreeViewInputItem.prototype.getWatchExpression = function () { return this._inputCommand; }; TreeViewInputItem.prototype.executeCallback = function (outputItem) { if (this._onCompleteCallback) { this._onCompleteCallback(this.consoleItemId, outputItem.consoleItemId, (outputItem.additionalClass || ""), (outputItem.value || "")); } }; return TreeViewInputItem; })(TreeViewItem); ObjectView.TreeViewInputItem = TreeViewInputItem; var TreeViewOutputItem = (function (_super) { __extends(TreeViewOutputItem, _super); function TreeViewOutputItem(inputId, value, hasChildren, hasIcon, hasSeparator, name, additionalClass, htmlLines, fullHtmlLines, notifyType, watchExpession) { if (typeof notifyType === "undefined") { notifyType = 0 /* None */; } if (!inputId || parseInt(inputId, 10) === -1) { additionalClass = (additionalClass || "") + " consoleItemOutput-Async"; } this._watchExpression = watchExpession; _super.call(this, value, hasChildren, hasIcon, hasSeparator, name, additionalClass, htmlLines, fullHtmlLines, notifyType); this._matchingInputId = (typeof inputId !== "undefined" && typeof inputId !== "null" ? inputId : "-1"); } Object.defineProperty(TreeViewOutputItem.prototype, "matchingInputId", { get: function () { return this._matchingInputId; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewOutputItem.prototype, "viewableTypeFlags", { get: function () { return 0; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewOutputItem.prototype, "typeEvaluationId", { get: function () { return null; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewOutputItem.prototype, "children", { get: function () { return this._children; }, set: function (value) { this._children = value; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewOutputItem.prototype, "isExpandable", { get: function () { return (this.children && this.children.length > 0); }, enumerable: true, configurable: true }); TreeViewOutputItem.prototype.getWatchExpression = function () { return this._watchExpression; }; TreeViewOutputItem.prototype.evaluateAsType = function (call, viewType, onOutput) { if ((this.viewableTypeFlags & viewType) === viewType) { switch (viewType) { case 2 /* Html */: call("getObjectItemAsHtml", [this.typeEvaluationId], onOutput); break; case 1 /* Object */: call("getHtmlItemAsObject", [this.typeEvaluationId], onOutput); break; default: return false; } return true; } return false; }; return TreeViewOutputItem; })(TreeViewItem); ObjectView.TreeViewOutputItem = TreeViewOutputItem; var TreeViewObjectItem = (function (_super) { __extends(TreeViewObjectItem, _super); function TreeViewObjectItem(outputObject, engine, nameOverride, watchExpression, notifyType) { this.engine = engine; var className = "consoleItemOutput"; var useValueString = false; switch (outputObject.detailedType) { case "exception": className += " consoleItemOutput-Exception"; break; case "undefined": className += " consoleItemOutput-Undefined"; break; case "null": className += " consoleItemOutput-Null"; break; case "boolean": className += " consoleItemOutput-Boolean"; break; case "number": className += " consoleItemOutput-Number"; break; case "string": className += " consoleItemOutput-String"; break; case "function": className += " consoleItemOutput-Function"; break; case "array": className += " consoleItemOutput-Array"; useValueString = true; break; case "object": className += " consoleItemOutput-Object"; useValueString = true; break; case "internal": className += " consoleItemOutput-Internal"; break; } var isChild = (!!nameOverride); useValueString = useValueString && !isChild; var hasIcon = (!isChild); var limitToSingleLine = (isChild || (outputObject.detailedType === "function" && outputObject.isExpandable)); var listValue = TreeViewItem.encodeValueForListItem(outputObject.value, outputObject.detailedType, outputObject.isExpandable, limitToSingleLine); var fullHtmlLines = null; if (limitToSingleLine && listValue.htmlLines && listValue.htmlLines.length > 1) { fullHtmlLines = listValue.htmlLines.slice(0); listValue.htmlLines = [listValue.htmlLines.shift()]; } var name = TreeViewItem.getFirstLine(nameOverride || outputObject.name); if (outputObject.isExpandable) { var displayValue; if (useValueString) { var valueString = outputObject.valueString; displayValue = valueString || outputObject.name; } else { displayValue = outputObject.name; } var listValue = TreeViewItem.encodeValueForListItem(displayValue, outputObject.detailedType, true, true, !useValueString); if ((!listValue.htmlLines) && useValueString) { listValue.htmlLines = [listValue.value]; } if (limitToSingleLine && listValue.htmlLines && listValue.htmlLines.length > 1) { fullHtmlLines = listValue.htmlLines.slice(0); listValue.htmlLines = [listValue.htmlLines.shift()]; } switch (outputObject.detailedType) { case "function": if (!isChild) { name = null; } else { name = (name || Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.functionName); } break; case "array": name = (name || Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.arrayName); break; default: name = (name || Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.objectName); break; } } _super.call(this, outputObject.inputId, listValue.value, outputObject.isExpandable, hasIcon, !isChild, name, className, listValue.htmlLines, fullHtmlLines, notifyType, watchExpression); this._originalObject = outputObject; if (Array.isArray(outputObject.value)) { this.children = this.createChildren(); this._hasLoadedChildren = true; } else { this._remoteExpansionId = outputObject.value; this._hasLoadedChildren = false; } } Object.defineProperty(TreeViewObjectItem.prototype, "viewableTypeFlags", { get: function () { return (this._originalObject.isHtmlViewableType ? 2 /* Html */ : 0); }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewObjectItem.prototype, "typeEvaluationId", { get: function () { return (this._remoteExpansionId || this._originalObject.uid); }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewObjectItem.prototype, "isExpandable", { get: function () { return this._originalObject.isExpandable; }, enumerable: true, configurable: true }); TreeViewObjectItem.prototype.getWatchExpression = function () { if (this.name === "[functions]" || !this.name || this.name.indexOf("...") >= 0) { return; } return _super.prototype.getWatchExpression.call(this); }; TreeViewObjectItem.prototype.getChildren = function (call, onComplete) { if (this.isExpandable) { Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectBegin); var onExpansionComplete = this.createOnExpansionCompleteWrapper(onComplete); if (this._hasLoadedChildren) { onExpansionComplete(); } else { this.loadChildren(call, onExpansionComplete); } } }; TreeViewObjectItem.prototype.getCopyText = function (indent) { if (typeof indent === "undefined") { indent = ""; } var text = indent; switch (this._originalObject.detailedType) { case "array": case "object": var openSymbol = "{"; var closeSymbol = "}"; if (this._originalObject.detailedType === "array") { openSymbol = "["; closeSymbol = "]"; } if (!this.children || this.children.length === 0) { text += openSymbol + " " + closeSymbol; } else { text += openSymbol + "\r\n"; var nextIndent = indent + TreeViewItem.TextCopyIndent; for (var i = 0; i < this.children.length; i++) { var child = this.children[i]; if (i !== 0) { text += ",\r\n"; } text += nextIndent + child.name + ": " + child.getCopyText(nextIndent).trim(); } text += "\r\n" + indent + closeSymbol; } break; case "string": if (this._originalObject && this._originalObject.value) { text += this._originalObject.value; } else { text += this.value; } break; case "function": text += this.value.replace(/( )/g, " "); break; default: text += this.value; break; } return text; }; TreeViewObjectItem.prototype.buildWatchExpressionForChild = function (childConsoleItemName, parentWatchExpression) { var watchExpression; if (!parentWatchExpression) { } else if (childConsoleItemName === "[functions]" || childConsoleItemName.indexOf("...") >= 0) { watchExpression = parentWatchExpression; } else if (!isNaN(parseInt(childConsoleItemName))) { watchExpression = parentWatchExpression + "[" + childConsoleItemName + "]"; } else { watchExpression = parentWatchExpression + "." + childConsoleItemName; } return watchExpression; }; TreeViewObjectItem.prototype.createChildren = function () { var obj = this._originalObject; if (!this._sortedPropertyNames) { this._sortedPropertyNames = Common.ToolWindowHelpers.getSortedArrayProperties(obj.value, "propertyName"); } var functions; var children = []; for (var i = 0; i < this._sortedPropertyNames.length; i++) { var propIndex = this._sortedPropertyNames[i]; var propName = obj.value[propIndex].propertyName; var childObject = obj.value[propIndex].propertyValue; var childWatchExpression = this.buildWatchExpressionForChild(propName, this.getWatchExpression()); if (propName === "[functions]" && childObject.isInternalProperty && typeof childObject.isInternalProperty === "boolean") { functions = new TreeViewObjectItem(childObject, this.engine, propName, childWatchExpression, this.notifyType); } else { var child = new TreeViewObjectItem(childObject, this.engine, propName, childWatchExpression, this.notifyType); children.push(child); } } if (functions) { children.unshift(functions); } return children; }; TreeViewObjectItem.prototype.loadChildren = function (call, onExpansionComplete) { var _this = this; call("getObjectChildren", [this._remoteExpansionId], function (expandedObj) { if (!expandedObj) { _this._originalObject.value = [{ propertyName: "undefined", propertyValue: { detailedType: "undefined" } }]; } else if (!expandedObj.isExpandable) { _this._originalObject.value = [{ propertyName: "undefined", propertyValue: { detailedType: "undefined" } }]; } else { _this._originalObject.value = expandedObj.value; } _this.children = _this.createChildren(); _this._hasLoadedChildren = true; onExpansionComplete(); }); }; TreeViewObjectItem.prototype.createOnExpansionCompleteWrapper = function (onComplete) { var _this = this; return function () { onComplete(_this.children); Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectEnd); }; }; return TreeViewObjectItem; })(TreeViewOutputItem); ObjectView.TreeViewObjectItem = TreeViewObjectItem; var TreeViewHtmlItem = (function (_super) { __extends(TreeViewHtmlItem, _super); function TreeViewHtmlItem(outputObject, engine, htmlValue, nodeIndex, notifyType, showNotifyIcon, watchExpression) { if (typeof notifyType === "undefined") { notifyType = 0 /* None */; } if (typeof showNotifyIcon === "undefined") { showNotifyIcon = false; } var inputId; var remoteId; var isExpandable; var value; var hasSeparator; this.engine = engine; if (htmlValue && htmlValue.localizeId) { try { htmlValue.text = Common.ToolWindowHelpers.loadString(htmlValue.localizeId); } catch (e) { } } if (outputObject) { inputId = outputObject.inputId; remoteId = outputObject.value.uid; isExpandable = outputObject.value.hasChildren; value = outputObject.value; hasSeparator = true; } else { inputId = "-1"; remoteId = htmlValue.uid; isExpandable = htmlValue.hasChildren; value = htmlValue; hasSeparator = false; } var listValue = TreeViewItem.getHtmlTreeLines(value, nodeIndex); if (isExpandable) { this._footerLine = listValue.htmlLines.pop(); } this._headerText = listValue.headerText; this._footerText = listValue.footerText; var additionalClass = "consoleItemOutput"; if (showNotifyIcon && notifyType !== 0 /* None */) { var notifyTypeString = TreeViewNotifyItem.getNotifyTypeString(notifyType); additionalClass += " " + notifyTypeString; } _super.call(this, inputId, listValue.headerText + listValue.footerText, isExpandable, hasSeparator, hasSeparator, null, additionalClass, listValue.htmlLines, null, notifyType, watchExpression); this._originalObject = (outputObject || htmlValue); this._remoteExpansionId = remoteId; this._isExpandable = isExpandable; } Object.defineProperty(TreeViewHtmlItem.prototype, "viewableTypeFlags", { get: function () { return 1 /* Object */; }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewHtmlItem.prototype, "typeEvaluationId", { get: function () { return (this._originalObject.value ? this._originalObject.value.uid : this._originalObject.uid); }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewHtmlItem.prototype, "isExpandable", { get: function () { return this._isExpandable; }, enumerable: true, configurable: true }); TreeViewHtmlItem.prototype.getChildren = function (call, onComplete) { if (this.isExpandable) { Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectBegin); var onExpansionComplete = this.createOnExpansionCompleteWrapper(onComplete); if (this._hasLoadedChildren) { onExpansionComplete(); } else { this.loadChildren(call, onExpansionComplete); } } }; TreeViewHtmlItem.prototype.getCopyText = function (indent) { if (typeof indent === "undefined") { indent = ""; } var text = indent; text += this._headerText; if (!this.children || this.children.length === 0) { text += this._footerText; } else { var nextIndent = indent + TreeViewItem.TextCopyIndent; for (var i = 0; i < this.children.length; i++) { var child = this.children[i]; text += "\r\n" + nextIndent + child.getCopyText(nextIndent); } text += "\r\n" + indent + this._footerText; } return text; }; TreeViewHtmlItem.prototype.createChildren = function (childValues) { var htmlItem = (this._originalObject.value ? this._originalObject.value : this._originalObject); var useNodeNumbers = (htmlItem.tag === "NodeList" || htmlItem.tag === "HtmlCollection"); var children = []; for (var i = 0; i < childValues.length; i++) { var htmlValue = childValues[i]; if (!htmlValue.tag && (!htmlValue.text || !(/\S/).test(htmlValue.text))) { continue; } var child = new TreeViewHtmlItem(null, this.engine, htmlValue, (useNodeNumbers ? i : undefined), this.notifyType); children.push(child); } var footer = new TreeViewItem(this._footerText, false, false, false, null, "consoleItemOutput", [this._footerLine], null, this.notifyType); children.push(footer); return children; }; TreeViewHtmlItem.prototype.loadChildren = function (call, onExpansionComplete) { var _this = this; call("getHtmlChildren", [this._remoteExpansionId], function (childValues) { if (!childValues) { childValues = []; } _this.children = _this.createChildren(childValues); _this._hasLoadedChildren = true; onExpansionComplete(); }); }; TreeViewHtmlItem.prototype.createOnExpansionCompleteWrapper = function (onComplete) { var _this = this; return function () { onComplete(_this.children); Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectEnd); }; }; return TreeViewHtmlItem; })(TreeViewOutputItem); ObjectView.TreeViewHtmlItem = TreeViewHtmlItem; var TreeViewTraceStylesItem = (function (_super) { __extends(TreeViewTraceStylesItem, _super); function TreeViewTraceStylesItem(outputObject) { this._originalObject = outputObject; var styleRows = {}; var styleGroups = { inherited: {}, declared: {} }; var allStyles = outputObject.value; var allStylesLength = allStyles.length; for (var index = 0; index < allStylesLength; index++) { var currentStyle = allStyles[index]; var currentStrikeKey = currentStyle.strikeKey = TreeViewTraceStylesItem.getStrikeKey(currentStyle); if (!styleRows[currentStrikeKey]) { styleRows[currentStrikeKey] = []; styleRows[currentStrikeKey].activeUid = null; } styleRows[currentStrikeKey].push({ index: index, uid: currentStyle.uid, style: currentStyle }); } for (var property in styleRows) { styleRows[property] = styleRows[property].sort(function (a, b) { return a.index > b.index; }); var styleRowsLength = styleRows[property].length; for (var index = 0; index < styleRowsLength; index++) { var group = styleRows[property]; if (group[index].style.enabled) { group.activeUid = group[0].uid; break; } } } var styleKeys = []; for (var styleNames in styleRows) { styleKeys.push({ key: styleNames }); } var sortedStyleKeys = Common.ToolWindowHelpers.getSortedArrayProperties(styleKeys, "key"); var children = []; var sortedStyleKeysLength = sortedStyleKeys.length; for (var keyIndex = 0; keyIndex < sortedStyleKeysLength; keyIndex++) { var styleName = styleKeys[sortedStyleKeys[keyIndex]].key; var styleRules = styleRows[styleName]; var activeUid = styleRules.activeUid; var rules = []; var activeStyleHtml; var activeStyleValue; var styleRulesLength = styleRules.length; for (var index = 0; index < styleRulesLength; index++) { var cssRuleApplied = styleRules[index]; if (cssRuleApplied && cssRuleApplied.style) { var style = cssRuleApplied.style; var rule = new TreeViewStyleItem(style, activeUid === style.uid); if (activeUid === style.uid) { activeStyleHtml = rule.getHtmlContent(); activeStyleValue = style.value; } rules.push(rule); } } var propGroup = new TreeViewCssStyleGroup(styleName, activeStyleHtml, activeStyleValue, false); var rulesLength = rules.length; for (var i = 0; i < rulesLength; i++) { propGroup.addChild(rules[i]); } children.push(propGroup); } this.children = children; var groupName = Common.ToolWindowHelpers.loadString("CSSTraceStyles"); _super.call(this, outputObject.inputId, groupName, outputObject.isExpandable, false); } Object.defineProperty(TreeViewTraceStylesItem.prototype, "isExpandable", { get: function () { return this._originalObject.isExpandable; }, enumerable: true, configurable: true }); TreeViewTraceStylesItem.isColorProperty = function (propertyName) { if (!propertyName || propertyName.indexOf("color") === -1) { return false; } switch (propertyName.toLowerCase()) { case "background-color": case "border-bottom-color": case "border-left-color": case "border-right-color": case "border-top-color": case "color": case "column-rule-color": case "layout-border-bottom-color": case "layout-border-left-color": case "layout-border-right-color": case "layout-border-top-color": case "outline-color": case "stop-color": case "flood-color": case "lighting-color": case "scrollbar-3dlight-color": case "scrollbar-arrow-color": case "scrollbar-base-color": case "scrollbar-darkshadow-color": case "scrollbar-face-color": case "scrollbar-highlight-color": case "scrollbar-shadow-color": case "scrollbar-track-color": return true; } return false; }; TreeViewTraceStylesItem.prototype.getChildren = function (call, onComplete) { onComplete(this.children); }; TreeViewTraceStylesItem.prototype.getCopyText = function (indent) { if (typeof indent === "undefined") { indent = ""; } var text = indent; var nextIndent = indent + TreeViewItem.TextCopyIndent; for (var i = 0; i < this.children.length; i++) { var child = this.children[i]; text += "\r\n" + child.getCopyText(nextIndent); } text += "\r\n"; return text; }; TreeViewTraceStylesItem.getStrikeKey = function (style) { if (style.selector && style.selector.indexOf("::") >= 0) { var pseudoElement = style.selector.match(/::[\w\-]+/); if (pseudoElement && pseudoElement.length === 1) { return pseudoElement[0] + " " + style.property; } } return style.property; }; return TreeViewTraceStylesItem; })(TreeViewOutputItem); ObjectView.TreeViewTraceStylesItem = TreeViewTraceStylesItem; var TreeViewNotifyItem = (function (_super) { __extends(TreeViewNotifyItem, _super); function TreeViewNotifyItem(notifyObject) { this.engine = notifyObject.engine; var type = notifyObject.notifyType; var messageObj; if (typeof notifyObject.message === "object") { messageObj = notifyObject.message; } else { var messageString = "undefined"; if (notifyObject.message && notifyObject.message.toString) { messageString = notifyObject.message.toString(); } messageObj = { message: messageString }; } if (notifyObject.notifyType === "consoleItemCDContext") { type = TreeViewNotifyItem.getNotifyTypeString(3 /* Info */); try { messageObj.message = Common.ToolWindowHelpers.loadString("CDContextChanged", [notifyObject.message]); } catch (ex) { } } if (notifyObject.message && notifyObject.message.localizeId) { try { if (notifyObject.message.localizeId === "ConsoleTimerDisplay") { notifyObject.message.args[1] = Number(notifyObject.message.args[1]).toLocaleString(); } messageObj.message = Common.ToolWindowHelpers.loadString(notifyObject.message.localizeId, notifyObject.message.args || undefined); } catch (e) { } } var listValue = TreeViewItem.encodeValueForListItem(messageObj.message, "string"); var fileInfo = ""; if (typeof notifyObject.message === "object" && (messageObj.messageId || messageObj.fileUrl || messageObj.lineNumber || messageObj.columnNumber)) { listValue.htmlLines = []; if (messageObj.messageId) { var messageId = messageObj.messageId; var startText = messageObj.message.substring(0, messageId.length); if (startText === messageId) { var helpLink = "" + messageId + ""; listValue.htmlLines.push(helpLink + Common.EncodingUtilities.escapeHtml(messageObj.message.substring(messageId.length))); } } if (messageObj.fileUrl) { var url = Common.EncodingUtilities.wrapInQuotes(Common.EncodingUtilities.escapeHtml(messageObj.fileUrl)); var line = ""; var col = ""; var useLineAndColumn = false; if (messageObj.lineNumber !== null && !isNaN(messageObj.lineNumber)) { if (messageObj.columnNumber === null || isNaN(messageObj.columnNumber)) { messageObj.columnNumber = 1; } line = " data-linkLine='" + messageObj.lineNumber + "'"; col = " data-linkCol='" + messageObj.columnNumber + "'"; useLineAndColumn = true; } var shortUrl = Common.ToolWindowHelpers.createShortenedUrlText(messageObj.fileUrl); var tooltip = Common.EncodingUtilities.wrapInQuotes(Common.EncodingUtilities.escapeHtml(messageObj.fileUrl)); var fileLabel; if (useLineAndColumn) { fileLabel = Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("EventFullScriptPositionText", [shortUrl, messageObj.lineNumber, messageObj.columnNumber])); } else { fileLabel = Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("ScriptErrorFile", [shortUrl])); } listValue.htmlLines.push("" + fileLabel + ""); fileInfo = fileLabel; } else { var useLine = false; var useColumn = false; if (messageObj.lineNumber !== null && !isNaN(messageObj.lineNumber)) { useLine = true; if (messageObj.columnNumber !== null && !isNaN(messageObj.columnNumber)) { useColumn = true; } } var lineLabel = null; if (useLine && useColumn) { lineLabel = Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("EventScriptPositionText", [messageObj.lineNumber, messageObj.columnNumber])); } else if (useLine) { lineLabel = Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("ScriptErrorLine", [messageObj.lineNumber])); } if (lineLabel) { listValue.htmlLines[0] += " " + lineLabel; fileInfo = lineLabel; } } } this._originalObject = notifyObject; var notifyType = TreeViewNotifyItem.parseNotifyTypeString(notifyObject.notifyType); this._message = listValue.value; this._fileInfo = fileInfo; var name = null; if (notifyObject.message.viewableObject && notifyObject.message.viewableObject.length) { this.children = []; if (notifyObject.message.viewableObject.length === 1) { var objectItem = this.createTreeViewItem(notifyObject.message.viewableObject[0], notifyType); if (objectItem instanceof TreeViewHtmlItem) { this.children.push(objectItem); } else { this._originalTreeViewObjectItem = objectItem; name = objectItem.name; type += " " + type + "Expandable"; switch (notifyObject.message.viewableObject[0].detailedType) { case "regex": case "date": listValue.htmlLines = [Common.EncodingUtilities.escapeHtml(objectItem.value)]; break; default: listValue.htmlLines = [objectItem.value]; break; } this.children = objectItem.children; } } else { for (var i = 0; i < notifyObject.message.viewableObject.length; i++) { this.children.push(this.createTreeViewItem(notifyObject.message.viewableObject[i], notifyType)); } } } _super.call(this, notifyObject.inputId, listValue.value, this.isExpandable, true, true, name, type, listValue.htmlLines, null, notifyType); } TreeViewNotifyItem.getNotifyTypeString = function (notifyType) { switch (notifyType) { case 1 /* Assert */: return "consoleItemError"; case 2 /* Error */: return "consoleItemError"; case 3 /* Info */: return "consoleItemInfo"; case 4 /* Log */: return "consoleItemLog"; case 5 /* Warn */: return "consoleItemWarn"; default: return null; } }; TreeViewNotifyItem.parseNotifyTypeString = function (notifyType) { switch (notifyType) { case "consoleItemError": return 2 /* Error */; case "consoleItemInfo": return 3 /* Info */; case "consoleItemCDContext": return 3 /* Info */; case "consoleItemLog": return 4 /* Log */; case "consoleItemWarn": return 5 /* Warn */; default: return 0 /* None */; } }; TreeViewNotifyItem.prototype.getCopyText = function (indent) { if (typeof indent === "undefined") { indent = ""; } var text = indent; text += this._message; if (this._fileInfo) { text += "\r\n" + indent + this._fileInfo; } var nextIndent = indent + TreeViewItem.TextCopyIndent; if (this._originalTreeViewObjectItem) { text += "\r\n" + this._originalTreeViewObjectItem.getCopyText(nextIndent) + "\r\n"; } else if (this.children && this.children.length > 0) { for (var i = 0; i < this.children.length; i++) { text += "\r\n" + this.children[i].getCopyText(nextIndent); } text += "\r\n"; } return text; }; TreeViewNotifyItem.prototype.getChildren = function (call, onComplete) { onComplete(this.children); }; TreeViewNotifyItem.prototype.createTreeViewItem = function (outputObject, notifyType) { var treeViewItem; if (outputObject.detailedType !== "htmlElement") { var matchingInputItem; treeViewItem = new Common.ObjectView.TreeViewObjectItem(outputObject, this.engine, null, null, notifyType); } else { treeViewItem = new Common.ObjectView.TreeViewHtmlItem(outputObject, this.engine, null, null, notifyType); } return treeViewItem; }; return TreeViewNotifyItem; })(TreeViewOutputItem); ObjectView.TreeViewNotifyItem = TreeViewNotifyItem; var TreeViewGroupItem = (function (_super) { __extends(TreeViewGroupItem, _super); function TreeViewGroupItem(title, isCollapsed, name, html) { if (typeof title === "undefined") { title = ""; } if (typeof name === "undefined") { name = null; } var listValue = TreeViewItem.encodeValueForListItem(title, "string", false, true); var listName = name ? TreeViewItem.encodeValueForListItem(name, "string", false, true).value : null; _super.call(this, listValue.value, true, false, true, listName, "consoleOutputInput", html || listValue.htmlLines); this._title = title; this._isInitialCollapsed = !!isCollapsed; this._children = []; } Object.defineProperty(TreeViewGroupItem.prototype, "isExpandable", { get: function () { return (this._children && this._children.length > 0); }, enumerable: true, configurable: true }); Object.defineProperty(TreeViewGroupItem.prototype, "hasChildren", { get: function () { return (this._children && this._children.length > 0); }, enumerable: true, configurable: true }); TreeViewGroupItem.prototype.getChildren = function (call, onComplete) { onComplete(this._children); }; TreeViewGroupItem.prototype.addChild = function (item, afterSibling) { if (!afterSibling) { this._children.push(item); } else { var index = this._children.indexOf(afterSibling); if (index > -1) { this._children.splice(index + 1, 0, item); } else { this._children.push(item); } } }; TreeViewGroupItem.prototype.getCopyText = function (indent, filter, isRoot) { if (typeof indent === "undefined") { indent = ""; } var nextIndent; if (isRoot) { nextIndent = indent = ""; } else { nextIndent = indent + TreeViewItem.TextCopyIndent; } var text = indent; if (this._title && this._title.length > 0) { text += this._title + "\r\n"; } for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; if (!filter) { filter = function (item) { return true; }; } if (filter(child)) { text += child.getCopyText(nextIndent) + "\r\n"; } } return text; }; TreeViewGroupItem.prototype.isItemInGroup = function (item) { return (this._children.indexOf(item) > -1); }; TreeViewGroupItem.prototype.isFirstUIChildNeeded = function () { return (this._children.length === 0 && !this._isInitialCollapsed); }; return TreeViewGroupItem; })(TreeViewItem); ObjectView.TreeViewGroupItem = TreeViewGroupItem; var TreeViewCssStyleGroup = (function (_super) { __extends(TreeViewCssStyleGroup, _super); function TreeViewCssStyleGroup(propertyName, propertyValueHtml, propertyValue, isCollapsed) { _super.call(this, null, isCollapsed, propertyName, propertyValueHtml); this._propertyName = propertyName; this._propertyValueHtml = propertyValueHtml.length > 0 ? propertyValueHtml[0] : ""; this._propertyValue = propertyValue; } TreeViewCssStyleGroup.prototype.getCopyText = function (indent) { if (typeof indent === "undefined") { indent = ""; } return indent + this._propertyName + ": " + this._propertyValue + ";\r\n"; }; return TreeViewCssStyleGroup; })(TreeViewGroupItem); ObjectView.TreeViewCssStyleGroup = TreeViewCssStyleGroup; var TreeViewStyleItem = (function (_super) { __extends(TreeViewStyleItem, _super); function TreeViewStyleItem(style, isActive) { var colorThumbnail = (TreeViewTraceStylesItem.isColorProperty(style.property) ? "" : ""); var nameColumn = (style.inherited ? "<" + style.inherited.toLowerCase() + "> " : "") + style.selector; var html = [colorThumbnail + "" + style.value + ""]; var additionalClass = (isActive ? "" : " Console-Style-Disabled ") + "Console-Html-CSS-Selector"; _super.call(this, null, false, false, false, nameColumn, additionalClass, html); this._html = html; this._styleObject = style; } TreeViewStyleItem.prototype.getHtmlContent = function () { return this._html; }; TreeViewStyleItem.prototype.getCopyText = function (indent) { if (typeof indent === "undefined") { indent = ""; } return indent + this._styleObject.selector + " {\r\n" + " " + this._styleObject.property.toLowerCase() + ": " + this._styleObject.value + "\r\n" + "}\r\n"; }; return TreeViewStyleItem; })(TreeViewItem); ObjectView.TreeViewStyleItem = TreeViewStyleItem; var TreeViewCountItem = (function (_super) { __extends(TreeViewCountItem, _super); function TreeViewCountItem(notifyObject) { var name = notifyObject.message.name; if (!name) { name = ""; } _super.call(this, notifyObject.inputId, notifyObject.message.message, false, false, false, name + ":", null, null); } return TreeViewCountItem; })(TreeViewOutputItem); ObjectView.TreeViewCountItem = TreeViewCountItem; var TreeViewSeparatorItem = (function (_super) { __extends(TreeViewSeparatorItem, _super); function TreeViewSeparatorItem() { var label = Common.ToolWindowHelpers.loadString("ConsoleNavigationSeparatorLabel"); var htmlLines = [""]; _super.call(this, label, false, false, false, null, null, htmlLines); } Object.defineProperty(TreeViewSeparatorItem.prototype, "isSeparator", { get: function () { return true; }, enumerable: true, configurable: true }); return TreeViewSeparatorItem; })(TreeViewItem); ObjectView.TreeViewSeparatorItem = TreeViewSeparatorItem; })(Common.ObjectView || (Common.ObjectView = {})); var ObjectView = Common.ObjectView; })(Common || (Common = {})); // EtwDataCollector.ts var Common; (function (Common) { (function (Data) { "use strict"; var F12EtwDataCollector = (function () { function F12EtwDataCollector(dataCollectorProxy) { this._proxy = dataCollectorProxy; if (!this._proxy) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1055")); } } F12EtwDataCollector.prototype.startSession = function (agentFile, agentGuid) { var _this = this; return new Plugin.Promise(function (completed, error) { _this._proxy.startSession(agentFile, agentGuid, function (sessionProxy) { completed(new F12EtwDataCollectorSession(sessionProxy)); }, function (hr) { if (error) { error(new Error(hr.toString())); } }); }); }; F12EtwDataCollector.prototype.stopCollection = function () { this._proxy.stopCollection(); }; return F12EtwDataCollector; })(); Data.F12EtwDataCollector = F12EtwDataCollector; var F12EtwDataCollectorSession = (function () { function F12EtwDataCollectorSession(sessionProxy) { this._proxy = sessionProxy; } F12EtwDataCollectorSession.prototype.stop = function () { var _this = this; return new Plugin.Promise(function (completed, error) { _this._proxy.stop(function (file) { completed(file); }, function (hr) { if (error) { error(new Error("Error: " + hr)); } }); }); }; F12EtwDataCollectorSession.prototype.getGraphDataUpdate = function (counterId) { var _this = this; return new Plugin.Promise(function (completed, error) { _this._proxy.getGraphDataUpdate(counterId, function (points) { completed(points); }, function (hr) { if (error) { error(new Error("Error: " + hr)); } }); }); }; return F12EtwDataCollectorSession; })(); Data.F12EtwDataCollectorSession = F12EtwDataCollectorSession; })(Common.Data || (Common.Data = {})); var Data = Common.Data; })(Common || (Common = {})); // button.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var Button = (function (_super) { __extends(Button, _super); function Button(element) { var _this = this; _super.call(this, element); this.rootElement.addEventListener("click", function (e) { return _this.onClick(e); }); this.rootElement.addEventListener("keydown", function (e) { return _this.onKeydown(e); }); this.rootElement.addEventListener("mousedown", function (e) { return _this.onMouseDown(e); }); this.rootElement.addEventListener("mouseup", function (e) { return _this.onMouseUpLeave(e); }); this.rootElement.addEventListener("mouseleave", function (e) { return _this.onMouseUpLeave(e); }); } Object.defineProperty(Button.prototype, "click", { get: function () { return this._onClick; }, set: function (value) { this._onClick = value; }, enumerable: true, configurable: true }); Object.defineProperty(Button.prototype, "content", { get: function () { return this.rootElement.innerHTML; }, set: function (value) { this.rootElement.innerHTML = value; }, enumerable: true, configurable: true }); Object.defineProperty(Button.prototype, "tooltip", { get: function () { return this._tooltip; }, set: function (value) { var _this = this; this._tooltip = value; this.rootElement.onmouseover = function () { Plugin.Tooltip.show({ content: _this._tooltip }); return true; }; }, enumerable: true, configurable: true }); Object.defineProperty(Button.prototype, "disabled", { get: function () { return this.rootElement.disabled; }, set: function (value) { this.rootElement.disabled = value; }, enumerable: true, configurable: true }); Button.prototype.onClick = function (ev) { this.rootElement.focus(); if (this._onClick) { this._onClick(); } }; Button.prototype.onKeydown = function (ev) { if (ev.keyCode === 32 /* Space */ || ev.keyCode === 13 /* Enter */) { if (this._onClick) { this._onClick(); } ev.preventDefault(); } }; Button.prototype.onMouseDown = function (ev) { if (!this.disabled) { this.rootElement.classList.add("BPT-ToolbarButton-MouseDown"); } }; Button.prototype.onMouseUpLeave = function (ev) { this.rootElement.classList.remove("BPT-ToolbarButton-MouseDown"); }; return Button; })(Legacy.Control); Legacy.Button = Button; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // radioButton.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var RadioButton = (function (_super) { __extends(RadioButton, _super); function RadioButton(element) { var _this = this; _super.call(this, element); this._radioButtonElement = this.rootElement; RadioButton.RadioButtons.push(this); this.rootElement.addEventListener("click", function (e) { return _this.onCheck(e); }); this.updateAriaProperties(); } Object.defineProperty(RadioButton.prototype, "check", { get: function () { return this._onCheck; }, set: function (value) { this._onCheck = value; }, enumerable: true, configurable: true }); Object.defineProperty(RadioButton.prototype, "checked", { get: function () { return this._radioButtonElement.checked; }, set: function (value) { this._radioButtonElement.checked = value; this.updateAriaProperties(); }, enumerable: true, configurable: true }); Object.defineProperty(RadioButton.prototype, "disabled", { get: function () { return this.rootElement.disabled; }, set: function (value) { this.rootElement.disabled = value; }, enumerable: true, configurable: true }); Object.defineProperty(RadioButton.prototype, "groupName", { get: function () { return this._radioButtonElement.name; }, enumerable: true, configurable: true }); Object.defineProperty(RadioButton.prototype, "focusableElement", { get: function () { return this._radioButtonElement; }, enumerable: true, configurable: true }); RadioButton.prototype.onCheck = function (ev) { if (this.checked) { this.rootElement.focus(); if (this._onCheck) { this._onCheck(); } for (var i = 0; i < RadioButton.RadioButtons.length; ++i) { var otherButton = RadioButton.RadioButtons[i]; if (otherButton !== this && otherButton.groupName === this.groupName) { otherButton.updateAriaProperties(); } } } this.updateAriaProperties(); }; RadioButton.prototype.updateAriaProperties = function () { this.rootElement.setAttribute("aria-checked", "" + this.checked); }; RadioButton.RadioButtons = []; return RadioButton; })(Legacy.Control); Legacy.RadioButton = RadioButton; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // toggleButton.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var ToggleButton = (function (_super) { __extends(ToggleButton, _super); function ToggleButton(element) { var _this = this; _super.call(this, element); F12.Tools.Utility.Assert.areEqual(this.rootElement.getAttribute("role"), "button", "Missing button role"); this.rootElement.addEventListener("DOMAttrModified", function (evt) { if (evt.attrName === "aria-pressed") { var isSelected = evt.newValue === "true"; _this.rootElement.setAttribute("selected", "" + isSelected); if (_this._onSelectChanged && evt.newValue !== evt.prevValue) { _this._onSelectChanged(isSelected); } } }); this.selected = this.selected; } Object.defineProperty(ToggleButton.prototype, "selectedChanged", { get: function () { return this._onSelectChanged; }, set: function (value) { this._onSelectChanged = value; }, enumerable: true, configurable: true }); Object.defineProperty(ToggleButton.prototype, "selected", { get: function () { return this.rootElement.getAttribute("aria-pressed") === "true"; }, set: function (value) { this.rootElement.setAttribute("aria-pressed", "" + value); }, enumerable: true, configurable: true }); ToggleButton.prototype.onClick = function (ev) { _super.prototype.onClick.call(this, ev); this.selected = !this.selected; }; ToggleButton.prototype.onKeydown = function (ev) { if (ev.keyCode === 32 /* Space */ || ev.keyCode === 13 /* Enter */) { _super.prototype.onKeydown.call(this, ev); this.selected = !this.selected; ev.preventDefault(); } }; return ToggleButton; })(Legacy.Button); Legacy.ToggleButton = ToggleButton; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // dataListTextBox.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var DataListTextBox = (function (_super) { __extends(DataListTextBox, _super); function DataListTextBox(root) { var _this = this; _super.call(this, root); this._idPostfix = DataListTextBox.GlobalIdPostfix++; var dataListId = "textBoxDataList" + this._idPostfix; this._inputElement = document.createElement("input"); this._inputElement.type = "text"; this._inputElement.setAttribute("list", dataListId); this._inputElement.addEventListener("input", function (ev) { return _this.onInput(ev); }); this._inputElement.addEventListener("keydown", function (ev) { return _this.onKeydown(ev); }); this._inputElement.addEventListener("change", function (ev) { return _this.onChange(ev); }); this._dataListElement = document.createElement("datalist"); this._dataListElement.id = dataListId; this._optionElements = null; this.rootElement.appendChild(this._inputElement); this.rootElement.appendChild(this._dataListElement); } Object.defineProperty(DataListTextBox.prototype, "items", { get: function () { return this._items; }, set: function (value) { this.clearItems(); this._optionElements = []; for (var i = 0; i < value.length; ++i) { var option = document.createElement("option"); option.text = value[i].text; this._optionElements.push(option); this._dataListElement.appendChild(option); } }, enumerable: true, configurable: true }); Object.defineProperty(DataListTextBox.prototype, "text", { get: function () { return this._inputElement.value; }, set: function (value) { this._inputElement.value = value; }, enumerable: true, configurable: true }); Object.defineProperty(DataListTextBox.prototype, "textChanged", { get: function () { return this._valueChanged; }, set: function (handler) { this._valueChanged = handler; }, enumerable: true, configurable: true }); Object.defineProperty(DataListTextBox.prototype, "textCommitted", { get: function () { return this._valueCommitted; }, set: function (handler) { this._valueCommitted = handler; }, enumerable: true, configurable: true }); Object.defineProperty(DataListTextBox.prototype, "focusableElement", { get: function () { return this._inputElement; }, enumerable: true, configurable: true }); DataListTextBox.prototype.clearItems = function () { if (this._optionElements) { for (var i = 0; i < this._optionElements.length; ++i) { this._dataListElement.removeChild(this._optionElements[i]); } this._optionElements = null; } }; DataListTextBox.prototype.onInput = function (ev) { if (this.textChanged) { this.textChanged(this.text); } }; DataListTextBox.prototype.onKeydown = function (ev) { var _this = this; if (ev.keyCode === 13 /* Enter */) { window.setImmediate(function () { if (_this.textCommitted) { _this.textCommitted(_this.text); } }); } }; DataListTextBox.prototype.onChange = function (ev) { if (this.textCommitted) { this.textCommitted(this.text); } }; DataListTextBox.GlobalIdPostfix = 1; return DataListTextBox; })(Legacy.Control); Legacy.DataListTextBox = DataListTextBox; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // rpc.ts var F12; (function (F12) { (function (Tools) { (function (RPC) { "use strict"; var JsonRPCEndpoint = (function () { function JsonRPCEndpoint(identifier, jsonRpcMethodReceive, jsonRpcNotificationReceive, postMessage, onMessageCapture) { var _this = this; this._ourIdentifier = identifier; this._nextId = 0; this._promiseTable = {}; this._jsonRpcMethodReceive = jsonRpcMethodReceive; this._jsonRpcNotificationReceive = jsonRpcNotificationReceive; this._postMessage = postMessage; if (!Date.now) { Date.now = function now() { return +(new Date); }; } this._startTime = Date.now(); onMessageCapture(function (data) { _this.onMessage(data); }); } JsonRPCEndpoint.prototype.jsonRpcMethodCall = function (method, params, completed, error, identification) { var _this = this; var id = this._ourIdentifier + "|" + this._nextId; this._nextId++; this._promiseTable[id] = { completed: completed, error: error }; var message = JSON.stringify({ id: id, method: method, params: params }); this.logTraffic(message); if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this._postMessage(message, identification); }, message); return true; } else { return this._postMessage(message, identification); } }; JsonRPCEndpoint.prototype.jsonRpcNotification = function (method, params, identification) { var _this = this; var id = this._ourIdentifier + "|" + "NULL"; var message = JSON.stringify({ id: id, method: method, params: params }); this.logTraffic(message); if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this._postMessage(message, identification); }, message); } else { this._postMessage(message, identification); } }; JsonRPCEndpoint.prototype.logTraffic = function (data) { if (isDebugBuild) { var paddedTimestamp = (" " + (Date.now() - this._startTime) / 1000).slice(-9); __rpcLog.push(paddedTimestamp + " | " + data); if (__rpcLog.length > 100) { __rpcLog.shift(); } } }; JsonRPCEndpoint.prototype.onMessage = function (data) { var _this = this; this.logTraffic(data.data); var result = JSON.parse(data.data); var idSplit = (result.id).split("|"); Tools.Utility.Assert.areEqual(idSplit.length, 2); if (idSplit[1] === "NULL") { if (idSplit[0] !== this._ourIdentifier) { this._jsonRpcNotificationReceive(result.method, result.params); } } else if (idSplit[0] === this._ourIdentifier) { if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this.handleReply(result); }, data.data); } else { this.handleReply(result); } } else { if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this.handleCall(result); }, data.data); } else { this.handleCall(result); } } }; JsonRPCEndpoint.prototype.handleReply = function (result) { Tools.Utility.Assert.hasValue(this._promiseTable[result.id]); if (result.error) { Tools.Utility.Assert.isUndefined(result.data, "Can't have both data and error"); this._promiseTable[result.id].error(result.error); } else { this._promiseTable[result.id].completed(result.data); } delete this._promiseTable[result.id]; }; JsonRPCEndpoint.prototype.handleCall = function (result) { var _this = this; this._jsonRpcMethodReceive(result.method, result.params, function (data, error) { var message; if (data !== null && data !== undefined) { Tools.Utility.Assert.isUndefined(error, "Can't have both data and error"); message = JSON.stringify({ id: result.id, data: data }); } else { Tools.Utility.Assert.hasValue(error, "RPC call returned no value, but no error object either"); message = JSON.stringify({ id: result.id, error: error }); } _this._postMessage(message); }); }; return JsonRPCEndpoint; })(); RPC.JsonRPCEndpoint = JsonRPCEndpoint; var RpcDelayData = (function () { function RpcDelayData(callback, message) { this.callback = callback; this.message = message; } return RpcDelayData; })(); RPC.RpcDelayData = RpcDelayData; var RpcDelayHook = (function () { function RpcDelayHook() { } RpcDelayHook.enableDelay = function (calculateDelayTime, delayedMessage) { RpcDelayHook.RandomDelay = true; RpcDelayHook.CalculateDelayTime = calculateDelayTime; RpcDelayHook.DelayedMessage = delayedMessage; }; RpcDelayHook.disableDelay = function () { RpcDelayHook.RandomDelay = false; if (RpcDelayHook.RandomDelayTimeout) { clearTimeout(RpcDelayHook.RandomDelayTimeout); RpcDelayHook.RandomDelayTimeout = null; RpcDelayHook.clearQueue(); } }; RpcDelayHook.queueData = function (callback, message) { var delayData = new RpcDelayData(callback, message); RpcDelayHook.DelayedQueue.push(delayData); if (!RpcDelayHook.RandomDelayTimeout) { var delay = RpcDelayHook.CalculateDelayTime(message); RpcDelayHook.RandomDelayTimeout = setTimeout(RpcDelayHook.fireRandomly, delay); } }; RpcDelayHook.fireRandomly = function () { var delayData = RpcDelayHook.DelayedQueue.shift(); RpcDelayHook.DelayedMessage(delayData.message); delayData.callback(); if (RpcDelayHook.DelayedQueue.length > 0) { var delay = RpcDelayHook.CalculateDelayTime(RpcDelayHook.DelayedQueue[0].message); RpcDelayHook.RandomDelayTimeout = setTimeout(RpcDelayHook.fireRandomly, delay); } else { RpcDelayHook.RandomDelayTimeout = null; } }; RpcDelayHook.clearQueue = function () { for (var i = 0; i < RpcDelayHook.DelayedQueue.length; i++) { var delayData = RpcDelayHook.DelayedQueue[i]; RpcDelayHook.DelayedMessage(delayData.message); delayData.callback(); } RpcDelayHook.DelayedQueue = []; }; RpcDelayHook.RandomDelay = false; RpcDelayHook.DelayedQueue = []; return RpcDelayHook; })(); RPC.RpcDelayHook = RpcDelayHook; })(Tools.RPC || (Tools.RPC = {})); var RPC = Tools.RPC; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); if (isDebugBuild) { var __rpcLog = []; } // commonTestEventHelper.ts var Common; (function (Common) { "use strict"; var EventHelperObject = (function () { function EventHelperObject() { this._eventCallbacks = {}; } EventHelperObject.prototype.addEventListener = function (eventName, callback) { var callbacks = this._eventCallbacks[eventName]; if (!callbacks) { this._eventCallbacks[eventName] = new Array(); callbacks = this._eventCallbacks[eventName]; } callbacks.push(callback); }; EventHelperObject.prototype.addOneTimeListener = function (eventName, callback) { var _this = this; var eventCallback = function (data) { _this.removeEventListener(eventName, eventCallback); callback(data); }; this.addEventListener(eventName, eventCallback); }; EventHelperObject.prototype.removeEventListener = function (eventName, callback) { var callbacks = this._eventCallbacks[eventName]; if (callbacks) { callbacks.splice(callbacks.indexOf(callback), 1); } }; EventHelperObject.prototype.fireEvent = function (eventName, eventArgs) { if (this._eventCallbacks[eventName]) { var callbacks = this._eventCallbacks[eventName].slice(0); for (var i = 0; i < callbacks.length; i++) { callbacks[i](eventArgs); } } }; EventHelperObject.prototype.fireEventForFirstListener = function (eventName, eventArgs) { if (this._eventCallbacks[eventName]) { var callbacks = this._eventCallbacks[eventName].slice(0); if (callbacks.length > 0) { callbacks[0](eventArgs); } } }; return EventHelperObject; })(); Common.EventHelperObject = EventHelperObject; })(Common || (Common = {})); // ElementRecyclerFactory.ts var Common; (function (Common) { "use strict"; var ElementRecyclerFactory = (function () { function ElementRecyclerFactory(container, elementCreator) { this._container = container; this._elementCreator = elementCreator; this._index = null; this._elements = []; this._recycledElements = []; } ElementRecyclerFactory.forDivWithClass = function (container, className) { return new ElementRecyclerFactory(container, function () { var element = document.createElement("div"); element.className = className; return element; }); }; ElementRecyclerFactory.prototype.start = function () { this._index = 0; }; ElementRecyclerFactory.prototype.getNext = function () { F12.Tools.Utility.Assert.isTrue(this._index !== null, "Invalid operation. Method 'start' must be called before calling getNext."); var element = this._elements[this._index]; if (!element) { if (this._recycledElements.length > 0) { element = this._recycledElements.pop(); } else { element = this._elementCreator(); } this._elements.push(element); this._container.appendChild(element); } this._index++; return element; }; ElementRecyclerFactory.prototype.stop = function () { if (this._index === null) { return; } for (var i = this._elements.length - 1; i >= this._index; --i) { var element = this._elements.pop(); this._recycledElements.push(element); this._container.removeChild(element); } this._index = null; }; ElementRecyclerFactory.prototype.recycleAll = function () { for (var i = this._elements.length - 1; i >= 0; --i) { var element = this._elements.pop(); this._recycledElements.push(element); this._container.removeChild(element); } }; ElementRecyclerFactory.prototype.removeAll = function () { for (var i = this._elements.length - 1; i >= 0; --i) { var element = this._elements.pop(); this._container.removeChild(element); } this._elements = []; this._recycledElements = []; }; return ElementRecyclerFactory; })(); Common.ElementRecyclerFactory = ElementRecyclerFactory; })(Common || (Common = {})); // DataSource.ts var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // IItemContainerGenerator.ts var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // IItemContainerTemplateBinder.ts var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ItemContainer.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var ItemContainer = (function (_super) { __extends(ItemContainer, _super); function ItemContainer() { var _this = this; _super.call(this, document.createElement("div")); this.rootElement.id = "listItemContainer" + (ItemContainer.IdCount++); this.rootElement.className = ItemContainer.BASE_CSS_CLASSNAME; this.rootElement.tabIndex = -1; this.rootElement.addEventListener("focus", this.onFocus.bind(this)); this.rootElement.addEventListener("blur", this.onBlur.bind(this)); this.rootElement.addEventListener("click", this.onClick.bind(this)); this.rootElement.addEventListener("contextmenu", this.onContextMenu.bind(this)); this.rootElement.addEventListener("mouseover", function () { _this.rootElement.classList.add(ItemContainer.HOVER_CSS_CLASSNAME); }); this.rootElement.addEventListener("mouseleave", function () { _this.rootElement.classList.remove(ItemContainer.HOVER_CSS_CLASSNAME); }); } Object.defineProperty(ItemContainer.prototype, "id", { get: function () { if (this.item) { return this.item.id; } else { return null; } }, enumerable: true, configurable: true }); Object.defineProperty(ItemContainer.prototype, "isSelected", { get: function () { return this._isSelected; }, set: function (value) { if (this._isSelected !== value) { this._isSelected = value; this.updateStyle(); } }, enumerable: true, configurable: true }); Object.defineProperty(ItemContainer.prototype, "item", { get: function () { return this._item; }, set: function (value) { this._item = value; }, enumerable: true, configurable: true }); Object.defineProperty(ItemContainer.prototype, "template", { get: function () { return this._template; }, set: function (value) { this._template = value; }, enumerable: true, configurable: true }); Object.defineProperty(ItemContainer.prototype, "hasFocus", { get: function () { return this.id !== null && this.id === ItemContainer.FocusedContainerId; }, set: function (value) { if (value) { ItemContainer.FocusedContainerId = this.id; } else { ItemContainer.FocusedContainerId = null; } }, enumerable: true, configurable: true }); ItemContainer.prototype.clearHoverState = function () { this.rootElement.classList.remove(ItemContainer.HOVER_CSS_CLASSNAME); }; ItemContainer.prototype.empty = function () { this.item = null; this._isSelected = null; this.rootElement.classList.remove("itemContainerHover"); }; ItemContainer.prototype.focus = function () { this.isSelected = true; this.hasFocus = true; this.updateStyle(); this.rootElement.focus(); }; ItemContainer.prototype.updateStyle = function () { if (this._isSelected) { if (this.hasFocus) { this.rootElement.classList.add(ItemContainer.SELECTED_ACTIVE_CSS_CLASSNAME); } else { this.rootElement.classList.add(ItemContainer.SELECTED_CSS_CLASSNAME); this.rootElement.classList.remove(ItemContainer.SELECTED_ACTIVE_CSS_CLASSNAME); } } else { this.rootElement.classList.remove(ItemContainer.SELECTED_CSS_CLASSNAME); this.rootElement.classList.remove(ItemContainer.SELECTED_ACTIVE_CSS_CLASSNAME); } }; ItemContainer.prototype.onBlur = function () { this.hasFocus = false; this.updateStyle(); }; ItemContainer.prototype.onClick = function (e) { if (this.clicked) { this.clicked(e); e.stopImmediatePropagation(); } }; ItemContainer.prototype.onContextMenu = function (e) { if (this.contextMenu) { this.contextMenu(); } }; ItemContainer.prototype.onFocus = function () { this.hasFocus = true; this.updateStyle(); }; ItemContainer.BASE_CSS_CLASSNAME = "BPT-listItemContainer"; ItemContainer.HOVER_CSS_CLASSNAME = "BPT-listItemContainerHover"; ItemContainer.SELECTED_CSS_CLASSNAME = "BPT-listItemSelected"; ItemContainer.SELECTED_ACTIVE_CSS_CLASSNAME = "BPT-listItemSelectedActive"; ItemContainer.IdCount = 0; return ItemContainer; })(Common.Controls.Legacy.Control); Legacy.ItemContainer = ItemContainer; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ItemContainerGenerator.ts var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var ItemContainerGenerator = (function () { function ItemContainerGenerator() { this._itemContainers = {}; this._unusedItemContainers = []; } Object.defineProperty(ItemContainerGenerator.prototype, "count", { get: function () { if (!this._dataSource) { return 0; } return this._dataSource.count; }, enumerable: true, configurable: true }); ItemContainerGenerator.prototype.setDataSource = function (dataSource) { if (this._dataSource !== dataSource) { this._dataSource = dataSource; this._currentIndex = null; this.recycleAll(); } }; ItemContainerGenerator.prototype.startAt = function (index) { if (!this._dataSource) { return; } F12.Tools.Utility.Assert.isTrue(index >= 0 && index < this._dataSource.count, "Index out of range."); this._currentIndex = index; this._dataSource.startAt(this._currentIndex); }; ItemContainerGenerator.prototype.stop = function () { if (!this._dataSource) { return; } this._currentIndex = null; this._dataSource.stop(); }; ItemContainerGenerator.prototype.getNext = function () { if (!this._dataSource) { return null; } F12.Tools.Utility.Assert.isTrue(this._currentIndex !== null, "Invalid operation. startAt must be called before calling getNext."); var itemContainer = null; if (this._currentIndex < this._dataSource.count) { var item = this._dataSource.getNext(); if (item) { itemContainer = this._itemContainers[this._currentIndex]; if (!itemContainer) { itemContainer = this.getItemContainer(this._currentIndex, item); this._itemContainers[this._currentIndex] = itemContainer; } this._currentIndex += 1; } } return itemContainer; }; ItemContainerGenerator.prototype.getItemContainerFromItemId = function (itemId) { for (var key in this._itemContainers) { var itemContainer = this._itemContainers[key]; if (itemContainer.id === itemId) { return itemContainer; } } return null; }; ItemContainerGenerator.prototype.recycle = function (index) { var itemContainer = this._itemContainers[index]; if (itemContainer) { delete this._itemContainers[index]; itemContainer.empty(); this._unusedItemContainers.push(itemContainer); } }; ItemContainerGenerator.prototype.recycleAll = function () { for (var key in this._itemContainers) { var itemContainer = this._itemContainers[key]; if (itemContainer) { itemContainer.empty(); this._unusedItemContainers.push(itemContainer); } } this._itemContainers = {}; }; ItemContainerGenerator.prototype.getItemContainer = function (itemIndex, item) { var itemContainer; if (this._unusedItemContainers.length > 0) { itemContainer = this._unusedItemContainers.pop(); } else { itemContainer = new Legacy.ItemContainer(); } itemContainer.item = item; return itemContainer; }; return ItemContainerGenerator; })(); Legacy.ItemContainerGenerator = ItemContainerGenerator; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // StackPanel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var StackPanel = (function (_super) { __extends(StackPanel, _super); function StackPanel(parentContainer) { _super.call(this, "Common.stackPanelTemplate", Common.templateRepository); this._parentContainer = parentContainer; this._parentContainer.appendChild(this.rootElement); this._content = this.findElement("content"); this.children = {}; this._requestScrollToOffset = null; this.rootElement.addEventListener("scroll", this.onScroll.bind(this), true); this._scrollTopCached = null; } Object.defineProperty(StackPanel.prototype, "content", { get: function () { return this._content; }, enumerable: true, configurable: true }); Object.defineProperty(StackPanel.prototype, "parentContainer", { get: function () { return this._parentContainer; }, enumerable: true, configurable: true }); Object.defineProperty(StackPanel.prototype, "rowHeight", { get: function () { if (!this._rowHeight) { var itemContainer = new Legacy.ItemContainer(); this.content.appendChild(itemContainer.rootElement); this._rowHeight = itemContainer.rootElement.offsetHeight; this.content.removeChild(itemContainer.rootElement); } return this._rowHeight; }, enumerable: true, configurable: true }); Object.defineProperty(StackPanel.prototype, "viewportHeight", { get: function () { if (!this._viewportHeight) { this._viewportHeight = Math.floor(this._parentContainer.getBoundingClientRect().height); } return this._viewportHeight; }, enumerable: true, configurable: true }); Object.defineProperty(StackPanel.prototype, "viewportItemsCount", { get: function () { if (this.rowHeight === 0 || isNaN(this.rowHeight)) { return 0; } return Math.floor(this.viewportHeight / this.rowHeight); }, enumerable: true, configurable: true }); Object.defineProperty(StackPanel.prototype, "scrollHeight", { get: function () { return this.rootElement.scrollHeight; }, enumerable: true, configurable: true }); Object.defineProperty(StackPanel.prototype, "scrollTop", { get: function () { if (this._requestScrollToOffset !== null) { var offset = Math.min(this._requestScrollToOffset, this.scrollHeight - this.viewportHeight); offset = Math.max(0, offset); return offset; } return this.scrollTopCached; }, enumerable: true, configurable: true }); Object.defineProperty(StackPanel.prototype, "scrollTopCached", { get: function () { if (this._scrollTopCached === null) { this._scrollTopCached = this.rootElement.scrollTop; } return this._scrollTopCached; }, enumerable: true, configurable: true }); StackPanel.prototype.ensureVisible = function (visibleIndex) { var itemTop = visibleIndex * this.rowHeight; var itemBottom = itemTop + this.rowHeight; var viewportTop = this.scrollTop; var viewportBottom = viewportTop + this.viewportHeight; if (itemTop < viewportTop || itemBottom > viewportBottom) { var scrollToPos; if (itemTop < viewportTop) { scrollToPos = itemTop; } else { scrollToPos = itemBottom - this.viewportHeight; } this.scrollToOffset(scrollToPos); } }; StackPanel.prototype.getScrollViewportOffset = function (itemContainer) { var top = parseInt(itemContainer.rootElement.style.top); var scrollTop = this.scrollTop; var viewportHeight = this.viewportHeight; var viewportOffset = top - scrollTop; if (viewportOffset > 0 && viewportOffset <= viewportHeight - this.rowHeight) { return viewportOffset; } return 0; }; StackPanel.prototype.invalidate = function () { for (var key in this.children) { var itemContainer = this.children[key]; if (itemContainer) { this.templateBinder.unbind(itemContainer); } } this.itemContainerGenerator.recycleAll(); this.children = {}; }; StackPanel.prototype.invalidateSizeCache = function () { this._viewportHeight = null; this._rowHeight = 0; }; StackPanel.prototype.render = function (detachBeforeRender) { if (typeof detachBeforeRender === "undefined") { detachBeforeRender = false; } if (this._isRendering) { return; } if (!this.templateBinder) { return; } this._isRendering = true; try { this.renderCoreOverride(detachBeforeRender); if (this._requestScrollToOffset !== null) { if (this.scrollTopCached !== this._requestScrollToOffset) { this._scrollTopCached = null; this.rootElement.scrollTop = this._requestScrollToOffset; } this._requestScrollToOffset = null; } } finally { this._isRendering = false; } }; StackPanel.prototype.renderCoreOverride = function (detachBeforeRender) { if (typeof detachBeforeRender === "undefined") { detachBeforeRender = false; } var index = 0; this.itemContainerGenerator.startAt(0); var itemContainer = this.itemContainerGenerator.getNext(); while (itemContainer) { this.templateBinder.bind(itemContainer, index++); this.rootElement.appendChild(itemContainer.rootElement); itemContainer = this.itemContainerGenerator.getNext(); } this.itemContainerGenerator.stop(); }; StackPanel.prototype.scrollToIndex = function (visibleIndex, scrollOffset, postponeUntilRender) { if (typeof scrollOffset === "undefined") { scrollOffset = 0; } var position = visibleIndex * this.rowHeight + scrollOffset; this.scrollToOffset(position, postponeUntilRender); }; StackPanel.prototype.scrollToOffset = function (offset, postponeUntilRender) { if (postponeUntilRender) { this._requestScrollToOffset = offset; } else { this._requestScrollToOffset = null; this._scrollTopCached = null; this.rootElement.scrollTop = offset; this._skipNextOnScroll = true; this.render(); } }; StackPanel.prototype.onScroll = function (e) { this._scrollTopCached = null; if (this._skipNextOnScroll) { this._skipNextOnScroll = false; return; } this.render(); if (this.onScrolled) { this.onScrolled(e); } }; return StackPanel; })(Common.Controls.Legacy.TemplateControl); Legacy.StackPanel = StackPanel; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // VirtualizingStackPanel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var VirtualizingStackPanel = (function (_super) { __extends(VirtualizingStackPanel, _super); function VirtualizingStackPanel(parentContainer) { _super.call(this, parentContainer); this._contentSizer = this.findElement("contentSizer"); this._firstVisibleItemIndex = 0; } Object.defineProperty(VirtualizingStackPanel.prototype, "actualHeight", { get: function () { return this.viewportHeight; }, enumerable: true, configurable: true }); Object.defineProperty(VirtualizingStackPanel.prototype, "scrollHeight", { get: function () { return this.virtualHeight; }, enumerable: true, configurable: true }); Object.defineProperty(VirtualizingStackPanel.prototype, "virtualHeight", { get: function () { return this.rowHeight * this.itemContainerGenerator.count; }, enumerable: true, configurable: true }); VirtualizingStackPanel.prototype.renderCoreOverride = function (detachBeforeRender) { if (typeof detachBeforeRender === "undefined") { detachBeforeRender = false; } this.updateVirtualHeight(); var visibleItemsCount = Math.ceil(this.getVisibleItemsScrollFraction()); var firstVisibleItemIndexFractional = this.getFirstVisibleItemScrollFraction(); if (detachBeforeRender) { var tempContentParent = this.content.parentElement; tempContentParent.removeChild(this.content); } if (firstVisibleItemIndexFractional < this.itemContainerGenerator.count) { var overflowItemsCount = Math.ceil(visibleItemsCount / 4); var newFirstVisibleItemIndexFloor = Math.max(0, Math.floor(firstVisibleItemIndexFractional) - overflowItemsCount); var newFirstVisibleItemIndexCeiling = Math.max(0, Math.ceil(firstVisibleItemIndexFractional) - overflowItemsCount); var newLastVisibleItemIndex = Math.min(this.itemContainerGenerator.count - 1, Math.ceil(this.getFirstVisibleItemScrollFraction()) + visibleItemsCount + overflowItemsCount); for (var i = this._firstVisibleItemIndex; i < newFirstVisibleItemIndexFloor; ++i) { this.removeItemContainerByIndex(i); } for (var i = newLastVisibleItemIndex + 1; i <= this._lastVisibleItemIndex; ++i) { this.removeItemContainerByIndex(i); } this.itemContainerGenerator.startAt(newFirstVisibleItemIndexFloor); var firstChild = this.content.firstChild; for (var i = newFirstVisibleItemIndexFloor; i <= newLastVisibleItemIndex; ++i) { var itemContainer = this.itemContainerGenerator.getNext(); if (!itemContainer) { break; } itemContainer.clearHoverState(); this.templateBinder.bind(itemContainer, i); itemContainer.rootElement.style.top = (i * this.rowHeight) + "px"; if (this.children[i.toString()] !== itemContainer) { if (!this.content.contains(itemContainer.rootElement)) { this.content.appendChild(itemContainer.rootElement); } this.children[i.toString()] = itemContainer; } } this.itemContainerGenerator.stop(); this._firstVisibleItemIndex = newFirstVisibleItemIndexFloor; this._lastVisibleItemIndex = newLastVisibleItemIndex; } this.removeOrphanElements(); if (detachBeforeRender) { tempContentParent.appendChild(this.content); } }; VirtualizingStackPanel.prototype.getFirstVisibleItemScrollFraction = function () { return this.scrollTop / this.rowHeight; }; VirtualizingStackPanel.prototype.getVisibleItemsScrollFraction = function () { return this.viewportHeight / this.rowHeight; }; VirtualizingStackPanel.prototype.removeItemContainerByIndex = function (index) { var itemContainer = this.children[index.toString()]; delete this.children[index.toString()]; if (itemContainer) { this.templateBinder.unbind(itemContainer); } this.itemContainerGenerator.recycle(index); }; VirtualizingStackPanel.prototype.removeOrphanElements = function () { var map = {}; for (var key in this.children) { var child = this.children[key]; map[child.rootElement.id] = true; } for (var elementIndex = this.content.children.length - 1; elementIndex >= 0; --elementIndex) { var element = this.content.children[elementIndex]; if (!map[element.id]) { this.content.removeChild(element); } } }; VirtualizingStackPanel.prototype.updateVirtualHeight = function () { this._contentSizer.style.top = this.virtualHeight + "px"; }; return VirtualizingStackPanel; })(Legacy.StackPanel); Legacy.VirtualizingStackPanel = VirtualizingStackPanel; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // ListControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var ListItemDataTemplate = (function (_super) { __extends(ListItemDataTemplate, _super); function ListItemDataTemplate(templateId, templateRepository) { _super.call(this, templateId, templateRepository); } ListItemDataTemplate.prototype.updateData = function (dataItem) { if (this.item !== dataItem) { this.item = dataItem; this.updateUiOverride(dataItem); } }; ListItemDataTemplate.prototype.updateUiOverride = function (item) { }; return ListItemDataTemplate; })(Common.Controls.Legacy.TemplateControl); Legacy.ListItemDataTemplate = ListItemDataTemplate; var ListControl = (function (_super) { __extends(ListControl, _super); function ListControl(rootElement) { var _this = this; _super.call(this, rootElement); this.dataItemTemplateType = Common.Controls.Legacy.ListItemDataTemplate; this._selectedItemVisibleIndex = -1; this.rootElement.tabIndex = 0; this.rootElement.addEventListener("keydown", this.onKeyDown.bind(this)); this.panel = new Legacy.VirtualizingStackPanel(this.rootElement); this.panel.templateBinder = this; this.panel.onScrolled = function (e) { if (_this.onScrolled) { _this.onScrolled(e); } }; this._itemContainerGenerator = new Legacy.ItemContainerGenerator(); this.panel.itemContainerGenerator = this._itemContainerGenerator; this.invalidateSizeCache(); } Object.defineProperty(ListControl.prototype, "ariaLabel", { get: function () { return this.rootElement.getAttribute("aria-label"); }, set: function (value) { this.rootElement.setAttribute("aria-label", value); }, enumerable: true, configurable: true }); Object.defineProperty(ListControl.prototype, "dataSource", { get: function () { return this._dataSource; }, set: function (value) { if (this._dataSource !== value) { var selectionViewportOffset = 0; if (this._selectedItem && this._itemContainerGenerator) { var selectedItemContainer = this._itemContainerGenerator.getItemContainerFromItemId(this._selectedItem.id); if (selectedItemContainer) { selectionViewportOffset = this.panel.getScrollViewportOffset(selectedItemContainer); } } this._dataSource = value; if (this._selectedItem && this._dataSource) { this._selectedItemVisibleIndex = this.getVisibleIndexOfItem(this._selectedItem); if (this._selectedItemVisibleIndex < 0) { this.selectedItem = null; this.panel.scrollToOffset(0, true); } else { this.panel.scrollToIndex(this._selectedItemVisibleIndex, -selectionViewportOffset, true); } } else { this.panel.scrollToOffset(0, true); } this._itemContainerGenerator.setDataSource(value); this.panel.invalidate(); } }, enumerable: true, configurable: true }); Object.defineProperty(ListControl.prototype, "itemContainerGenerator", { get: function () { return this._itemContainerGenerator; }, enumerable: true, configurable: true }); Object.defineProperty(ListControl.prototype, "selectedIndex", { get: function () { return this._selectedItemVisibleIndex; }, set: function (index) { if (index < 0) { this.selectedItem = null; } else { this.setSelectedItemVisibleIndex(index); } }, enumerable: true, configurable: true }); Object.defineProperty(ListControl.prototype, "selectedItem", { get: function () { return this._selectedItem; }, set: function (value) { if (this._selectedItem !== value || (this._selectedItem && value && this._selectedItem.id !== value.id)) { var itemContainer = this.getSelectedItemContainer(); if (itemContainer) { itemContainer.isSelected = false; } this._selectedItem = value; if (this._selectedItem) { this._selectedItemVisibleIndex = this.getVisibleIndexOfItem(this._selectedItem); } else { this._selectedItemVisibleIndex = -1; } itemContainer = this.getSelectedItemContainer(true); if (itemContainer) { this.setItemContainerAriaLabel(itemContainer); itemContainer.focus(); } if (this._selectedItemVisibleIndex >= 0) { this.panel.ensureVisible(this._selectedItemVisibleIndex); } if (this.selectedItemChanged) { this.selectedItemChanged(this._selectedItem); } } }, enumerable: true, configurable: true }); Object.defineProperty(ListControl.prototype, "offsetLeft", { get: function () { if (this._offsetLeft === null) { this._offsetLeft = this.rootElement.offsetLeft; } return this._offsetLeft; }, enumerable: true, configurable: true }); Object.defineProperty(ListControl.prototype, "offsetTop", { get: function () { if (this._offsetTop === null) { this._offsetTop = this.rootElement.offsetTop; } return this._offsetTop; }, enumerable: true, configurable: true }); ListControl.prototype.bind = function (itemContainer, itemIndex) { var dataItem = itemContainer.item; if (!itemContainer.template) { if (!this.dataItemTemplateType) { throw new Error("Expecting a data item template type."); } itemContainer.template = new this.dataItemTemplateType(); itemContainer.rootElement.tabIndex = -1; itemContainer.rootElement.appendChild(itemContainer.template.rootElement); } itemContainer.rootElement.setAttribute("data-id", itemContainer.id.toString()); this.updateContainerOverride(itemContainer, itemIndex); itemContainer.clicked = this.onItemSelected.bind(this, itemContainer); itemContainer.contextMenu = this.onItemSelected.bind(this, itemContainer); itemContainer.isSelected = this._selectedItem && itemContainer.id === this._selectedItem.id; }; ListControl.prototype.cleanupContainerOverride = function (container) { }; ListControl.prototype.getItemContainerFromItem = function (item, scrollIfNeeded) { var itemContainer = this._itemContainerGenerator.getItemContainerFromItemId(item.id); if (!itemContainer && scrollIfNeeded) { this.scrollToItem(item); itemContainer = this._itemContainerGenerator.getItemContainerFromItemId(item.id); } return itemContainer; }; ListControl.prototype.getSelectedItemContainer = function (scrollIfNeeded) { if (this.selectedItem) { return this.getItemContainerFromItem(this.selectedItem, scrollIfNeeded); } return null; }; ListControl.prototype.invalidate = function () { this.panel.invalidate(); this.panel.render(true); var panelScrollBarShown = this.panel.virtualHeight > this.panel.viewportHeight; if (panelScrollBarShown !== this._panelScrollBarShown) { this._panelScrollBarShown = panelScrollBarShown; this.invalidateSizeCache(); } this.onInvalidated(); }; ListControl.prototype.invalidateSizeCache = function () { this._offsetLeft = null; this._offsetTop = null; this.panel.invalidateSizeCache(); }; ListControl.prototype.onInvalidated = function () { }; ListControl.prototype.onKeyDownOverride = function (event) { return false; }; ListControl.prototype.onShowContextMenu = function () { }; ListControl.prototype.onWindowResize = function () { this.invalidateSizeCache(); this.invalidate(); }; ListControl.prototype.render = function () { this.invalidate(); }; ListControl.prototype.scrollToItem = function (item) { var visibleIndex = this.getVisibleIndexOfItem(item); if (visibleIndex >= 0) { this.panel.ensureVisible(visibleIndex); } }; ListControl.prototype.selectEnd = function () { if (this._selectedItemVisibleIndex < 0) { return; } this.setSelectedItemVisibleIndex(this._itemContainerGenerator.count - 1); }; ListControl.prototype.selectHome = function () { if (this._selectedItemVisibleIndex < 0) { return; } this.setSelectedItemVisibleIndex(0); }; ListControl.prototype.selectPreviousItem = function () { if (this._selectedItemVisibleIndex < 0) { return; } this.setSelectedItemVisibleIndex(this._selectedItemVisibleIndex - 1); }; ListControl.prototype.selectPageDown = function () { if (this._selectedItemVisibleIndex < 0) { return; } this.setSelectedItemVisibleIndex(this._selectedItemVisibleIndex + this.panel.viewportItemsCount); }; ListControl.prototype.selectPageUp = function () { if (this._selectedItemVisibleIndex < 0) { return; } this.setSelectedItemVisibleIndex(this._selectedItemVisibleIndex - this.panel.viewportItemsCount); }; ListControl.prototype.selectNextItem = function () { if (this._selectedItemVisibleIndex < 0) { return; } this.setSelectedItemVisibleIndex(this._selectedItemVisibleIndex + 1); }; ListControl.prototype.unbind = function (itemContainer) { itemContainer.clicked = null; itemContainer.rootElement.removeAttribute("aria-label"); this.cleanupContainerOverride(itemContainer); }; ListControl.prototype.updateContainerOverride = function (container, itemIndex) { var data = container.item; var template = container.template; this.updateTemplateData(template, data); }; ListControl.prototype.updateTemplateData = function (template, data) { template.updateData(data); }; ListControl.prototype.getVisibleIndexOfItem = function (item) { if (this.dataSource) { return this.dataSource.indexOfItem(item.id); } else { return -1; } }; ListControl.prototype.onKeyDown = function (event) { var handled = this.onKeyDownOverride(event); if (!handled) { handled = true; switch (event.keyCode) { case 38 /* ArrowUp */: if (this._selectedItemVisibleIndex < 0) { this.setSelectedItemVisibleIndex(0); } else { this.selectPreviousItem(); } break; case 40 /* ArrowDown */: if (this._selectedItemVisibleIndex < 0) { this.setSelectedItemVisibleIndex(0); } else { this.selectNextItem(); } break; case 33 /* PageUp */: this.selectPageUp(); break; case 34 /* PageDown */: this.selectPageDown(); break; case 36 /* Home */: this.selectHome(); break; case 35 /* End */: this.selectEnd(); break; case 93 /* ContextMenu */: this.onShowContextMenu(); break; case 121 /* F10 */: if (event.shiftKey && !event.ctrlKey && !event.altKey) { this.onShowContextMenu(); } break; default: handled = false; } } if (handled) { event.preventDefault(); event.stopPropagation(); } }; ListControl.prototype.onItemSelected = function (itemContainer, e) { var select; if (e && !e.altKey && e.ctrlKey && !e.shiftKey) { select = !itemContainer.isSelected; } else { select = true; } if (select) { this.selectedItem = itemContainer.item; itemContainer.focus(); } else { this.selectedItem = null; } }; ListControl.prototype.setItemContainerAriaLabel = function (itemContainer) { if (itemContainer) { var ariaLabel; var dataItem = itemContainer.item; if (dataItem && this.onGetItemContainerAriaLabel) { ariaLabel = this.onGetItemContainerAriaLabel(itemContainer); } if (ariaLabel) { itemContainer.rootElement.setAttribute("aria-label", ariaLabel); } else { itemContainer.rootElement.removeAttribute("aria-label"); } } }; ListControl.prototype.setSelectedItemVisibleIndex = function (newVisibleIndex) { var itemContainer = null; var totalVisibleCount = this._itemContainerGenerator.count; if (newVisibleIndex < 0) { newVisibleIndex = 0; } if (newVisibleIndex >= totalVisibleCount) { newVisibleIndex = totalVisibleCount - 1; } if (this._selectedItemVisibleIndex >= 0 && this._selectedItemVisibleIndex === newVisibleIndex) { itemContainer = this.getSelectedItemContainer(); } else { if (newVisibleIndex >= 0 && newVisibleIndex < totalVisibleCount) { this._itemContainerGenerator.startAt(newVisibleIndex); itemContainer = this._itemContainerGenerator.getNext(); this._itemContainerGenerator.stop(); if (itemContainer) { var item = itemContainer.item; if (!itemContainer.rootElement.parentElement) { this._itemContainerGenerator.recycle(newVisibleIndex); } this.selectedItem = item; } } } return itemContainer; }; return ListControl; })(Common.Controls.Legacy.Control); Legacy.ListControl = ListControl; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // TreeListControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var TreeItemDataTemplate = (function (_super) { __extends(TreeItemDataTemplate, _super); function TreeItemDataTemplate(templateId, templateRepository) { _super.call(this, templateId, templateRepository); this.indentationInPixels = TreeItemDataTemplate.INDENTATION_IN_PIXELS_DEFAULT; this._expander = this.findElement("expander"); F12.Tools.Utility.Assert.isTrue(!!this._expander, "Expecting an expander element"); this._expander.addEventListener("click", this.onExpansionClicked.bind(this)); this.rootElement.addEventListener("dblclick", this.onRootElementDblClicked.bind(this)); } TreeItemDataTemplate.prototype.collapse = function () { if (this.item && this.item.hasChildren) { if (!this._expander.classList.contains(TreeItemDataTemplate.COLLAPSED_CSS_CLASS)) { this.onExpansionClicked(null); return true; } } return false; }; TreeItemDataTemplate.prototype.expand = function () { if (this.item && this.item.hasChildren) { if (!this._expander.classList.contains(TreeItemDataTemplate.EXPANDED_CSS_CLASS)) { this.onExpansionClicked(null); return true; } } return false; }; TreeItemDataTemplate.prototype.updateUiOverride = function (dataItem) { _super.prototype.updateUiOverride.call(this, dataItem); if (dataItem) { this._expander.style.marginLeft = (dataItem.level * this.indentationInPixels) + "px"; this.setExpanderCss(dataItem); } }; TreeItemDataTemplate.prototype.onExpansionClicked = function (e) { if (e) { e.stopImmediatePropagation(); } if (this.expansionToggledCallback) { this.expansionToggledCallback(); } }; TreeItemDataTemplate.prototype.onRootElementDblClicked = function (e) { if (e) { if (e.srcElement && e.srcElement === this._expander) { e.stopImmediatePropagation(); return; } } this.onExpansionClicked(e); }; TreeItemDataTemplate.prototype.setExpanderCss = function (dataItem) { if (dataItem.hasChildren) { this._expander.classList.remove(TreeItemDataTemplate.NO_EXPANDER_CSS_CLASS); if (!dataItem.isExpanded) { this._expander.classList.remove(TreeItemDataTemplate.EXPANDED_CSS_CLASS); this._expander.classList.add(TreeItemDataTemplate.COLLAPSED_CSS_CLASS); } else { this._expander.classList.remove(TreeItemDataTemplate.COLLAPSED_CSS_CLASS); this._expander.classList.add(TreeItemDataTemplate.EXPANDED_CSS_CLASS); } } else { this._expander.classList.remove(TreeItemDataTemplate.EXPANDED_CSS_CLASS); this._expander.classList.remove(TreeItemDataTemplate.COLLAPSED_CSS_CLASS); this._expander.classList.add(TreeItemDataTemplate.NO_EXPANDER_CSS_CLASS); } }; TreeItemDataTemplate.INDENTATION_IN_PIXELS_DEFAULT = 13; TreeItemDataTemplate.COLLAPSED_CSS_CLASS = "BPT-itemCollapsed"; TreeItemDataTemplate.EXPANDED_CSS_CLASS = "BPT-itemExpanded"; TreeItemDataTemplate.NO_EXPANDER_CSS_CLASS = "BPT-noExpander"; return TreeItemDataTemplate; })(Legacy.ListItemDataTemplate); Legacy.TreeItemDataTemplate = TreeItemDataTemplate; var TreeListControl = (function (_super) { __extends(TreeListControl, _super); function TreeListControl(rootElement) { _super.call(this, rootElement); this.dataItemTemplateType = Common.Controls.Legacy.TreeItemDataTemplate; this._onAriaExpandedModifiedHandler = this.onAriaExpandedModified.bind(this); } TreeListControl.prototype.updateContainerOverride = function (itemContainer, itemIndex) { _super.prototype.updateContainerOverride.call(this, itemContainer, itemIndex); var dataItem = itemContainer.item; var template = itemContainer.template; if (dataItem) { itemContainer.rootElement.removeEventListener("DOMAttrModified", this._onAriaExpandedModifiedHandler); if (dataItem.hasChildren) { itemContainer.rootElement.setAttribute("aria-expanded", dataItem.isExpanded ? "true" : "false"); template.expansionToggledCallback = this.onExpansionToggled.bind(this, itemContainer, itemIndex); itemContainer.rootElement.addEventListener("DOMAttrModified", this._onAriaExpandedModifiedHandler); } else { itemContainer.rootElement.removeAttribute("aria-expanded"); } } }; TreeListControl.prototype.onKeyDownOverride = function (event) { var handled = false; var seletedItemTemplate; var selectedItem; switch (event.keyCode) { case 39 /* ArrowRight */: var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer) { seletedItemTemplate = selectedItemContainer.template; selectedItem = selectedItemContainer.item; if (!seletedItemTemplate.expand() && selectedItem.hasChildren) { this.selectNextItem(); handled = true; } } break; case 37 /* ArrowLeft */: var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer) { seletedItemTemplate = selectedItemContainer.template; selectedItem = selectedItemContainer.item; if (!seletedItemTemplate.collapse() && selectedItem.level > 0) { var parentIndex = this.dataSource.indexOfParent(selectedItem.id); if (parentIndex >= 0) { this.selectedIndex = parentIndex; handled = true; } } } break; case 107 /* Plus */: var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer) { selectedItemContainer.template.expand(); handled = true; } break; case 109 /* Minus */: var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer) { selectedItemContainer.template.collapse(); handled = true; } break; } if (!handled) { handled = _super.prototype.onKeyDownOverride.call(this, event); } return handled; }; TreeListControl.prototype.cleanupContainerOverride = function (itemContainer) { var template = itemContainer.template; if (template) { template.expansionToggledCallback = null; } itemContainer.rootElement.removeEventListener("DOMAttrModified", this._onAriaExpandedModifiedHandler); }; TreeListControl.prototype.onAriaExpandedModified = function (event) { if (event.attrName === "aria-expanded") { var element = event.target; var itemId = parseInt(element.getAttribute("data-id")); var itemContainer = this.itemContainerGenerator.getItemContainerFromItemId(itemId); if (itemContainer) { var itemTemplate = itemContainer.template; if (event.newValue === "true") { itemTemplate.expand(); } else { itemTemplate.collapse(); } } } }; TreeListControl.prototype.onExpansionToggled = function (itemContainer, itemIndex) { var dataItem = itemContainer.item; if (dataItem.isExpanded) { this.dataSource.collapseBranch(itemIndex); } else { this.dataSource.expandBranch(itemIndex); } this.selectedItem = dataItem; this.invalidate(); var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer) { selectedItemContainer.focus(); } }; return TreeListControl; })(Legacy.ListControl); Legacy.TreeListControl = TreeListControl; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // messageThrottle.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { "use strict"; var MessageThrottle = (function () { function MessageThrottle() { this._packetCount = 0; this._data = ""; } MessageThrottle.splitMessage = function (data) { var length = data.length; var count = Math.max(1, Math.ceil(length / MessageThrottle.MAX_MESSAGE_LENGTH)); var messages = []; for (var i = 0; i < count; i++) { var start = i * MessageThrottle.MAX_MESSAGE_LENGTH; var end = start + Math.min(MessageThrottle.MAX_MESSAGE_LENGTH, length - start); var part = data.slice(start, end); var msg = { n: count, data: part }; messages.push(JSON.stringify(msg)); } return messages; }; MessageThrottle.prototype.combineMessages = function (message) { var packet = JSON.parse(message.data); if (packet.n >= 1) { this._data += packet.data || ""; this._packetCount++; if (this._packetCount === packet.n) { var data = this._data; this._packetCount = 0; this._data = ""; message.data = data; message.handled = false; } else { message.handled = true; } } else { message.handled = true; } }; MessageThrottle.MAX_MESSAGE_LENGTH = 1024 * 32; return MessageThrottle; })(); Common.MessageThrottle = MessageThrottle; var PortThrottler = (function (_super) { __extends(PortThrottler, _super); function PortThrottler(port) { _super.call(this); this._messageHandlers = []; this._port = port; } Object.defineProperty(PortThrottler.prototype, "name", { get: function () { return this._port.name; }, enumerable: true, configurable: true }); PortThrottler.prototype.initialize = function () { this._port.addEventListener("message", this.onmessage.bind(this)); }; PortThrottler.prototype.postMessage = function (data) { var packets = MessageThrottle.splitMessage(data); var x, n; for (x = 0, n = packets.length; x < n; x++) { var p = packets[x]; this._port.postMessage(p); } return true; }; PortThrottler.prototype.addEventListener = function (type, listener) { if (type !== "message") { throw new Error("Invalid event type"); } this._messageHandlers.push(listener); }; PortThrottler.prototype.removeEventListener = function (type, listener) { if (type !== "message") { throw new Error("Invalid event type"); } while (true) { var i = this._messageHandlers.indexOf(listener); if (i === -1) { break; } this._messageHandlers.splice(i, 1); } }; PortThrottler.prototype.onmessage = function (message) { this.combineMessages(message); if (!message.handled) { var x, n; for (x = 0, n = this._messageHandlers.length; x < n; x++) { var h = this._messageHandlers[x]; h(message); } } }; return PortThrottler; })(MessageThrottle); Common.PortThrottler = PortThrottler; })(Common || (Common = {})); // // Copyright (C) Microsoft. All rights reserved. // // // assert.ts var F12; (function (F12) { (function (Tools) { (function (Utility) { "use strict"; var Assert = (function () { function Assert() { } Assert.isTrue = function (condition, message) { if (!condition) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly false."; Assert.fail(message); } }; Assert.isFalse = function (condition, message) { if (condition) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly true."; Assert.fail(message); } }; Assert.isNull = function (value, message) { if (value !== null) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not null."; message += " '" + value + "'"; Assert.fail(message); } }; Assert.isUndefined = function (value, message) { if (undefined !== void 0) { message = "Internal error. Unexpectedly undefined has been redefined."; message += " '" + undefined + "'"; Assert.fail(message); } if (value !== undefined) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not undefined."; message += " '" + value + "'"; Assert.fail(message); } }; Assert.hasValue = function (value, message) { if (undefined !== void 0) { message = "Internal error. Unexpectedly undefined has been redefined."; message += " '" + undefined + "'"; Assert.fail(message); } if (value === null || value === undefined) { message = message ? "Internal error. " + message : ("Internal error. Unexpectedly " + (value === null ? "null" : "undefined") + "."); Assert.fail(message); } }; Assert.areEqual = function (value1, value2, message) { if (value1 !== value2) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not equal."; message += " '" + value1 + "' !== '" + value2 + "'."; Assert.fail(message); } }; Assert.areNotEqual = function (value1, value2, message) { if (value1 === value2) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly equal."; message += " '" + value1 + "' === '" + value2 + "'."; Assert.fail(message); } }; Assert.fail = function (message) { var error = new Error((message || "Assert failed.") + "\n"); try { throw error; } catch (ex) { if (Common && Common.ErrorHandling) { Common.ErrorHandling.reportErrorGivenStack(ex); } throw ex; } }; Assert.failDebugOnly = function (message) { if (isDebugBuild) { Assert.fail(message); } }; return Assert; })(); Utility.Assert = Assert; })(Tools.Utility || (Tools.Utility = {})); var Utility = Tools.Utility; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // channel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { "use strict"; var Channel = (function () { function Channel(traceWriter) { this._uid = 0; this._handlers = []; this._processors = []; this._callbacks = {}; this._pendingMessages = []; this._pendingTimeout = null; this._traceWriter = traceWriter; } Channel.prototype.post = function (engine, message) { var messages = [message]; var i, n; for (i = 0, n = this._processors.length; i < n; i++) { var p = this._processors[i]; var generated = []; var j, o; for (j = 0, o = messages.length; j < o; j++) { var m = messages[j]; var result = p.processor(m); generated = generated.concat(result); } messages = generated; } for (i = 0, n = messages.length; i < n; i++) { var m = messages[i]; this.runSendMessage(engine.engineId, engine.portName, m); } }; Channel.prototype.loadScript = function (engineId, fileName) { throw new Error("Not implemented"); }; Channel.prototype.runSendMessage = function (engineId, portName, message) { throw new Error("Not implemented"); }; Channel.prototype.call = function (engine, command, args, callback, preMessageCallback) { var _this = this; var uidString = this.getUid(); if (callback) { this._callbacks[uidString] = { synced: true, callback: callback || null }; } var callbackUids = []; var newArgs = []; if (args) { for (var i = 0; i < args.length; i++) { if (typeof (args[i]) === "function") { var callbackuid = this.getUid(); callbackUids.push(callbackuid); this._callbacks[callbackuid] = { synced: false, callback: args[i] }; newArgs[i] = { uid: callbackuid, type: "callback" }; } else { newArgs[i] = args[i]; } } } var jsonObj = { uid: uidString, command: command, args: newArgs }; var sendMessageToRemote = function (engine, message, preMessageCallback) { if (preMessageCallback) { preMessageCallback(message, args[0]); } try { _this.post(engine, message); } catch (e) { return; } }; if (!this._pendingMessages[engine.engineId]) { this._pendingMessages[engine.engineId] = {}; } var engineMessages = this._pendingMessages[engine.engineId]; if (!engineMessages[engine.portName]) { engineMessages[engine.portName] = []; } engineMessages[engine.portName].push(jsonObj); if (!this._pendingTimeout) { this._pendingTimeout = setTimeout(function () { for (var engineId in _this._pendingMessages) { var portName; var engineMessages = _this._pendingMessages[engineId]; for (portName in engineMessages) { var messages = engineMessages[portName]; if (messages.length > 0) { var json = JSON.stringify(messages); engineMessages[portName] = []; _this._pendingTimeout = null; sendMessageToRemote({ engineId: +engineId, portName: portName }, json, preMessageCallback); } } } }, 0); } return callbackUids; }; Channel.prototype.onmessage = function (data) { this._traceWriter.raiseEvent(405 /* Console_Message_Start */); window.msWriteProfilerMark("ConsoleWindow:BeginOnMessage"); var m = { engine: { engineId: data.engineId, portName: data.portName }, data: data.data, handled: false }; try { var i, n; for (i = 0, n = this._handlers.length; i < n; i++) { var h = this._handlers[i]; h.handler(m); if (m.handled) { return; } } this.fireCallbacks(m); } finally { window.msWriteProfilerMark("ConsoleWindow:EndOnMessage"); this._traceWriter.raiseEvent(406 /* Console_Message_Stop */); } }; Channel.prototype.getUid = function () { return "uid" + (this._uid++).toString(36); }; Channel.prototype.addCallback = function (uid, callback) { this._callbacks[uid] = callback; }; Channel.prototype.addMessageProcessor = function (stepName, processor) { this._processors.push({ stepName: stepName, processor: processor }); }; Channel.prototype.addMessageHandler = function (stepName, handler) { this._handlers.push({ stepName: stepName, handler: handler }); }; Channel.prototype.clearCallbacks = function () { this._callbacks = {}; }; Channel.prototype.fireCallbacks = function (message) { var msgs = JSON.parse(message.data); for (var i = 0; i < msgs.length; i++) { var obj = msgs[i]; if (obj && obj.args) { obj.args.push(message.engine); } if (this._callbacks[obj.uid]) { this._callbacks[obj.uid].callback.apply(this, obj.args); if (this._callbacks[obj.uid] && this._callbacks[obj.uid].synced) { delete this._callbacks[obj.uid]; } } else if (obj.uid === "scriptError") { Common.ErrorHandling.reportErrorDetails(obj.args[0]); } } return message; }; return Channel; })(); Common.Channel = Channel; var VSChannel = (function (_super) { __extends(VSChannel, _super); function VSChannel(proxy, traceWriter) { _super.call(this, traceWriter); this._proxy = proxy; this._proxy.addEventListener("message", this.onmessage.bind(this)); } VSChannel.prototype.runSendMessage = function (engineId, portName, message) { return this._proxy._post("sendMessage", engineId, portName, message); }; VSChannel.prototype.loadScript = function (engineId, fileName) { this._proxy._post("loadScript", engineId, fileName); }; return VSChannel; })(Channel); Common.VSChannel = VSChannel; var IEChannel = (function (_super) { __extends(IEChannel, _super); function IEChannel(external, traceWriter) { _super.call(this, traceWriter); this._external = external; this._external.addEventListener("connect", this.onConnect.bind(this)); } IEChannel.prototype.runSendMessage = function (engineId, portName, message) { this._port.postMessage(message); }; IEChannel.prototype.loadScript = function (engineId, fileName) { this._external.loadScriptInProc(fileName); }; IEChannel.prototype.onConnect = function (port) { this._port = port; this._port.addEventListener("message", this.onmessage.bind(this)); }; return IEChannel; })(Channel); Common.IEChannel = IEChannel; })(Common || (Common = {})); // NavigationUtilities.ts var Common; (function (Common) { "use strict"; var NavigationUtilities = (function () { function NavigationUtilities() { } NavigationUtilities.registerFocusHandlers = function (pluginId) { if (Plugin.F12) { NavigationUtilities.LastActiveElement = document.head.parentElement; NavigationUtilities.LastActiveElement.setActive(); Plugin.F12.Communications.registerMethodHandler("showfocus", function (show) { return NavigationUtilities.showFocus(show, pluginId); }); } }; NavigationUtilities.registerNavigationFrames = function (navigationFrames) { NavigationUtilities.NavigationFrames = navigationFrames; if (Plugin.F12 && !NavigationUtilities.Registered) { Plugin.F12.addEventListener("navigatesubframes", function (e) { return NavigationUtilities.navigateFrames(e.isForward, e.useActiveElement); }); NavigationUtilities.Registered = true; } }; NavigationUtilities.enableNavigation = function () { NavigationUtilities.Enabled = true; }; NavigationUtilities.disableNavigation = function () { NavigationUtilities.Enabled = false; }; NavigationUtilities.makeNavigationFrameFromTarget = function (container, navigationTarget) { return NavigationUtilities.makeNavigationFrameFromCallback(container, function () { return navigationTarget; }); }; NavigationUtilities.makeNavigationFrameFromCallback = function (container, getTargetCallback) { return { container: container, getNavigationTarget: getTargetCallback }; }; NavigationUtilities.navigateFrames = function (forward, useActiveElement) { var containers = []; var targets = []; var targetIndex = -1; var step = (forward ? 1 : -1); if (!NavigationUtilities.Enabled) { return false; } if (!NavigationUtilities.navigateFrames || NavigationUtilities.navigateFrames.length === 0) { return true; } for (var frameIndex = 0; frameIndex < NavigationUtilities.NavigationFrames.length; frameIndex++) { var frame = NavigationUtilities.NavigationFrames[frameIndex]; containers.push(frame.container); targets.push(frame.getNavigationTarget()); } if (useActiveElement) { var activeElement = document.activeElement; var closestContainer; for (var containerIndex = 0; containerIndex < containers.length; containerIndex++) { var currentContainer = containers[containerIndex]; if (currentContainer.contains(activeElement)) { if (closestContainer) { if (closestContainer.contains(currentContainer)) { closestContainer = currentContainer; } } else { closestContainer = currentContainer; } } } if (closestContainer) { targetIndex = containers.indexOf(closestContainer) + step; } } else { targetIndex = forward ? 0 : NavigationUtilities.NavigationFrames.length - 1; } while (targetIndex >= 0 && targetIndex < targets.length) { var target = targets[targetIndex]; if (target) { target.focus(); return false; } targetIndex += step; } return true; }; NavigationUtilities.showFocus = function (show, pluginId) { var rootElement = document.head.parentElement; var activeElement = document.activeElement; var lastActiveElement = NavigationUtilities.LastActiveElement; if (show) { if (activeElement && activeElement !== rootElement) { activeElement.focus(); } else if (NavigationUtilities.shouldFocus(lastActiveElement) && lastActiveElement !== rootElement) { lastActiveElement.focus(); } else { var forward = true; if (pluginId === Plugin.F12.PluginId.Console) { forward = false; } NavigationUtilities.navigateFrames(forward, false); } } else { if (activeElement && activeElement !== rootElement) { NavigationUtilities.LastActiveElement = activeElement; } rootElement.setActive(); } return false; }; NavigationUtilities.shouldFocus = function (element) { return (element && document.body.contains(element) && element.style.display !== "none" && element.style.visibility !== "hidden" && !element.disabled && element.tabIndex >= 0); }; NavigationUtilities.Enabled = true; NavigationUtilities.Registered = false; return NavigationUtilities; })(); Common.NavigationUtilities = NavigationUtilities; })(Common || (Common = {})); // KeyCodes.ts var Common; (function (Common) { "use strict"; var Keys = (function () { function Keys() { } Keys.C = "c"; Keys.DEL = "Del"; Keys.DOWN = "Down"; Keys.END = "End"; Keys.ENTER = "Enter"; Keys.F10 = "F10"; Keys.HOME = "Home"; Keys.LEFT = "Left"; Keys.RIGHT = "Right"; Keys.SPACEBAR = "Spacebar"; Keys.UP = "Up"; return Keys; })(); Common.Keys = Keys; (function (KeyCodes) { KeyCodes[KeyCodes["Backspace"] = 8] = "Backspace"; KeyCodes[KeyCodes["Tab"] = 9] = "Tab"; KeyCodes[KeyCodes["Enter"] = 13] = "Enter"; KeyCodes[KeyCodes["Shift"] = 16] = "Shift"; KeyCodes[KeyCodes["Control"] = 17] = "Control"; KeyCodes[KeyCodes["Alt"] = 18] = "Alt"; KeyCodes[KeyCodes["CapsLock"] = 20] = "CapsLock"; KeyCodes[KeyCodes["Escape"] = 27] = "Escape"; KeyCodes[KeyCodes["Space"] = 32] = "Space"; KeyCodes[KeyCodes["PageUp"] = 33] = "PageUp"; KeyCodes[KeyCodes["PageDown"] = 34] = "PageDown"; KeyCodes[KeyCodes["End"] = 35] = "End"; KeyCodes[KeyCodes["Home"] = 36] = "Home"; KeyCodes[KeyCodes["ArrowLeft"] = 37] = "ArrowLeft"; KeyCodes[KeyCodes["ArrowFirst"] = 37] = "ArrowFirst"; KeyCodes[KeyCodes["ArrowUp"] = 38] = "ArrowUp"; KeyCodes[KeyCodes["ArrowRight"] = 39] = "ArrowRight"; KeyCodes[KeyCodes["ArrowDown"] = 40] = "ArrowDown"; KeyCodes[KeyCodes["ArrowLast"] = 40] = "ArrowLast"; KeyCodes[KeyCodes["Insert"] = 45] = "Insert"; KeyCodes[KeyCodes["Delete"] = 46] = "Delete"; KeyCodes[KeyCodes["A"] = 65] = "A"; KeyCodes[KeyCodes["B"] = 66] = "B"; KeyCodes[KeyCodes["C"] = 67] = "C"; KeyCodes[KeyCodes["D"] = 68] = "D"; KeyCodes[KeyCodes["E"] = 69] = "E"; KeyCodes[KeyCodes["F"] = 70] = "F"; KeyCodes[KeyCodes["G"] = 71] = "G"; KeyCodes[KeyCodes["H"] = 72] = "H"; KeyCodes[KeyCodes["I"] = 73] = "I"; KeyCodes[KeyCodes["J"] = 74] = "J"; KeyCodes[KeyCodes["K"] = 75] = "K"; KeyCodes[KeyCodes["L"] = 76] = "L"; KeyCodes[KeyCodes["M"] = 77] = "M"; KeyCodes[KeyCodes["N"] = 78] = "N"; KeyCodes[KeyCodes["O"] = 79] = "O"; KeyCodes[KeyCodes["P"] = 80] = "P"; KeyCodes[KeyCodes["Q"] = 81] = "Q"; KeyCodes[KeyCodes["R"] = 82] = "R"; KeyCodes[KeyCodes["S"] = 83] = "S"; KeyCodes[KeyCodes["T"] = 84] = "T"; KeyCodes[KeyCodes["U"] = 85] = "U"; KeyCodes[KeyCodes["V"] = 86] = "V"; KeyCodes[KeyCodes["W"] = 87] = "W"; KeyCodes[KeyCodes["X"] = 88] = "X"; KeyCodes[KeyCodes["Y"] = 89] = "Y"; KeyCodes[KeyCodes["Z"] = 90] = "Z"; KeyCodes[KeyCodes["ContextMenu"] = 93] = "ContextMenu"; KeyCodes[KeyCodes["Multiply"] = 106] = "Multiply"; KeyCodes[KeyCodes["Plus"] = 107] = "Plus"; KeyCodes[KeyCodes["Minus"] = 109] = "Minus"; KeyCodes[KeyCodes["F1"] = 112] = "F1"; KeyCodes[KeyCodes["F2"] = 113] = "F2"; KeyCodes[KeyCodes["F3"] = 114] = "F3"; KeyCodes[KeyCodes["F4"] = 115] = "F4"; KeyCodes[KeyCodes["F5"] = 116] = "F5"; KeyCodes[KeyCodes["F6"] = 117] = "F6"; KeyCodes[KeyCodes["F7"] = 118] = "F7"; KeyCodes[KeyCodes["F8"] = 119] = "F8"; KeyCodes[KeyCodes["F9"] = 120] = "F9"; KeyCodes[KeyCodes["F10"] = 121] = "F10"; KeyCodes[KeyCodes["F11"] = 122] = "F11"; KeyCodes[KeyCodes["F12"] = 123] = "F12"; KeyCodes[KeyCodes["Comma"] = 188] = "Comma"; KeyCodes[KeyCodes["Period"] = 190] = "Period"; })(Common.KeyCodes || (Common.KeyCodes = {})); var KeyCodes = Common.KeyCodes; (function (MouseButtons) { MouseButtons[MouseButtons["LeftButton"] = 0] = "LeftButton"; MouseButtons[MouseButtons["MiddleButton"] = 1] = "MiddleButton"; MouseButtons[MouseButtons["RightButton"] = 2] = "RightButton"; })(Common.MouseButtons || (Common.MouseButtons = {})); var MouseButtons = Common.MouseButtons; (function (KeyFlags) { KeyFlags[KeyFlags["None"] = 0x0] = "None"; KeyFlags[KeyFlags["Shift"] = 0x1] = "Shift"; KeyFlags[KeyFlags["Ctrl"] = 0x2] = "Ctrl"; KeyFlags[KeyFlags["Alt"] = 0x4] = "Alt"; })(Common.KeyFlags || (Common.KeyFlags = {})); var KeyFlags = Common.KeyFlags; function blockBrowserAccelerators() { document.addEventListener("keydown", function (e) { return preventIEKeys(e); }); document.addEventListener("contextmenu", function (e) { e.preventDefault(); e.stopPropagation(); return false; }); window.addEventListener("mousewheel", function (e) { if (e.ctrlKey) { e.preventDefault(); e.stopPropagation(); return false; } }); } Common.blockBrowserAccelerators = blockBrowserAccelerators; function HasAnyOfAltCtrlShiftKeyFlags(e) { return e.shiftKey || e.ctrlKey || e.altKey; } Common.HasAnyOfAltCtrlShiftKeyFlags = HasAnyOfAltCtrlShiftKeyFlags; function HasOnlyCtrlKeyFlags(e) { return e.ctrlKey && !e.shiftKey && !e.altKey; } Common.HasOnlyCtrlKeyFlags = HasOnlyCtrlKeyFlags; function preventIEKeys(e) { if (e.keyCode === 116 /* F5 */ || e.keyCode === 117 /* F6 */ || (e.keyCode === 121 /* F10 */ && e.shiftKey) || (e.keyCode === 70 /* F */ && e.ctrlKey)) { e.preventDefault(); e.stopPropagation(); return false; } return true; } Common.preventIEKeys = preventIEKeys; })(Common || (Common = {})); // ButtonHelpers.ts var Common; (function (Common) { "use strict"; var ButtonHelpers = (function () { function ButtonHelpers() { } ButtonHelpers.changeButtonStatus = function (buttonDiv, enabled, pressed) { var wasEnabled = ButtonHelpers.isEnabled(buttonDiv); if (enabled && !wasEnabled) { buttonDiv.classList.remove("toolbarButtonStateDisabled"); buttonDiv.setAttribute("aria-disabled", "false"); } else if (!enabled && wasEnabled) { buttonDiv.classList.add("toolbarButtonStateDisabled"); buttonDiv.setAttribute("aria-disabled", "true"); } if (typeof pressed === "boolean") { ButtonHelpers.IsChangingAriaPressed = true; if (pressed) { buttonDiv.setAttribute("aria-pressed", "true"); buttonDiv.classList.add("toolbarButtonStateActive"); } else { buttonDiv.setAttribute("aria-pressed", "false"); buttonDiv.classList.remove("toolbarButtonStateActive"); } ButtonHelpers.IsChangingAriaPressed = false; } }; ButtonHelpers.isEnabled = function (buttonDiv) { return !buttonDiv.classList.contains("toolbarButtonStateDisabled"); }; ButtonHelpers.isValidEvent = function (event) { return (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) && ButtonHelpers.isEnabled(event.currentTarget); }; ButtonHelpers.setButtonTooltip = function (buttonDiv, tooltipResourceName, lookupResourceName) { if (typeof lookupResourceName === "undefined") { lookupResourceName = true; } var tooltip = (lookupResourceName ? Plugin.Resources.getString(tooltipResourceName) : tooltipResourceName); buttonDiv.setAttribute("data-plugin-vs-tooltip", tooltip); buttonDiv.setAttribute("aria-label", tooltip); }; ButtonHelpers.setupButton = function (buttonDiv, tooltipResourceName, clickHandler, isEnabled, lookupResourceName) { if (typeof isEnabled === "undefined") { isEnabled = true; } if (typeof lookupResourceName === "undefined") { lookupResourceName = true; } if (typeof tooltipResourceName === "string") { ButtonHelpers.setButtonTooltip(buttonDiv, tooltipResourceName, lookupResourceName); buttonDiv.setAttribute("role", "button"); } if (clickHandler) { buttonDiv.addEventListener("click", function (event) { return ButtonHelpers.onButtonPress(event, clickHandler); }); buttonDiv.addEventListener("keydown", function (event) { return ButtonHelpers.onButtonPress(event, clickHandler); }); buttonDiv.addEventListener("DOMAttrModified", function (event) { if (!ButtonHelpers.IsChangingAriaPressed && ButtonHelpers.isEnabled(buttonDiv) && event.attrName === "aria-pressed" && event.attrChange === event.MODIFICATION) { clickHandler(event); } }); } buttonDiv.addEventListener("mousedown", ButtonHelpers.onButtonMouseDown); buttonDiv.addEventListener("mouseenter", ButtonHelpers.onButtonMouseEnter); buttonDiv.addEventListener("mouseleave", ButtonHelpers.onButtonMouseLeave); buttonDiv.addEventListener("mouseup", ButtonHelpers.onButtonMouseUp); if (!isEnabled) { ButtonHelpers.changeButtonStatus(buttonDiv, false); } }; ButtonHelpers.onButtonMouseDown = function (event) { var buttonDiv = event.currentTarget; if (ButtonHelpers.isEnabled(buttonDiv)) { buttonDiv.classList.add("toolbarButtonMouseDown"); } else { event.stopImmediatePropagation(); } }; ButtonHelpers.onButtonMouseEnter = function (event) { var buttonDiv = event.currentTarget; if (ButtonHelpers.isEnabled(buttonDiv)) { buttonDiv.classList.add("toolbarButtonMouseHover"); } else { event.preventDefault(); event.stopImmediatePropagation(); } }; ButtonHelpers.onButtonMouseLeave = function (event) { var buttonDiv = event.currentTarget; buttonDiv.classList.remove("toolbarButtonMouseHover"); buttonDiv.classList.remove("toolbarButtonMouseDown"); }; ButtonHelpers.onButtonMouseUp = function (event) { var buttonDiv = event.currentTarget; buttonDiv.classList.remove("toolbarButtonMouseDown"); }; ButtonHelpers.onButtonPress = function (event, clickHandler) { if (ButtonHelpers.isValidEvent(event)) { clickHandler(event); event.preventDefault(); event.stopImmediatePropagation(); } }; return ButtonHelpers; })(); Common.ButtonHelpers = ButtonHelpers; })(Common || (Common = {})); // encodingUtilities.ts var Common; (function (Common) { "use strict"; var EncodingUtilities = (function () { function EncodingUtilities() { } EncodingUtilities.escapeRegExp = function (value) { return String.prototype.replace.call(value, EncodingUtilities.ESCAPE_USER_INPUT_REGEX, "\\$&"); }; EncodingUtilities.escapeRegExpWithWildCard = function (value) { return String.prototype.replace.call(value, EncodingUtilities.ESCAPE_USER_INPUT_REGEX, function (match) { var newValue; if (match === "\*") { newValue = ".*"; } else { newValue = "\\" + match; } return newValue; }); }; EncodingUtilities.wrapInQuotes = function (stringToWrap) { return "\"" + String.prototype.replace.call(stringToWrap, /\\"/g, "\"") + "\""; }; EncodingUtilities.unescapeHtml = function (htmlString) { if ((typeof htmlString) !== "string") { if (htmlString === null || htmlString === undefined) { return ""; } htmlString = "" + htmlString; } return (String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(htmlString, />/g, ">"), /</g, "<"), /'/g, "'"), /"/g, "\""), /&/g, "&")); }; EncodingUtilities.escapeHtml = function (htmlString) { if ((typeof htmlString) !== "string") { if (htmlString === null || htmlString === undefined) { return ""; } htmlString = "" + htmlString; } return (String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(htmlString, /&/g, "&"), /"/g, """), /'/g, "'"), //g, ">")); }; EncodingUtilities.ESCAPE_USER_INPUT_REGEX = /([.+?^=!:${}()|\[\]\/\\])|(\*)/g; return EncodingUtilities; })(); Common.EncodingUtilities = EncodingUtilities; })(Common || (Common = {})); // toolwindow.ts var Common; (function (Common) { "use strict"; var ToolWindowHelpers = (function () { function ToolWindowHelpers() { } ToolWindowHelpers.initializeToolWindow = function () { document.addEventListener("mousedown", function () { $m(document.body).removeClass("showFocus"); }, true); $m(document).bind("contextmenu", function () { return false; }); $m(document).bind("keydown", function (event) { if (event.keyCode === 116 /* F5 */ || (event.keyCode === 121 /* F10 */ && event.shiftKey)) { event.preventDefault(); event.stopPropagation(); return false; } else if (event.keyCode === 9 /* Tab */) { $m(document.body).addClass("showFocus"); } }); $m(".BPT-ToolbarButton").bind("mousedown", function (event) { var element = $m(this); if (!element.hasClass("BPT-ToolbarButton-StateDisabled")) { element.addClass("BPT-ToolbarButton-MouseDown"); } else { event.stopImmediatePropagation(); } }); $m(".BPT-ToolbarButton").bind("mouseup", function () { $m(this).removeClass("BPT-ToolbarButton-MouseDown"); }); $m(".BPT-ToolbarButton").bind("mouseleave", function () { $m(this).removeClass("BPT-ToolbarButton-MouseDown BPT-ToolbarButton-MouseHover"); }); $m(".BPT-ToolbarButton").bind("mouseenter", function (event) { var element = $m(this); if (!element.hasClass("BPT-ToolbarButton-StateDisabled")) { element.addClass("BPT-ToolbarButton-MouseHover"); } else { event.preventDefault(); event.stopImmediatePropagation(); } }); $m(".BPT-ToolbarButton").bind("click keydown", function (event) { if (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) { var element = $m(this); if (!element.hasClass("BPT-ToolbarButton-StateDisabled")) { var thisElement = element.get(0); if (document.activeElement !== thisElement) { thisElement.focus(); } } else { event.preventDefault(); event.stopImmediatePropagation(); } } }); $m(".BPT-ToolbarToggleButton").bind("click keydown", function (event) { if (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) { var element = $m(this); if (!element.hasClass("BPT-ToolbarButton-StateDisabled")) { var thisElement = element.get(0); if (document.activeElement !== thisElement) { thisElement.focus(); } if (element.hasClass("BPT-ToolbarToggleButton-StateOn")) { element.removeClass("BPT-ToolbarToggleButton-StateOn"); element.attr("aria-pressed", false); } else { element.addClass("BPT-ToolbarToggleButton-StateOn"); element.attr("aria-pressed", true); } } else { event.preventDefault(); event.stopImmediatePropagation(); } } }); $m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("keydown", function (event) { if (($m(this).parent().hasClass("BPT-TabCycle-Horizontal") && (event.keyCode === 37 /* ArrowLeft */ || event.keyCode === 39 /* ArrowRight */)) || ($m(this).parent().hasClass("BPT-TabCycle-Vertical") && (event.keyCode === 38 /* ArrowUp */ || event.keyCode === 40 /* ArrowDown */))) { var currentElement = $m(this); var newElement = ((event.keyCode === 37 /* ArrowLeft */ || event.keyCode === 38 /* ArrowUp */) ? currentElement.prev(".BPT-TabCycle-Item").first() : currentElement.next(".BPT-TabCycle-Item").first()); if (newElement.length > 0) { newElement.attr("tabindex", "1"); newElement.trigger("focus"); newElement.trigger("click"); currentElement.removeAttr("tabindex"); } } }); $m(".BPT-TabCycle-Horizontal, .BPT-TabCycle-Vertical").children(".BPT-TabCycle-Item").bind("mousedown", function (event) { var oldElement = $m(this).siblings(".BPT-TabCycle-Item").matchAttr("tabindex", "1"); var newElement = $m(this); if (newElement.length > 0) { newElement.attr("tabindex", "1"); newElement.trigger("focus"); oldElement.removeAttr("tabindex"); } }); }; ToolWindowHelpers.registerErrorComponent = function (component, errorDisplayHandler) { window.errorComponent = component; window.errorDisplayHandler = errorDisplayHandler; }; ToolWindowHelpers.loadString = function (resourceId) { var params = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { params[_i] = arguments[_i + 1]; } if (params.length === 1 && Array.isArray(params[0])) { params = params[0]; } return Plugin.Resources.getString.apply(this, ["/Common/" + resourceId].concat(params)); }; ToolWindowHelpers.codeMarker = function (codeMarker) { Plugin.VS.Internal.CodeMarkers.fire(codeMarker); }; ToolWindowHelpers.scrollIntoView = function (element, scrollContainer) { if (element && element.getBoundingClientRect) { var elementRect = element.getBoundingClientRect(); var containerRect = scrollContainer.getBoundingClientRect(); var elementTopIsAboveViewport = elementRect.top < containerRect.top; var elementBottomIsBelowViewport = elementRect.bottom > containerRect.bottom; if (elementTopIsAboveViewport || elementBottomIsBelowViewport) { element.scrollIntoView(true); return true; } } return false; }; ToolWindowHelpers.getSortedObjectProperties = function (objectToSort) { var sortedPropNames = []; for (var propName in objectToSort) { sortedPropNames.push(propName); } sortedPropNames.sort(Common.ToolWindowHelpers.naturalSort); return sortedPropNames; }; ToolWindowHelpers.getSortedArrayProperties = function (arrayToSort, key, highPriorityValue) { var i; var sortedProps = []; for (i = 0; i < arrayToSort.length; i++) { sortedProps.push({ property: arrayToSort[i][key], realIndex: i }); } sortedProps.sort(function (a, b) { if (highPriorityValue) { if (a.property === highPriorityValue && b.property === highPriorityValue) { return 0; } else if (a.property === highPriorityValue) { return -1; } else if (b.property === highPriorityValue) { return 1; } } return Common.ToolWindowHelpers.naturalSort(a.property, b.property); }); var sortedList = []; for (i = 0; i < sortedProps.length; i++) { sortedList.push(sortedProps[i].realIndex); } return sortedList; }; ToolWindowHelpers.naturalSort = function (a, b) { var regexSortGroup = /(\d+)|(\D+)/g; var aGroups = String(a).toLocaleLowerCase().match(regexSortGroup); var bGroups = String(b).toLocaleLowerCase().match(regexSortGroup); if (!aGroups && bGroups) { return -1; } else if (aGroups && !bGroups) { return 1; } else if (!aGroups && !bGroups) { return 0; } while (aGroups.length > 0 && bGroups.length > 0) { var aFront = aGroups.shift(); var bFront = bGroups.shift(); var aAsDigit = parseInt(aFront, 10); var bAsDigit = parseInt(bFront, 10); if (isNaN(aAsDigit) && isNaN(bAsDigit)) { if (aFront !== bFront) { return aFront.localeCompare(bFront); } } else if (isNaN(aAsDigit)) { return 1; } else if (isNaN(bAsDigit)) { return -1; } else { if (aAsDigit !== bAsDigit) { return (aAsDigit - bAsDigit); } } } return aGroups.length - bGroups.length; }; ToolWindowHelpers.createShortenedUrlText = function (url) { if (!url) { return url; } var shortenedText = url; var javascriptPrefix = "javascript:"; if (shortenedText.toLowerCase().substr(0, javascriptPrefix.length) === javascriptPrefix) { return "javascript:"; } var indexOfHash = shortenedText.indexOf("#"); var indexOfQuestionMark = shortenedText.indexOf("?"); var index = -1; if (indexOfHash > -1 && indexOfQuestionMark > -1) { index = Math.min(indexOfHash, indexOfQuestionMark); } else if (indexOfHash > -1) { index = indexOfHash; } else if (indexOfQuestionMark > -1) { index = indexOfQuestionMark; } if (index > -1) { shortenedText = shortenedText.substring(0, index); } index = Math.max(shortenedText.lastIndexOf("/"), shortenedText.lastIndexOf("\\")); while (index !== -1 && index === (shortenedText.length - 1)) { shortenedText = shortenedText.substring(0, shortenedText.length - 1); index = Math.max(shortenedText.lastIndexOf("/"), shortenedText.lastIndexOf("\\")); } if (index > -1) { shortenedText = shortenedText.substring(index + 1); } return shortenedText; }; ToolWindowHelpers.getTruncatedFileName = function (filePath, maxLength) { if (typeof maxLength === "undefined") { maxLength = 20; } if (!filePath) { return filePath; } var fileName = Common.ToolWindowHelpers.createShortenedUrlText(filePath); if (fileName.length > maxLength) { var index = maxLength / 2 - 2; fileName = fileName.substr(0, index) + this.loadString("Ellipsis") + fileName.substr(fileName.length - index); } return fileName; }; ToolWindowHelpers.createFileLinkText = function (fileUrl, line, column, maxLength) { var linkText = fileUrl ? this.getTruncatedFileName(fileUrl, maxLength) : ""; if (line) { if (fileUrl) { linkText += " "; } linkText += "(" + line; if (column) { linkText += ", " + column; } linkText += ")"; } return linkText; }; ToolWindowHelpers.pathCombine = function (firstPart, secondPart) { var separators = /[\/\\]/; if (!secondPart) { return firstPart; } else if (this.isAbsoluteUrl(secondPart) || !firstPart) { return secondPart; } else if (secondPart.charAt(0) === "/" && this.isAbsoluteUrl(firstPart)) { return this.getRoot(firstPart) + secondPart; } else if (firstPart.charAt(firstPart.length - 1).match(separators) || secondPart.charAt(0).match(separators)) { return firstPart + secondPart; } else { var separator = ((firstPart + secondPart).lastIndexOf("\\") >= 0 ? "\\" : "/"); return firstPart + separator + secondPart; } }; ToolWindowHelpers.getRoot = function (url) { return url.substring(0, url.indexOf("/", url.indexOf("://") + 3)); }; ToolWindowHelpers.isAbsoluteUrl = function (url) { if (this.isUncPath(url) || this.pathStartsWithDriveLetter(url)) { return true; } if (!!url.match(/^file:\/{2,3}\./i)) { return false; } return !!url.match(/^[a-zA-Z][\w\+\-\.]*:/) || this.isDataURI(url); }; ToolWindowHelpers.isUncPath = function (url) { return !!url.match(/^\\\\/); }; ToolWindowHelpers.pathStartsWithDriveLetter = function (url) { return !!url.match(/^[A-Za-z]:/); }; ToolWindowHelpers.isFileURI = function (url) { return url.length > 5 && url.substr(0, 5).toLocaleLowerCase() === "file:"; }; ToolWindowHelpers.isDataURI = function (url) { return url.length > 5 && url.substr(0, 5).toLocaleLowerCase() === "data:"; }; ToolWindowHelpers.addFileProtocolIfNeeded = function (url) { if ((Common.ToolWindowHelpers.pathStartsWithDriveLetter(url) || Common.ToolWindowHelpers.isUncPath(url)) && !Common.ToolWindowHelpers.isFileURI(url)) { url = "file:///" + url; } return url; }; ToolWindowHelpers.truncateProtocolFromUrl = function (url) { return url.replace(/^[a-zAZ][\w\+\-\.]*:(\/\/)?/g, ""); }; ToolWindowHelpers.parseBase64DataUriContent = function (url) { if (!ToolWindowHelpers.isDataURI(url) || url.indexOf("base64,") === -1) { return null; } try { return window.atob(url.substr(url.indexOf("base64,") + 7)); } catch (ex) { return null; } }; ToolWindowHelpers.parseDataUriMimeType = function (url) { if (!ToolWindowHelpers.isDataURI(url) || url.indexOf(";") === -1) { return null; } return url.substring(5, url.indexOf(";")); }; ToolWindowHelpers.hasSelectedText = function () { var selectedText = window.getSelection().toString(); return !!selectedText; }; ToolWindowHelpers.getSelectedText = function () { var selectedText = window.getSelection().toString(); return selectedText; }; ToolWindowHelpers.copySelectedTextToClipboard = function () { var selectedText = window.getSelection().toString(); if (selectedText) { var compactText = selectedText.replace(/[\r\n]+/g, "\r\n"); clipboardData.setData("Text", compactText); return true; } return false; }; ToolWindowHelpers.isDarkThemeBackground = function (element) { if (element) { var backgroundColor; while ((!backgroundColor || backgroundColor === "transparent") && element && element.length > 0) { backgroundColor = element.css("background-color"); element = element.parent(); } if (backgroundColor) { var rgbParts = backgroundColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); if (rgbParts && rgbParts.length === 4) { var brightness = ((parseInt(rgbParts[1], 10) * 299) + (parseInt(rgbParts[2], 10) * 587) + (parseInt(rgbParts[3], 10) * 114)) / 1000; return (brightness < 127); } } } return false; }; ToolWindowHelpers.isContextMenuUp = function () { return Common.ToolWindowHelpers.ContextMenuIsUp; }; ToolWindowHelpers.contextMenuUp = function (flag) { Common.ToolWindowHelpers.ContextMenuIsUp = flag; }; ToolWindowHelpers.nodeInDocument = function (node) { if (node) { while (node = node.parentNode) { if (node === document) { return true; } } } return false; }; ToolWindowHelpers.isFocusGood = function () { var nowFocus = document.querySelector(":focus"); return nowFocus && nowFocus.tagName !== "BODY"; }; ToolWindowHelpers.fireCustomEvent = function (element, eventName) { var customEvent = document.createEvent("CustomEvent"); customEvent.initEvent(eventName, true, true); element.dispatchEvent(customEvent); }; ToolWindowHelpers.getExtension = function (url) { if (!url) { return ""; } url = this.createShortenedUrlText(url); var indexOfDot = url.lastIndexOf("."); var extension; if (indexOfDot < 0) { return ""; } else { return url.substr(indexOfDot).toLowerCase(); } }; ToolWindowHelpers.guessMimeTypeFromUrlExtension = function (url) { switch (this.getExtension(url)) { case ".html": case ".htm": return "text/html"; case ".xml": case ".svg": return "text/xml"; case ".ts": return "text/typescript"; case ".js": return "text/javascript"; case ".css": return "text/css"; case ".coffee": return "text/coffeescript"; case ".cs": return "text/x-csharp"; default: return "text/plain"; } }; ToolWindowHelpers.ContextMenuIsUp = false; ToolWindowHelpers.CodeMarkers = { perfBrowserTools_DiagnosticsToolWindowsConsoleReady: 23609, perfBrowserTools_DiagnosticsToolWindowsDomExplorerReady: 23610, perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectBegin: 23611, perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectEnd: 23612, perfBrowserTools_DiagnosticsToolWindowsExpandConsoleObjectInteractive: 23613, perfBrowserTools_DiagnosticsToolWindowsConsoleEvalBegin: 23614, perfBrowserTools_DiagnosticsToolWindowsConsoleEvalEnd: 23615, perfBrowserTools_DiagnosticsToolWindowsDataTreeToggleBegin: 23616, perfBrowserTools_DiagnosticsToolWindowsDataTreeToggleEnd: 23617, perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleBegin: 23618, perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleEnd: 23619, perfBrowserTools_DiagnosticsToolWindowsDomExplorerRefreshBegin: 23620, perfBrowserTools_DiagnosticsToolWindowsDomExplorerRefreshEnd: 23621, perfBrowserTools_DiagnosticsToolWindowsDomExplorerAttributeChanged: 23622, perfBrowserTools_DiagnosticsToolWindowsDomExplorerTabChanged: 23623, perfBrowserTools_DiagnosticsToolWindowsNetworkExplorerReady: 23624 }; ToolWindowHelpers.AreCodeMarkersEnabled = false; return ToolWindowHelpers; })(); Common.ToolWindowHelpers = ToolWindowHelpers; })(Common || (Common = {})); // Proxy.ts "use strict"; var Proxy = (function () { function Proxy(diagnosticsBridge) { this._uid = 0; this._callbacks = {}; this._pendingTimeout = null; this.remotePort = null; this._diagnosticsBridge = diagnosticsBridge; } Proxy.prototype.callRemote = function (command, args, callback, preMessageCallback) { var _this = this; var uidString = this.getUid(); if (callback) { this._callbacks[uidString] = { synced: true, callback: callback || null }; } var callbackUids = []; var newArgs = []; if (args) { for (var i = 0; i < args.length; i++) { if (typeof (args[i]) === "function") { var callbackuid = this.getUid(); callbackUids.push(callbackuid); this._callbacks[callbackuid] = { synced: false, callback: args[i] }; newArgs[i] = { uid: callbackuid, type: "callback" }; } else { newArgs[i] = args[i]; } } } var jsonObj = { uid: uidString, command: command, args: newArgs }; var sendMessageToRemote = function (message, preMessageCallback) { if (_this.remotePort) { if (preMessageCallback) { preMessageCallback(message, args[0]); } try { _this.remotePort.postMessage(message); } catch (e) { return; } } }; this._pendingMessages.push(jsonObj); if (!this._pendingTimeout) { this._pendingTimeout = setTimeout(function () { var message = JSON.stringify(_this._pendingMessages); _this._pendingMessages = []; _this._pendingTimeout = null; sendMessageToRemote(message, preMessageCallback); }, 0); } return callbackUids; }; Proxy.prototype.clearCallBacks = function (uids) { var _this = this; if (uids) { uids.forEach(function (uid) { delete _this._callbacks[uid]; }); } else { this._callbacks = {}; } }; Proxy.prototype.fireCallbacks = function (data) { var msgs = JSON.parse(data); for (var i = 0; i < msgs.length; i++) { var obj = msgs[i]; if (this._callbacks[obj.uid]) { this._callbacks[obj.uid].callback.apply(this, obj.args); if (this._callbacks[obj.uid] && this._callbacks[obj.uid].synced) { delete this._callbacks[obj.uid]; } } else if (obj.uid === "scriptError") { window.reportError(obj.args[0].message, obj.args[0].file, obj.args[0].line, obj.args[0].additionalInfo); } } }; Proxy.prototype.initializeProxy = function (onMessageCallback, onAttachCallback, onDetachCallback, onBreakCallback, onRunCallback) { var _this = this; this._pendingMessages = []; this._onMessageCallback = onMessageCallback; this._onAttachCallback = onAttachCallback; this._onDetachCallback = onDetachCallback || (function () { return false; }); this._onBreakCallback = onBreakCallback || (function () { return false; }); this._onRunCallback = onRunCallback || (function () { return false; }); this._diagnosticsBridge.addEventListener("attach", function () { return _this.onAttach(); }); this._diagnosticsBridge.addEventListener("break", function () { return _this.onBreak(); }); this._diagnosticsBridge.addEventListener("connect", function (p) { return _this.onConnect(p); }); this._diagnosticsBridge.addEventListener("detach", function () { return _this.onDetach(); }); this._diagnosticsBridge.addEventListener("run", function () { return _this.onRun(); }); this.onAttach(); }; Proxy.prototype.onAttach = function () { this.hideWarningSection(); this._onAttachCallback(); }; Proxy.prototype.onDetach = function () { if (this.remotePort) { this.remotePort.removeEventListener("message", this._onMessageCallback); this.remotePort = null; } this._callbacks = {}; this._pendingMessages = []; this._pendingTimeout = null; this._onDetachCallback(); this.postWarning("DiagnosticsDisabled"); }; Proxy.prototype.onBreak = function () { if (this._onBreakCallback) { this._onBreakCallback(); } }; Proxy.prototype.onRun = function () { if (this._onRunCallback) { this._onRunCallback(); } }; Proxy.prototype.onConnect = function (port) { var createdPort = this._diagnosticsBridge.createPort(port); var throttle = new Common.PortThrottler(createdPort); throttle.initialize(); this.remotePort = throttle; this.remotePort.addEventListener("message", this._onMessageCallback); }; Proxy.prototype.getUid = function () { return "uid" + (this._uid++).toString(36); }; Proxy.prototype.hideWarningSection = function () { $m("#warningSection").hide(); }; Proxy.prototype.postWarning = function (msg) { $m("#warningMessageText").text(Common.ToolWindowHelpers.loadString(msg)); $m("#warningSection").show(); }; return Proxy; })(); // trace.ts var Common; (function (Common) { "use strict"; (function (TraceEvents) { TraceEvents[TraceEvents["Timeline_Zoom_Start"] = 0x65] = "Timeline_Zoom_Start"; TraceEvents[TraceEvents["Timeline_Zoom_Stop"] = 0x66] = "Timeline_Zoom_Stop"; TraceEvents[TraceEvents["Timeline_GridSort_Start"] = 0x67] = "Timeline_GridSort_Start"; TraceEvents[TraceEvents["Timeline_GridSort_Stop"] = 0x68] = "Timeline_GridSort_Stop"; TraceEvents[TraceEvents["Timeline_LoadGraphs_Start"] = 0x69] = "Timeline_LoadGraphs_Start"; TraceEvents[TraceEvents["Timeline_LoadGraphs_Stop"] = 0x6a] = "Timeline_LoadGraphs_Stop"; TraceEvents[TraceEvents["Timeline_GridScrolled"] = 0x6b] = "Timeline_GridScrolled"; TraceEvents[TraceEvents["Timeline_GridUpdatedForTimeSelection"] = 0x6c] = "Timeline_GridUpdatedForTimeSelection"; TraceEvents[TraceEvents["Timeline_UserSelectedTimeSlice_Start"] = 0x6d] = "Timeline_UserSelectedTimeSlice_Start"; TraceEvents[TraceEvents["Timeline_UserSelectedTimeSlice_Stop"] = 0x6e] = "Timeline_UserSelectedTimeSlice_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterBackground_Start"] = 0x6f] = "Timeline_GridUpdatedForFilterBackground_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterBackground_Stop"] = 0x70] = "Timeline_GridUpdatedForFilterBackground_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterNetwork_Start"] = 0x71] = "Timeline_GridUpdatedForFilterNetwork_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterNetwork_Stop"] = 0x72] = "Timeline_GridUpdatedForFilterNetwork_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterMeasures_Start"] = 0x73] = "Timeline_GridUpdatedForFilterMeasures_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterMeasures_Stop"] = 0x74] = "Timeline_GridUpdatedForFilterMeasures_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterFrames_Start"] = 0x75] = "Timeline_GridUpdatedForFilterFrames_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterFrames_Stop"] = 0x76] = "Timeline_GridUpdatedForFilterFrames_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterName_Start"] = 0x77] = "Timeline_GridUpdatedForFilterName_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterName_Stop"] = 0x78] = "Timeline_GridUpdatedForFilterName_Stop"; TraceEvents[TraceEvents["Memory_TakeSnapshot_Start"] = 0xc9] = "Memory_TakeSnapshot_Start"; TraceEvents[TraceEvents["Memory_TakeSnapshot_Stop"] = 0xca] = "Memory_TakeSnapshot_Stop"; TraceEvents[TraceEvents["Memory_CompareSnapshot_Start"] = 0xcb] = "Memory_CompareSnapshot_Start"; TraceEvents[TraceEvents["Memory_CompareSnapshot_Stop"] = 0xcc] = "Memory_CompareSnapshot_Stop"; TraceEvents[TraceEvents["Memory_ViewSnapshot_Start"] = 0xcd] = "Memory_ViewSnapshot_Start"; TraceEvents[TraceEvents["Memory_ViewSnapshot_Stop"] = 0xce] = "Memory_ViewSnapshot_Stop"; TraceEvents[TraceEvents["Memory_GridSort_Start"] = 0xcf] = "Memory_GridSort_Start"; TraceEvents[TraceEvents["Memory_GridSort_Stop"] = 0xd0] = "Memory_GridSort_Stop"; TraceEvents[TraceEvents["Memory_DisplayFirstLevelSnapshotData_Start"] = 0xd1] = "Memory_DisplayFirstLevelSnapshotData_Start"; TraceEvents[TraceEvents["Memory_DisplayFirstLevelSnapshotData_Stop"] = 0xd2] = "Memory_DisplayFirstLevelSnapshotData_Stop"; TraceEvents[TraceEvents["Memory_ToolReady_Start"] = 0xd3] = "Memory_ToolReady_Start"; TraceEvents[TraceEvents["Memory_ToolReady_Stop"] = 0xd4] = "Memory_ToolReady_Stop"; TraceEvents[TraceEvents["Memory_GridFilterResponse_Start"] = 0xd5] = "Memory_GridFilterResponse_Start"; TraceEvents[TraceEvents["Memory_GridFilterResponse_Stop"] = 0xd6] = "Memory_GridFilterResponse_Stop"; TraceEvents[TraceEvents["Memory_UpdateObjectReferenceGraph_Start"] = 0xd7] = "Memory_UpdateObjectReferenceGraph_Start"; TraceEvents[TraceEvents["Memory_UpdateObjectReferenceGraph_Stop"] = 0xd8] = "Memory_UpdateObjectReferenceGraph_Stop"; TraceEvents[TraceEvents["Memory_ProcessingSnapshot_Start"] = 0xd9] = "Memory_ProcessingSnapshot_Start"; TraceEvents[TraceEvents["Memory_ProcessingSnapshot_Stop"] = 0xda] = "Memory_ProcessingSnapshot_Stop"; TraceEvents[TraceEvents["Memory_ProcessingDiffSnapshot_Start"] = 0xdb] = "Memory_ProcessingDiffSnapshot_Start"; TraceEvents[TraceEvents["Memory_ProcessingDiffSnapshot_Stop"] = 0xdc] = "Memory_ProcessingDiffSnapshot_Stop"; TraceEvents[TraceEvents["Debugger_StepOver_Start"] = 0x12d] = "Debugger_StepOver_Start"; TraceEvents[TraceEvents["Debugger_StepInto_Start"] = 0x12e] = "Debugger_StepInto_Start"; TraceEvents[TraceEvents["Debugger_StepOut_Start"] = 0x12f] = "Debugger_StepOut_Start"; TraceEvents[TraceEvents["Debugger_OnBreak_Start"] = 0x130] = "Debugger_OnBreak_Start"; TraceEvents[TraceEvents["Debugger_OnBreak_Stop"] = 0x131] = "Debugger_OnBreak_Stop"; TraceEvents[TraceEvents["Debugger_PrettyPrint_Start"] = 0x132] = "Debugger_PrettyPrint_Start"; TraceEvents[TraceEvents["Debugger_PrettyPrint_Stop"] = 0x133] = "Debugger_PrettyPrint_Stop"; TraceEvents[TraceEvents["Debugger_CloseDocument_Start"] = 0x136] = "Debugger_CloseDocument_Start"; TraceEvents[TraceEvents["Debugger_CloseDocument_Stop"] = 0x137] = "Debugger_CloseDocument_Stop"; TraceEvents[TraceEvents["Debugger_RevealRange_Start"] = 0x13a] = "Debugger_RevealRange_Start"; TraceEvents[TraceEvents["Debugger_RevealRange_Stop"] = 0x13b] = "Debugger_RevealRange_Stop"; TraceEvents[TraceEvents["Debugger_CallstackController_GoTo_Start"] = 0x13c] = "Debugger_CallstackController_GoTo_Start"; TraceEvents[TraceEvents["Debugger_CallstackController_GoTo_Stop"] = 0x13d] = "Debugger_CallstackController_GoTo_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetAllEnabledStates_Start"] = 0x13e] = "Debugger_BreakpointController_SetAllEnabledStates_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetAllEnabledStates_Stop"] = 0x13f] = "Debugger_BreakpointController_SetAllEnabledStates_Stop"; TraceEvents[TraceEvents["Debugger_EditorWindow_NavigateTo_Start"] = 0x140] = "Debugger_EditorWindow_NavigateTo_Start"; TraceEvents[TraceEvents["Debugger_EditorWindow_NavigateTo_Stop"] = 0x141] = "Debugger_EditorWindow_NavigateTo_Stop"; TraceEvents[TraceEvents["Debugger_Editor_SetModel_Start"] = 0x142] = "Debugger_Editor_SetModel_Start"; TraceEvents[TraceEvents["Debugger_Editor_SetModel_Stop"] = 0x143] = "Debugger_Editor_SetModel_Stop"; TraceEvents[TraceEvents["Debugger_Editor_CreateModel_Start"] = 0x144] = "Debugger_Editor_CreateModel_Start"; TraceEvents[TraceEvents["Debugger_Editor_CreateModel_Stop"] = 0x145] = "Debugger_Editor_CreateModel_Stop"; TraceEvents[TraceEvents["Debugger_Editor_Create_Start"] = 0x146] = "Debugger_Editor_Create_Start"; TraceEvents[TraceEvents["Debugger_Editor_Create_Stop"] = 0x147] = "Debugger_Editor_Create_Stop"; TraceEvents[TraceEvents["Debugger_Editor_Layout_Start"] = 0x148] = "Debugger_Editor_Layout_Start"; TraceEvents[TraceEvents["Debugger_Editor_Layout_Stop"] = 0x149] = "Debugger_Editor_Layout_Stop"; TraceEvents[TraceEvents["Debugger_Editor_ChangeViewZones_Start"] = 0x14a] = "Debugger_Editor_ChangeViewZones_Start"; TraceEvents[TraceEvents["Debugger_Editor_ChangeViewZones_Stop"] = 0x14b] = "Debugger_Editor_ChangeViewZones_Stop"; TraceEvents[TraceEvents["Debugger_Editor_RevealPosition_Start"] = 0x14c] = "Debugger_Editor_RevealPosition_Start"; TraceEvents[TraceEvents["Debugger_Editor_RevealPosition_Stop"] = 0x14d] = "Debugger_Editor_RevealPosition_Stop"; TraceEvents[TraceEvents["Debugger_Editor_SaveViewState_Start"] = 0x14e] = "Debugger_Editor_SaveViewState_Start"; TraceEvents[TraceEvents["Debugger_Editor_SaveViewState_Stop"] = 0x14f] = "Debugger_Editor_SaveViewState_Stop"; TraceEvents[TraceEvents["Debugger_Editor_RestoreViewState_Start"] = 0x150] = "Debugger_Editor_RestoreViewState_Start"; TraceEvents[TraceEvents["Debugger_Editor_RestoreViewState_Stop"] = 0x151] = "Debugger_Editor_RestoreViewState_Stop"; TraceEvents[TraceEvents["Debugger_EditorWindow_CreateDataTipFromPosition_Start"] = 0x152] = "Debugger_EditorWindow_CreateDataTipFromPosition_Start"; TraceEvents[TraceEvents["Debugger_EditorWindow_CreateDataTipFromPosition_Stop"] = 0x153] = "Debugger_EditorWindow_CreateDataTipFromPosition_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetEnabledState_Start"] = 0x154] = "Debugger_BreakpointController_SetEnabledState_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetEnabledState_Stop"] = 0x155] = "Debugger_BreakpointController_SetEnabledState_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_BreakpointChanged_Start"] = 0x156] = "Debugger_BreakpointController_BreakpointChanged_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_BreakpointChanged_Stop"] = 0x157] = "Debugger_BreakpointController_BreakpointChanged_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointWindow_BreakpointChanged_Start"] = 0x158] = "Debugger_BreakpointWindow_BreakpointChanged_Start"; TraceEvents[TraceEvents["Debugger_BreakpointWindow_BreakpointChanged_Stop"] = 0x159] = "Debugger_BreakpointWindow_BreakpointChanged_Stop"; TraceEvents[TraceEvents["Debugger_WatchWindowView_RefreshView_Start"] = 0x15a] = "Debugger_WatchWindowView_RefreshView_Start"; TraceEvents[TraceEvents["Debugger_WatchWindowView_RefreshView_Stop"] = 0x15b] = "Debugger_WatchWindowView_RefreshView_Stop"; TraceEvents[TraceEvents["Debugger_StepDocument_Start"] = 0x15c] = "Debugger_StepDocument_Start"; TraceEvents[TraceEvents["Debugger_ToggleJMC_Start"] = 0x15d] = "Debugger_ToggleJMC_Start"; TraceEvents[TraceEvents["Debugger_ToggleJMC_Stop"] = 0x15e] = "Debugger_ToggleJMC_Stop"; TraceEvents[TraceEvents["Debugger_ToggleCallstackLibraryFrames_Start"] = 0x15f] = "Debugger_ToggleCallstackLibraryFrames_Start"; TraceEvents[TraceEvents["Debugger_ToggleCallstackLibraryFrames_Stop"] = 0x160] = "Debugger_ToggleCallstackLibraryFrames_Stop"; TraceEvents[TraceEvents["Debugger_SpecifyUrlAsJMCType_Start"] = 0x161] = "Debugger_SpecifyUrlAsJMCType_Start"; TraceEvents[TraceEvents["Debugger_SpecifyUrlAsJMCType_Stop"] = 0x162] = "Debugger_SpecifyUrlAsJMCType_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_DataLoad_Start"] = 0x163] = "Debugger_Persistence_DataLoad_Start"; TraceEvents[TraceEvents["Debugger_Persistence_DataLoad_Stop"] = 0x164] = "Debugger_Persistence_DataLoad_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_AddBreakpoints_Start"] = 0x165] = "Debugger_Persistence_AddBreakpoints_Start"; TraceEvents[TraceEvents["Debugger_Persistence_AddBreakpoints_Stop"] = 0x166] = "Debugger_Persistence_AddBreakpoints_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_AddWatches_Start"] = 0x167] = "Debugger_Persistence_AddWatches_Start"; TraceEvents[TraceEvents["Debugger_Persistence_AddWatches_Stop"] = 0x168] = "Debugger_Persistence_AddWatches_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_TabOpen_Start"] = 0x169] = "Debugger_Persistence_TabOpen_Start"; TraceEvents[TraceEvents["Debugger_Persistence_TabOpen_Stop"] = 0x16a] = "Debugger_Persistence_TabOpen_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_SaveState_Start"] = 0x16b] = "Debugger_Persistence_SaveState_Start"; TraceEvents[TraceEvents["Debugger_Persistence_SaveState_Stop"] = 0x16c] = "Debugger_Persistence_SaveState_Stop"; TraceEvents[TraceEvents["Debugger_SourceMap_ToggleSourceMap_Start"] = 0x16d] = "Debugger_SourceMap_ToggleSourceMap_Start"; TraceEvents[TraceEvents["Debugger_SourceMap_ToggleSourceMap_Stop"] = 0x16e] = "Debugger_SourceMap_ToggleSourceMap_Stop"; TraceEvents[TraceEvents["Debugger_SourceMap_ParseSourceMapAsync_Start"] = 0x16f] = "Debugger_SourceMap_ParseSourceMapAsync_Start"; TraceEvents[TraceEvents["Debugger_SourceMap_ParseSourceMapAsync_Stop"] = 0x170] = "Debugger_SourceMap_ParseSourceMapAsync_Stop"; TraceEvents[TraceEvents["Debugger_Editor_GetOrCreateMode_Start"] = 0x171] = "Debugger_Editor_GetOrCreateMode_Start"; TraceEvents[TraceEvents["Debugger_Editor_GetOrCreateMode_Stop"] = 0x172] = "Debugger_Editor_GetOrCreateMode_Stop"; TraceEvents[TraceEvents["Debugger_OnAddDocuments_Info"] = 0x173] = "Debugger_OnAddDocuments_Info"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Build_Start"] = 0x174] = "Debugger_Intellisense_ListBox_Build_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Build_Stop"] = 0x175] = "Debugger_Intellisense_ListBox_Build_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Reset_Start"] = 0x176] = "Debugger_Intellisense_ListBox_Reset_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Reset_Stop"] = 0x177] = "Debugger_Intellisense_ListBox_Reset_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Filter_Start"] = 0x178] = "Debugger_Intellisense_Menu_Filter_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Filter_Stop"] = 0x179] = "Debugger_Intellisense_Menu_Filter_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Layout_Start"] = 0x17a] = "Debugger_Intellisense_Menu_Layout_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Layout_Stop"] = 0x17b] = "Debugger_Intellisense_Menu_Layout_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Expression_Start"] = 0x17c] = "Debugger_Intellisense_Provider_Get_Expression_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Expression_Stop"] = 0x17d] = "Debugger_Intellisense_Provider_Get_Expression_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Update_Start"] = 0x17e] = "Debugger_Intellisense_Provider_Update_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Update_Stop"] = 0x17f] = "Debugger_Intellisense_Provider_Update_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Items_Start"] = 0x180] = "Debugger_Intellisense_Provider_Get_Items_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Items_Stop"] = 0x181] = "Debugger_Intellisense_Provider_Get_Items_Stop"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Start"] = 0x182] = "Debugger_AsyncStackProvider_GetFrames_Start"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Stop"] = 0x183] = "Debugger_AsyncStackProvider_GetFrames_Stop"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Timeout"] = 0x184] = "Debugger_AsyncStackProvider_GetFrames_Timeout"; TraceEvents[TraceEvents["Console_Window_Create_Start"] = 0x191] = "Console_Window_Create_Start"; TraceEvents[TraceEvents["Console_Window_Create_Stop"] = 0x192] = "Console_Window_Create_Stop"; TraceEvents[TraceEvents["Console_Attach_Start"] = 0x193] = "Console_Attach_Start"; TraceEvents[TraceEvents["Console_Attach_Stop"] = 0x194] = "Console_Attach_Stop"; TraceEvents[TraceEvents["Console_Message_Start"] = 0x195] = "Console_Message_Start"; TraceEvents[TraceEvents["Console_Message_Stop"] = 0x196] = "Console_Message_Stop"; TraceEvents[TraceEvents["Console_Input_Start"] = 0x197] = "Console_Input_Start"; TraceEvents[TraceEvents["Console_Input_Stop"] = 0x198] = "Console_Input_Stop"; TraceEvents[TraceEvents["Console_Output_Start"] = 0x199] = "Console_Output_Start"; TraceEvents[TraceEvents["Console_Output_Stop"] = 0x19a] = "Console_Output_Stop"; TraceEvents[TraceEvents["Console_Output_Render_Start"] = 0x19b] = "Console_Output_Render_Start"; TraceEvents[TraceEvents["Console_Output_Render_Stop"] = 0x19c] = "Console_Output_Render_Stop"; TraceEvents[TraceEvents["Console_Item_Toggle_Start"] = 0x19d] = "Console_Item_Toggle_Start"; TraceEvents[TraceEvents["Console_Item_Toggle_Stop"] = 0x19e] = "Console_Item_Toggle_Stop"; TraceEvents[TraceEvents["Console_HtmlLines_Expand_Start"] = 0x19f] = "Console_HtmlLines_Expand_Start"; TraceEvents[TraceEvents["Console_HtmlLines_Expand_Stop"] = 0x1a0] = "Console_HtmlLines_Expand_Stop"; TraceEvents[TraceEvents["Console_Context_Menu_Loading_Start"] = 0x1a1] = "Console_Context_Menu_Loading_Start"; TraceEvents[TraceEvents["Console_Context_Menu_Loading_Stop"] = 0x1a2] = "Console_Context_Menu_Loading_Stop"; TraceEvents[TraceEvents["Console_Scroll_Start"] = 0x1a3] = "Console_Scroll_Start"; TraceEvents[TraceEvents["Console_Scroll_Stop"] = 0x1a4] = "Console_Scroll_Stop"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Build_Start"] = 0x1a5] = "Console_Intellisense_ListBox_Build_Start"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Build_Stop"] = 0x1a6] = "Console_Intellisense_ListBox_Build_Stop"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Reset_Start"] = 0x1a7] = "Console_Intellisense_ListBox_Reset_Start"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Reset_Stop"] = 0x1a8] = "Console_Intellisense_ListBox_Reset_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Filter_Start"] = 0x1a9] = "Console_Intellisense_Menu_Filter_Start"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Filter_Stop"] = 0x1aa] = "Console_Intellisense_Menu_Filter_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Layout_Start"] = 0x1ab] = "Console_Intellisense_Menu_Layout_Start"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Layout_Stop"] = 0x1ac] = "Console_Intellisense_Menu_Layout_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Expression_Start"] = 0x1ad] = "Console_Intellisense_Provider_Get_Expression_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Expression_Stop"] = 0x1ae] = "Console_Intellisense_Provider_Get_Expression_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Update_Start"] = 0x1af] = "Console_Intellisense_Provider_Update_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Update_Stop"] = 0x1b0] = "Console_Intellisense_Provider_Update_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Items_Start"] = 0x1b1] = "Console_Intellisense_Provider_Get_Items_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Items_Stop"] = 0x1b2] = "Console_Intellisense_Provider_Get_Items_Stop"; TraceEvents[TraceEvents["Dom_Window_Create_Start"] = 501] = "Dom_Window_Create_Start"; TraceEvents[TraceEvents["Dom_Window_Create_Stop"] = 502] = "Dom_Window_Create_Stop"; TraceEvents[TraceEvents["Dom_ExpandNode_Start"] = 503] = "Dom_ExpandNode_Start"; TraceEvents[TraceEvents["Dom_ExpandNode_Stop"] = 504] = "Dom_ExpandNode_Stop"; TraceEvents[TraceEvents["Dom_UndoRedo_Start"] = 505] = "Dom_UndoRedo_Start"; TraceEvents[TraceEvents["Dom_UndoRedo_Stop"] = 506] = "Dom_UndoRedo_Stop"; TraceEvents[TraceEvents["Dom_DragDrop_Start"] = 507] = "Dom_DragDrop_Start"; TraceEvents[TraceEvents["Dom_DragDrop_Stop"] = 508] = "Dom_DragDrop_Stop"; TraceEvents[TraceEvents["Dom_AddAttribute_Start"] = 509] = "Dom_AddAttribute_Start"; TraceEvents[TraceEvents["Dom_AddAttribute_Stop"] = 510] = "Dom_AddAttribute_Stop"; TraceEvents[TraceEvents["Dom_Intellisense_Start"] = 511] = "Dom_Intellisense_Start"; TraceEvents[TraceEvents["Dom_Intellisense_Stop"] = 512] = "Dom_Intellisense_Stop"; TraceEvents[TraceEvents["Dom_SelectElement_Start"] = 513] = "Dom_SelectElement_Start"; TraceEvents[TraceEvents["Dom_SelectElement_Stop"] = 514] = "Dom_SelectElement_Stop"; TraceEvents[TraceEvents["Dom_CutElement_Start"] = 515] = "Dom_CutElement_Start"; TraceEvents[TraceEvents["Dom_CutElement_Stop"] = 516] = "Dom_CutElement_Stop"; TraceEvents[TraceEvents["Dom_PasteElement_Start"] = 517] = "Dom_PasteElement_Start"; TraceEvents[TraceEvents["Dom_PasteElement_Stop"] = 518] = "Dom_PasteElement_Stop"; TraceEvents[TraceEvents["Dom_CollapseElement_Start"] = 519] = "Dom_CollapseElement_Start"; TraceEvents[TraceEvents["Dom_CollapseElement_Stop"] = 520] = "Dom_CollapseElement_Stop"; TraceEvents[TraceEvents["Dom_StylesTabLoad_Start"] = 521] = "Dom_StylesTabLoad_Start"; TraceEvents[TraceEvents["Dom_StylesTabLoad_Stop"] = 522] = "Dom_StylesTabLoad_Stop"; TraceEvents[TraceEvents["Dom_StylesTab_Intellisense_Start"] = 523] = "Dom_StylesTab_Intellisense_Start"; TraceEvents[TraceEvents["Dom_StylesTab_Intellisense_Stop"] = 524] = "Dom_StylesTab_Intellisense_Stop"; TraceEvents[TraceEvents["Dom_TreeItemExpand_Start"] = 525] = "Dom_TreeItemExpand_Start"; TraceEvents[TraceEvents["Dom_TreeItemExpand_Stop"] = 526] = "Dom_TreeItemExpand_Stop"; TraceEvents[TraceEvents["Dom_ComputedTabLoad_Start"] = 527] = "Dom_ComputedTabLoad_Start"; TraceEvents[TraceEvents["Dom_ComputedTabLoad_Stop"] = 528] = "Dom_ComputedTabLoad_Stop"; TraceEvents[TraceEvents["Dom_ChangesTabLoad_Start"] = 529] = "Dom_ChangesTabLoad_Start"; TraceEvents[TraceEvents["Dom_ChangesTabLoad_Stop"] = 530] = "Dom_ChangesTabLoad_Stop"; TraceEvents[TraceEvents["Dom_LayoutTabLoad_Start"] = 531] = "Dom_LayoutTabLoad_Start"; TraceEvents[TraceEvents["Dom_LayoutTabLoad_Stop"] = 532] = "Dom_LayoutTabLoad_Stop"; TraceEvents[TraceEvents["Dom_EventsTabLoad_Start"] = 533] = "Dom_EventsTabLoad_Start"; TraceEvents[TraceEvents["Dom_EventsTabLoad_Stop"] = 534] = "Dom_EventsTabLoad_Stop"; TraceEvents[TraceEvents["Dom_TreeItemCollapse_Start"] = 535] = "Dom_TreeItemCollapse_Start"; TraceEvents[TraceEvents["Dom_TreeItemCollapse_Stop"] = 536] = "Dom_TreeItemCollapse_Stop"; TraceEvents[TraceEvents["Dom_Search_Start"] = 537] = "Dom_Search_Start"; TraceEvents[TraceEvents["Dom_Search_Stop"] = 538] = "Dom_Search_Stop"; TraceEvents[TraceEvents["Dom_RemoteInjection_Start"] = 539] = "Dom_RemoteInjection_Start"; TraceEvents[TraceEvents["Dom_RemoteInjection_Stop"] = 540] = "Dom_RemoteInjection_Stop"; TraceEvents[TraceEvents["Dom_EnterEditAsHtml_Start"] = 541] = "Dom_EnterEditAsHtml_Start"; TraceEvents[TraceEvents["Dom_EnterEditAsHtml_Stop"] = 542] = "Dom_EnterEditAsHtml_Stop"; TraceEvents[TraceEvents["Dom_CommitEditAsHtml_Start"] = 543] = "Dom_CommitEditAsHtml_Start"; TraceEvents[TraceEvents["Dom_CommitEditAsHtml_Stop"] = 544] = "Dom_CommitEditAsHtml_Stop"; TraceEvents[TraceEvents["Dom_CommitEditAttribute_Start"] = 545] = "Dom_CommitEditAttribute_Start"; TraceEvents[TraceEvents["Dom_CommitEditAttribute_Stop"] = 546] = "Dom_CommitEditAttribute_Stop"; TraceEvents[TraceEvents["Dom_ShowColorPicker_Start"] = 547] = "Dom_ShowColorPicker_Start"; TraceEvents[TraceEvents["Dom_ShowColorPicker_Stop"] = 548] = "Dom_ShowColorPicker_Stop"; TraceEvents[TraceEvents["Dom_HideColorPicker_Start"] = 549] = "Dom_HideColorPicker_Start"; TraceEvents[TraceEvents["Dom_HideColorPicker_Stop"] = 550] = "Dom_HideColorPicker_Stop"; TraceEvents[TraceEvents["Dom_SetColorUsingColorPicker_Start"] = 551] = "Dom_SetColorUsingColorPicker_Start"; TraceEvents[TraceEvents["Dom_SetColorUsingColorPicker_Stop"] = 552] = "Dom_SetColorUsingColorPicker_Stop"; TraceEvents[TraceEvents["Emulation_Window_Create_Start"] = 0x259] = "Emulation_Window_Create_Start"; TraceEvents[TraceEvents["Emulation_Window_Create_Stop"] = 0x25a] = "Emulation_Window_Create_Stop"; TraceEvents[TraceEvents["Generic_Debug_1_Start"] = 0x2bd] = "Generic_Debug_1_Start"; TraceEvents[TraceEvents["Generic_Debug_1_Stop"] = 0x2be] = "Generic_Debug_1_Stop"; TraceEvents[TraceEvents["Generic_Debug_2_Start"] = 0x2bf] = "Generic_Debug_2_Start"; TraceEvents[TraceEvents["Generic_Debug_2_Stop"] = 0x2c0] = "Generic_Debug_2_Stop"; TraceEvents[TraceEvents["Generic_Debug_3_Start"] = 0x2c1] = "Generic_Debug_3_Start"; TraceEvents[TraceEvents["Generic_Debug_3_Stop"] = 0x2c2] = "Generic_Debug_3_Stop"; TraceEvents[TraceEvents["Generic_Debug_4_Start"] = 0x2c3] = "Generic_Debug_4_Start"; TraceEvents[TraceEvents["Generic_Debug_4_Stop"] = 0x2c4] = "Generic_Debug_4_Stop"; TraceEvents[TraceEvents["Generic_Debug_5_Start"] = 0x2c5] = "Generic_Debug_5_Start"; TraceEvents[TraceEvents["Generic_Debug_5_Stop"] = 0x2c6] = "Generic_Debug_5_Stop"; TraceEvents[TraceEvents["Generic_Debug_6_Start"] = 0x2c7] = "Generic_Debug_6_Start"; TraceEvents[TraceEvents["Generic_Debug_6_Stop"] = 0x2c8] = "Generic_Debug_6_Stop"; TraceEvents[TraceEvents["Generic_Debug_7_Start"] = 0x2c9] = "Generic_Debug_7_Start"; TraceEvents[TraceEvents["Generic_Debug_7_Stop"] = 0x2ca] = "Generic_Debug_7_Stop"; TraceEvents[TraceEvents["Generic_Debug_8_Start"] = 0x2cb] = "Generic_Debug_8_Start"; TraceEvents[TraceEvents["Generic_Debug_8_Stop"] = 0x2cc] = "Generic_Debug_8_Stop"; TraceEvents[TraceEvents["Generic_Debug_9_Start"] = 0x2cd] = "Generic_Debug_9_Start"; TraceEvents[TraceEvents["Generic_Debug_9_Stop"] = 0x2ce] = "Generic_Debug_9_Stop"; TraceEvents[TraceEvents["Header_InitializeTabs_Start"] = 0x321] = "Header_InitializeTabs_Start"; TraceEvents[TraceEvents["Header_InitializeTabs_Stop"] = 0x322] = "Header_InitializeTabs_Stop"; })(Common.TraceEvents || (Common.TraceEvents = {})); var TraceEvents = Common.TraceEvents; (function (TraceEventsWithKey) { TraceEventsWithKey[TraceEventsWithKey["Debugger_OpenDocument_Start"] = 0x134] = "Debugger_OpenDocument_Start"; TraceEventsWithKey[TraceEventsWithKey["Debugger_OpenDocument_Stop"] = 0x135] = "Debugger_OpenDocument_Stop"; TraceEventsWithKey[TraceEventsWithKey["Debugger_SwitchDocument_Start"] = 0x138] = "Debugger_SwitchDocument_Start"; TraceEventsWithKey[TraceEventsWithKey["Debugger_SwitchDocument_Stop"] = 0x139] = "Debugger_SwitchDocument_Stop"; })(Common.TraceEventsWithKey || (Common.TraceEventsWithKey = {})); var TraceEventsWithKey = Common.TraceEventsWithKey; var DefaultTraceWriter = (function () { function DefaultTraceWriter() { } DefaultTraceWriter.prototype.raiseEvent = function (eventId) { }; DefaultTraceWriter.prototype.raiseEventWithMessage = function (eventId, traceMessage) { }; DefaultTraceWriter.prototype.raiseEventWithKey = function (eventId, key, traceMessage) { }; return DefaultTraceWriter; })(); Common.DefaultTraceWriter = DefaultTraceWriter; var TraceWriter = (function () { function TraceWriter(performanceTracer) { if (!performanceTracer && Plugin) { if (Plugin.F12) { performanceTracer = Plugin.F12.TraceWriter; } else if (Plugin.VS) { performanceTracer = Plugin.VS.Utilities.createExternalObject("PerformanceTraceExtension", "{D76A409F-7234-4B71-9BFD-DEF3DC4CCCA6}"); } } this._performanceTracer = performanceTracer; } TraceWriter.prototype.raiseEventWithKey = function (eventId, key, traceMessage) { if (this._performanceTracer) { this._performanceTracer.raiseEventWithKey(eventId, key, traceMessage); } }; TraceWriter.prototype.raiseEventWithMessage = function (eventId, traceMessage) { if (this._performanceTracer) { this._performanceTracer.raiseEvent(eventId, traceMessage); } }; TraceWriter.prototype.raiseEvent = function (eventId) { this.raiseEventWithMessage(eventId, ""); }; return TraceWriter; })(); Common.TraceWriter = TraceWriter; })(Common || (Common = {})); // rpc.ts var F12; (function (F12) { (function (Tools) { (function (RPC) { "use strict"; var JsonRPCEndpoint = (function () { function JsonRPCEndpoint(identifier, jsonRpcMethodReceive, jsonRpcNotificationReceive, postMessage, onMessageCapture) { var _this = this; this._ourIdentifier = identifier; this._nextId = 0; this._promiseTable = {}; this._jsonRpcMethodReceive = jsonRpcMethodReceive; this._jsonRpcNotificationReceive = jsonRpcNotificationReceive; this._postMessage = postMessage; if (!Date.now) { Date.now = function now() { return +(new Date); }; } this._startTime = Date.now(); onMessageCapture(function (data) { _this.onMessage(data); }); } JsonRPCEndpoint.prototype.jsonRpcMethodCall = function (method, params, completed, error, identification) { var _this = this; var id = this._ourIdentifier + "|" + this._nextId; this._nextId++; this._promiseTable[id] = { completed: completed, error: error }; var message = JSON.stringify({ id: id, method: method, params: params }); this.logTraffic(message); if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this._postMessage(message, identification); }, message); return true; } else { return this._postMessage(message, identification); } }; JsonRPCEndpoint.prototype.jsonRpcNotification = function (method, params, identification) { var _this = this; var id = this._ourIdentifier + "|" + "NULL"; var message = JSON.stringify({ id: id, method: method, params: params }); this.logTraffic(message); if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this._postMessage(message, identification); }, message); } else { this._postMessage(message, identification); } }; JsonRPCEndpoint.prototype.logTraffic = function (data) { if (isDebugBuild) { var paddedTimestamp = (" " + (Date.now() - this._startTime) / 1000).slice(-9); __rpcLog.push(paddedTimestamp + " | " + data); if (__rpcLog.length > 100) { __rpcLog.shift(); } } }; JsonRPCEndpoint.prototype.onMessage = function (data) { var _this = this; this.logTraffic(data.data); var result = JSON.parse(data.data); var idSplit = (result.id).split("|"); Tools.Utility.Assert.areEqual(idSplit.length, 2); if (idSplit[1] === "NULL") { if (idSplit[0] !== this._ourIdentifier) { this._jsonRpcNotificationReceive(result.method, result.params); } } else if (idSplit[0] === this._ourIdentifier) { if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this.handleReply(result); }, data.data); } else { this.handleReply(result); } } else { if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this.handleCall(result); }, data.data); } else { this.handleCall(result); } } }; JsonRPCEndpoint.prototype.handleReply = function (result) { Tools.Utility.Assert.hasValue(this._promiseTable[result.id]); if (result.error) { Tools.Utility.Assert.isUndefined(result.data, "Can't have both data and error"); this._promiseTable[result.id].error(result.error); } else { this._promiseTable[result.id].completed(result.data); } delete this._promiseTable[result.id]; }; JsonRPCEndpoint.prototype.handleCall = function (result) { var _this = this; this._jsonRpcMethodReceive(result.method, result.params, function (data, error) { var message; if (data !== null && data !== undefined) { Tools.Utility.Assert.isUndefined(error, "Can't have both data and error"); message = JSON.stringify({ id: result.id, data: data }); } else { Tools.Utility.Assert.hasValue(error, "RPC call returned no value, but no error object either"); message = JSON.stringify({ id: result.id, error: error }); } _this._postMessage(message); }); }; return JsonRPCEndpoint; })(); RPC.JsonRPCEndpoint = JsonRPCEndpoint; var RpcDelayData = (function () { function RpcDelayData(callback, message) { this.callback = callback; this.message = message; } return RpcDelayData; })(); RPC.RpcDelayData = RpcDelayData; var RpcDelayHook = (function () { function RpcDelayHook() { } RpcDelayHook.enableDelay = function (calculateDelayTime, delayedMessage) { RpcDelayHook.RandomDelay = true; RpcDelayHook.CalculateDelayTime = calculateDelayTime; RpcDelayHook.DelayedMessage = delayedMessage; }; RpcDelayHook.disableDelay = function () { RpcDelayHook.RandomDelay = false; if (RpcDelayHook.RandomDelayTimeout) { clearTimeout(RpcDelayHook.RandomDelayTimeout); RpcDelayHook.RandomDelayTimeout = null; RpcDelayHook.clearQueue(); } }; RpcDelayHook.queueData = function (callback, message) { var delayData = new RpcDelayData(callback, message); RpcDelayHook.DelayedQueue.push(delayData); if (!RpcDelayHook.RandomDelayTimeout) { var delay = RpcDelayHook.CalculateDelayTime(message); RpcDelayHook.RandomDelayTimeout = setTimeout(RpcDelayHook.fireRandomly, delay); } }; RpcDelayHook.fireRandomly = function () { var delayData = RpcDelayHook.DelayedQueue.shift(); RpcDelayHook.DelayedMessage(delayData.message); delayData.callback(); if (RpcDelayHook.DelayedQueue.length > 0) { var delay = RpcDelayHook.CalculateDelayTime(RpcDelayHook.DelayedQueue[0].message); RpcDelayHook.RandomDelayTimeout = setTimeout(RpcDelayHook.fireRandomly, delay); } else { RpcDelayHook.RandomDelayTimeout = null; } }; RpcDelayHook.clearQueue = function () { for (var i = 0; i < RpcDelayHook.DelayedQueue.length; i++) { var delayData = RpcDelayHook.DelayedQueue[i]; RpcDelayHook.DelayedMessage(delayData.message); delayData.callback(); } RpcDelayHook.DelayedQueue = []; }; RpcDelayHook.RandomDelay = false; RpcDelayHook.DelayedQueue = []; return RpcDelayHook; })(); RPC.RpcDelayHook = RpcDelayHook; })(Tools.RPC || (Tools.RPC = {})); var RPC = Tools.RPC; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); if (isDebugBuild) { var __rpcLog = []; } // commonTestEventHelper.ts var Common; (function (Common) { "use strict"; var EventHelperObject = (function () { function EventHelperObject() { this._eventCallbacks = {}; } EventHelperObject.prototype.addEventListener = function (eventName, callback) { var callbacks = this._eventCallbacks[eventName]; if (!callbacks) { this._eventCallbacks[eventName] = new Array(); callbacks = this._eventCallbacks[eventName]; } callbacks.push(callback); }; EventHelperObject.prototype.addOneTimeListener = function (eventName, callback) { var _this = this; var eventCallback = function (data) { _this.removeEventListener(eventName, eventCallback); callback(data); }; this.addEventListener(eventName, eventCallback); }; EventHelperObject.prototype.removeEventListener = function (eventName, callback) { var callbacks = this._eventCallbacks[eventName]; if (callbacks) { callbacks.splice(callbacks.indexOf(callback), 1); } }; EventHelperObject.prototype.fireEvent = function (eventName, eventArgs) { if (this._eventCallbacks[eventName]) { var callbacks = this._eventCallbacks[eventName].slice(0); for (var i = 0; i < callbacks.length; i++) { callbacks[i](eventArgs); } } }; EventHelperObject.prototype.fireEventForFirstListener = function (eventName, eventArgs) { if (this._eventCallbacks[eventName]) { var callbacks = this._eventCallbacks[eventName].slice(0); if (callbacks.length > 0) { callbacks[0](eventArgs); } } }; return EventHelperObject; })(); Common.EventHelperObject = EventHelperObject; })(Common || (Common = {})); var Common; (function (Common) { "use strict"; var CssUtilities = (function () { function CssUtilities() { } CssUtilities.addClasses = function (originalClasses, addClasses) { var newClasses = originalClasses ? originalClasses.split(" ") : []; var addList = addClasses ? addClasses.split(" ") : []; for (var i = 0; i < addList.length; i++) { if (newClasses.indexOf(addList[i]) === -1) { newClasses.push(addList[i]); } } return newClasses.join(" "); }; CssUtilities.removeClasses = function (originalClasses, removeClasses) { var classes = originalClasses ? originalClasses.split(" ") : []; var removeList = removeClasses ? removeClasses.split(" ") : []; var newClasses = []; for (var i = 0; i < classes.length; i++) { if (removeList.indexOf(classes[i]) === -1) { newClasses.push(classes[i]); } } return newClasses.join(" "); }; return CssUtilities; })(); Common.CssUtilities = CssUtilities; })(Common || (Common = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var CutCopyPasteContextMenu = (function () { function CutCopyPasteContextMenu(element, onModifyCallback) { var _this = this; this._element = element; this._onModifyCallback = onModifyCallback; this._isActive = false; this._element.addEventListener("contextmenu", function (e) { return _this.handleContextMenu(e); }); if (this._element instanceof HTMLInputElement) { this._element.addEventListener("keyup", function (e) { return _this.handleKeyUp(e); }); } } Object.defineProperty(CutCopyPasteContextMenu.prototype, "isActive", { get: function () { return this._isActive; }, enumerable: true, configurable: true }); CutCopyPasteContextMenu.prototype.show = function (clientX, clientY) { var _this = this; var x = clientX; var y = clientY; var selectedText = ""; if (this._element instanceof HTMLInputElement) { var inputElement = this._element; var copyStart = inputElement.selectionStart; var copyEnd = inputElement.selectionEnd; selectedText = inputElement.value.substring(copyStart, copyEnd); if (x <= 0 || y <= 0) { var range = inputElement.createTextRange(); range.move("character", copyStart); x = range.offsetLeft; y = range.offsetTop; } } else { var selections = window.getSelection(); if (selections.rangeCount === 1) { var selectionRange = selections.getRangeAt(0); if (selectionRange.startContainer.parentNode === this._element && selectionRange.endContainer.parentNode === this._element) { selectedText = selectionRange.toString(); } } } var menuItems = []; if (this._element instanceof HTMLInputElement) { menuItems.push({ id: "menuInputBoxCut", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CutMenuText"), accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlX") }); } menuItems.push({ id: "menuInputBoxCopy", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyMenuText"), accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlC") }); if (this._element instanceof HTMLInputElement) { menuItems.push({ id: "menuInputBoxPaste", type: 1 /* command */, label: Plugin.Resources.getString("/Common/PasteMenuText"), accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlV") }); } var callback = function (menuId, menuItem, targetId) { _this.invokeContextMenu(menuId, menuItem, selectedText, copyStart, copyEnd); }; var contextMenu = Plugin.ContextMenu.create(menuItems, null, null, null, callback); contextMenu.addEventListener("dismiss", function () { contextMenu.dispose(); _this._isActive = false; }); contextMenu.attach(this._element); this._isActive = true; contextMenu.show(x, y); }; CutCopyPasteContextMenu.prototype.invokeContextMenu = function (menuId, menuItem, selectedText, copyStart, copyEnd) { if (!selectedText) { selectedText = this._element.textContent || this._element.value; } var pasteText = clipboardData.getData("Text"); var inputElement = this._element; switch (menuItem.id) { case "menuInputBoxCut": clipboardData.setData("Text", selectedText); inputElement.value = inputElement.value.substring(0, copyStart) + inputElement.value.substring(copyEnd); if (this._onModifyCallback) { this._onModifyCallback(); } this._element.focus(); inputElement.setSelectionRange(copyStart, copyStart); break; case "menuInputBoxPaste": if (pasteText) { var range = inputElement.createTextRange(); range.move("character", copyStart); range.moveEnd("character", copyEnd - copyStart); range.text = pasteText; if (this._onModifyCallback) { this._onModifyCallback(); } this._element.focus(); inputElement.setSelectionRange(inputElement.value.length, inputElement.value.length); } break; case "menuInputBoxCopy": clipboardData.setData("Text", selectedText); this._element.focus(); break; } }; CutCopyPasteContextMenu.prototype.handleContextMenu = function (event) { this.show(event.clientX, event.clientY); event.stopImmediatePropagation(); event.preventDefault(); return false; }; CutCopyPasteContextMenu.prototype.handleKeyUp = function (e) { if (e.keyCode === 121 /* F10 */ && e.shiftKey && !e.ctrlKey && !e.altKey) { this.show(0, 0); e.stopImmediatePropagation(); e.preventDefault(); return false; } }; return CutCopyPasteContextMenu; })(); Debugger.CutCopyPasteContextMenu = CutCopyPasteContextMenu; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); .BPT-DataTree-Container { white-space: nowrap; padding: 3px 6px 6px 6px; } .BPT-DataTree-Container:focus { outline:0; } .BPT-DataTree { position: relative; } .BPT-DataTree-Divider { position: absolute; top: 0px; left: 170px; bottom: 0px; z-index: 100; width: 4px; background-color: transparent; cursor: w-resize; margin-left: 14px; } .BPT-DataTree-DividerVisible { background-color: #222222; /*[{plugin-vertical-resize-grip-middle-color}]*/ } .BPT-DataTreeItem { position: relative; margin: 0 3px 0 3px; padding-left: 7px; border-left: 1px solid transparent; cursor: default; min-width: 200px; } .BPT-DataTreeItem-Loading { margin: 1px 0px 5px 0px; } .BPT-DataTreeItem-Expanded { background-repeat: no-repeat; background-position: 3px 5px; } .BPT-DataTreeItem-Collapsed { background-repeat: no-repeat; background-position: 3px 5px; } .BPT-DataTreeItem-Expanded .BPT-DataTreeItem { display: block; } .BPT-DataTreeItem-Collapsed .BPT-DataTreeItem { display: none; } .BPT-DataTreeItem-ExpandIcon { left: 3px; top: 5px; position: absolute; width: 10px; height: 10px; } .BPT-DataTree .BPT-DataTreeItem-Collapsed > .BPT-DataTreeItem-ExpandIcon { background-image: url(''); /*[url({plugin-image-icon-item-collapsed})]*/ background-size: 10px 10px; } .BPT-DataTree .BPT-DataTreeItem-Expanded > .BPT-DataTreeItem-ExpandIcon { background-image: url(''); /*[url({plugin-image-icon-item-expanded})]*/ background-size: 10px 10px; } .BPT-DataTreeItem-ChildCollection { } .BPT-DataTreeItem-Header { display:inline-block; left: 0; right: 0; border: 1px solid transparent; border-radius: 3px; margin-left: 8px; margin-bottom: 0; padding: 1px 0; } .BPT-DataTreeItem-CollapsedBlockFooter { display: inline; } .BPT-DataTreeItem-BlockFooter { display: none; margin-left: 10px; } .BPT-DataTreeItem-Expanded.BPT-DataTreeItem-CollapsibleBlock > .BPT-DataTreeItem-Header > .BPT-DataTreeItem-Name > .BPT-DataTreeItem-CollapsedBlockFooter { display: none; } .BPT-DataTreeItem-Expanded > .BPT-DataTreeItem-BlockFooter { display: block; } .BPT-DataTreeItem-FileLink-Right { display: block; float: right; max-width: 100px; overflow: hidden; text-overflow: ellipsis; padding: 2px; } .BPT-DataTreeItem-Header > .BPT-DataTreeItem-FileLink-Right { padding: 0; } .BPT-DataTreeItem-FileLink-Value { max-width: 12em; text-overflow: ellipsis; overflow: hidden; color: #007acc; /*[{plugin-link-color}]*/ } .BPT-DataTreeItem-Name { display: inline-block; width: 150px; min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; } .BPT-DataTreeItem-Name input[type="checkbox"]{ position: relative; top: -1px; padding: 0; margin: 0 2px 0 3px; vertical-align: middle; } .BPT-DataTreeItem-Value { display: inline-block; overflow: auto; vertical-align: top; min-height: 1.3em; min-width: 50px; } .BPT-DataTreeItem-CollapsibleBlock > .BPT-DataTreeItem-Header > .BPT-DataTreeItem-Name { overflow: hidden; width: auto; white-space: normal; max-width: 100%; margin-right: 0; word-wrap: break-word; } .BPT-DataTreeItem-CollapsibleBlock > .BPT-DataTreeItem-Header > .BPT-DataTreeItem-Value { min-width: 0; } .BPT-DataTreeItem-Selected { border-left: 1px solid transparent; } .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header { background-color: transparent; border-color: transparent; } body.showFocus .BPT-DataTree-Container-CurrentFocus .BPT-DataTreeItem-Selected > .BPT-FileLink { border: 1px dotted #3399FF; /*[1px dotted {plugin-font-editor-selected-background-color}]*/ } .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-Tag, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-Attribute, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-Value, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-Operator, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-Text, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-Comment, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-Comment + .BPT-HTML-Text, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-DocType + .BPT-HTML-Text, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-CSS-Name, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-CSS-Value, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-CSS-Selector, .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header .BPT-HTML-CSS-Text { background: transparent; } body .BPT-DataTree-Container:focus .BPT-DataTreeItem-Selected, body .BPT-DataTree-Container-CurrentFocus .BPT-DataTreeItem-Selected, body .BPT-DataTree-Container-KeepSelection .BPT-DataTreeItem-Selected { border-color: #3399FF; /*[{plugin-font-editor-selected-background-color}]*/ } body .BPT-DataTree-Container:focus .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header, body .BPT-DataTree-Container-CurrentFocus .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header, body .BPT-DataTree-Container-KeepSelection .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header { background: rgba(51, 153, 255, 0.25); /*[{plugin-font-editor-selected-background-color rgba(0.25)}]*/ border-color: #3399FF; /*[{plugin-font-editor-selected-background-color}]*/ } body.BPT-ToolWindow-NoFocus .BPT-DataTree-Container:focus .BPT-DataTreeItem-Selected, body.BPT-ToolWindow-NoFocus .BPT-DataTree-Container-CurrentFocus .BPT-DataTreeItem-Selected, body.BPT-ToolWindow-NoFocus .BPT-DataTree-Container-KeepSelection .BPT-DataTreeItem-Selected { border-color: transparent; } body.BPT-ToolWindow-NoFocus .BPT-DataTree-Container:focus .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header, body.BPT-ToolWindow-NoFocus .BPT-DataTree-Container-CurrentFocus .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header, body.BPT-ToolWindow-NoFocus .BPT-DataTree-Container-KeepSelection .BPT-DataTreeItem-Selected > .BPT-DataTreeItem-Header { background: rgba(191, 205, 219, 0.25); /*[{plugin-font-editor-inactive-selected-background-color rgba(0.25)}]*/ border-color: #BFCDDB; /*[{plugin-font-editor-inactive-selected-background-color}]*/ } var Common; (function (Common) { "use strict"; var EncodingUtilities = (function () { function EncodingUtilities() { } EncodingUtilities.escapeRegExp = function (value) { return String.prototype.replace.call(value, EncodingUtilities.ESCAPE_USER_INPUT_REGEX, "\\$&"); }; EncodingUtilities.escapeRegExpWithWildCard = function (value) { return String.prototype.replace.call(value, EncodingUtilities.ESCAPE_USER_INPUT_REGEX, function (match) { var newValue; if (match === "\*") { newValue = ".*"; } else { newValue = "\\" + match; } return newValue; }); }; EncodingUtilities.wrapInQuotes = function (stringToWrap) { return "\"" + String.prototype.replace.call(stringToWrap, /\\"/g, "\"") + "\""; }; EncodingUtilities.unescapeHtml = function (htmlString) { if ((typeof htmlString) !== "string") { if (htmlString === null || htmlString === undefined) { return ""; } htmlString = "" + htmlString; } return (String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(htmlString, />/g, ">"), /</g, "<"), /'/g, "'"), /"/g, "\""), /&/g, "&")); }; EncodingUtilities.escapeHtml = function (htmlString) { if ((typeof htmlString) !== "string") { if (htmlString === null || htmlString === undefined) { return ""; } htmlString = "" + htmlString; } return (String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(String.prototype.replace.call(htmlString, /&/g, "&"), /"/g, """), /'/g, "'"), //g, ">")); }; EncodingUtilities.ESCAPE_USER_INPUT_REGEX = /([.+?^=!:${}()|\[\]\/\\])|(\*)/g; return EncodingUtilities; })(); Common.EncodingUtilities = EncodingUtilities; })(Common || (Common = {})); .BPT-HtmlTree-Container:focus { outline: 0; } .BPT-HTML { font-family: "Consolas", Lucida Console, monospace; /*[{plugin-font-editor} , Lucida Console, monospace]*/ font-size: 9pt; /*[{plugin-font-editor-size}]*/ font-weight: normal; /*[{plugin-font-editor-weight}]*/ color: TRANSPARENT; /*[{plugin-font-editor-html-tag-color}]*/ } .BPT-HTML-Tag { color: TRANSPARENT; /*[{plugin-font-editor-html-element-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-element-weight}]*/ } .BPT-HTML-DocType, .BPT-HTML-DocType + .BPT-HTML-Text { color: TRANSPARENT; /*[{plugin-font-editor-html-comment-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-comment-weight}]*/ cursor: default; } .BPT-HTML-Comment, .BPT-HTML-Comment + .BPT-HTML-Text { color: TRANSPARENT; /*[{plugin-font-editor-html-comment-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-comment-weight}]*/ cursor: default; } .BPT-HTML-Attribute { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-name-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-attribute-name-weight}]*/ } .BPT-HTML-Value { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-value-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-attribute-value-weight}]*/ } .BPT-HTML-Text { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-operator-weight}]*/ white-space: pre-wrap; } .BPT-HTML-CSS-Name { color: TRANSPARENT; /*[{plugin-font-editor-css-name-color}]*/ font-weight: normal; /*[{plugin-font-editor-css-name-weight}]*/ } .BPT-HTML-CSS-Value { color: TRANSPARENT; /*[{plugin-font-editor-css-value-color}]*/ font-weight: normal; /*[{plugin-font-editor-css-value-weight}]*/ } .BPT-HTML-CSS-Selector { color: TRANSPARENT; /*[{plugin-font-editor-css-selector-color}]*/ font-weight: normal; /*[{plugin-font-editor-css-selector-weight}]*/ } .BPT-HTML-CSS-ParentRule { color: TRANSPARENT; /*[{plugin-font-editor-css-selector-color}]*/ font-weight: normal; } .BPT-HTML-CSS-Text { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ font-weight: normal; /*[{plugin-font-editor-weight}]*/ } .BPT-HTML-CSS-SelectorTag { font-style:italic; } .BPT-HTML-CSS-InlinedSelector { font-style:italic; } .BPT-HTML-Numbering { display: inline-block; min-width: 25px; } .BPT-HTML-Tag > input { vertical-align: -2px } .BPT-Style-Disabled span { text-decoration: line-through; } .BPT-HtmlTreeItem { padding-left: 10px; border-left: 1px solid transparent; cursor: default; position: relative; margin: -2px 0 -2px 5px; word-wrap: break-word; min-width: 400px; } .BPT-HtmlTreeItem-HiddenRoot { padding-left: 0px; } .BPT-HtmlTreeItem-Expanded { background-repeat: no-repeat; background-position: 3px 5px; } .BPT-HtmlTreeItem-Collapsed { background-repeat: no-repeat; background-position: 3px 5px; } .BPT-HtmlTreeItem-Expanded .BPT-HtmlTreeItem { display: block; } .BPT-HtmlTreeItem-Collapsed .BPT-HtmlTreeItem { display: none; } .BPT-HtmlTreeItem-ExpandIcon { left: 3px; top: 6px; position: absolute; width: 10px; height: 10px; } .BPT-HtmlTree .BPT-HtmlTreeItem-Collapsed > .BPT-HtmlTreeItem-ExpandIcon { background-image: url(''); /*[url({plugin-image-icon-item-collapsed})]*/ background-size: 10px 10px; } .BPT-HtmlTree .BPT-HtmlTreeItem-Expanded > .BPT-HtmlTreeItem-ExpandIcon { background-image: url(''); /*[url({plugin-image-icon-item-expanded})]*/ background-size: 10px 10px; } .BPT-HtmlTreeItem-Header { left: 0px; right: 0px; font-size: 12px; line-height: 1.5em; border: 1px solid transparent; margin-left: 8px; padding: 0px; } .BPT-HtmlTreeItem-Footer { left: 0px; right: 0px; font-size: 12px; line-height: 1.3em; border: 1px solid transparent; margin-left: 8px; padding: 0px 0px 1px 0px; display: none; } .BPT-HtmlTreeItem-Expanded > .BPT-HtmlTreeItem-Footer { display: block; } .BPT-HtmlTreeItem-Expanded > .BPT-HtmlTreeItem-Header > .BPT-HtmlTreeItem-CollapsedFooter { display: none; } .BPT-HtmlTreeItem-Header:hover { background-color: transparent; border-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color rgba(0.25)}]*/ } body.BPT-ToolWindow-NoFocus .BPT-HtmlTreeItem-Header:hover { border-color: TRANSPARENT; /*[{plugin-font-editor-selected-background-color rgba(0.25)}]*/ } .BPT-HtmlTreeItem-HiddenRoot > .BPT-HtmlTreeItem-Header:hover { background-color: transparent; border-color: transparent; } .BPT-HtmlTreeItem-Selected { border-left: 1px solid transparent; } .BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header { background-color: transparent; border-color: transparent; } body .BPT-HtmlTree-Container:focus .BPT-HtmlTreeItem-Selected, body .BPT-HtmlTree-Container-KeepSelection .BPT-HtmlTreeItem-Selected { border-left-color: TRANSPARENT; /*[{plugin-font-editor-collapse-adornment-color}]*/ } body .BPT-HtmlTree-Container:focus .BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header, body .BPT-HtmlTree-Container-KeepSelection .BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header { background: rgba(51, 153, 255, 0.18); /*[{plugin-font-editor-selected-background-color rgba(0.18)}]*/ border-color: transparent; /*[{plugin-font-editor-selected-border-color}]*/ } body.BPT-ToolWindow-NoFocus .BPT-HtmlTree-Container:focus .BPT-HtmlTreeItem-Selected, body.BPT-ToolWindow-NoFocus .BPT-HtmlTree-Container-KeepSelection .BPT-HtmlTreeItem-Selected { border-left-color: transparent; } body.BPT-ToolWindow-NoFocus .BPT-HtmlTree-Container:focus .BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header, body.BPT-ToolWindow-NoFocus .BPT-HtmlTree-Container-KeepSelection .BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header { background: transparent; border-color: transparent; } .BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header .BPT-HTML-Attribute-Changed, .BPT-HTML-Attribute-Changed { background-color: TRANSPARENT; /*[{plugin-highlight-background-color rgba(0.35)}]*/ color:TRANSPARENT; /*[{plugin-highlight-color}]*/ } .BPT-HtmlTree-ChildCollection-ShowAll { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-weight}]*/ white-space: pre-wrap; display: inline-block; position: relative; margin-left: 10px; margin-bottom: 1px; } .BPT-HtmlTree-ChildCollection-ShowAll:hover, .BPT-HtmlTree-ChildCollection-ShowAll.BPT-HtmlTreeItem-Selected { text-decoration: underline; } .BPT-HtmlTreeItem-Hover.BPT-HtmlTreeItem-DropBefore { border-top: 1px solid blue; } .BPT-HtmlTreeItem-Hover.BPT-HtmlTreeItem-DropAfter { border-bottom: 1px solid blue; } /* adds angle bracket before opening HTML tags */ div.BPT-HtmlTree > div.BPT-HtmlTree-ChildCollection > .BPT-HtmlTreeItem .BPT-HtmlTreeItem-Header .BPT-HTML-Tag::before { content: "<"; color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } /* adds angle slash before closing HTML tags */ div.BPT-HtmlTree > div.BPT-HtmlTree-ChildCollection > .BPT-HtmlTreeItem .BPT-HtmlTreeItem-CollapsedFooter .BPT-HTML-Tag::before, div.BPT-HtmlTree > div.BPT-HtmlTree-ChildCollection > .BPT-HtmlTreeItem .BPT-HtmlTreeItem-Footer .BPT-HTML-Tag::before { content: " span:first-child > span:first-child::after, /* closes the opening tag of a tag pair */ .BPT-HtmlTreeItem-Header > .BPT-HtmlTreeItem-CollapsedFooter::after, /* closes the closing tag of a collapsed tag pair */ .BPT-HtmlTreeItem-Footer::after /* closes the closing tag of an expanded tag pair */ { content: ">"; color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } /* ... but not to special tags */ div[data-tag^="#"] > .BPT-HtmlTreeItem-Header > span:first-child > span:first-child::after, /* closes the opening tag of a tag pair */ div[data-tag^="#"] > .BPT-HtmlTreeItem-Header > .BPT-HtmlTreeItem-CollapsedFooter::after, /* closes the closing tag of a collapsed tag pair */ div[data-tag^="#"] > .BPT-HtmlTreeItem-Footer::after /* closes the closing tag of an expanded tag pair */ { content: ""; } /* Add space before attribute name, = after the attribute name, and " before-and-after attribute value. */ div.BPT-HtmlTree > div.BPT-HtmlTree-ChildCollection > .BPT-HtmlTreeItem .BPT-HTML-Attribute-Section .BPT-HTML-Attribute::before { content:" "; } div.BPT-HtmlTree > div.BPT-HtmlTree-ChildCollection > .BPT-HtmlTreeItem .BPT-HTML-Attribute-Section .BPT-HTML-Attribute::after { content:"="; color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } div.BPT-HtmlTree > div.BPT-HtmlTree-ChildCollection > .BPT-HtmlTreeItem .BPT-HTML-Attribute-Section .BPT-HTML-Value::before, div.BPT-HtmlTree > div.BPT-HtmlTree-ChildCollection > .BPT-HtmlTreeItem .BPT-HTML-Attribute-Section .BPT-HTML-Value::after { content:"\""; } var isDebugBuild = false; //@ sourceMappingURL=isDebugBuild.js.map .listBox { padding: 0px; cursor: default; border: 1px solid black; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: 12px; list-style-type: none; overflow-y: scroll; overflow-x: hidden; -ms-user-select: none; } .listBox ::selection{ background-color: transparent; } .listBox li { -ms-user-select: none; } .listBox li:hover{ background-color: #DBFFFC; } .listBox li[selected=selected] { background-color: blue; color: white; } (function () { var cookie, pluginUrl = window.external.pluginUrl || (cookie = document.cookie.match(/(?:^|;)\s?pluginUrl=(.*?)(?:;|$)/)) && unescape(cookie[1]) || "plugin.b.js", scripts = document.getElementsByTagName('script'); if (scripts && pluginUrl) { for (var i = 0; i < scripts.length; i++) { var script = scripts[i]; var src = script.src; if (/(^|\\|\/)plugin.js$/.test(src)) { var newScript = document.createElement("script"); newScript.src = pluginUrl; script.parentElement.insertBefore(newScript, script.nextSibling); break; } } } })(); var Common; (function (Common) { "use strict"; var EditStack = (function () { function EditStack() { this._undoLimit = 100; this._singleEdit = false; this._undoActions = 0; this._doActions = 0; this.reset(); } EditStack.prototype.setTestEditCallbacks = function (testEditCallback, testUndoCallback) { this._testEditCallback = testEditCallback; this._testUndoCallback = testUndoCallback; }; EditStack.prototype.setLimit = function (newLimit) { this._undoLimit = newLimit; }; EditStack.prototype.getLimit = function () { return this._undoLimit; }; EditStack.prototype.reset = function () { this._undoStack = new Array(); this._doStack = new Array(); this._chainingUid = null; this._chainingLevel = 0; }; EditStack.prototype.performEdit = function (edit) { var editWorked = false; try { editWorked = edit.performEdit(); } catch (e) { editWorked = false; } if (editWorked) { if (this._singleEdit) { var singleEdit = edit; if (!singleEdit.getOldValue || !singleEdit.setOldValue) { return false; } if (!this._singleEditFirstEdit) { this._singleEditFirstEdit = singleEdit; } this._singleEditLastEdit = singleEdit; } else { this._pushEdit(edit); } } if (this._testEditCallback) { this._testEditCallback(editWorked); } return editWorked; }; EditStack.prototype.startSingleEdit = function () { this._singleEdit = true; }; EditStack.prototype.endSingleEdit = function () { this._singleEdit = false; if (this._singleEditFirstEdit) { var firstValue = this._singleEditFirstEdit.getOldValue(); this._singleEditLastEdit.setOldValue(firstValue); if (this._singleEditLastEdit.hasValueChanged()) { this._pushEdit(this._singleEditLastEdit); } } this._singleEditFirstEdit = undefined; this._singleEditLastEdit = undefined; }; EditStack.prototype.enableChaining = function () { this._chainingLevel++; if (this._chainingLevel > 1) { return; } this._chainingUid = remoteHelpers.getUid(); }; EditStack.prototype.disableChaining = function () { if (this._chainingLevel > 0) { this._chainingLevel--; if (this._chainingLevel === 0) { var edit = this._peek(this._undoStack); var aChainedEditWasAdded = edit && edit.chainingUid === this._chainingUid; this._chainingUid = null; if (aChainedEditWasAdded) { this._undoActions++; this._checkIfOverLimit(); } } } else { } }; EditStack.prototype.undo = function () { var retValue = true; try { if (this.somethingToUndo()) { var edit = this._undoStack.pop(); if (!edit.performUndo()) { this.reset(); retValue = false; } else { this._doStack.push(edit); while (this.somethingToUndo() && edit.chainingUid) { var nextItemToUndo = this._undoStack.pop(); if (nextItemToUndo.chainingUid !== edit.chainingUid) { this._undoStack.push(nextItemToUndo); break; } edit = nextItemToUndo; if (!edit.performUndo()) { this.reset(); retValue = false; break; } else { this._doStack.push(edit); } } } this._undoActions--; this._doActions++; } } catch (e) { retValue = false; } if (this._testUndoCallback) { this._testUndoCallback(retValue); } return retValue; }; EditStack.prototype.performNextEdit = function () { var retValue = true; try { if (this.somethingToDo()) { var edit = this._doStack.pop(); if (!edit.performEdit(true)) { this.reset(); retValue = false; } else { this._undoStack.push(edit); while (this.somethingToDo() && edit.chainingUid) { var nextitemtodo = this._doStack.pop(); if (nextitemtodo.chainingUid !== edit.chainingUid) { this._doStack.push(nextitemtodo); break; } edit = nextitemtodo; if (!edit.performEdit(true)) { this.reset(); retValue = false; break; } else { this._undoStack.push(edit); } } } this._undoActions++; this._doActions--; } } catch (e) { retValue = false; } if (this._testEditCallback) { this._testEditCallback(retValue); } return retValue; }; EditStack.prototype.somethingToUndo = function () { return (this._undoStack.length > 0); }; EditStack.prototype.somethingToDo = function () { return (this._doStack.length > 0); }; EditStack.prototype._pushEdit = function (edit) { edit.chainingUid = this._chainingUid; this._undoStack.push(edit); this._doStack = []; this._doActions = 0; if (!this._chainingUid) { this._undoActions++; this._checkIfOverLimit(); } }; EditStack.prototype._checkIfOverLimit = function () { while (this._doActions + this._undoActions > this._undoLimit) { var edit = this._undoStack[0]; if (!edit.chainingUid) { this._undoStack.shift(); } else { while ((this._undoStack.length > 0) && (this._undoStack[0].chainingUid === edit.chainingUid)) { this._undoStack.shift(); } } this._undoActions--; } }; EditStack.prototype._peek = function (stack) { var edit = stack.pop(); stack.push(edit); return edit; }; return EditStack; })(); Common.EditStack = EditStack; })(Common || (Common = {})); var htmlTreeHelpers; var errorHandler; var Common; (function (Common) { "use strict"; (function (Direction) { Direction[Direction["Previous"] = -1] = "Previous"; Direction[Direction["Next"] = 1] = "Next"; })(Common.Direction || (Common.Direction = {})); var Direction = Common.Direction; ; var RemoteHelpers = (function () { function RemoteHelpers(messageHandlers) { this.pendingMessages = []; this.pendingMessagesMap = {}; this.pendingTimeout = false; this.port = null; this.portId = 0; this.portReady = false; this.onDetachCallback = null; this.initializeDocumentMaxTries = 15; this.initializeDocumentTries = 0; this.childrenElementLimit = 200; this.uid = 0; this.isEvalModified = false; this.isExecScriptModified = false; this._messageHandlers = messageHandlers; } RemoteHelpers.getJMCScriptUrl = function (library) { return RemoteHelpers.JMC_SCRIPT_URL.replace("{0}", library); }; RemoteHelpers.encounteredException = function (e) { }; RemoteHelpers.addListener = function (source, name, fn, useCapture) { if (RemoteHelpers.getDocumentMode() >= 9) { if (useCapture) { source.addEventListener(name, fn, useCapture); } else { source.addEventListener(name, fn); } } else if (typeof source.addEventListener === "function") { source.addEventListener(name, fn); } else { source.attachEvent("on" + name, fn); } }; RemoteHelpers.addSafeListener = function (context, source, name, fn, useCapture) { var safeFunction = remoteHelpers.createSafeFunction(context, fn); Common.RemoteHelpers.addListener(source, name, safeFunction, useCapture); return safeFunction; }; RemoteHelpers.removeListener = function (source, name, fn, useCapture) { if (RemoteHelpers.getDocumentMode() >= 9) { if (useCapture) { source.removeEventListener(name, fn, useCapture); } else { source.removeEventListener(name, fn); } } else if (typeof source.removeEventListener === "function") { source.removeEventListener(name, fn); } else { source.detachEvent("on" + name, fn); } }; RemoteHelpers.getDefaultView = function (doc) { if (doc) { if (RemoteHelpers.getDocumentMode() >= 9) { return doc.defaultView; } else { return doc.parentWindow; } } return null; }; RemoteHelpers.isElement = function (view, obj) { if (view && obj) { return (typeof view.Element === "object" ? obj instanceof view.Element : typeof obj === "object" && obj.nodeType === 1 && typeof obj.nodeName === "string"); } return false; }; RemoteHelpers.getEventTarget = function (e) { if (RemoteHelpers.getDocumentMode() >= 9) { return e.target; } else { return e.srcElement; } }; RemoteHelpers.getComputedStyle = function (win, element) { if (RemoteHelpers.getDocumentMode() >= 9) { var computedStyles = win.getComputedStyle(element); var result = {}; var propertyName, propertyValue; for (var i = 0; i < computedStyles.length; i++) { propertyName = computedStyles[i]; propertyValue = computedStyles.getPropertyValue(propertyName); result[propertyName] = propertyValue; } result["getPropertyValue"] = function (name) { return this[name]; }; return result; } else { var curStyle = element.currentStyle; var computedStyle = {}; for (var i = 0; i < RemoteHelpers.COMPUTED_PROPERTIES_IN_IE8.length; i++) { var value = curStyle.getAttribute(RemoteHelpers.COMPUTED_PROPERTIES_IN_IE8[i]); if (!value) { continue; } computedStyle[RemoteHelpers.javascriptToCssName(RemoteHelpers.COMPUTED_PROPERTIES_IN_IE8[i])] = value; } computedStyle["getPropertyValue"] = function (name) { return this[name]; }; return computedStyle; } }; RemoteHelpers.getPageOffset = function (doc) { var view = RemoteHelpers.getDefaultView(doc); if (RemoteHelpers.getDocumentMode() >= 9) { return { x: view.pageXOffset, y: view.pageYOffset }; } else { return { x: view.document.body.scrollLeft, y: view.document.body.scrollTop }; } }; RemoteHelpers.getRuleForStyleObject = function (style, element) { return RemoteHelpers.searchStyleSheetForStyleObject(element.ownerDocument.styleSheets, style); }; RemoteHelpers.getDocumentMode = function () { var documentMode = browser.documentMode; if (browser.documentMode === 0) { try { documentMode = browser.defaultDocumentMode; } catch (ex) { documentMode = 80000; } } return documentMode / 10000.0; }; RemoteHelpers.getIsLeftMouseButton = function (button) { if (RemoteHelpers.getDocumentMode() >= 9) { return button === 0; } else { return button === 1; } }; RemoteHelpers.eventHandled = function (event) { if (RemoteHelpers.getDocumentMode() >= 9) { event.stopPropagation(); event.preventDefault(); return false; } else { event.cancelBubble = true; return false; } }; RemoteHelpers.getLeafTextContent = function (ele) { if (ele.childNodes) { if (ele.childNodes.length > 1) { return; } else if (ele.childNodes.length === 1) { var subnode = ele.childNodes[0]; if (subnode.childNodes && subnode.childNodes.length > 0) { return; } } } return Common.RemoteHelpers.getTextContent(ele); }; RemoteHelpers.getTextContent = function (ele) { var docMode = RemoteHelpers.getDocumentMode(); if (docMode === 9 && ele.nodeType === ele.COMMENT_NODE && ele.length < 0) { return; } else if (docMode >= 9) { if (ele.nodeType === ele.COMMENT_NODE || ele.nodeType === ele.TEXT_NODE) { return ele.data; } if (ele.childNodes && ele.childNodes.length === 1 && ele.childNodes[0].nodeType === ele.TEXT_NODE) { return ele.childNodes[0].data; } return ele.textContent; } else if (ele.innerText) { return ele.innerText; } else if (typeof ele.data === "string") { return ele.data; } }; RemoteHelpers.getDocumentTypeNodeText = function (documentType) { var result = ""; if (documentType.nodeType !== documentType.DOCUMENT_TYPE_NODE) { return result; } result = ""; return result; }; RemoteHelpers.isWindow = function (obj) { if (RemoteHelpers.getDocumentMode() > 8) { return Object.prototype.toString.call(obj) === "[object Window]"; } else { try { return obj && obj.toString && obj.toString() === "[object Window]"; } catch (e) { return false; } } }; RemoteHelpers.isCrossSiteWindow = function (currentWindowContext, obj) { try { var x = currentWindowContext.Object.getOwnPropertyNames(obj); } catch (e) { return true; } return false; }; RemoteHelpers.getValidWindow = function (context, obj) { try { if (RemoteHelpers.isWindow(obj)) { var w = obj; if (RemoteHelpers.isCrossSiteWindow(context, obj)) { w = dom.getCrossSiteWindow(context, obj); } if (w && w.document) { return { isValid: true, window: w }; } } } catch (e) { } return { isValid: false, window: null }; }; RemoteHelpers.prototype.useTimeout = function () { return (toolUI.getBreakFlags() === 0); }; RemoteHelpers.prototype.isDiagnosticsOM = function () { return (typeof browser !== "undefined"); }; RemoteHelpers.prototype.isDiagnosticsOMVersionSupported = function () { return (typeof diagnostics !== "undefined" && typeof browser !== "undefined" && typeof emulation !== "undefined" && typeof emulation.geoLocation !== "undefined"); }; RemoteHelpers.prototype.initialize = function (portName, handshakeCallback, windowShouldHave, onDetachCallback) { errorHandler = new ErrorHandlers(); htmlTreeHelpers = new HtmlTreeHelpers(); errorHandler.initializeListeners(); remoteHelpers._windowShouldHave = windowShouldHave; if (typeof browser !== "undefined") { Common.RemoteHelpers.addListener(browser, "documentComplete", remoteHelpers.onDocumentComplete); } remoteHelpers.onDetachCallback = onDetachCallback; Common.RemoteHelpers.addListener(toolUI, "detach", remoteHelpers.onDetach); Common.RemoteHelpers.addListener(toolUI, "breakpointhit", remoteHelpers.onBreak); remoteHelpers.portId++; var port = new Common.PortThrottler(toolUI.createPort(portName + remoteHelpers.portId)); port.initialize(); remoteHelpers.port = port; if (remoteHelpers.port) { remoteHelpers.port.addEventListener("message", remoteHelpers.processMessages); toolUI.connect(remoteHelpers.port); handshakeCallback(); } remoteHelpers._handshakeCallback = handshakeCallback; }; RemoteHelpers.prototype.initializeScriptEngines = function (win) { if (win) { if (win.document && win.document.scripts && win.document.scripts.length === 0) { if (win.eval) { win.eval("void(0);"); } else if (win.execScript) { win.execScript("void(0);", "JavaScript"); } } try { if (win.frames) { for (var i = 0; i < win.frames.length; i++) { var frame = win.frames[i]; var result = RemoteHelpers.getValidWindow(win, frame); if (result.isValid) { remoteHelpers.initializeScriptEngines(result.window); } } } } catch (e) { } } }; RemoteHelpers.prototype.onDocumentComplete = function (dispatchWindow) { if (remoteHelpers._windowShouldHave) { var doc = null; if (dispatchWindow) { if (dispatchWindow.browserOrWindow) { dispatchWindow = dispatchWindow.browserOrWindow; } try { if (dispatchWindow.document) { doc = dispatchWindow.document; } } catch (e) { } if (!doc) { try { if (dispatchWindow.Document) { doc = dispatchWindow.Document; } } catch (e) { } } if (!doc || doc.parentWindow[remoteHelpers._windowShouldHave]) { return; } try { browser.executeScript("void(0);" + RemoteHelpers.getJMCScriptUrl("library"), doc.parentWindow); } catch (ex) { } } } }; RemoteHelpers.prototype.onDetach = function () { remoteHelpers.uid = 0; remoteHelpers.pendingMessages = []; remoteHelpers.pendingMessagesMap = {}; remoteHelpers.pendingTimeout = false; remoteHelpers.isEvalModified = false; remoteHelpers.isExecScriptModified = false; htmlTreeHelpers.reset(); if (remoteHelpers.onDetachCallback) { remoteHelpers.onDetachCallback(); } }; RemoteHelpers.prototype.onBreak = function () { remoteHelpers.postAllMessages(); }; RemoteHelpers.prototype.getUid = function () { return "uid" + (remoteHelpers.uid++).toString(36); }; RemoteHelpers.prototype.processMessages = function (msg) { if (msg.data === "InitializeDocument") { remoteHelpers._handshakeCallback(); return; } var createVSPostFunction = function remoteHelpers$processMessages$createVSPostFunction(uid) { return function remoteHelpers$processMessages$createVSPostFunction$createdFunction(arg, hash, postMessageImmediately) { var isFromCallback = postMessageImmediately ? false : true; remoteHelpers.postObject({ uid: uid, args: [arg] }, hash, isFromCallback); }; }; var messages; try { messages = JSON.parse(msg.data); } catch (ex) { return; } for (var i = 0; i < messages.length; i++) { var obj = messages[i]; if (remoteHelpers._messageHandlers[obj.command]) { var args = obj.args; for (var j = 0; j < args.length; j++) { if (args[j] && args[j].type === "callback") { args[j] = createVSPostFunction(args[j].uid); } } var returnValue = remoteHelpers._messageHandlers[obj.command].apply(remoteHelpers, args); if (returnValue && returnValue.suppressPostObject) { continue; } remoteHelpers.postObject({ uid: obj.uid, args: (returnValue !== undefined ? [returnValue] : returnValue) }); } } }; RemoteHelpers.prototype.postObject = function (obj, hash, isFromCallBack) { if (hash) { remoteHelpers.pendingMessagesMap[hash] = obj; } else { remoteHelpers.pendingMessages.push(obj); } if (remoteHelpers.useTimeout() && isFromCallBack) { if (!remoteHelpers.pendingTimeout) { diagnostics.setTimeout(remoteHelpers.postAllMessages, 50); remoteHelpers.pendingTimeout = true; } } else { remoteHelpers.postAllMessages(); } }; RemoteHelpers.prototype.postAllMessages = function () { for (var key in remoteHelpers.pendingMessagesMap) { remoteHelpers.pendingMessages.push(remoteHelpers.pendingMessagesMap[key]); } if (remoteHelpers.pendingMessages.length > 0) { var messageString = ""; try { messageString = JSON.stringify(remoteHelpers.pendingMessages); } catch (e) { errorHandler.handleError(e.toString(), "remoteHelpers.js", null); } remoteHelpers.pendingMessages = []; remoteHelpers.pendingMessagesMap = {}; remoteHelpers.pendingTimeout = false; if (messageString.length > 0) { try { remoteHelpers.port.postMessage(messageString); } catch (e) { } } } }; RemoteHelpers.prototype.createSafeFunction = function (win, func) { if (RemoteHelpers.getDocumentMode() < 9) { return browser.createSafeFunction(win, func); } var safeAssertFunction = browser.createSafeFunction(win, function (e) { F12.Tools.Utility.Assert.failDebugOnly(e.message || e.description || "Unknown Error"); }); if (!win.__BROWSERTOOLS_CONSOLE_SAFEFUNC) { var browserToolsWrapper = function (fn, safeAssert) { var returnFn = function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { try { return fn(arguments); } catch (e) { safeAssert(e); } }; return returnFn; }; var scriptForWrapper = "window.__BROWSERTOOLS_CONSOLE_SAFEFUNC = " + browserToolsWrapper.toString(); scriptForWrapper = JSON.stringify(scriptForWrapper).slice(1, -1); browser.executeScript(scriptForWrapper + RemoteHelpers.getJMCScriptUrl("library"), win); } return win.__BROWSERTOOLS_CONSOLE_SAFEFUNC(browser.createSafeFunction(win, function (a) { return func.apply(win, a); }), safeAssertFunction); }; RemoteHelpers.searchStyleSheetForStyleObject = function (sheets, style) { for (var i = 0; i < sheets.length; i++) { var sheet = sheets[i]; try { var rules = sheet.rules; var rule; if (rules) { for (var j = 0; j < rules.length; j++) { rule = rules[j]; if (rule.style === style) { return rule; } } } if (sheet.imports && sheet.imports.length) { rule = RemoteHelpers.searchStyleSheetForStyleObject(sheet.imports, style); if (rule) { return rule; } } } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } } }; RemoteHelpers.javascriptToCssName = function (javascriptName) { if (javascriptName === "styleFloat") { return "float"; } var cssName = javascriptName.replace(/[A-Z]/g, function (match) { return "-" + match.substring(0).toLowerCase(); }); if (cssName.indexOf("ms-") === 0) { cssName = "-ms-" + cssName.substr(3); } return cssName; }; RemoteHelpers.COMPUTED_PROPERTIES_IN_IE8 = [ "accelerator", "animation", "animationDelay", "animationDirection", "animationDuration", "animationFillMode", "animationIterationCount", "animationName", "animationPlayState", "animationTimingFunction", "backfaceVisibility", "background", "backgroundAttachment", "backgroundClip", "backgroundColor", "backgroundImage", "backgroundOrigin", "backgroundPosition", "backgroundPositionX", "backgroundPositionY", "backgroundRepeat", "backgroundSize", "baselineShift", "behavior", "blockDirection", "border", "borderBottom", "borderBottomColor", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStyle", "borderBottomWidth", "borderCollapse", "borderColor", "borderLeft", "borderLeftColor", "borderLeftStyle", "borderLeftWidth", "borderRadius", "borderRight", "borderRightColor", "borderRightStyle", "borderRightWidth", "borderSpacing", "borderStyle", "borderTop", "borderTopColor", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStyle", "borderTopWidth", "borderWidth", "bottom", "boxShadow", "boxSizing", "breakAfter", "breakBefore", "breakInside", "captionSide", "clear", "clip", "clipBottom", "clipLeft", "clipPath", "clipRight", "clipTop", "color", "columnCount", "columnFill", "columnGap", "columnRule", "columnRuleColor", "columnRuleStyle", "columnRuleWidth", "columnSpan", "columnWidth", "constructor", "content", "counterIncrement", "counterReset", "cssFloat", "cssText", "cursor", "direction", "display", "dominantBaseline", "emptyCells", "fill", "fillOpacity", "fillRule", "filter", "font", "fontFamily", "fontSize", "fontSizeAdjust", "fontStretch", "fontStyle", "fontVariant", "fontWeight", "fontWeight", "glyphOrientationHorizontal", "glyphOrientationVertical", "hasLayout", "height", "imeMode", "kerning", "layoutFlow", "layoutGrid", "layoutGridChar", "layoutGridLine", "layoutGridMode", "layoutGridType", "left", "length", "letterSpacing", "lineBreak", "lineHeight", "listStyle", "listStyleImage", "listStylePosition", "listStyleType", "margin", "marginBottom", "marginLeft", "marginRight", "marginTop", "marker", "markerEnd", "markerMid", "markerStart", "mask", "maxHeight", "maxWidth", "minHeight", "minWidth", "msBlockProgression", "msGridColumn", "msGridColumnAlign", "msGridColumns", "msGridColumnSpan", "msGridRow", "msGridRowAlign", "msGridRows", "msGridRowSpan", "msInterpolationMode", "msProgressAppearance", "opacity", "orphans", "outline", "outlineColor", "outlineStyle", "outlineWidth", "overflow", "overflowX", "overflowY", "padding", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "pageBreakAfter", "pageBreakBefore", "pageBreakInside", "parentRule", "perspective", "perspectiveOrigin", "pointerEvents", "position", "quotes", "right", "rubyAlign", "rubyOverhang", "rubyPosition", "scrollbar3dLightColor", "scrollbarArrowColor", "scrollbarBaseColor", "scrollbarDarkShadowColor", "scrollbarFaceColor", "scrollbarHighlightColor", "scrollbarShadowColor", "scrollbarTrackColor", "stopColor", "stopOpacity", "stroke", "strokeDasharray", "strokeDashoffset", "strokeLinecap", "strokeLinejoin", "strokeMiterlimit", "strokeOpacity", "strokeWidth", "styleFloat", "tableLayout", "textAlign", "textAlignLast", "textAutospace", "textDecoration", "textIndent", "textJustify", "textKashidaSpace", "textOverflow", "textTransform", "textUnderlinePosition", "top", "transform", "transformOrigin", "transformStyle", "transition", "transitionDelay", "transitionDuration", "transitionProperty", "transitionTimingFunction", "unicodeBidi", "verticalAlign", "visibility", "whiteSpace", "widows", "width", "wordBreak", "wordSpacing", "wordWrap", "writingMode", "zIndex", "zoom"]; RemoteHelpers.JMC_SCRIPT_URL = "\\r\\n//# sourceURL=browsertools://browsertools.{0}.js"; RemoteHelpers.FailedEventAddCount = 0; RemoteHelpers.FailedEvents = {}; RemoteHelpers.EventsWhereWeWantToProcessOnCapture = {}; return RemoteHelpers; })(); Common.RemoteHelpers = RemoteHelpers; var HtmlTreeHelpers = (function () { function HtmlTreeHelpers() { this.maxInlineLength = 70; this.mapping = {}; } HtmlTreeHelpers.getAssignedUid = function (element) { if (!element) { return; } var uidString = element["uniqueID"]; if (uidString) { return uidString; } uidString = element["bpt-uid"]; if (uidString) { return uidString; } if (RemoteHelpers.getDocumentMode() < 9) { for (var uid in htmlTreeHelpers.mapping) { var m = htmlTreeHelpers.mapping[uid]; if (m.ele === element) { return uid; } } } uidString = remoteHelpers.getUid(); if (RemoteHelpers.getDocumentMode() >= 9) { Object.defineProperty(element, "bpt-uid", { value: uidString, enumerable: false }); } return uidString; }; HtmlTreeHelpers.prototype.reset = function () { for (var uid in htmlTreeHelpers.mapping) { htmlTreeHelpers.deleteMappedNode(uid); } htmlTreeHelpers.mapping = {}; }; HtmlTreeHelpers.prototype.isEmptyTextElement = function (element) { if (element.tagName) { return false; } var textContent = Common.RemoteHelpers.getLeafTextContent(element); if (typeof textContent !== "string") { return false; } return !/\S/.test(textContent); }; HtmlTreeHelpers.prototype.createMappedNode = function (element, showEmptyTextElements, dontAddToMap) { if (this.isEmptyTextElement(element) && !showEmptyTextElements) { return null; } if (RemoteHelpers.getDocumentMode() < 9 && !element.tagName && element.nodeType === 1 && element.childNodes && element.childNodes.length === 1 && (element.childNodes[0].tagName === "IFRAME" || element.childNodes[0].tagName === "FRAME")) { var uidString = HtmlTreeHelpers.getAssignedUid(element); htmlTreeHelpers.mapping[uidString] = { uid: uidString, ele: element, isIframeElement: false, mapped: { tag: "#hidden", text: null, hasChildren: true, attributes: [], parentUid: HtmlTreeHelpers.getAssignedUid(element.parentNode) } }; element = element.childNodes[0]; } var uidString = HtmlTreeHelpers.getAssignedUid(element); var entry = { uid: uidString }; var isIframeElement; if (element.nodeType === HtmlTreeHelpers.DOCUMENT_NODE || element.nodeType === HtmlTreeHelpers.DOCUMENT_FRAGMENT_NODE) { entry.tag = "#document"; entry.hasChildren = true; entry.text = null; entry.rootTag = element.nodeName; } else { if (element.tagName) { var textContent = null; var tagName = element.tagName.toLowerCase(); var hasChildren = (element.childNodes.length > 0); if (element.nodeName === "STYLE") { hasChildren = true; var text = (element.styleSheet ? element.styleSheet.cssText : Common.RemoteHelpers.getLeafTextContent(element)); if (!(text && text.trim())) { hasChildren = false; } else if (!String.prototype.match.call(text, /\n/g) && text.length < htmlTreeHelpers.maxInlineLength) { hasChildren = false; textContent = text; } } else if (element.nodeName === "SCRIPT" && RemoteHelpers.getDocumentMode() < 9) { hasChildren = true; } else if (element.tagName === "!" && element.nodeName === "#comment" && RemoteHelpers.getDocumentMode() < 9) { tagName = element.nodeName; textContent = Common.RemoteHelpers.getLeafTextContent(element); } else if (element.tagName === "COMMENT" && RemoteHelpers.getDocumentMode() < 9) { textContent = Common.RemoteHelpers.getLeafTextContent(element); } else if (element.childNodes.length === 1) { var child = element.childNodes[0]; var childTextContent = Common.RemoteHelpers.getLeafTextContent(child); if (!child.tagName && childTextContent) { if (!(childTextContent && childTextContent.trim())) { hasChildren = false; } else if (!String.prototype.match.call(childTextContent, /\n/g) && childTextContent.length < htmlTreeHelpers.maxInlineLength) { hasChildren = false; textContent = childTextContent; } } } if (element.tagName === "IFRAME" || element.tagName === "FRAME") { isIframeElement = true; var view = RemoteHelpers.getDefaultView(element.ownerDocument); var result = RemoteHelpers.getValidWindow(view, element.contentWindow); hasChildren = result.isValid; } var attributes = []; if (element.attributes) { for (var i = 0; i < element.attributes.length; i++) { var attribute = element.attributes[i]; if (attribute) { attributes.push({ name: attribute.name, value: attribute.value }); } } } entry.tag = tagName; entry.hasChildren = hasChildren; entry.text = textContent; entry.attributes = attributes; } else if (element.nodeType) { var tagName = null; var elementText = Common.RemoteHelpers.getLeafTextContent(element); if (element.nodeType === element.DOCUMENT_TYPE_NODE) { tagName = "#doctype"; elementText = Common.RemoteHelpers.getDocumentTypeNodeText(element); } else if (element.nodeType === element.COMMENT_NODE) { tagName = "#comment"; } else if (element.nodeType === element.TEXT_NODE) { var nonEmptyText = elementText.trim(); var localizeId; if (nonEmptyText.length === 0) { localizeId = elementText = "EmptyTextNode"; } else { elementText = nonEmptyText; } } entry.tag = tagName; entry.localizeId = localizeId; entry.hasChildren = false; entry.text = elementText; entry.parentUid = HtmlTreeHelpers.getAssignedUid(element.parentNode); } else { entry.tag = null; entry.text = null; entry.hasChildren = (element.length && element.length > 0); entry.parentUid = HtmlTreeHelpers.getAssignedUid(element.parentNode); } } if (!dontAddToMap) { htmlTreeHelpers.mapping[uidString] = { ele: element, isIframeElement: isIframeElement, mapped: entry }; if (htmlTreeHelpers.hasSpecialValueAttribute(element)) { htmlTreeHelpers.mapping[uidString].hasValueAttribute = element.hasAttribute("value"); } } return entry; }; HtmlTreeHelpers.prototype.getChildrenForMappedNode = function (uid, showEmptyTextElements, showAll) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } if (mappedNode.ele.nodeName === "STYLE") { return [{ uid: "style" + uid, parentUid: uid, tag: null, hasChildren: false, text: (mappedNode.ele.styleSheet ? mappedNode.ele.styleSheet.cssText : Common.RemoteHelpers.getLeafTextContent(mappedNode.ele)) }]; } else if (mappedNode.ele.nodeName === "SCRIPT") { return [{ uid: "script" + uid, parentUid: uid, tag: null, hasChildren: false, text: mappedNode.ele.innerHTML }]; } var element = (mappedNode.isIframeElement ? htmlTreeHelpers.getIframeRootForMappedNode(uid) : mappedNode.ele); var childNodes = (mappedNode.listType ? element : element.childNodes); var newlyMappedChildren = []; var uidToNewChildMap = {}; for (var i = 0; i < childNodes.length && (showAll || newlyMappedChildren.length < remoteHelpers.childrenElementLimit); i++) { var mappedChild = htmlTreeHelpers.createMappedNode(childNodes[i], showEmptyTextElements); if (mappedChild) { newlyMappedChildren.push(mappedChild); uidToNewChildMap[mappedChild.uid] = mappedChild; } } mappedNode.isLimited = (childNodes.length > remoteHelpers.childrenElementLimit); if (mappedNode.childrenNodes) { for (var j = 0; j < mappedNode.childrenNodes.length; j++) { uid = mappedNode.childrenNodes[j].uid; if (!uidToNewChildMap[uid]) { htmlTreeHelpers.deleteMappedNode(uid); } } } mappedNode.childrenNodes = newlyMappedChildren; mappedNode.isExpanded = true; return newlyMappedChildren; }; HtmlTreeHelpers.prototype.deleteMappedNode = function (uid, onlyChildren) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (mappedNode) { if (mappedNode.childrenNodes) { for (var i = 0; i < mappedNode.childrenNodes.length; i++) { htmlTreeHelpers.deleteMappedNode(mappedNode.childrenNodes[i].uid, false); } mappedNode.childrenNodes = null; } if (!onlyChildren) { try { if (mappedNode.onValueModified) { Common.RemoteHelpers.removeListener(mappedNode.ele, "propertychange", mappedNode.onValueModified); } } catch (ex) { } delete htmlTreeHelpers.mapping[uid]; } else { mappedNode.isExpanded = false; } } }; HtmlTreeHelpers.prototype.getIframeRootForMappedNode = function (uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return null; } if (mappedNode.iframeRoot) { return mappedNode.iframeRoot; } if (mappedNode.ele.tagName === "IFRAME" || mappedNode.ele.tagName === "FRAME") { var element = mappedNode.ele; var currentWindow = element.parentNode.ownerDocument.parentWindow; var result = RemoteHelpers.getValidWindow(currentWindow, element.contentWindow); if (result.isValid) { mappedNode.iframeRoot = result.window.document; return mappedNode.iframeRoot; } } return null; }; HtmlTreeHelpers.prototype.hasSpecialValueAttribute = function (element) { switch (element.nodeName) { case "INPUT": case "FORM": case "SELECT": case "OPTION": case "TEXTAREA": return true; } return false; }; HtmlTreeHelpers.prototype.isElementAccessible = function (element) { var elementType = null; var elementName = null; try { elementName = element.nodeName; elementType = (typeof element); } catch (ex) { return false; } return (elementType === "object"); }; HtmlTreeHelpers.prototype.createStringForElement = function (element) { var parentNode = element ? element.parentNode : null; if ((!element.tagName && parentNode && parentNode.tagName === "STYLE")) { return parentNode.styleSheet ? parentNode.styleSheet.cssText : parentNode.textContent; } else { var mappedNode = htmlTreeHelpers.createMappedNode(element, false, true); if (mappedNode) { if (mappedNode.tag === "#comment") { return mappedNode.text ? "" : null; } else if (mappedNode.tag === "#document" || mappedNode.tag === "#doctype" || mappedNode.tag === "#script") { return mappedNode.text || null; } else { var stringifiedNode = "<" + mappedNode.tag; if (mappedNode.attributes) { for (var index = 0; index < mappedNode.attributes.length; index++) { var attr = mappedNode.attributes[index]; stringifiedNode = stringifiedNode + " " + attr["name"] + "=\"" + attr["value"] + "\""; } } stringifiedNode = stringifiedNode + ">"; if (mappedNode.text) { stringifiedNode = stringifiedNode + mappedNode.text; } stringifiedNode = stringifiedNode + ""; return stringifiedNode; } } } return null; }; HtmlTreeHelpers.DOCUMENT_NODE = 9; HtmlTreeHelpers.DOCUMENT_FRAGMENT_NODE = 11; return HtmlTreeHelpers; })(); Common.HtmlTreeHelpers = HtmlTreeHelpers; var ErrorHandlers = (function () { function ErrorHandlers() { } ErrorHandlers.addErrorAdditionalInfo = function (errorDetails) { var callstack; try { throw new Error("Get Callstack"); } catch (ex2) { callstack = ex2.stack; } var info = []; try { info.push("Callstack:\r\n" + callstack); info.push("BreakFlags: " + toolUI.getBreakFlags()); info.push("IsEvalModified: " + remoteHelpers.isEvalModified); info.push("IsExecScriptModified: " + remoteHelpers.isExecScriptModified); } catch (ex3) { } errorDetails.additionalInfo = info.join("\r\n\r\n"); }; ErrorHandlers.prototype.initializeListeners = function () { Common.RemoteHelpers.addListener(toolUI, "scripterror", this.onScriptError.bind(this)); Common.RemoteHelpers.addListener(toolUI, "detach", this.onDetach.bind(this)); if (mainBrowser && mainBrowser.document && mainBrowser.document.parentWindow) { remoteHelpers.initializeScriptEngines(mainBrowser.document.parentWindow); } }; ErrorHandlers.prototype.handleError = function (message, file, line, column) { this.onScriptError({ message: message, file: file, line: line, column: column }); }; ErrorHandlers.prototype.onDetach = function () { Common.RemoteHelpers.removeListener(toolUI, "scripterror", this.onScriptError); }; ErrorHandlers.prototype.onScriptError = function (errorDetails) { if (remoteHelpers && remoteHelpers.port) { ErrorHandlers.addErrorAdditionalInfo(errorDetails); var messageString = JSON.stringify([{ uid: "scriptError", args: [errorDetails] }]); try { remoteHelpers.port.postMessage(messageString); } catch (e) { } } }; return ErrorHandlers; })(); Common.ErrorHandlers = ErrorHandlers; var PropertyEvaluationIgnoreList = (function () { function PropertyEvaluationIgnoreList() { } PropertyEvaluationIgnoreList.propertyEvaluationFunction = function (windowContext, parentObject) { var listIndex = PropertyEvaluationIgnoreList.ObjectWatchList.lastIndexOf(Object.prototype.toString.call(parentObject)); var ignoreList = PropertyEvaluationIgnoreList.PropertyIgnorelist[listIndex]; if (windowContext.location.protocol.indexOf("file") < 0 || !ignoreList) { return function (obj, propertyName) { return obj[propertyName]; }; } else { return function (obj, propertyName) { if (ignoreList.lastIndexOf(propertyName) >= 0) { return; } else { return obj[propertyName]; } }; } }; PropertyEvaluationIgnoreList.ObjectWatchList = ["[object Window]"]; PropertyEvaluationIgnoreList.PropertyIgnorelist = [["indexedDB", "msIndexedDB"]]; return PropertyEvaluationIgnoreList; })(); Common.PropertyEvaluationIgnoreList = PropertyEvaluationIgnoreList; })(Common || (Common = {})); html, body { height: 100%; margin: 0px; -ms-high-contrast-adjust: none; } *:focus { outline: none; } body.showFocus *:focus { outline: invert dotted thin; } body { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-weight: normal; /*[{plugin-font-weight}]*/ color: TRANSPARENT; /*[{plugin-color}]*/ } #mainContainer { width: 100%; height: 100%; } .ScrollContainer { overflow: auto; } .BPT-ToolbarSeparator { color: TRANSPARENT; /*[{plugin-contextmenu-separator-color}]*/ display: inline-block; vertical-align: middle; border-right: 1px solid TRANSPARENT; /*[1px solid {plugin-contextmenu-separator-color}]*/ margin-right: 2.166em; } .BPT-ToolbarSeparator div { float: left; } .BPT-ToolbarSpace { display: inline-block; margin-right: 1em; cursor: default; } .BPT-ToolbarToggleSeparator { margin: 0 3px 0 0; } .BPT-ToolbarButton, .Toolbar-ControlsButton { display: inline-block; border: 1px solid transparent; vertical-align: top; padding: 2px; margin-top: 2px; cursor: default; } .BPT-ToolbarButton .buttonText, .Toolbar-ControlsButton .buttonText { display: inline-block; float: right; min-width: 8px; margin: 0px 5px 0px 5px; text-align: right; cursor: default; } .BPT-ToolbarButton img, .Toolbar-ControlsButton img { margin: 2px 4px 0 -2px; vertical-align: middle; } .BPT-ToolbarButton-StateHidden { display: none; } .BPT-ToolbarButton-StateDisabled, .Toolbar-ControlsButton[disabled] { background-color: transparent; border: 1px solid transparent; color: TRANSPARENT; /*[{plugin-inactive-color}]*/ } .BPT-ToolbarToggleButton, .ToolbarControlsToggleButton { color: TRANSPARENT; /*[{plugin-color}]*/ } .Toolbar-ControlsButton.FilterToggleButton:hover { color: TRANSPARENT; /*[{f12-toolbar-button-hover-text-color}]*/ background-color: TRANSPARENT; /*[{f12-toolbar-button-hover-color}] */ } .BPT-ToolbarToggleButton-StateOn, .ToolbarControlsToggleButton[selected=true] { color: TRANSPARENT; /*[{f12-toolbar-button-selected-text-color}]*/ background-color: TRANSPARENT; /*[{f12-toolbar-button-selected-color}]*/ border: 1px solid TRANSPARENT; /*[1px solid {f12-toolbar-button-selected-border-color}]*/ } .ToolbarControlsToggleButton.FilterToggleButton[selected=false] .buttonIcon { background-position-y: 0px; } .BPT-ToolbarButton-MouseDown:not([disabled]) { background-color: TRANSPARENT !important; /*[{f12-toolbar-button-pressed-color} !important]*/ } .BPT-FileLink, .BPT-HelpLink { border: 1px solid transparent; color: TRANSPARENT; /*[{plugin-link-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextColorKey*/ cursor: pointer; } .BPT-FileLink:hover, .BPT-HelpLink:hover { color: TRANSPARENT; /*[{plugin-link-hover-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextHoverColorKey*/ text-decoration: underline; } .BPT-ContextMenu { background-color: TRANSPARENT; /*[{plugin-contextmenu-background-color}]*/ color: TRANSPARENT; /*[{plugin-contextmenu-color}]*/ position: fixed; border: solid; border-width: 1px; border-color: TRANSPARENT; /*[{plugin-contextmenu-border-color}]*/ box-sizing: border-box; z-index: 1000; } .BPT-ContextMenuItem { background-color: TRANSPARENT; /*[{plugin-contextmenu-background-color}]*/ padding-left: 6px; padding-right: 6px; padding-top: 3px; padding-bottom: 3px; } .BPT-ContextMenuItem:hover { background-color: TRANSPARENT; /*[{plugin-contextmenu-hover-color}]*/ } .BPT-ContextMenuItemDisabled { color: TRANSPARENT; /*[{plugin-inactive-color}]*/ } var Common; (function (Common) { "use strict"; (function (TraceEvents) { TraceEvents[TraceEvents["Timeline_Zoom_Start"] = 0x65] = "Timeline_Zoom_Start"; TraceEvents[TraceEvents["Timeline_Zoom_Stop"] = 0x66] = "Timeline_Zoom_Stop"; TraceEvents[TraceEvents["Timeline_GridSort_Start"] = 0x67] = "Timeline_GridSort_Start"; TraceEvents[TraceEvents["Timeline_GridSort_Stop"] = 0x68] = "Timeline_GridSort_Stop"; TraceEvents[TraceEvents["Timeline_LoadGraphs_Start"] = 0x69] = "Timeline_LoadGraphs_Start"; TraceEvents[TraceEvents["Timeline_LoadGraphs_Stop"] = 0x6a] = "Timeline_LoadGraphs_Stop"; TraceEvents[TraceEvents["Timeline_GridScrolled"] = 0x6b] = "Timeline_GridScrolled"; TraceEvents[TraceEvents["Timeline_GridUpdatedForTimeSelection"] = 0x6c] = "Timeline_GridUpdatedForTimeSelection"; TraceEvents[TraceEvents["Timeline_UserSelectedTimeSlice_Start"] = 0x6d] = "Timeline_UserSelectedTimeSlice_Start"; TraceEvents[TraceEvents["Timeline_UserSelectedTimeSlice_Stop"] = 0x6e] = "Timeline_UserSelectedTimeSlice_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterBackground_Start"] = 0x6f] = "Timeline_GridUpdatedForFilterBackground_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterBackground_Stop"] = 0x70] = "Timeline_GridUpdatedForFilterBackground_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterNetwork_Start"] = 0x71] = "Timeline_GridUpdatedForFilterNetwork_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterNetwork_Stop"] = 0x72] = "Timeline_GridUpdatedForFilterNetwork_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterMeasures_Start"] = 0x73] = "Timeline_GridUpdatedForFilterMeasures_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterMeasures_Stop"] = 0x74] = "Timeline_GridUpdatedForFilterMeasures_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterFrames_Start"] = 0x75] = "Timeline_GridUpdatedForFilterFrames_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterFrames_Stop"] = 0x76] = "Timeline_GridUpdatedForFilterFrames_Stop"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterName_Start"] = 0x77] = "Timeline_GridUpdatedForFilterName_Start"; TraceEvents[TraceEvents["Timeline_GridUpdatedForFilterName_Stop"] = 0x78] = "Timeline_GridUpdatedForFilterName_Stop"; TraceEvents[TraceEvents["Memory_TakeSnapshot_Start"] = 0xc9] = "Memory_TakeSnapshot_Start"; TraceEvents[TraceEvents["Memory_TakeSnapshot_Stop"] = 0xca] = "Memory_TakeSnapshot_Stop"; TraceEvents[TraceEvents["Memory_CompareSnapshot_Start"] = 0xcb] = "Memory_CompareSnapshot_Start"; TraceEvents[TraceEvents["Memory_CompareSnapshot_Stop"] = 0xcc] = "Memory_CompareSnapshot_Stop"; TraceEvents[TraceEvents["Memory_ViewSnapshot_Start"] = 0xcd] = "Memory_ViewSnapshot_Start"; TraceEvents[TraceEvents["Memory_ViewSnapshot_Stop"] = 0xce] = "Memory_ViewSnapshot_Stop"; TraceEvents[TraceEvents["Memory_GridSort_Start"] = 0xcf] = "Memory_GridSort_Start"; TraceEvents[TraceEvents["Memory_GridSort_Stop"] = 0xd0] = "Memory_GridSort_Stop"; TraceEvents[TraceEvents["Memory_DisplayFirstLevelSnapshotData_Start"] = 0xd1] = "Memory_DisplayFirstLevelSnapshotData_Start"; TraceEvents[TraceEvents["Memory_DisplayFirstLevelSnapshotData_Stop"] = 0xd2] = "Memory_DisplayFirstLevelSnapshotData_Stop"; TraceEvents[TraceEvents["Memory_ToolReady_Start"] = 0xd3] = "Memory_ToolReady_Start"; TraceEvents[TraceEvents["Memory_ToolReady_Stop"] = 0xd4] = "Memory_ToolReady_Stop"; TraceEvents[TraceEvents["Memory_GridFilterResponse_Start"] = 0xd5] = "Memory_GridFilterResponse_Start"; TraceEvents[TraceEvents["Memory_GridFilterResponse_Stop"] = 0xd6] = "Memory_GridFilterResponse_Stop"; TraceEvents[TraceEvents["Memory_UpdateObjectReferenceGraph_Start"] = 0xd7] = "Memory_UpdateObjectReferenceGraph_Start"; TraceEvents[TraceEvents["Memory_UpdateObjectReferenceGraph_Stop"] = 0xd8] = "Memory_UpdateObjectReferenceGraph_Stop"; TraceEvents[TraceEvents["Memory_ProcessingSnapshot_Start"] = 0xd9] = "Memory_ProcessingSnapshot_Start"; TraceEvents[TraceEvents["Memory_ProcessingSnapshot_Stop"] = 0xda] = "Memory_ProcessingSnapshot_Stop"; TraceEvents[TraceEvents["Memory_ProcessingDiffSnapshot_Start"] = 0xdb] = "Memory_ProcessingDiffSnapshot_Start"; TraceEvents[TraceEvents["Memory_ProcessingDiffSnapshot_Stop"] = 0xdc] = "Memory_ProcessingDiffSnapshot_Stop"; TraceEvents[TraceEvents["Debugger_StepOver_Start"] = 0x12d] = "Debugger_StepOver_Start"; TraceEvents[TraceEvents["Debugger_StepInto_Start"] = 0x12e] = "Debugger_StepInto_Start"; TraceEvents[TraceEvents["Debugger_StepOut_Start"] = 0x12f] = "Debugger_StepOut_Start"; TraceEvents[TraceEvents["Debugger_OnBreak_Start"] = 0x130] = "Debugger_OnBreak_Start"; TraceEvents[TraceEvents["Debugger_OnBreak_Stop"] = 0x131] = "Debugger_OnBreak_Stop"; TraceEvents[TraceEvents["Debugger_PrettyPrint_Start"] = 0x132] = "Debugger_PrettyPrint_Start"; TraceEvents[TraceEvents["Debugger_PrettyPrint_Stop"] = 0x133] = "Debugger_PrettyPrint_Stop"; TraceEvents[TraceEvents["Debugger_CloseDocument_Start"] = 0x136] = "Debugger_CloseDocument_Start"; TraceEvents[TraceEvents["Debugger_CloseDocument_Stop"] = 0x137] = "Debugger_CloseDocument_Stop"; TraceEvents[TraceEvents["Debugger_RevealRange_Start"] = 0x13a] = "Debugger_RevealRange_Start"; TraceEvents[TraceEvents["Debugger_RevealRange_Stop"] = 0x13b] = "Debugger_RevealRange_Stop"; TraceEvents[TraceEvents["Debugger_CallstackController_GoTo_Start"] = 0x13c] = "Debugger_CallstackController_GoTo_Start"; TraceEvents[TraceEvents["Debugger_CallstackController_GoTo_Stop"] = 0x13d] = "Debugger_CallstackController_GoTo_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetAllEnabledStates_Start"] = 0x13e] = "Debugger_BreakpointController_SetAllEnabledStates_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetAllEnabledStates_Stop"] = 0x13f] = "Debugger_BreakpointController_SetAllEnabledStates_Stop"; TraceEvents[TraceEvents["Debugger_EditorWindow_NavigateTo_Start"] = 0x140] = "Debugger_EditorWindow_NavigateTo_Start"; TraceEvents[TraceEvents["Debugger_EditorWindow_NavigateTo_Stop"] = 0x141] = "Debugger_EditorWindow_NavigateTo_Stop"; TraceEvents[TraceEvents["Debugger_Editor_SetModel_Start"] = 0x142] = "Debugger_Editor_SetModel_Start"; TraceEvents[TraceEvents["Debugger_Editor_SetModel_Stop"] = 0x143] = "Debugger_Editor_SetModel_Stop"; TraceEvents[TraceEvents["Debugger_Editor_CreateModel_Start"] = 0x144] = "Debugger_Editor_CreateModel_Start"; TraceEvents[TraceEvents["Debugger_Editor_CreateModel_Stop"] = 0x145] = "Debugger_Editor_CreateModel_Stop"; TraceEvents[TraceEvents["Debugger_Editor_Create_Start"] = 0x146] = "Debugger_Editor_Create_Start"; TraceEvents[TraceEvents["Debugger_Editor_Create_Stop"] = 0x147] = "Debugger_Editor_Create_Stop"; TraceEvents[TraceEvents["Debugger_Editor_Layout_Start"] = 0x148] = "Debugger_Editor_Layout_Start"; TraceEvents[TraceEvents["Debugger_Editor_Layout_Stop"] = 0x149] = "Debugger_Editor_Layout_Stop"; TraceEvents[TraceEvents["Debugger_Editor_ChangeViewZones_Start"] = 0x14a] = "Debugger_Editor_ChangeViewZones_Start"; TraceEvents[TraceEvents["Debugger_Editor_ChangeViewZones_Stop"] = 0x14b] = "Debugger_Editor_ChangeViewZones_Stop"; TraceEvents[TraceEvents["Debugger_Editor_RevealPosition_Start"] = 0x14c] = "Debugger_Editor_RevealPosition_Start"; TraceEvents[TraceEvents["Debugger_Editor_RevealPosition_Stop"] = 0x14d] = "Debugger_Editor_RevealPosition_Stop"; TraceEvents[TraceEvents["Debugger_Editor_SaveViewState_Start"] = 0x14e] = "Debugger_Editor_SaveViewState_Start"; TraceEvents[TraceEvents["Debugger_Editor_SaveViewState_Stop"] = 0x14f] = "Debugger_Editor_SaveViewState_Stop"; TraceEvents[TraceEvents["Debugger_Editor_RestoreViewState_Start"] = 0x150] = "Debugger_Editor_RestoreViewState_Start"; TraceEvents[TraceEvents["Debugger_Editor_RestoreViewState_Stop"] = 0x151] = "Debugger_Editor_RestoreViewState_Stop"; TraceEvents[TraceEvents["Debugger_EditorWindow_CreateDataTipFromPosition_Start"] = 0x152] = "Debugger_EditorWindow_CreateDataTipFromPosition_Start"; TraceEvents[TraceEvents["Debugger_EditorWindow_CreateDataTipFromPosition_Stop"] = 0x153] = "Debugger_EditorWindow_CreateDataTipFromPosition_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetEnabledState_Start"] = 0x154] = "Debugger_BreakpointController_SetEnabledState_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_SetEnabledState_Stop"] = 0x155] = "Debugger_BreakpointController_SetEnabledState_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointController_BreakpointChanged_Start"] = 0x156] = "Debugger_BreakpointController_BreakpointChanged_Start"; TraceEvents[TraceEvents["Debugger_BreakpointController_BreakpointChanged_Stop"] = 0x157] = "Debugger_BreakpointController_BreakpointChanged_Stop"; TraceEvents[TraceEvents["Debugger_BreakpointWindow_BreakpointChanged_Start"] = 0x158] = "Debugger_BreakpointWindow_BreakpointChanged_Start"; TraceEvents[TraceEvents["Debugger_BreakpointWindow_BreakpointChanged_Stop"] = 0x159] = "Debugger_BreakpointWindow_BreakpointChanged_Stop"; TraceEvents[TraceEvents["Debugger_WatchWindowView_RefreshView_Start"] = 0x15a] = "Debugger_WatchWindowView_RefreshView_Start"; TraceEvents[TraceEvents["Debugger_WatchWindowView_RefreshView_Stop"] = 0x15b] = "Debugger_WatchWindowView_RefreshView_Stop"; TraceEvents[TraceEvents["Debugger_StepDocument_Start"] = 0x15c] = "Debugger_StepDocument_Start"; TraceEvents[TraceEvents["Debugger_ToggleJMC_Start"] = 0x15d] = "Debugger_ToggleJMC_Start"; TraceEvents[TraceEvents["Debugger_ToggleJMC_Stop"] = 0x15e] = "Debugger_ToggleJMC_Stop"; TraceEvents[TraceEvents["Debugger_ToggleCallstackLibraryFrames_Start"] = 0x15f] = "Debugger_ToggleCallstackLibraryFrames_Start"; TraceEvents[TraceEvents["Debugger_ToggleCallstackLibraryFrames_Stop"] = 0x160] = "Debugger_ToggleCallstackLibraryFrames_Stop"; TraceEvents[TraceEvents["Debugger_SpecifyUrlAsJMCType_Start"] = 0x161] = "Debugger_SpecifyUrlAsJMCType_Start"; TraceEvents[TraceEvents["Debugger_SpecifyUrlAsJMCType_Stop"] = 0x162] = "Debugger_SpecifyUrlAsJMCType_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_DataLoad_Start"] = 0x163] = "Debugger_Persistence_DataLoad_Start"; TraceEvents[TraceEvents["Debugger_Persistence_DataLoad_Stop"] = 0x164] = "Debugger_Persistence_DataLoad_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_AddBreakpoints_Start"] = 0x165] = "Debugger_Persistence_AddBreakpoints_Start"; TraceEvents[TraceEvents["Debugger_Persistence_AddBreakpoints_Stop"] = 0x166] = "Debugger_Persistence_AddBreakpoints_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_AddWatches_Start"] = 0x167] = "Debugger_Persistence_AddWatches_Start"; TraceEvents[TraceEvents["Debugger_Persistence_AddWatches_Stop"] = 0x168] = "Debugger_Persistence_AddWatches_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_TabOpen_Start"] = 0x169] = "Debugger_Persistence_TabOpen_Start"; TraceEvents[TraceEvents["Debugger_Persistence_TabOpen_Stop"] = 0x16a] = "Debugger_Persistence_TabOpen_Stop"; TraceEvents[TraceEvents["Debugger_Persistence_SaveState_Start"] = 0x16b] = "Debugger_Persistence_SaveState_Start"; TraceEvents[TraceEvents["Debugger_Persistence_SaveState_Stop"] = 0x16c] = "Debugger_Persistence_SaveState_Stop"; TraceEvents[TraceEvents["Debugger_SourceMap_ToggleSourceMap_Start"] = 0x16d] = "Debugger_SourceMap_ToggleSourceMap_Start"; TraceEvents[TraceEvents["Debugger_SourceMap_ToggleSourceMap_Stop"] = 0x16e] = "Debugger_SourceMap_ToggleSourceMap_Stop"; TraceEvents[TraceEvents["Debugger_SourceMap_ParseSourceMapAsync_Start"] = 0x16f] = "Debugger_SourceMap_ParseSourceMapAsync_Start"; TraceEvents[TraceEvents["Debugger_SourceMap_ParseSourceMapAsync_Stop"] = 0x170] = "Debugger_SourceMap_ParseSourceMapAsync_Stop"; TraceEvents[TraceEvents["Debugger_Editor_GetOrCreateMode_Start"] = 0x171] = "Debugger_Editor_GetOrCreateMode_Start"; TraceEvents[TraceEvents["Debugger_Editor_GetOrCreateMode_Stop"] = 0x172] = "Debugger_Editor_GetOrCreateMode_Stop"; TraceEvents[TraceEvents["Debugger_OnAddDocuments_Info"] = 0x173] = "Debugger_OnAddDocuments_Info"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Build_Start"] = 0x174] = "Debugger_Intellisense_ListBox_Build_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Build_Stop"] = 0x175] = "Debugger_Intellisense_ListBox_Build_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Reset_Start"] = 0x176] = "Debugger_Intellisense_ListBox_Reset_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_ListBox_Reset_Stop"] = 0x177] = "Debugger_Intellisense_ListBox_Reset_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Filter_Start"] = 0x178] = "Debugger_Intellisense_Menu_Filter_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Filter_Stop"] = 0x179] = "Debugger_Intellisense_Menu_Filter_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Layout_Start"] = 0x17a] = "Debugger_Intellisense_Menu_Layout_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Menu_Layout_Stop"] = 0x17b] = "Debugger_Intellisense_Menu_Layout_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Expression_Start"] = 0x17c] = "Debugger_Intellisense_Provider_Get_Expression_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Expression_Stop"] = 0x17d] = "Debugger_Intellisense_Provider_Get_Expression_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Update_Start"] = 0x17e] = "Debugger_Intellisense_Provider_Update_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Update_Stop"] = 0x17f] = "Debugger_Intellisense_Provider_Update_Stop"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Items_Start"] = 0x180] = "Debugger_Intellisense_Provider_Get_Items_Start"; TraceEvents[TraceEvents["Debugger_Intellisense_Provider_Get_Items_Stop"] = 0x181] = "Debugger_Intellisense_Provider_Get_Items_Stop"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Start"] = 0x182] = "Debugger_AsyncStackProvider_GetFrames_Start"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Stop"] = 0x183] = "Debugger_AsyncStackProvider_GetFrames_Stop"; TraceEvents[TraceEvents["Debugger_AsyncStackProvider_GetFrames_Timeout"] = 0x184] = "Debugger_AsyncStackProvider_GetFrames_Timeout"; TraceEvents[TraceEvents["Console_Window_Create_Start"] = 0x191] = "Console_Window_Create_Start"; TraceEvents[TraceEvents["Console_Window_Create_Stop"] = 0x192] = "Console_Window_Create_Stop"; TraceEvents[TraceEvents["Console_Attach_Start"] = 0x193] = "Console_Attach_Start"; TraceEvents[TraceEvents["Console_Attach_Stop"] = 0x194] = "Console_Attach_Stop"; TraceEvents[TraceEvents["Console_Message_Start"] = 0x195] = "Console_Message_Start"; TraceEvents[TraceEvents["Console_Message_Stop"] = 0x196] = "Console_Message_Stop"; TraceEvents[TraceEvents["Console_Input_Start"] = 0x197] = "Console_Input_Start"; TraceEvents[TraceEvents["Console_Input_Stop"] = 0x198] = "Console_Input_Stop"; TraceEvents[TraceEvents["Console_Output_Start"] = 0x199] = "Console_Output_Start"; TraceEvents[TraceEvents["Console_Output_Stop"] = 0x19a] = "Console_Output_Stop"; TraceEvents[TraceEvents["Console_Output_Render_Start"] = 0x19b] = "Console_Output_Render_Start"; TraceEvents[TraceEvents["Console_Output_Render_Stop"] = 0x19c] = "Console_Output_Render_Stop"; TraceEvents[TraceEvents["Console_Item_Toggle_Start"] = 0x19d] = "Console_Item_Toggle_Start"; TraceEvents[TraceEvents["Console_Item_Toggle_Stop"] = 0x19e] = "Console_Item_Toggle_Stop"; TraceEvents[TraceEvents["Console_HtmlLines_Expand_Start"] = 0x19f] = "Console_HtmlLines_Expand_Start"; TraceEvents[TraceEvents["Console_HtmlLines_Expand_Stop"] = 0x1a0] = "Console_HtmlLines_Expand_Stop"; TraceEvents[TraceEvents["Console_Context_Menu_Loading_Start"] = 0x1a1] = "Console_Context_Menu_Loading_Start"; TraceEvents[TraceEvents["Console_Context_Menu_Loading_Stop"] = 0x1a2] = "Console_Context_Menu_Loading_Stop"; TraceEvents[TraceEvents["Console_Scroll_Start"] = 0x1a3] = "Console_Scroll_Start"; TraceEvents[TraceEvents["Console_Scroll_Stop"] = 0x1a4] = "Console_Scroll_Stop"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Build_Start"] = 0x1a5] = "Console_Intellisense_ListBox_Build_Start"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Build_Stop"] = 0x1a6] = "Console_Intellisense_ListBox_Build_Stop"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Reset_Start"] = 0x1a7] = "Console_Intellisense_ListBox_Reset_Start"; TraceEvents[TraceEvents["Console_Intellisense_ListBox_Reset_Stop"] = 0x1a8] = "Console_Intellisense_ListBox_Reset_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Filter_Start"] = 0x1a9] = "Console_Intellisense_Menu_Filter_Start"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Filter_Stop"] = 0x1aa] = "Console_Intellisense_Menu_Filter_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Layout_Start"] = 0x1ab] = "Console_Intellisense_Menu_Layout_Start"; TraceEvents[TraceEvents["Console_Intellisense_Menu_Layout_Stop"] = 0x1ac] = "Console_Intellisense_Menu_Layout_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Expression_Start"] = 0x1ad] = "Console_Intellisense_Provider_Get_Expression_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Expression_Stop"] = 0x1ae] = "Console_Intellisense_Provider_Get_Expression_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Update_Start"] = 0x1af] = "Console_Intellisense_Provider_Update_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Update_Stop"] = 0x1b0] = "Console_Intellisense_Provider_Update_Stop"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Items_Start"] = 0x1b1] = "Console_Intellisense_Provider_Get_Items_Start"; TraceEvents[TraceEvents["Console_Intellisense_Provider_Get_Items_Stop"] = 0x1b2] = "Console_Intellisense_Provider_Get_Items_Stop"; TraceEvents[TraceEvents["Dom_Window_Create_Start"] = 501] = "Dom_Window_Create_Start"; TraceEvents[TraceEvents["Dom_Window_Create_Stop"] = 502] = "Dom_Window_Create_Stop"; TraceEvents[TraceEvents["Dom_ExpandNode_Start"] = 503] = "Dom_ExpandNode_Start"; TraceEvents[TraceEvents["Dom_ExpandNode_Stop"] = 504] = "Dom_ExpandNode_Stop"; TraceEvents[TraceEvents["Dom_UndoRedo_Start"] = 505] = "Dom_UndoRedo_Start"; TraceEvents[TraceEvents["Dom_UndoRedo_Stop"] = 506] = "Dom_UndoRedo_Stop"; TraceEvents[TraceEvents["Dom_DragDrop_Start"] = 507] = "Dom_DragDrop_Start"; TraceEvents[TraceEvents["Dom_DragDrop_Stop"] = 508] = "Dom_DragDrop_Stop"; TraceEvents[TraceEvents["Dom_AddAttribute_Start"] = 509] = "Dom_AddAttribute_Start"; TraceEvents[TraceEvents["Dom_AddAttribute_Stop"] = 510] = "Dom_AddAttribute_Stop"; TraceEvents[TraceEvents["Dom_Intellisense_Start"] = 511] = "Dom_Intellisense_Start"; TraceEvents[TraceEvents["Dom_Intellisense_Stop"] = 512] = "Dom_Intellisense_Stop"; TraceEvents[TraceEvents["Dom_SelectElement_Start"] = 513] = "Dom_SelectElement_Start"; TraceEvents[TraceEvents["Dom_SelectElement_Stop"] = 514] = "Dom_SelectElement_Stop"; TraceEvents[TraceEvents["Dom_CutElement_Start"] = 515] = "Dom_CutElement_Start"; TraceEvents[TraceEvents["Dom_CutElement_Stop"] = 516] = "Dom_CutElement_Stop"; TraceEvents[TraceEvents["Dom_PasteElement_Start"] = 517] = "Dom_PasteElement_Start"; TraceEvents[TraceEvents["Dom_PasteElement_Stop"] = 518] = "Dom_PasteElement_Stop"; TraceEvents[TraceEvents["Dom_CollapseElement_Start"] = 519] = "Dom_CollapseElement_Start"; TraceEvents[TraceEvents["Dom_CollapseElement_Stop"] = 520] = "Dom_CollapseElement_Stop"; TraceEvents[TraceEvents["Dom_StylesTabLoad_Start"] = 521] = "Dom_StylesTabLoad_Start"; TraceEvents[TraceEvents["Dom_StylesTabLoad_Stop"] = 522] = "Dom_StylesTabLoad_Stop"; TraceEvents[TraceEvents["Dom_StylesTab_Intellisense_Start"] = 523] = "Dom_StylesTab_Intellisense_Start"; TraceEvents[TraceEvents["Dom_StylesTab_Intellisense_Stop"] = 524] = "Dom_StylesTab_Intellisense_Stop"; TraceEvents[TraceEvents["Dom_TreeItemExpand_Start"] = 525] = "Dom_TreeItemExpand_Start"; TraceEvents[TraceEvents["Dom_TreeItemExpand_Stop"] = 526] = "Dom_TreeItemExpand_Stop"; TraceEvents[TraceEvents["Dom_ComputedTabLoad_Start"] = 527] = "Dom_ComputedTabLoad_Start"; TraceEvents[TraceEvents["Dom_ComputedTabLoad_Stop"] = 528] = "Dom_ComputedTabLoad_Stop"; TraceEvents[TraceEvents["Dom_ChangesTabLoad_Start"] = 529] = "Dom_ChangesTabLoad_Start"; TraceEvents[TraceEvents["Dom_ChangesTabLoad_Stop"] = 530] = "Dom_ChangesTabLoad_Stop"; TraceEvents[TraceEvents["Dom_LayoutTabLoad_Start"] = 531] = "Dom_LayoutTabLoad_Start"; TraceEvents[TraceEvents["Dom_LayoutTabLoad_Stop"] = 532] = "Dom_LayoutTabLoad_Stop"; TraceEvents[TraceEvents["Dom_EventsTabLoad_Start"] = 533] = "Dom_EventsTabLoad_Start"; TraceEvents[TraceEvents["Dom_EventsTabLoad_Stop"] = 534] = "Dom_EventsTabLoad_Stop"; TraceEvents[TraceEvents["Dom_TreeItemCollapse_Start"] = 535] = "Dom_TreeItemCollapse_Start"; TraceEvents[TraceEvents["Dom_TreeItemCollapse_Stop"] = 536] = "Dom_TreeItemCollapse_Stop"; TraceEvents[TraceEvents["Dom_Search_Start"] = 537] = "Dom_Search_Start"; TraceEvents[TraceEvents["Dom_Search_Stop"] = 538] = "Dom_Search_Stop"; TraceEvents[TraceEvents["Dom_RemoteInjection_Start"] = 539] = "Dom_RemoteInjection_Start"; TraceEvents[TraceEvents["Dom_RemoteInjection_Stop"] = 540] = "Dom_RemoteInjection_Stop"; TraceEvents[TraceEvents["Dom_EnterEditAsHtml_Start"] = 541] = "Dom_EnterEditAsHtml_Start"; TraceEvents[TraceEvents["Dom_EnterEditAsHtml_Stop"] = 542] = "Dom_EnterEditAsHtml_Stop"; TraceEvents[TraceEvents["Dom_CommitEditAsHtml_Start"] = 543] = "Dom_CommitEditAsHtml_Start"; TraceEvents[TraceEvents["Dom_CommitEditAsHtml_Stop"] = 544] = "Dom_CommitEditAsHtml_Stop"; TraceEvents[TraceEvents["Dom_CommitEditAttribute_Start"] = 545] = "Dom_CommitEditAttribute_Start"; TraceEvents[TraceEvents["Dom_CommitEditAttribute_Stop"] = 546] = "Dom_CommitEditAttribute_Stop"; TraceEvents[TraceEvents["Dom_ShowColorPicker_Start"] = 547] = "Dom_ShowColorPicker_Start"; TraceEvents[TraceEvents["Dom_ShowColorPicker_Stop"] = 548] = "Dom_ShowColorPicker_Stop"; TraceEvents[TraceEvents["Dom_HideColorPicker_Start"] = 549] = "Dom_HideColorPicker_Start"; TraceEvents[TraceEvents["Dom_HideColorPicker_Stop"] = 550] = "Dom_HideColorPicker_Stop"; TraceEvents[TraceEvents["Dom_SetColorUsingColorPicker_Start"] = 551] = "Dom_SetColorUsingColorPicker_Start"; TraceEvents[TraceEvents["Dom_SetColorUsingColorPicker_Stop"] = 552] = "Dom_SetColorUsingColorPicker_Stop"; TraceEvents[TraceEvents["Emulation_Window_Create_Start"] = 0x259] = "Emulation_Window_Create_Start"; TraceEvents[TraceEvents["Emulation_Window_Create_Stop"] = 0x25a] = "Emulation_Window_Create_Stop"; TraceEvents[TraceEvents["Generic_Debug_1_Start"] = 0x2bd] = "Generic_Debug_1_Start"; TraceEvents[TraceEvents["Generic_Debug_1_Stop"] = 0x2be] = "Generic_Debug_1_Stop"; TraceEvents[TraceEvents["Generic_Debug_2_Start"] = 0x2bf] = "Generic_Debug_2_Start"; TraceEvents[TraceEvents["Generic_Debug_2_Stop"] = 0x2c0] = "Generic_Debug_2_Stop"; TraceEvents[TraceEvents["Generic_Debug_3_Start"] = 0x2c1] = "Generic_Debug_3_Start"; TraceEvents[TraceEvents["Generic_Debug_3_Stop"] = 0x2c2] = "Generic_Debug_3_Stop"; TraceEvents[TraceEvents["Generic_Debug_4_Start"] = 0x2c3] = "Generic_Debug_4_Start"; TraceEvents[TraceEvents["Generic_Debug_4_Stop"] = 0x2c4] = "Generic_Debug_4_Stop"; TraceEvents[TraceEvents["Generic_Debug_5_Start"] = 0x2c5] = "Generic_Debug_5_Start"; TraceEvents[TraceEvents["Generic_Debug_5_Stop"] = 0x2c6] = "Generic_Debug_5_Stop"; TraceEvents[TraceEvents["Generic_Debug_6_Start"] = 0x2c7] = "Generic_Debug_6_Start"; TraceEvents[TraceEvents["Generic_Debug_6_Stop"] = 0x2c8] = "Generic_Debug_6_Stop"; TraceEvents[TraceEvents["Generic_Debug_7_Start"] = 0x2c9] = "Generic_Debug_7_Start"; TraceEvents[TraceEvents["Generic_Debug_7_Stop"] = 0x2ca] = "Generic_Debug_7_Stop"; TraceEvents[TraceEvents["Generic_Debug_8_Start"] = 0x2cb] = "Generic_Debug_8_Start"; TraceEvents[TraceEvents["Generic_Debug_8_Stop"] = 0x2cc] = "Generic_Debug_8_Stop"; TraceEvents[TraceEvents["Generic_Debug_9_Start"] = 0x2cd] = "Generic_Debug_9_Start"; TraceEvents[TraceEvents["Generic_Debug_9_Stop"] = 0x2ce] = "Generic_Debug_9_Stop"; TraceEvents[TraceEvents["Header_InitializeTabs_Start"] = 0x321] = "Header_InitializeTabs_Start"; TraceEvents[TraceEvents["Header_InitializeTabs_Stop"] = 0x322] = "Header_InitializeTabs_Stop"; })(Common.TraceEvents || (Common.TraceEvents = {})); var TraceEvents = Common.TraceEvents; (function (TraceEventsWithKey) { TraceEventsWithKey[TraceEventsWithKey["Debugger_OpenDocument_Start"] = 0x134] = "Debugger_OpenDocument_Start"; TraceEventsWithKey[TraceEventsWithKey["Debugger_OpenDocument_Stop"] = 0x135] = "Debugger_OpenDocument_Stop"; TraceEventsWithKey[TraceEventsWithKey["Debugger_SwitchDocument_Start"] = 0x138] = "Debugger_SwitchDocument_Start"; TraceEventsWithKey[TraceEventsWithKey["Debugger_SwitchDocument_Stop"] = 0x139] = "Debugger_SwitchDocument_Stop"; })(Common.TraceEventsWithKey || (Common.TraceEventsWithKey = {})); var TraceEventsWithKey = Common.TraceEventsWithKey; var DefaultTraceWriter = (function () { function DefaultTraceWriter() { } DefaultTraceWriter.prototype.raiseEvent = function (eventId) { }; DefaultTraceWriter.prototype.raiseEventWithMessage = function (eventId, traceMessage) { }; DefaultTraceWriter.prototype.raiseEventWithKey = function (eventId, key, traceMessage) { }; return DefaultTraceWriter; })(); Common.DefaultTraceWriter = DefaultTraceWriter; var TraceWriter = (function () { function TraceWriter(performanceTracer) { if (!performanceTracer && Plugin) { if (Plugin.F12) { performanceTracer = Plugin.F12.TraceWriter; } else if (Plugin.VS) { performanceTracer = Plugin.VS.Utilities.createExternalObject("PerformanceTraceExtension", "{D76A409F-7234-4B71-9BFD-DEF3DC4CCCA6}"); } } this._performanceTracer = performanceTracer; } TraceWriter.prototype.raiseEventWithKey = function (eventId, key, traceMessage) { if (this._performanceTracer) { this._performanceTracer.raiseEventWithKey(eventId, key, traceMessage); } }; TraceWriter.prototype.raiseEventWithMessage = function (eventId, traceMessage) { if (this._performanceTracer) { this._performanceTracer.raiseEvent(eventId, traceMessage); } }; TraceWriter.prototype.raiseEvent = function (eventId) { this.raiseEventWithMessage(eventId, ""); }; return TraceWriter; })(); Common.TraceWriter = TraceWriter; })(Common || (Common = {})); var Common; (function (Common) { (function (Data) { "use strict"; var F12EtwDataCollector = (function () { function F12EtwDataCollector(dataCollectorProxy) { this._proxy = dataCollectorProxy; if (!this._proxy) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1055")); } } F12EtwDataCollector.prototype.startSession = function (agentFile, agentGuid) { var _this = this; return new Plugin.Promise(function (completed, error) { _this._proxy.startSession(agentFile, agentGuid, function (sessionProxy) { completed(new F12EtwDataCollectorSession(sessionProxy)); }, function (hr) { if (error) { error(new Error(hr.toString())); } }); }); }; F12EtwDataCollector.prototype.stopCollection = function () { this._proxy.stopCollection(); }; return F12EtwDataCollector; })(); Data.F12EtwDataCollector = F12EtwDataCollector; var F12EtwDataCollectorSession = (function () { function F12EtwDataCollectorSession(sessionProxy) { this._proxy = sessionProxy; } F12EtwDataCollectorSession.prototype.stop = function () { var _this = this; return new Plugin.Promise(function (completed, error) { _this._proxy.stop(function (file) { completed(file); }, function (hr) { if (error) { error(new Error("Error: " + hr)); } }); }); }; F12EtwDataCollectorSession.prototype.getGraphDataUpdate = function (counterId) { var _this = this; return new Plugin.Promise(function (completed, error) { _this._proxy.getGraphDataUpdate(counterId, function (points) { completed(points); }, function (hr) { if (error) { error(new Error("Error: " + hr)); } }); }); }; return F12EtwDataCollectorSession; })(); Data.F12EtwDataCollectorSession = F12EtwDataCollectorSession; })(Common.Data || (Common.Data = {})); var Data = Common.Data; })(Common || (Common = {})); /* * TemplateControl */ .BPT-hidden { display: none !important; } /* * Toolbar */ .BPT-Toolbar { width: 100%; color: TRANSPARENT; /*[{plugin-color}]*/ background-color: TRANSPARENT; /*[{f12-toolbar-background-color}]*/ border-bottom: 1px solid TRANSPARENT; /*[1px solid {plugin-treeview-content-inactive-selected-background-color}]*/ display: -ms-grid; padding-top: 1px; padding-bottom: 2px; -ms-grid-rows: auto; -ms-grid-columns: 1fr auto; cursor: default; } .BPT-Toolbar > .BPT-ToolbarContents { -ms-grid-column: 1; margin-top: 1px; padding-left: 14px; } .BPT-Toolbar > .BPT-ToolbarContents > .buttons { display: inline-block; margin-right: 10px; white-space: nowrap; } .BPT-Toolbar > .BPT-ToolbarContents > .BPT-ToolTitle { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: 20px; font-weight: 200; padding-right: 42px; line-height: 29px; } .BPT-Toolbar > .BPT-ToolbarContents > .shellButtonSpacer { display: inline-block; float: right; height: 29px; width: 0; /* 0 is replaced during 'hostinfochanged' events */ } /* Use less padding in F12 to align to the F12 logo*/ html.hostedF12 .BPT-Toolbar > .BPT-ToolbarContents { padding-left: 9px; } /* * Button */ .BPT-button { display: inline-block; padding: 2px; background: transparent; border: 1px solid transparent; color: TRANSPARENT; /*[{plugin-color}]*/ } .BPT-button.iconButton24x24 { height: 24px; width: 24px; } .BPT-button.menuButton33x24 { height: 24px; width: 33px; } .BPT-button.labeledIconButton, .BPT-button.labeledIconButton33x24, .BPT-button.iconButton { padding-bottom: 0px; } .BPT-button .buttonIcon { background-color: transparent; background-position: 0px 0px; background-repeat: no-repeat; display: inline-block; } .BPT-button.iconButton24x24 .buttonIcon { background-size: 18px 54px; height: 18px; width: 18px; } .BPT-button.menuButton33x24 .buttonIcon { background-size: 27px 54px; height: 18px; width: 27px; } .BPT-button.iconButton .buttonIcon, .BPT-button.labeledIconButton .buttonIcon { background-size: 18px 54px; padding-bottom: 0px; height: 18px; width: 18px; } .BPT-button.labeledIconButton33x24 .buttonIcon { background-size: 27px 54px; padding-bottom: 0px; height: 18px; width: 27px; } .BPT-button.imageStates5 .buttonIcon { background-size: 27px 90px; } .BPT-button .buttonText { display: inline-block; float: right; min-width: 8px; margin: 0px 5px 0px 5px; text-align: right; cursor: default; } .BPT-button.checked { color: TRANSPARENT; /*[{f12-toolbar-button-selected-text-color}]*/ background-color: TRANSPARENT; /*[{f12-toolbar-button-selected-color}]*/ border-color: TRANSPARENT; /*[{f12-toolbar-button-selected-border-color}]*/ } .BPT-button.checked .buttonIcon { background-position-y: -18px; } .BPT-button:hover { color: TRANSPARENT; /*[{f12-toolbar-button-hover-text-color}]*/ background-color: TRANSPARENT; /*[{f12-toolbar-button-hover-color}]*/ } .BPT-button:hover .buttonIcon { background-position-y: -18px; } .BPT-button.menuButton33x24:hover .buttonIcon { background-position-y: -18px; } .BPT-button.pressed { background-color: TRANSPARENT; /*[{f12-toolbar-button-pressed-color}]*/ } .BPT-button.disabled { background-color: transparent; } .BPT-button.iconButton.disabled .buttonIcon { background-position-y: -36px; } .BPT-button.iconButton24x24.disabled .buttonIcon { background-position-y: -36px; } .BPT-button.menuButton33x24.disabled .buttonIcon { background-position-y: -72px; } .BPT-button.labeledIconButton.disabled .buttonIcon { background-position-y: -36px; } .BPT-button.hidden { display: none; } .BPT-button:focus { outline: invert dotted thin; } .BPT-Toolbar .BPT-button { margin-right: 7px; } /* * Textbox */ .BPT-TextBox:not([disabled]):-ms-input-placeholder { background-color: TRANSPARENT; /*[{plugin-searchcontrol-unfocused-background-color}]*/ color: TRANSPARENT; /*[{plugin-searchcontrol-unfocused-watermark-text-color}]*/ } .BPT-TextBox:not([disabled]):hover:-ms-input-placeholder { background-color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-background-color}]*/ color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-watermark-text-color}]*/ } /* * Searchbox */ #searchNextResult { right: 0; top: 2px; } #searchPreviousResult { right: 11px; top: 2px; } .BPT-SearchBox { color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-foreground-color}]*/ background-color: transparent; border: none; height: 18px; width: 119px; padding: 1px 2px; margin-right: 26px; } .BPT-SearchBox::selection { background-color: TRANSPARENT; /*[{plugin-searchcontrol-selection-color}]*/ } .BPT-SearchBox:-ms-input-placeholder { color: TRANSPARENT; /*[{plugin-searchcontrol-unfocused-watermark-text-color}]*/ background-color: TRANSPARENT; /*[{plugin-searchcontrol-unfocused-background-color}]*/ } .BPT-SearchBox-Border { float: right; background-color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-background-color}]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-searchcontrol-unfocused-border-color}]*/ margin-top: 3px; padding: 1px; display: inline-block; position: relative; } .BPT-SearchBox-Border:hover { background-color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-background-color}]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-searchcontrol-mouseover-border-color}]*/ } .BPT-SearchBox-NoResult { border: 1px solid TRANSPARENT; /*[1px solid {plugin-font-console-error-color}]*/ } .BPT-SearchBox-NoResult:hover { border: 1px solid TRANSPARENT; /*[1px solid {plugin-font-console-error-color}]*/ } .BPT-Toolbar .BPT-Search-Button { display: inline-block; position: absolute; } .BPT-Toolbar .BPT-Search-Button:not([disabled]):hover div { background-position-x: -16px; } .BPT-Toolbar .BPT-Search-Button[disabled] div { visibility: hidden; } /* * Popup */ .BPT-popup { position: absolute; z-index: 2000; } /* * Menu */ .BPT-menuControl { border: 1px solid TRANSPARENT; /*[1px solid {f12-toolbar-button-selected-border-color}]*/ box-shadow: 2px 2px 2px TRANSPARENT; /*[2px 2px 2px {plugin-textbox-border-color rgba(0.5)}]*/ background-color: TRANSPARENT; /*[{plugin-menucontrol-background-color}]*/ display: table-cell; width: auto; white-space: nowrap; } .BPT-menuContent { list-style-type: none; padding: 2px; margin: 0px; } .BPT-menuContent > li.menuItem { cursor: default; padding: 4px; } .BPT-menuContent > li.menuItem:not([disabled]):hover { cursor: pointer; color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/ background-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-background-color}]*/ } .BPT-menuContent > li.menuItem.selected { color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/ background-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-background-color}]*/ } .BPT-menuContent > li.menuItem > .gutter { height: 12px; width: 12px; padding-right: 3px; vertical-align: middle; float: left; } .BPT-menuContent > li.menuItem.hiddenCheckMark > .menuToggleItem { visibility: hidden; } .BPT-menuContent > hr { border: none; border-top: 1px solid TRANSPARENT; /*[1px solid {vs-command-bar-menu-separator-color}]*/ margin: 2px -2px 2px -2px; } /* Override for checkbocMenuItem*/ .BPT-menuContent > li.menuItem > input[type="checkbox"] { margin-top: -2px; } /* Override for comboBoxMenuItem */ .BPT-menuContent > li.menuItem > select { width: 100%; } .BPT-menuContent > li.menuItem:not([disabled]).comboBoxMenuItem { background-color: TRANSPARENT; } /* Override for textBoxMenuItem */ .BPT-menuContent > li.menuItem:not([disabled]).textBoxMenuItem { background-color: TRANSPARENT; } /* * Popup */ .BPT-popupActive { background-color: TRANSPARENT !important; /*[{f12-toolbar-button-selected-color} !important]*/ border-color: TRANSPARENT !important; /*[{f12-toolbar-button-selected-border-color} !important]*/ } /* * Ribbon */ .BPT-ribbonPanel { overflow: hidden; position: relative; /* Ensures the ribbon panel is offset parent, property can be overriden */ } .BPT-ribbonPanel > * { position: relative; } .BPT-horizontalRibbonPanel { white-space: nowrap; } .BPT-horizontalRibbonPanel > * { display: inline-block; } /* * Color picker */ .colorPicker, .colorPicker * { box-sizing: border-box; overflow: visible; } .colorPicker { background-color: TRANSPARENT; /*[{plugin-background-color}]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-border-color}]*/ border-bottom: none; box-shadow: 2px 2px 2px TRANSPARENT; /*[2px 2px 2px {plugin-box-shadow-color rgba(0.5)}]*/ width: 200px; } .colorPicker .BPT-ribbonPanel:focus, .colorPicker .colorSlider:focus { outline: invert dotted thin; } .colorPicker > * { border-bottom: 1px solid TRANSPARENT; /*[1px solid {plugin-border-color}]*/ height: 27px; /* 24px buttons + 2 * 1px padding + 1px border-bottom */ padding: 1px; width: 100%; } .colorPicker > .selectedColorPane { display: -ms-grid; } .colorPicker > .slidersPane { height: auto; overflow-y: auto; padding: 12px; } .colorPicker .BPT-button.colorSquare { background-image: url("../common/images/colorPicker/checkeredBackground.png"); /*[url({plugin-common-image-colorpicker-color-background})]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-border-color}]*/ height: 20px; margin: 2px; padding: 0; width: 20px; } .colorPicker .BPT-button.colorSquare .buttonIcon { height: 100%; width: 100%; } .colorPicker .selectedColorPane .BPT-button.colorSquare { outline: none; /* not focusable, don't show indicator on click */ } .colorPicker .selectedColorValue { -ms-grid-column: 2; -ms-grid-row-align: center; background-color: TRANSPARENT; border: none; width: 140px; } .colorPicker .eyedropperButton .buttonIcon { background-image: url("../common/images/colorPicker/eyedropperButton.png"); /*[url({plugin-common-image-colorpicker-eyedropper})]*/ } .colorPicker .slidersButton .buttonIcon { background-image: url("../common/images/colorPicker/sliderButton.png"); /*[url({plugin-common-image-colorpicker-slider-button})]*/ } .colorPicker .colorToolsPane > * { float: left; height: 24px; } .colorPicker .colorPalette { float: right; } .colorPicker .colorPalette > * { float: left; } .colorPicker .colorPaletteProgress { background-color: TRANSPARENT; /*[{plugin-background-color}]*/ position: absolute; right: 17px; /* 1px padding + 17px arrow button */ z-index: 5000; } .colorPicker .colorPalettePanel { height: 24px; margin-left: 4px; margin-right: 4px; overflow-x: hidden; width: 104px; /* 4 * 20px squares + 6 * 4px margin */ } .colorPicker .colorPalettePanel > .BPT-button.colorSquare { margin-left: 4px; margin-right: 4px; } .colorPicker .colorPalettePanel > .BPT-button.colorSquare.BPT-selected { border-color: TRANSPARENT; /*[{f12-toolbar-button-selected-border-color}]*/ border-width: 1px; } .colorPicker .arrowButton { background-size: 48px 16px; height: 16px; margin-bottom: 4px; margin-top: 4px; width: 16px; } .colorPicker .arrowButton:hover { background-position-x: -16px; } .colorPicker .arrowButton.disabled { background-position-x: -32px; } .colorPicker .arrowButton.arrowLeft { background-image: url("../common/images/i_previous.png"); /*[url({plugin-common-image-icon-previous})]*/ } .colorPicker .arrowButton.arrowRight { background-image: url("../common/images/i_next.png"); /*[url({plugin-common-image-icon-next})]*/ } .colorPicker .hslText { float: right; text-align: right; width: 35px; } .colorPicker input[type=range].colorSlider { display: block; background-position-y: center; background-repeat: no-repeat; background-size: 100% 7px; border: none; height: 15px; margin: 4px 0 10px 0; padding: 0; width: 100%; } .colorPicker input[type=range].colorSlider:last-child { margin-bottom: 0px; } .colorPicker input[type=range].colorSlider::-ms-track { background-color: transparent; border-color: transparent; width: 0; } .colorPicker input[type=range].colorSlider::-ms-thumb { height: 15px; width: 5px; } .colorPicker input[type=range].colorSlider::-ms-tooltip { display: none; } .colorPicker input[type=range].colorSlider.hueSlider { background-image: url("../common/images/colorPicker/hueColorBar.png"); /*[url({plugin-common-image-colorpicker-hue})]*/ } .colorPicker input[type=range].colorSlider.saturationSlider { background-image: url("../common/images/colorPicker/saturationColorBar.png"); /*[url({plugin-common-image-colorpicker-saturation})]*/ } .colorPicker input[type=range].colorSlider.lightnessSlider { background-image: url("../common/images/colorPicker/lightnessColorBar.png"); /*[url({plugin-common-image-colorpicker-lightness})]*/ } .colorPicker input[type=range].colorSlider.alphaSlider { background-image: url("../common/images/colorPicker/alphaColorBar.png"); /*[url({plugin-common-image-colorpicker-alpha})]*/ } /* * Miscellaneous */ /* Hide the tool title in VS but not in F12 */ .BPT-ToolTitle { display: none; } .iconShell_18x18 { background-color: transparent; border: 1px solid transparent; height: 18px; width: 18px; margin-left: 8px; } .iconShell_24x24 { background-color: transparent; border: 1px solid transparent; height: 24px; width: 24px; } .iconShell_33x24 { background-color: transparent; border: 1px solid transparent; height: 24px; width: 33px; } .icon_14x14 { background-position: 0px 0px; background-repeat: no-repeat; background-size: 16px 48px; height: 16px; width: 16px; } .icon_16x16 { background-position: 0px 0px; background-repeat: no-repeat; background-size: 18px 54px; height: 18px; margin: 3px 0px 0px 3px; width: 18px; } .icon_25x16 { background-position: 0px 0px; background-repeat: no-repeat; background-size: 27px 90px; height: 18px; margin: 3px 0px 0px 3px; width: 27px; } PNG  IHDRa pHYs+-tEXtSoftwareCreated by fCoder Graphics Processor_IDATxڍS  Ih xʷɞA8Zx"ޔקi*f .(uu`P}ۇ~&BI?RaTiH@WmQX;HFuUNC-h.J ̳4\:$z=%3)SQv!Am frJ1[m`SnIENDB`PNG  IHDRw= pHYs+ cHRMz%u0`:o_FOIDATxڴ1@EQ@3bcr#cOb\``MTcS6Jсa(;>MόWU u.KOzcU$IPfn>^n"2ПeC;/T4!a"w_V0'I^D.U=~\&"W 0Ͳ<ϟvALMqkm5I㱮 }DQdoMQ>mzRE߷}G֢&C=]u|HM.<ߋȭWn…]]пظBo:*:] 7ɪmq%lL]zoSXx~/+IENDB`PNG  IHDRp,2ΫgAMA a pHYsj։ tEXtSoftwarePaint.NET v3.5.100rIDAThC혱JA}ro`u};_J6F,$\,)u6gew'pv6>zP( C`( P0 BP( C`( fUUL]סʋHceF͝2Ƿj 2iTkqޡp_1mJc(gF͝HSӦ4.IL& Zd4U.-"iӹ||:P*?TIKKמK3t:M8tjڔŪ=MtgZ ިs9zŖej̥T$v=Jvߏ9P@D /کQs;W;{'OP )QAPEFC,myCx[Qh|w:>{~Z{[uo55A @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @e%pik(kD5jW7`~|5 C^2t>#G\յk!'|1u"bmZwJ& _{^c-E/R#Gl8x`K! qoKl*+BHe=-mOOG#G_V;rePHFEy;hH z*?07nie{?~voW[[.E5A9kN$.{{uAoƟ=D((,L˻./Xl:w6nݺ2_{DM_sBmIYVgY̓cWuYϭٶ✚-+ϭٲuۺܚם_s\V|e[>^~9ih~Z.GD-TJ5V+Uw~*Cs}&|csVO9u-s?y`KQ|IWd⌷d촅_(Xtﵟ{hmyF{Sj']St;l1q__"_g[=A_Nꄑ+Y *4}Y?}t0g2eʮ:khd_QDo_3fL׼ҷo+iYj.'1zzٽu;8h!|Ʀ%s↜ Y,g,;J IpyȞOEvi#DN|(BɰO ,*Ck/n%[+aRgvSn]>0mQS+ebõߢeڔ~w==4۷oӰicc\imy"jĵL9~g1!~˗6?MIs,ޅۜҽbo%q񭯯$).]Y&4n!˖wAJ+}~/~咉c)^rsǻJx"޷ྊXZsux:ylʫ2˳/Tlb&B"Kj߭:(קڏT xD2 z<'B<-^ {x[?7;A`UͫuO=[ZP66%B3x^< . ,EGĦ'?oFo}vPzJ4hЁ;nFgoW޴Wr%5Q:0|DPm +ŭUVᄓnFZ,z (4OLCyiBD^<ېo+5N N['"ѡ#i=!rӢ'lQa u>%< zs"ĆR~=uϵA/b$ODwܥE߁=ʂz^۞ $>@:4s8O=g^\$ $+}JNbO{nhpvV'RaaRlxd:!~:O_'BRxI~cnZ'^d}Q~붜ф'mg "D+e#9ڝY˿!cJ˻Ib7ioϥ-3|yOǜU|Ͽ綖=!ZɿKrx]jN&A>/B`?Yq(X{:/>gL5w%59h}/>֭[C2/?0)6?'B,kz8~|ޯhJ!PqÏ͓G87e^y?tD^Cl/awċ77v1yгunLvqz[KdgpzH(@t"I~[48bjv~sεƍ;sω;vw߽'4o޼/_W?Bn)~P'\#ZW[l}ˡU+eyY7QIFN E 0dj9pH⠞Dao"[<C䲟\xMfxs<$F(*~I4"D~%@^&Qtdf? IPŇ.}_6o)}UOZWC㓧 BRkۈitk|ZrU8q;wXyCQF>J>Dɸ_ n^[ҕ~h b 6N|n' mCCO>CFCm[3?CYˉҎYj|ggqF?g|ԩ2sLydĉ?߿c9fztŸL|1X */E^zAԠk/ۂY:/j-zCtrĞ<=uD;wnݺXGb:y 5$y>{ +uW9.[Dm] ƝщcX1G-olJZքc"wt F f+Ȟ{rj8 m;a> Ȭ~ɯ4χI޾'D"B:9[R4{hH'=/WPmG=xKm"ZI懐SxMU@OSv6Ҡb7~FX;_΃olo?PsGRuv㗏nR%1yM9wb§z=Y1m~W:Fq#F龰mfeQvsP< yeF/T;U6X6OE>ټ,8=tr$@`Y= Ux*DtBEǞ^;H.qD|qdG^YaY4`tʿe=g6O\@LNY93ఓh]WX/Z_j|u+sI>,64zl1=8rnf/SRauD-\:_~9>/Y.-=^(7? yx:_- Of,ZQ&m[Z9]rJSe2׋23ԓ*B^3ˑbڞnJ_Zxel\{˖K{몚#A?ƶg*|W(dY"Duֹoqq^뮓:[_ʥLB & Z~4[ɮ,TΎ\CǷ+ҫ%K zhUwl~ϖN3`e TaX|nds`䅿LWVy˖e㶧/@bvܒْ1'I,X-ɶ=)T9 I 6NLJH ׁs@c6xP&t%m,IOm+wJG qQe!e 0CŇ.p 4z6hZyW8ߍBFؿoha>Ds+ |77'?),O'~0p;R]߇3]Pu@s\yT;vuk;NhZ}WO=MB>cCҴ">T{lx#7A JJO i[3_?Bж%JPƝOZ_1+.|/:~Bj?\zݛY2eƪ LǷi'@L~D/B)r-wVkzBx/$Up6 f6w}8~:벐/[ҫĂ1זL`R]E8Ǝ;oޢk6g[ni:/27XQ'A-0ݞ:+{>bUK[·Ӝ!Z vZ ițc =Z:ωjd7 8<%g߫e~D2vC z^[mj}oLiyyaܝIH+dK(@q]3W$XK:JF'`gA7X\XܓIފ[* &@&*| I|>Kޱ6~u-iYAXhÿԶw>/',?o=#5 meeSN҇t.Zmղo[fU$@yi_ǵ?̓Oϖk{@?Av{(~ ל//'F|"D \y&-ĿxDZ^V-j\YނY;/n ΉnCi?~ Q7ˈ?YozR|oCP\?=&Rl' 1YޜӶRJ% -zAl `lο8EG"}tmO>㟐ٚz~_wfP`~g4i#C 9bkFn6ׯ_,>Kc!AFҗtl)K( ]M zufZ5W(sR۞+߬\g=J!">tVaHCo< rsevC F{mK{?eqZ tχ-e>d8o~y}H ҟz:঵%XNdVg#ߦ)e¨GE{}xe+|5' S&]|a1"D+6<7Djf,4D/1)b?n}xRUiSh fYEHK<&Btɬ]YS;@'^~ӎ]BꀠYw~_R8YiN vHvheeϽɾaߒm/k#^W"k S|\}Yôϭx|k>ՖRW+&MqXde뎦r\8B&}T͗>񓿿GĢCkDj/~T:oM:C Mr?g1IYDk^ -R~:[$SjN|ߚdȈzqSQ}^F=>d]11M|}oNvh0{Q\3 u (싶c^ \uU\|P׮]G|_ \l'_oNӄ\FlF]N[7˒ja.n󭄷湢ؼtYΉƯxYLK;[$*2fyqM6ؒWZ脰hF|XŖ~z56|Ll|v]N;_cͫm5Sj;BOIWD =ڇhbٕrt[h:fm'JޖqN VlI!Q4c r'nV-+e|ڰpf#q"Dͷݍ<ǓG?.@̚tON$%߬|x[XLj@$8m\~p`xQ6Z<:/5Y||yQc4LsFIjN/;f;!O}BwdScXOХUZ=ȻM[Phh3}?X šȕ{s!FyR)sV"D'?m73Ph]eS/:`a2-Ȧhr;O3"a_w~&/YǭSUvYGr)/|_ 8pݾg?\xҧOCc4t @މSf99,͍:Xu&ES:Pv5n\kOHG?qhM#mlzKxM"onY}_-׊̉<^%2syk3hK+o}y3wv :ψN{ ɴS[9K_o7Mxi>sGǯػu$h8)~ANL7;\*}]D]QRu$bhG>fq?PָkdYn(KOXr--ͪoBx=sd曫Ak$@|m (;B=mLnΜ۴m嫤ݥqG pYo.آIJ&L@o}# ]1meRG'>;-Ti_!juiϮoVK ڇQφIaZ1:]!0a#M?4\vwm\U91Va E=~ԨQ;x޽{Kvis|k_;+xo߾ bΝ׿ _T190Wh 0u\'Uha BT|V*6Tܬ_L;&c}'N7~\MPC!?ynU#_icZ}].>PEۯYC[fx%UĮ_юnmiۂ5=2[:eǬ4VI,e|u˷3z~Uֶ`V tssWrׅ6VuQZ< YTlvPV_[qvOVYޯBȷ^۹"~ZKOgYuwU<`]<,Cr[̹jaHy]rCBD]m\2ъIbhw:֬%Oի\~n|b僳knMq;OȾ!dʶ(;\,{~WdÐ_Ɋ_uBX!C+~,i_,y 7;^bއbR|WD>< +`Lw͹+Uh&>o}?:"7fu?FX,Z>Q\dZ$>|#+m3r :,oWO7 ¤0N|dAuPEK[[a ,UOڙ_߃M+.0- }O!>q] oW.@t Ӷ[ć4L[Tj.B ]X_쓜y7n?=4mHd.ZŴ,Qɍϋ>~YXȎrҕuĿrֆ#YB6|5ұ✚w >^v =Qvn,>3|ܷlI6I_uuU:AV[v5ZoSn^ּls_"D'>tżC+הbKժye|Qćj!bQaa?VW'}+o[Ee ;a-/V@JCA:,O=;]_~3?=1kk&VZ!x49묳>nϙg(zօQgFsO2dȡO?}ItQr[X?P\sgCx>a:խrx)y_ 8ⲕ+ei4xVˢU2jmkk⭗U|Q߉6ⴌ̅C~O tkm]sNg-}N $'>T.]rf&`\CoN-5{նLLYHΝ[p"rLrwuPL*{.WʗJυm=+~j?Ew;wqw;G-z"^a=+ eA\KRϕ\}H-u2Ws}bgu]jbφCtc%x[nob.QR/< n޶3b#D.7\QV9g+!sO:{Xצz3,$8L{,m֗u%YyvY~ NFBdЄd R7j9bwG :J[ts9N:$N)*&Ċ;Wc9b9i CIENDB`PNG  IHDR@@iqtEXtSoftwareAdobe ImageReadyqe<fiTXtXML:com.adobe.xmp IDATx왍m0qX 0!@G#ttz YQ`NzB·V8&1K6 % .IW`W23$Q)-N\!xUi,@\H,J.{ [?Osv\>I5Ljm7K%߮Hڇ~bkQ9Ojn9 h]Vfy)}pD%t4LHO9|g9|d*)+ Y$&W|O#hHɗ.[ܣ 'g!U6C֜;(T?+`w>l"_7ǻIENDB`PNG  IHDR w}YsBIT|d pHYs  ~tEXtCreation Time06/16/12[tEXtSoftwareAdobe Fireworks CS6輲IDATHŕ͋PÒ.L)FHwC*7Q[ŝ C qP$b4?6,}rn=pDϊeYZ"@V.ZgmGF.\4M#Q!IR1 PT"V6M(8lb1b6$ vV xR (rfÞx̟5?ʅ3>Ѐaeh4fHRp'aw3?&| 1(H&FQba1{'89CdYm6vfn7Z,nx<BM_ _m뺐$ yX1x(p 躎bua'>~=k ??? p8 NtdB ؾ p#o}:0Mƫ96l1|>r 4c /_G`\yzpt ??UplCIENDB`PNG  IHDR `|"p pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxX;r"I}t`5k67nPDO0 `OWH7\!0XN6UYQWy<|N`~0ZosA~Z7Х'""-6&oO3NZS {}0WG_sʧNѪZ~nh_ 𛁿jAW]ͩ IӔߌtzxב@㩉wΊOp3~T3++:|EgG HP;J&5)ұ0KMUY@!eF՗`X ĒgFIggF1pE10Ƽ$_J~ \cT?@Eu#+@)DsjO7K5k#?F/C) 1&1??#Ep (P$Ƙ~@Jb;>:pjS?@H@@ĵx#d V?`-N +@º #q:Rooog=ѭI@.8+*ĕ?gH+qz&5jIENDB`PNG  IHDR` }TgAMA a pHYs(JtEXtSoftwarePaint.NET v3.5.11GB7IDAThCQn $|e##cdb2K 8.q0\`p~o3Kymv3zLYB)K  =%OYBK#g4WewYR~tgK}?=йCg:*?'PCŗt~4*Q%oC+=3HT3 =T8sPDύB=wCMIy]Ee=7 MWAKYE.ώ@e+﯂tLo@fTx%]Qv>:;[)+aIiY!*VoxCoLaIi_YG7#7z҅YE7=cI6?檬2Ooz7Г.n25Oozʿ%K 8.q0\`p%z5IENDB`PNG  IHDR` }TsRGBgAMA a pHYsodtEXtSoftwarePaint.NET v3.5.11GB7IDAThC[n0 $ =:'2vVf_Hr!qpVí[ :nu0<~_S=pVx<k#!_-_>-鞟iN\/\||*龫Z=/pq77@npFYB4Ͽ#KJ^~j {0?|YLsk/p:Ynu0`pVí[ 2IENDB`PNG  IHDR$l gAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEVR;www0e'777(1X_ӭ>A؎^m--1;FK);F3KxǎQג׎Q^߯f {fb{f6OGLlc)u8jfd3KxXQ33Y|w8jXm I~9j(*s̜bKX #/IDATxb?5.@L,A ȂWƮ[&",{ @ u Ȇ&PlC~~>;x~ Z^^ Y cccdC d l `H3ٳ 0.("%$0G!@FFFͰP}y"aȆ%B 8/mQ.(QbOYVIwps&BDIENDB`PNG  IHDR tEXtSoftwareAdobe ImageReadyqe<fiTXtXML:com.adobe.xmp {:IDATxڬAP{`۸6 7ca^&SJ Y0ìl1cĔR/P`lle=HV")X9~Oƴ,@zkĺ WD`7 !X v)rD:" \4YIENDB`PNG  IHDR w}YsBIT|d pHYs  ~tEXtCreation Time06/16/12[tEXtSoftwareAdobe Fireworks CS6輲eIDATH 0Ct[Or#|#B#B*u,}ifwK~ >i.@4@9/Y2}cIU\e Z!=IENDB`PNG  IHDR w}YsBIT|d pHYs  ~tEXtCreation Time06/16/12[tEXtSoftwareAdobe Fireworks CS6輲AIDATHc?@}uF0dάY{yy۶mp< RIENDB`PNG  IHDR0gAMA a pHYsrItEXtSoftwarePaint.NET v3.5.87;]TIDATx^}^UyYXWYi):fCvFV[jFuRF,C(f4@ <%F$$$$`Aqtggs?Zg=˹:_}kA @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 0s=B`~߳>{}RWuך+KƩ,λt=\<f{L.]c޽{kEyzzU_Rq8.%zAӓ2຦|~W?_R6ȹΪkl0CYRUy:$3㷦/v"^꺦s֏d*}9" zMMp._Lig}Y%/;4~]aS?xl?6rfBO@%hX9>1њLCӾ^>vl0^,~̖Ǹ>XgK.= |9jc {zYk#$ǚB_pQ^Cb?vN󿓿%ZPa--y|Æ 5=/y<J率(WΩI<{&q^'9N%?D6c+Iԯ>\(|Qr}ʔfAa:kq&֖(VX}y̻꾂rи%^ǞsH+1K>̦$ڏ-gAzz gU-k] JMrvRgOߣʑw,}ǥ\GSE|n8 {-=&a,4(ϝmiYB|wdKHt [oPؾZGy$|ӟclzrPY*ﵺ+q`bW7zScXv/*~kSckLzu5cKd|'.L9CJhM;k_Z^{:{ikC=7}}BJ3AznOL zijkJw`lȞLsf(?;j:꨺`מֆכo߹ܸF9G[&I _p [n wqGX~} &>WݛL%~֋mm_y"v$Uȟy-SZab _Ň\zxxܣ +ŰJ;'O>Mt̟f撴o᠃EºujQ?~ k-;śfO:Jpxb \e}ql.sSKSO5*v,^f.؝aVjIZ*Km,1V,븷8zVVRzEp̓zʖ/+-*m{s3W=[SMsKpy7+c)7Oq5y{mt뮫p-Wy|z}l1|({ߛcxR}zK0n`Usnb@mڒQ4mۀ{4 H\<;KLJꧬ"XϨxmWq}lώ7Ye.U7،Mz^ohVϻ&a+CSj[+7v:Zp}#LPg"E@l"RM=O ԇ)&dX3/=J(ײs O%| at7ǞkO(r &ywz,qPzk2%vXX-.Ǟ-#o@Lhca՞mesĜOV9>zc9og9[P-XMduJ릛nNÅ^2֖J]#*Nk᝿~W?߆6[֙G7C ?#E`-%o h+qWrxxKN._R}Tv,_O56S:dsa%矤q Һ1ukͱ_#4QkW4͓J {gety}AVo1>y~8窤0sWͣV*|@k<-Ƽ*KzMNJt{S<\C_[=r/ܕD !չy[o(@)X'Rˈ@ \[eD_=d _<^&/rXu|~T[2o'+k= 0Jzk yHKDt^(oFCr `5[d.?{A j'審f PumD)cӯ`rvO Xt%YY?Wg2oIIۯ%VziזRD+;< uİ'I(niRܵڟ_>iYk^^TvMYS38?1^~CNt^=9'K ^K^ʿ{,x8O0 /HĮNa/cf7"XnOΟd%KxJB kV_GJzb9mEv<L`5]Ƿ@鿦LjqD-|ā{qf-bhbY{OqbeyFwU|7ok< ʝ&]7}ڇ+֞z[ichSxx~_\mK9c时o>mYXIS;fT@nq G.CYfQIwK+M$475^-dg2-Ac"-0CM<&>.ӉѵY+[o⤚GtJEOڽkֳZc~6Tᙝ\ 8KgU+n7KnɵVEK^ǣT_,w_ O 8hA>\*} >hϙ0qT~so} z&/&5R+,Ʀ{v?/B:*o9#nd8KZ~JKzHڪ몓=kK\}n|mzDє#>nsvh%įlǾ6+a(C_rlr[K%{;&~e%] O=H?=K_jV"N:q^]"1}+W `Y߮>:Nik$uTul'+ q>|׋ `w G;GJVIxt/esqC7{7Lt sHv+i4ƍZ>Pmʼʺ6м›VGMtAUxP?r9vlVAHyrdRoƐ3ms&|!/z̴͝C3L}*+ 6lO|vy\y*?-窱kswƕΡz?{œoQaſAN^ b_{-++S= y_*5؇Yc[=\"d}>}',LlS[cʕ4ms<۟?恽Ų5KӑˉVrl%,y]Sd^8Vx?%_j圸A{#Q175)WNy'tksT ߾vt `yexb#flN!unGcZ7*c%`I븾y`yP9oO?3W^,Ԟ=awֻ{!~qӖOZuAK܆NΖ`C=;-`|R[x)+.#,ƒ'_%(`(۴sVu=S$to;k|}o;=bhD0m,q0z yy(q.&kxE|<r ~7}t&eƗs%,^H믉<o M<֤ R&iaZ1U{>F?xt&dі&7 kT"ڮgvp$/N?'W^7%h͖8)\t54,٫8OP!Nh㠶H)?+G՞^l `k#>uI{/q1x4ۃ-5K(9%=W2MM1^}-`Ҏʎ'b}X;)g{.vT *%ߚwzP5,yfC] ;oaxhC`O _ _i^[~:;5CG=~w8N~daX#a{#E!.=,pA!7֖@5kK?7JZ9HS=ĹqxVZR_k˓|"8OFu@]C&wW=5 ˪'gx7=oǣ}{{j{G>y|ؼg^Ssb'cEWfw\m5`"&eBX^r46-'ʑ;we)Wv9OP{$}y F'8 ʽ/[k.]/[<c5^f ߇rQ .܃DZ86jދ`s3]o`C{gٔ18/8`jӼMKJXf.,*x{οr1lyP9m{br͙^oذՋ;(ֳtKeSq͜^L}6~/Q 1'5zͻh,!k?^z8ܯ;w38nno`D v:M2rPϹPOY[L) JRB'c!_6/Ubv%0y?b'?]߫8Qѣ7vmV1~oeGcy_]6myn_3;wկy)CqĻz͞*pbvG~?%]u Uį_JqoVmтLP}njs&p6^W|M% %Mz8^94fOwNO/++]xWQO eNHƈkg4ۓglL}J:E|8ڜ//%#z,vEdKqچz>zx|tl Y2һ+_>pm/b8:>7$~l*#ou?\CSs ="pY ԯݣ:k/Ģ9 9`|Ob))⼤RQ)ԯm^O`N{-/^bѺ7mqW=[hk,`eQ}fšuuOIXbH{R\꿞+/6lͬWљ\uDOxPU[ޕfyqpa37j;QC~inį{3gXT1D$x?zVq{5^:Xċ`ʰ(η8Ph3Q4wx+ |KwžMʼuI@*?ܓ6`qV7k4F0èmK:ɍ=9.U64߻۠Tڡ%KPO"ʼnZ0T^I$o ַ`<_ᷮz.Κo]bxݵ/_+繰eU+_F|/z8~S=o霪-&J~~T-~uz| [nwIM2jy@־|(|&<:K4Jfݥ$mqm]푇'wm#>8mbt}'a.{=|> xͼ6Fn]% ` knrt-IOG<.o+~ft?~yZWGeo[UXX~)ձ[__Cbkbq)6Xbv$qEc>3h0Ot}9lKsn-Fhru z|xaˍrK渒,1˯3%&U6* *GA__vɟ }D\X˄g<$.BJRԎI^K?.?s֖p.HtQm l_uT.I!-[̬%z#/Ca]Cն\/ұYc ]/K(8h92Rb{JWZXie7`#U5޹>'%P}rخ*ۯD[@V'm\;|Wv)Dv_}dtRƓqONjsA>ĉfǦ་_ ֳ+;w<3#|&Q+^9AxBf.>2 =(NƖm~ |qUvUƧ1]KTSoDngSmy쳥}8Y~n$d|9b!e/,RkYyۣͱxU[tٷ:ە$ay{HǾ&&v?~=ؿ=&ħ׽%QZ?,VesyTyIX{o;裏֢W_% uoUVڍŻ;W /|͋V(_Q7Y;r%~~ÿ8m]xÊX|w? |~p֏բWw '?0ko›o8E!,=(*S—Y=DUXg~{!| O.m^CO#_C~sgIB2/B;-u< ،m Cx=WvCʵ^.@6H1ڇO͜ݯټ;tE\k&/I}sעXj[XadzX0R:XNۯ2]ZFnz_n\=o^篛8_~{gjc/$ Hͼ6MP_lzεP7{'7L[m]Of6$z%+~=ϩwjٟ^KW~45+akh{]* `IւAµqѹSP'K*c:ߛLīO2\ӟew>$`ˑ؃2)~cf5z", 5c.ĉKm*~o;1}4%]>AD =PشiSغukؾm[زuKؼM}p|'r-uʕ+ X<]Dxut !k_os obK8>w?n7;1,EO.𵧗Kpυ~*|nӇ§wX8n;z7q$p'BS!\gT!|:.K ܣË_<"o ;+'N"58OcmɈjjuDyӓ'7,q/@cxCvQ3Kv=aGxw]^'{{?l߮\ψgʗD4׮]L@3?++;q3Տïx8C/7|z{(wHxW0yT綍syrC{_ƻYH;r[~aA}Ǿ x+f{.S78ؕRA=_<̟e? Ѥ16vڼ;]WR7RHm"Xz]qUf=w͓*))ce(ܛL߱i{)QKCYꓕWe})fk2ܵX*j|ɿUubm>bobtބ{O~W/:zO\}=%snZ5גkPoc=2XOC1_.?ixUyOW*?5ึ4:SϪ~팦̬=֭[W\8’_z܁df:iwi4Z>}uQ .:TNb_+7}#%nhR VMc[IKInJp{3 XY76AV=o66+AO H:le$'`<4SaZR!9q*M\<+|Ȳo},_-q+qӧ/9GmB(ɯ`mϠVDWAqω_4XSvԊAIڒ[v"!XBD .a뫞ⷞO]OngSmkGQKI&R RoŽ*כOfɶMKAo9v>;dqeOHʄd`j|b]ZdD96aV_2pm"XmXcg\1ٶfmj<_Y_Eį$z{5Lbj6*ke]\rzʨ|PPDhp$nS'3ХKbV8aS?t\W6,8[a7W$Rv,mmY?׼e!=~MyWx氶N>#~|&=ٙn%~c@8LP^rJ?)5_ySsͯzi{1{ Ҡ 77ٟok-ůb,Qlě}RrM"4G&|io[ӯXwc~:+?ūL7)*ƻb9_kPMEͬbt{{[6!eW& `\ohcc{Kay{R_٤ch[0]saФ0wmJjDTM4J'/eTWqů*-Hů޹4 Թ Lt7i]s^wiY\7VNH6(^uh7oAOrVmn6h,555U%M籇dW /^R'c';ce-ӤYg*įt @\=C Bx{mB HL|Um7Ns-,4q7 PžO?޵HvBR¨t\ԃaںQ;(ڶS#.1"dƨ\|T6M\ 阷dӲo@ca?IA[C҉~?Nq7݃O6_󑽄D `}ʓöo2N[$v%a{7r-?z'~OW9I?]}q'q9cݯO?V!/fGCÏOyJ_JM+O(xPhmRR< `UGVnĬcYI?7MrT˕&6 wbMLt^&H֤G\wDO-,Py׋i:GN̴n?Xnr}W{Z|鋽_(&{mcm|V_K?ϒ7lR9w/~kȯ3!󍹸j`ٵ"Rz=~r \]W݋OIB*ӧV^Y_}w-rQǫVw>v{PSWb_V{^ R_- Iu݇~cAO姭׎w*GM6DMTyo\ec̦@ y( c.`X6 kkmWoW A fsɖÔQK@,7\xBz?Ɠ&OZrXTwlύЩK.d<q:b/#R@sY63c֔#w r׬d&ŨrfYy** ^"XmX'a8ESX.[?+JLkPsب{R'nܗvnTue}?8lTwOa?/;V1"eغa6mk,{j0AM7lذ_}ꤓNGtAff˽ K=k)~+nns8ʸ=ӹ}_Xscn{-jm\m#9VW{ۙ`vu]T~TN,~Qc,OWq2bd*Wxn7LIf\/=*ݮ9I鶱K8̃?ƴ)fA84߯g[zOx>Am,m> c;X+e33RTNdK֒l펩pҳMxANIeL"~^.?:SѤʐ&_K1#]I%݃\f%,D }OXeSٿRoj۵Np\L}Rmw7"XZ qfųVxA,+e6[G*5g$06Ci*oN _2-+(~eg?xi7m߾"bF%璘䏚w>M (= c̽kEM4IJ]^6P[i"Ryס< m<.\#a_ZrD?[M>OiqG)mvi܎ӸXOZ-F֨k( {om󅼌smj|Lɶ }'`xP7 P<켅G}i10r֭[W_}+_C:m+ / +N ů [Rң^aj fX‹>KvB~ZpbŊx-s}NpvJ}ƛXu~t$0(i^@qAוC֦zOn^ i" r<l.1ӧx`M5*9BkuҶۆ_xܻmd`z逸U=fHO sAN<%+˟bk*&R N8q~uǭY,_E0f a8Y6\Ie~+=b99?suѓc盲RBX-*)v]KOk]❧Ņ&߻Z8߃f!{PӤi;oRvǿDtotG=W[~5I[y<_yQC@7_tc,o队/m"^K#Ѯkň&n|f)}W&|J 1*/JV\{*}!f3eʍٝMy&Q-]GTimӠ2Q=>M;k%qX~2KJˌׅv]Jז+K]>+z oX[ob}$l7!Eo{S¼XkxnymO,2|#2-ќ#ss;Í7:X{x =޹Z~Kx o ]['8< ;?sxQXsZ^ŬY8'g8on4"XWZLZ|Es-iIS_*xSiFv'b%./~g9%nei>ۘtKnاeD]OWbUnkh6)~+13._~{!ⱯbnU1%_ݳO~ZK&]~5nu4}I؞;s6@ "0C+ C-2tK+/tC{J,(:F|_}s @|^9߫²q[~mWW೏!Yl] =EٟwJBO WR{~V}SiWviU9*33FM=/ʾ3Q?^'T(zsAf,.v+ʔ6:ZJ-?^yt?urX1Bs˘o @/OJT+%x%X趵 >vKWvB~_Cb[Z꟎W_Z9~]1[/Z'!7yMsX+ͻζ=x6lOmĮLy\y 0,v@Yɶr佞n$ݾvk} o]JοSK>ښ1h3zSK 7zt#}iz/5c\@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ U@% $IENDB`PNG  IHDR w}YsBIT|d pHYs  ~tEXtCreation Time06/16/12[tEXtSoftwareAdobe Fireworks CS6輲+IDATHOSW-uc"r[ZtC-孡 1PeKde%C"5(FJ~(<9Gzdh1;7\nWK|C;fnMdDBGK#ĆNV0&yZji<Ѡ8xkB5(v-oM#w㹬,$}:-h2qmo'pVF?/]: %c|ڼt 7InPA)rh&`80A<$_.$- =.om[xͻ+Nͩ>Q^]Ow:S9pW{),`ZM+X] qD1,fkͪ xe/wGZM`b,G1yt "vl 1d=̔Y`bO ]A>k66w^`$$gq9ݙ*BƅVngϷLhǩz3I8=7qԍ_W/{Iw$a*~k0 Kh4hr2eh6[z!BVlV=5}~q݋ͪĘ{zbͪ[O0>h U|_M A=i g1 X$y1,(wpׂ ,<\LOg+$rYM"W dJ [WOYFy6[37{ǟEWd:ptM3ԸV_13NUIENDB`PNG  IHDRp,2ΫsRGBgAMA a pHYsodtEXtSoftwarePaint.NET v3.5.100rIDAThCkUGtJ7]4]ZKB-f4qQeiI7`[%m1J1@iy39y7 Ç=wf}~1'[ǂNhe:VZNheB766N>] {N|qofg W A`jGIZ/(o ~@͝ᇝ&!}MzAy[4kF&w?>'L M\_'By23zķ|~O5y緷Π,H&{/ts>~1 5ZZOΟ9@ Ñ~t?}#C.Oͭ*,7>.f-\&k_$"u/q_)֫2*(%. zMl>|V&i*p 0ͽw&PWdPNNy ~\NnD,n⮐(= lbuw!SٗQP]Vi eE]dN{!SB 'M#2U}<[]($,ϳ"yn  "47. zK 8Hx$MNw;u/CQT7WVr!(GQ__y]I kʻIkP]P6Set@Cw! E=p9#PXp9x -Tةƪ+= SUPxxu ES|*?5649[_s@e؆ X%!7EC+m4Ur"|< E$ d MsX؂…)Ay{Ң5\¤BSZVb\ Ay@bč?IUj=tB+ L'2tB/[IENDB`PNG  IHDR w}YsRGBgAMA a pHYs  ~IDATHKa ]t9=w҃x9 'iH*w T)4f# UX^J5&@ty@+jZ Q[[*0tr泒=i.w1u4'SgzɼL($@\3O tjjjsܕ3CCCsO}4[P]=Uw&mpM}yNj*P?sf,Ѥ6VM{6)W\V FGG[ڧ)C@]j+_:|i@ܺ}7}^2w,벖y@f*XΕnK Ԟued=Xe-@P~xn:f^Uw ԫ\:@u&ҡ6[d=>BC;Y @@@@@@@@@@@@@@@@@@@@ G &IENDB`PNG  IHDR@ ~gAMA a pHYsktEXtSoftwareAdobe ImageReadyqe<0IDAThC1NA9G #{ @caWrM<ƎBJ0?0};d`?}3:8r N.]5S-ɜm9hMmAk2hYM/?luu=_ǵzӶig Č; ː(~sN~zLѶ?dRƒA'w WshۍcԦ\+<КAmC8sU],Zoڐ: 'jS6bɄ֤ea뗍5hkG]0aI ?fɌ֤pZm!Ё[Z0ϯL@m#> &5! :m/m,'5S8o6&ڦ!~?}5^ ^Ex~ (8?r~,0e R@[rnʃ)hM:AH3? KrY={{ƭ:9^CК35 .6ڶ HdF[2I (aO2-]5S-ɜm9hMmAk2h{ MHcIENDB`PNG  IHDR\E33gAMA a pHYs(JtEXtSoftwarePaint.NET v3.5.11GB7OIDAThCA 0@k#30HK5ǔ)HJk {)a @)a @D I_ hCv9IENDB`PNG  IHDRh6gAMA a pHYsktEXtSoftwarePaint.NET v3.5.100r«(C~]Ԏ W p {F?w췵 yʂ@>Yy@,\r7WՃTVX)Ze1s13dfnatC B/-=!4C35.( ?{bOJJJ_^B90fŌQ(mL_n0cfXП1#c$J_ע#&ȿUjt،fJ 3F%dYv2F*|}ƨ`,뻱2$H1z(bgfOLM2Fb"GZ㢎 B?{3JJJ1zH1Q2F}98`3Ɣ1ŧ#gR0׵A yՁ6c$R2FÌG i(s1_1*t2F@*nL0I#RlD1b'c#11)ccwS ,2F@f2Fָ#+b%P] ]IENDB`PNG  IHDR\E33gAMA a pHYs(JtEXtSoftwarePaint.NET v3.5.11GB7IDAThC kqFV[XQҶZBQZ(iH2B-)F(V#-)%j i5P>ڏ(ߺ^CgWO,Yo,a8Gc ljXp*NJsq>.%Xqu7܎;q&.|/_[| >r?G_/Q[y%=\J#;elM^jY%˥V"Y seTt*\&x)2b,ŁB(   B( B( B( B( B( B( B( Bb(b! ˡIENDB`PNG  IHDR\E33gAMA a pHYs(JtEXtSoftwarePaint.NET v3.5.11GB7IDAThCuSd !" J HtHwH (J R"HwJ( 3X+ +66pg;;'''xyΝϟBBB@DXXTDDLT\pᢸ8xQRBBJRHKIHK9YYy99yyTUUT:yeMMpW\zh]tuut 016abbzijjv󦹙07VVV68;:889:g''ggW<=}##ccc`b||rbbjrLOMLÒ90?VWWV:|˗_7 p 8NS)p 8NS)p 8NS)p 8NS)p 8NBS@K_,cIENDB`PNG  IHDR\E33gAMA a pHYs(JtEXtSoftwarePaint.NET v3.5.11GB7IDAThCVaڔDTZFiw4*-DV(R$-% t3?W{s ϺVRMA)C o+VV $?',.baQ0;LOcjJ>|Ļw21qo16Q0޼! ~~z>|^Awx\>œ':: 𡴵UZZAs3}46ݻs}n͛qׯ׮Uŕ+Au5eTV%TTHy9PZ\b)*Ba!.\8wr,󑗇\9s998}ʒLdd =ii8u 'OJj*RR$$&JBXAt48! 8v G"4TBBl#G$08|A8 /|| oWWqq+{ wc.qtΝرC};m֭Ö-bk l kkl++ƍذbn33bdh )h )h )h )h )h )h )h )h )Rj˯S| cIENDB`PNG  IHDR$l  pHYs+gIDATx^An@'*HlX%ȊA ED,Xl a`$4F\~[xLgJg__oOn:;ސ7a:h4J &&}mC;Lb-{BbhE8(J!ar 44-C4]5[iA' iv4RCz8Vn PsLr=$!1h#FƂ.E+Fŀ]{btZ7h?3Kpab,af -e1x- onP|ZCm ⾡LsoxH \ip.ّO=\ CGl eFIQKOU[Ϛ{XB!nöJ3׷F gά  5um?Ɔ"q1;5n}3W4vL UwRiL:4BAf!!c :hŦ(6\~jU=uLUl3uN$ bDмDҶ6X!]22\3Tnƙ13FH 1FZcƈ3FR 0̓Im#Lxn3FlQi&g8<.#:IU 04½a3\؞[=cTzMezo1zƈm\1F1"Kb0M=x}\wg/kY9\0FA.#c\iq.I#T`4%g|NaFiJ֓1/{fmB-8 #najS[=!o3䋑1Ocqz#83t $f$bX PbƈQ 3FQ 3F rƈ59cڜ1b7YCFije b#cDփ1bV3Fu1J1o1zƈcd# ^FS1"c>+Ra{S|##΅Pq1Ҕ12S3FS#3Uk;P"4d.t;ZH k`·IENDB`.intellisenseListBox { color: TRANSPARENT; /*[{plugin-select-option-color}]*/ background-color: TRANSPARENT; /*[{plugin-select-option-background-color}]*/ padding: 0; margin: 0; max-width: 500px; cursor: default; border: 1px solid TRANSPARENT; /*[1px solid {plugin-textbox-border-color}]*/ font-family: "Consolas", Lucida Console, monospace; /*[{plugin-font-family} , Lucida Console, monospace]*/ font-size: 9pt; /*[{plugin-font-size}]*/ list-style-type: none; overflow-y: auto; overflow-x: hidden; -ms-user-select: none; z-index: 1000; } .intellisenseListBox ::selection{ background-color: transparent; } .intellisenseListBoxItem { padding-bottom: 1px; padding-left: 2px; padding-right: 2px; padding-top: 1px; -ms-user-select: none; } .intellisenseListBoxItem:hover{ background-color: TRANSPARENT; /*[{f12-intellisense-hover-background-color}]*/ color: TRANSPARENT; /*[{f12-intellisense-hover-color}]*/ } .intellisenseListBoxItem[selected=selected] { background-color: TRANSPARENT; /*[{f12-intellisense-checked-background-color}]*/ color: TRANSPARENT; /*[{f12-intellisense-checked-color}]*/ } var Common; (function (Common) { (function (Intellisense) { "use strict"; var IntellisenseRemoteHelpers = (function () { function IntellisenseRemoteHelpers(context) { this._context = context; } IntellisenseRemoteHelpers.evaluateProperty = function (object, propertyName, currentWindowContext, retrieveProperty) { var getPropertyDescriptor = function (object, propertyName) { if (object) { try { var descriptor = currentWindowContext.Object.getOwnPropertyDescriptor(object, propertyName); if (descriptor) { return descriptor; } else { return getPropertyDescriptor(currentWindowContext.Object.getPrototypeOf(object), propertyName); } } catch (e) { if (e.name === "TypeError") { return {}; } else { return; } } } return object; }; var getValueProperty = function (object, propertyName, descriptor) { if (descriptor) { if (typeof descriptor.value !== "undefined" && descriptor.value !== null) { return descriptor.value; } else { var currentType = typeof object; if (currentType !== "object" && currentType !== "function") { object = new currentWindowContext.Object(object); } if (descriptor.get && /\[native code\]/.test(descriptor.get.toString())) { return retrieveProperty(object, propertyName); } else if (typeof descriptor.get === "undefined") { return retrieveProperty(object, propertyName); } } } return; }; return object && getValueProperty(object, propertyName, getPropertyDescriptor(object, propertyName)); }; IntellisenseRemoteHelpers.getObjectContextPropertiesNames = function (context) { var propertyNames = []; if (context.object !== null && context.object !== undefined) { var currentType = typeof context.object; if (currentType !== "object" || currentType !== "function") { context.object = new context.windowContext.Object(context.object); } var result = Common.RemoteHelpers.getValidWindow(context.windowContext, context.object); if (result.isValid) { context.object = context.windowContext = result.window; } var currentPropertyNames = context.windowContext.Object.getOwnPropertyNames(context.object); if (currentPropertyNames) { propertyNames = currentPropertyNames; } var prototype = context.windowContext.Object.getPrototypeOf(context.object); while (prototype) { var prototypeProperties = context.windowContext.Object.getOwnPropertyNames(prototype); propertyNames = Array.prototype.concat.call(propertyNames, prototypeProperties); prototype = context.windowContext.Object.getPrototypeOf(prototype); } } return propertyNames; }; IntellisenseRemoteHelpers.prototype.getIntellisenseItemsForExpression = function (expression) { return this.getIntellisenseItemsForExpressionUsingWindowContext(expression, this._context.currentWindowContext, this._context.currentWindowContext.window, []); }; IntellisenseRemoteHelpers.prototype.getIntellisenseItemsForExpressionUsingWindowContext = function (expression, windowContext, searchObject, locals) { var current = this.getObjectContextForExpressionUsingEvaluator(expression, windowContext, searchObject, IntellisenseRemoteHelpers.evaluateProperty); var includeKeywordsAndLocals = expression.length === 0 && windowContext === searchObject; return this.getIntellisenseItemsForObjectContext(current, IntellisenseRemoteHelpers.getObjectContextPropertiesNames, includeKeywordsAndLocals, locals); }; IntellisenseRemoteHelpers.prototype.getObjectContextForExpressionUsingEvaluator = function (expression, currentWindowContext, currentObject, evaluator) { var items = expression.split("."); for (var i = 0; i < items.length && items[i].length > 0; ++i) { var retrievePropertyFunc = Common.PropertyEvaluationIgnoreList.propertyEvaluationFunction(currentWindowContext, currentObject); currentObject = evaluator(currentObject, items[i], currentWindowContext, retrievePropertyFunc); var result = Common.RemoteHelpers.getValidWindow(currentWindowContext, currentObject); if (result.isValid) { currentObject = currentWindowContext = result.window; } } return { object: currentObject, windowContext: currentWindowContext }; }; IntellisenseRemoteHelpers.prototype.getIntellisenseItemsForObjectContext = function (context, propertyNameCallback, includeKeywordsAndLocals, locals) { var propertyNames = propertyNameCallback(context); if (includeKeywordsAndLocals) { propertyNames = Array.prototype.concat.call(propertyNames, IntellisenseRemoteHelpers.JSKeywords); propertyNames = Array.prototype.concat.call(propertyNames, locals); } var choices = []; for (var i = 0, len = propertyNames.length; i < len; i++) { if (!String.prototype.match.call(propertyNames[i], /^\d/)) { choices.push({ name: propertyNames[i], info: "" }); } } var simpleCompare = function (a, b) { if (a < b) { return -1; } else if (a > b) { return 1; } else { return 0; } }; choices = Array.prototype.sort.call(choices, function (a, b) { var result = simpleCompare(a.name.toLowerCase(), b.name.toLowerCase()); if (result === 0) { return simpleCompare(b.name, a.name); } else { return result; } }); for (var i = 1; i < choices.length;) { if (choices[i - 1].name === choices[i].name) { choices.splice(i, 1); } else { i++; } } return { choices: choices }; }; IntellisenseRemoteHelpers.JSKeywords = [ "break", "case", "catch", "const", "continue", "debugger", "default", "delete", "do", "else", "finally", "for", "function", "if", "in", "instanceof", "let", "new", "return", "switch", "this", "throw", "try", "var", "void", "while", "with", "typeof", "false", "true", "cd", "dir", "select", "$", "$$" ]; return IntellisenseRemoteHelpers; })(); Intellisense.IntellisenseRemoteHelpers = IntellisenseRemoteHelpers; })(Common.Intellisense || (Common.Intellisense = {})); var Intellisense = Common.Intellisense; })(Common || (Common = {})); .BPT-stackPanel { height: 100%; overflow: auto; position: relative; width: 100%; z-index: 1; } .BPT-stackPanel .BPT-contentSizer { height: 1px; left: 0; overflow: hidden; position: absolute; top: 0; width: 1px; } .BPT-listItemContainer { box-sizing: border-box; color: TRANSPARENT; /*[{plugin-color}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: 12px; /*[{plugin-font-size}]*/ height: 1.5em; margin: 0; overflow: hidden; position: absolute; width: 100%; } .BPT-listItemContainerHover { background-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-background-color}]*/ color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/ } .BPT-listItemSelected { background-color: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-background-color}]*/ color: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-color}]*/ } .BPT-listItemSelectedActive { background-color: TRANSPARENT; /*[{plugin-treeview-content-selected-background-color}]*/ color: TRANSPARENT; /*[{plugin-treeview-content-selected-color}]*/ } /* TreeItemDataTemplate styles */ .BPT-listItemContainer .BPT-noExpander { height: 10px; min-width: 10px; width: 10px; } .BPT-listItemContainer .BPT-itemCollapsed { background: url("../images/itemCollapsedIcon.png") no-repeat; /*[url({vs-image-icon-tree-collapsed}) no-repeat]*/ background-size: 10px 10px; height: 10px; left: 0; min-width: 10px; top: 0.3em; width: 10px; z-index: 100; } .BPT-listItemContainer .BPT-itemExpanded { background: url("../images/itemExpandedIcon.png") no-repeat; /*[url({vs-image-icon-tree-expanded}) no-repeat]*/ background-size: 10px 10px; height: 10px; left: 0; min-width: 10px; top: 0.3em; width: 10px; z-index: 100; } .listview { position: relative; border: 1px solid transparent; overflow: auto; box-sizing: border-box; width: 100%; height: 100%; -ms-user-select: none; } .listview:focus { outline: none; } .listview-grid { display: inline-block; box-sizing: border-box; min-width: 100%; } .listview-grid-row { position: relative; display: block; float: left; box-sizing: border-box; min-width: 100%; padding: 0; margin: 0; overflow: visible; white-space: nowrap; -ms-text-overflow: ellipsis; border: solid 1px transparent; word-spacing: 0; -ms-user-select: element; } .listview-grid-row:focus { outline: none !important; } .listview-grid-focus-within .listview-grid-row-selected, .grid-row-selected:hover { background-color: rgba(51, 153, 255, 0.25); /*[{plugin-font-editor-selected-background-color rgba(0.18)}]*/ border-color: transparent; /*[{plugin-font-editor-selected-border-color}]*/ } .listview-grid-row-selected { background-color: rgba(191, 205, 219, 0.25); /*[{plugin-font-editor-inactive-selected-background-color rgba(0.05)}]*/ border-color: transparent; /*[{plugin-font-editor-selected-border-color rgba(0.18)}]*/ } .listview-grid-row-filtered { color: TRANSPARENT; /*[{plugin-font-console-info-color}]*/ height: 5px; } .listview-grid-cell { position: relative; display: inline-block; padding: 1px 4px 2px 4px; text-align: left; text-indent: 2px; vertical-align: middle; white-space: nowrap; } .listview-grid-cell pre { display: inline; font: inherit; } .listview-grid-cell-indent { padding-left: 0; padding-right: 0; } .listview-grid-cell-resize { display: inline-block; overflow: hidden; -ms-text-overflow: ellipsis; } .listview-grid-cell-full { box-sizing: border-box; padding-left: 1px; } .listview-grid-cell-icon, .listview-grid-cell-icon-space { box-sizing: border-box; width: 18px; height: 18px; padding: 0 2px 0 2px; background: none no-repeat no-repeat center top; background-position-y: -18px; background-color: transparent; } .listview-grid-underline { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background-color: transparent; } .listview-icon-tree { position: absolute; width: 16px; height: 16px; top: 1px; left: 2px; } .listview-icon-tree-collapsed { background: url('') no-repeat center center; /*[url({plugin-image-icon-item-collapsed}) no-repeat center center]*/ background-size: 10px 10px; } .listview-icon-tree-expanded { background: url('') no-repeat center center; /*[url({plugin-image-icon-item-expanded}) no-repeat center center]*/ background-size: 10px 10px; } .listview-grid-groupline { position: absolute; width: 4px; margin-top: -5px; box-sizing: border-box; border: solid 1px TRANSPARENT; /*[solid 1px {plugin-perftools-grid-groupline-color}]*/ border-top-color: transparent; border-right-color: transparent; } .listview-grid-separator { position: absolute; width: 3px; height: 100%; background-color: transparent; cursor: ew-resize; z-index: 100; } .listview-grid-separator-visible { background-color: TRANSPARENT; /*[{plugin-perftools-grid-column-sizer}]*/ } var Common; (function (Common) { (function (ObjectView) { "use strict"; var TreeViewRemoteObjectExplorer = (function () { function TreeViewRemoteObjectExplorer(context) { this._context = context; } TreeViewRemoteObjectExplorer.prototype.getAllPropertyNames = function (obj) { var propertyNames = []; if (obj) { var objectPropertyNames = this._context.currentWindowContext.Object.getOwnPropertyNames(obj); if (objectPropertyNames) { propertyNames = Array.prototype.concat.call(propertyNames, objectPropertyNames); } var prototype = this._context.currentWindowContext.Object.getPrototypeOf(obj); while (prototype) { objectPropertyNames = this._context.currentWindowContext.Object.getOwnPropertyNames(prototype); propertyNames = Array.prototype.concat.call(propertyNames, objectPropertyNames); prototype = this._context.currentWindowContext.Object.getPrototypeOf(prototype); } } propertyNames = Array.prototype.sort.call(propertyNames, ObjectView.TreeViewUtils.propertyNameCompare); return propertyNames; }; TreeViewRemoteObjectExplorer.prototype.hasMembers = function (obj) { var objectToCheck = obj; while (objectToCheck && objectToCheck !== "undefined") { var currentPropertyNames = this._context.currentWindowContext.Object.getOwnPropertyNames(objectToCheck); if (currentPropertyNames && currentPropertyNames !== "undefined" && currentPropertyNames.length > 0) { return true; } objectToCheck = this._context.currentWindowContext.Object.getPrototypeOf(objectToCheck); } return false; }; return TreeViewRemoteObjectExplorer; })(); ObjectView.TreeViewRemoteObjectExplorer = TreeViewRemoteObjectExplorer; var TreeViewDirectObjectExplorer = (function () { function TreeViewDirectObjectExplorer() { } TreeViewDirectObjectExplorer.prototype.getAllPropertyNames = function (obj) { var propertyNames = []; for (var prop in obj) { propertyNames.push(prop.toString()); } propertyNames = propertyNames.sort(ObjectView.TreeViewUtils.propertyNameCompare); return propertyNames; }; TreeViewDirectObjectExplorer.prototype.hasMembers = function (obj) { var objectToCheck = obj; for (var prop in obj) { return true; } return false; }; return TreeViewDirectObjectExplorer; })(); ObjectView.TreeViewDirectObjectExplorer = TreeViewDirectObjectExplorer; var TreeViewRemoteHelpers = (function () { function TreeViewRemoteHelpers(context, treeViewObjectExplorer) { this._maxItemTraverseCount = 500; this._maxUngroupArraySize = 50; this._arrayGroupSize = 10; this._context = context; this._treeViewObjectExplorer = treeViewObjectExplorer; } TreeViewRemoteHelpers.prototype.createOutputObject = function (inputId, obj, propertyName, isInternal) { var detailedType = Common.ObjectView.TreeViewUtils.getDetailedTypeOf(obj, this._context.constructors); var name; if (propertyName !== undefined && !isInternal) { obj = obj[propertyName]; if (obj) { detailedType = Common.ObjectView.TreeViewUtils.getDetailedTypeOf(obj, this._context.constructors); } else { return null; } } var isExpandable = !this.isEmpty(obj); var value; var uid; if (isExpandable) { name = this.createName(obj, detailedType); if (name === "[object Window]" && Common.RemoteHelpers.isCrossSiteWindow(this._context.currentWindowContext, obj)) { try { var iframe = dom.getCrossSiteWindow(this._context.currentWindowContext, obj); if (iframe) { obj = iframe; } } catch (e) { value = [{ propertyName: "error", propertyValue: this.createExceptionValue({ message: "Access denied." }) }]; } } if (!value) { uid = remoteHelpers.getUid(); this._context.resultMap[uid] = obj; if (detailedType === "array") { value = this.createArrayObject(uid, obj, propertyName, isInternal); } else { value = this.createValue(obj, uid, isInternal); } } } else { name = null; value = this.createValue(obj); } var htmlTypeName = this._context.getHtmlViewableTypeName(obj); var isHtmlViewableType = (htmlTypeName !== null && htmlTypeName !== "AttributeNode"); var valueString; if (obj) { var hasToString = false; try { hasToString = obj.toString && obj.toString() !== "[object]" && obj.toString.toString().indexOf("[native code]") === -1; } catch (e) { } if (hasToString) { valueString = Common.EncodingUtilities.escapeHtml(obj.toString()); } else { if (detailedType === "array" && obj.length > this._maxUngroupArraySize) { var reducedArray = obj.slice(0, this._maxUngroupArraySize); var reducedValue = this.createArrayObject("fakeId", reducedArray, propertyName); valueString = ObjectView.TreeViewValueStringBuilder.createValueString(reducedValue, detailedType, true); } else { valueString = ObjectView.TreeViewValueStringBuilder.createValueString(value, detailedType); } } } return { inputId: inputId, consoleType: "consoleItemOutput", detailedType: detailedType, isExpandable: isExpandable, isHtmlViewableType: isHtmlViewableType, name: name, value: value, valueString: valueString, uid: uid }; }; TreeViewRemoteHelpers.prototype.createArrayObject = function (inputId, obj, range, hasValidRange) { var reassignIndices = false; var arrayLength; var outputObject; var startRange; var endRange; if (hasValidRange && range && range.indexOf(":") !== -1) { var rangeArray = range.split(":", 2); startRange = parseInt(rangeArray[0], 10); endRange = parseInt(rangeArray[1], 10) + 1; arrayLength = endRange - startRange; reassignIndices = true; } else { arrayLength = obj.length; startRange = 0; endRange = arrayLength; range = null; } if (arrayLength <= this._maxUngroupArraySize) { outputObject = this.createValue(obj.slice(startRange, endRange), inputId, false); outputObject = outputObject.filter(function (element, index, array) { return !isNaN(parseInt(element.propertyName, 10)); }); if (reassignIndices || (endRange - startRange) !== outputObject.length) { var index = 0; while (startRange < endRange) { var arrayElementType = typeof obj[startRange]; if (arrayElementType === "object") { outputObject[index].propertyValue.value = inputId + ":" + startRange.toString(); } else if (arrayElementType === "undefined") { outputObject.splice(index, 0, { propertyName: String(index), propertyValue: { detailedType: "undefined", isExpandable: false, isHtmlViewableType: false, name: String(index), value: undefined } }); } outputObject[index++].propertyName = String(startRange++); } } } else { var groupSize = this._arrayGroupSize; while ((groupSize * groupSize) < arrayLength) { groupSize *= groupSize; } outputObject = []; var groupStart = startRange, groupEnd = startRange; while (groupEnd < endRange) { groupEnd += groupSize; groupEnd = groupEnd < endRange ? groupEnd : endRange; outputObject.push({ propertyName: "[" + groupStart + "..." + (groupEnd - 1) + "]", propertyValue: { detailedType: "array", isExpandable: true, isHtmlViewableType: false, name: null, value: inputId + "#internal:" + groupStart + ":" + (groupEnd - 1) } }); groupStart = groupEnd; } } if (!range) { outputObject.push({ propertyName: "length", propertyValue: { detailedType: "string", isExpandable: false, isHtmlViewableType: false, name: "length", value: String(obj.length) } }); } return outputObject; }; TreeViewRemoteHelpers.prototype.createValue = function (obj, parentUid, onlyFunctions) { if (obj === null) { return null; } var detailedType = Common.ObjectView.TreeViewUtils.getDetailedTypeOf(obj, this._context.constructors); var isEmpty = this.isEmpty(obj); if (isEmpty) { return this.createName(obj, detailedType); } var outputObj = []; var hasFunctions = false; try { var methods = this._treeViewObjectExplorer.getAllPropertyNames(obj); var methodName; var methodsLength = methods.length; var methodEvaluationFunction = Common.PropertyEvaluationIgnoreList.propertyEvaluationFunction(this._context.currentWindowContext, obj); for (var i = 0; i < methodsLength; i++) { try { if (i > 0 && methods[i] === methods[i - 1]) { continue; } methodName = "" + methods[i]; var child = methodEvaluationFunction(obj, methods[i]); var childDetailedType = Common.ObjectView.TreeViewUtils.getDetailedTypeOf(child, this._context.constructors); var childName = null; hasFunctions = hasFunctions || (childDetailedType === "function"); var childIsExpandable = !this.isEmpty(child); if (childIsExpandable) { childName = this.createName(obj[methodName], childDetailedType); if (childName === "null") { childIsExpandable = false; } } var htmlTypeName = this._context.getHtmlViewableTypeName(child); var isHtmlViewableType = (htmlTypeName !== null && htmlTypeName !== "AttributeNode"); var addToList = (onlyFunctions && childDetailedType === "function") || (!onlyFunctions && childDetailedType !== "function") || (detailedType === "array"); if (addToList) { var propertyValue; propertyValue = { detailedType: childDetailedType, isExpandable: childIsExpandable, isHtmlViewableType: isHtmlViewableType, name: childName, value: (!childIsExpandable ? this.createValue(child, undefined, false) : parentUid + ":" + methodName), valueString: null }; propertyValue.valueString = propertyValue.isExpandable ? ObjectView.TreeViewValueStringBuilder.createPropertyValueString(propertyValue, child) : ObjectView.TreeViewValueStringBuilder.formatPropertyValueString(propertyValue.value); if (TreeViewRemoteHelpers.EmptyOrHeadingTrailingWhiteSpaceRegEx.test(methodName)) { methodName = "\"" + methodName + "\""; } outputObj.push({ propertyName: methodName, propertyValue: propertyValue }); } } catch (childAccessEx) { outputObj.push({ propertyName: methodName, propertyValue: this.createExceptionValue(childAccessEx) }); continue; } } if (!onlyFunctions && hasFunctions) { outputObj.push({ propertyName: "[functions]", propertyValue: { detailedType: "internal", isExpandable: true, isHtmlViewableType: false, name: " ", isInternalProperty: true, value: parentUid + "#internal" + ":" + "[functions]" } }); } } catch (objectAccessEx) { outputObj.push({ propertyName: "0", propertyValue: this.createExceptionValue(objectAccessEx) }); } return outputObj; }; TreeViewRemoteHelpers.prototype.isEmpty = function (obj) { if (obj === null) { return true; } var pageTypeOf = typeof obj; if (pageTypeOf === "object" || pageTypeOf === "function") { try { if (this._treeViewObjectExplorer.hasMembers(obj)) { return false; } } catch (e) { return false; } } return true; }; TreeViewRemoteHelpers.prototype.createName = function (obj, detailedType) { if (!detailedType) { detailedType = Common.ObjectView.TreeViewUtils.getDetailedTypeOf(obj, this._context.constructors); } switch (detailedType) { case "boolean": return "" + obj; case "date": return "[date] " + obj; case "function": return "" + obj; case "null": return "null"; case "number": return "" + obj; case "regex": return "[regex] " + obj; case "string": return "\"" + obj.slice(0, 1024) + "\""; case "undefined": return "undefined"; case "array": if (this.isEmpty(obj)) { return Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.arrayName; } return this.getPrototypeName(obj); case "object": case "htmlElement": if (this.isEmpty(obj)) { return Common.ObjectView.TreeViewUtils.ConsoleUITypeStrings.objectName; } return this.getPrototypeName(obj); default: return "" + obj; } }; TreeViewRemoteHelpers.prototype.getPrototypeName = function (obj) { var prototypeName; try { prototypeName = Object.prototype.toString.call(obj); } catch (ex) { prototypeName = null; } return prototypeName; }; TreeViewRemoteHelpers.prototype.createExceptionValue = function (exception) { var information = (exception.message || exception.description); var msg = "<" + information.trim() + ">"; if (msg === "<>") { msg = ""; } return { detailedType: "exception", isExpandable: false, value: msg, valueString: Common.EncodingUtilities.escapeHtml(msg) }; }; TreeViewRemoteHelpers.EmptyOrHeadingTrailingWhiteSpaceRegEx = /^$|^\s|\s$/; return TreeViewRemoteHelpers; })(); ObjectView.TreeViewRemoteHelpers = TreeViewRemoteHelpers; })(Common.ObjectView || (Common.ObjectView = {})); var ObjectView = Common.ObjectView; })(Common || (Common = {})); var Common; (function (Common) { (function (ObjectView) { "use strict"; var TreeViewUtils = (function () { function TreeViewUtils() { } TreeViewUtils.getDetailedTypeOf = function (value, constructors) { if (value === undefined) { return "undefined"; } var type = (typeof value); if (type === "object" && constructors) { if (value) { for (var i = 0; i < constructors.length; i++) { var arrayCon = (constructors[i] && constructors[i].array ? constructors[i].array : (new Array()).constructor); var dateCon = (constructors[i] && constructors[i].date ? constructors[i].date : (new Date()).constructor); var regexCon = (constructors[i] && constructors[i].regex ? constructors[i].regex : (new RegExp("")).constructor); try { if (value.constructor === arrayCon) { return "array"; } else if (value.constructor === dateCon) { return "date"; } else if (value.constructor === regexCon) { return "regex"; } } catch (e) { } } } else { return "null"; } return "object"; } return type; }; TreeViewUtils.getVisibleHtmlElementText = function (element) { if ($m(element).is(":visible")) { if (element.nodeType === 3) { return element.nodeValue; } var visibleText = "", i = 0; while (element.childNodes[i]) { visibleText += TreeViewUtils.getVisibleHtmlElementText(element.childNodes[i]); i++; } return visibleText; } return ""; }; TreeViewUtils.createPadding = function (levels, singleLevelPadding) { if (levels === 0) { return ""; } var padding = ""; for (var i = 0; i < levels; i++) { padding += singleLevelPadding; } return padding; }; TreeViewUtils.getIndentedObjectString = function (obj, detailedType, stringPadding, indentString, newLineString, useEncodeHtml, useTrim) { var text = ""; var objectString = "" + obj; if ((/\S/).test(objectString)) { var indentCount = 0; var finalLines = []; if (detailedType === "string") { if (useEncodeHtml) { objectString = Common.EncodingUtilities.escapeHtml(objectString); } text = objectString.replace(/(\r\n|\n\r|\r|\n)/g, newLineString); } else { var lines = objectString.replace(/^\s+|\s+$/g, "").split(/[\r\n]+/); for (var lineIndex = 0; lineIndex < lines.length; lineIndex++) { if (lines[lineIndex] !== "") { var indent = ""; var lineText = lines[lineIndex]; if (useEncodeHtml) { lineText = Common.EncodingUtilities.escapeHtml(lineText); } lineText = lineText.replace(/^\s+|\s+$/g, ""); if (detailedType === "function") { if ((/^\}/).test(lineText)) { indentCount--; } for (var i = 0; i < indentCount; i++) { indent += indentString; } if ((/\{$/).test(lineText)) { indentCount++; } } finalLines.push(indent + lineText); } } var lineBreaks = newLineString; if (detailedType === "function" && finalLines.length === 3) { finalLines[1] = finalLines[1].replace(/^( )+/, "").replace(/^\s+|\s+$/g, ""); finalLines[2] = finalLines[2].replace(/^\s+|\s+$/g, ""); lineBreaks = " "; } text = finalLines.join(lineBreaks); } } return text; }; TreeViewUtils.propertyNameCompare = function (a, b) { var aValue; var bValue; if (!isNaN(aValue = parseInt(a, 10)) && !isNaN(bValue = parseInt(b, 10))) { return aValue - bValue; } else { var al = a.toLowerCase(); var bl = b.toLowerCase(); if (al === bl) { return TreeViewUtils.stringValueCompare(a, b); } else { return TreeViewUtils.stringValueCompare(al, bl); } } }; TreeViewUtils.stringValueCompare = function (a, b) { if (a < b) { return -1; } else if (a > b) { return 1; } else { return 0; } }; TreeViewUtils.ConsoleNotifyType = { assert: "consoleItemError", error: "consoleItemError", info: "consoleItemInfo", log: "consoleItemLog", warn: "consoleItemWarn", internalMessage: "internalMessage" }; TreeViewUtils.ConsoleInternalMessage = { startGroup: "startGroup", startGroupCollapsed: "startGroupCollapsed", endGroup: "endGroup", displayTraceStyles: "displayTraceStyles" }; TreeViewUtils.ConsoleUITypeStrings = { functionName: "[function]", objectName: "[object]", arrayName: "[array]", emptyArray: " [ ]", emptyObject: " { }", expandableArray: " [...]", expandableObject: " {...}" }; TreeViewUtils.ConsoleFilterId = { all: -1, error: 0, warning: 1, message: 2, log: 3 }; return TreeViewUtils; })(); ObjectView.TreeViewUtils = TreeViewUtils; var TreeViewValueStringBuilder = (function () { function TreeViewValueStringBuilder() { } TreeViewValueStringBuilder.createValueString = function (properties, detailedType, incomplete) { if (typeof incomplete === "undefined") { incomplete = false; } if (!properties || typeof (properties) !== "object") { return; } var valueString; var isFirstProperty = true; var headToken = ""; var appendPropertyName; var tailToken = ""; switch (detailedType) { case "object": headToken = headToken + "{"; appendPropertyName = true; tailToken = "}" + tailToken; break; case "array": headToken = headToken + "["; appendPropertyName = false; tailToken = "]" + tailToken; properties = properties.filter(function (element, index, array) { return !isNaN(parseInt(element.propertyName, 10)); }); break; default: return; } valueString = headToken; for (var i = 0; i < properties.length; i++) { if (properties[i].propertyName.substr(0, 2) === "__" || properties[i].propertyName === "[functions]") { continue; } if (!isFirstProperty) { valueString += ", "; } isFirstProperty = false; if (appendPropertyName) { valueString += TreeViewValueStringBuilder.createPropertyNameToken(properties[i]); valueString += ": "; } valueString += TreeViewValueStringBuilder.createPropertyValueToken(properties[i]); if (i > 20) { incomplete = true; break; } } if (incomplete) { tailToken = " ..." + tailToken; } valueString = valueString + tailToken; return valueString; }; TreeViewValueStringBuilder.createPropertyValueString = function (propertyValue, obj) { try { switch (propertyValue.detailedType) { case "array": var delimiterIndex = propertyValue.value.indexOf(":"); if (delimiterIndex !== -1) { return "Array[" + Common.EncodingUtilities.escapeHtml(obj.length) + "]"; break; } case "object": var delimiterIndex = propertyValue.name.indexOf(" "); if (delimiterIndex !== -1) { return (propertyValue.name.substr(delimiterIndex + 1, propertyValue.name.length - delimiterIndex - 2)) + " {...}"; break; } } } catch (ex) { } return propertyValue.detailedType; }; TreeViewValueStringBuilder.formatPropertyValueString = function (valueString) { if (valueString && typeof (valueString) === "string") { var newValueString = valueString.length > 15 ? valueString.substr(0, 12) + "...\"" : valueString; newValueString = String.prototype.replace.call(newValueString, /(\r\n|\n\r|\r|\n)/g, " "); newValueString = Common.EncodingUtilities.escapeHtml(newValueString); return newValueString; } return valueString; }; TreeViewValueStringBuilder.createPropertyValueToken = function (property) { var className; switch (property.propertyValue.detailedType) { case "undefined": className = "valueStringToken-Undefined"; break; case "null": className = "valueStringToken-Null"; break; case "boolean": className = "valueStringToken-Boolean"; break; case "number": className = "valueStringToken-Number"; break; case "string": className = "valueStringToken-String"; break; case "function": className = "valueStringToken-Function"; break; case "array": className = "valueStringToken-Array"; break; case "object": className = "valueStringToken-Object"; break; default: className = "valueStringToken-Default"; } return "" + property.propertyValue.valueString + ""; }; TreeViewValueStringBuilder.createPropertyNameToken = function (property) { var className = "valueStringToken-PropertyName"; var escapedPropertyName = Common.EncodingUtilities.escapeHtml(property.propertyName); return "" + escapedPropertyName + ""; }; return TreeViewValueStringBuilder; })(); ObjectView.TreeViewValueStringBuilder = TreeViewValueStringBuilder; var TreeViewStringFormatter = (function () { function TreeViewStringFormatter() { } TreeViewStringFormatter.formatConsoleMessage = function () { var args = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { args[_i] = arguments[_i + 0]; } var regex = /%%|%([sbxXideEfF])/g; var argumentIndex = 0; var formatString = TreeViewStringFormatter.convertToString(args[argumentIndex++]); var getReplacementString = function (matchedValue) { if (argumentIndex >= args.length) { return matchedValue; } switch (matchedValue) { case "%%": return "%"; break; case "%d": case "%i": return TreeViewStringFormatter.convertToInteger(args[argumentIndex++]); break; case "%f": return TreeViewStringFormatter.convertToNumber(args[argumentIndex++]); break; case "%s": return TreeViewStringFormatter.convertToString(args[argumentIndex++]); break; case "%b": return TreeViewStringFormatter.convertToBase(args[argumentIndex++], 2); break; case "%x": case "%X": return TreeViewStringFormatter.convertToBase(args[argumentIndex++], 16); break; case "%E": case "%e": return TreeViewStringFormatter.convertToExponential(args[argumentIndex++]); break; default: return matchedValue; } }; var result = formatString.replace(regex, getReplacementString); for (var i = argumentIndex; i < args.length; i++) { result = (result.length > 0) ? (result + " " + TreeViewStringFormatter.convertToString(args[i])) : (TreeViewStringFormatter.convertToString(args[i])); } return result.slice(0, 1024); }; TreeViewStringFormatter.convertToString = function (value) { var result; try { if (value === undefined || value === null) { result = String(value); } else { result = value.toString(); if (typeof (result) !== "string") { result = "[object Object]"; } } } catch (e) { result = "[object Object]"; } return result; }; TreeViewStringFormatter.convertToInteger = function (value) { var numericValue = TreeViewStringFormatter.convertToNumber(value); if (isNaN(numericValue)) { return numericValue.toString(); } return Math.round(numericValue - numericValue % 1).toString(); }; TreeViewStringFormatter.convertToBase = function (value, base) { var numericValue = TreeViewStringFormatter.convertToNumber(value); if (isNaN(numericValue)) { return numericValue.toString(); } var prefix = { "2": "0b", "8": "0", "16": "0x" }[base] || ""; return prefix.toString() + ((numericValue < 0) ? (numericValue >>> 0).toString(base) : numericValue.toString(base)); }; TreeViewStringFormatter.convertToExponential = function (value) { var numericValue = TreeViewStringFormatter.convertToNumber(value); if (isNaN(numericValue)) { return numericValue.toString(); } return numericValue.toExponential(); }; TreeViewStringFormatter.convertToNumber = function (value) { return (isNaN(value) || value === null) ? Number(TreeViewStringFormatter.convertToString(value)) : Number(value); }; return TreeViewStringFormatter; })(); ObjectView.TreeViewStringFormatter = TreeViewStringFormatter; })(Common.ObjectView || (Common.ObjectView = {})); var ObjectView = Common.ObjectView; })(Common || (Common = {})); var F12; (function (F12) { (function (Tools) { (function (RPC) { "use strict"; var JsonRPCEndpoint = (function () { function JsonRPCEndpoint(identifier, jsonRpcMethodReceive, jsonRpcNotificationReceive, postMessage, onMessageCapture) { var _this = this; this._ourIdentifier = identifier; this._nextId = 0; this._promiseTable = {}; this._jsonRpcMethodReceive = jsonRpcMethodReceive; this._jsonRpcNotificationReceive = jsonRpcNotificationReceive; this._postMessage = postMessage; if (!Date.now) { Date.now = function now() { return +(new Date); }; } this._startTime = Date.now(); onMessageCapture(function (data) { _this.onMessage(data); }); } JsonRPCEndpoint.prototype.jsonRpcMethodCall = function (method, params, completed, error, identification) { var _this = this; var id = this._ourIdentifier + "|" + this._nextId; this._nextId++; this._promiseTable[id] = { completed: completed, error: error }; var message = JSON.stringify({ id: id, method: method, params: params }); this.logTraffic(message); if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this._postMessage(message, identification); }, message); return true; } else { return this._postMessage(message, identification); } }; JsonRPCEndpoint.prototype.jsonRpcNotification = function (method, params, identification) { var _this = this; var id = this._ourIdentifier + "|" + "NULL"; var message = JSON.stringify({ id: id, method: method, params: params }); this.logTraffic(message); if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this._postMessage(message, identification); }, message); } else { this._postMessage(message, identification); } }; JsonRPCEndpoint.prototype.logTraffic = function (data) { if (isDebugBuild) { var paddedTimestamp = (" " + (Date.now() - this._startTime) / 1000).slice(-9); __rpcLog.push(paddedTimestamp + " | " + data); if (__rpcLog.length > 100) { __rpcLog.shift(); } } }; JsonRPCEndpoint.prototype.onMessage = function (data) { var _this = this; this.logTraffic(data.data); var result = JSON.parse(data.data); var idSplit = (result.id).split("|"); Tools.Utility.Assert.areEqual(idSplit.length, 2); if (idSplit[1] === "NULL") { if (idSplit[0] !== this._ourIdentifier) { this._jsonRpcNotificationReceive(result.method, result.params); } } else if (idSplit[0] === this._ourIdentifier) { if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this.handleReply(result); }, data.data); } else { this.handleReply(result); } } else { if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this.handleCall(result); }, data.data); } else { this.handleCall(result); } } }; JsonRPCEndpoint.prototype.handleReply = function (result) { Tools.Utility.Assert.hasValue(this._promiseTable[result.id]); if (result.error) { Tools.Utility.Assert.isUndefined(result.data, "Can't have both data and error"); this._promiseTable[result.id].error(result.error); } else { this._promiseTable[result.id].completed(result.data); } delete this._promiseTable[result.id]; }; JsonRPCEndpoint.prototype.handleCall = function (result) { var _this = this; this._jsonRpcMethodReceive(result.method, result.params, function (data, error) { var message; if (data !== null && data !== undefined) { Tools.Utility.Assert.isUndefined(error, "Can't have both data and error"); message = JSON.stringify({ id: result.id, data: data }); } else { Tools.Utility.Assert.hasValue(error, "RPC call returned no value, but no error object either"); message = JSON.stringify({ id: result.id, error: error }); } _this._postMessage(message); }); }; return JsonRPCEndpoint; })(); RPC.JsonRPCEndpoint = JsonRPCEndpoint; var RpcDelayData = (function () { function RpcDelayData(callback, message) { this.callback = callback; this.message = message; } return RpcDelayData; })(); RPC.RpcDelayData = RpcDelayData; var RpcDelayHook = (function () { function RpcDelayHook() { } RpcDelayHook.enableDelay = function (calculateDelayTime, delayedMessage) { RpcDelayHook.RandomDelay = true; RpcDelayHook.CalculateDelayTime = calculateDelayTime; RpcDelayHook.DelayedMessage = delayedMessage; }; RpcDelayHook.disableDelay = function () { RpcDelayHook.RandomDelay = false; if (RpcDelayHook.RandomDelayTimeout) { clearTimeout(RpcDelayHook.RandomDelayTimeout); RpcDelayHook.RandomDelayTimeout = null; RpcDelayHook.clearQueue(); } }; RpcDelayHook.queueData = function (callback, message) { var delayData = new RpcDelayData(callback, message); RpcDelayHook.DelayedQueue.push(delayData); if (!RpcDelayHook.RandomDelayTimeout) { var delay = RpcDelayHook.CalculateDelayTime(message); RpcDelayHook.RandomDelayTimeout = setTimeout(RpcDelayHook.fireRandomly, delay); } }; RpcDelayHook.fireRandomly = function () { var delayData = RpcDelayHook.DelayedQueue.shift(); RpcDelayHook.DelayedMessage(delayData.message); delayData.callback(); if (RpcDelayHook.DelayedQueue.length > 0) { var delay = RpcDelayHook.CalculateDelayTime(RpcDelayHook.DelayedQueue[0].message); RpcDelayHook.RandomDelayTimeout = setTimeout(RpcDelayHook.fireRandomly, delay); } else { RpcDelayHook.RandomDelayTimeout = null; } }; RpcDelayHook.clearQueue = function () { for (var i = 0; i < RpcDelayHook.DelayedQueue.length; i++) { var delayData = RpcDelayHook.DelayedQueue[i]; RpcDelayHook.DelayedMessage(delayData.message); delayData.callback(); } RpcDelayHook.DelayedQueue = []; }; RpcDelayHook.RandomDelay = false; RpcDelayHook.DelayedQueue = []; return RpcDelayHook; })(); RPC.RpcDelayHook = RpcDelayHook; })(Tools.RPC || (Tools.RPC = {})); var RPC = Tools.RPC; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); if (isDebugBuild) { var __rpcLog = []; } .BPT-ToolbarButton .buttonIcon, .Toolbar-ControlsButton .buttonIcon { background-color: transparent; display: inline-block; width: 18px; height: 18px; vertical-align: middle; background-repeat: no-repeat; } .BPT-ToolbarButton:hover .buttonIcon, .Toolbar-ControlsButton:hover .buttonIcon { background-position-y: -18px; } .BPT-ToolbarToggleButton-StateOn img, .ToolbarControlsToggleButton[selected=true] img, .BPT-ToolbarToggleButton-StateOn .buttonIcon, .ToolbarControlsToggleButton[selected=true] .buttonIcon { background-position-y: -18px; } .BPT-ToolbarButton-StateDisabled img, .Toolbar-ControlsButton[disabled] img, .BPT-ToolbarButton-StateDisabled .buttonIcon, .Toolbar-ControlsButton[disabled] .buttonIcon { background-position-y: -36px; } .BPT-ToolbarButton:not([disabled]):hover, .Toolbar-ControlsButton:not([disabled]):hover { background-color: TRANSPARENT; /*[{f12-toolbar-button-hover-color}] */ background-position-y: -18px; } .ToolbarControlsToggleButton.FilterToggleButton[selected=true] .buttonIcon { background-position-y: -18px; } .ToolbarControlsToggleButton.FilterToggleButton:hover[selected=false] .buttonIcon { background-position-y: -18px; }html, body { overflow: hidden; } #mainContainer { display: -ms-grid; -ms-grid-rows: auto 1fr auto; -ms-grid-columns: 100%; height: 100%; width: 100%; position: relative; } #outputArea { -ms-grid-row: 2; white-space: nowrap; background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #outputList { width: 100%; height: 100%; overflow: hidden; font-family: "Consolas", Lucida Console, monospace; /*[{plugin-font-console} , Lucida Console, monospace]*/ font-size: 9pt; /*[{plugin-font-console-size}]*/ color: TRANSPARENT; /*[{plugin-font-console-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #warningSection { margin-left: 2px; } /* Object visualization */ #outputList .listview-grid-row:not(.listview-grid-row-expanded) .listview-grid-underline { background-color: rgba(0, 0, 0, 0.05); /*[{plugin-font-console-output-color rgba(0.07)}]*/ } #outputList .consoleItemInput .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-input-color}]*/ background-color: transparent; /*[{plugin-font-console-input-background-color}]*/ font-weight: normal; /*[{plugin-font-console-input-weight}]*/ } #outputList .consoleItemInput > .listview-grid-cell-icon { background-image: url('images/i_console-input.png'); /*[url({plugin-console-image-icon-input})]*/ background-size: 12px 12px; background-repeat: no-repeat; background-origin: content-box; padding: 2px; } #outputList .consoleItemOutput .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-output-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-output-background-color}]*/ font-weight: normal; /*[{plugin-font-console-output-weight}]*/ } #outputList .consoleItemOutput > .listview-grid-cell-icon { } #outputList .consoleItemOutput-Async > .listview-grid-cell-icon { background-image: none; } #outputList .consoleItemLog .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-output-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-output-background-color}]*/ font-weight: normal; /*[{plugin-font-console-output-weight}]*/ } #outputList .consoleItemLog > .listview-grid-cell-icon { background-image: none; } #outputList .consoleItemAssert .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-error-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-error-background-color}]*/ font-weight: normal; /*[{plugin-font-console-error-weight}]*/ } #outputList .consoleItemError .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-error-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-error-background-color}]*/ font-weight: normal; /*[{plugin-font-console-error-weight}]*/ } #outputList .consoleItemInfo .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-info-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-info-background-color}]*/ font-weight: normal; /*[{plugin-font-console-info-weight}]*/ } #outputList .consoleItemWarn .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-warning-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-warning-background-color}]*/ font-weight: normal; /*[{plugin-font-console-warning-weight}]*/ } #outputList .consoleItemErrorExpandable .listview-grid-cell-resize { color: TRANSPARENT; /*[{plugin-font-console-error-color}]*/ font-weight: normal; /*[{plugin-font-console-error-weight}]*/ } #outputList .consoleItemInfoExpandable .listview-grid-cell-resize { color: TRANSPARENT; /*[{plugin-font-console-info-color}]*/ font-weight: normal; /*[{plugin-font-console-info-weight}]*/ } #outputList .consoleItemWarnExpandable .listview-grid-cell-resize { color: TRANSPARENT; /*[{plugin-font-console-warning-color}]*/ font-weight: normal; /*[{plugin-font-console-warning-weight}]*/ } #outputList .consoleItemScriptError .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-error-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-error-background-color}]*/ font-weight: normal; /*[{plugin-font-console-error-weight}]*/ } #outputList .consoleItemOutput-Undefined .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-info-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-info-background-color}]*/ } #outputList .consoleItemOutput-Exception .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-console-info-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-info-background-color}]*/ } #outputList .consoleItemOutput-Null .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #outputList .consoleItemOutput-String .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-editor-string-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #outputList .consoleItemOutput-Boolean .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #outputList .consoleItemOutput-Number .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-editor-number-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #outputList .consoleItemOutput-Array .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-editor-symbol-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #outputList .consoleItemOutput-Object .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-editor-symbol-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } .consoleItemOutput-Internal { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #outputList .consoleItemOutput-Internal .listview-grid-cell-value { color: TRANSPARENT; /*[{plugin-font-editor-symbol-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } #outputList .listview-grid-row-selected .listview-grid-cell { background-color: transparent !important; } #outputList .listview-horizontal-separator { margin-top:7px; background-color: TRANSPARENT; /*[{plugin-font-console-output-color rgba(0.5)}]*/ height: 2px; } /* HTML visualization */ .Console-Html { font-family: "Consolas", Lucida Console, monospace; /*[{plugin-font-editor} , Lucida Console, monospace]*/ font-size: 9pt; /*[{plugin-font-editor-size}]*/ font-weight: normal; /*[{plugin-font-editor-html-tag-weight}]*/ color: TRANSPARENT; /*[{plugin-font-editor-html-tag-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ } .Console-Html-Tag { color: TRANSPARENT; /*[{plugin-font-editor-html-element-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-element-weight}]*/ } .Console-Html-DocType, .Console-Html-DocType + .Console-Html-Text { color: TRANSPARENT; /*[{plugin-font-editor-html-comment-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-comment-weight}]*/ } .Console-Html-Comment, .Console-Html-Comment + .Console-Html-Text { color: TRANSPARENT; /*[{plugin-font-editor-html-comment-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-comment-weight}]*/ } .Console-Html-Attribute { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-name-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-attribute-name-weight}]*/ } .Console-Html-Value { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-value-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-attribute-value-weight}]*/ } .Console-Html-Operator { color: TRANSPARENT; /*[{plugin-font-editor-html-operator-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-html-operator-weight}]*/ } .Console-Html-Text { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-weight}]*/ } .Console-Html-CSS-Name { color: TRANSPARENT; /*[{plugin-font-editor-css-name-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-css-name-weight}]*/ } .Console-Html-CSS-Value { color: TRANSPARENT; /*[{plugin-font-editor-css-value-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-css-value-weight}]*/ } .Console-Html-CSS-Selector, .Console-Html-CSS-Selector div { color: TRANSPARENT; /*[{plugin-font-editor-css-selector-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-css-selector-weight}]*/ } .Console-Html-CSS-Text { background-color: TRANSPARENT; /*[{plugin-font-console-background-color}]*/ font-weight: normal; /*[{plugin-font-editor-weight}]*/ } .listview-grid-row-selected .Console-HtmlItem .Console-Html, .listview-grid-row-selected .Console-HtmlItem .Console-Html-Tag, .listview-grid-row-selected .Console-HtmlItem .Console-Html-Attribute, .listview-grid-row-selected .Console-HtmlItem .Console-Html-Value, .listview-grid-row-selected .Console-HtmlItem .Console-Html-Operator, .listview-grid-row-selected .Console-HtmlItem .Console-Html-Text, .listview-grid-row-selected .Console-HtmlItem .Console-Html-Comment, .listview-grid-row-selected .Console-HtmlItem .Console-Html-Comment + .Console-Html-Text, .listview-grid-row-selected .Console-HtmlItem .Console-Html-DocType + .Console-Html-Text, .listview-grid-row-selected .Console-HtmlItem .Console-Html-CSS-Name, .listview-grid-row-selected .Console-HtmlItem .Console-Html-CSS-Value, .listview-grid-row-selected .Console-StyleItem-Value.Console-Html-CSS-Value, .listview-grid-row-selected .Console-HtmlItem .Console-Html-CSS-Selector, .listview-grid-row-selected .Console-HtmlItem .Console-Html-CSS-Text, .listview-grid-row-selected .listview-grid-cell { background-color: transparent !important; } .listview-icon-tree-expanded + .listview-grid-cell .Console-Html-CollapsedFooter { display: none; } .Console-Html-Footer { margin-left: -16px; } .Console-Html-Numbering { display: inline-block; min-width: 24px; margin-right: 4px; } .Console-ExpandableLines { color: TRANSPARENT; /*[{plugin-font-console-info-color}]*/ } .Console-ExpandableString { color: TRANSPARENT; /*[{plugin-font-editor-string-color}]*/ } /* Toolbar and status */ .BPT-WarnMessage { color: TRANSPARENT; /*[{plugin-font-console-warning-color}]*/ cursor: default; background-color: TRANSPARENT; /*[{plugin-font-console-warning-background-color}]*/ font-weight: normal; /*[{plugin-font-console-warning-weight}]*/ padding-left: 21px; padding-top: 3px; padding-bottom: 3px; } /* Console input control */ #inputArea { -ms-grid-row: 3; position: relative; font-family: "Consolas", Lucida Console, monospace; /*[{plugin-font-console} , Lucida Console, monospace]*/ font-size: 9pt; /*[{plugin-font-console-size}]*/ color: TRANSPARENT; /*[{plugin-font-console-inputarea-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-inputarea-background-color}]*/ /* redline has #e8eef6 */ } #inputSplitter { cursor: n-resize; height: 3px; width: 100%; background-color: TRANSPARENT; /*[{vs-horizontal-resize-grip-color}]*/ margin-bottom: 1px; } #inputLabel { top: 0; display: table-cell; width: auto; vertical-align: top; } #inputLabel > div { box-sizing: border-box; width: 16px; margin: 0 2px 0 2px; background-image: url('images/i_console-input.png'); /*[url({plugin-console-image-icon-input})]*/ background-size: 12px 12px; background-repeat: no-repeat; background-origin: content-box; padding: 2px; } #inputBoxContainer { top: 0; margin-left: 0.5em; display: table-cell; width: 100%; } #inputBoxContainer > * { display: none; border: none; width: 100%; height: inherit; } #inputMultilineContainer { display: none; width: inherit; height: inherit; } #input-singleLine { font: inherit; background-color: TRANSPARENT; /*[{plugin-font-console-inputarea-background-color}]*/ /* redline has #e8eef6 */ } #input-singleLine::-ms-clear { display:none; } #input-multiLine { border: none; height: inherit; display: inline-block; font: inherit; background-color: TRANSPARENT; /*[{plugin-font-console-inputarea-background-color}]*/ /* redline has #e8eef6 */ width: inherit; } #inputButtonContainer { top: 0; display: table-cell; padding-left: 0.5em; padding-right: 0.5em; width: auto; vertical-align: bottom; } .BPT-ConsoleButton { top: 0; display: table-cell; padding-left: 0.5em; padding-right: 0.5em; width: auto; vertical-align: bottom; } .BPT-ConsoleInput:focus { outline-color: transparent !important; outline-style: hidden !important; } .Console-ColorThumbnail { display: inline-block; vertical-align: middle; width: 12px; height: 12px; margin: 0 2px 0 2px; border: 1px solid black; /*[1px solid {plugin-font-editor-color}]*/ } .Console-Style-Disabled .listview-grid-cell { text-decoration: line-through; } .Console-Style-Disabled .listview-grid-cell span.Console-Html-CSS-Value { text-decoration: line-through; text-decoration-color: TRANSPARENT; /*[{plugin-font-editor-css-value-color}]*/ } .valueStringToken-Null { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ } .valueStringToken-Undefined { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ } .valueStringToken-String { color: TRANSPARENT; /*[{plugin-font-editor-string-color}]*/ } .valueStringToken-Boolean { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ } .valueStringToken-Number { color: TRANSPARENT; /*[{plugin-font-editor-number-color}]*/ } .valueStringToken-Array { color: TRANSPARENT; /*[{plugin-font-editor-symbol-color}]*/ } .valueStringToken-Object { color: TRANSPARENT; /*[{plugin-font-editor-symbol-color}]*/ } .valueStringToken-Function { color: TRANSPARENT; /*[{plugin-font-console-output-color}]*/ } .valueStringToken-PropertyName { color: TRANSPARENT; /*[{plugin-font-console-output-color}]*/ } .valueStringToken-Default { color: TRANSPARENT; /*[{plugin-font-console-output-color}]*/ } .labeledComboBox { display: inline-block; float: right; } .labeledComboBox select { width: 150px; margin: 3px; } .labeledComboBox option { background-color: TRANSPARENT; /*[{plugin-background-color}]*/ } Console
       
      // // Copyright (C) Microsoft. All rights reserved. // // // bridge.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { var VSBridge = (function () { function VSBridge(vs, traceWriter) { this._vs = vs; this._traceWriter = traceWriter; this._proxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("F12.Console.Bridge.IConsoleBridge", {}, true); this._breakpointState = new Console.VSBreakpointState(this._proxy); this._breakpointState.initialize(); this._channel = new Console.VSConsoleChannel(this._proxy, this._breakpointState, this._traceWriter); } Object.defineProperty(VSBridge.prototype, "channel", { get: function () { return this._channel; }, enumerable: true, configurable: true }); Object.defineProperty(VSBridge.prototype, "breakpointState", { get: function () { return this._breakpointState; }, enumerable: true, configurable: true }); VSBridge.prototype.start = function () { this._proxy._post("start"); }; VSBridge.prototype.fireCodeMarker = function (codeMarker) { this._vs.Internal.CodeMarkers.fire(codeMarker); }; VSBridge.prototype.openF1HelpLink = function (keyword) { this._proxy._post("openF1HelpLink", keyword); }; VSBridge.prototype.getScriptEngines = function () { return this._proxy._call("getScriptEngines"); }; VSBridge.prototype.addEventListener = function (eventName, callback) { switch (eventName) { case "connect": case "attach": case "detach": case "break": case "run": case "scriptError": case "toggleFilter": case "load": break; default: throw new Error("Invalid eventName."); } this._proxy.addEventListener(eventName, callback); }; VSBridge.prototype.removeEventListener = function (eventName, callback) { this._proxy.removeEventListener(eventName, callback); }; return VSBridge; })(); Console.VSBridge = VSBridge; var IEBridge = (function () { function IEBridge(f12, external, traceWriter) { this._f12 = f12; this._external = external; this._traceWriter = traceWriter; this._breakpointState = new Console.IEBreakpointState(f12, this._external); this._breakpointState.initialize(); this._channel = new Console.IEConsoleChannel(f12, this._external, this._breakpointState, this._traceWriter); } Object.defineProperty(IEBridge.prototype, "breakpointState", { get: function () { return this._breakpointState; }, enumerable: true, configurable: true }); Object.defineProperty(IEBridge.prototype, "channel", { get: function () { return this._channel; }, enumerable: true, configurable: true }); IEBridge.prototype.start = function () { }; IEBridge.prototype.fireCodeMarker = function (codeMarker) { Plugin.VS.Internal.CodeMarkers.fire(codeMarker); }; IEBridge.prototype.openF1HelpLink = function (keyword) { var f1OnlineBaseUrl = "http://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l="; var webClientF1KeywordPrefix = "VS.WebClient.Help."; var url = f1OnlineBaseUrl + Plugin.Culture.lang.toUpperCase() + "&k=k(" + webClientF1KeywordPrefix + keyword + ")"; this._external.openBrowser(url); }; IEBridge.prototype.getScriptEngines = function () { return Plugin.Promise.wrap([0]); }; IEBridge.prototype.addEventListener = function (eventName, callback) { switch (eventName) { case "connect": case "attach": case "detach": case "break": case "run": case "scriptError": case "toggleFilter": case "load": break; default: throw new Error("Invalid eventName." + eventName); } this._external.addEventListener(eventName, callback); }; IEBridge.prototype.removeEventListener = function (eventName, callback) { this._external.removeEventListener(eventName, callback); }; return IEBridge; })(); Console.IEBridge = IEBridge; })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // consoleChannel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { var ConsoleChannel = (function (_super) { __extends(ConsoleChannel, _super); function ConsoleChannel(breakpointState, traceWriter) { _super.call(this, traceWriter); this._breakpointState = breakpointState; } ConsoleChannel.prototype.runExecuteBreakModeCommand = function (command) { throw new Error("Not implemented"); }; ConsoleChannel.prototype.executeBreakModeCommand = function (engine, remoteFunction, id, input, callback, createInvoker) { var _this = this; var uid = this.getUid(); this.addCallback(uid, { synced: true, callback: callback || function () { } }); var invoker = createInvoker || ConsoleChannel.defaultInvoker; var command = invoker(remoteFunction + ":" + id + ":" + uid, input, this._breakpointState.atBreakpointInWorker); var sendBreakCommand = function () { if (_this._breakpointState.atBreakpoint) { _this.runExecuteBreakModeCommand(command).done(function (result) { if (!result) { var jsonObj = { uid: uid, command: remoteFunction, args: [id, input] }; var message = JSON.stringify([jsonObj]); try { _this.post(engine, message); } catch (e) { return; } } }); } }; setTimeout(sendBreakCommand, 0); }; ConsoleChannel.workerBreakpointInvokerString = function () { var workerBreakpointInvokerFunction = function (id_SUBSTITUTION_MARKER, command_SUBSTITUTION_MARKER, __BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC) { try { var result = eval(command_SUBSTITUTION_MARKER); __BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC.INVOKER = { returnValue: { isError: false, result: result } }; } catch (e) { __BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC.INVOKER = { returnValue: { isError: true, result: e } }; } __BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC(id_SUBSTITUTION_MARKER, __BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC.INVOKER.returnValue); }; return workerBreakpointInvokerFunction.toString(); }; ConsoleChannel.breakpointInvokerString = function () { var breakpointInvokerFunction = function (window, id_SUBSTITUTION_MARKER, command_SUBSTITUTION_MARKER) { window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER = { inline: [], result: undefined, isError: false }; try { if ((typeof window.cd) === "undefined") { window.cd = window.console.cd; window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({ name: "cd", func: window.console.cd }); } if ((typeof window.dir) === "undefined") { window.dir = window.console.dir; window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({ name: "dir", func: window.console.dir }); } if ((typeof window.select) === "undefined") { window.select = window.console.select; window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({ name: "select", func: window.console.select }); } if ((typeof window.$) === "undefined") { window.$ = window.__BROWSERTOOLS_CONSOLE.$; window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({ name: "$", func: window.$ }); } if ((typeof window.$$) === "undefined") { window.$$ = window.__BROWSERTOOLS_CONSOLE.$$; window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.push({ name: "$$", func: window.$$ }); } window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.result = eval(command_SUBSTITUTION_MARKER); if (window.$_ === window.__BROWSERTOOLS_CONSOLE.$_ || (isNaN(window.$_) && isNaN(window.__BROWSERTOOLS_CONSOLE.$_))) { window.__BROWSERTOOLS_CONSOLE.$_ = window.$_ = window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.result; } else { delete window.__BROWSERTOOLS_CONSOLE.$_; } } catch (e) { window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.result = e; window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.isError = true; } ; window.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC(id_SUBSTITUTION_MARKER, window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER); (function () { for (var i = 0; i < window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline.length; i++) { if (window[window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline[i].name] === window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline[i].func) { delete window[window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER.inline[i].name]; } } })(); delete window.__BROWSERTOOLS_CONSOLE_BREAKMODE_INVOKER; }; return breakpointInvokerFunction.toString(); }; ConsoleChannel.defaultInvoker = function (id, command, isWorker) { var invokerString; var escapedCommand = JSON.stringify(command).slice(1, -1); if (id && isWorker) { invokerString = ConsoleChannel.workerBreakpointInvokerString(); } else if (id && !isWorker) { invokerString = ConsoleChannel.breakpointInvokerString(); } if (invokerString) { invokerString = invokerString.substring(invokerString.indexOf("{") + 1, invokerString.lastIndexOf("}")); invokerString = invokerString.split("id_SUBSTITUTION_MARKER").join("\"" + id + "\""); invokerString = invokerString.split("command_SUBSTITUTION_MARKER").join("\"" + escapedCommand + "\""); } else { invokerString = "__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC(\"\"," + "\"" + escapedCommand + "\");"; } return invokerString; }; return ConsoleChannel; })(Common.Channel); Console.ConsoleChannel = ConsoleChannel; var VSConsoleChannel = (function (_super) { __extends(VSConsoleChannel, _super); function VSConsoleChannel(proxy, breakpointState, traceWriter) { this._proxy = proxy; this._proxy.addEventListener("message", this.onmessage.bind(this)); _super.call(this, breakpointState, traceWriter); } VSConsoleChannel.prototype.runExecuteBreakModeCommand = function (command) { return this._proxy._call("executeBreakModeCommand", command); }; VSConsoleChannel.prototype.runSendMessage = function (engineId, portName, message) { return this._proxy._post("sendMessage", engineId, portName, message); }; VSConsoleChannel.prototype.loadScript = function (engineId, fileName) { this._proxy._post("loadScript", engineId, fileName); }; return VSConsoleChannel; })(ConsoleChannel); Console.VSConsoleChannel = VSConsoleChannel; var IEConsoleChannel = (function (_super) { __extends(IEConsoleChannel, _super); function IEConsoleChannel(f12, external, breakpointState, traceWriter) { _super.call(this, breakpointState, traceWriter); this._f12 = f12; this._external = external; this._external.addEventListener("connect", this.onConnect.bind(this)); } IEConsoleChannel.prototype.runExecuteBreakModeCommand = function (command) { return this._f12.Debugger.executeBreakModeCommand(command); }; IEConsoleChannel.prototype.runSendMessage = function (engineId, portName, message) { this._port.postMessage(message); }; IEConsoleChannel.prototype.loadScript = function (engineId, fileName) { this._external.loadScriptInProc(fileName); }; IEConsoleChannel.prototype.onConnect = function (port) { this._port = port; this._port.addEventListener("message", this.onmessage.bind(this)); }; return IEConsoleChannel; })(ConsoleChannel); Console.IEConsoleChannel = IEConsoleChannel; })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // breakpointState.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { var BreakpointState = (function () { function BreakpointState(proxy) { var _this = this; this._breakpointLocals = null; proxy.addEventListener("break", this.onbreak.bind(this)); proxy.addEventListener("run", this.onrun.bind(this)); if (Plugin.F12) { Plugin.F12.addEventListener("activeframechanged", function (e) { _this._breakpointLocals = null; }); } } Object.defineProperty(BreakpointState.prototype, "atBreakpoint", { get: function () { return this._atBreakpoint; }, enumerable: true, configurable: true }); Object.defineProperty(BreakpointState.prototype, "atBreakpointInWorker", { get: function () { return this._atBreakpointInWorker; }, enumerable: true, configurable: true }); BreakpointState.prototype.initialize = function () { var _this = this; this.getIsAtBreakpoint().done(function (data) { _this._atBreakpoint = data; }); this.getIsAtBreakpointInWorker().done(function (data) { _this._atBreakpointInWorker = data; }); }; BreakpointState.prototype.getIsAtBreakpoint = function () { throw new Error("Not implemented"); }; BreakpointState.prototype.getIsAtBreakpointInWorker = function () { throw new Error("Not implemented"); }; BreakpointState.prototype.getLocalsForCurrentStackFrame = function () { throw new Error("Not implemented"); }; BreakpointState.prototype.getBreakpointLocals = function () { var _this = this; if (this._breakpointLocals) { return Plugin.Promise.wrap(this._breakpointLocals); } else { return this.getLocalsForCurrentStackFrame().then(function (data) { _this._breakpointLocals = data; return data; }); } }; BreakpointState.prototype.onbreak = function () { var _this = this; this._breakpointLocals = null; this._atBreakpoint = true; this.getIsAtBreakpointInWorker().done(function (data) { _this._atBreakpointInWorker = data; }); }; BreakpointState.prototype.onrun = function () { this._breakpointLocals = null; this._atBreakpoint = false; this._atBreakpointInWorker = false; }; return BreakpointState; })(); Console.BreakpointState = BreakpointState; var VSBreakpointState = (function (_super) { __extends(VSBreakpointState, _super); function VSBreakpointState(proxy) { _super.call(this, proxy); this._proxy = proxy; } VSBreakpointState.prototype.getIsAtBreakpoint = function () { return this._proxy._call("getIsAtBreakpoint"); }; VSBreakpointState.prototype.getIsAtBreakpointInWorker = function () { return this._proxy._call("getIsAtBreakpointInWorker"); }; VSBreakpointState.prototype.getLocalsForCurrentStackFrame = function () { return this._proxy._call("getLocalsForCurrentStackFrame"); }; return VSBreakpointState; })(BreakpointState); Console.VSBreakpointState = VSBreakpointState; var IEBreakpointState = (function (_super) { __extends(IEBreakpointState, _super); function IEBreakpointState(f12, external) { _super.call(this, external); this._f12 = f12; } IEBreakpointState.prototype.getIsAtBreakpoint = function () { return Plugin.Promise.wrap(this._f12.Debugger.getIsAtBreakpoint()); }; IEBreakpointState.prototype.getIsAtBreakpointInWorker = function () { return Plugin.Promise.wrap(this._f12.Debugger.getIsAtBreakpointInWorker()); }; IEBreakpointState.prototype.getLocalsForCurrentStackFrame = function () { return this._f12.Debugger.getLocalsForCurrentStackFrame(); }; return IEBreakpointState; })(BreakpointState); Console.IEBreakpointState = IEBreakpointState; })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // consoleModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Console) { "use strict"; var ConsoleModel = (function (_super) { __extends(ConsoleModel, _super); function ConsoleModel() { _super.call(this); this.currentTargetChanged = new Common.EventSource(); this.notificationCounts = Common.Observable.fromObject({ errors: 0, warnings: 0, messages: 0 }); this.notificationFilters = Common.Observable.fromObject({ errors: true, warnings: true, messages: true, log: true }); this.targetsModel = new Common.ObservableCollection(); } ConsoleModel.initialize = function () { Common.ObservableHelpers.defineProperty(ConsoleModel, "listViewItemCount", 0); Common.ObservableHelpers.defineProperty(ConsoleModel, "shouldClearOnNavigate", true); Common.ObservableHelpers.defineProperty(ConsoleModel, "targets", []); Common.ObservableHelpers.defineProperty(ConsoleModel, "currentTarget", "", function (obj, oldValue, newValue) { return obj.currentTargetChanged.invoke(newValue); }); Common.ObservableHelpers.defineProperty(ConsoleModel, "canSelectTargets", true); }; return ConsoleModel; })(Common.Observable); Console.ConsoleModel = ConsoleModel; ConsoleModel.initialize(); })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // converters.ts var F12; (function (F12) { (function (Tools) { (function (Console) { "use strict"; var Converters = (function () { function Converters() { } Converters.initialize = function () { Converters.ToErrorsLabel = Converters.notificationCountTooltip("SingleError", "MultiError"); Converters.ToWarningsLabel = Converters.notificationCountTooltip("SingleWarning", "MultiWarning"); Converters.ToMessagesLabel = Converters.notificationCountTooltip("SingleMessage", "MultiMessage"); Converters.ToClearButtonEnabled = Converters.valueToBool(function (itemCount) { return itemCount > 0; }); Converters.ToClearOnNavigateTooltip = Converters.boolToEnabledDisabledTooltip("ClearOnNavigateEnabled", "ClearOnNavigateDisabled"); }; Converters.notificationCountTooltip = function (singleResourceKey, multiResourceKey) { return { convertTo: function (from) { return Plugin.Resources.getString(from === 1 ? singleResourceKey : multiResourceKey, from); }, convertFrom: null }; }; Converters.valueToBool = function (comparer, defaultValue) { if (typeof defaultValue === "undefined") { defaultValue = false; } return { convertTo: function (from) { if (from) { return comparer(from); } else { return defaultValue; } }, convertFrom: null }; }; Converters.boolToEnabledDisabledTooltip = function (enabledResourceKey, disabledResourceKey) { return { convertTo: function (from) { return Plugin.Resources.getString(from ? enabledResourceKey : disabledResourceKey); }, convertFrom: null }; }; return Converters; })(); Console.Converters = Converters; Converters.initialize(); })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // Console.templates.ts var ControlTemplates; (function (ControlTemplates) { var Console = (function () { function Console() { } Console.consoleToolbarTemplate = "\
      \
      \ \
      \
      \ \
      \
      \
      \
      \ "; Console.consoleButtonsPanel = "\
      \
      \
      \
      \
      \
      \
      \ "; return Console; })(); ControlTemplates.Console = Console; })(ControlTemplates || (ControlTemplates = {})); // consoleIntellisenseProvider.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { var ConsoleIntellisenseProvider = (function (_super) { __extends(ConsoleIntellisenseProvider, _super); function ConsoleIntellisenseProvider(bridge, engine, breakpointState, toolTraceWriter) { _super.call(this); this._bridge = bridge; this._engine = engine; this._breakpointState = breakpointState; this._traceWriter = toolTraceWriter.traceWriter; } Object.defineProperty(ConsoleIntellisenseProvider.prototype, "traceWriter", { get: function () { return this._traceWriter; }, enumerable: true, configurable: true }); ConsoleIntellisenseProvider.prototype.getIntellisenseChoices = function (searchExpression, completeCallback, cancelToken, etwKey) { var _this = this; if (!this._breakpointState.atBreakpointInWorker) { var remoteCallback = function (results) { _this.fireGetIntellisenseItemsEndEvent(etwKey); if (!cancelToken.isCanceled) { var choices = []; if (results && results.choices) { for (var i = 0; i < results.choices.length; ++i) { if (results.choices[i].name.match(Common.Intellisense.IntellisenseProviderBase.JAVASCRIPT_VALID_JS_VARIABLENAME_REGEX) && results.choices[i].name.indexOf("__BROWSERTOOLS") !== 0) { choices.push(new Common.Intellisense.IntellisenseChoice(results.choices[i].name, results.choices[i].info)); } } } completeCallback(choices); } else { completeCallback([]); } }; this.fireGetIntellisenseItemsStartEvent(etwKey); if (this._breakpointState.atBreakpoint) { this._breakpointState.getBreakpointLocals().done(function (breakpointLocals) { if (!cancelToken.isCanceled) { var context = { searchExpression: searchExpression, searchContext: "window", locals: breakpointLocals.map(function (value, index, array) { return value.name; }) }; var expressionTerms = context.searchExpression.split("."); if (expressionTerms.length > 0 && context.locals.indexOf(expressionTerms[0]) >= 0) { context.searchContext = expressionTerms[0]; context.searchExpression = expressionTerms.slice(1).join("."); } _this._bridge.channel.executeBreakModeCommand(_this._engine(), "performBreakmodeIntellisense", ConsoleIntellisenseProvider.getNextId(), JSON.stringify(context), remoteCallback, ConsoleIntellisenseProvider.createInvoker); } else { remoteCallback(null); } }); } else { this._bridge.channel.call(this._engine(), "getIntellisenseItemsForExpression", [searchExpression], remoteCallback); } } }; ConsoleIntellisenseProvider.prototype.fireGetCurrentExpressionStartEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(429 /* Console_Intellisense_Provider_Get_Expression_Start */, etwKey); }; ConsoleIntellisenseProvider.prototype.fireGetCurrentExpressionEndEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(430 /* Console_Intellisense_Provider_Get_Expression_Stop */, etwKey); }; ConsoleIntellisenseProvider.prototype.fireUpdateIntellisenseStartEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(431 /* Console_Intellisense_Provider_Update_Start */, etwKey); }; ConsoleIntellisenseProvider.prototype.fireUpdateIntellisenseEndEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(432 /* Console_Intellisense_Provider_Update_Stop */, etwKey); }; ConsoleIntellisenseProvider.createInvoker = function (id, searchContextString, isWorker) { var context = JSON.parse(searchContextString); var invoker = "__BROWSERTOOLS_CONSOLE.performBreakmodeIntellisense(\"" + id + "\", \"" + context.searchExpression + "\", window, " + context.searchContext + ", " + JSON.stringify(context.locals) + ")"; return invoker; }; ConsoleIntellisenseProvider.getNextId = function () { return ConsoleIntellisenseProvider.NextId++; }; ConsoleIntellisenseProvider.prototype.fireGetIntellisenseItemsStartEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(433 /* Console_Intellisense_Provider_Get_Items_Start */, etwKey); }; ConsoleIntellisenseProvider.prototype.fireGetIntellisenseItemsEndEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(434 /* Console_Intellisense_Provider_Get_Items_Stop */, etwKey); }; ConsoleIntellisenseProvider.NextId = 0; return ConsoleIntellisenseProvider; })(Common.Intellisense.IntellisenseProviderBase); Console.ConsoleIntellisenseProvider = ConsoleIntellisenseProvider; })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // inputcontrol.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { (function (Controls) { var InputControl = (function () { function InputControl(executeCallback, intellisenseContext, resizeListViewCommand) { this._executeCallback = executeCallback; this._intellisenseContext = intellisenseContext; this._resizeListView = resizeListViewCommand; this._commandItems = []; this._commandIndex = -1; this._isSingleLineMode = true; this._savedSelectionValid = false; this.initialize(); } Object.defineProperty(InputControl.prototype, "commandItems", { get: function () { return this._commandItems; }, enumerable: true, configurable: true }); Object.defineProperty(InputControl.prototype, "isSingleLineMode", { get: function () { return this._isSingleLineMode; }, set: function (value) { if (value) { this.switchToSingleLineConsole(); } else { this.switchToMultiLineConsole(); } }, enumerable: true, configurable: true }); Object.defineProperty(InputControl.prototype, "inputText", { get: function () { if (this._isSingleLineMode) { return this._singleInputElement.value; } else { return this._multiInputElement.value; } }, set: function (text) { if (this._isSingleLineMode) { this._singleInputElement.value = text; } else { this._multiInputElement.value = text; } }, enumerable: true, configurable: true }); Object.defineProperty(InputControl.prototype, "inputElement", { get: function () { if (this._isSingleLineMode) { return this._singleInputElement; } else { return this._multiInputElement; } }, enumerable: true, configurable: true }); InputControl.prototype.enable = function () { this._inputPanelElement.style.display = "block"; }; InputControl.prototype.disable = function () { this._inputPanelElement.style.display = "none"; }; InputControl.prototype.executeCommandApi = function (command) { if (this._isSingleLineMode) { this._singleInputElement.value = command; } else { this._multiInputElement.value = command; } this.executeCommand(); return this._inputId; }; InputControl.prototype.onInputKeyDownApi = function (e) { if (this._isSingleLineMode) { e.target = this._singleInputElement; } else { e.target = this._multiInputElement; } return this.onInputKeyDown(e); }; InputControl.prototype.focusOnInput = function () { if (this._isSingleLineMode) { this._singleInputElement.focus(); } else { this._multiInputElement.focus(); } }; InputControl.prototype.setSelectionRange = function (start, end) { if (this._isSingleLineMode) { this._singleInputElement.setSelectionRange(start, end); } else { this._multiInputElement.setSelectionRange(start, end); } }; InputControl.prototype.handleContextMenu = function (e) { this.showContextMenu(e.clientX, e.clientY); e.stopImmediatePropagation(); e.preventDefault(); return false; }; InputControl.prototype.invokeContextMenu = function (menuId, menuItem) { var element; if (this.isSingleLineMode) { element = this._singleInputElement; } else { element = this._multiInputElement; } var selectedText = element.value.substring(this._copyStart, this._copyEnd); var pasteText = clipboardData.getData("Text"); switch (menuItem.id) { case "menuConsoleInputCut": clipboardData.setData("Text", selectedText); this.updateInputElementTextRange(this._copyStart, this._copyEnd, ""); element.focus(); break; case "menuConsoleInputCopy": clipboardData.setData("Text", selectedText); element.focus(); element.setSelectionRange(this._copyStart, this._copyEnd); break; case "menuConsoleInputPaste": if (pasteText) { if (pasteText.indexOf("\n") >= 0) { this.switchToMultiLineConsole(); element = this._multiInputElement; } this._intellisenseContext.uninitialize(); this.updateInputElementTextRange(this._copyStart, this._copyEnd, pasteText); element.focus(); this._intellisenseContext.initialize(element); } break; } }; InputControl.prototype.initialize = function () { var _this = this; this._mainContainer = document.getElementById("mainContainer"); this._toolbar = document.getElementById("toolbar"); this._outputPanelElement = document.getElementById("outputArea"); this._inputPanelElement = document.getElementById("inputArea"); this._dividerElement = document.getElementById("inputSplitter"); this._singleInputElement = document.getElementById("input-singleLine"); this._multiInputElement = document.getElementById("input-multiLine"); this._multiInputContainerElement = document.getElementById("inputMultilineContainer"); this._executeButton = document.getElementById("executeButton"); this._toggleButton = document.getElementById("toggleButton"); this._clearInputButton = document.getElementById("clearInputButton"); this.attachButtonEvents(this._executeButton, function () { return _this.executeButtonPressed(); }); this.attachButtonEvents(this._toggleButton, function () { return _this.toggleLineMode(); }); this.attachButtonEvents(this._clearInputButton, function () { return _this.clearInput(); }); this._singleInputElement.addEventListener("keydown", function (e) { return _this.onInputKeyDown(e); }); this._multiInputElement.addEventListener("keydown", function (e) { return _this.onInputKeyDown(e); }); this._multiInputElement.addEventListener("blur", function (e) { return _this.multiOnBlur(e); }); this._multiInputElement.addEventListener("focus", function (e) { return _this.multiOnFocus(e); }); this._dividerElement.addEventListener("mousedown", function (e) { return _this.onDividerMouseDown(e); }); this._clearInputButton.onmouseover = function () { Plugin.Tooltip.show({ content: Common.ToolWindowHelpers.loadString("ConsoleClearInputButtonTooltip") }); return true; }; this._singleInputElement.onmouseover = function () { Plugin.Tooltip.show({ content: Common.ToolWindowHelpers.loadString("ConsoleInputTooltip") }); return true; }; this._multiInputElement.onmouseover = function () { Plugin.Tooltip.show({ content: Common.ToolWindowHelpers.loadString("ConsoleInputTooltip") }); return true; }; this._singleInputElement.setAttribute("aria-label", Common.ToolWindowHelpers.loadString("ConsoleInputTooltip")); this._multiInputElement.setAttribute("aria-label", Common.ToolWindowHelpers.loadString("ConsoleInputTooltip")); this._clearInputButton.setAttribute("aria-label", Common.ToolWindowHelpers.loadString("ConsoleClearInputButtonTooltip")); this._isSingleLineMode = !this._isSingleLineMode; this.toggleLineMode(); this._multiInputElement.addEventListener("contextmenu", function (e) { return _this.handleContextMenu(e); }); this._singleInputElement.addEventListener("contextmenu", function (e) { return _this.handleContextMenu(e); }); if (Plugin.F12) { Plugin.F12.addEventListener("keydown", function (e) { if (e.keyCode === 73 /* I */ && e.ctrlKey && e.altKey && !e.shiftKey) { if (_this._isSingleLineMode) { _this._singleInputElement.focus(); } else { _this._multiInputElement.focus(); } } }); } }; InputControl.prototype.attachButtonEvents = function (button, callback) { button.addEventListener("click", function (e) { callback(); }); button.addEventListener("keydown", function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { callback(); e.preventDefault(); } }); }; InputControl.prototype.onDividerMouseDown = function (e) { var _this = this; var startY = e.clientY; var startHeight = this._inputPanelElement.clientHeight; var maxHeight = this._mainContainer.clientHeight - this._toolbar.clientHeight; var mouseMoveHandler = function (e) { _this.setPaneHeight(Math.min(maxHeight, startHeight + startY - e.clientY)); }; var mouseUpHandler = function (e) { document.removeEventListener("mousemove", mouseMoveHandler); document.removeEventListener("mouseup", mouseUpHandler); }; document.addEventListener("mousemove", mouseMoveHandler); document.addEventListener("mouseup", mouseUpHandler); }; InputControl.prototype.onInputKeyDown = function (e) { if (this._intellisenseContext.intellisenseMenu.isOpen && (this._intellisenseContext.intellisenseMenu.hasSelection || e.keyCode !== 13 /* Enter */)) { return true; } var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; if (event.keyCode === 121 /* F10 */ && shiftKey) { this.showContextMenu(0, 0); e.stopImmediatePropagation(); e.preventDefault(); return false; } if (e.target === this._singleInputElement) { var inputText = this._singleInputElement.value; if (this._commandItems.length > 0 && e.keyCode === 38 /* ArrowUp */) { this._commandIndex = this._commandIndex < (this._commandItems.length - 1) ? this._commandIndex : this._commandItems.length - 1; while (this._commandIndex >= 0 && this._commandItems[this._commandIndex] === inputText) { this._commandIndex--; } this._intellisenseContext.uninitialize(); this.setSingleLineInputElementText(this._commandItems[this._commandIndex >= 0 ? this._commandIndex : 0]); this._singleInputElement.focus(); if (this._commandIndex < 0) { this._singleInputElement.setSelectionRange(0, 0); } this._intellisenseContext.initialize(this._singleInputElement); } else if (this._commandItems.length > 0 && e.keyCode === 40 /* ArrowDown */) { var navigateToNextCommand = this._commandIndex >= 0; this._commandIndex = this._commandIndex < 0 ? 0 : this._commandIndex; while (this._commandIndex < this._commandItems.length && this._commandItems[this._commandIndex] === inputText && navigateToNextCommand) { this._commandIndex++; } this._intellisenseContext.uninitialize(); inputText = this._commandIndex < this._commandItems.length ? this._commandItems[this._commandIndex] : ""; this.setSingleLineInputElementText(inputText); this._singleInputElement.focus(); this._intellisenseContext.initialize(this._singleInputElement); } else if (e.keyCode === 77 /* M */ && !e.shiftKey && e.ctrlKey && e.altKey) { this.toggleLineMode(); e.preventDefault(); return false; } else if (e.keyCode === 13 /* Enter */ && !e.shiftKey && !e.ctrlKey && !e.altKey) { this._intellisenseContext.uninitialize(); this.executeCommand(); this._intellisenseContext.initialize(this._singleInputElement); } else if (e.keyCode === 13 /* Enter */ && e.shiftKey && !e.ctrlKey && !e.altKey) { var start = this._singleInputElement.selectionStart; var end = this._singleInputElement.selectionEnd; this.toggleLineMode(); this._multiInputElement.setSelectionRange(start, end); } else if (!this._intellisenseContext.intellisenseMenu.isOpen && e.keyCode === 27 /* Escape */) { this.setSingleLineInputElementText(""); e.preventDefault(); e.stopPropagation(); return false; } else if (e.keyCode === 86 /* V */ && e.ctrlKey && !e.shiftKey && !e.altKey) { var pasteText = clipboardData.getData("Text"); if (pasteText && pasteText.indexOf("\n") >= 0) { var start = this._singleInputElement.selectionStart; var end = this._singleInputElement.selectionEnd; this.switchToMultiLineConsole(); this._intellisenseContext.uninitialize(); this.updateInputElementTextRange(start, end, pasteText); this._intellisenseContext.initialize(this._multiInputElement); e.preventDefault(); e.stopPropagation(); return false; } return true; } } else { var inputText = this._multiInputElement.value; if (e.keyCode === 9 /* Tab */ && !e.shiftKey && !e.altKey && !e.ctrlKey) { this._intellisenseContext.uninitialize(); var start = this._multiInputElement.selectionStart; var end = this._multiInputElement.selectionEnd; this.updateInputElementTextRange(start, end, "\t"); this._multiInputElement.setSelectionRange(start + 1, start + 1); this._intellisenseContext.initialize(this._multiInputElement); e.preventDefault(); return false; } else if (e.keyCode === 13 /* Enter */ && e.ctrlKey && !e.shiftKey && !e.altKey) { this._intellisenseContext.intellisenseMenu.isOpen = false; this.executeCommand(); } else if (e.keyCode === 77 /* M */ && e.ctrlKey && !e.shiftKey && e.altKey) { this.toggleLineMode(); e.preventDefault(); return false; } else if (!this._intellisenseContext.intellisenseMenu.isOpen && e.keyCode === 27 /* Escape */) { this.setMultiLineInputElementText(""); e.preventDefault(); e.stopPropagation(); return false; } } return true; }; InputControl.prototype.multiOnBlur = function (e) { this._savedSelectionEnd = this._multiInputElement.selectionEnd; this._savedSelectionValid = true; return true; }; InputControl.prototype.multiOnFocus = function (e) { if (this._savedSelectionValid && this._multiInputElement.selectionEnd >= this._multiInputElement.value.length) { this._multiInputElement.setSelectionRange(this._savedSelectionEnd, this._savedSelectionEnd); } return true; }; InputControl.prototype.setPaneHeight = function (newHeight) { newHeight = Math.round(newHeight); if (newHeight < InputControl.MinPaneSize) { return; } this._inputPanelElement.style.height = newHeight + "px"; var inputHeight = (newHeight - InputControl.ConsoleAreaOffset); this._singleInputElement.style.height = inputHeight + "px"; this._multiInputElement.style.height = inputHeight + "px"; this._outputPanelElement.style.bottom = (newHeight - this._dividerElement.offsetTop) + "px"; this._resizeListView(); if (newHeight < InputControl.MinMultiLineConsolePaneSize) { this.switchToSingleLineConsole(newHeight); } else if (this._isSingleLineMode && newHeight >= InputControl.MinMultiLineConsolePaneSize) { this.switchToMultiLineConsole(newHeight); } }; InputControl.prototype.switchToSingleLineConsole = function (paneHeight) { if (!this._isSingleLineMode) { this._isSingleLineMode = true; var text = this._multiInputElement.value; text = (text ? text.replace(/[\r\n]/g, " ") : ""); this._multiInputContainerElement.style.display = "none"; this._singleInputElement.style.display = "inline-block"; this.setSingleLineInputElementText(text); this._toggleButton.classList.remove("BPT-Toggle-SingleIcon"); this._toggleButton.classList.add("BPT-Toggle-MultiIcon"); this._toggleButton.onmouseover = function () { Plugin.Tooltip.show({ content: Common.ToolWindowHelpers.loadString("ToggleToMultiLineTooltip") }); }; this._toggleButton.setAttribute("aria-label", Common.ToolWindowHelpers.loadString("ToggleToMultiLineTooltip")); this._executeButton.onmouseover = function () { Plugin.Tooltip.show({ content: Common.ToolWindowHelpers.loadString("RunScriptButtonText") }); }; this._executeButton.setAttribute("aria-label", Common.ToolWindowHelpers.loadString("RunScriptButtonText")); this._intellisenseContext.uninitialize(); this._intellisenseContext.initialize(this._singleInputElement); this.setPaneHeight(paneHeight || InputControl.MinPaneSize); this._singleInputElement.focus(); } }; InputControl.prototype.switchToMultiLineConsole = function (paneHeight) { if (this._isSingleLineMode) { this._isSingleLineMode = false; var text = this._singleInputElement.value; this._multiInputContainerElement.style.display = "inline-block"; this._singleInputElement.style.display = "none"; this.setMultiLineInputElementText(text); this._toggleButton.classList.remove("BPT-Toggle-MultiIcon"); this._toggleButton.classList.add("BPT-Toggle-SingleIcon"); this._toggleButton.onmouseover = function () { Plugin.Tooltip.show({ content: Common.ToolWindowHelpers.loadString("ToggleToSingleLineTooltip") }); }; this._toggleButton.setAttribute("aria-label", Common.ToolWindowHelpers.loadString("ToggleToSingleLineTooltip")); this._executeButton.onmouseover = function () { Plugin.Tooltip.show({ content: Common.ToolWindowHelpers.loadString("RunScriptButtonTextMultiLine") }); }; this._executeButton.setAttribute("aria-label", Common.ToolWindowHelpers.loadString("RunScriptButtonTextMultiLine")); this._intellisenseContext.uninitialize(); this._intellisenseContext.initialize(this._multiInputElement); var inputContainer = document.getElementById("inputBoxContainer"); if (inputContainer.clientHeight < InputControl.MinMultiLineConsolePaneSize) { this.setPaneHeight(paneHeight || Math.max(InputControl.MinMultiLineConsolePaneSize, Math.min(InputControl.DefaultMultiLineConsolePaneSize, this._outputPanelElement.clientHeight + this._inputPanelElement.clientHeight - InputControl.MinOutputHeightToLeaveWhenMultiLine))); } this._multiInputElement.focus(); } }; InputControl.prototype.executeButtonPressed = function () { this.executeCommand(); if (this._isSingleLineMode) { this._singleInputElement.focus(); } else { this._multiInputElement.focus(); } }; InputControl.prototype.executeCommand = function () { var inputText = ""; if (this._isSingleLineMode) { inputText = this._singleInputElement.value; this._singleInputElement.value = ""; } else { inputText = this._multiInputElement.value; } inputText = inputText.trim(); var inputId = this._executeCallback(inputText); this._inputId = inputId; if (inputId >= 0 && this._isSingleLineMode) { if (this._commandItems[this._commandItems.length - 1] !== inputText) { this._commandItems.push(inputText); } this._commandIndex = this._commandItems.length - 1; } }; InputControl.prototype.toggleLineMode = function () { if (this._isSingleLineMode) { this.switchToMultiLineConsole(); } else { this.switchToSingleLineConsole(); } }; InputControl.prototype.clearInput = function () { if (this._isSingleLineMode) { this.setSingleLineInputElementText(""); this._singleInputElement.focus(); } else { this.setMultiLineInputElementText(""); this._multiInputElement.focus(); } }; InputControl.prototype.setSingleLineInputElementText = function (text) { var range = this._singleInputElement.createTextRange(); var useUndo = range.queryCommandSupported("ms-beginUndoUnit"); if (useUndo) { range.execCommand("ms-beginUndoUnit"); } range.text = text; if (useUndo) { range.execCommand("ms-endUndoUnit"); } }; InputControl.prototype.setMultiLineInputElementText = function (text) { var range = this._multiInputElement.createTextRange(); var useUndo = range.queryCommandSupported("ms-beginUndoUnit"); if (useUndo) { range.execCommand("ms-beginUndoUnit"); } range.text = text; if (useUndo) { range.execCommand("ms-endUndoUnit"); } this._savedSelectionValid = false; }; InputControl.prototype.updateInputElementTextRange = function (start, end, text) { var element; if (this._isSingleLineMode) { element = this._singleInputElement; } else { element = this._multiInputElement; } var range = element.createTextRange(); var useUndo = range.queryCommandSupported("ms-beginUndoUnit"); if (useUndo) { range.execCommand("ms-beginUndoUnit"); } range.move("character", start); range.moveEnd("character", end - start); range.text = text; if (useUndo) { range.execCommand("ms-endUndoUnit"); } }; InputControl.prototype.showContextMenu = function (clientX, clientY) { var _this = this; var x = clientX; var y = clientY; var element; if (this.isSingleLineMode) { element = this._singleInputElement; } else { element = this._multiInputElement; } if (clientX <= 0 || clientY <= 0) { var offset = element.getBoundingClientRect(); x = offset.left; y = offset.top; } try { this._copyStart = element.selectionStart; this._copyEnd = element.selectionEnd; } catch (e) { return; } var _menuItems = [ { id: "menuConsoleInputCut", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CutMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlX") }, { id: "menuConsoleInputCopy", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlC") }, { id: "menuConsoleInputPaste", type: 1 /* command */, label: Plugin.Resources.getString("/Common/PasteMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlV") }]; var contextMenu = Plugin.ContextMenu.create(_menuItems, null, null, null, function (menuId, menuItem) { return _this.invokeContextMenu(menuId, menuItem); }); contextMenu.addEventListener("dismiss", function () { contextMenu.dispose(); }); contextMenu.attach(element); contextMenu.show(parseInt(x.toFixed(0)), parseInt(y.toFixed(0))); }; InputControl.MinMultiLineConsolePaneSize = 30; InputControl.DefaultMultiLineConsolePaneSize = 80; InputControl.MinPaneSize = 25; InputControl.ConsoleAreaOffset = 10; InputControl.MinOutputHeightToLeaveWhenMultiLine = 36; return InputControl; })(); Controls.InputControl = InputControl; })(Console.Controls || (Console.Controls = {})); var Controls = Console.Controls; })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // menus.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { var MenuOutputAreaItems; (function (MenuOutputAreaItems) { MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleViewAsHtml"] = 0] = "MenuConsoleViewAsHtml"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleViewAsObject"] = 1] = "MenuConsoleViewAsObject"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleAddToWatch"] = 2] = "MenuConsoleAddToWatch"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleCopy"] = 4] = "MenuConsoleCopy"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleCopyItem"] = 5] = "MenuConsoleCopyItem"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleCopyAll"] = 6] = "MenuConsoleCopyAll"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleClear"] = 8] = "MenuConsoleClear"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleFilterErrors"] = 10] = "MenuConsoleFilterErrors"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleFilterWarnings"] = 11] = "MenuConsoleFilterWarnings"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleFilterMessages"] = 12] = "MenuConsoleFilterMessages"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleFilterLog"] = 13] = "MenuConsoleFilterLog"; MenuOutputAreaItems[MenuOutputAreaItems["MenuConsoleFilterAll"] = 14] = "MenuConsoleFilterAll"; })(MenuOutputAreaItems || (MenuOutputAreaItems = {})); var ContextMenuController = (function () { function ContextMenuController(console, listview) { this._menuId = "ConsoleOutputContextMenu"; this._selectedItem = null; this._menuItems = [ { id: "menuConsoleViewAsHtml", type: 1 /* command */, label: Plugin.Resources.getString("/Common/ViewAsHtmlMenuText") }, { id: "menuConsoleViewAsObject", type: 1 /* command */, label: Plugin.Resources.getString("/Common/ViewAsObjectMenuText") }, { id: "menuConsoleAddToWatch", type: 1 /* command */, label: Plugin.Resources.getString("/Common/AddToWatch") }, { id: "separator", type: 3 /* separator */ }, { id: "menuConsoleCopy", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyMenuText") }, { id: "menuConsoleCopyItem", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyItemMenuText") }, { id: "menuConsoleCopyAll", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyAllMenuText") }, { id: "separator", type: 3 /* separator */ }, { id: "menuConsoleClear", type: 1 /* command */, label: Plugin.Resources.getString("/Common/ClearMenuText") }, { id: "separator", type: 3 /* separator */ }, { id: "menuConsoleFilterErrors", type: 0 /* checkbox */, label: Plugin.Resources.getString("/Common/FilterErrorsMenuText") }, { id: "menuConsoleFilterWarnings", type: 0 /* checkbox */, label: Plugin.Resources.getString("/Common/FilterWarningsMenuText") }, { id: "menuConsoleFilterMessages", type: 0 /* checkbox */, label: Plugin.Resources.getString("/Common/FilterMessagesMenuText") }, { id: "menuConsoleFilterLog", type: 0 /* checkbox */, label: Plugin.Resources.getString("/Common/FilterLogMenuText") }, { id: "menuConsoleFilterAll", type: 0 /* checkbox */, label: Plugin.Resources.getString("/Common/FilterDisplayAllMenuText") } ]; this._console = console; this._listview = listview; this.initialize(); } ContextMenuController.prototype.canViewAsHtml = function () { if (this._selectedItem && this._selectedItem instanceof Common.ObjectView.TreeViewOutputItem) { var item = (this._selectedItem); return (item.viewableTypeFlags & 2 /* Html */) === 2 /* Html */; } return false; }; ContextMenuController.prototype.canViewAsObject = function () { if (this._selectedItem && this._selectedItem instanceof Common.ObjectView.TreeViewOutputItem) { var item = (this._selectedItem); return (item.viewableTypeFlags & 1 /* Object */) === 1 /* Object */; } return false; }; ContextMenuController.prototype.canAddToWatch = function () { return this._selectedItem && this._selectedItem.getWatchExpression() !== undefined; }; ContextMenuController.prototype.setSelectedItem = function (item) { this._selectedItem = item; }; ContextMenuController.prototype.initialize = function () { var _this = this; this._outputArea = document.getElementById("outputArea"); this._outputArea.addEventListener("contextmenu", function (e) { return _this.onOutputAreaContextMenu(e); }); this._outputArea.addEventListener("keydown", function (e) { return _this.onOutputAreaContextMenuByKey(e); }); }; ContextMenuController.prototype.onOutputAreaContextMenuByKey = function (event) { this._console.onConsoleBeforeMenuLoaded(); var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; if (event.keyCode === 121 /* F10 */ && shiftKey) { this.showContextMenu(0, 0); event.preventDefault(); event.stopImmediatePropagation(); } this._console.onConsoleMenuLoaded(); return true; }; ContextMenuController.prototype.onOutputAreaContextMenu = function (e) { this._console.onConsoleBeforeMenuLoaded(); this.showContextMenu(e.clientX, e.clientY); e.preventDefault(); e.stopImmediatePropagation(); this._console.onConsoleMenuLoaded(); return false; }; ContextMenuController.prototype.showContextMenu = function (x, y) { var _this = this; var selectedRow = null; this._selectedItem = null; this._selectedText = Common.ToolWindowHelpers.getSelectedText(); if (x <= 0 || y <= 0) { x = 0; y = 0; if (document.activeElement) { this._selectedItem = this._listview.getSelectedItem(); if (this._selectedItem) { selectedRow = this._listview.getSelectedRow(); if (selectedRow) { var rect = selectedRow.getBoundingClientRect(); x = rect.left + 20; y = rect.top + rect.height / 2; } } } } else { this._selectedItem = this._listview.getSelectedItem(); selectedRow = this._listview.getSelectedRow(); } if (!this._contextMenu) { this._menuItems[0 /* MenuConsoleViewAsHtml */].disabled = function () { return !_this.canViewAsHtml(); }; this._menuItems[1 /* MenuConsoleViewAsObject */].disabled = function () { return !_this.canViewAsObject(); }; this._menuItems[2 /* MenuConsoleAddToWatch */].disabled = function () { return !_this.canAddToWatch(); }; this._menuItems[2 /* MenuConsoleAddToWatch */].hidden = function () { return !_this.hasAddToWatch(); }; this._menuItems[4 /* MenuConsoleCopy */].disabled = function () { return !(_this._selectedText); }; this._menuItems[5 /* MenuConsoleCopyItem */].disabled = function () { return !(_this._selectedItem !== null); }; this._menuItems[6 /* MenuConsoleCopyAll */].disabled = function () { return !(_this._listview.getItemCount() > 0); }; this._menuItems[8 /* MenuConsoleClear */].disabled = function () { return !(_this._listview.getUnfilteredItemCount() > 0); }; this._menuItems[10 /* MenuConsoleFilterErrors */].checked = function () { return _this._console.notificationFilters.errors; }; this._menuItems[11 /* MenuConsoleFilterWarnings */].checked = function () { return _this._console.notificationFilters.warnings; }; this._menuItems[12 /* MenuConsoleFilterMessages */].checked = function () { return _this._console.notificationFilters.messages; }; this._menuItems[13 /* MenuConsoleFilterLog */].checked = function () { return _this._console.notificationFilters.log; }; this._menuItems[14 /* MenuConsoleFilterAll */].checked = function () { return (_this._console.notificationFilters.errors && _this._console.notificationFilters.warnings && _this._console.notificationFilters.messages && _this._console.notificationFilters.log); }; this._contextMenu = Plugin.ContextMenu.create(this._menuItems, this._menuId, null, null, function (menuId, menuItem) { return _this.onMenuItemClicked(menuId, menuItem.id, _this._selectedItem, selectedRow, _this._selectedText); }); } if (selectedRow) { this._contextMenu.attach(selectedRow); } this._contextMenu.show(parseInt(x.toFixed(0)), parseInt(y.toFixed(0))); }; ContextMenuController.prototype.hasAddToWatch = function () { return this._console.hasAddToWatch(); }; ContextMenuController.prototype.onMenuItemClicked = function (menuId, itemId, selectedItem, selectedRow, selectedText) { if (menuId === this._menuId) { var menuItems = this._menuItems; switch (itemId) { case menuItems[0 /* MenuConsoleViewAsHtml */].id: if (selectedItem && selectedItem instanceof Common.ObjectView.TreeViewOutputItem) { this._console.evaluateItemAsType(selectedItem, 2 /* Html */); } break; case menuItems[1 /* MenuConsoleViewAsObject */].id: if (selectedItem && selectedItem instanceof Common.ObjectView.TreeViewOutputItem) { this._console.evaluateItemAsType(selectedItem, 1 /* Object */); } break; case menuItems[2 /* MenuConsoleAddToWatch */].id: this._console.addToWatch(selectedItem); break; case menuItems[4 /* MenuConsoleCopy */].id: this._console.copySelectedTextToClipboard(selectedText); break; case menuItems[5 /* MenuConsoleCopyItem */].id: this._console.copyItemToClipboard(selectedItem); break; case menuItems[6 /* MenuConsoleCopyAll */].id: this._console.copyAll(); break; case menuItems[8 /* MenuConsoleClear */].id: this._console.clear(); break; case menuItems[10 /* MenuConsoleFilterErrors */].id: this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.error); break; case menuItems[11 /* MenuConsoleFilterWarnings */].id: this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.warning); break; case menuItems[12 /* MenuConsoleFilterMessages */].id: this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.message); break; case menuItems[13 /* MenuConsoleFilterLog */].id: this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.log); break; case menuItems[14 /* MenuConsoleFilterAll */].id: this._console.toggleFilter(Common.ObjectView.TreeViewUtils.ConsoleFilterId.all, true); break; default: break; } } }; return ContextMenuController; })(); Console.ContextMenuController = ContextMenuController; })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // console.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { var ConsoleWindow = (function () { function ConsoleWindow(bridge, traceWriter) { var _this = this; this._bridge = bridge; this._breakpointState = this._bridge.breakpointState; this._throttle = new Common.MessageThrottle(); this._traceWriter = traceWriter; this.traceWriter.raiseEvent(401 /* Console_Window_Create_Start */); Common.ToolWindowHelpers.registerErrorComponent("Console", this.onError.bind(this)); this._intellisenseContext = new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge(), new Common.Intellisense.IntellisenseMenu("intellisenseListBox", null, null, null, null, this, this), new Console.ConsoleIntellisenseProvider(this._bridge, function () { return _this._currentEngine; }, this._breakpointState, this)); this._outputList = document.getElementById("outputList"); this._listview = new Common.ObjectView.ObjectTreeView(this._outputList, function (item) { return _this.onListViewToggle(item); }, null, null, function (item, row, cell) { return _this.onListViewClick(item, row, cell); }); this._inputControl = new Console.Controls.InputControl(function (command) { return _this.processInput(command); }, this._intellisenseContext, function () { return _this._listview.resize(); }); this._contextMenuController = new Console.ContextMenuController(this, this._listview); this._isInitialHandshake = true; this._contextInfo = null; this._model = new Console.ConsoleModel(); this._inputItemsMap = {}; this._countItemsMap = {}; this._groupStack = [new Common.ObjectView.TreeViewGroupItem()]; this._consoleOutputCallback = function (outputObj, engine) { return _this.onConsoleOutput(outputObj, engine); }; this._model.currentTargetChanged.addHandler(function (newValue) { return _this.onTargetEngineChanged(newValue); }); this._bridge.getScriptEngines().done(function (data) { for (var i = 0; i < data.length; i++) { _this.onAttach({ engineId: data[i] }); } _this._bridge.addEventListener("attach", _this.onAttach.bind(_this)); }); this.updateTargetView(); this.initialize(); if (Plugin.F12) { Plugin.F12.Communications.addEventListener("onUnhandledException", function (e) { var info = e.customData; _this.writeError({ messageId: info.messageId, messageText: info.messageText, fileUrl: info.fileName, lineNumber: info.lineNumber, columnNumber: info.columnNumber }, null); }); } else { this._bridge.addEventListener("scriptError", function (e) { _this.writeError({ messageId: e.messageId, messageText: e.messageText, fileUrl: e.fileName, lineNumber: e.lineNumber, columnNumber: e.columnNumber }, null); }); } if (Plugin.F12) { Common.NavigationUtilities.registerNavigationFrames([ Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body, function () { return _this._toolbar.getActiveElement(); }), Common.NavigationUtilities.makeNavigationFrameFromCallback(document.getElementById("inputBoxContainer"), function () { return _this._inputControl.inputElement; }) ]); Common.NavigationUtilities.registerFocusHandlers(Plugin.F12.PluginId.Console); } this._bridge.addEventListener("toggleFilter", function (e) { return _this.toggleFilter(e.filterIndex); }); this._bridge.channel.addMessageProcessor("Throttle Messages", Common.MessageThrottle.splitMessage); this._bridge.channel.addMessageHandler("CreateTargetDefaults", this.createTargetDefaults.bind(this)); this._bridge.channel.addMessageHandler("Combine Messages", this._throttle.combineMessages.bind(this._throttle)); this._bridge.channel.addMessageHandler("Handshake", this.handleHandshake.bind(this)); this._bridge.channel.addMessageHandler("TargetCreated", this.targetCreated.bind(this)); this._bridge.channel.addMessageHandler("TargetClosed", this.targetClosed.bind(this)); this._bridge.channel.addMessageHandler("TargetChanged", this.targetChanged.bind(this)); this._bridge.channel.addMessageHandler("TargetUpdated", this.targetUpdated.bind(this)); this._bridge.channel.addMessageHandler("ClearTargets", this.targetsCleared.bind(this)); this._bridge.channel.addMessageHandler("ClearOnNavigate", this.clearOnNavigate.bind(this)); this._bridge.addEventListener("connect", this.onConnect.bind(this)); this._bridge.addEventListener("detach", this.onDetach.bind(this)); this._bridge.addEventListener("break", this.onBreak.bind(this)); this._bridge.addEventListener("run", this.onRun.bind(this)); this._bridge.addEventListener("load", this.onLoad.bind(this)); Common.ToolWindowHelpers.initializeToolWindow(); if (Plugin.F12) { this._model.notificationCounts.propertyChanged.addHandler(this.onConsoleNotificationCountsChanged.bind(this)); } this.traceWriter.raiseEvent(402 /* Console_Window_Create_Stop */); } Object.defineProperty(ConsoleWindow.prototype, "onConsoleUpdated", { get: function () { return this._onConsoleUpdated; }, set: function (callback) { this._onConsoleUpdated = callback; this._listview.onUpdated = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "onConsoleBeforeRendering", { get: function () { return this._onConsoleBeforeRendering; }, set: function (callback) { this._onConsoleBeforeRendering = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "onConsoleRendered", { get: function () { return this._onConsoleRendered; }, set: function (callback) { this._onConsoleRendered = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "onConsoleReady", { get: function () { return this._onConsoleReady; }, set: function (callback) { this._onConsoleReady = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "onConsoleBreak", { get: function () { return this._onConsoleBreak; }, set: function (callback) { this._onConsoleBreak = callback; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "traceWriter", { get: function () { return this._traceWriter; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "contextMenuController", { get: function () { return this._contextMenuController; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "notificationFilters", { get: function () { return this._model.notificationFilters; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "listView", { get: function () { return this._listview; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "inputControl", { get: function () { return this._inputControl; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "intellisenseContext", { get: function () { return this._intellisenseContext; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "atBreakpoint", { get: function () { return this._breakpointState.atBreakpoint; }, enumerable: true, configurable: true }); Object.defineProperty(ConsoleWindow.prototype, "documentMode", { get: function () { return this._docMode; }, enumerable: true, configurable: true }); ConsoleWindow.prototype.getTargets = function () { var targets = []; for (var i = 0; i < this._model.targets.length; i++) { targets.push(this._model.targets[i].value); } return targets; }; ConsoleWindow.prototype.getCurrentTarget = function () { return this._model.currentTarget; }; ConsoleWindow.prototype.setCurrentTarget = function (target) { this.onTargetEngineChanged(target); }; ConsoleWindow.prototype.onError = function (message, file, line, additionalInfo, engine) { try { if (file) { var parts = file.split("/"); if (parts.length > 0) { file = parts[parts.length - 1]; } } var errorMessage = Common.ToolWindowHelpers.loadString("ConsoleScriptError") + "\r\n" + Common.ToolWindowHelpers.loadString("ScriptErrorMessage", [message]) + "\r\n" + Common.ToolWindowHelpers.loadString("ScriptErrorFile", [file]) + "\r\n" + Common.ToolWindowHelpers.loadString("ScriptErrorLine", [line]) + "\r\n" + additionalInfo; this.showNotification(2 /* Error */, errorMessage, engine); } catch (ex) { } }; ConsoleWindow.prototype.onListViewToggle = function (item) { var _this = this; var objectItem = item; if (objectItem.isExpandable) { objectItem.getChildren(function (command, args, callback, preMessageCallback) { return _this._bridge.channel.call(objectItem.engine, command, args, callback, preMessageCallback); }, function (children) { _this._listview.addItems(children, item); if (_this._onConsoleUpdated) { _this._onConsoleUpdated(children, item); } }); } }; ConsoleWindow.prototype.copySelectedTextToClipboard = function (selectedText) { var selectedText = selectedText || Common.ToolWindowHelpers.getSelectedText(); if (selectedText) { var compactText = selectedText.replace(/[\r\n]+/g, "\r\n"); clipboardData.setData("Text", compactText); } }; ConsoleWindow.prototype.copyItemToClipboard = function (item) { var text = item.getCopyText(); clipboardData.setData("Text", text); }; ConsoleWindow.prototype.copyAll = function () { var _this = this; var text = this._groupStack[0].getCopyText("", function (item) { return _this.notificationFilter(item); }, true); clipboardData.setData("Text", text); }; ConsoleWindow.prototype.evaluateItemAsType = function (item, viewType) { var _this = this; return item.evaluateAsType(function (command, args, callback, preMessageCallback) { return _this._bridge.channel.call(item.engine, command, args, callback, preMessageCallback); }, viewType, this.onConsoleOutput.bind(this)); }; ConsoleWindow.prototype.addToWatch = function (consoleItem) { if (consoleItem) { var watchExpression = consoleItem.getWatchExpression(); if (watchExpression != undefined) { return Plugin.F12.Debugger.addToWatch(watchExpression); } } }; ConsoleWindow.prototype.hasAddToWatch = function () { return (typeof (Plugin.F12) !== "undefined" && typeof (Plugin.F12.Debugger) !== "undefined" && typeof (Plugin.F12.Debugger.addToWatch) !== "undefined"); }; ConsoleWindow.prototype.processInput = function (command, onCompleteCallback) { Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsConsoleEvalBegin); return this.onInput(command, onCompleteCallback); }; ConsoleWindow.prototype.writeError = function (e, engine) { e.lineNumber += 1; e.columnNumber += 1; if (e.messageId) { e.messageText = e.messageId + ": " + e.messageText; } var notifyObject = { inputId: "-1", engine: engine, notifyType: Common.ObjectView.TreeViewNotifyItem.getNotifyTypeString(2 /* Error */), message: { messageId: e.messageId, message: e.messageText, fileUrl: e.fileUrl, lineNumber: e.lineNumber, columnNumber: e.columnNumber } }; this.onConsoleNotification(notifyObject, engine); }; ConsoleWindow.prototype.toggleFilter = function (filterIndex, displayAllShouldDefaultToOn) { if ((typeof displayAllShouldDefaultToOn) !== "boolean") { displayAllShouldDefaultToOn = false; } if (filterIndex === Common.ObjectView.TreeViewUtils.ConsoleFilterId.all) { var onCount = (this._model.notificationFilters.errors ? 1 : 0) + (this._model.notificationFilters.warnings ? 1 : 0) + (this._model.notificationFilters.messages ? 1 : 0) + (this._model.notificationFilters.log ? 1 : 0); if (onCount === 4 || (onCount > 0 && !displayAllShouldDefaultToOn)) { this._model.notificationFilters.errors = false; this._model.notificationFilters.warnings = false; this._model.notificationFilters.messages = false; this._model.notificationFilters.log = false; } else { this._model.notificationFilters.errors = true; this._model.notificationFilters.warnings = true; this._model.notificationFilters.messages = true; this._model.notificationFilters.log = true; } this.resetFilter(); } else { switch (filterIndex) { case Common.ObjectView.TreeViewUtils.ConsoleFilterId.error: this._model.notificationFilters.errors = !this._model.notificationFilters.errors; break; case Common.ObjectView.TreeViewUtils.ConsoleFilterId.warning: this._model.notificationFilters.warnings = !this._model.notificationFilters.warnings; break; case Common.ObjectView.TreeViewUtils.ConsoleFilterId.message: this._model.notificationFilters.messages = !this._model.notificationFilters.messages; break; case Common.ObjectView.TreeViewUtils.ConsoleFilterId.log: this._model.notificationFilters.log = !this._model.notificationFilters.log; break; default: return; } } }; ConsoleWindow.prototype.clear = function () { this.onClearHost(); this._inputControl.focusOnInput(); }; ConsoleWindow.prototype.onConsoleBeforeMenuLoaded = function () { this.traceWriter.raiseEvent(417 /* Console_Context_Menu_Loading_Start */); }; ConsoleWindow.prototype.onConsoleMenuLoaded = function () { this.traceWriter.raiseEvent(418 /* Console_Context_Menu_Loading_Stop */); }; ConsoleWindow.prototype.fireBuildListBoxStartEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(421 /* Console_Intellisense_ListBox_Build_Start */, etwKey); }; ConsoleWindow.prototype.fireBuildListBoxEndEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(422 /* Console_Intellisense_ListBox_Build_Stop */, etwKey); }; ConsoleWindow.prototype.fireResetListBoxStartEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(423 /* Console_Intellisense_ListBox_Reset_Start */, etwKey); }; ConsoleWindow.prototype.fireResetListBoxEndEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(424 /* Console_Intellisense_ListBox_Reset_Stop */, etwKey); }; ConsoleWindow.prototype.fireSetFilterStartEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(425 /* Console_Intellisense_Menu_Filter_Start */, etwKey); }; ConsoleWindow.prototype.fireSetFilterEndEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(426 /* Console_Intellisense_Menu_Filter_Stop */, etwKey); }; ConsoleWindow.prototype.fireUpdateLayoutStartEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(427 /* Console_Intellisense_Menu_Layout_Start */, etwKey); }; ConsoleWindow.prototype.fireUpdateLayoutEndEvent = function (etwKey) { this.traceWriter.raiseEventWithKey(428 /* Console_Intellisense_Menu_Layout_Stop */, etwKey); }; ConsoleWindow.prototype.expandMultiLineItem = function (item) { this.traceWriter.raiseEvent(415 /* Console_HtmlLines_Expand_Start */); if (item instanceof Common.ObjectView.TreeViewItem) { var expanded = item.expandLines(); if (expanded) { this._listview.updateItemLines(item, 1); } } this.traceWriter.raiseEvent(416 /* Console_HtmlLines_Expand_Stop */); }; ConsoleWindow.prototype.enableClearOnNavigate = function (enabled) { this._model.shouldClearOnNavigate = enabled; }; ConsoleWindow.prototype.invokeInputBoxContextMenu = function (menuId) { this._inputControl.invokeContextMenu(menuId, { id: menuId }); }; ConsoleWindow.prototype.initialize = function () { var _this = this; this._toolbar = new Common.Controls.ToolbarControl("Console.consoleToolbarTemplate"); this._toolbar.title = Plugin.Resources.getString("ConsoleToolLabelText"); this._toolbar.model = this._model; this._toolbar.panelTemplateId = "Console.consoleButtonsPanel"; document.getElementById("toolbar").appendChild(this._toolbar.rootElement); this._warningSection = document.getElementById("warningSection"); this._toolbar.addClickHandlerToButton("clearButton", function (e) { return _this.clear(); }); this._model.notificationFilters.propertyChanged.addHandler(function (propertyName) { return _this.resetFilter(); }); this._isInitialHandshake = true; if (!Plugin.F12) { var toggleButton = document.getElementById("toggleButton"); var errorsButton = this._toolbar.getNamedElement("errorsButton"); toggleButton.addEventListener("keydown", function (e) { if (e.keyCode === 9 /* Tab */ && !e.altKey && !e.ctrlKey && !e.shiftKey) { errorsButton.focus(); e.preventDefault(); return false; } }); errorsButton.addEventListener("keydown", function (e) { if (e.keyCode === 9 /* Tab */ && !e.altKey && !e.ctrlKey && e.shiftKey) { toggleButton.focus(); e.preventDefault(); return false; } }); } document.addEventListener("click", function (e) { if (e.target instanceof HTMLElement) { var target = e.target; if (target.classList.contains("BPT-FileLink")) { _this.openTargetElementFileLink(target); } else if (target.classList.contains("BPT-HelpLink")) { _this.openTargetElementHelpLink(target); } } }, true); document.addEventListener("keydown", function (e) { var handled = false; var target = document.activeElement; if (target) { if (e.keyCode === 112 /* F1 */) { if (_this.handleHelpLinkRequest(target)) { e.preventDefault(); } handled = true; } else if (e.keyCode === 13 /* Enter */) { var fileLink = target.querySelector(".BPT-FileLink"); if (!fileLink && target.nextElementSibling) { fileLink = target.nextElementSibling.querySelector(".BPT-FileLink"); } if (fileLink) { _this.openTargetElementFileLink(fileLink); e.preventDefault(); } handled = true; } } if (!handled && Plugin.F12) { _this.notifyOnKeydown(e); } }, true); if (Plugin.F12) { Plugin.F12.addEventListener("browsershortcut", function (e) { if ((e.ctrlKey && !e.altKey && !e.shiftKey && e.keyCode === 79 /* O */) || (e.ctrlKey && e.shiftKey && !e.altKey && e.keyCode === 80 /* P */)) { _this.notifyOnKeydown(e); return false; } else if (!e.ctrlKey && !e.altKey && !e.shiftKey && e.keyCode === 112 /* F1 */) { var target = document.activeElement; if (target) { return !_this.handleHelpLinkRequest(target); } } else if (e.ctrlKey && !e.altKey && !e.shiftKey && e.keyCode === 76 /* L */) { _this.clear(); return false; } return true; }); } var toolLabelText = Common.ToolWindowHelpers.loadString("ConsoleToolLabelText"); document.getElementById("warningMessageText").innerText = toolLabelText; this.resetFilter(); this._listview.onBeforeRendering = function () { _this.onConsoleBeforeRenderingHandler(); }; this._listview.onRendered = function () { _this.onConsoleRenderedHandler(); }; this._listview.onBeforeItemToggle = function () { _this.onConsoleBeforeItemToggled(); }; this._listview.onItemToggled = function () { _this.onConsoleItemToggled(); }; this._listview.onBeforeScroll = function () { _this.onConsoleBeforeScroll(); }; this._listview.onScrollCompleted = function () { _this.onConsoleScrolled(); }; this._bridge.start(); }; ConsoleWindow.prototype.notifyOnKeydown = function (e) { if (Plugin.F12) { Plugin.F12.notifyOnKeydown(e.keyCode, (e.altKey ? 4 /* Alt */ : 0 /* None */) | (e.ctrlKey ? 2 /* Ctrl */ : 0 /* None */) | (e.shiftKey ? 1 /* Shift */ : 0 /* None */)); } }; ConsoleWindow.prototype.openTargetElementFileLink = function (target) { var url = target.getAttribute("data-linkUrl"); var line = target.getAttribute("data-linkLine"); var col = target.getAttribute("data-linkCol"); var lineNumber = 0; if (line) { lineNumber = parseInt(line, 10); } var colNumber = 0; if (col) { colNumber = parseInt(col, 10); } try { url = decodeURI(url); Plugin.Host.showDocument(url, lineNumber || 1, colNumber || 1); } catch (ex) { } }; ConsoleWindow.prototype.handleHelpLinkRequest = function (target) { var helpLink = target.querySelector(".BPT-HelpLink"); if (helpLink) { this.openTargetElementHelpLink(helpLink); return true; } return false; }; ConsoleWindow.prototype.openTargetElementHelpLink = function (target) { var keyword = target.getAttribute("data-linkKeyword"); this._bridge.openF1HelpLink(keyword); }; ConsoleWindow.prototype.attachButtonEvents = function (button, callback) { button.addEventListener("click", function (e) { callback(e); }); button.addEventListener("keydown", function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { callback(e); e.preventDefault(); } }); }; ConsoleWindow.prototype.onAttach = function (e) { if (!e) { e = { engineId: 0 }; } this.removeTarget(e.engineId); this.traceWriter.raiseEvent(403 /* Console_Attach_Start */); try { this._bridge.channel.loadScript(e.engineId, "../Common/messageThrottle.js"); this._bridge.channel.loadScript(e.engineId, "../Common/isDebugBuild.js"); this._bridge.channel.loadScript(e.engineId, "../Common/assert.js"); this._bridge.channel.loadScript(e.engineId, "../Common/remoteHelpers.js"); this._bridge.channel.loadScript(e.engineId, "../Common/encodingUtilities.js"); this._bridge.channel.loadScript(e.engineId, "../Common/ObjectView/treeViewUtilities.js"); this._bridge.channel.loadScript(e.engineId, "../Common/ObjectView/treeViewRemoteHelpers.js"); this._bridge.channel.loadScript(e.engineId, "../Common/Intellisense/intellisenseRemoteHelpers.js"); this._bridge.channel.loadScript(e.engineId, "remote.js"); this._bridge.channel.loadScript(e.engineId, "remoteMain.js"); } catch (e) { } this.traceWriter.raiseEvent(404 /* Console_Attach_Stop */); }; ConsoleWindow.prototype.onConnect = function (e) { this.addTarget(e.engineId ? e.engineId : 0, e.portName || e.name, { targetId: undefined, targetType: "_top", href: "" }); }; ConsoleWindow.prototype.onDetach = function (e) { if (e) { this.removeTarget(e.engineId ? e.engineId : 0); } }; ConsoleWindow.prototype.onBreak = function () { this.updateTargetView(); if (this.onConsoleBreak) { this.onConsoleBreak(); } }; ConsoleWindow.prototype.onRun = function () { this.updateTargetView(); }; ConsoleWindow.prototype.onLoad = function (e) { var scriptElement = document.createElement("script"); scriptElement.src = e.url; scriptElement.type = "text/javascript"; document.getElementsByTagName("head").item(0).appendChild(scriptElement); }; ConsoleWindow.prototype.handleHandshake = function (message) { if (message.data.substr(0, 10) === "Handshake:") { var connectionInfo = JSON.parse(message.data.substring(10)); this.updateTarget(message.engine.engineId, { targetId: undefined, targetType: "_top", href: connectionInfo.contextInfo }); this.onHandshake(message.engine, connectionInfo); if (Plugin.F12) { Plugin.F12.TraceWriter.markToolReady(); } Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsConsoleReady); if (this._onConsoleReady) { this._onConsoleReady(); } message.handled = true; } }; ConsoleWindow.prototype.createTargetDefaults = function (message) { message.engine.engineId = message.engine.engineId || 0; }; ConsoleWindow.prototype.targetCreated = function (message) { if (message.data.substr(0, 14) === "TargetCreated:") { var targetInfo = JSON.parse(message.data.substring(14)); this.addTarget(message.engine.engineId, message.engine.portName, targetInfo); message.handled = true; } }; ConsoleWindow.prototype.targetUpdated = function (message) { if (message.data.substr(0, 14) === "TargetUpdated:") { var targetInfo = JSON.parse(message.data.substring(14)); this.updateTarget(message.engine.engineId, targetInfo); message.handled = true; } }; ConsoleWindow.prototype.targetClosed = function (message) { if (message.data.substr(0, 13) === "TargetClosed:") { var targetInfo = JSON.parse(message.data.substring(13)); this.removeTarget(message.engine.engineId, message.engine.portName, targetInfo.targetId); message.handled = true; } }; ConsoleWindow.prototype.addTarget = function (engineId, portName, targetInfo) { var target = { engineId: engineId, portName: portName, targetType: targetInfo.targetType, targetId: targetInfo.targetId, href: targetInfo.href }; var targetText = target.targetType + ": " + Common.ToolWindowHelpers.createShortenedUrlText(target.href); this._model.targets.push({ text: targetText, value: JSON.stringify(target), tooltip: target.href, label: targetText + ": " + target.href }); if (this._model.targets.length === 1) { this._currentEngine = target; } var engineSort = function (a, b) { var a1 = JSON.parse(a.value); var b1 = JSON.parse(b.value); if (a1.engineId < b1.engineId) { return -1; } else if (a1.engineId > b1.engineId) { return 1; } else { if (a1.targetType === "_top") { return -1; } if (a1.targetId < b1.targetId) { return -1; } else if (a1.targetId > b1.targetId) { return 1; } else { return 0; } } }; this._model.targets.sort(engineSort); this.updateTargetView(); }; ConsoleWindow.prototype.updateTarget = function (engineId, targetInfo) { for (var i = 0; i < this._model.targets.length; i++) { var engineTarget = JSON.parse(this._model.targets[i].value); if (engineTarget.engineId === engineId && engineTarget.targetType === targetInfo.targetType && engineTarget.targetId === targetInfo.targetId) { engineTarget.href = targetInfo.href; this._model.targets[i].text = engineTarget.targetType + ": " + Common.ToolWindowHelpers.createShortenedUrlText(targetInfo.href); this._model.targets[i].value = JSON.stringify(engineTarget); this._model.targets[i].tooltip = targetInfo.href; this._model.targets[i].label = this._model.targets[i].text + ": " + targetInfo.href; if (this._currentEngine.engineId === engineTarget.engineId && this._currentEngine.targetId === engineTarget.targetId) { this._currentEngine = engineTarget; } break; } } this.updateTargetView(); }; ConsoleWindow.prototype.removeTarget = function (engineId, portName, targetId, clearTop) { if (typeof clearTop === "undefined") { clearTop = true; } for (var i = 0; i < this._model.targets.length;) { var targetEngine = JSON.parse(this._model.targets[i].value); if (targetEngine.engineId === engineId && (!portName || portName === targetEngine.portName) && (!targetId || targetId === targetEngine.targetId) && (clearTop || targetEngine.targetType !== "_top")) { this._model.targets.splice(i, 1); this.listView.markItemsAsStale(targetEngine); } else { i++; } } if (this._model.targets.length === 0) { this._currentEngine = null; } else if (this._currentEngine.engineId === engineId && (!portName || this._currentEngine.targetId === targetId)) { this._currentEngine = JSON.parse(this._model.targets[0].value); } this.updateTargetView(); }; ConsoleWindow.prototype.targetChanged = function (message) { if (message.data.substr(0, 14) === "TargetChanged:") { var targetInfo = JSON.parse(message.data.substring(14)); for (var i = 0; i < this._model.targets.length; i++) { var engine = JSON.parse(this._model.targets[i].value); if (engine.engineId === message.engine.engineId && (targetInfo.targetId === engine.targetId)) { this._currentEngine = engine; break; } } this.updateTargetView(); message.handled = true; } }; ConsoleWindow.prototype.targetsCleared = function (message) { if (message.data === "ClearTargets") { this.removeTarget(message.engine.engineId, null, null, false); message.handled = true; } }; ConsoleWindow.prototype.onHandshake = function (engine, connectionInfo) { var _this = this; if (this._isInitialHandshake) { this._isInitialHandshake = false; } this._bridge.channel.call(engine, "registerConsoleCallbacks", [ function (outputObj, engine) { return _this.onConsoleOutput(outputObj, engine); }, function (notifyObject, engine) { return _this.onConsoleNotification(notifyObject, engine); }, function (engine) { return _this.onRemoteCleared(); } ]); this._inputControl.enable(); this._warningSection.style.display = "none"; this._outputList.style.height = "100%"; if (connectionInfo.docMode < 9) { document.getElementById("warningMessageText").innerText = Common.ToolWindowHelpers.loadString("ConsoleUnsupportedDocumentModeError", [connectionInfo.docMode]); this._warningSection.style.display = "block"; this._outputList.style.height = "calc(100% - " + this._warningSection.clientHeight + "px)"; } this._docMode = connectionInfo.docMode; this._contextInfo = connectionInfo.contextInfo; }; ConsoleWindow.prototype.addItemToListView = function (item, linkedTo, linkAsSibling) { var currentGroup = this._groupStack[this._groupStack.length - 1]; if (this._groupStack.length === 1 || this._listview.isItemExpanded(currentGroup) || currentGroup.isFirstUIChildNeeded()) { if (linkedTo && currentGroup.isItemInGroup(linkedTo)) { this._listview.addItems([item], linkedTo, linkAsSibling); } else { this._listview.addItems([item], currentGroup, false, true); } if (this._listview.isAutoScrollToItemEnabled(item)) { this._listview.selectItem(item, false); this._listview.scrollToBottom(); } } if (linkAsSibling && linkedTo) { currentGroup.addChild(item, linkedTo); } else { currentGroup.addChild(item); } this._model.listViewItemCount++; if (this._onConsoleUpdated) { this._onConsoleUpdated([item], linkedTo); } }; ConsoleWindow.prototype.updateTargetView = function () { if (this.atBreakpoint) { var breakpointMessage = { value: "breakpoint", text: Common.ToolWindowHelpers.loadString("PausedAtABreakpoint") }; this._model.targetsModel.resetItems([breakpointMessage]); this._model.currentTarget = this._model.targetsModel.getItem(0).value; this._model.canSelectTargets = false; } else { this._model.targetsModel.resetItems(this._model.targets); this._model.currentTarget = this._currentEngine ? JSON.stringify(this._currentEngine) : ""; if (this._model.targets.length > 0) { this._model.canSelectTargets = true; this._inputControl.enable(); } else { this._model.canSelectTargets = false; this._inputControl.disable(); } } }; ConsoleWindow.prototype.onInput = function (command, onCompleteCallback) { if (!this._currentEngine) { this.showNotification(5 /* Warn */, Common.ToolWindowHelpers.loadString("NotAttached"), null); return -1; } if ((typeof command) !== "string") { return -1; } if (command && (/\S/).test(command)) { if (command === "console.test_exception") { throw "Test Exception"; } this.traceWriter.raiseEvent(407 /* Console_Input_Start */); var inputItem = new Common.ObjectView.TreeViewInputItem(command, onCompleteCallback); this._inputItemsMap[inputItem.id] = inputItem; this.addItemToListView(inputItem); window.msWriteProfilerMark("ConsoleWindow:BeginPostInput"); if (this._breakpointState.atBreakpoint) { this._bridge.channel.executeBreakModeCommand(this._currentEngine, "processInput", inputItem.consoleItemId, command, this._consoleOutputCallback); } else { this._bridge.channel.call(this._currentEngine, "processInput", [inputItem.id, command], this._consoleOutputCallback); } window.msWriteProfilerMark("ConsoleWindow:EndPostInput"); this.traceWriter.raiseEvent(408 /* Console_Input_Stop */); return inputItem.consoleItemId; } return -1; }; ConsoleWindow.prototype.onOutput = function (item) { if (!item) { return; } this.traceWriter.raiseEvent(409 /* Console_Output_Start */); var matchingInputItem = null; if (this._inputItemsMap.hasOwnProperty(item.matchingInputId)) { matchingInputItem = this._inputItemsMap[item.matchingInputId]; } this.addItemToListView(item, matchingInputItem, true); if (matchingInputItem) { matchingInputItem.executeCallback(item); } Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsConsoleEvalEnd); this.traceWriter.raiseEvent(410 /* Console_Output_Stop */); }; ConsoleWindow.prototype.onConsoleOutput = function (outputObject, engine) { if (!outputObject) { this.showNotification(2 /* Error */, Common.ToolWindowHelpers.loadString("ConsoleObjectNotFoundError"), engine); return; } var targetEngine = this.getTargetEngine(engine, outputObject.targetId); if (Plugin.F12) { Plugin.F12.Communications.fireEvent("consoleOutput", Plugin.F12.PluginId.Debugger); } var matchingInputItem; var watchExpression; if (outputObject.inputId && this._inputItemsMap.hasOwnProperty(outputObject.inputId)) { matchingInputItem = this._inputItemsMap[outputObject.inputId]; watchExpression = "(" + matchingInputItem.getWatchExpression() + ")"; } var outputItem; if (outputObject.detailedType !== "htmlElement") { outputItem = new Common.ObjectView.TreeViewObjectItem(outputObject, targetEngine, null, watchExpression); } else { outputItem = new Common.ObjectView.TreeViewHtmlItem(outputObject, targetEngine, null, null, null, null, watchExpression); } this.onOutput(outputItem); }; ConsoleWindow.prototype.getTargetEngine = function (engine, targetId) { for (var i = 0; i < this._model.targets.length; i++) { var targetEngine = JSON.parse(this._model.targets[i].value); if (targetEngine.engineId === engine.engineId && targetId === targetEngine.targetId) { return targetEngine; } } return engine; }; ConsoleWindow.prototype.onConsoleNotification = function (notifyObject, engine) { if (engine) { notifyObject.engine = this.getTargetEngine(engine, notifyObject.message.targetId); } if (notifyObject.notifyType === Common.ObjectView.TreeViewUtils.ConsoleNotifyType.internalMessage) { switch (notifyObject.message.key) { case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.startGroup: this.startGroup(notifyObject.message.name); break; case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.startGroupCollapsed: this.startGroup(notifyObject.message.name, true); break; case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.endGroup: this.endGroup(); break; case Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.displayTraceStyles: this.displayTraceStyles(notifyObject.message.viewableObject); break; } } else if (notifyObject.notifyType === "count") { this.addOrUpdateCountItem(notifyObject); } else { var notifyItem; if (notifyObject && notifyObject.message && notifyObject.message.viewableObject && notifyObject.message.viewableObject.length === 1 && notifyObject.message.viewableObject[0].detailedType === "htmlElement") { var notifyType = Common.ObjectView.TreeViewNotifyItem.parseNotifyTypeString(notifyObject.notifyType); notifyItem = new Common.ObjectView.TreeViewHtmlItem(notifyObject.message.viewableObject[0], notifyObject.engine, null, null, notifyType, true); } else { notifyItem = new Common.ObjectView.TreeViewNotifyItem(notifyObject); } switch (notifyItem.notifyType) { case 1 /* Assert */: case 2 /* Error */: this._model.notificationCounts.errors++; break; case 3 /* Info */: this._model.notificationCounts.messages++; break; case 5 /* Warn */: this._model.notificationCounts.warnings++; break; } this.onOutput(notifyItem); } }; ConsoleWindow.prototype.addOrUpdateCountItem = function (notifyObject) { var newCountItem = new Common.ObjectView.TreeViewCountItem(notifyObject); var targetId; if (notifyObject.engine && notifyObject.engine) { targetId = notifyObject.engine.engineId.toString(); } else { targetId = "__DefaultTarget__"; } var name = notifyObject.message.name; if (name === undefined || name === null) { name = "__DefaultCounterIndex__"; } var targetCountItemMap; if (!this._countItemsMap) { this._countItemsMap = {}; } if (this._countItemsMap.hasOwnProperty(targetId)) { targetCountItemMap = this._countItemsMap[targetId]; } else { targetCountItemMap = this._countItemsMap[targetId] = {}; } if (targetCountItemMap.hasOwnProperty(name)) { targetCountItemMap[name].value = newCountItem.value; this._listview.refresh(); if (this._onConsoleUpdated) { this._onConsoleUpdated([targetCountItemMap[name]]); } } else { targetCountItemMap[name] = newCountItem; this.onOutput(newCountItem); } }; ConsoleWindow.prototype.onClearHost = function (clearOutput, engine) { if (typeof clearOutput === "undefined") { clearOutput = true; } if (typeof engine === "undefined") { engine = null; } if (clearOutput) { this._listview.clear(); this._inputItemsMap = {}; this._groupStack = [new Common.ObjectView.TreeViewGroupItem()]; this._countItemsMap = {}; this._model.listViewItemCount = 0; this._model.notificationCounts.errors = 0; this._model.notificationCounts.warnings = 0; this._model.notificationCounts.messages = 0; } else { this.listView.markItemsAsStale(engine); var separator = new Common.ObjectView.TreeViewSeparatorItem(); this.addItemToListView(separator); } if (engine && !clearOutput) { this._bridge.channel.call(engine, "clearConsoleData"); delete this._countItemsMap[engine.engineId.toString()]; } else { var engineId = -1; for (var i = 0; i < this._model.targets.length; i++) { var engineCurrent = JSON.parse(this._model.targets[i].value); if (engineCurrent.engineId !== engineId) { this._bridge.channel.call(engineCurrent, "clearConsoleData"); engineId = engineCurrent.engineId; } } } }; ConsoleWindow.prototype.onRemoteCleared = function () { this.onClearHost(); }; ConsoleWindow.prototype.clearOnNavigate = function (message) { if (message.data === "ClearOnNavigate") { var ignoreClearRequestFromEmptyTarget = false; if (this._currentEngine.engineId !== message.engine.engineId) { var isTargetEmpty = function (item) { var currentTarget = JSON.parse(item.value); return message.engine.engineId === currentTarget.engineId && currentTarget.href === "about:blank" && currentTarget.targetType === "_top"; }; var emptyTargets = this._model.targets.filter(isTargetEmpty); ignoreClearRequestFromEmptyTarget = emptyTargets && emptyTargets.length === 1; } this.onClearHost(this._model.shouldClearOnNavigate && !ignoreClearRequestFromEmptyTarget, message.engine); message.handled = true; } }; ConsoleWindow.prototype.onListViewClick = function (item, row, cell) { if (cell.classList.contains("Console-ExpandableLines") || cell.classList.contains("Console-ExpandableString")) { this.expandMultiLineItem(item); } }; ConsoleWindow.prototype.startGroup = function (title, isCollapsed) { var currentGroup = this._groupStack[this._groupStack.length - 1]; if (this._groupStack.length > 1 && !this._listview.isItemExpanded(currentGroup)) { isCollapsed = true; } var newGroup = new Common.ObjectView.TreeViewGroupItem(title, isCollapsed); this.addItemToListView(newGroup, currentGroup); this._groupStack.push(newGroup); }; ConsoleWindow.prototype.endGroup = function () { if (this._groupStack.length > 1) { this._groupStack.pop(); } }; ConsoleWindow.prototype.displayTraceStyles = function (styles) { var outputItem = new Common.ObjectView.TreeViewTraceStylesItem({ inputId: "-1", isExpandable: (styles && styles.length > 0), consoleType: "consoleItemOutput", detailedType: "object", isHtmlViewableType: false, name: "", value: styles, uid: "0" }); this.onOutput(outputItem); }; ConsoleWindow.prototype.showNotification = function (type, message, engine) { var notifyObject = { inputId: "-1", engine: null, notifyType: Common.ObjectView.TreeViewNotifyItem.getNotifyTypeString(type), message: message }; this.onConsoleNotification(notifyObject, engine); }; ConsoleWindow.prototype.resetFilter = function () { var _this = this; this._listview.setFilter(function (item) { return _this.notificationFilter(item); }); }; ConsoleWindow.prototype.onTargetEngineChanged = function (engine, doneCallback) { try { if (engine && engine !== "breakpoint") { var engineValue = JSON.parse(engine); if (this._currentEngine.engineId !== engineValue.engineId || this._currentEngine.targetId !== engineValue.targetId || this._currentEngine.targetType !== engineValue.targetType) { this._currentEngine = engineValue; this.updateTargetView(); this._bridge.channel.call(this._currentEngine, "switchTarget", [this._currentEngine.targetId, this._currentEngine.targetType]); } } } catch (e) { } if (doneCallback) { doneCallback(); } }; ConsoleWindow.prototype.notificationFilter = function (item) { if (item instanceof Common.ObjectView.TreeViewItem) { var consoleItem = item; if ((consoleItem.notifyType === 2 /* Error */ && !this._model.notificationFilters.errors) || (consoleItem.notifyType === 1 /* Assert */ && !this._model.notificationFilters.errors) || (consoleItem.notifyType === 5 /* Warn */ && !this._model.notificationFilters.warnings) || (consoleItem.notifyType === 3 /* Info */ && !this._model.notificationFilters.messages) || (consoleItem.notifyType === 4 /* Log */ && !this._model.notificationFilters.log)) { return false; } } return true; }; ConsoleWindow.prototype.onConsoleBeforeRenderingHandler = function () { this.traceWriter.raiseEvent(411 /* Console_Output_Render_Start */); if (this._onConsoleBeforeRendering) { this._onConsoleBeforeRendering(); } }; ConsoleWindow.prototype.onConsoleRenderedHandler = function () { this.traceWriter.raiseEvent(412 /* Console_Output_Render_Stop */); if (this._onConsoleRendered) { this._onConsoleRendered(); } }; ConsoleWindow.prototype.onConsoleBeforeItemToggled = function () { this.traceWriter.raiseEvent(413 /* Console_Item_Toggle_Start */); }; ConsoleWindow.prototype.onConsoleItemToggled = function () { this.traceWriter.raiseEvent(414 /* Console_Item_Toggle_Stop */); }; ConsoleWindow.prototype.onConsoleBeforeScroll = function () { this.traceWriter.raiseEvent(419 /* Console_Scroll_Start */); }; ConsoleWindow.prototype.onConsoleScrolled = function () { this.traceWriter.raiseEvent(420 /* Console_Scroll_Stop */); }; ConsoleWindow.prototype.onConsoleNotificationCountsChanged = function (propertyName) { if (propertyName === "errors") { Plugin.F12.Header.notifyConsoleErrorsUpdated(this._model.notificationCounts.errors); } }; return ConsoleWindow; })(); Console.ConsoleWindow = ConsoleWindow; })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // app.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { var ConsoleApp = (function () { function ConsoleApp() { } ConsoleApp.prototype.main = function () { var _this = this; Plugin.addEventListener("pluginready", function () { var traceWriter = new Common.TraceWriter(); var bridge; if (Plugin) { if (Plugin.Tooltip) { Plugin.Tooltip.defaultTooltipContentToHTML = false; } if (Plugin.F12) { bridge = new Console.IEBridge(Plugin.F12, window.external, traceWriter); } else if (Plugin.VS) { bridge = new Console.VSBridge(Plugin.VS, traceWriter); } } if (document.documentMode < 10) { window.navigate("about:blank"); return; } _this.console = new Console.ConsoleWindow(bridge, traceWriter); if (_this.onConsoleAppLoaded) { _this.onConsoleAppLoaded(); } }); }; return ConsoleApp; })(); Console.ConsoleApp = ConsoleApp; Console.App = new ConsoleApp(); })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); { "start_url": "console/console.html", "domain": "http://microsoft.com", "name":"Console", "version":"1.0", "f12": { "start_url": "console.html", "localized_tab_resource": "ConsoleToolLabelText", "localized_tooltip_id": 813, "resource_aliases" : { "Common": { "is_default" : true } }, "themed_images": { "plugin-console-image-icon-input": { "bitmap_source": "images\\i_console-input.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-error": { "bitmap_source": "images\\i_error.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-info": { "bitmap_source": "images\\i_info.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-warning": { "bitmap_source": "..\\Common\\images\\i_warning.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-multi": { "bitmap_source": "images\\i_toggle-multi.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-single": { "bitmap_source": "images\\i_toggle-single.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-clear": { "bitmap_source": "..\\Common\\images\\i_delete.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-clear-on-navigate": { "bitmap_source": "images\\i_clear-on-navigate.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-info": { "bitmap_source": "images\\i_info.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-warn": { "bitmap_source": "..\\Common\\images\\i_warning.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-error": { "bitmap_source": "images\\i_error.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-execute": { "bitmap_source": "images\\i_execute.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-clear-input": { "bitmap_source": "images\\i_clear-input.png", "background_color": "plugin-font-console-background-color" }, "plugin-image-icon-item-collapsed": { "bitmap_source": "..\\Common\\images\\itemCollapsedIcon.png", "background_color": "plugin-font-console-background-color" }, "plugin-image-icon-item-expanded": { "bitmap_source": "..\\Common\\images\\itemExpandedIcon.png", "background_color": "plugin-font-console-background-color" } } }, "vs": { "resource_aliases" : { "Common": { "type" : "Embedded", "name" : "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost", "path" : "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Resources", "is_default" : true } }, "theme_token_aliases": { "plugin-font-console-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Plain Text" }, "plugin-font-console-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Plain Text" }, "plugin-font-console-input-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Input Text" }, "plugin-font-console-input-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Input Text" }, "plugin-font-console-inputarea-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Input Text" }, "plugin-font-console-inputarea-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Input Text" }, "plugin-font-console-output-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Output Text" }, "plugin-font-console-output-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Output Text" }, "plugin-font-console-error-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Error Text" }, "plugin-font-console-error-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Error Text" }, "plugin-font-console-info-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Info Text" }, "plugin-font-console-info-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Info Text" }, "plugin-font-console-warning-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Warning Text" }, "plugin-font-console-warning-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Warning Text" }, "plugin-font-editor-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Plain Text" }, "plugin-font-editor-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Plain Text" }, "plugin-font-editor-keyword-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "Keyword" }, "plugin-font-editor-keyword-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "Keyword" }, "plugin-font-editor-string-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "String" }, "plugin-font-editor-string-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "String" }, "plugin-font-editor-number-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "Number" }, "plugin-font-editor-number-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "Number" }, "plugin-font-editor-symbol-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "SymbolDefinitionClassificationFormat" }, "plugin-font-editor-symbol-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "SymbolDefinitionClassificationFormat" }, "plugin-font-editor-html-tag-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Tag Delimiter" }, "plugin-font-editor-html-tag-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Tag Delimiter" }, "plugin-font-editor-html-element-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Element Name" }, "plugin-font-editor-html-element-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Element Name" }, "plugin-font-editor-html-comment-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Comment" }, "plugin-font-editor-html-comment-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Comment" }, "plugin-font-editor-html-attribute-name-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Attribute" }, "plugin-font-editor-html-attribute-name-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Attribute" }, "plugin-font-editor-html-attribute-value-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Attribute Value" }, "plugin-font-editor-html-attribute-value-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Attribute Value" }, "plugin-font-editor-html-operator-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Operator" }, "plugin-font-editor-html-operator-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Operator" }, "plugin-font-editor-css-name-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CSS Property Name" }, "plugin-font-editor-css-name-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "CSS Property Name" }, "plugin-font-editor-css-value-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CSS Property Value" }, "plugin-font-editor-css-value-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "CSS Property Value" }, "plugin-font-editor-css-selector-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CSS Selector" }, "plugin-font-editor-css-selector-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "CSS Selector" }, "plugin-font-editor-inactive-selected-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "Inactive Selected Text" }, "plugin-font-editor-selected-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "Selected Text" }, "plugin-font-editor-selected-border-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "outlining.collapsehintadornment" }, "plugin-environment-background-gradient-begin": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "EnvironmentBackgroundGradientBegin" }, "plugin-filetab-hot-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabHotText" }, "plugin-filetab-inactive-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabInactiveText" }, "plugin-filetab-inactive-gradient-top-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabInactiveGradientTop" }, "plugin-filetab-hot-gradient-top-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabHotGradientTop" }, "plugin-filetab-selected-gradient-top-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabSelectedGradientTop" }, "plugin-filetab-selected-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabSelectedText" }, "plugin-commandbar-gradient-begin-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarGradientBegin" }, "plugin-vertical-resize-grip-middle-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "VerticalResizeGripMiddle" }, "plugin-font-current-line-active-format-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CurrentLineActiveFormat" }, "plugin-font-current-line-inactive-format-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CurrentLineInactiveFormat" }, "plugin-font-editor-current-statement-background-color": { "category": "ff349800-ea43-46c1-8c98-878e78f46501", "key_type": "BackgroundColor", "name": "Current Statement" }, "plugin-font-editor-current-statement-color": { "category": "ff349800-ea43-46c1-8c98-878e78f46501", "key_type": "ForegroundColor", "name": "Current Statement" }, "plugin-perftools-grid-column-sizer": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "GridLine" }, "f12-intellisense-hover-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "MenuText" }, "f12-intellisense-hover-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "Menu" }, "f12-intellisense-checked-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "HighlightText" }, "f12-intellisense-checked-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "Highlight" }, "vs-horizontal-resize-grip-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "HorizontalResizeGrip" }, "f12-toolbar-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarGradientBegin" }, "f12-toolbar-button-selected-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarSelected" }, "f12-toolbar-button-selected-border-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarSelectedBorder" }, "f12-toolbar-button-selected-text-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarTextSelected" }, "f12-toolbar-button-hover-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseOverBackgroundBegin" }, "f12-toolbar-button-hover-text-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarTextHover" }, "f12-toolbar-button-border-hover-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarBorder" }, "f12-toolbar-button-pressed-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBackgroundBegin" } }, "themed_images": { "plugin-console-image-icon-input": { "bitmap_source": "console/images/i_console-input.png", "background_color": "plugin-font-console-inputarea-background-color" }, "plugin-console-image-icon-critical": { "bitmap_source": "common/images/critical.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-info": { "bitmap_source": "console/images/info.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-warning": { "bitmap_source": "console/images/warning.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-multi-24x": { "bitmap_source": "console/images/CollapseMultiline_24x.png", "background_color": "plugin-font-console-inputarea-background-color" }, "plugin-console-image-icon-button-single-24x": { "bitmap_source": "console/images/CollapseSingle_24x.png", "background_color": "plugin-font-console-inputarea-background-color" }, "plugin-console-image-icon-button-delete-32x": { "bitmap_source": "console/images/Delete_32x.png", "background_color": "f12-toolbar-background-color" }, "plugin-console-image-icon-button-delete-disabled-32x": { "bitmap_source": "console/images/DeleteDisabled_32x.png", "background_color": "f12-toolbar-background-color" }, "plugin-console-image-icon-button-clear-on-navigate-16x": { "bitmap_source": "console/images/i_clear-on-navigate_16x.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-info": { "bitmap_source": "console/images/info.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-warning": { "bitmap_source": "console/images/warning.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-button-critical": { "bitmap_source": "common/images/critical.png", "background_color": "plugin-font-console-background-color" }, "plugin-image-icon-item-collapsed": { "bitmap_source": "common/images/itemCollapsedIcon.png", "background_color": "plugin-background-color" }, "plugin-image-icon-item-expanded": { "bitmap_source": "common/images/itemExpandedIcon.png", "background_color": "plugin-background-color" }, "plugin-console-image-icon-button-run-24x": { "bitmap_source": "console/images/Run_24x.png", "background_color": "plugin-font-console-inputarea-background-color" }, "plugin-console-image-icon-button-delete-24x": { "bitmap_source": "console/images/Delete_24x.png", "background_color": "plugin-font-console-inputarea-background-color" }, "plugin-console-image-icon-critical-disabled": { "bitmap_source": "console/images/critical_disabled_16x.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-warning-disabled": { "bitmap_source": "console/images/warning_disabled_16x.png", "background_color": "plugin-font-console-background-color" }, "plugin-console-image-icon-information-disabled": { "bitmap_source": "console/images/information_disabled_16x.png", "background_color": "plugin-font-console-background-color" } } }, "file_aliases": { "PerformanceTraceExtension": { "path": "PerformanceTrace.dll", "optional": true } } } var F12; (function (F12) { "use strict"; (function (Tools) { (function (Console) { var RemoteCode = (function () { function RemoteCode() { this._defaultTimerName = "default"; this._defaultTimeStampName = "timestamp"; this._consoleTimers = {}; this._consoleCounters = {}; this._consoleDefaultCounter = 0; this._messagesInCurrentInterval = 0; this.consoleNotificationQueue = []; this.currentWindowContext = null; this.frames = {}; this.resultMap = {}; } Object.defineProperty(RemoteCode.prototype, "suppressPostCode", { get: function () { return "suppressOutput-{9724EC8B-E0A8-4B3B-94CB-AB1F31CB47DB}"; }, enumerable: true, configurable: true }); RemoteCode.getInstance = function () { return remoteCode; }; RemoteCode.prototype.initialize = function () { if (typeof browser !== "undefined") { Common.RemoteHelpers.addListener(browser, "beforeScriptExecute", remoteCode.onBeforeScriptExecute); Common.RemoteHelpers.addListener(browser, "consoleMessage", function (e) { remoteCode.onConsoleMessage(e.source, e.level, e.messageId, e.messageText, e.fileUrl, e.line, e.column); }); } remoteHelpers.initialize("ConsolePort", remoteCode.initializePage, "__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC"); this.initializeWebWorkers(); }; RemoteCode.prototype.clearTargets = function () { remoteCode.frames = {}; remoteHelpers.port.postMessage("ClearTargets"); }; RemoteCode.prototype.callInvoker = function (win, input) { if (!win.execScript) { var evalString = win.eval.toString(); if (evalString !== "\nfunction eval() {\n [native code]\n}\n" && remoteCode.notifyCallback) { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error, { localizeId: "ModifiedEvalFunction" }); remoteHelpers.isEvalModified = true; } } var returnValue = { result: undefined, isError: false }; var inlineConsole = []; try { if ((typeof win.cd) === "undefined") { win.cd = win.console.cd; inlineConsole.push({ name: "cd", func: win.console.cd }); } if ((typeof win.dir) === "undefined") { win.dir = win.console.dir; inlineConsole.push({ name: "dir", func: win.console.dir }); } if ((typeof win.select) === "undefined") { win.select = win.console.select; inlineConsole.push({ name: "select", func: win.console.select }); } if ((typeof win.$) === "undefined") { win.$ = win.__BROWSERTOOLS_CONSOLE.$; inlineConsole.push({ name: "$", func: win.$ }); } if ((typeof win.$$) === "undefined") { win.$$ = win.__BROWSERTOOLS_CONSOLE.$$; inlineConsole.push({ name: "$$", func: win.$$ }); } var escapedInput = JSON.stringify(input).slice(1, -1); try { returnValue.result = browser.executeScript(escapedInput + Common.RemoteHelpers.getJMCScriptUrl("console"), win); if (win.$_ === win.__BROWSERTOOLS_CONSOLE.$_ || (isNaN(win.$_) && isNaN(win.__BROWSERTOOLS_CONSOLE.$_))) { win.__BROWSERTOOLS_CONSOLE.$_ = win.$_ = returnValue.result; } else { delete win.__BROWSERTOOLS_CONSOLE.$_; } } catch (e) { returnValue.result = win.document.__IE_DEVTOOLBAR_CONSOLE_EVAL_RESULT; returnValue.isError = true; } } catch (invokerEx) { returnValue = { result: undefined, isError: false }; } for (var i = 0; i < inlineConsole.length; i++) { if (win[inlineConsole[i].name] === inlineConsole[i].func) { if (Common.RemoteHelpers.getDocumentMode() < 9) { win[inlineConsole[i].name] = undefined; } else { delete win[inlineConsole[i].name]; } } } return returnValue; }; RemoteCode.prototype.onConsoleFunc = function (functionId, data, postMessageImmediately) { var _this = this; if (this._messagesInCurrentInterval === 0) { setTimeout(function () { return _this._messagesInCurrentInterval = 0; }, RemoteCode.MessageThrottleInterval); } this._messagesInCurrentInterval++; if (this._messagesInCurrentInterval > RemoteCode.MaxMessagesPerInterval) { if (this._messagesInCurrentInterval === RemoteCode.MaxMessagesPerInterval + 1) { remoteCode.notifyCallback({ notifyType: Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn, message: { localizeId: "ConsoleScriptError" } }, null, true); } return; } switch (functionId) { case "cd": remoteCode.cd(data.obj); break; case "clear": if (remoteCode.clearCallback) { remoteCode.reset(); remoteCode.clearCallback(); } break; case "dir": if (remoteCode.outputCallback) { var returnObj = remoteCode.createOutputObject(-1, data); if (returnObj.detailedType !== "undefined") { remoteCode.outputCallback(returnObj); } } break; case "dirxml": if (remoteCode.outputCallback) { var htmlTypeName = remoteCode.getHtmlViewableTypeName(data); if (htmlTypeName !== null) { var returnObj = remoteCode.createOutputHtmlElement(-1, data, htmlTypeName); } else { var returnObj = remoteCode.createOutputObject(-1, data); } if (returnObj.detailedType !== "undefined") { remoteCode.outputCallback(returnObj); } } break; default: if (!remoteCode.notifyCallback) { remoteCode.consoleNotificationQueue.push({ functionId: functionId, data: data }); } else { remoteCode.notifyCallback({ notifyType: functionId, message: data }, null, postMessageImmediately); } break; } }; RemoteCode.prototype.cd = function (targetFrame) { if (remoteCode.notifyCallback) { try { var iframe; if (!targetFrame) { iframe = browser.document.parentWindow; remoteHelpers.port.postMessage("TargetChanged:" + JSON.stringify({ targetType: "_top" })); } else { var result = Common.RemoteHelpers.getValidWindow(remoteCode.currentWindowContext, targetFrame); if (result.isValid) { iframe = result.window; for (var key in remoteCode.frames) { if (remoteCode.frames[key] === iframe) { remoteHelpers.port.postMessage("TargetChanged:" + JSON.stringify({ targetType: "Frame", targetId: key })); break; } } } else { iframe = remoteCode.currentWindowContext; } } remoteCode.currentWindowContext = iframe; var newWindowContext = iframe.location.href; var newWindowText = iframe.location.hostname + iframe.location.pathname; newWindowText = String.prototype.replace.call(newWindowText, /\/$/, ""); remoteCode.notifyCallback({ notifyType: "consoleItemCDContext", message: newWindowText, contextInfo: newWindowContext }); } catch (e) { remoteCode.notifyCallback({ notifyType: Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error, message: (e.message || e.description) }); } } }; RemoteCode.prototype.getHtmlViewableTypeName = function (obj) { remoteCode.ensureConstructorsAreAvailable(); if (remoteCode.constructors && Common.RemoteHelpers.getDocumentMode() >= 9) { for (var i = 0; i < remoteCode.constructors.length; i++) { try { if (remoteCode.constructors[i].htmlElement && (obj instanceof remoteCode.constructors[i].htmlElement)) { try { var id = obj.id; } catch (e) { return null; } return "HtmlElement"; } else if (remoteCode.constructors[i].htmlNode && (obj instanceof remoteCode.constructors[i].htmlNode)) { var nodeType; try { nodeType = obj.nodeType; } catch (e) { return null; } if (nodeType === obj.DOCUMENT_NODE) { return "DocumentNode"; } else if (nodeType === obj.ATTRIBUTE_NODE) { return "AttributeNode"; } else { return "HtmlNode"; } } else if (remoteCode.constructors[i].nodeList && (obj instanceof remoteCode.constructors[i].nodeList)) { return "NodeList"; } else if (remoteCode.constructors[i].htmlCollection && (obj instanceof remoteCode.constructors[i].htmlCollection)) { return "HtmlCollection"; } } catch (e) { } } } return null; }; RemoteCode.prototype.createConsoleResult = function (inputId, evaluatedReturnValue, targetId) { var consoleObject; if (evaluatedReturnValue.isError) { if (remoteCode.notifyCallback) { consoleObject = { inputId: inputId, notifyType: Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error }; if (evaluatedReturnValue.result) { if (evaluatedReturnValue.result.message && evaluatedReturnValue.result.name) { consoleObject.message = { message: evaluatedReturnValue.result.message, localizeId: evaluatedReturnValue.result.name }; } else { consoleObject.message = evaluatedReturnValue.result.message || evaluatedReturnValue.result.description || evaluatedReturnValue.result.toString(); } remoteCode.notifyCallback(consoleObject); } else { consoleObject["suppressPostObject"] = true; } } } else { mainBrowser.document.parentWindow.msWriteProfilerMark("ConsoleRemote:BeginCreateResultObject"); var htmlTypeName = remoteCode.getHtmlViewableTypeName(evaluatedReturnValue.result); if (htmlTypeName !== null && htmlTypeName !== "DocumentNode") { consoleObject = remoteCode.createOutputHtmlElement(inputId, evaluatedReturnValue.result, htmlTypeName); } else { consoleObject = remoteCode.createOutputObject(inputId, evaluatedReturnValue.result); if (htmlTypeName === "DocumentNode") { consoleObject.isHtmlViewableType = true; } } mainBrowser.document.parentWindow.msWriteProfilerMark("ConsoleRemote:EndCreateResultObject"); } if (evaluatedReturnValue && (evaluatedReturnValue.isError || evaluatedReturnValue.result === remoteCode.suppressPostCode)) { consoleObject["suppressPostObject"] = true; } if (targetId) { consoleObject.targetId = targetId; } return consoleObject; }; RemoteCode.prototype.createOutputHtmlElement = function (inputId, element, htmlTypeName) { var name; try { name = Object.prototype.toString.call(element); } catch (e) { name = null; } var value = htmlTreeHelpers.createMappedNode(element, true); if (htmlTypeName === "NodeList" || htmlTypeName === "HtmlCollection") { value.tag = htmlTypeName; htmlTreeHelpers.mapping[value.uid].listType = htmlTypeName; value.attributes = [{ name: "length", value: element.length }]; } return { inputId: inputId, consoleType: "consoleItemOutput", detailedType: "htmlElement", isExpandable: true, isHtmlViewableType: true, name: name, value: value, uid: 0 }; }; RemoteCode.prototype.createOutputObject = function (inputID, obj, propertyName, isInternal) { var treeViewObjectExplorer; if (Common.RemoteHelpers.getDocumentMode() >= 9) { treeViewObjectExplorer = new Common.ObjectView.TreeViewRemoteObjectExplorer(this); } else { treeViewObjectExplorer = new Common.ObjectView.TreeViewDirectObjectExplorer(); } var treeViewRemoteHelper = new Common.ObjectView.TreeViewRemoteHelpers(this, treeViewObjectExplorer); remoteCode.ensureConstructorsAreAvailable(); return treeViewRemoteHelper.createOutputObject(inputID, obj, propertyName, isInternal); }; RemoteCode.prototype.reset = function () { remoteCode.resultMap = {}; htmlTreeHelpers.reset(); }; RemoteCode.prototype.getIntellisenseItemsForExpression = function (expression, windowContext, searchObject, locals) { var intellisenseSupported = (Common.RemoteHelpers.getDocumentMode() >= 9); if (intellisenseSupported) { var intellisenseRemoteHelper = new Common.Intellisense.IntellisenseRemoteHelpers(remoteCode); var result; if (windowContext) { result = intellisenseRemoteHelper.getIntellisenseItemsForExpressionUsingWindowContext(expression, windowContext, searchObject, locals); } else { result = intellisenseRemoteHelper.getIntellisenseItemsForExpression(expression); } return result; } else { return { choices: [] }; } }; RemoteCode.prototype.addNodeRemovedEventListener = function (documentWindow) { if (Common.RemoteHelpers.getDocumentMode() > 8) { if (!remoteCode._onMainWindowNodeRemovedSafeEventListener) { var safeRemover = Common.RemoteHelpers.addSafeListener(documentWindow, documentWindow.document, "DOMNodeRemoved", remoteCode.onDomNodeRemoved); remoteCode._onMainWindowNodeRemovedSafeEventListener = safeRemover; } else { Common.RemoteHelpers.addListener(documentWindow.document, "DOMNodeRemoved", remoteCode._onMainWindowNodeRemovedSafeEventListener); } } }; RemoteCode.prototype.removeNodeRemovedEventListener = function (unsafeWindow) { if (unsafeWindow) { Common.RemoteHelpers.removeListener(unsafeWindow.document, "DOMNodeRemoved", remoteCode._onMainWindowNodeRemovedSafeEventListener); try { if (unsafeWindow.frames) { for (var i = 0, len = unsafeWindow.frames.length; i < len; i++) { var frame = unsafeWindow.frames[i]; var result = Common.RemoteHelpers.getValidWindow(unsafeWindow, frame); if (result.isValid) { this.removeNodeRemovedEventListener(result.window); } } } } catch (e) { } } else if (remoteCode._onMainWindowNodeRemovedSafeEventListener) { this.removeNodeRemovedEventListener(browser.document.parentWindow); remoteCode._onMainWindowNodeRemovedSafeEventListener = null; } }; RemoteCode.prototype.onDomNodeRemoved = function (e) { var searchTargets = (e.target.nodeName === "IFRAME") ? [e.target] : e.target.getElementsByTagName ? e.target.getElementsByTagName("IFRAME") : []; for (var i = 0, n = searchTargets.length; i < n; i++) { var iframe = searchTargets[i].contentWindow; var result = Common.RemoteHelpers.getValidWindow(browser.document.parentWindow, iframe); if (result.isValid) { iframe = result.window; remoteCode.removeIframeTargets(iframe); if (iframe && remoteCode.anyIFrames(iframe, function (unsafeWindow) { return unsafeWindow === remoteCode.currentWindowContext; })) { remoteCode.onConsoleFunc("cd", { argsCount: 0 }, true); break; } } } remoteCode.constructors = null; }; RemoteCode.prototype.removeIframeTarget = function (frameId) { remoteHelpers.port.postMessage("TargetClosed:" + JSON.stringify({ targetType: "Frame", targetId: frameId })); delete remoteCode.frames[frameId]; }; RemoteCode.prototype.removeIframeTargets = function (unsafeWindow) { if (unsafeWindow.frames) { for (var i = 0, len = unsafeWindow.frames.length; i < len; i++) { var frame = unsafeWindow.frames[i]; var result = Common.RemoteHelpers.getValidWindow(unsafeWindow, frame); if (result.isValid) { var iframe = result.window; remoteCode.removeIframeTargets(iframe); } } } for (var key in remoteCode.frames) { if (unsafeWindow === remoteCode.frames[key]) { remoteHelpers.port.postMessage("TargetClosed:" + JSON.stringify({ targetType: "Frame", targetId: key })); delete remoteCode.frames[key]; break; } } }; RemoteCode.prototype.anyIFrames = function (unsafeWindow, func) { var current = func(unsafeWindow); if (current) { return true; } if (unsafeWindow.frames) { for (var i = 0, len = unsafeWindow.frames.length; i < len; i++) { var frame = unsafeWindow.frames[i]; var result = Common.RemoteHelpers.getValidWindow(unsafeWindow, frame); if (result.isValid) { var iframe = result.window; if (iframe && this.anyIFrames(iframe, func)) { return true; } } } } return false; }; RemoteCode.prototype.initializeConsoles = function (realWindow) { var successfulInitialization = false; try { successfulInitialization = remoteCode.initializeConsole(realWindow); } catch (e) { } try { if (!browser || !browser.document) { return; } var isRootWindow = realWindow === browser.document.parentWindow; } catch (e) { return; } if (isRootWindow) { remoteCode.removeNodeRemovedEventListener(); } else { var result = Common.RemoteHelpers.getValidWindow(browser.document.parentWindow, realWindow); if (!result.isValid) { return; } realWindow = result.window; if (successfulInitialization && Common.RemoteHelpers.getDocumentMode() > 8) { var exists = false; for (var id in remoteCode.frames) { try { if (remoteCode.frames[id] === realWindow) { exists = true; remoteCode.frames[id] = realWindow; remoteHelpers.port.postMessage("TargetUpdated:" + JSON.stringify({ targetType: "Frame", targetId: id, href: realWindow.location.href })); } } catch (e) { remoteCode.removeIframeTarget(id); } } if (!exists) { var frameId = remoteHelpers.getUid(); remoteCode.frames[frameId] = realWindow; remoteHelpers.port.postMessage("TargetCreated:" + JSON.stringify({ targetType: "Frame", targetId: frameId, href: realWindow.location.href })); } } } remoteCode.addNodeRemovedEventListener(realWindow); if (realWindow.frames) { for (var i = 0, len = realWindow.frames.length; i < len; i++) { var frame = realWindow.frames[i]; var result = Common.RemoteHelpers.getValidWindow(realWindow, frame); if (result.isValid) { remoteCode.initializeConsoles(result.window); } } } }; RemoteCode.prototype.initializeConsole = function (realWindow) { var consoleObj = realWindow.console; var injectedConsole = {}; var unloadHandler = function () { Common.RemoteHelpers.removeListener(toolUI, "detach", detachHandler); }; var getTargetId = function () { var targetId; for (var key in remoteCode.frames) { if (remoteCode.frames[key] === realWindow) { targetId = key; break; } } return targetId; }; var detachHandler = function () { remoteCode.onDetach(realWindow, injectedConsole); Common.RemoteHelpers.removeListener(toolUI, "detach", detachHandler); }; Common.RemoteHelpers.addListener(toolUI, "detach", detachHandler); if (!remoteCode._unloadSafe) { remoteCode._unloadSafe = Common.RemoteHelpers.addSafeListener(realWindow, realWindow, "unload", unloadHandler); } realWindow.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC = remoteHelpers.createSafeFunction(realWindow, function (id, data) { remoteCode.onBreakModeFunc(id, data); }); var func$ = function (selectors, startNode) { if (startNode) { return startNode.querySelector.call(startNode, selectors); } return window.document.querySelector.apply(window.document, arguments); }; var func$$ = function (selectors, startNode) { if (startNode) { return startNode.querySelectorAll.call(startNode, selectors); } return window.document.querySelectorAll.apply(window.document, arguments); }; var scriptFor$ = "window.__BROWSERTOOLS_CONSOLE = {};" + "window.__BROWSERTOOLS_CONSOLE.$ = " + func$.toString() + ";" + "window.__BROWSERTOOLS_CONSOLE.$$ = " + func$$.toString() + ";"; scriptFor$ = JSON.stringify(scriptFor$).slice(1, -1); browser.executeScript(scriptFor$ + Common.RemoteHelpers.getJMCScriptUrl("console"), realWindow); realWindow.__BROWSERTOOLS_CONSOLE.performBreakmodeIntellisense = browser.createSafeFunction(realWindow, function (id, expression, windowContext, searchObject, locals) { remoteCode.performBreakmodeIntellisense(id, expression, windowContext, searchObject, locals); }); if (!consoleObj && typeof (console) !== "undefined") { consoleObj = realWindow.console = console; } else if ((!realWindow.console) && (typeof (console) === "undefined")) { if (realWindow["eval"]) { realWindow["eval"]("{ document.parentWindow['console'] = {};}"); } else { realWindow["execScript"]("{ document.parentWindow['console'] = {};}"); } consoleObj = realWindow.console; } this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "log", function () { var notifyMessage = remoteCode.createOutputNotifyMessageObject.apply(this, arguments); remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log, notifyMessage, true); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "info", function () { var notifyMessage = remoteCode.createOutputNotifyMessageObject.apply(this, arguments); notifyMessage.targetId = getTargetId(); remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.info, notifyMessage, true); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "warn", function () { var notifyMessage = remoteCode.createOutputNotifyMessageObject.apply(this, arguments); notifyMessage.targetId = getTargetId(); remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn, notifyMessage, true); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "error", function () { var notifyMessage = remoteCode.createOutputNotifyMessageObject.apply(this, arguments); notifyMessage.targetId = getTargetId(); remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error, notifyMessage, true); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "debug", function () { try { var notifyMessage = remoteCode.createOutputNotifyMessageObject.apply(this, arguments); remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log, notifyMessage, true); } catch (e) { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error, e, true); } }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "assert", function (test) { if (!test) { var args; for (var i = 1; i < arguments.length; i++) { if (!args) { args = []; } args.push(arguments[i]); } var notifyMessage = remoteCode.createOutputNotifyMessageObject.apply(this, args); remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.assert, notifyMessage, true); } }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "time", function (name) { remoteCode.createConsoleTimer(name); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "timeEnd", function (name) { remoteCode.endConsoleTimer(name); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "timeStamp", function (name) { remoteCode.timeStamp(name); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "group", function (name) { remoteCode.startGroup(name, false); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "groupCollapsed", function (name) { remoteCode.startGroup(name, true); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "groupEnd", function () { remoteCode.endGroup(); }); if (Common.RemoteHelpers.getDocumentMode() >= 10) { var trace = function __BROWSERTOOLS_CONSOLE_TRACE() { var stackTrace = (function () { try { throw new Error(""); } catch (ex) { return ex.stack; } })(); var messages = stackTrace ? stackTrace.split("\n") : ""; messages.splice(0, 3); console.log("console.trace()\n" + messages.join("\n")); }; var scriptForTrace = "console.trace = " + trace.toString(); scriptForTrace = JSON.stringify(scriptForTrace).slice(1, -1); browser.executeScript(scriptForTrace + Common.RemoteHelpers.getJMCScriptUrl("console"), realWindow); injectedConsole["trace"] = consoleObj["trace"]; } else { this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "trace", function () { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn, { localizeId: "ConsoleUnsupportedDocumentModeAPIError", args: [String(Common.RemoteHelpers.getDocumentMode()), String("console.trace")] }); }); } this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "clear", function () { remoteCode.onConsoleFunc("clear"); return remoteCode.suppressPostCode; }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "dir", function (obj) { remoteCode.onConsoleFunc("dir", obj); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "dirxml", function (obj) { remoteCode.onConsoleFunc("dirxml", obj); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "count", function (obj) { remoteCode.count(obj); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "countReset", function (obj) { remoteCode.countReset(obj); }); this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "cd", function (obj) { remoteCode.onConsoleFunc("cd", { obj: obj, argsCount: arguments.length }); }); if (consoleObj.select === undefined || (consoleObj.select && consoleObj.select.toString && consoleObj.select.toString() === "\nfunction select() {\n [native code]\n}\n")) { this.defineInjectedConsoleObjFunction(injectedConsole, consoleObj, realWindow, "select", function (obj) { remoteCode.consoleSelectNotInitialized(); }); } return true; }; RemoteCode.prototype.initializeWebWorkers = function () { Common.RemoteHelpers.addListener(browser, "webWorkerCreated", remoteCode.onWebWorkerCreated); var workerBreakmodeFunc = function (id, data) { try { if (!data.isError) { if (data.result) { if (typeof data.result === "object") { data.result = data.result.toString(); } else { data.result = data.result; } } } diagnostics.postMessage("breakmode_func", JSON.stringify({ id: id, data: data })); } catch (e) { diagnostics.postMessage("breakmode_func", JSON.stringify({ id: id, data: { isError: true, result: e } })); } }; var breakModeFunction = "worker.worker.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC = worker.createSafeFunction(worker.worker, " + workerBreakmodeFunc.toString() + ");"; browser.workerStartupScript = breakModeFunction; var workers = browser.workers; for (var id in workers) { workers[id].addEventListener("message", this.onWorkerMessage); workers[id].executeScriptAsync(breakModeFunction, "breakmode_func"); } }; RemoteCode.prototype.onWorkerMessage = function (e) { if (e.type && e.type === "breakmode_func" && e.message) { var message = JSON.parse(e.message); remoteCode.onBreakModeFunc(message.id, message.data); } }; RemoteCode.prototype.onWebWorkerCreated = function (e) { var workers = browser.workers; if (e.id && workers[e.id]) { workers[e.id].addEventListener("message", remoteCode.onWorkerMessage); } }; RemoteCode.prototype.onBeforeScriptExecute = function (dispatchWindow) { if (dispatchWindow && dispatchWindow.browserOrWindow) { dispatchWindow = dispatchWindow.browserOrWindow; } var realWindow; try { realWindow = dispatchWindow.document.parentWindow; } catch (ex) { return; } if (realWindow === mainBrowser.document.parentWindow) { remoteCode.currentWindowContext = realWindow; if (remoteHelpers.port) { remoteHelpers.postAllMessages(); remoteCode.initializePage(); } } else { try { var currentWindow = remoteCode.currentWindowContext.document.parentWindow; } catch (e) { remoteCode.cd(); } remoteCode.initializeConsoles(realWindow); } remoteCode.ensureConstructorsAreAvailable(true); }; RemoteCode.prototype.onDetach = function (realWindow, injectedConsole) { Common.RemoteHelpers.removeListener(browser, "beforeScriptExecute", remoteCode.onBeforeScriptExecute); remoteCode.removeNodeRemovedEventListener(); try { if (realWindow.console) { var functionsNotRemoved = 0; for (var prop in injectedConsole) { if (realWindow.console[prop] === injectedConsole[prop]) { if (Common.RemoteHelpers.getDocumentMode() < 9) { realWindow.console[prop] = null; } else { delete realWindow.console[prop]; } } else { functionsNotRemoved++; } } if (functionsNotRemoved === 0) { var deleteConsole = true; for (var i in realWindow.console) { if (realWindow.console[i]) { deleteConsole = false; break; } } if (deleteConsole) { delete realWindow.console; } } } if (realWindow.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC) { delete realWindow.__BROWSERTOOLS_CONSOLE_BREAKMODE_FUNC; } if (remoteCode._unloadSafe) { Common.RemoteHelpers.removeListener(realWindow, "unload", remoteCode._unloadSafe); remoteCode._unloadSafe = null; } } catch (ex) { } remoteCode.frames = {}; injectedConsole = null; }; RemoteCode.prototype.onConsoleMessage = function (source, level, messageId, messageText, fileUrl, lineNumber, columnNumber) { if (source === "HTML" && messageId === 1300) { remoteCode.reset(); remoteHelpers.port.postMessage("ClearOnNavigate"); } if (messageId === 7002 && fileUrl === "about:blank") { return; } if (source === "CONSOLE") { switch (messageId) { case 6000: remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log, messageText, true); return; case 6001: remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn, messageText, true); return; case 6002: if (messageText === "ConsoleSelectError") { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error, { localizeId: messageText }); } else { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error, messageText, true); } return; case 6003: remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.assert, messageText, true); return; case 6004: remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.info, messageText, true); return; } } var messageIdentifier = source + messageId; var data = { messageId: messageIdentifier, message: messageIdentifier + ": " + messageText, fileUrl: fileUrl, lineNumber: lineNumber, columnNumber: columnNumber }; switch (level) { case 0: remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.info, data); break; case 1: remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn, data); break; case 2: remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error, data); break; } }; RemoteCode.prototype.onBreakModeFunc = function (id, data) { if (id === null || typeof id === "undefined") { return; } else if (id === "" && data) { remoteHelpers.processMessages({ data: data }); } else { var parts = id.split(":"); if (parts.length === 3) { var funcName = parts[0]; var inputId = parseInt(parts[1], 10); var uid = parts[2]; var returnValue; if (funcName === "processInput") { returnValue = remoteCode.createConsoleResult(inputId, data); } if (returnValue && returnValue.suppressPostObject) { return; } if (returnValue !== undefined) { remoteHelpers.postObject({ uid: uid, args: [returnValue] }); } } } }; RemoteCode.prototype.ensureConstructorsAreAvailable = function (forceCreate) { if (!remoteCode.constructors || forceCreate) { var mainWindow = Common.RemoteHelpers.getDefaultView(browser.document); remoteCode.constructors = remoteCode.getAllConstructors(mainWindow); } }; RemoteCode.prototype.getAllConstructors = function (root) { var constructors = []; constructors.push(remoteCode.getWindowConstructors(root)); try { if (root.frames && root.frames.length > 0) { for (var i = 0; i < root.frames.length; i++) { var frame = root.frames[i]; var result = Common.RemoteHelpers.getValidWindow(root, frame); if (result.isValid) { constructors = constructors.concat(remoteCode.getAllConstructors(result.window)); } } } } catch (e) { } return constructors; }; RemoteCode.prototype.getWindowConstructors = function (win) { var windowConstructors = {}; try { windowConstructors.array = win.Array; windowConstructors.date = win.Date; windowConstructors.regex = win.RegExp; windowConstructors.htmlElement = win.HTMLElement; windowConstructors.htmlNode = win.Node; windowConstructors.nodeList = win.NodeList; windowConstructors.htmlCollection = win.HTMLCollection; } catch (e) { } return windowConstructors; }; RemoteCode.prototype.createOutputNotifyMessageObject = function () { var args = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { args[_i] = arguments[_i + 0]; } var notifyMessage = {}; notifyMessage.message = Common.ObjectView.TreeViewStringFormatter.formatConsoleMessage.apply(this, args); notifyMessage.localizeId = notifyMessage.message; if (args.length > 0) { var createViewableObject = false; var viewableArguments = []; for (var i = 0; i < args.length; i++) { var viewableNotificationObject = remoteCode.createConsoleResult(-1, { result: args[i] }); if (typeof args[i] === "object") { createViewableObject = true; } viewableArguments.push(viewableNotificationObject); } } if (createViewableObject) { notifyMessage.viewableObject = viewableArguments; } return notifyMessage; }; RemoteCode.prototype.createConsoleTimer = function (name) { if (!name) { name = remoteCode._defaultTimerName; } if (remoteCode._consoleTimers.hasOwnProperty(name) && remoteCode._consoleTimers[name]) { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn, { localizeId: "ConsoleTimerWarning", args: [String(name)] }); } else { remoteCode._consoleTimers[name] = this.getTimeStamp(); browser.document.parentWindow.msWriteProfilerMark("console.time:" + name); } }; RemoteCode.prototype.endConsoleTimer = function (name) { var time = this.getTimeStamp(); if (!name) { name = remoteCode._defaultTimerName; } if (remoteCode._consoleTimers.hasOwnProperty(name) && remoteCode._consoleTimers[name]) { time = time - remoteCode._consoleTimers[name]; delete remoteCode._consoleTimers[name]; remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log, { localizeId: "ConsoleTimerDisplay", args: [String(name), time.toFixed(4)] }); browser.document.parentWindow.msWriteProfilerMark("console.timeEnd:" + name); } else { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.warn, { localizeId: "NonExistentConsoleTimerWarning", args: [String(name)] }); } }; RemoteCode.prototype.timeStamp = function (name) { var time = this.getTimeStamp(); if (!name) { name = this._defaultTimeStampName; } remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.log, { localizeId: "ConsoleTimerDisplay", args: [String(name), Number(time)] }); browser.document.parentWindow.msWriteProfilerMark("console.timeStamp:" + name); }; RemoteCode.prototype.count = function (name) { if (name === undefined || name === null) { remoteCode._consoleDefaultCounter = remoteCode._consoleDefaultCounter + 1; remoteCode.onConsoleFunc("count", { name: null, message: remoteCode._consoleDefaultCounter.toString() }); } else { var newCount = 1; if (remoteCode._consoleCounters.hasOwnProperty(name) && remoteCode._consoleCounters[name] !== null) { newCount = remoteCode._consoleCounters[name] + 1; } remoteCode._consoleCounters[name] = newCount; remoteCode.onConsoleFunc("count", { name: String(name), message: newCount.toString() }); } }; RemoteCode.prototype.countReset = function (name) { if (name === undefined || name === null) { remoteCode._consoleDefaultCounter = 0; remoteCode.onConsoleFunc("count", { name: null, message: remoteCode._consoleDefaultCounter.toString() }); } else { remoteCode._consoleCounters[name] = 0; remoteCode.onConsoleFunc("count", { name: String(name), message: remoteCode._consoleCounters[name].toString() }); } }; RemoteCode.prototype.endGroup = function () { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.internalMessage, { key: Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.endGroup }); }; RemoteCode.prototype.startGroup = function (groupName, isCollapsed) { groupName = groupName ? String(groupName) : ""; var groupType = isCollapsed ? Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.startGroupCollapsed : Common.ObjectView.TreeViewUtils.ConsoleInternalMessage.startGroup; remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.internalMessage, { key: groupType, name: groupName }); }; RemoteCode.prototype.consoleSelectNotInitialized = function () { remoteCode.onConsoleFunc(Common.ObjectView.TreeViewUtils.ConsoleNotifyType.error, { localizeId: "ConsoleSelectNotInitializedError" }); }; RemoteCode.prototype.performBreakmodeIntellisense = function (id, expression, windowContext, searchObject, locals) { if (typeof id !== "string" || typeof expression !== "string") { return; } var sanitizedLocals = Array.prototype.map.call(locals, function (value, index, array) { return "" + value; }); var parts = id.split(":"); if (parts.length === 3) { var funcName = parts[0]; var inputId = parseInt(parts[1], 10); var uid = parts[2]; var results = remoteCode.getIntellisenseItemsForExpression(expression, windowContext, searchObject, sanitizedLocals); remoteHelpers.postObject({ uid: uid, args: [results] }); } }; RemoteCode.prototype.initializePage = function () { var defaultView = remoteCode.currentWindowContext = Common.RemoteHelpers.getDefaultView(mainBrowser.document); try { browser.executeScript("(function () { })();" + Common.RemoteHelpers.getJMCScriptUrl("console"), defaultView); } catch (e) { return; } try { remoteCode.clearTargets(); remoteCode.initializeConsoles(defaultView); var connectionInfo = { docMode: Common.RemoteHelpers.getDocumentMode(), contextInfo: defaultView.location.href }; remoteHelpers.port.postMessage("Handshake:" + JSON.stringify(connectionInfo)); remoteCode._consoleCounters = {}; remoteCode._consoleDefaultCounter = 0; } catch (e) { } }; RemoteCode.prototype.defineInjectedConsoleObjFunction = function (injectedConsole, consoleObj, realWindow, functionName, func) { consoleObj[functionName] = remoteHelpers.createSafeFunction(realWindow, func); injectedConsole[functionName] = consoleObj[functionName]; }; RemoteCode.prototype.createNotifyMessageObject = function () { var notifyMessage = {}; notifyMessage.message = Common.ObjectView.TreeViewStringFormatter.formatConsoleMessage.apply(this, arguments); notifyMessage.localizeId = notifyMessage.message; if (arguments.length > 0) { notifyMessage.viewableObject = remoteCode.createOutputObject(-1, arguments); } return notifyMessage; }; RemoteCode.prototype.getTimeStamp = function () { var timeStamp; if (mainBrowser.document.parentWindow.performance.now) { timeStamp = mainBrowser.document.parentWindow.performance.now(); } else { timeStamp = new Date(); } return timeStamp; }; RemoteCode.MaxMessagesPerInterval = 1000; RemoteCode.MessageThrottleInterval = 0; return RemoteCode; })(); Console.RemoteCode = RemoteCode; var MessageHandlers = (function () { function MessageHandlers() { } MessageHandlers.prototype.clearConsoleData = function () { remoteCode.reset(); }; MessageHandlers.prototype.registerConsoleCallbacks = function (outputCallback, notifyCallback, clearCallback) { remoteCode.outputCallback = outputCallback; remoteCode.notifyCallback = notifyCallback; remoteCode.clearCallback = clearCallback; var currentNotificationQueue = remoteCode.consoleNotificationQueue; remoteCode.consoleNotificationQueue = []; for (var i = 0; i < currentNotificationQueue.length; i++) { var notification = currentNotificationQueue[i]; remoteCode.onConsoleFunc(notification.functionId, notification.data); } }; MessageHandlers.prototype.switchTarget = function (targetId, targetType) { if (targetType === "Frame") { var frame = remoteCode.frames[targetId]; remoteCode.cd(frame); } else if (targetType === "_top") { remoteCode.cd(); } }; MessageHandlers.prototype.processInput = function (inputId, input) { if (!remoteCode.currentWindowContext) { return; } try { mainBrowser.document.parentWindow.msWriteProfilerMark("ConsoleRemote:BeginConsoleInvoke"); var haveAccessToWindowContext = remoteCode.currentWindowContext.window; } catch (ex) { return; } var returnValue = remoteCode.callInvoker(remoteCode.currentWindowContext, input); mainBrowser.document.parentWindow.msWriteProfilerMark("ConsoleRemote:EndConsoleInvoke"); return remoteCode.createConsoleResult(inputId, returnValue); }; MessageHandlers.prototype.getObjectChildren = function (identifier) { var delimiterIndex = identifier.indexOf(":"); if (delimiterIndex !== -1) { var parts = []; parts.push(identifier.substr(0, delimiterIndex)); parts.push(identifier.substr(delimiterIndex + 1)); var uid = parts[0].split("#"); var mappedResult = remoteCode.resultMap[uid[0]]; if (mappedResult) { return remoteCode.createOutputObject(-1, mappedResult, parts[1], uid.length === 2); } } return null; }; MessageHandlers.prototype.getHtmlChildren = function (uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } var htmlTypeName = remoteCode.getHtmlViewableTypeName(mappedNode.ele); var showEmptyTextNodes = (htmlTypeName === "NodeList"); return htmlTreeHelpers.getChildrenForMappedNode(uid, showEmptyTextNodes); }; MessageHandlers.prototype.getObjectItemAsHtml = function (identifier) { var mappedItem = null; var parts = identifier.split(":", 2); if (parts.length === 2) { var mappedParent = remoteCode.resultMap[parts[0]]; if (mappedParent) { mappedItem = mappedParent[parts[1]]; } } else if (parts.length === 1) { mappedItem = remoteCode.resultMap[identifier]; } if (mappedItem) { return remoteCode.createOutputHtmlElement(-1, mappedItem, remoteCode.getHtmlViewableTypeName(mappedItem)); } return null; }; MessageHandlers.prototype.getHtmlItemAsObject = function (uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return null; } return remoteCode.createOutputObject(-1, mappedNode.ele); }; MessageHandlers.prototype.getIntellisenseItemsForExpression = function (expression) { try { return remoteCode.getIntellisenseItemsForExpression(expression); } catch (e) { return { choices: [] }; } }; return MessageHandlers; })(); Console.MessageHandlers = MessageHandlers; })(Tools.Console || (Tools.Console = {})); var Console = Tools.Console; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var remoteHelpers; var remoteCode; (function () { "use strict"; remoteHelpers = new Common.RemoteHelpers(new F12.Tools.Console.MessageHandlers()); remoteCode = new F12.Tools.Console.RemoteCode(); remoteCode.initialize(); })(); PNG  IHDRH5gAMA a pHYsktEXtSoftwareAdobe ImageReadyqe<OIDATXGXۑ0$8~~ *^!!\< B$[|#{dُ53=t xZ ֍tڝf^e(wZBd7JHWr{$" -;D ']A2 Jpɬ_o›xU2x`rC_Fm'Y1+Y~ZtIENDB`PNG  IHDR$l  cHRMz%u0`:o_F pHYsk IDAThC횿nFy+Rc_BMz.UO{F k$@j7Pe";@ f7$>C rvryƳyAȵa1;2l|Qޕt[%pnSlx]q.IOh%e(٘.[Bh4gJzferrCvWR`hrU0'ki'WYEb9R~]tw`8#P}}ttEQpB0bv7NA awA[P ` F *a F J9U  dj`âq) F BJ#¨J#.&>c >@|ux`.3%˕EU`ɑikrGX֤*4 4>USnNdžX|?9;*"޶@M+tckH91qMsѽ>`2lVRCInj:#zSdtAȵaX6|%KcHWnSlx]q.IOgggh%eD(.[Bh4gJzferꛛ=dg|Ko4*Uo݄L;*èa<Ȼ*nőb( ᡾\mk FAw?bv7NA awA[P ` F *a F J9U  dj`âq) F BJ#¨J#.&>c >@u7ԫ2`MrxcU`ɑiXI9²&uWѠ|d񡨒Ƨt[p?6] cA#IENDB`PNG  IHDRH5tEXtSoftwareAdobe ImageReadyqe<fiTXtXML:com.adobe.xmp ~#IDATxAj0Dv#7Ⱥ`k4#G0mzYw#J/)* F+~،b{M;pu{xJcok2otI mB|.EdsQ5.En?EeYry\V"_j.ZJE1(6E\:EMs`|IENDB`PNG  IHDR$l  cHRMz%u0`:o_F pHYskIDAThC;n#GE-f 'd@Df p Z>QP 8w ۊdky~C8Ⱦ걪>-nkhcj;еņͼdT'_T-jT`='Z%SK[LY2,^,B>X0=lȞLV gI=钶.JRo]ݻ_^vΗoُ_!vnN j\+Mi2Xb;FFe?O T*]Xky )@u2|Dt wAk6˫f`>-$]Wr{V;C]Xm\C"_{JHi,sL)SYJR /%$)bxȔ|!4!{$s BnOQ:&H agOQO"_i|n#/W۟D.43] I/v"h1O>V{IV^]R"(Z I=Z3i]h|/y3{9 !}ŁZMjz?Xx׻J{WWW1@zeWf;N҂Z#7YJ*h_ֲJATb=$n1eƬ;tww^ or3d- ufxlQ:^?C֎4rހGaɲ誶aup) bxKYn)bx*KYBdJDRfuDHi47/I =FDV7bJ"_^\% /@x;k4u vB"̜u$9yעGr* fbT,BG>X@V $AkIDATxq0Ea'4@ qqHiùssN 4HYЌkX.yʣ:%\m}j.w3a.\\|Y 0k#ב @o!⍹Nq{NeFѦxf 2ߛцVrYJEƹJN2`?ufRuB:`m]` kDbM<R/2r(1B;!H"^ (ޘ@D j?W_$@d_mJ{_(<*YJEƹRH:UDH:`!P0/ dTm,Z?|>E̺/}{̅qB/ {B 7:!B};B ER% (,"h\ G VY"Tl{q~"h/RǟV#.RIENDB`PNG  IHDRH5tEXtSoftwareAdobe ImageReadyqe<qiTXtXML:com.adobe.xmp 4IDATxQ0mH r6(677`JP@AbFz͚39m{ꚝO?ڶmn[? Si;0(E3IUgpەDܡ ;Ӽ!GHMY\&.پ|JQ.ze5;#ks,Vma-F gț[(R' r/\=k[>Pchrma+|R)sш*b4L) H21)P:@0 N?Ps 0R0#`"_j@\jj i W(s`RVԪꓮChU6F)$ Q*{5qTHѵ?n-ր"V?Ǟ)Ot'PDAY+3Bڮ-l~ ;ojT;u#G*rz5InO5V?aRf TI9htE~2 M2SɚPfݑz\-`ե vc?v.WIQW.~ 0VP@NV; &&f: 7W̭n<30́nHF{qP~!gc|݉Cuj1x]v.#O=F=y3zbcay͸c {׿={#/, Ä_`벺'hC^E2c^jV*"t_\'0&?2cvJYJ*{p}!`)hsπ|N I`or&<1{Ӛ W{ ,=]9[rrhpc8.wj]N$XҫWӑ m,N`5jk=tYzL> HuGgVdFfYL]K._&r, kf;PHÁ Jb JhnG'ɷ!0 .listview-grid-cell-icon { background-image: url('images/i_error.png'); /*[url({plugin-console-image-icon-error})]*/ background-size: 18px 54px; } #outputList .consoleItemError > .listview-grid-cell-icon { background-image: url('images/i_error.png'); /*[url({plugin-console-image-icon-error})]*/ background-size: 18px 54px; } #outputList .consoleItemInfo > .listview-grid-cell-icon { background-image: url('images/i_info.png'); /*[url({plugin-console-image-icon-info})]*/ background-size: 18px 54px; } #outputList .consoleItemWarn > .listview-grid-cell-icon { background-image: url('../common/images/i_warning.png'); /*[url({plugin-console-image-icon-warning})]*/ background-size: 18px 54px; } #outputList .consoleItemScriptError > .listview-grid-cell-icon { background-image: url('images/i_error.png'); /*[url({plugin-console-image-icon-error})]*/ background-size: 18px 54px; } #outputList .consoleItemErrorStale > .listview-grid-cell-icon { background-position-y: -36px; } #outputList .consoleItemWarnStale > .listview-grid-cell-icon { background-position-y: -36px; } #outputList .consoleItemInfoStale > .listview-grid-cell-icon { background-position-y: -36px; } .BPT-WarnMessageIcon { background-image: url('../common/images/i_warning.png'); /*[url({plugin-console-image-icon-warning})]*/ background-size: 18px 54px; background-repeat: no-repeat; width: 18px; height: 18px; display: inline-block; float: left; vertical-align: middle; } .BPT-Toolbar .errorButton .buttonIcon { background-image: url('images/i_error.png'); /*[url({plugin-console-image-icon-button-error})]*/ } .BPT-Toolbar .warnButton .buttonIcon { background-image: url('../common/images/i_warning.png'); /*[url({plugin-console-image-icon-button-warn})]*/ } .BPT-Toolbar .infoButton .buttonIcon { background-image: url('images/i_info.png'); /*[url({plugin-console-image-icon-button-info})]*/ } .BPT-Toolbar .clearButton .buttonIcon { background-image: url('../common/images/i_delete.png'); /*[url({plugin-console-image-icon-button-clear})]*/ } .BPT-Toolbar .clearOnNavigateButton .buttonIcon { background-image: url('images/i_clear-on-navigate.png'); /*[url({plugin-console-image-icon-button-clear-on-navigate})]*/ } #executeButton { background-position: 0 0; background-repeat: no-repeat; background-image: url('images/i_execute.png'); /*[url({plugin-console-image-icon-button-execute})]*/ background-size: 12px 36px; width: 12px; height: 12px; margin: 2px; } #executeButton:hover { background-position: 0px -12px; } #clearInputButton { background-position: 0 0; background-repeat: no-repeat; background-image: url('images/i_clear-input.png'); /*[url({plugin-console-image-icon-button-clear-input})]*/ background-size: 12px 36px; width: 12px; height: 12px; margin: 2px; } #clearInputButton:hover { background-position: 0px -12px; } #toggleButton { background-position: 0 0; background-repeat: no-repeat; background-size: 12px 36px; width: 12px; height: 12px; margin: 2px; } #toggleButton:hover { background-position: 0px -12px; } .BPT-Toggle-MultiIcon { background-image: url('images/i_toggle-multi.png'); /*[url({plugin-console-image-icon-button-multi})]*/ } .BPT-Toggle-SingleIcon { background-image: url('images/i_toggle-single.png'); /*[url({plugin-console-image-icon-button-single})]*/ } DOM Explorer
      Styles
      Computed
      Layout
      Events
      Changes
      [No properties found.]
      Offset
      Margin
      Border
      Padding
      ×
      body, div, span { cursor: default; } .BPT-ScriptErrorMessage { color: TRANSPARENT; /*[{plugin-font-console-error-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-console-error-background-color}]*/ font-weight: normal; /*[{plugin-font-console-error-weight}]*/ padding-left: 21px; padding-top: 6px; } .BPT-Toolbar { -ms-grid-row: 1; } .BPT-Toolbar .BPT-Search-Button { display: inline-block; position: absolute; } .BPT-Toolbar .BPT-Search-Button:not([disabled]):hover div { background-position-x: -16px; } .BPT-Toolbar .BPT-Search-Button[disabled] div { visibility: hidden; } .BPT-Toolbar .BPT-Search-Button .BPT-Search-Next { background-image: url("../common/images/i_next.png"); /*[url({plugin-common-image-icon-next})]*/ background-repeat: no-repeat; background-position: 0px 0px; background-size: 48px 16px; display: inline-block; width: 16px; height: 16px; } .BPT-Toolbar .BPT-Search-Button .BPT-Search-Previous { background-image: url("../common/images/i_previous.png"); /*[url({plugin-common-image-icon-previous})]*/ background-repeat: no-repeat; background-position: 0px 0px; background-size: 48px 16px; display: inline-block; width: 19px; height: 16px; } /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* Css styling for the tree view and html elements */ #tree { margin-top: 5px; } /* Css styling for panes */ #mainContainer { display: -ms-grid; -ms-grid-rows: auto 1fr; -ms-grid-columns: 100%; height: 100%; width: 100%; position: relative; } .BPT-HorizontalPane { -ms-grid-row: 2; height: 100%; background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .BPT-HorizontalPane .BPT-Pane { float: left; position: relative; } .BPT-HorizontalPane-Left { width: 100%; height: calc(100% - 25px); overflow-x: auto; box-sizing: border-box; padding-bottom: 25px; } .BPT-HorizontalPane-Right { position: relative; height: 100%; box-sizing: border-box; overflow: hidden; } .BPT-HorizontalPane-Right-Content { position: relative; width: 100%; overflow: auto; overflow-x: hidden; } .BPT-HorizontalPane-Right-Content > div > *:not(.BPT-Toolbar) { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: 12px; /*[{plugin-font-size}]*/ /* Changes to line-height here also require changes in styleView.css (see references to line-height there). */ line-height: 1.3em; margin: 0px; padding: 0px; } .BPT-HorizontalPane-Right-Tab-ToolbarContainer { position: relative; width: 100%; height: calc(100% - 2.666em - 4px); overflow: auto; } .BPT-HorizontalPane-Right-Tab { display: none; padding: 3px 6px 6px 4px; } .BPT-DataTree-Container { margin-top: 5px; } .BPT-HTML-InlinedTag { font-style: italic; } .BPT-Pane-Divider { position: relative; float: left; z-index: 100; height: 100%; width: 3px; background-color: TRANSPARENT; /*[{plugin-perftools-grid-column-sizer}]*/ cursor: w-resize; } .BPT-HorizontalPane-Right .BPT-Toolbar { font-family: "Segoe UI", Arial, Sans-Serif; /*[{plugin-font-family} , Arial, Sans-Serif]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-weight: normal; /*[{plugin-font-weight}]*/ color: TRANSPARENT; /*[{plugin-color}]*/ } /* CSS styling for the tab and resizable pane controls */ .BPT-Tab-Container { display: -ms-grid; -ms-grid-columns: 4px 1fr 4px auto; background-color: TRANSPARENT; /*[{plugin-tab-header-background-color}]*/ } .BPT-Tabbar { -ms-grid-column: 2; overflow: hidden; width: 100%; height: 25px; white-space: nowrap; background-color: TRANSPARENT; /*[{plugin-tab-header-background-color}]*/ padding: 2px 0 0 2px; } .BPT-Tabbar .BPT-Tab-Item { height: 25px; display: table-cell; cursor: default; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; background-color: TRANSPARENT; /*[{plugin-tab-header-background-color}]*/ } .BPT-Tabbar ::selection { background: transparent; } .BPT-Tab-Item[aria-selected='true'] { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-weight: 600; background-color: TRANSPARENT; /*[{plugin-tab-header-active-background-color}]*/ color: TRANSPARENT; /*[{plugin-tab-header-active-color}]*/ } .BPT-ToolWindow-NoFocus .BPT-Tab-Item[aria-selected='true'] { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-weight: normal; background-color: TRANSPARENT; /*[{plugin-tab-header-background-color}]*/ color: TRANSPARENT; /*[{plugin-tab-header-color}]*/ } .BPT-Tab-Item[aria-selected='false'] { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-weight: normal; background-color: TRANSPARENT; /*[{plugin-tab-header-background-color}]*/ color: TRANSPARENT; /*[{plugin-tab-header-color}]*/ } .BPT-Tab-Item[aria-selected='false']:hover { background-color: TRANSPARENT; /*[{plugin-tab-header-hover-background-color}]*/ color: TRANSPARENT; /*[{plugin-tab-header-hover-color}]*/ } .BPT-Tab-Item:focus { outline: invert dotted thin; } @media screen and (-ms-high-contrast) { .BPT-Tab-Container { background-color: transparent; } .BPT-Tabbar { background-color: transparent; padding-top: 2px; padding-bottom:2px } .BPT-Tabbar .BPT-Tab-Item { background-color: transparent; } .BPT-Tab-Item[aria-selected='true'] { background-color: transparent; border-color: TRANSPARENT; /*[{plugin-tab-header-hover-background-color}]*/ border-style: solid; border-width: 1px; } .BPT-Tab-Item[aria-selected='false'] { background-color: transparent; } } /* Optional buttons panel. */ #optionalButtonsPanel { background-color: TRANSPARENT; /*[{f12-toolbar-background-color}]*/ margin: 1px 18px 1px 0; padding: 0 0 1px; position: absolute; right: 0px; z-index: 1; } .BPT-EditBox-Active > #optionalButtonsPanel, #optionalButtonsPanel.BPT-OptionsPanel-Hidden { display: none; } #optionalButtonsPanelGroup { display: inline-block; padding: 3px; } .BPT-OptionsPanel-Button { border: 1px solid transparent; padding: 0; margin: 0 2px 0; } .BPT-OptionsPanel-Button.BPT-ToolbarToggleButton-StateOn { border-color: TRANSPARENT; /*[{f12-toolbar-button-selected-border-color}]*/ } @media screen and (-ms-high-contrast) { #optionalButtonsPanel { background-color: TRANSPARENT; /*[{plugin-background-color}]*/ } .BPT-OptionsPanel-Button.BPT-ToolbarToggleButton-StateOn { background-color: transparent; border-color: TRANSPARENT; /*[{f12-toolbar-button-selected-color}]*/ } } .BPT-OptionsPanel-Button > div { background-size: 18px 54px; background-repeat: no-repeat; } .pseudoStatesToggle { background-image: url('images/i_show_pseudo_classes.png'); /*[url({plugin-image-icon-dom-explorer-show-pseudo_classes})]*/ } .allWinningStylesButton { background-image: url('images/i_just_my_code.png'); /*[url({plugin-image-icon-dom-explorer-show-all-styles})]*/ } /* Pseudo-Class states panel. */ #pseudoStatesPanel { margin-top: 1px; height: 28px; display: block; background-color: TRANSPARENT; /*[{f12-toolbar-background-color}]*/ } @media screen and (-ms-high-contrast) { #pseudoStatesPanel { background-color: TRANSPARENT; /*[{plugin-background-color}]*/ } } #pseudoStatesPanel[data-show="false"], #pseudoStatesToggle[data-show="false"] { display: none; } .BPT-PseudoSelector { margin: 6px 6px; display: inline-block; } .BPT-PseudoSelector-Disabled { color: TRANSPARENT; /*[{plugin-pseudo-class-panel-disabled-color}]*/ } #pseudoStatesPanel .BPT-PseudoCheckbox { width: 10px; height: 10px; margin-bottom: 4px; } .BPT-DataTreeItem-ChildCollection { display: block; } body.BPT-ToolWindow-NoFocus .BPT-HtmlTree-Container:focus .BPT-HtmlTreeItem-Selected, body.BPT-ToolWindow-NoFocus .BPT-HtmlTree-Container-KeepSelection .BPT-HtmlTreeItem-Selected { border-left-color: TRANSPARENT; /*[{plugin-font-editor-inactive-selected-background-color}]*/ } body.BPT-ToolWindow-NoFocus .BPT-HtmlTree-Container:focus .BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header, body.BPT-ToolWindow-NoFocus .BPT-HtmlTree-Container-KeepSelection .BPT-HtmlTreeItem-Selected > .BPT-HtmlTreeItem-Header { background: rgba(191, 205, 219, 0.25); /*[{plugin-font-editor-inactive-selected-background-color rgba(0.25)}]*/ border-color: TRANSPARENT; /*[{plugin-font-editor-inactive-selected-background-color}]*/ } .BPT-ColorThumbnail { display: inline-block; vertical-align: middle; width: 12px; height: 12px; margin: 0 2px 0 2px; border: 1px solid black; /*[1px solid {plugin-font-editor-color}]*/ } .BPT-WinningStyle-FileReference, .BPT-Style-FileReference { color: TRANSPARENT; /*[{plugin-link-color}]*/ } .BPT-ToolbarLabel .BPT-FileLink { margin-top: -1px; margin-left: 4px; max-width: 12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Css styling for the editing box */ .BPT-EditBox { border: 1px solid TRANSPARENT; /*[1px solid {plugin-textbox-border-color}]*/ box-shadow: 2px 2px 2px rgba(0, 0, 255, 0.25); /*[2px 2px 2px {plugin-textbox-border-color rgba(0.5)}]*/ background-color: TRANSPARENT; /*[{plugin-textbox-background-color}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } textarea.BPT-EditBox { margin: 0; padding-left: 0px; padding-right: 0px; overflow: auto; min-height: 16px; } input.BPT-EditBox { margin: -2px 0 -2px 0; } .BPT-EditBox-Invalid { border: 1px solid TRANSPARENT; /*[1px solid {plugin-font-console-error-color}]*/ } /* Disable "x" in input boxes. */ ::-ms-clear { display: none; } .BPT-SearchBox::-ms-clear { display: normal; } .BPT-SearchBox:-ms-input-placeholder { color:TRANSPARENT; /*[{plugin-searchcontrol-unfocused-watermark-text-color}]*/ background-color: TRANSPARENT; /*[{plugin-searchcontrol-unfocused-background-color}]*/ } .BPT-SearchBox-Border:hover .BPT-SearchBox:-ms-input-placeholder { background-color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-background-color}]*/ color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-watermark-text-color}]*/ } .BPT-SearchBox-Border { float: right; background-color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-background-color}]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-searchcontrol-unfocused-border-color}]*/ margin-top: 3px; padding: 1px; display: inline-block; position: relative; } .BPT-SearchBox { color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-foreground-color}]*/ background-color: transparent; border: none; height: 16px; width: 115px; padding: 1px 2px; } .BPT-SearchBox::selection { background-color: TRANSPARENT; /*[{plugin-searchcontrol-selection-color}]*/ } .BPT-SearchBox-Border:hover { background-color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-background-color}]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-searchcontrol-mouseover-border-color}]*/ } .BPT-SearchBox-NoResult, .BPT-SearchBox-NoResult:hover { border: 1px solid TRANSPARENT; /*[1px solid {plugin-font-console-error-color}]*/ } /* Css styling for editable text sections */ .BPT-DataTreeItem-Value > .BPT-HTML-CSS-Value[data-uid], .BPT-DataTreeItem-Value > .BPT-HTML-Value[data-uid], .BPT-HTML-Value[data-attrName], .BPT-HTML-Text { cursor: text; } ::selection { background-color: rgba(0, 0, 255, 0.5); /*[{plugin-highlight-background-color rgba(0.5)}]*/ } #breadcrumbRightArrow { background-image: url('images/BreadcrumbScrollRight.png'); /*[url({plugin-image-icon-dom-explorer-breadcrumb-right})]*/ float: right; } #breadcrumbRightArrow:hover { background-image: url('images/BreadcrumbScrollRightHover.png'); /*[url({plugin-image-icon-dom-explorer-breadcrumb-right-hover})]*/ } #breadcrumbLeftArrow { background-image: url('images/BreadcrumbScrollLeft.png'); /*[url({plugin-image-icon-dom-explorer-breadcrumb-left})]*/ margin-right: 12px; float: left; } #breadcrumbLeftArrow:hover { background-image: url('images/BreadcrumbScrollLeftHover.png'); /*[url({plugin-image-icon-dom-explorer-breadcrumb-left-hover})]*/ } .BPT-HorizontalPane-BreadcrumbBar-Arrow { background-size: 5px 9px; background-repeat: no-repeat; background-position: center center; width: 12px; height: 24px; display: inline-block; } .BPT-HorizontalPane-BreadcrumbChevron { z-index: 2; position: relative; } .BPT-BreadcrumbChevron-Edge { stroke-width: 1; stroke: TRANSPARENT; /*[{plugin-breadcrumb-border-color}]*/ fill-opacity: 0.0; } .BPT-BreadcrumbChevron { fill: TRANSPARENT; /*[{plugin-breadcrumb-background-color}]*/ stroke-width: 0px; } .BPT-BreadcrumbChevron-Hover { fill: TRANSPARENT; /*[{plugin-breadcrumb-hover-background-color}]*/ } .BPT-BreadcrumbChevron-Selected { fill: TRANSPARENT; /*[{plugin-breadcrumb-selected-background-color}]*/ } .BPT-Breadcrumb-Container { margin-left: -8px; float: left; position: relative; } .BPT-HorizontalPane-BreadcrumbBar-Item { float: left; vertical-align: middle; line-height: 24px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; max-width: 8em; padding-left: 16px; /* chevron width + 8 */ padding-right: 8px; } .BPT-Breadcrumb-Selected { background-color: TRANSPARENT; /*[{plugin-breadcrumb-selected-background-color}]*/ color: TRANSPARENT; /*[{plugin-breadcrumb-selected-color}]*/ overflow-x: hidden; } .BPT-Breadcrumb-Hover { background-color: TRANSPARENT; /*[{plugin-breadcrumb-hover-background-color}]*/ color: TRANSPARENT; /*[{plugin-breadcrumb-hover-color}]*/ } .BPT-HorizontalPane-BreadcrumbBar { font-family: "Segoe UI", Arial, Sans-Serif; /*[{plugin-font-family}, "Segoe UI", Arial, Sans-Serif]*/ position: absolute; bottom: 0; left: 0; display: table-row; border-top: 1px solid TRANSPARENT; /*[1px solid {plugin-breadcrumb-border-color}]*/ background-color: TRANSPARENT; /*[{plugin-breadcrumb-background-color}]*/ width: 100%; height: 24px; padding: 0; margin: 0; position: fixed; z-index: 1; resize: horizontal; cursor: default; } .BPT-Breadcrumb-Tooltip { position: absolute; float: none; z-index: 2; padding: 6px; display: table; font-family: "Segoe UI", Arial, Helvetica, sans-serif; /*[{plugin-font-family}, "Segoe UI", Arial, Sans-Serif]*/ font-size: 12px; /*[{plugin-font-size}]*/ color: TRANSPARENT; /*[{plugin-breadcrumb-tooltip-color}]*/ background-color: TRANSPARENT; /*[{plugin-breadcrumb-tooltip-background-color}]*/ box-shadow: 2px 2px 2px TRANSPARENT; /*[2px 2px 2px {plugin-textbox-border-color rgba(0.5)}]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-breadcrumb-tooltip-border-color}]*/ line-height: 1.3em; max-width: 400px; word-wrap: break-word; table-layout: fixed; overflow: hidden; } .BPT-Breadcrumb-TooltipTableCell { max-width: 380px; display: table-cell; padding-left: 5px; padding-right: 5px; text-align: right; } .BPT-Breadcrumb-TooltipTableRow { display: table-row; padding-top: 5px; padding-bottom: 5px; } .BPT-Breadcrumb-Tooltip-Data { text-align: left; } .BPT-Breadcrumb-Tooltip-ClassNames { text-align: left; } #searchNextResult { right: 0px; top: 2px; } #searchPreviousResult { right: 11px; top: 2px; } // // Copyright (C) Microsoft. All rights reserved. // // // colorPickerViewModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (DomExplorer) { var ColorPickerViewModel = (function (_super) { __extends(ColorPickerViewModel, _super); function ColorPickerViewModel(bridge, palette) { _super.call(this); this._eyedropperPromise = null; this._bridge = bridge; this.palette = palette; this._traceWriter = new Common.TraceWriter(); } ColorPickerViewModel.initialize = function () { Common.ObservableHelpers.defineProperty(ColorPickerViewModel, ColorPickerViewModel.CancellationColorPropertyName, null); Common.ObservableHelpers.defineProperty(ColorPickerViewModel, ColorPickerViewModel.ColorPropertyName, ColorPickerViewModel.DEFAULT_COLOR, function (obj) { return obj.onIsColorChanged(); }, function (obj) { return obj.onIsColorChanging(); }); Common.ObservableHelpers.defineProperty(ColorPickerViewModel, ColorPickerViewModel.DockElementPropertyName, null); Common.ObservableHelpers.defineProperty(ColorPickerViewModel, ColorPickerViewModel.IsEyedropperActivePropertyName, false, function (obj) { return obj.onIsEyedropperActiveChanged(); }); Common.ObservableHelpers.defineProperty(ColorPickerViewModel, ColorPickerViewModel.IsSlidersShownPropertyName, false); Common.ObservableHelpers.defineProperty(ColorPickerViewModel, ColorPickerViewModel.IsVisiblePropertyName, false, function (obj) { return obj.onIsVisibleChanged(); }, function (obj) { return obj.onIsVisibleChanging(); }); Common.ObservableHelpers.defineProperty(ColorPickerViewModel, ColorPickerViewModel.PalettePropertyName, null); }; ColorPickerViewModel.prototype.setOriginalColor = function (color) { this.cancellationColor = color; this.color = color; }; ColorPickerViewModel.prototype.onIsColorChanged = function () { this._traceWriter.raiseEvent(552 /* Dom_SetColorUsingColorPicker_Stop */); }; ColorPickerViewModel.prototype.onIsColorChanging = function () { this._traceWriter.raiseEvent(551 /* Dom_SetColorUsingColorPicker_Start */); }; ColorPickerViewModel.prototype.onIsVisibleChanged = function () { if (this.isVisible) { this._traceWriter.raiseEvent(548 /* Dom_ShowColorPicker_Stop */); } else { if (this.isEyedropperActive) { F12.Tools.Utility.Assert.isTrue(this._eyedropperPromise); this._eyedropperPromise.cancel(); } this._traceWriter.raiseEvent(550 /* Dom_HideColorPicker_Stop */); } }; ColorPickerViewModel.prototype.onIsVisibleChanging = function () { if (!this.isVisible) { this._traceWriter.raiseEvent(547 /* Dom_ShowColorPicker_Start */); } else { this._traceWriter.raiseEvent(549 /* Dom_HideColorPicker_Start */); } }; ColorPickerViewModel.prototype.onIsEyedropperActiveChanged = function () { var _this = this; F12.Tools.Utility.Assert.hasValue(this.color); if (this.isEyedropperActive) { this._eyedropperOriginalColor = this.color; F12.Tools.Utility.Assert.isNull(this._eyedropperPromise); this._eyedropperPromise = this._bridge.runEyedropper().then(function (color) { F12.Tools.Utility.Assert.isTrue(_this.isEyedropperActive); _this.stopEyedropper(color); }, function (error) { _this.stopEyedropper(); }); this._eyedropperIntervalId = window.setInterval(function () { _this._bridge.getEyedropperColor().done(function (color) { if (_this.isEyedropperActive && color) { _this.color = color; } }, function (error) { window.clearInterval(_this._eyedropperIntervalId); _this.stopEyedropper(); }); }, 100); } else { if (this._eyedropperPromise) { this._eyedropperPromise.cancel(); } } }; ColorPickerViewModel.prototype.stopEyedropper = function (color) { window.clearInterval(this._eyedropperIntervalId); if (color) { this.color = color; } else if (this._eyedropperOriginalColor) { this.color = this._eyedropperOriginalColor; } if (this._eyedropperPromise) { this._eyedropperPromise.cancel(); } this._eyedropperIntervalId = null; this._eyedropperOriginalColor = null; this._eyedropperPromise = null; this.isEyedropperActive = false; }; ColorPickerViewModel.DEFAULT_COLOR = "rgba(0, 0, 0, 1)"; ColorPickerViewModel.CancellationColorPropertyName = "cancellationColor"; ColorPickerViewModel.ColorPropertyName = "color"; ColorPickerViewModel.DockElementPropertyName = "dockElement"; ColorPickerViewModel.IsEyedropperActivePropertyName = "isEyedropperActive"; ColorPickerViewModel.IsSlidersShownPropertyName = "isSlidersShown"; ColorPickerViewModel.IsVisiblePropertyName = "isVisible"; ColorPickerViewModel.PalettePropertyName = "palette"; return ColorPickerViewModel; })(Common.Observable); DomExplorer.ColorPickerViewModel = ColorPickerViewModel; ColorPickerViewModel.initialize(); var PaletteViewModel = (function (_super) { __extends(PaletteViewModel, _super); function PaletteViewModel(paletteCollector) { _super.call(this); this.colors = new Common.ObservableCollection(PaletteViewModel.DEFAULT_COLORS); this._paletteCollector = paletteCollector; this._paletteCompletionId = null; } PaletteViewModel.initialize = function () { Common.ObservableHelpers.defineProperty(PaletteViewModel, PaletteViewModel.ColorsPropertyName, null); Common.ObservableHelpers.defineProperty(PaletteViewModel, PaletteViewModel.IsLoadingPropertyName, false); }; PaletteViewModel.prototype.runColorCollection = function () { var _this = this; if (this.isLoading) { this._paletteCollector.abortPaletteCollection().done(function () { _this.clearPendingActions(); _this.isLoading = false; _this.runColorCollection(); }, this.onError.bind(this)); return; } this.isLoading = true; this.colors.clear(); this._paletteTimer = window.setTimeout(function () { return _this.onError(); }, 20000); this._paletteCollector.runPaletteCollection(function (colors) { return _this.onColorCollectionComplete(colors); }).done(null, function () { return _this.onError(); }); }; PaletteViewModel.prototype.onColorCollectionComplete = function (colors) { var _this = this; this.clearPendingActions(); this._paletteCompletionId = window.setImmediate(function () { var paletteColorCount = {}; var paletteColors = []; if (colors) { for (var i = 0; i < colors.length; i++) { var color = Common.RgbaColor.getString(colors[i]); if (color) { if (!paletteColorCount[color]) { paletteColorCount[color] = 0; paletteColors.push(color); } paletteColorCount[color]++; } } } paletteColors.sort(function (a, b) { return paletteColorCount[b] - paletteColorCount[a]; }); if (paletteColors.length !== 0) { _this.colors.resetItems(paletteColors); } else { _this.colors.resetItems(PaletteViewModel.DEFAULT_COLORS); } _this.isLoading = false; }); }; PaletteViewModel.prototype.clearPendingActions = function () { window.clearTimeout(this._paletteTimer); window.clearTimeout(this._paletteCompletionId); }; PaletteViewModel.prototype.onError = function () { if (this.isLoading) { this.onColorCollectionComplete(PaletteViewModel.DEFAULT_COLORS); } }; PaletteViewModel.DEFAULT_COLORS = ["rgba(255, 255, 255, 1)", "rgba(0, 0, 0, 1)"]; PaletteViewModel.ColorsPropertyName = "colors"; PaletteViewModel.IsLoadingPropertyName = "isLoading"; return PaletteViewModel; })(Common.Observable); DomExplorer.PaletteViewModel = PaletteViewModel; PaletteViewModel.initialize(); })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // bridge.ts var F12; (function (F12) { "use strict"; (function (DomExplorer) { var VSBridge = (function () { function VSBridge(vs, traceWriter) { this._vs = vs; this._proxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("F12.Common.Bridge.IDomBridge", {}, true); this._engine = { engineId: 0, portName: "" }; this._proxy.addEventListener("connect", this.onConnect.bind(this)); this._channel = new Common.VSChannel(this._proxy, traceWriter); } Object.defineProperty(VSBridge.prototype, "channel", { get: function () { return this._channel; }, enumerable: true, configurable: true }); Object.defineProperty(VSBridge.prototype, "engine", { get: function () { return this._engine; }, enumerable: true, configurable: true }); Object.defineProperty(VSBridge.prototype, "inspectElementId", { get: function () { return ""; }, enumerable: true, configurable: true }); VSBridge.prototype.setForeground = function (hwnd) { var _this = this; return this._proxy._call("getHostProcessId").then(function (pid) { Plugin.Host.allowSetForeground(pid); return _this._proxy._call("setForeground", hwnd); }); }; VSBridge.prototype.takeForeground = function () { this._proxy._post("takeForeground"); }; VSBridge.prototype.allowRemoteToTakeForeground = function () { return this._proxy._call("getRemoteProcessId").then(function (pid) { Plugin.Host.allowSetForeground(pid); }); }; VSBridge.prototype.fireAttachedEvent = function () { }; VSBridge.prototype.fireDetachedEvent = function () { }; VSBridge.prototype.runEyedropper = function () { return null; }; VSBridge.prototype.getEyedropperColor = function () { return null; }; VSBridge.prototype.clickEyedropper = function (select, x, y) { return null; }; VSBridge.prototype.addEventListener = function (eventName, callback) { switch (eventName) { case "attach": case "detach": case "connect": case "switchTab": case "activated": case "deactivated": case "break": case "run": case "load": break; default: throw new Error("Invalid eventName: " + eventName); } this._proxy.addEventListener(eventName, callback); }; VSBridge.prototype.removeEventListener = function (eventName, callback) { this._proxy.removeEventListener(eventName, callback); }; VSBridge.prototype.onConnect = function (e) { this._engine.engineId = e.engineId; this._engine.portName = e.portName; }; return VSBridge; })(); DomExplorer.VSBridge = VSBridge; var IEBridge = (function () { function IEBridge(f12, external, traceWriter) { this._f12 = f12; this._external = external; this._engine = { engineId: 0, portName: "" }; this._channel = new Common.IEChannel(external, traceWriter); } Object.defineProperty(IEBridge.prototype, "channel", { get: function () { return this._channel; }, enumerable: true, configurable: true }); Object.defineProperty(IEBridge.prototype, "engine", { get: function () { return this._engine; }, enumerable: true, configurable: true }); IEBridge.prototype.setForeground = function (hwnd) { var success = this._f12.setForeground(hwnd); return Plugin.Promise.wrap(success); }; IEBridge.prototype.takeForeground = function () { this._f12.takeForeground(); }; IEBridge.prototype.allowRemoteToTakeForeground = function () { var pid = this._f12.getRemoteProcessId(); var allow = this._f12.allowSetForeground(pid); return Plugin.Promise.wrap(allow); }; IEBridge.prototype.runEyedropper = function () { var _this = this; return new Plugin.Promise(function (completed, error) { _this._external.utilities.hookEyedropper(function (color) { try { _this._external.utilities.unhookEyedropper(); completed(color); } catch (err) { error(new Error(err.toString())); } }); }, function () { _this._external.utilities.unhookEyedropper(); }); }; IEBridge.prototype.getEyedropperColor = function () { var _this = this; return new Plugin.Promise(function (completed, error) { try { var color = _this._external.utilities.getEyedropperColor(); completed(color); } catch (err) { error(new Error(err.toString())); } }); }; IEBridge.prototype.clickEyedropper = function (select, x, y) { var _this = this; return new Plugin.Promise(function (completed, error) { try { _this._external.utilities.clickEyedropper(select, x, y); completed(); } catch (err) { error(new Error(err.toString())); } }); }; IEBridge.prototype.fireAttachedEvent = function () { this._external.fireAttachedEvent(); }; IEBridge.prototype.fireDetachedEvent = function () { this._external.fireDetachedEvent(); }; IEBridge.prototype.addEventListener = function (eventName, callback) { switch (eventName) { case "attach": case "detach": case "connect": case "switchTab": case "activated": case "deactivated": case "break": case "run": case "load": break; default: throw new Error("Invalid eventName: " + eventName); } this._external.addEventListener(eventName, callback); }; IEBridge.prototype.removeEventListener = function (eventName, callback) { this._external.removeEventListener(eventName, callback); }; return IEBridge; })(); DomExplorer.IEBridge = IEBridge; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // cssPropertyMetadata.ts var F12; (function (F12) { "use strict"; (function (DomExplorer) { DomExplorer.cssPropertyMetadata = { "animation": { "name": "animation", "enumValueListName": "", "shorthand": true }, "animation-direction": { "name": "animation-direction", "enumValueListName": "AnimationDirection" }, "animation-iteration-count": { "name": "animation-iteration-count", "enumValueListName": "Infinite" }, "animation-play-state": { "name": "animation-play-state", "enumValueListName": "PlayState" }, "animation-timing-function": { "name": "animation-timing-function", "enumValueListName": "TimingFunctionKeyword" }, "animation-fill-mode": { "name": "animation-fill-mode", "enumValueListName": "AnimationFillMode" }, "background-repeat": { "name": "background-repeat", "enumValueListName": "BackgroundRepeatStyle" }, "background-position-x": { "name": "background-position-x", "enumValueListName": "HorizontalAlignment" }, "background-position-y": { "name": "background-position-y", "enumValueListName": "VerticalAlignment" }, "background-attachment": { "name": "background-attachment", "enumValueListName": "BackgroundAttachment" }, "background-clip": { "name": "background-clip", "enumValueListName": "Box" }, "background-size": { "name": "background-size", "enumValueListName": "BackgroundSizeScaling" }, "border-radius": { "name": "border-radius", "enumValueListName": "", "shorthand": true }, "border-top-width": { "name": "border-top-width", "enumValueListName": "BorderWidthType" }, "border-top-style": { "name": "border-top-style", "enumValueListName": "BorderStyle" }, "border-right-width": { "name": "border-right-width", "enumValueListName": "BorderWidthType" }, "border-right-style": { "name": "border-right-style", "enumValueListName": "BorderStyle" }, "border-bottom-width": { "name": "border-bottom-width", "enumValueListName": "BorderWidthType" }, "border-bottom-style": { "name": "border-bottom-style", "enumValueListName": "BorderStyle" }, "border-left-width": { "name": "border-left-width", "enumValueListName": "BorderWidthType" }, "border-left-style": { "name": "border-left-style", "enumValueListName": "BorderStyle" }, "border-collapse": { "name": "border-collapse", "enumValueListName": "BorderCollapse" }, "flex": { "name": "flex", "enumValueListName": "", "shorthand": true }, "-ms-flex": { "name": "-ms-flex", "enumValueListName": "", "shorthand": true }, "flex-direction": { "name": "flex-direction", "enumValueListName": "FlexDirection" }, "flex-wrap": { "name": "flex-wrap", "enumValueListName": "FlexWrap" }, "justify-content": { "name": "justify-content", "enumValueListName": "JustifyContent" }, "align-items": { "name": "align-items", "enumValueListName": "AlignItems" }, "align-self": { "name": "align-self", "enumValueListName": "AlignSelf" }, "align-content": { "name": "align-content", "enumValueListName": "AlignContent" }, "-ms-flex-preferred-size": { "name": "-ms-flex-preferred-size", "enumValueListName": "Auto" }, "font": { "name": "font", "enumValueListName": "", "shorthand": true }, "font-size": { "name": "font-size", "enumValueListName": "FontSizes" }, "font-style": { "name": "font-style", "enumValueListName": "FontStyle" }, "font-variant": { "name": "font-variant", "enumValueListName": "FontVariant" }, "font-weight": { "name": "font-weight", "enumValueListName": "FontWeight" }, "line-height": { "name": "line-height", "enumValueListName": "Normal" }, "font-stretch": { "name": "font-stretch", "enumValueListName": "FontStretch" }, "font-size-adjust": { "name": "font-size-adjust", "enumValueListName": "None" }, "text-transform": { "name": "text-transform", "enumValueListName": "TextTransform" }, "text-underline-position": { "name": "text-underline-position", "enumValueListName": "TextUnderlinePosition" }, "-ms-grid-column-align": { "name": "-ms-grid-column-align", "enumValueListName": "GridAlign" }, "-ms-grid-row-align": { "name": "-ms-grid-row-align", "enumValueListName": "GridAlign" }, "display": { "name": "display", "enumValueListName": "Display" }, "position": { "name": "position", "enumValueListName": "Position" }, "top": { "name": "top", "enumValueListName": "Auto" }, "right": { "name": "right", "enumValueListName": "Auto" }, "bottom": { "name": "bottom", "enumValueListName": "Auto" }, "left": { "name": "left", "enumValueListName": "Auto" }, "float": { "name": "float", "enumValueListName": "FloatPosition" }, "clear": { "name": "clear", "enumValueListName": "Clear" }, "margin": { "name": "margin", "enumValueListName": "", "shorthand": true }, "margin-top": { "name": "margin-top", "enumValueListName": "Auto" }, "margin-right": { "name": "margin-right", "enumValueListName": "Auto" }, "margin-bottom": { "name": "margin-bottom", "enumValueListName": "Auto" }, "margin-left": { "name": "margin-left", "enumValueListName": "Auto" }, "padding": { "name": "padding", "enumValueListName": "", "shorthand": true }, "padding-top": { "name": "padding-top", "enumValueListName": "Empty" }, "padding-right": { "name": "padding-right", "enumValueListName": "Empty" }, "padding-bottom": { "name": "padding-bottom", "enumValueListName": "Empty" }, "padding-left": { "name": "padding-left", "enumValueListName": "Empty" }, "visibility": { "name": "visibility", "enumValueListName": "Visibility" }, "z-index": { "name": "z-index", "enumValueListName": "Auto" }, "layout-flow": { "name": "layout-flow", "enumValueListName": "LayoutFlow" }, "layout-grid-char": { "name": "layout-grid-char", "enumValueListName": "AutoNone" }, "layout-grid-line": { "name": "layout-grid-line", "enumValueListName": "AutoNone" }, "layout-grid-mode": { "name": "layout-grid-mode", "enumValueListName": "LayoutGridMode" }, "layout-grid-type": { "name": "layout-grid-type", "enumValueListName": "LayoutGridType" }, "-ms-wrap-flow": { "name": "-ms-wrap-flow", "enumValueListName": "WrapFlow" }, "-ms-wrap-margin": { "name": "-ms-wrap-margin", "enumValueListName": "Empty" }, "-ms-wrap-through": { "name": "-ms-wrap-through", "enumValueListName": "WrapThrough" }, "list-style": { "name": "list-style", "enumValueListName": "", "shorthand": true }, "list-style-type": { "name": "list-style-type", "enumValueListName": "ListStyleType" }, "list-style-position": { "name": "list-style-position", "enumValueListName": "ListStylePosition" }, "zoom": { "name": "zoom", "enumValueListName": "Normal" }, "-ms-ime-align": { "name": "-ms-ime-align", "enumValueListName": "MsImeAlign" }, "ime-mode": { "name": "ime-mode", "enumValueListName": "ImeMode" }, "page-break-before": { "name": "page-break-before", "enumValueListName": "PageBreak" }, "page-break-after": { "name": "page-break-after", "enumValueListName": "PageBreak" }, "page-break-inside": { "name": "page-break-inside", "enumValueListName": "PageBreakInside" }, "table-layout": { "name": "table-layout", "enumValueListName": "TableLayout" }, "caption-side": { "name": "caption-side", "enumValueListName": "CaptionSide" }, "empty-cells": { "name": "empty-cells", "enumValueListName": "EmptyCells" }, "column-count": { "name": "column-count", "enumValueListName": "Auto" }, "column-width": { "name": "column-width", "enumValueListName": "Auto" }, "column-gap": { "name": "column-gap", "enumValueListName": "Normal" }, "column-rule-width": { "name": "column-rule-width", "enumValueListName": "BorderWidthType" }, "column-rule-style": { "name": "column-rule-style", "enumValueListName": "BorderStyle" }, "break-before": { "name": "break-before", "enumValueListName": "Break" }, "break-after": { "name": "break-after", "enumValueListName": "Break" }, "break-inside": { "name": "break-inside", "enumValueListName": "BreakInside" }, "column-span": { "name": "column-span", "enumValueListName": "ColumnSpan" }, "column-fill": { "name": "column-fill", "enumValueListName": "ColumnFill" }, "width": { "name": "width", "enumValueListName": "Auto" }, "height": { "name": "height", "enumValueListName": "Auto" }, "min-width": { "name": "min-width", "enumValueListName": "Auto" }, "max-width": { "name": "max-width", "enumValueListName": "None" }, "min-height": { "name": "min-height", "enumValueListName": "Auto" }, "max-height": { "name": "max-height", "enumValueListName": "None" }, "box-sizing": { "name": "box-sizing", "enumValueListName": "BoxSizing" }, "overflow": { "name": "overflow", "enumValueListName": "Overflow" }, "overflow-x": { "name": "overflow-x", "enumValueListName": "Overflow" }, "overflow-y": { "name": "overflow-y", "enumValueListName": "Overflow" }, "-ms-overflow-style": { "name": "-ms-overflow-style", "enumValueListName": "OverflowStyle" }, "clip-rule": { "name": "clip-rule", "enumValueListName": "ClipRule" }, "color-interpolation-filters": { "name": "color-interpolation-filters", "enumValueListName": "ColorInterpolationFilters" }, "fill-rule": { "name": "fill-rule", "enumValueListName": "ClipRule" }, "stroke-dashoffset": { "name": "stroke-dashoffset", "enumValueListName": "Empty" }, "stroke-linecap": { "name": "stroke-linecap", "enumValueListName": "StrokeLineCap" }, "stroke-linejoin": { "name": "stroke-linejoin", "enumValueListName": "StrokeLineJoin" }, "stroke-width": { "name": "stroke-width", "enumValueListName": "Empty" }, "enable-background": { "name": "enable-background", "enumValueListName": "EnableBackground" }, "glyph-orientation-horizontal": { "name": "glyph-orientation-horizontal", "enumValueListName": "Empty" }, "glyph-orientation-vertical": { "name": "glyph-orientation-vertical", "enumValueListName": "Auto" }, "kerning": { "name": "kerning", "enumValueListName": "Auto" }, "pointer-events": { "name": "pointer-events", "enumValueListName": "PointerEvents" }, "white-space": { "name": "white-space", "enumValueListName": "WhiteSpace" }, "text-indent": { "name": "text-indent", "enumValueListName": "Empty" }, "vertical-align": { "name": "vertical-align", "enumValueListName": "VerticalAlign" }, "text-align": { "name": "text-align", "enumValueListName": "TextAlign" }, "text-align-last": { "name": "text-align-last", "enumValueListName": "TextAlignLast" }, "text-justify": { "name": "text-justify", "enumValueListName": "TextJustify" }, "direction": { "name": "direction", "enumValueListName": "Direction" }, "alignment-baseline": { "name": "alignment-baseline", "enumValueListName": "AlignmentBaseline" }, "baseline-shift": { "name": "baseline-shift", "enumValueListName": "BaselineShiftType" }, "-ms-block-progression": { "name": "-ms-block-progression", "enumValueListName": "BlockProgression" }, "dominant-baseline": { "name": "dominant-baseline", "enumValueListName": "DominantBaseline" }, "-ms-hyphenate-limit-lines": { "name": "-ms-hyphenate-limit-lines", "enumValueListName": "NoLimit" }, "-ms-hyphenate-limit-zone": { "name": "-ms-hyphenate-limit-zone", "enumValueListName": "Empty" }, "-ms-hyphens": { "name": "-ms-hyphens", "enumValueListName": "Hyphens" }, "line-break": { "name": "line-break", "enumValueListName": "LineBreak" }, "ruby-align": { "name": "ruby-align", "enumValueListName": "RubyAlign" }, "ruby-overhang": { "name": "ruby-overhang", "enumValueListName": "RubyOverhang" }, "ruby-position": { "name": "ruby-position", "enumValueListName": "RubyPosition" }, "text-anchor": { "name": "text-anchor", "enumValueListName": "TextAnchor" }, "text-justify-trim": { "name": "text-justify-trim", "enumValueListName": "TextJustifyTrim" }, "text-kashida": { "name": "text-kashida", "enumValueListName": "Empty" }, "text-kashida-space": { "name": "text-kashida-space", "enumValueListName": "Empty" }, "text-overflow": { "name": "text-overflow", "enumValueListName": "TextOverflow" }, "unicode-bidi": { "name": "unicode-bidi", "enumValueListName": "UnicodeBidi" }, "word-break": { "name": "word-break", "enumValueListName": "WordBreak" }, "letter-spacing": { "name": "letter-spacing", "enumValueListName": "Normal" }, "word-spacing": { "name": "word-spacing", "enumValueListName": "Normal" }, "word-wrap": { "name": "word-wrap", "enumValueListName": "WordWrap" }, "writing-mode": { "name": "writing-mode", "enumValueListName": "WritingMode" }, "-ms-text-combine-horizontal": { "name": "-ms-text-combine-horizontal", "enumValueListName": "MsTextCombineHorizontal" }, "-ms-text-size-adjust": { "name": "-ms-text-size-adjust", "enumValueListName": "AutoNone" }, "-ms-scroll-rails": { "name": "-ms-scroll-rails", "enumValueListName": "ScrollRailed" }, "-ms-scroll-snap-type": { "name": "-ms-scroll-snap-type", "enumValueListName": "SnapType" }, "-ms-scroll-chaining": { "name": "-ms-scroll-chaining", "enumValueListName": "ScrollChained" }, "-ms-scroll-limit": { "name": "-ms-scroll-limit", "enumValueListName": "", "shorthand": true }, "-ms-scroll-limit-x-min": { "name": "-ms-scroll-limit-x-min", "enumValueListName": "Empty" }, "-ms-scroll-limit-y-min": { "name": "-ms-scroll-limit-y-min", "enumValueListName": "Auto" }, "-ms-scroll-limit-x-max": { "name": "-ms-scroll-limit-x-max", "enumValueListName": "Auto" }, "-ms-scroll-limit-y-max": { "name": "-ms-scroll-limit-y-max", "enumValueListName": "Empty" }, "-ms-scroll-translation": { "name": "-ms-scroll-translation", "enumValueListName": "ScrollTranslation" }, "-ms-content-zooming": { "name": "-ms-content-zooming", "enumValueListName": "ContentZooming" }, "-ms-content-zoom-limit-min": { "name": "-ms-content-zoom-limit-min", "enumValueListName": "Empty" }, "-ms-content-zoom-limit-max": { "name": "-ms-content-zoom-limit-max", "enumValueListName": "Empty" }, "-ms-content-zoom-snap-type": { "name": "-ms-content-zoom-snap-type", "enumValueListName": "SnapType" }, "-ms-content-zoom-chaining": { "name": "-ms-content-zoom-chaining", "enumValueListName": "ScrollChained" }, "-ms-touch-action": { "name": "-ms-touch-action", "enumValueListName": "TouchAction" }, "touch-action": { "name": "touch-action", "enumValueListName": "TouchAction" }, "-ms-touch-select": { "name": "-ms-touch-select", "enumValueListName": "Grippers" }, "transform-style": { "name": "transform-style", "enumValueListName": "TransformStyle" }, "backface-visibility": { "name": "backface-visibility", "enumValueListName": "BackfaceVisibility" }, "-ms-interpolation-mode": { "name": "-ms-interpolation-mode", "enumValueListName": "InterpolationMode" }, "cursor": { "name": "cursor", "enumValueListName": "Cursor" }, "outline": { "name": "outline", "enumValueListName": "", "shorthand": true }, "outline-width": { "name": "outline-width", "enumValueListName": "BorderWidthType" }, "outline-style": { "name": "outline-style", "enumValueListName": "OutlineStyle" }, "-ms-user-select": { "name": "-ms-user-select", "enumValueListName": "UserSelect" }, "-ms-high-contrast-adjust": { "name": "-ms-high-contrast-adjust", "enumValueListName": "AutoNone" }, "background": { "name": "background", "enumValueListName": "", "shorthand": true }, "background-color": { "name": "background-color", "enumValueListName": "ColorName" }, "border": { "name": "border", "enumValueListName": "", "shorthand": true }, "border-image-repeat": { "name": "border-image-repeat", "enumValueListName": "BorderImageRepeat" }, "border-width": { "name": "border-width", "enumValueListName": "", "shorthand": true }, "border-style": { "name": "border-style", "enumValueListName": "", "shorthand": true }, "border-color": { "name": "border-color", "enumValueListName": "", "shorthand": true }, "border-bottom-color": { "name": "border-bottom-color", "enumValueListName": "ColorName" }, "border-left-color": { "name": "border-left-color", "enumValueListName": "ColorName" }, "border-right-color": { "name": "border-right-color", "enumValueListName": "ColorName" }, "border-top-color": { "name": "border-top-color", "enumValueListName": "ColorName" }, "color": { "name": "color", "enumValueListName": "ColorName" }, "column-rule": { "name": "column-rule", "enumValueListName": "", "shorthand": true }, "column-rule-color": { "name": "column-rule-color", "enumValueListName": "ColorName" }, "flood-color": { "name": "flood-color", "enumValueListName": "ColorName" }, "lighting-color": { "name": "lighting-color", "enumValueListName": "ColorName" }, "outline-color": { "name": "outline-color", "enumValueListName": "ColorName" }, "scrollbar-3dlight-color": { "name": "scrollbar-3dlight-color", "enumValueListName": "ColorName" }, "scrollbar-arrow-color": { "name": "scrollbar-arrow-color", "enumValueListName": "ColorName" }, "scrollbar-base-color": { "name": "scrollbar-base-color", "enumValueListName": "ColorName" }, "scrollbar-darkshadow-color": { "name": "scrollbar-darkshadow-color", "enumValueListName": "ColorName" }, "scrollbar-face-color": { "name": "scrollbar-face-color", "enumValueListName": "ColorName" }, "scrollbar-highlight-color": { "name": "scrollbar-highlight-color", "enumValueListName": "ColorName" }, "scrollbar-shadow-color": { "name": "scrollbar-shadow-color", "enumValueListName": "ColorName" }, "scrollbar-track-color": { "name": "scrollbar-track-color", "enumValueListName": "ColorName" }, "transition": { "name": "transition", "enumValueListName": "", "shorthand": true }, "stop-color": { "name": "stop-color", "enumValueListName": "ColorName" } }; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // enumMetadata.ts var F12; (function (F12) { "use strict"; (function (DomExplorer) { DomExplorer.enumMetadata = { "AlignmentBaseline": { "name": "AlignmentBaseline", "values": [ "baseline", "before-edge", "text-before-edge", "after-edge", "text-after-edge", "central", "middle", "ideographic", "alphabetic", "hanging", "mathematical", "auto" ] }, "AllNone": { "name": "AllNone", "values": [ "all", "none" ] }, "AnimationDirection": { "name": "AnimationDirection", "values": [ "normal", "alternate", "reverse", "alternate-reverse" ] }, "AnimationFillMode": { "name": "AnimationFillMode", "values": [ "none", "forwards", "backwards", "both" ] }, "Any": { "name": "Any", "values": [ "any" ] }, "Auto": { "name": "Auto", "values": [ "auto" ] }, "AutoNone": { "name": "AutoNone", "values": [ "auto", "none" ] }, "BackfaceVisibility": { "name": "BackfaceVisibility", "values": [ "visible", "hidden" ] }, "BackgroundAttachment": { "name": "BackgroundAttachment", "values": [ "scroll", "fixed", "local" ] }, "BackgroundRepeatStyle": { "name": "BackgroundRepeatStyle", "values": [ "repeat-x", "repeat-y", "repeat", "space", "round", "no-repeat" ] }, "BackgroundSizeScaling": { "name": "BackgroundSizeScaling", "values": [ "contain", "cover" ] }, "BaselineShiftType": { "name": "BaselineShiftType", "values": [ "baseline", "sub", "super" ] }, "BlockProgression": { "name": "BlockProgression", "values": [ "tb", "rl", "bt", "lr" ] }, "BorderCollapse": { "name": "BorderCollapse", "values": [ "collapse", "separate" ] }, "BorderImageRepeat": { "name": "BorderImageRepeat", "values": [ "stretch", "repeat", "round", "space" ] }, "BorderStyle": { "name": "BorderStyle", "values": [ "none", "solid", "dashed", "dotted", "double", "groove", "hidden", "inset", "outset", "ridge", "window-inset" ] }, "BorderWidthType": { "name": "BorderWidthType", "values": [ "thin", "medium", "thick" ] }, "Box": { "name": "Box", "values": [ "border-box", "padding-box", "content-box" ] }, "AlignItems": { "name": "AlignItems", "values": [ "flex-start", "center", "flex-end", "baseline", "stretch" ] }, "FlexDirection": { "name": "FlexDirection", "values": [ "row", "row-reverse", "column", "column-reverse" ] }, "AlignSelf": { "name": "AlignSelf", "values": [ "auto", "flex-start", "center", "flex-end", "baseline", "stretch" ] }, "AlignContent": { "name": "AlignContent", "values": [ "flex-start", "center", "flex-end", "space-between", "space-around", "stretch" ] }, "FlexWrap": { "name": "FlexWrap", "values": [ "nowrap", "wrap", "wrap-reverse" ] }, "JustifyContent": { "name": "JustifyContent", "values": [ "flex-start", "center", "flex-end", "space-between", "space-around" ] }, "BoxSizing": { "name": "BoxSizing", "values": [ "content-box", "border-box" ] }, "Break": { "name": "Break", "values": [ "auto", "always", "avoid", "left", "right", "page", "column", "avoid-page", "avoid-column" ] }, "BreakInside": { "name": "BreakInside", "values": [ "auto", "avoid", "avoid-page", "avoid-column" ] }, "Buffering": { "name": "Buffering", "values": [ "none", "metadata", "auto" ] }, "Button": { "name": "Button", "values": [ "submit", "reset", "button" ] }, "CaptionSide": { "name": "CaptionSide", "values": [ "top", "bottom", "left", "right" ] }, "Clear": { "name": "Clear", "values": [ "none", "left", "right", "both" ] }, "ClipRule": { "name": "ClipRule", "values": [ "nonzero", "evenodd" ] }, "ColorInterpolationFilters": { "name": "ColorInterpolationFilters", "values": [ "auto", "sRGB", "linearRGB" ] }, "ColumnFill": { "name": "ColumnFill", "values": [ "auto", "balance" ] }, "ColumnSpan": { "name": "ColumnSpan", "values": [ "1", "all" ] }, "Command": { "name": "Command", "values": [ "command", "checkbox", "radio" ] }, "ContentZooming": { "name": "ContentZooming", "values": [ "none", "zoom" ] }, "ContentZoomStyle": { "name": "ContentZoomStyle", "values": [ "immutable", "mutable" ] }, "ContentZoomSnapStyle": { "name": "ContentZoomSnapStyle", "values": [ "flat", "well" ] }, "Cursor": { "name": "Cursor", "values": [ "auto", "pointer", "default", "context-menu", "help", "none", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "e-resize", "n-resize", "ne-resize", "nw-resize", "s-resize", "se-resize", "sw-resize", "w-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "col-resize", "row-resize", "all-scroll" ] }, "Direction": { "name": "Direction", "values": [ "ltr", "rtl" ] }, "Display": { "name": "Display", "values": [ "inline", "block", "none", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "-ms-flexbox", "-ms-grid", "-ms-inline-grid", "-ms-inline-flexbox", "run-in", "ruby", "ruby-base", "ruby-text", "list-item", "ruby-base-container", "ruby-text-container", "flex", "inline-flex" ] }, "DominantBaseline": { "name": "DominantBaseline", "values": [ "auto", "use-script", "no-change", "reset-size", "alphabetic", "hanging", "ideographic", "mathematical", "central", "middle", "text-after-edge", "text-before-edge" ] }, "Empty": { "name": "Empty", "values": [ "empty" ] }, "EmptyCells": { "name": "EmptyCells", "values": [ "show", "hide" ] }, "EnableBackground": { "name": "EnableBackground", "values": [ "accumulate", "new" ] }, "Enctype": { "name": "Enctype", "values": [ "application/x-www-form-urlencoded", "multipart/form-data", "text/plain" ] }, "Fit": { "name": "Fit", "values": [ "fill", "hidden", "meet", "slice" ] }, "FloatPosition": { "name": "FloatPosition", "values": [ "none", "left", "right" ] }, "FontFamilyGenericType": { "name": "FontFamilyGenericType", "values": [ "serif", "sans-serif", "cursive", "fantasy", "monospace" ] }, "FontSizes": { "name": "FontSizes", "values": [ "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller" ] }, "FontStretch": { "name": "FontStretch", "values": [ "normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", "wider", "narrower" ] }, "FontStyle": { "name": "FontStyle", "values": [ "normal", "italic", "oblique" ] }, "FontType": { "name": "FontType", "values": [ "caption", "icon", "menu", "message-box", "small-caption", "status-bar" ] }, "FontVariant": { "name": "FontVariant", "values": [ "normal", "small-caps" ] }, "FontWeight": { "name": "FontWeight", "values": [ "normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900" ] }, "FormMethod": { "name": "FormMethod", "values": [ "get", "post" ] }, "GridAlign": { "name": "GridAlign", "values": [ "start", "center", "end", "stretch" ] }, "GridLength": { "name": "GridLength", "values": [ "auto", "none", "min-content", "max-content" ] }, "Grippers": { "name": "Grippers", "values": [ "none", "grippers" ] }, "HorizontalAlignment": { "name": "HorizontalAlignment", "values": [ "left", "center", "right" ] }, "HyphenateLimitLast": { "name": "HyphenateLimitLast", "values": [ "none", "always", "column", "page", "spread" ] }, "Hyphens": { "name": "Hyphens", "values": [ "none", "manual", "auto" ] }, "MsImeAlign": { "name": "MsImeAlign", "values": [ "auto", "after" ] }, "ImeMode": { "name": "ImeMode", "values": [ "auto", "active", "inactive", "disabled" ] }, "Infinite": { "name": "Infinite", "values": [ "infinite" ] }, "Input": { "name": "Input", "values": [ "hidden", "text", "search", "tel", "url", "email", "password", "datetime", "date", "month", "week", "time", "datetime-local", "number", "range", "color", "checkbox", "radio", "file", "submit", "image", "reset", "button" ] }, "Inset": { "name": "Inset", "values": [ "inset" ] }, "InteractionChaining": { "name": "InteractionChaining", "values": [ "none", "parent" ] }, "InterpolationMode": { "name": "InterpolationMode", "values": [ "nearest-neighbor", "bicubic" ] }, "LayoutFlow": { "name": "LayoutFlow", "values": [ "horizontal", "vertical-ideographic" ] }, "LayoutGridMode": { "name": "LayoutGridMode", "values": [ "both", "none", "line", "char" ] }, "LayoutGridType": { "name": "LayoutGridType", "values": [ "loose", "strict", "fixed" ] }, "LinearGradientHorizontalAlignment": { "name": "LinearGradientHorizontalAlignment", "values": [ "left", "right" ] }, "LinearGradientVerticalAlignment": { "name": "LinearGradientVerticalAlignment", "values": [ "top", "bottom" ] }, "LineBreak": { "name": "LineBreak", "values": [ "normal", "strict" ] }, "ListStylePosition": { "name": "ListStylePosition", "values": [ "inside", "outside" ] }, "ListStyleType": { "name": "ListStyleType", "values": [ "disc", "none", "decimal", "square", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-greek", "lower-latin", "upper-latin", "armenian", "georgian", "lower-alpha", "upper-alpha", "circle", "upper-greek" ] }, "Marks": { "name": "Marks", "values": [ "crop", "cross", "none" ] }, "Menu": { "name": "Menu", "values": [ "context", "toolbar" ] }, "MsTextCombineHorizontal": { "name": "MsTextCombineHorizontal", "values": [ "none", "all", "digits" ] }, "NoLimit": { "name": "NoLimit", "values": [ "no-limit" ] }, "None": { "name": "None", "values": [ "none" ] }, "NoneNormal": { "name": "NoneNormal", "values": [ "none", "normal" ] }, "Normal": { "name": "Normal", "values": [ "normal" ] }, "OnOff": { "name": "OnOff", "values": [ "on", "off" ] }, "OpenQuote": { "name": "OpenQuote", "values": [ "open-quote", "close-quote", "no-open-quote", "no-close-quote" ] }, "OutlineStyle": { "name": "OutlineStyle", "values": [ "none", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset", "window-inset" ] }, "Overflow": { "name": "Overflow", "values": [ "visible", "hidden", "scroll", "auto" ] }, "OverflowStyle": { "name": "OverflowStyle", "values": [ "scrollbar", "-ms-autohiding-scrollbar", "none", "auto" ] }, "PageBreak": { "name": "PageBreak", "values": [ "auto", "always", "avoid", "left", "right" ] }, "PageBreakInside": { "name": "PageBreakInside", "values": [ "auto", "avoid" ] }, "PlayState": { "name": "PlayState", "values": [ "running", "paused" ] }, "PointerEvents": { "name": "PointerEvents", "values": [ "visiblePainted", "visibleFill", "visibleStroke", "visible", "painted", "fill", "stroke", "all", "none", "auto" ] }, "Position": { "name": "Position", "values": [ "static", "relative", "absolute", "fixed", "-ms-page", "-ms-device-fixed" ] }, "RadialGradientExtent": { "name": "RadialGradientExtent", "values": [ "closest-side", "closest-corner", "farthest-side", "farthest-corner" ] }, "RadialGradientShape": { "name": "RadialGradientShape", "values": [ "circle", "ellipse" ] }, "RubyAlign": { "name": "RubyAlign", "values": [ "auto", "left", "center", "right", "distribute-letter", "distribute-space", "line-edge" ] }, "RubyOverhang": { "name": "RubyOverhang", "values": [ "auto", "whitespace", "none" ] }, "RubyPosition": { "name": "RubyPosition", "values": [ "above", "inline" ] }, "Sandbox": { "name": "Sandbox", "values": [ "allow-same-origin", "allow-forms", "allow-scripts" ] }, "Scope": { "name": "Scope", "values": [ "row", "col", "rowgroup", "colgroup" ] }, "ScrollChained": { "name": "ScrollChained", "values": [ "none", "chained" ] }, "ScrollTranslation": { "name": "ScrollTranslation", "values": [ "vertical-to-horizontal", "none", "inherit" ] }, "ScrollRailed": { "name": "ScrollRailed", "values": [ "none", "railed" ] }, "Shape": { "name": "Shape", "values": [ "circle", "default", "poly", "rect" ] }, "SnapType": { "name": "SnapType", "values": [ "none", "proximity", "mandatory" ] }, "StartEnd": { "name": "StartEnd", "values": [ "start", "end" ] }, "StrokeLineCap": { "name": "StrokeLineCap", "values": [ "butt", "round", "square" ] }, "StrokeLineJoin": { "name": "StrokeLineJoin", "values": [ "miter", "round", "bevel" ] }, "TableLayout": { "name": "TableLayout", "values": [ "auto", "fixed" ] }, "TextAlign": { "name": "TextAlign", "values": [ "left", "right", "center", "justify" ] }, "TextAlignLast": { "name": "TextAlignLast", "values": [ "auto", "left", "right", "center", "justify" ] }, "TextAnchor": { "name": "TextAnchor", "values": [ "start", "middle", "end" ] }, "TextAutoSpace": { "name": "TextAutoSpace", "values": [ "ideograph-alpha", "ideograph-numeric", "ideograph-parenthesis", "ideograph-space" ] }, "TextDecoration": { "name": "TextDecoration", "values": [ "none", "underline", "overline", "line-through", "blink" ] }, "TextJustify": { "name": "TextJustify", "values": [ "auto", "distribute", "distribute-all-lines", "inter-cluster", "inter-ideograph", "inter-word", "kashida", "newspaper" ] }, "TextJustifyTrim": { "name": "TextJustifyTrim", "values": [ "none", "punctuation", "punct-and-kana" ] }, "TextOverflow": { "name": "TextOverflow", "values": [ "ellipsis", "clip" ] }, "TextTransform": { "name": "TextTransform", "values": [ "capitalize", "uppercase", "lowercase", "none" ] }, "TextUnderlinePosition": { "name": "TextUnderlinePosition", "values": [ "above", "below", "auto" ] }, "TimingFunctionKeyword": { "name": "TimingFunctionKeyword", "values": [ "ease", "linear", "ease-in", "ease-out", "ease-in-out", "step-start", "step-end" ] }, "TouchAction": { "name": "TouchAction", "values": [ "pan-x", "pan-y", "pinch-zoom", "manipulation", "double-tap-zoom", "none", "auto", "cross-slide-x", "cross-slide-y" ] }, "TransformStyle": { "name": "TransformStyle", "values": [ "flat" ] }, "TrueFalse": { "name": "TrueFalse", "values": [ "true", "false" ] }, "UnicodeBidi": { "name": "UnicodeBidi", "values": [ "normal", "embed", "bidi-override" ] }, "UserSelect": { "name": "UserSelect", "values": [ "none", "text", "element", "auto" ] }, "VerticalAlign": { "name": "VerticalAlign", "values": [ "top", "middle", "bottom", "super", "auto", "baseline", "sub", "text-top", "text-bottom" ] }, "VerticalAlignment": { "name": "VerticalAlignment", "values": [ "top", "center", "bottom" ] }, "Visibility": { "name": "Visibility", "values": [ "visible", "hidden", "collapse" ] }, "WhiteSpace": { "name": "WhiteSpace", "values": [ "normal", "pre", "nowrap", "pre-wrap", "pre-line" ] }, "WordBreak": { "name": "WordBreak", "values": [ "normal", "break-all", "keep-all" ] }, "WordWrap": { "name": "WordWrap", "values": [ "normal", "break-word" ] }, "Wrap": { "name": "Wrap", "values": [ "soft", "hard" ] }, "WrapFlow": { "name": "WrapFlow", "values": [ "auto", "both", "start", "end", "clear", "minimum", "maximum" ] }, "WrapThrough": { "name": "WrapThrough", "values": [ "wrap", "none" ] }, "WritingMode": { "name": "WritingMode", "values": [ "lr-tb", "rl-tb", "tb-rl", "bt-rl", "tb-lr", "bt-lr", "lr-bt", "rl-bt", "lr", "rl", "tb" ] }, "YesNoAuto": { "name": "YesNoAuto", "values": [ "yes", "no", "auto" ] }, "ColorName": { "name": "ColorName", "values": [ "aliceBlue", "antiqueWhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedAlmond", "blue", "blueViolet", "brown", "burlyWood", "cadetBlue", "chartreuse", "chocolate", "coral", "cornflowerBlue", "cornsilk", "crimson", "cyan", "darkBlue", "darkCyan", "darkGoldenrod", "darkGray", "darkGrey", "darkGreen", "darkKhaki", "darkMagenta", "darkOliveGreen", "darkOrange", "darkOrchid", "darkRed", "darkSalmon", "darkSeaGreen", "darkSlateBlue", "darkSlateGray", "darkSlateGrey", "darkTurquoise", "darkViolet", "deepPink", "deepSkyBlue", "dimGray", "dimGrey", "dodgerBlue", "fireBrick", "floralWhite", "forestGreen", "fuchsia", "gainsboro", "ghostWhite", "gold", "goldenrod", "gray", "green", "greenYellow", "grey", "honeydew", "hotPink", "indianRed", "indigo", "ivory", "khaki", "lavender", "lavenderBlush", "lawnGreen", "lemonChiffon", "lightBlue", "lightCoral", "lightCyan", "lightGoldenrodYellow", "lightGreen", "lightGray", "lightGrey", "lightPink", "lightSalmon", "lightSeaGreen", "lightSkyBlue", "lightSlateGray", "lightSlateGrey", "lightSteelBlue", "lightYellow", "lime", "limeGreen", "linen", "magenta", "maroon", "mediumAquamarine", "mediumBlue", "mediumOrchid", "mediumPurple", "mediumSeaGreen", "mediumSlateBlue", "mediumSpringGreen", "mediumTurquoise", "mediumVioletRed", "midnightBlue", "mintCream", "mistyRose", "moccasin", "navajoWhite", "navy", "oldLace", "olive", "oliveDrab", "orange", "orangeRed", "orchid", "paleGoldenrod", "paleGreen", "paleTurquoise", "paleVioletRed", "papayaWhip", "peachPuff", "peru", "pink", "plum", "powderBlue", "purple", "red", "rosyBrown", "royalBlue", "saddleBrown", "salmon", "sandyBrown", "seaGreen", "seashell", "sienna", "silver", "skyBlue", "slateBlue", "slateGray", "slateGrey", "snow", "springGreen", "steelBlue", "tan", "teal", "thistle", "tomato", "transparent", "turquoise", "violet", "wheat", "white", "whiteSmoke", "yellow", "yellowGreen" ] } }; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // htmlMetadata.ts var F12; (function (F12) { "use strict"; (function (DomExplorer) { DomExplorer.htmlMetadata = { "a": { "tagName": "a", "attributes": { "href": { "name": "href" }, "target": { "name": "target" }, "rel": { "name": "rel" }, "media": { "name": "media" }, "hreflang": { "name": "hreflang" }, "type": { "name": "type" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "abbr": { "tagName": "abbr", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "address": { "tagName": "address", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "area": { "tagName": "area", "attributes": { "alt": { "name": "alt" }, "coords": { "name": "coords" }, "shape": { "name": "shape", "enumValueListName": "Shape" }, "href": { "name": "href" }, "target": { "name": "target" }, "rel": { "name": "rel" }, "media": { "name": "media" }, "hreflang": { "name": "hreflang" }, "type": { "name": "type" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "article": { "tagName": "article", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "aside": { "tagName": "aside", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "audio": { "tagName": "audio", "attributes": { "src": { "name": "src" }, "preload": { "name": "preload", "enumValueListName": "Buffering" }, "autoplay": { "name": "autoplay" }, "loop": { "name": "loop" }, "controls": { "name": "controls" }, "muted": { "name": "muted" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "b": { "tagName": "b", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "base": { "tagName": "base", "attributes": { "href": { "name": "href" }, "target": { "name": "target" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "basefont": { "tagName": "basefont", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "bdo": { "tagName": "bdo", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "bgsound": { "tagName": "bgsound", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "big": { "tagName": "big", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "blockquote": { "tagName": "blockquote", "attributes": { "cite": { "name": "cite" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "body": { "tagName": "body", "attributes": { "onafterprint": { "name": "onafterprint" }, "onbeforeprint": { "name": "onbeforeprint" }, "onbeforeunload": { "name": "onbeforeunload" }, "onblur": { "name": "onblur" }, "onerror": { "name": "onerror" }, "onfocus": { "name": "onfocus" }, "onhashchange": { "name": "onhashchange" }, "onload": { "name": "onload" }, "onmessage": { "name": "onmessage" }, "onoffline": { "name": "onoffline" }, "ononline": { "name": "ononline" }, "onpagehide": { "name": "onpagehide" }, "onpageshow": { "name": "onpageshow" }, "onpopstate": { "name": "onpopstate" }, "onredo": { "name": "onredo" }, "onresize": { "name": "onresize" }, "onstorage": { "name": "onstorage" }, "onundo": { "name": "onundo" }, "onunload": { "name": "onunload" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "br": { "tagName": "br", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "button": { "tagName": "button", "attributes": { "autofocus": { "name": "autofocus" }, "disabled": { "name": "disabled" }, "form": { "name": "form" }, "formaction": { "name": "formaction" }, "formenctype": { "name": "formenctype", "enumValueListName": "Enctype" }, "formmethod": { "name": "formmethod", "enumValueListName": "FormMethod" }, "formnovalidate": { "name": "formnovalidate" }, "formtarget": { "name": "formtarget" }, "name": { "name": "name" }, "type": { "name": "type", "enumValueListName": "Input" }, "value": { "name": "value" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "canvas": { "tagName": "canvas", "attributes": { "width": { "name": "width" }, "height": { "name": "height" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "caption": { "tagName": "caption", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "cite": { "tagName": "cite", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "code": { "tagName": "code", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "col": { "tagName": "col", "attributes": { "span": { "name": "span" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "colgroup": { "tagName": "colgroup", "attributes": { "span": { "name": "span" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "command": { "tagName": "command", "attributes": { "checked": { "name": "checked" }, "command": { "name": "command" }, "disabled": { "name": "disabled" }, "icon": { "name": "icon" }, "label": { "name": "label" }, "radiogroup": { "name": "radiogroup" }, "type": { "name": "type", "enumValueListName": "Command" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "datalist": { "tagName": "datalist", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "dd": { "tagName": "dd", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "del": { "tagName": "del", "attributes": { "cite": { "name": "cite" }, "datetime": { "name": "datetime" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "dfn": { "tagName": "dfn", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "dir": { "tagName": "dir", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "div": { "tagName": "div", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "dl": { "tagName": "dl", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "dt": { "tagName": "dt", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "em": { "tagName": "em", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "embed": { "tagName": "embed", "attributes": { "src": { "name": "src" }, "type": { "name": "type" }, "width": { "name": "width" }, "height": { "name": "height" }, "hidden": { "name": "hidden" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "fieldset": { "tagName": "fieldset", "attributes": { "disabled": { "name": "disabled" }, "form": { "name": "form" }, "name": { "name": "name" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "figcaption": { "tagName": "figcaption", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "figure": { "tagName": "figure", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "footer": { "tagName": "footer", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "form": { "tagName": "form", "attributes": { "accept-charset": { "name": "accept-charset" }, "action": { "name": "action" }, "autocomplete": { "name": "autocomplete", "enumValueListName": "OnOff" }, "enctype": { "name": "enctype", "enumValueListName": "Enctype" }, "method": { "name": "method", "enumValueListName": "FormMethod" }, "name": { "name": "name" }, "novalidate": { "name": "novalidate" }, "target": { "name": "target" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "h1": { "tagName": "h1", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "h2": { "tagName": "h2", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "h3": { "tagName": "h3", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "h4": { "tagName": "h4", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "h5": { "tagName": "h5", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "h6": { "tagName": "h6", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "head": { "tagName": "head", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "header": { "tagName": "header", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "hgroup": { "tagName": "hgroup", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "hr": { "tagName": "hr", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "html": { "tagName": "html", "attributes": { "manifest": { "name": "manifest" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "i": { "tagName": "i", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "iframe": { "tagName": "iframe", "attributes": { "src": { "name": "src" }, "srcdoc": { "name": "srcdoc" }, "name": { "name": "name" }, "sandbox": { "name": "sandbox", "enumValueListName": "Sandbox" }, "seamless": { "name": "seamless" }, "width": { "name": "width" }, "height": { "name": "height" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "img": { "tagName": "img", "attributes": { "alt": { "name": "alt" }, "src": { "name": "src" }, "usemap": { "name": "usemap" }, "ismap": { "name": "ismap" }, "width": { "name": "width" }, "height": { "name": "height" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "input": { "tagName": "input", "attributes": { "accept": { "name": "accept" }, "alt": { "name": "alt" }, "autocomplete": { "name": "autocomplete", "enumValueListName": "OnOff" }, "autofocus": { "name": "autofocus" }, "checked": { "name": "checked" }, "disabled": { "name": "disabled" }, "form": { "name": "form" }, "formaction": { "name": "formaction" }, "formenctype": { "name": "formenctype", "enumValueListName": "Enctype" }, "formmethod": { "name": "formmethod", "enumValueListName": "FormMethod" }, "formnovalidate": { "name": "formnovalidate" }, "formtarget": { "name": "formtarget" }, "height": { "name": "height" }, "list": { "name": "list" }, "max": { "name": "max" }, "maxlength": { "name": "maxlength" }, "min": { "name": "min" }, "multiple": { "name": "multiple" }, "name": { "name": "name" }, "pattern": { "name": "pattern" }, "placeholder": { "name": "placeholder" }, "readonly": { "name": "readonly" }, "required": { "name": "required" }, "size": { "name": "size" }, "src": { "name": "src" }, "step": { "name": "step", "enumValueListName": "Any" }, "type": { "name": "type", "enumValueListName": "Input" }, "value": { "name": "value" }, "width": { "name": "width" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "ins": { "tagName": "ins", "attributes": { "cite": { "name": "cite" }, "datetime": { "name": "datetime" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "kbd": { "tagName": "kbd", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "keygen": { "tagName": "keygen", "attributes": { "autofocus": { "name": "autofocus" }, "challenge": { "name": "challenge" }, "disabled": { "name": "disabled" }, "form": { "name": "form" }, "keytype": { "name": "keytype" }, "name": { "name": "name" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "label": { "tagName": "label", "attributes": { "form": { "name": "form" }, "for": { "name": "for" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "legend": { "tagName": "legend", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "li": { "tagName": "li", "attributes": { "value": { "name": "value" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "link": { "tagName": "link", "attributes": { "href": { "name": "href" }, "rel": { "name": "rel" }, "media": { "name": "media" }, "hreflang": { "name": "hreflang" }, "type": { "name": "type" }, "sizes": { "name": "sizes" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "map": { "tagName": "map", "attributes": { "name": { "name": "name" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "mark": { "tagName": "mark", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "menu": { "tagName": "menu", "attributes": { "type": { "name": "type", "enumValueListName": "Menu" }, "label": { "name": "label" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "meta": { "tagName": "meta", "attributes": { "name": { "name": "name" }, "http-equiv": { "name": "http-equiv" }, "content": { "name": "content" }, "charset": { "name": "charset" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "nav": { "tagName": "nav", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "noframes": { "tagName": "noframes", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "noscript": { "tagName": "noscript", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "object": { "tagName": "object", "attributes": { "data": { "name": "data" }, "type": { "name": "type" }, "name": { "name": "name" }, "usemap": { "name": "usemap" }, "form": { "name": "form" }, "width": { "name": "width" }, "height": { "name": "height" }, "typemustmatch": { "name": "typemustmatch" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "ol": { "tagName": "ol", "attributes": { "reversed": { "name": "reversed" }, "start": { "name": "start" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "optgroup": { "tagName": "optgroup", "attributes": { "disabled": { "name": "disabled" }, "label": { "name": "label" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "option": { "tagName": "option", "attributes": { "disabled": { "name": "disabled" }, "label": { "name": "label" }, "selected": { "name": "selected" }, "value": { "name": "value" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "output": { "tagName": "output", "attributes": { "for": { "name": "for" }, "form": { "name": "form" }, "name": { "name": "name" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "p": { "tagName": "p", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "param": { "tagName": "param", "attributes": { "name": { "name": "name" }, "value": { "name": "value" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "pre": { "tagName": "pre", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "progress": { "tagName": "progress", "attributes": { "value": { "name": "value" }, "max": { "name": "max" }, "form": { "name": "form" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "q": { "tagName": "q", "attributes": { "cite": { "name": "cite" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "rp": { "tagName": "rp", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "rt": { "tagName": "rt", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "ruby": { "tagName": "ruby", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "s": { "tagName": "s", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "samp": { "tagName": "samp", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "script": { "tagName": "script", "attributes": { "src": { "name": "src" }, "async": { "name": "async" }, "defer": { "name": "defer" }, "type": { "name": "type" }, "charset": { "name": "charset" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "section": { "tagName": "section", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "select": { "tagName": "select", "attributes": { "autofocus": { "name": "autofocus" }, "disabled": { "name": "disabled" }, "form": { "name": "form" }, "multiple": { "name": "multiple" }, "name": { "name": "name" }, "required": { "name": "required" }, "size": { "name": "size" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "small": { "tagName": "small", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "source": { "tagName": "source", "attributes": { "src": { "name": "src" }, "type": { "name": "type" }, "media": { "name": "media" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "span": { "tagName": "span", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "strike": { "tagName": "strike", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "strong": { "tagName": "strong", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "style": { "tagName": "style", "attributes": { "media": { "name": "media" }, "type": { "name": "type" }, "scoped": { "name": "scoped" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "sub": { "tagName": "sub", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "sup": { "tagName": "sup", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "table": { "tagName": "table", "attributes": { "summary": { "name": "summary" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "tbody": { "tagName": "tbody", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "td": { "tagName": "td", "attributes": { "colspan": { "name": "colspan" }, "rowspan": { "name": "rowspan" }, "headers": { "name": "headers" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "textarea": { "tagName": "textarea", "attributes": { "autofocus": { "name": "autofocus" }, "cols": { "name": "cols" }, "disabled": { "name": "disabled" }, "form": { "name": "form" }, "maxlength": { "name": "maxlength" }, "name": { "name": "name" }, "placeholder": { "name": "placeholder" }, "readonly": { "name": "readonly" }, "required": { "name": "required" }, "rows": { "name": "rows" }, "wrap": { "name": "wrap", "enumValueListName": "Wrap" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "tfoot": { "tagName": "tfoot", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "th": { "tagName": "th", "attributes": { "colspan": { "name": "colspan" }, "rowspan": { "name": "rowspan" }, "headers": { "name": "headers" }, "scope": { "name": "scope", "enumValueListName": "Scope" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "thead": { "tagName": "thead", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "title": { "tagName": "title", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "tr": { "tagName": "tr", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "track": { "tagName": "track", "attributes": { "src": { "name": "src" }, "srclang": { "name": "srclang" }, "kind": { "name": "kind" }, "label": { "name": "label" }, "default": { "name": "default" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "tt": { "tagName": "tt", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "u": { "tagName": "u", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "ul": { "tagName": "ul", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "var": { "tagName": "var", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "video": { "tagName": "video", "attributes": { "src": { "name": "src" }, "poster": { "name": "poster" }, "preload": { "name": "preload", "enumValueListName": "Buffering" }, "autoplay": { "name": "autoplay" }, "loop": { "name": "loop" }, "controls": { "name": "controls" }, "width": { "name": "width" }, "height": { "name": "height" }, "muted": { "name": "muted" }, "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } }, "wbr": { "tagName": "wbr", "attributes": { "accesskey": { "name": "accesskey" }, "class": { "name": "class" }, "contenteditable": { "name": "contenteditable", "enumValueListName": "TrueFalse" }, "contextmenu": { "name": "contextmenu" }, "dir": { "name": "dir", "enumValueListName": "Direction" }, "draggable": { "name": "draggable", "enumValueListName": "TrueFalse" }, "dropzone": { "name": "dropzone" }, "hidden": { "name": "hidden" }, "id": { "name": "id" }, "inert": { "name": "inert" }, "spellcheck": { "name": "spellcheck", "enumValueListName": "TrueFalse" }, "style": { "name": "style" }, "tabindex": { "name": "tabindex" }, "title": { "name": "title" }, "translate": { "name": "translate" } } } }; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // cssAndHtmlMetadataSource.ts var F12; (function (F12) { (function (DomExplorer) { "use strict"; var CssAndHtmlMetadataSource = (function () { function CssAndHtmlMetadataSource() { this._cssMetadata = F12.DomExplorer.cssPropertyMetadata; this._enumValueLists = F12.DomExplorer.enumMetadata; this._htmlMetadata = F12.DomExplorer.htmlMetadata; this._htmlTagNames = []; var htmlTagName; for (htmlTagName in this._htmlMetadata) { this._htmlTagNames.push(htmlTagName); } this.sortEnumValueListContents(); } CssAndHtmlMetadataSource.prototype.getCssShorthandList = function () { var shorthandList = []; for (var property in this._cssMetadata) { if (this._cssMetadata[property].shorthand) { shorthandList.push(this._cssMetadata[property].name); } } shorthandList.sort(); return shorthandList; }; CssAndHtmlMetadataSource.prototype.getCssValueList = function (cssPropertyName) { var propertyMetadata = this._cssMetadata[cssPropertyName]; if (!propertyMetadata || !propertyMetadata.enumValueListName) { return null; } var list = this._enumValueLists[propertyMetadata.enumValueListName].values; list.sort(); return list; }; CssAndHtmlMetadataSource.prototype.getHtmlValueList = function (htmlTagName, htmlAttributeName) { var htmlElementMetadata = this._htmlMetadata[htmlTagName]; if (!htmlElementMetadata) { return null; } var htmlAttributeMetadata = htmlElementMetadata[htmlAttributeName]; if (!htmlAttributeMetadata) { return null; } var list = this._enumValueLists[htmlAttributeMetadata.enumValueListName].values; list.sort(); return list; }; CssAndHtmlMetadataSource.prototype.getHtmlTagNames = function () { return this._htmlTagNames; }; CssAndHtmlMetadataSource.prototype.getHtmlAttributeNames = function (htmlTagName) { var htmlAttributeNamesForGivenTagName = []; var htmlElementMetadata = this._htmlMetadata[htmlTagName]; if (!htmlElementMetadata) { return null; } var htmlAttributeName; for (htmlAttributeName in htmlElementMetadata) { htmlAttributeNamesForGivenTagName.push(htmlAttributeName); } htmlAttributeNamesForGivenTagName.sort(); return htmlAttributeNamesForGivenTagName; }; CssAndHtmlMetadataSource.prototype.sortEnumValueListContents = function () { for (var listName in this._enumValueLists) { var listContainer = this._enumValueLists[listName]; listContainer.values.sort(); } }; return CssAndHtmlMetadataSource; })(); DomExplorer.CssAndHtmlMetadataSource = CssAndHtmlMetadataSource; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // stylePropertyValueIntellisenseProvider.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (DomExplorer) { var StylePropertyValueIntellisenseProvider = (function (_super) { __extends(StylePropertyValueIntellisenseProvider, _super); function StylePropertyValueIntellisenseProvider(cssPropertyName, cssAndHtmlMetadataSource) { _super.call(this, false); this._metadataSource = cssAndHtmlMetadataSource; this.updateChoices(cssPropertyName); this._traceWriter = new Common.TraceWriter(); } Object.defineProperty(StylePropertyValueIntellisenseProvider.prototype, "hasChoices", { get: function () { return this._hasChoices; }, enumerable: true, configurable: true }); StylePropertyValueIntellisenseProvider.prototype.updateChoices = function (cssPropertyName) { var choices = []; var stringChoices = this._metadataSource.getCssValueList(cssPropertyName); if (stringChoices) { this._hasChoices = true; for (var i = 0; i < stringChoices.length; i++) { choices.push(new Common.Intellisense.IntellisenseChoice(stringChoices[i], "")); } } else { this._hasChoices = false; } this.choices = choices; }; StylePropertyValueIntellisenseProvider.prototype.clearChoices = function () { this.choices = []; this._hasChoices = false; }; StylePropertyValueIntellisenseProvider.prototype.fireSetFilterStartEvent = function () { }; StylePropertyValueIntellisenseProvider.prototype.fireSetFilterEndEvent = function () { }; StylePropertyValueIntellisenseProvider.prototype.fireUpdateLayoutStartEvent = function () { this._traceWriter.raiseEvent(523 /* Dom_StylesTab_Intellisense_Start */); }; StylePropertyValueIntellisenseProvider.prototype.fireUpdateLayoutEndEvent = function () { this._traceWriter.raiseEvent(524 /* Dom_StylesTab_Intellisense_Stop */); }; return StylePropertyValueIntellisenseProvider; })(Common.Intellisense.StaticContentProvider); DomExplorer.StylePropertyValueIntellisenseProvider = StylePropertyValueIntellisenseProvider; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // styleModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; (function (StyleEditMode) { StyleEditMode[StyleEditMode["None"] = 0] = "None"; StyleEditMode[StyleEditMode["Name"] = 1] = "Name"; StyleEditMode[StyleEditMode["Value"] = 2] = "Value"; StyleEditMode[StyleEditMode["Add"] = 3] = "Add"; StyleEditMode[StyleEditMode["Selector"] = 4] = "Selector"; })(Dom.StyleEditMode || (Dom.StyleEditMode = {})); var StyleEditMode = Dom.StyleEditMode; ; var StyleEditLocation = (function () { function StyleEditLocation(selection, editMode) { this.selection = selection; this.editMode = editMode; } return StyleEditLocation; })(); Dom.StyleEditLocation = StyleEditLocation; var StyleModel = (function (_super) { __extends(StyleModel, _super); function StyleModel(_remoteDom, _domExplorer, _styleCache) { var _this = this; _super.call(this); this._remoteDom = _remoteDom; this._domExplorer = _domExplorer; this._styleCache = _styleCache; this._collapsedProperties = {}; this._styleProperties = []; this.listSource = function (callback, args) { var uid = args[0]; _this._styleCache.updateView(uid, function (styles) { _this._styles = styles; callback(_this._styles.rules); _this._collapsedProperties = {}; _this.currentSelection = null; _this._styles.rules.forEach(function (rule) { rule.properties.forEach(function (property) { _this._collapsedProperties[property.uid] = true; }); }); }); if (_this._styleProperties.length === 0) { _this._remoteDom.getComputedStyles(uid).done(function (computedStylesResultArray) { if (!computedStylesResultArray) { return; } var computedStyle = computedStylesResultArray[0]; for (var propertyName in computedStyle) { _this._styleProperties.push(propertyName); } var shorthandList = _this.cssAndHtmlMetadataSource.getCssShorthandList(); for (var propertyName in shorthandList) { _this._styleProperties.push(shorthandList[propertyName]); } _this._styleProperties.sort(); }); } }; this.cssAndHtmlMetadataSource = new F12.DomExplorer.CssAndHtmlMetadataSource(); } StyleModel.clearCollapsedRules = function () { StyleModel.CollapsedRules = {}; }; StyleModel.prototype.forEachRule = function (func) { this._styles.rules.forEach(func); }; StyleModel.prototype.addUpdateListeners = function (listener) { this._styles.addUpdateListener(listener); }; StyleModel.prototype.select = function (selection) { this.currentSelection = selection; }; StyleModel.prototype.previousSelection = function (selection, navigateRulesOnly, allowSubProperties) { if (typeof allowSubProperties === "undefined") { allowSubProperties = true; } if (navigateRulesOnly) { if (selection.container) { return selection.container.container || selection.container; } return this.previousRule(selection); } var rule; var property; if (selection.isRule) { rule = this.previousRule(selection); if (rule && this.isExpanded(rule) && !this.isEmpty(rule)) { property = this.lastProperty(rule); if (allowSubProperties && this.isExpanded(property) && !this.isEmpty(property)) { return this.lastProperty(property); } return property; } return rule; } if (selection.isProperty) { property = this.previousProperty(selection); if (!property) { return selection.container; } if (allowSubProperties && this.isExpanded(property) && !this.isEmpty(property)) { return this.lastProperty(property); } return property; } property = this.previousProperty(selection); return allowSubProperties ? (property || selection.container) : selection.container; }; StyleModel.prototype.nextSelection = function (selection, navigateRulesOnly, allowSubProperties) { if (typeof allowSubProperties === "undefined") { allowSubProperties = true; } if (navigateRulesOnly) { var rule = selection.isRule ? selection : (selection.isProperty ? selection.container : selection.container.container); return this.nextRule(rule); } if (this.isExpanded(selection) && !this.isEmpty(selection)) { if (allowSubProperties || selection.isRule) { return this.firstProperty(selection); } } if (selection.isRule) { return this.nextRule(selection); } var next = this.nextProperty(selection); if (next && (allowSubProperties || next.isProperty)) { return next; } if (selection.isSubProperty && allowSubProperties) { next = this.nextProperty(selection.container); return next || this.nextRule(selection.container.container); } return this.nextRule(selection.container); }; StyleModel.prototype.outSelection = function () { var selection = this.currentSelection; return selection.container; }; StyleModel.prototype.inSelection = function () { var selection = this.currentSelection; return this.firstProperty(selection); }; StyleModel.prototype.firstRule = function () { return this._styles.rules[0]; }; StyleModel.prototype.lastRule = function () { return this._styles.rules[this._styles.rules.length - 1]; }; StyleModel.prototype.lastSelection = function (allowSubProperties) { if (typeof allowSubProperties === "undefined") { allowSubProperties = true; } var selection = this.lastRule(); if (this.isExpanded(selection) && !this.isEmpty(selection)) { selection = this.lastProperty(selection); if (this.isExpanded(selection) && !this.isEmpty(selection)) { selection = this.lastProperty(selection); } } return selection; }; StyleModel.prototype.nextRule = function (selection) { var rules = this._styles.rules; for (var i = 0; i < rules.length; i++) { if (rules[i] === selection) { return i < rules.length - 1 ? rules[i + 1] : null; } } }; StyleModel.prototype.previousRule = function (selection) { var rules = this._styles.rules; for (var i = 0; i < rules.length; i++) { if (rules[i] === selection) { return i > 0 ? rules[i - 1] : null; } } }; StyleModel.prototype.firstProperty = function (selection) { for (var i = 0; i < selection.properties.length; i++) { var property = selection.properties[i]; if (property.isApplied) { return property; } } }; StyleModel.prototype.lastProperty = function (selection) { for (var i = selection.properties.length - 1; i >= 0; i--) { var property = selection.properties[i]; if (property.isApplied) { return property; } } }; StyleModel.prototype.nextProperty = function (selection) { var properties = selection.container.properties; var found = false; for (var i = 0; i < properties.length; i++) { var property = properties[i]; if (found && property.isApplied) { return property; } else if (property === selection) { found = true; } } }; StyleModel.prototype.previousProperty = function (selection) { var properties = selection.container.properties; var previous; for (var i = 0; i < properties.length; i++) { var property = properties[i]; if (property === selection) { return previous; } if (property.isApplied) { previous = property; } } }; StyleModel.prototype.isExpanded = function (selection) { return !selection || (selection.isRule ? !StyleModel.CollapsedRules[selection.uid] : (selection.properties.length > 0 && !this._collapsedProperties[selection.uid])); }; StyleModel.prototype.isEmpty = function (selection) { for (var i = 0; i < selection.properties.length; i++) { if (selection.properties[i].isApplied) { return false; } } return true; }; StyleModel.prototype.setExpanded = function (selection, isExpanded) { if (selection.isRule || (selection.isProperty && selection.properties.length)) { var list = selection.isRule ? StyleModel.CollapsedRules : this._collapsedProperties; if (isExpanded) { delete list[selection.uid]; } else { list[selection.uid] = true; } } }; StyleModel.prototype.getStyleProperties = function () { return this._styleProperties; }; StyleModel.prototype.getPropertyById = function (propertyId) { return this._styles.getPropertyById(propertyId); }; StyleModel.prototype.getRuleById = function (ruleId) { return this._styles.getRuleById(ruleId); }; StyleModel.prototype.createNewRule = function (selector) { return this._styles.createNewRule(selector); }; StyleModel.prototype.getNextEdit = function (previousSelection, previousEditMode, isAbandonedNewProperty, moveUp) { var first; var current; var takeNext = false; var takeLast = false; if (!isAbandonedNewProperty && !previousSelection.isDeleted) { if (!moveUp && previousEditMode === 1 /* Name */) { return new StyleEditLocation(previousSelection, 2 /* Value */); } if (moveUp && previousEditMode === 2 /* Value */) { return new StyleEditLocation(previousSelection, 1 /* Name */); } } var rules = this._styles.rules; for (var i = 0; i < rules.length; i++) { var rule = rules[i]; if (rule === previousSelection && moveUp) { if (current) { return current; } takeLast = true; } if (!rule.isInlined && !rule.isDeleted) { current = new StyleEditLocation(rule, 4 /* Selector */); if (takeNext) { return current; } if (!first) { first = current; } } if (rule === previousSelection && !moveUp) { takeNext = true; } if (!rule.isDeleted && this.isExpanded(rule)) { var properties = rule.properties; var length = rule.properties.length; for (var j = 0; j < length; j++) { var property = properties[j]; if (property === previousSelection) { if (moveUp) { if (current) { return current; } takeLast = true; } else { takeNext = true; } } else if (!property.isDeleted) { current = new StyleEditLocation(property, 1 /* Name */); if (takeNext) { return current; } if (!first) { first = current; } current = new StyleEditLocation(property, 2 /* Value */); } } var lastProperty = rule.properties[length - 1]; if (previousSelection !== lastProperty || !isAbandonedNewProperty) { current = new StyleEditLocation(length ? lastProperty : rule, 3 /* Add */); if (takeNext) { return current; } if (!first) { first = current; } } } } if (takeLast && current) { return current; } if (takeNext && first) { return first; } return new StyleEditLocation(rules[0], 3 /* Add */); }; StyleModel.prototype.hoverElement = function (uid, show) { if (show) { this._domExplorer.temporaryShowElementHighlight(uid); } else { this._domExplorer.restoreElementHighlight(); } }; StyleModel.prototype.enableEditChaining = function () { this._remoteDom.enableEditChaining(); }; StyleModel.prototype.disableEditChaining = function () { this._remoteDom.disableEditChaining(); }; StyleModel.prototype.startSingleEdit = function () { this._remoteDom.startSingleEdit(); }; StyleModel.prototype.endSingleEdit = function () { this._remoteDom.endSingleEdit(); }; StyleModel.prototype.handleFileLinkClick = function (originalUrl, line, column) { try { var url = decodeURI(originalUrl); Plugin.Host.showDocument(url, line || 1, column || 1); } catch (ex) { } }; StyleModel.CollapsedRules = {}; return StyleModel; })(Common.ModelView.ListModel); Dom.StyleModel = StyleModel; })(Dom || (Dom = {})); // stylePropertyIntellisenseProvider.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (DomExplorer) { var StylePropertyIntellisenseProvider = (function (_super) { __extends(StylePropertyIntellisenseProvider, _super); function StylePropertyIntellisenseProvider(stylePropertySource) { _super.call(this, false); var choices = []; var styleProperties = stylePropertySource.getStyleProperties(); for (var i = 0; i < styleProperties.length; i++) { choices.push(new Common.Intellisense.IntellisenseChoice(styleProperties[i], "")); } this.choices = choices; this._traceWriter = new Common.TraceWriter(); } StylePropertyIntellisenseProvider.prototype.fireSetFilterStartEvent = function () { }; StylePropertyIntellisenseProvider.prototype.fireSetFilterEndEvent = function () { }; StylePropertyIntellisenseProvider.prototype.fireUpdateLayoutStartEvent = function () { this._traceWriter.raiseEvent(523 /* Dom_StylesTab_Intellisense_Start */); }; StylePropertyIntellisenseProvider.prototype.fireUpdateLayoutEndEvent = function () { this._traceWriter.raiseEvent(524 /* Dom_StylesTab_Intellisense_Stop */); }; return StylePropertyIntellisenseProvider; })(Common.Intellisense.StaticContentProvider); DomExplorer.StylePropertyIntellisenseProvider = StylePropertyIntellisenseProvider; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // styleView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var T = Common.Templating; var StyleView = (function (_super) { __extends(StyleView, _super); function StyleView(domExplorer, bridge, remoteDom, htmlElementSource, styleViewDivId, defaultItemTemplateId, model, localizer, alternateTemplates) { _super.call(this, htmlElementSource, styleViewDivId, defaultItemTemplateId, model, alternateTemplates, localizer); this._domExplorer = domExplorer; this._htmlElementSource = htmlElementSource; this._rightPaneElement = htmlElementSource.getElementById("paneRight"); this._bridge = bridge; this._remoteDom = remoteDom; this._stylesListElement = this.htmlElementSource.getElementById(this.listViewDivId); this._model = model; this._domExplorer.horizontalPane.addResizeListener(this); this._scrollContainer = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(this._stylesListElement, StyleView.CssScrollContainer); this._hotElement = undefined; this._hotElementTimeoutToken = 0; this.initializeColorPicker(); this._styleViewMenuController = new StyleViewMenuController(this, this.htmlElementSource.getElementById("paneRight"), this._stylesListElement); this.addEventHandlers(); } Object.defineProperty(StyleView.prototype, "currentSelection", { get: function () { var selection = this._model.currentSelection; if (!selection) { var selectedElement = this.currentElementSelection; if (selectedElement) { selection = this.findClosestItem(selectedElement); this._model.select(selection); } } return selection; }, set: function (selection) { this._model.currentSelection = selection; var element = this.findElementForSelection(selection); if (element) { this.setFocus(element); } else { this._rightPaneElement.focus(); } }, enumerable: true, configurable: true }); Object.defineProperty(StyleView.prototype, "currentElementSelection", { get: function () { return this._stylesListElement.querySelector(":focus"); }, enumerable: true, configurable: true }); Object.defineProperty(StyleView.prototype, "ruleCount", { get: function () { return this._stylesListElement.children.length; }, set: function (value) { throw new Error("set ruleCount not supported"); }, enumerable: true, configurable: true }); StyleView.isRuleExpanded = function (element) { element = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssRule); return element.getAttribute("aria-expanded") === "true"; }; StyleView.isPropertyExpanded = function (element) { element = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssProperty); return element.getAttribute("aria-expanded") === "true"; }; StyleView.prototype.onPropertyChange = function (event, property, arg) { switch (event) { case 3 /* IsWinning */: this.onPropertyWinningRuleChange(property, arg); break; case 4 /* IsEnabled */: this.onPropertyEnableChange(property, arg); break; case 5 /* IsApplied */: this.onPropertyAppliedChange(property, arg); break; case 6 /* Status */: this.onPropertyStatusChange(property, arg); break; case 0 /* Uid */: this.onPropertyUidChange(property, arg); break; case 1 /* Name */: this.onPropertyNameChange(property, arg); break; case 2 /* Value */: this.onPropertyValueChange(property, arg); break; case 7 /* ClearSubproperties */: this.onPropertyClearSubproperties(property); break; case 8 /* AddSubproperty */: this.onPropertyAddSubproperty(property, arg); break; case 9 /* Select */: this.onPropertySelectChange(property); break; case 10 /* Remove */: this.onPropertyRemoveChange(property, arg); break; case 11 /* Change */: this.setPropertyChangeBar(property); break; } this.checkPropertyColorUpdate(property); }; StyleView.prototype.onRuleChange = function (event, rule, args) { switch (event) { case 0 /* Uid */: this.onRuleUidChange(rule, args); break; case 1 /* Selector */: this.onRuleSelectorChange(rule, args); break; case 2 /* AddProperty */: this.onRuleAddPropertyChange(rule, args); break; case 5 /* Select */: this.onRuleSelectChange(rule); break; case 6 /* Change */: this.setRuleChangeBar(rule); break; case 7 /* FileLinkTooltip */: this.setRuleFileLinkTooltipChange(rule, args); break; case 3 /* AddRule */: this.onRuleAddRuleChange(rule); break; case 4 /* Remove */: this.onRuleRemoveChange(rule); break; } }; StyleView.prototype.postViewProcessing = function () { var _this = this; _super.prototype.postViewProcessing.call(this); this._model.forEachRule(function (rule) { if (!_this._model.isExpanded(rule)) { var element = _this.findElementForSelection(rule); _this.toggleExpander(element, StyleView.CssRule); } }); this._model.addUpdateListeners(this); this.adjustToPaneSize(); var ruleElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this._stylesListElement, StyleView.CssRule); if (ruleElement) { ruleElement.tabIndex = 1; } this._model.forEachRule(function (rule) { rule.properties.forEach(function (property) { if (property.isEnabledIndeterminate) { _this.onPropertyChange(4 /* IsEnabled */, property, undefined); _this.setPropertyChangeBar(property); } }); }); if (this._htmlElementSource.querySelector(":focus") === this._rightPaneElement) { var selection; if (this._selectionBeforeRefresh) { selection = this._model.getRuleById(this._selectionBeforeRefresh) || this._model.getPropertyById(this._selectionBeforeRefresh); this._selectionBeforeRefresh = null; } if (!selection) { selection = this._model.firstRule(); } if (selection) { this.currentSelection = selection.isSubProperty ? selection.container : selection; } } if (this._refreshCallback) { this._refreshCallback(); this._refreshCallback = null; } }; StyleView.prototype.addEventHandlers = function () { this.addMouseEventHandlers(); this.addKeyboardEventHandlers(); this.addMutationEventHandlers(); }; StyleView.prototype.toggleExpander = function (element, className) { var _this = this; return new Plugin.Promise(function (completed, error) { element = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, className); if (element) { var nowExpanded = element.getAttribute("aria-expanded") !== "true"; element.setAttribute("aria-expanded", nowExpanded ? "true" : "false"); var selection = _this.findClosestItem(element); if (selection.isRule) { _this.setRuleChangeBar(selection, false); } completed(); } else { error(new Error("Expander not found in view")); } }); }; StyleView.prototype.togglePropertyCheckbox = function (property) { return property.toggleEnable(); }; StyleView.prototype.refresh = function (value) { this._refreshCallback = value; this._rightPaneElement.focus(); var selection = this.currentSelection; if (selection) { this._selectionBeforeRefresh = selection.uid; } this._domExplorer.refreshCSSView(); }; StyleView.prototype.revertSelection = function (selection) { var _this = this; return new Plugin.Promise(function (completed, error) { selection.revert().then(function () { if (selection.isRule && !_this._model.isExpanded(selection)) { _this.toggleExpander(_this.findElementForSelection(selection), StyleView.CssRule); } completed(); }); }); }; StyleView.prototype.removeRuleOrProperty = function (selection, callback) { var _this = this; var element = this.findElementForSelection(selection); if (selection.isProperty) { var property = selection; property.commitDelete(true).then(function () { if (callback) { callback(true); } }); } else { var rule = selection; if (!rule.isInlined) { rule.commitDelete().done(function () { _this.currentSelection = _this.currentSelection; if (callback) { callback(true); } }); } } }; StyleView.prototype.addProperty = function (rule, after, propertyName, useEditor) { var _this = this; if (typeof useEditor === "undefined") { useEditor = true; } var ruleElement = this.findElementForSelection(rule); var itemElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(ruleElement, StyleView.CssItem); if (!this._model.isExpanded(rule)) { this.toggleExpander(ruleElement, StyleView.CssRule); } var before = this._model.nextSelection(after, false, false); var property = rule.addProperty(null, false, !before || before.isRule ? null : before); this._model.setExpanded(property, false); var completeAdd = function (mode, completed) { var newElement = _this.insertNewPropertyIntoView(ruleElement, property); if (newElement) { Common.ToolWindowHelpers.scrollIntoView(newElement, _this._scrollContainer); if (useEditor) { _this.prepareEditBox(property, mode); } } completed(property); }; return new Plugin.Promise(function (completed) { if (propertyName) { property.commitName(propertyName).then(function () { return completeAdd(2 /* Value */, completed); }); } else { completeAdd(1 /* Name */, completed); } }); }; StyleView.prototype.addRule = function (selector, propertyName) { var _this = this; var defaultSelector = ""; var selected = HtmlTreeView.getSelected($m("#tree")); if (selected.length > 0) { var header = selected.children(".BPT-HtmlTreeItem-Header"); defaultSelector = header.find(".BPT-HTML-Attribute-Section[data-attrName='id'] .BPT-HTML-Value").text(); if (defaultSelector) { defaultSelector = "#" + defaultSelector.trim(); } else { defaultSelector = header.find(".BPT-HTML-Attribute-Section[data-attrName='class'] .BPT-HTML-Value").text(); if (defaultSelector) { defaultSelector = "." + defaultSelector.trim().split(" ")[0]; } else { defaultSelector = selected.attr("data-tag"); } } } var rule = this._model.createNewRule(selector || defaultSelector); var newElement = this.insertNewRuleIntoView(rule); this.adjustToPaneSize(); Common.ToolWindowHelpers.scrollIntoView(newElement, this._scrollContainer); return new Plugin.Promise(function (completed, error) { if (selector) { _this.addProperty(rule, rule, propertyName, false).then(function (property) { completed(rule.properties[0]); }, error); } else { var selectorElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(newElement, StyleView.CssSelector); _this._isInEditMode = true; _this.editSelector(rule, function (isSuccess) { if (isSuccess) { completed(rule.properties[0]); } else { rule.commitDelete(); error(); } }); } }); }; StyleView.prototype.findClosestItem = function (element) { var selection; var selectedElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssSubProperty); if (selectedElement) { selection = this._model.getPropertyById(StyleView.getSubpropertyId(selectedElement)); } if (!selection) { selectedElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssProperty); if (selectedElement) { selection = this._model.getPropertyById(StyleView.getPropertyId(selectedElement)); } } if (!selection) { var selectedElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssRule); if (selectedElement) { selection = this._model.getRuleById(StyleView.getRuleId(selectedElement)); } } if (!selection) { var selectedElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssItem); if (selectedElement) { selectedElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(selectedElement, StyleView.CssRule); if (selectedElement) { selection = this._model.getRuleById(StyleView.getRuleId(selectedElement)); } } } return selection; }; StyleView.prototype.select = function (selectedElement) { var selection = this.findClosestItem(selectedElement); if (selection) { this.currentSelection = selection; return true; } return false; }; StyleView.prototype.findRuleElement = function (index) { if (index >= 0 && index < this._stylesListElement.children.length) { return this._stylesListElement.children[index]; } return null; }; StyleView.prototype.findPropertyElementForRule = function (ruleElement, name) { var nameElements = F12.DomExplorer.DomExplorerWindow.findAllDescendentsByClass(ruleElement, StyleView.CssPropertyName); for (var i = 0; i < nameElements.length; i++) { var nameElement = nameElements[i]; if (nameElement.textContent === name) { return F12.DomExplorer.DomExplorerWindow.findAncestorByClass(nameElement, StyleView.CssProperty); } } return null; }; StyleView.prototype.findSubPropertyElementForProperty = function (ruleElement, name) { var nameElements = F12.DomExplorer.DomExplorerWindow.findAllDescendentsByClass(ruleElement, StyleView.CssSubPropertyName); for (var i = 0; i < nameElements.length; i++) { var nameElement = nameElements[i]; if (nameElement.textContent === name) { return F12.DomExplorer.DomExplorerWindow.findAncestorByClass(nameElement, StyleView.CssSubProperty); } } return null; }; StyleView.prototype.setPropertyValue = function (propertyElement, value) { var propertyId = StyleView.getPropertyId(propertyElement); var property = this._model.getPropertyById(propertyId); return property.commitValue(value); }; StyleView.prototype.setPropertyName = function (propertyElement, name) { var propertyId = StyleView.getPropertyId(propertyElement); var property = this._model.getPropertyById(propertyId); return property.commitName(name); }; StyleView.prototype.setPropertyRevert = function (propertyElement) { var propertyId = StyleView.getPropertyId(propertyElement); var property = this._model.getPropertyById(propertyId); return this.revertSelection(property); }; StyleView.prototype.setRuleSelector = function (ruleElement, selector) { var ruleId = StyleView.getRuleId(ruleElement); var rule = this._model.getRuleById(ruleId); return rule.commitSelector(selector); }; StyleView.prototype.setRuleRevert = function (ruleElement) { var ruleId = StyleView.getRuleId(ruleElement); var rule = this._model.getRuleById(ruleId); return this.revertSelection(rule); }; StyleView.prototype.onPaneResize = function (leftWidth, rightWidth) { this._stylesListElement.style.maxWidth = rightWidth + "px"; }; StyleView.prototype.openTargetElementFileLink = function (rule) { var url = rule.styleHref; if (!url) { url = rule.fileUrl; } this._model.handleFileLinkClick(url, rule.fileLine, rule.fileColumn); }; StyleView.prototype.enterEditMode = function (selection, editMode) { var _this = this; var run = function (func, isInEditMode) { if (typeof isInEditMode === "undefined") { isInEditMode = true; } _this._isInEditMode = isInEditMode; setTimeout(func, 0); }; if (selection.isSubProperty) { selection = selection.container; } if (selection.isProperty && !selection.isDeleted) { var property = selection; switch (editMode) { case 1 /* Name */: run(function () { _this.editPropertyName(property); }); return true; case 2 /* Value */: run(function () { _this.editPropertyValue(property); }); return true; } } var rule = (selection.isRule ? selection : selection.container); if (!rule.isDeleted) { switch (editMode) { case 3 /* Add */: run(function () { _this.addProperty(rule, selection); }, false); return true; case 4 /* Selector */: run(function () { _this.editSelector(rule); }); return true; } } this._isInEditMode = false; return false; }; StyleView.prototype.findElementForSelection = function (selection, className) { if (!selection) { return null; } return this._stylesListElement.querySelector("[data-uid='" + selection.uid + "']" + (className ? " ." + className : "")); }; StyleView.prototype.copySelectionToClipboard = function (selection) { if (Common.ToolWindowHelpers.hasSelectedText()) { return Common.ToolWindowHelpers.copySelectedTextToClipboard(); } if (selection) { var text = null; if (selection.isProperty || selection.isSubProperty) { var property = selection; text = property.formatForCopy; } else { var rule = selection; text = rule.formatForCopy; } if (text) { clipboardData.setData("Text", text); return true; } } return false; }; Object.defineProperty(StyleView.prototype, "isFocusWithinInlineStyle", { get: function () { var selectedElement = this.currentElementSelection; if (!selectedElement) { return false; } var selection = this.findClosestItem(selectedElement); if (!selection) { return false; } var rule = (selection.isRule ? selection : selection.container); return rule && rule.isInlined; }, enumerable: true, configurable: true }); StyleView.isSubProperty = function (element) { return element.classList.contains(StyleView.CssSubProperty); }; StyleView.isProperty = function (element) { return element.classList.contains(StyleView.CssProperty); }; StyleView.isRule = function (element) { return element.classList.contains(StyleView.CssRule); }; StyleView.getSubpropertyId = function (element) { element = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssSubProperty); return element ? element.getAttribute(StyleView.ATTR_UID) : null; }; StyleView.getPropertyId = function (element) { element = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssProperty); return element.getAttribute(StyleView.ATTR_UID); }; StyleView.getRuleId = function (element) { element = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssRule); return element.getAttribute(StyleView.ATTR_UID); }; StyleView.findAncestorRuleOrProperty = function (element) { var subpropertyElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssSubProperty); if (subpropertyElement) { return subpropertyElement; } var propertyElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssProperty); if (propertyElement) { return propertyElement; } var ruleElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssRule); if (ruleElement) { return ruleElement; } return null; }; StyleView.prototype.onPropertyWinningRuleChange = function (property, isWinning) { var propertyElement = this.findPropertyElement(property); if (propertyElement) { if (property.isStrikeThrough) { propertyElement.classList.add(StyleView.CssNotWinning); } else { propertyElement.classList.remove(StyleView.CssNotWinning); } var propertyOverriddenElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(propertyElement, StyleView.CssPropertyAriaOverridden); if (propertyOverriddenElement) { propertyOverriddenElement.innerText = property.ariaOverriddenString; } } }; StyleView.prototype.adjustToPaneSize = function () { var pane = this._domExplorer.horizontalPane; this.onPaneResize(pane.leftWidth, pane.rightWidth); }; StyleView.prototype.validateHotElement = function () { var e = this._hotElement; while (e) { if (e === this._stylesListElement) { return true; } e = e.parentNode; } if (this._hotElementTimeoutToken) { window.clearTimeout(this._hotElementTimeoutToken); } this._hotElement = undefined; return false; }; StyleView.prototype.addMouseEventHandlers = function () { var _this = this; this.addHandler(this.listRoot, "mousedown", null, function (evt) { _this._isInEditModeOnMouseDown = _this._isInEditMode; if (_this._hotElementTimeoutToken) { window.clearTimeout(_this._hotElementTimeoutToken); _this._hotElementTimeoutToken = 0; } _this._hotElement = evt.target; _this._hotElementTimeoutToken = window.setTimeout(function () { _this._hotElement = undefined; _this._hotElementTimeoutToken = 0; }, 250); return true; }); this.addHandler(this.listRoot, "click", null, function (evt) { _this.validateHotElement(); var element = _this._hotElement || evt.target; var wasInEditMode = _this._isInEditModeOnMouseDown; _this._isInEditModeOnMouseDown = false; if (element.classList.contains(StyleView.CssInheritedFromTarget)) { var uid = evt.target.getAttribute("data-id"); var selector = "div.BPT-HtmlTreeItem[data-id='" + uid + "']"; var selectedItem = _this.htmlElementSource.querySelector(selector); if (selectedItem) { HtmlTreeView.select($m(selectedItem)); } return false; } var selection = _this.findClosestItem(element); if (selection) { if (element.classList.contains(StyleView.CssExpandRuleIcon)) { _this.toggleExpander(element, StyleView.CssRule); _this.currentSelection = selection; return false; } if (element.classList.contains(StyleView.CssExpandShorthandIcon)) { _this.toggleExpander(element, StyleView.CssProperty); _this.currentSelection = selection; return false; } if (element.classList.contains(StyleView.CssCheckbox) && selection.status === 1 /* Valid */) { _this.togglePropertyCheckbox(selection); _this.currentSelection = selection; return false; } if (element.classList.contains(StyleView.CssPropertyName)) { _this.prepareEditBox(selection, 1 /* Name */); return true; } if (element.classList.contains(StyleView.CssPropertyColor) && selection.isProperty) { var property = selection; if (!property.isShorthand && !property.isSubProperty) { _this.currentSelection = selection; _this.attachColorPicker(element); return false; } } if (element.classList.contains(StyleView.CssPropertyValue)) { _this.prepareEditBox(selection, 2 /* Value */); return true; } if (element.classList.contains(StyleView.CssSubPropertyValue)) { _this.editSubproperty(selection); return true; } if (element.classList.contains(StyleView.CssPropertyValueContainer) || element.classList.contains(StyleView.CssEmptyRuleSpace) || element.classList.contains(StyleView.CssBlockFooter) || element.classList.contains(StyleView.CssSelectorContainer)) { if (!wasInEditMode) { if (element.classList.contains(StyleView.CssBlockFooter)) { selection = _this._model.lastProperty(selection) || selection; } _this.prepareEditBox(selection, 3 /* Add */); } return true; } if (element.classList.contains(StyleView.CssSelector)) { if (selection.isEditable) { _this.prepareEditBox(selection, 4 /* Selector */); return true; } } if (element.classList.contains(StyleView.CssFileLink)) { _this.openTargetElementFileLink(selection); return false; } _this.currentSelection = selection; } return !selection; }); this.addHandler(this.listRoot, "mouseover", [StyleView.CssInheritedFromTarget], function (evt) { _this.hoverRuleTarget(evt, true); return true; }); this.addHandler(this.listRoot, "mouseout", [StyleView.CssInheritedFromTarget], function (evt) { _this.hoverRuleTarget(evt, false); return true; }); }; StyleView.prototype.addKeyboardEventHandlers = function () { var _this = this; this.addHandler(this.listRoot, "keydown", null, function (event) { if (_this._isInEditMode) { return true; } var selection = _this.currentSelection; var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; var ctrlKey = event.ctrlKey && !event.shiftKey && !event.altKey; var noKeys = !event.shiftKey && !event.ctrlKey && !event.altKey; if (event.keyCode === 67 /* C */ && ctrlKey) { return !_this.copySelectionToClipboard(selection); } if (selection) { if (event.keyCode === 38 /* ArrowUp */ && (noKeys || shiftKey)) { _this.moveSelection(_this._model.previousSelection(selection, shiftKey)); return false; } if (event.keyCode === 40 /* ArrowDown */ && (noKeys || shiftKey)) { _this.moveSelection(_this._model.nextSelection(selection, shiftKey)); return false; } var element = _this.findElementForSelection(selection); if (event.keyCode === 37 /* ArrowLeft */ && noKeys) { if (!selection.isSubProperty && _this._model.isExpanded(selection)) { _this.toggleExpander(element, selection.isRule ? StyleView.CssRule : StyleView.CssProperty); } else { _this.moveSelection(_this._model.outSelection()); } return false; } if (event.keyCode === 39 /* ArrowRight */ && noKeys) { if (!selection.isSubProperty) { if (_this._model.isExpanded(selection)) { _this.moveSelection(_this._model.inSelection()); } else { _this.toggleExpander(element, selection.isRule ? StyleView.CssRule : StyleView.CssProperty); } } return false; } if (event.keyCode === 36 /* Home */ && noKeys) { _this.moveSelection(_this._model.firstRule()); return false; } if (event.keyCode === 35 /* End */ && noKeys) { _this.moveSelection(_this._model.lastRule()); return false; } if (!selection.isDeleted) { if (event.keyCode === 46 /* Delete */ && noKeys) { if ((selection.isRule || selection.isProperty) && !selection.isDeleted) { _this.removeRuleOrProperty(selection); } return false; } if (selection.isProperty || selection.isSubProperty) { var property = selection; if (event.keyCode === 32 /* Space */ && noKeys && property.status === 1 /* Valid */) { _this.togglePropertyCheckbox(property); return false; } if (event.keyCode === 13 /* Enter */ && noKeys) { if (selection.isProperty) { _this.prepareEditBox(selection, 2 /* Value */); } else { _this.editSubproperty(selection); } return false; } if (event.keyCode === 113 /* F2 */ && noKeys && selection.isProperty) { _this.prepareEditBox(selection, 1 /* Name */); return false; } } else { if (event.keyCode === 13 /* Enter */ && noKeys) { var rule = selection; if (rule.isEditable) { _this.prepareEditBox(selection, 4 /* Selector */); return false; } } } } if (Plugin.F12 && event.keyCode === 75 /* K */ && ctrlKey) { var colorElement = element.querySelector("." + StyleView.CssPropertyColor); if (colorElement && selection.isProperty) { var property = selection; if (!property.isShorthand && !property.isSubProperty && _this.attachColorPicker(colorElement)) { return false; } } } if (event.keyCode === 32 /* Space */ && (noKeys || ctrlKey)) { return false; } } return true; }); }; StyleView.prototype.addMutationEventHandlers = function () { var _this = this; this.addHandler(this.listRoot, "DOMAttrModified", [StyleView.CssRule, StyleView.CssProperty, StyleView.CssSubProperty], function (evt) { var targetElement = evt.target; var selection = _this.findClosestItem(targetElement); if (selection) { if (evt.attrName === "aria-expanded") { _this._model.setExpanded(selection, evt.newValue === "true"); } if (evt.attrName === "aria-checked" && (selection.isProperty || selection.isSubProperty) && evt.newValue !== "mixed") { var property = selection; var isEnabled = evt.newValue === "true"; if (property.isEnabled !== isEnabled) { _this.togglePropertyCheckbox(property); } } } return true; }); }; StyleView.prototype.editSubproperty = function (subproperty) { var ourProperty = subproperty.container; for (var i = subproperty.rule.properties.length - 1; i >= 0; i--) { var otherProperty = subproperty.rule.properties[i]; if (otherProperty === ourProperty) { break; } if (otherProperty.name === subproperty.name) { this.prepareEditBox(otherProperty, 2 /* Value */); return; } } this.addProperty(subproperty.rule, subproperty.container, subproperty.name); }; StyleView.prototype.moveEditBox = function (selection, wasCancelled, exitKey, previousEditMode, newPropertyToRemove) { var stopEditing = wasCancelled || !exitKey || exitKey.equalTo(Dom.ValueEditorKey.EnterKey); var moveUp = exitKey && exitKey.equalTo(Dom.ValueEditorKey.ShiftTabKey); var newLocation; if (stopEditing) { var newSelection = !!newPropertyToRemove ? this._model.previousSelection(selection, false, false) : selection; newLocation = new Dom.StyleEditLocation(newSelection, 0 /* None */); } else { newLocation = this._model.getNextEdit(selection, previousEditMode, !!newPropertyToRemove, moveUp); } if (newPropertyToRemove) { newPropertyToRemove.remove(false); } this.prepareEditBox(newLocation.selection, newLocation.editMode); }; StyleView.prototype.prepareEditBox = function (selection, editMode) { if (!this.enterEditMode(selection, editMode)) { this.currentSelection = selection; } }; StyleView.prototype.hoverRuleTarget = function (evt, show) { var uid = $m(evt.target).attr("data-id"); var model = this.model; this._model.hoverElement(uid, show); }; StyleView.prototype.findPropertyElement = function (property, subClass) { var selector = "." + (property.isSubProperty ? StyleView.CssSubProperty : StyleView.CssProperty) + "[data-uid='" + property.uid + "']"; if (subClass) { selector += " ." + subClass; } return this._stylesListElement.querySelector(selector); }; StyleView.prototype.findRuleElementById = function (uid, subClass) { var selector = "." + StyleView.CssRule + "[data-uid='" + uid + "']"; if (subClass) { selector += " ." + subClass; } return this._stylesListElement.querySelector(selector); }; StyleView.prototype.moveSelection = function (selection) { if (selection) { this.currentSelection = selection; return true; } }; StyleView.prototype.onPropertyEnableChange = function (property, isEnabled) { var element = this.findPropertyElement(property, StyleView.CssCheckbox); if (element) { element.checked = isEnabled !== false; element.indeterminate = isEnabled === undefined; var propertyElement = element.parentElement; var ariaChecked = element.indeterminate ? "mixed" : ("" + isEnabled); propertyElement.setAttribute("aria-checked", ariaChecked); } }; StyleView.prototype.onPropertyAppliedChange = function (property, isApplied) { var element = this.findPropertyElement(property); if (element) { element = element.parentElement; if (isApplied && element.classList.contains(StyleView.CssNotApplied)) { element.classList.remove(StyleView.CssNotApplied); } else if (!isApplied && !element.classList.contains(StyleView.CssNotApplied)) { element.classList.add(StyleView.CssNotApplied); } } }; StyleView.prototype.onPropertyUidChange = function (property, newUid) { var element = this.findPropertyElement(property); if (element) { element.setAttribute(StyleView.ATTR_UID, newUid); } }; StyleView.prototype.onPropertySelectChange = function (property) { var container = property.container; if (!this._model.isExpanded(container)) { var containerProperty = property.isSubProperty ? this.findPropertyElement(container) : this.findRuleElementById(container.uid); this.toggleExpander(containerProperty, property.isSubProperty ? StyleView.CssProperty : StyleView.CssRule); } this.currentSelection = property; }; StyleView.prototype.onPropertyRemoveChange = function (property, nextSelection) { var element = this.findPropertyElement(property); if (element) { var container = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssPropertyContainer); container.parentElement.removeChild(container); } if (nextSelection) { this.currentSelection = nextSelection; } }; StyleView.prototype.setPropertyChangeBar = function (property) { var element = this.findPropertyElement(property); if (element) { var isExpanded = this._model.isExpanded(property); var changeBar = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element, StyleView.CssChangeBar); var changeState = isExpanded ? property.changeState : property.extendedChangeState; changeBar.setAttribute("data-change", changeState); var propertyChangeStateElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element, StyleView.CssPropertyAriaChangeState); if (propertyChangeStateElement) { propertyChangeStateElement.innerText = property.ariaChangeStateString; } var removed = changeState === Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE; element.setAttribute("data-removed", removed); if (removed && !property.isSubProperty && isExpanded) { this.toggleExpander(element, StyleView.CssProperty); } } }; StyleView.prototype.setRuleChangeBar = function (rule, collapseOnRemove) { if (typeof collapseOnRemove === "undefined") { collapseOnRemove = true; } var element = this.findRuleElementById(rule.uid); if (element) { var isExpanded = this._model.isExpanded(rule); var changeBar = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element.parentElement, StyleView.CssChangeBar); var changeState = isExpanded ? rule.changeState : rule.extendedChangeState; changeBar.setAttribute("data-change", changeState); var styleRule = rule; if (styleRule) { element.setAttribute("aria-label", styleRule.ariaLabel); } var removed = changeState === Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE; element.setAttribute("data-removed", removed); var sibling = element.previousElementSibling; if (sibling && sibling.classList.contains(StyleView.CssParentRule)) { sibling.setAttribute("data-removed", removed); } if (removed && collapseOnRemove && this._model.isExpanded(rule)) { this.toggleExpander(element, StyleView.CssRule); } } }; StyleView.prototype.setRuleFileLinkTooltipChange = function (rule, tooltip) { var element = this.findRuleElementById(rule.uid, StyleView.CssFileLink); if (element) { var styleRule = rule; if (styleRule) { element.setAttribute("data-tooltip", tooltip); } } }; StyleView.prototype.onRuleUidChange = function (rule, newUid) { var element = this.findRuleElementById(rule.uid); if (element) { element.setAttribute(StyleView.ATTR_UID, newUid); } }; StyleView.prototype.onRuleSelectorChange = function (rule, selector) { var element = this.findRuleElementById(rule.uid, StyleView.CssSelector); if (element) { element.textContent = selector; element.setAttribute("data-tooltip", selector); } }; StyleView.prototype.onRuleAddPropertyChange = function (rule, property) { var element = this.findRuleElementById(rule.uid); if (element) { this.insertNewPropertyIntoView(element, property); this._model.setExpanded(property, false); } }; StyleView.prototype.onRuleAddRuleChange = function (rule) { var element = this.insertNewRuleIntoView(rule); this._model.setExpanded(rule, true); }; StyleView.prototype.onRuleRemoveChange = function (rule) { var element = this.findRuleElementById(rule.uid); if (element) { var container = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssItem); container.parentElement.removeChild(container); } }; StyleView.prototype.onRuleSelectChange = function (rule) { if (!this._model.isExpanded(rule)) { var element = this.findRuleElementById(rule.uid); this.toggleExpander(element, StyleView.CssRule); } this.currentSelection = rule; }; StyleView.prototype.onPropertyStatusChange = function (property, status) { var element = this.findPropertyElement(property); if (element) { var nameElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element, StyleView.CssPropertyName); var valueElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element, StyleView.CssPropertyValue); var nameInvalidElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element, StyleView.CssPropertyNameAriaInvalid); var valueInvalidElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element, StyleView.CssPropertyValueAriaInvalid); nameElement && nameElement.classList.remove(StyleView.CssInvalidProperty); valueElement && valueElement.classList.remove(StyleView.CssInvalidProperty); element.setAttribute("aria-invalid", "" + (status !== 1 /* Valid */)); switch (status) { case 2 /* InvalidName */: if (nameElement && property.isNameDisplayedAsInvalid) { nameElement.classList.add(StyleView.CssInvalidProperty); } break; case 3 /* InvalidValue */: valueElement && valueElement.classList.add(StyleView.CssInvalidProperty); break; case 0 /* Unknown */: nameElement && nameElement.classList.add(StyleView.CssInvalidProperty); valueElement && valueElement.classList.add(StyleView.CssInvalidProperty); break; } if (nameInvalidElement) { nameInvalidElement.innerText = property.ariaInvalidNameString; } if (valueInvalidElement) { valueInvalidElement.innerText = property.ariaInvalidValueString; } } }; StyleView.prototype.onPropertyNameChange = function (property, name) { var element = this.findPropertyElement(property, property.isSubProperty ? StyleView.CssSubPropertyName : StyleView.CssPropertyName); if (element) { element.textContent = name; } }; StyleView.prototype.onPropertyValueChange = function (property, value) { var element = this.findPropertyElement(property, property.isSubProperty ? StyleView.CssSubPropertyValue : StyleView.CssPropertyValue); if (element) { element.textContent = value; } }; StyleView.prototype.onPropertyClearSubproperties = function (property) { var propertyElement = this.findPropertyElement(property); if (propertyElement) { if (!propertyElement.classList.contains(StyleView.CssPropertyLonghand)) { propertyElement.classList.add(StyleView.CssPropertyLonghand); propertyElement.setAttribute("aria-expanded", "false"); propertyElement.removeAttribute("aria-setsize"); } if (this._model.isExpanded(property)) { this._model.setExpanded(property, false); this.toggleExpander(propertyElement, StyleView.CssProperty); } var subListElement = propertyElement.nextElementSibling; subListElement.innerHTML = ""; } this._model.setExpanded(property, false); }; StyleView.prototype.onPropertyAddSubproperty = function (property, subproperty) { var propertyElement = this.findPropertyElement(property); if (propertyElement) { if (propertyElement.classList.contains(StyleView.CssPropertyLonghand)) { propertyElement.classList.remove(StyleView.CssPropertyLonghand); propertyElement.setAttribute("aria-expanded", "false"); } var subListElement = propertyElement.nextElementSibling; var newElement = this.instantiateTemplate("styleSubPropertyTemplate", subproperty); subListElement.appendChild(newElement); propertyElement.setAttribute("aria-setsize", property.properties.length); } }; StyleView.prototype.checkPropertyColorUpdate = function (property) { var element = this.findPropertyElement(property, StyleView.CssPropertyColor); if (element) { if (property.isDisplayableColor) { element.style.backgroundColor = property.colorForDisplay; element.classList.remove(StyleView.CssPropertyColorHidden); } else { element.style.backgroundColor = ""; element.classList.add(StyleView.CssPropertyColorHidden); } } if (property.isSubProperty) { this.checkPropertyColorUpdate(property.owner); } }; StyleView.prototype.instantiateTemplate = function (templateId, obj) { var template = new T.Template({ htmlElementSource: document, templateId: templateId }); var newElement = this.htmlElementSource.createElement("div"); newElement.innerHTML = template.createTemplateText(obj); return newElement.firstElementChild; }; StyleView.prototype.editPropertyName = function (property) { var _this = this; this.currentSelection = property; var element = this.findElementForSelection(property, StyleView.CssPropertyName); if (!element) { return; } var colonKey = new Dom.ValueEditorKey(":", true); var propertyNameEditor; var intellisenseContext; this._domExplorer.traceWriter.raiseEvent(511 /* Dom_Intellisense_Start */); var stylePropertyIntellisenseProvider = new F12.DomExplorer.StylePropertyIntellisenseProvider(this._model); var intellisenseMenu = new Common.Intellisense.IntellisenseMenu("intellisenseListBox", null, null, 500, true, stylePropertyIntellisenseProvider); intellisenseContext = new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge(), intellisenseMenu, stylePropertyIntellisenseProvider, this._bridge); this._domExplorer.traceWriter.raiseEvent(512 /* Dom_Intellisense_Stop */); propertyNameEditor = new Dom.ValueEditor(document, this._domExplorer, this._bridge, window, StyleView.MAX_PROPERTY_NAME_ROWS, intellisenseContext); propertyNameEditor.addExitKeys(colonKey); var isAddingNewProperty = property.isNew; propertyNameEditor.show(element, Math.max((element && element.offsetWidth || 0) + 2, 100), function (newName, oldName) { return new Plugin.Promise(function (completed) { property.commitName(newName).done(function () { return completed(true); }, function () { return completed(true); }); }); }).done(function (completion) { if (isAddingNewProperty && completion.newValue && !completion.wasCancelled && completion.exitKey && completion.exitKey.equalTo(Dom.ValueEditorKey.EnterKey)) { completion.exitKey = Dom.ValueEditorKey.TabKey; } property.isDeleted = !completion.wasCancelled && !completion.newValue; _this.moveEditBox(property, completion.wasCancelled, completion.exitKey, 1 /* Name */, property.isNew && (completion.wasCancelled || !completion.newValue) ? property : null); if (!completion.wasCancelled && !completion.newValue && !property.isNew) { property.commitDelete(false).done(function () { property.refreshNameDisplay(); }); } }); }; StyleView.prototype.editPropertyValue = function (property) { var _this = this; this.currentSelection = property; var element = this.findElementForSelection(property, StyleView.CssPropertyValue); if (!element) { return; } var propertyElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssProperty); var provider; var intellisenseContext; var valueEditor; this._domExplorer.traceWriter.raiseEvent(511 /* Dom_Intellisense_Start */); provider = new F12.DomExplorer.StylePropertyValueIntellisenseProvider(property.name, this._model.cssAndHtmlMetadataSource); provider.onShouldOpenOnTextChange = function (text) { return !text.match(/^-?\d/); }; intellisenseContext = new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge(), new Common.Intellisense.IntellisenseMenu("intellisenseListBox", null, null, 500, true, provider), provider, this._bridge); this._domExplorer.traceWriter.raiseEvent(512 /* Dom_Intellisense_Stop */); var semicolonKey = new Dom.ValueEditorKey(";"); valueEditor = new Dom.ValueEditor(document, this._domExplorer, this._bridge, window, StyleView.MAX_PROPERTY_VALUE_ROWS, intellisenseContext); valueEditor.addExitKeys(semicolonKey); valueEditor.enableCommitOnChange(); valueEditor.enableNumericChanges(); var isAddingNewProperty = property.isNew; this._model.enableEditChaining(); var isSingleEditStarted = false; var width = (propertyElement && propertyElement.offsetWidth || 0) - element.offsetLeft; var colorElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(propertyElement, StyleView.CssPropertyColor); var expanderElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(propertyElement, StyleView.CssExpandShorthandIcon); var colorStyle = window.getComputedStyle(colorElement); var expanderStyle = window.getComputedStyle(expanderElement); width += (colorElement && colorElement.offsetWidth || 0) + parseInt(colorStyle.marginLeft, 10) + parseInt(colorStyle.marginRight, 10) + (expanderElement && expanderElement.offsetWidth || 0) + parseInt(expanderStyle.marginLeft, 10) + parseInt(expanderStyle.marginRight, 10); element.textContent = element.textContent.trim(); var timer = null; var newPropertyValue; valueEditor.show(element, width, function (newValue, oldValue) { return new Plugin.Promise(function (completed) { if (!property.isNew && !isSingleEditStarted) { _this._model.startSingleEdit(); isSingleEditStarted = true; } if (timer !== null) { window.clearTimeout(timer); } newPropertyValue = newValue; timer = window.setTimeout(function () { property.commitValue(newPropertyValue); timer = null; }, 200); completed(true); }); }).done(function (completion) { if (timer !== null) { window.clearTimeout(timer); property.commitValue(newPropertyValue); } if (isSingleEditStarted) { _this._model.endSingleEdit(); } _this._model.disableEditChaining(); property.refreshValueDisplay(); _this.moveEditBox(property, completion.wasCancelled, completion.exitKey, 2 /* Value */, completion.wasCancelled && property.isNew ? property : null); var stopEditing = completion.wasCancelled || !completion.exitKey || completion.exitKey.equalTo(Dom.ValueEditorKey.EnterKey); if (_this._domExplorer.documentMode < 9 && (!_this.isFocusWithinInlineStyle || stopEditing)) { var selected = HtmlTreeView.getSelected($m("#tree")); _this._domExplorer.refreshElementForLowDocModes(selected, false); } }); }; StyleView.prototype.editSelector = function (rule, completionCallback) { var _this = this; this.currentSelection = rule; var element = this.findElementForSelection(rule, StyleView.CssSelector); if (!element) { return; } var ruleElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(element, StyleView.CssRule); var editor = new Dom.ValueEditor(document, this._domExplorer, this._bridge, window, StyleView.MAX_SELECTOR_ROWS); editor.addExitKeys(new Dom.ValueEditorKey("{", true), new Dom.ValueEditorKey("{")); editor.show(element, (ruleElement && ruleElement.offsetWidth || 0) - element.offsetLeft, function (newSelector, oldSelector) { return new Plugin.Promise(function (completed) { if (newSelector) { rule.commitSelector(newSelector).done(function () { return completed(true); }, function () { return completed(false); }); } else { rule.commitDelete().done(function () { return completed(true); }, function () { return completed(false); }); } }); }).done(function (completion) { var isSuccess = completion.newValue && !completion.wasCancelled; if (!isSuccess) { element.textContent = completion.oldValue; } if (completionCallback) { completionCallback(isSuccess); } _this.moveEditBox(rule, completion.wasCancelled, completion.exitKey, 4 /* Selector */); }); }; StyleView.prototype.insertNewRuleIntoView = function (rule) { var newElement = this.instantiateTemplate("styleRuleTemplate", rule); var nextRule = this._model.nextRule(rule); var nextRuleElement; if (nextRule) { nextRuleElement = this.findElementForSelection(nextRule); } if (nextRule && nextRuleElement) { this._stylesListElement.insertBefore(newElement, nextRuleElement.parentElement); } else { this._stylesListElement.appendChild(newElement); } return newElement; }; StyleView.prototype.insertNewPropertyIntoView = function (ruleElement, property) { var newElement = this.instantiateTemplate("stylePropertyTemplate", property); var itemElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(ruleElement, StyleView.CssItem); var propertyList = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(itemElement, StyleView.CssPropertiesCollection); if (propertyList) { var nextProperty = this._model.nextProperty(property); var nextElement; if (nextProperty) { nextElement = this.findElementForSelection(nextProperty).parentElement; } else { var blockFooter = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(propertyList, StyleView.CssBlockFooter); nextElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(propertyList, StyleView.CssBlockFooter); } propertyList.insertBefore(newElement, blockFooter); propertyList.insertBefore(newElement, nextElement); return newElement; } }; StyleView.prototype.initializeColorPicker = function () { if (Plugin.F12) { this.colorPickerViewModel = new F12.DomExplorer.ColorPickerViewModel(this._bridge, this._domExplorer.paletteViewModel); var colorPickerHost = new Common.TemplateControl("DomExplorer.colorPickerHost"); colorPickerHost.model = this.colorPickerViewModel; this.colorPickerViewModel.propertyChanged.addHandler(this.onColorPickerChanged.bind(this)); this.colorPickerControl = colorPickerHost.getNamedControl("colorPicker"); this.colorPickerControl.disablePopupActiveIndicator = true; this.colorPickerControl.isCompactView = true; this.colorPickerControl.viewportMargin = { top: 30 }; document.body.appendChild(this.colorPickerControl.rootElement); } }; StyleView.prototype.attachColorPicker = function (propertyColorSquare) { if (Plugin.F12 && this._domExplorer.documentMode > 8) { this._colorPickerProperty = this.findClosestItem(propertyColorSquare); if (this._colorPickerProperty && this._colorPickerProperty.isDisplayableColor) { this.colorPickerViewModel.dockElement = propertyColorSquare; this.colorPickerViewModel.isVisible = true; return true; } } return false; }; StyleView.prototype.onColorPickerChanged = function (propertyName) { if (propertyName === F12.DomExplorer.ColorPickerViewModel.IsVisiblePropertyName) { if (this.colorPickerViewModel.isVisible) { this._model.startSingleEdit(); F12.Tools.Utility.Assert.hasValue(this._colorPickerProperty); F12.Tools.Utility.Assert.hasValue(this._colorPickerProperty.colorForDisplay); this.colorPickerViewModel.setOriginalColor(this._colorPickerProperty.colorForDisplay); } else { this._model.endSingleEdit(); this.colorPickerViewModel.isSlidersShown = false; this.colorPickerViewModel.dockElement = null; this._colorPickerProperty = null; } } else if (propertyName === F12.DomExplorer.ColorPickerViewModel.ColorPropertyName) { if (this.colorPickerViewModel.isVisible && this._colorPickerProperty) { this._colorPickerProperty.commitValue(this.colorPickerViewModel.color, this._colorPickerProperty.isImportant); } } }; StyleView.MAX_PROPERTY_NAME_ROWS = 2; StyleView.MAX_PROPERTY_VALUE_ROWS = 5; StyleView.MAX_SELECTOR_ROWS = 10; StyleView.ATTR_UID = "data-uid"; StyleView.CssBlockFooter = "BPT-Style-BlockFooter"; StyleView.CssChangeBar = "BPT-Style-ChangeBar"; StyleView.CssCheckbox = "BPT-Style-Property-Checkbox"; StyleView.CssEmptyRuleSpace = "BPT-Style-EmptyRuleSpace"; StyleView.CssExpandRuleIcon = "BPT-Style-ExpandIcon"; StyleView.CssExpandShorthandIcon = "BPT-Style-PropertyValue-ExpandIcon"; StyleView.CssFileLink = "BPT-FileLink"; StyleView.CssInheritedFromTarget = "BPT-Style-InheritedFromTarget"; StyleView.CssInvalidProperty = "BPT-Style-InvalidProperty"; StyleView.CssItem = "BPT-Style-Item"; StyleView.CssNotApplied = "BPT-Style-Property-NotApplied"; StyleView.CssNotWinning = "BPT-Style-NotWinning"; StyleView.CssParentRule = "BPT-Style-ParentRule"; StyleView.CssPropertiesCollection = "BPT-Style-Properties"; StyleView.CssProperty = "BPT-Style-Property"; StyleView.CssPropertyAriaChangeState = "BPT-Style-PropertyAriaChangeState"; StyleView.CssPropertyAriaOverridden = "BPT-Style-PropertyAriaOverridden"; StyleView.CssPropertyColor = "BPT-Style-Color"; StyleView.CssPropertyColorHidden = "BPT-Style-Color-Hidden"; StyleView.CssPropertyContainer = "BPT-Style-Property-Container"; StyleView.CssPropertyLonghand = "BPT-Style-Property-LongHand"; StyleView.CssPropertyName = "BPT-Style-PropertyName"; StyleView.CssPropertyNameAriaInvalid = "BPT-Style-PropertyNameAriaInvalid"; StyleView.CssPropertyNameContainer = "BPT-Style-PropertyName-Container"; StyleView.CssPropertyValue = "BPT-Style-PropertyValue"; StyleView.CssPropertyValueAriaInvalid = "BPT-Style-PropertyValueAriaInvalid"; StyleView.CssPropertyValueContainer = "BPT-Style-PropertyValue-Container"; StyleView.CssRule = "BPT-Style-Rule"; StyleView.CssScrollContainer = "BPT-DataTree-ScrollContainer"; StyleView.CssSelector = "BPT-Style-Selector"; StyleView.CssSelectorContainer = "BPT-Style-Selector-Container"; StyleView.CssSubProperty = "BPT-Style-SubProperty"; StyleView.CssSubPropertyName = "BPT-Style-SubPropertyName"; StyleView.CssSubPropertyValue = "BPT-Style-SubPropertyValue"; return StyleView; })(Common.ModelView.ListView); Dom.StyleView = StyleView; var MenuStyleViewItems; (function (MenuStyleViewItems) { MenuStyleViewItems[MenuStyleViewItems["AddRule"] = 0] = "AddRule"; MenuStyleViewItems[MenuStyleViewItems["AddProperty"] = 1] = "AddProperty"; MenuStyleViewItems[MenuStyleViewItems["Remove"] = 3] = "Remove"; MenuStyleViewItems[MenuStyleViewItems["Revert"] = 4] = "Revert"; MenuStyleViewItems[MenuStyleViewItems["CopyRule"] = 6] = "CopyRule"; MenuStyleViewItems[MenuStyleViewItems["CopyProperty"] = 7] = "CopyProperty"; MenuStyleViewItems[MenuStyleViewItems["RefreshStyles"] = 9] = "RefreshStyles"; MenuStyleViewItems[MenuStyleViewItems["ViewSource"] = 10] = "ViewSource"; })(MenuStyleViewItems || (MenuStyleViewItems = {})); var StyleViewMenuController = (function () { function StyleViewMenuController(_styleView, _elementListener, _stylesListElement) { this._styleView = _styleView; this._elementListener = _elementListener; this._stylesListElement = _stylesListElement; this._menuId = "StyleViewContextMenu_"; this._menuItems = [ { id: "addRule", type: 1 /* command */, label: Common.ToolWindowHelpers.loadString("AddRuleMenuText") }, { id: "addProperty", type: 1 /* command */, label: Common.ToolWindowHelpers.loadString("AddPropertyMenuText") }, { id: "separator", type: 3 /* separator */ }, { id: "remove", type: 1 /* command */, label: Common.ToolWindowHelpers.loadString("RemoveStyleMenuText") }, { id: "revert", type: 1 /* command */, label: Common.ToolWindowHelpers.loadString("RevertStyleMenuText") }, { id: "separator", type: 3 /* separator */ }, { id: "copyRule", type: 1 /* command */, label: Common.ToolWindowHelpers.loadString("CopyRuleMenuText") }, { id: "copyProperty", type: 1 /* command */, label: Common.ToolWindowHelpers.loadString("CopyPropertyMenuText") }, { id: "separator", type: 3 /* separator */ }, { id: "refreshStyles", type: 1 /* command */, label: Common.ToolWindowHelpers.loadString("RefreshStyleMenuText") }, { id: "viewSource", type: 1 /* command */, label: Common.ToolWindowHelpers.loadString("ViewSourceMenuText") } ]; this.initialize(); } StyleViewMenuController.prototype.showContextMenu = function (selectedItem, x, y) { var _this = this; var selection; if (selectedItem != null) { selection = this._styleView.findClosestItem(selectedItem); } this._selection = selection; this._hasSelectedItem = !!selection; this._hasNonDeletedSelection = this._hasSelectedItem && !selection.isDeleted; this._isProperty = this._hasSelectedItem && selection.isProperty; this._isSubProperty = this._hasSelectedItem && selection.isSubProperty; this._isRule = this._hasSelectedItem && selection.isRule; this._hasSelectedText = Common.ToolWindowHelpers.hasSelectedText(); this._rule = this._hasSelectedItem && (this._isRule ? selection : selection.rule); this._hasChanged = selection ? !!selection.extendedChangeState : false; if (!this._contextMenu) { this._menuItems[0 /* AddRule */].disabled = function () { return false; }; this._menuItems[1 /* AddProperty */].disabled = function () { return !_this._hasSelectedItem; }; this._menuItems[3 /* Remove */].disabled = function () { return !(_this._hasNonDeletedSelection && (_this._isProperty || (_this._isRule && !_this._rule.isInlined))); }; this._menuItems[4 /* Revert */].disabled = function () { return !_this._hasChanged || (_this._rule.isDeleted && _this._isProperty) || _this._isSubProperty; }; this._menuItems[6 /* CopyRule */].disabled = function () { return !_this._rule || _this._rule.isDeleted; }; this._menuItems[7 /* CopyProperty */].disabled = function () { return !_this._hasNonDeletedSelection || !(_this._isProperty || _this._isSubProperty); }; this._menuItems[9 /* RefreshStyles */].disabled = function () { return false; }; this._menuItems[10 /* ViewSource */].disabled = function () { return !_this.canViewSource(_this._rule); }; this._contextMenu = Plugin.ContextMenu.create(this._menuItems, this._menuId, null, null, function (menuId, menuItem) { return _this.onMenuItemClicked(menuId, menuItem.id, _this._selection, _this._rule); }); this._dismissHandler = function (e) { _this._styleView.currentSelection = _this._styleView.currentSelection; _this.dismiss(); }; } this._contextMenu.addEventListener("dismiss", this._dismissHandler); this._contextMenu.show(parseInt(x.toFixed(0)), parseInt(y.toFixed(0))); Common.ToolWindowHelpers.contextMenuUp(true); return false; }; StyleViewMenuController.prototype.canViewSource = function (rule) { return !!(rule && rule.fileUrl); }; StyleViewMenuController.prototype.initialize = function () { var _this = this; this._elementListener.addEventListener("contextmenu", function (e) { return _this.onContextMenu(e); }); this._elementListener.addEventListener("keydown", function (e) { return _this.onKeydown(e); }); }; StyleViewMenuController.prototype.eventIsForThisPane = function (event) { if (this._stylesListElement.clientHeight) { var element = event.target; if (element === this._elementListener) { return true; } do { if (element === this._stylesListElement) { return true; } element = element.parentElement; } while(element); } return false; }; StyleViewMenuController.prototype.onKeydown = function (event) { if (!this.eventIsForThisPane(event)) { return true; } var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; if (event.keyCode === 121 /* F10 */ && shiftKey) { this.dismiss(); var element = this._styleView.findElementForSelection(this._styleView.currentSelection) || this._elementListener; var rect = element.getBoundingClientRect(); this.showContextMenu(element, rect.left, rect.top); event.preventDefault(); event.stopImmediatePropagation(); } return true; }; StyleViewMenuController.prototype.onContextMenu = function (evt) { this.dismiss(); if (!this.eventIsForThisPane(evt)) { return true; } var selectedItem = null; var x = evt.clientX; var y = evt.clientY; if (x <= 0 || y <= 0) { selectedItem = this._styleView.currentElementSelection; if (selectedItem) { var offset = selectedItem.getBoundingClientRect(); x = offset.left; y = offset.top; } } else { selectedItem = this._styleView.htmlElementSource.elementFromPoint(x, y); if (selectedItem) { this._styleView.select(selectedItem); } } this.showContextMenu(selectedItem, x, y); evt.preventDefault(); evt.stopImmediatePropagation(); return false; }; StyleViewMenuController.prototype.onMenuItemClicked = function (menuId, itemId, selection, rule) { var _this = this; if (menuId === this._menuId) { var uid; var textToCopy; switch (itemId) { case this._menuItems[0 /* AddRule */].id: this._styleView.addRule(); break; case this._menuItems[1 /* AddProperty */].id: this._styleView.enterEditMode(selection, 3 /* Add */); break; case this._menuItems[3 /* Remove */].id: this._styleView.removeRuleOrProperty(selection); break; case this._menuItems[4 /* Revert */].id: this._styleView.revertSelection(selection); break; case this._menuItems[6 /* CopyRule */].id: clipboardData.setData("Text", rule.formatForCopy); break; case this._menuItems[7 /* CopyProperty */].id: var property = selection; clipboardData.setData("Text", property.formatForCopy); break; case this._menuItems[9 /* RefreshStyles */].id: this._styleView.refresh(); break; case this._menuItems[10 /* ViewSource */].id: window.setTimeout(function () { if (_this.canViewSource(rule)) { _this._styleView.openTargetElementFileLink(rule); } }, 0); break; } this.dismiss(); } }; StyleViewMenuController.prototype.dismiss = function () { if (this._contextMenu) { this._contextMenu.removeEventListener("dismiss", this._dismissHandler); this._contextMenu.dismiss(); this._contextMenu.dispose(); this._contextMenu = null; } Common.ToolWindowHelpers.contextMenuUp(false); }; return StyleViewMenuController; })(); Dom.StyleViewMenuController = StyleViewMenuController; })(Dom || (Dom = {})); // breadcrumbItem.ts var Dom; (function (Dom) { "use strict"; var BreadcrumbItem = (function () { function BreadcrumbItem(_element, _uid) { this._element = _element; this._uid = _uid; } Object.defineProperty(BreadcrumbItem.prototype, "elementName", { get: function () { var tagElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this._element, "BPT-HTML-Tag"); if (tagElement) { return HtmlTreeView.getTextContent(tagElement); } var docElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this._element, "BPT-HTML-DocType"); if (docElement) { return "(DOCTYPE)"; } var commentElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this._element, "BPT-HTML-Comment"); if (commentElement) { return Common.ToolWindowHelpers.loadString("CommentElement"); } var textElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this._element, "BPT-HTML-Text"); if (textElement) { return Common.ToolWindowHelpers.loadString("TextElement"); } if (this._element.classList.contains("BPT-HtmlTree-ChildCollection-ShowAll")) { return Common.ToolWindowHelpers.loadString("ShowAll"); } return null; }, enumerable: true, configurable: true }); Object.defineProperty(BreadcrumbItem.prototype, "breadcrumbName", { get: function () { var name = this.elementName; if (name) { if (this.id) { name += "#" + this.id; } else if (this.classNames) { var classNames = this.classNames.trim().split(" "); if (classNames.length > 0) { name += "." + classNames[0]; } } } return name; }, enumerable: true, configurable: true }); Object.defineProperty(BreadcrumbItem.prototype, "selected", { get: function () { return this._element.classList.contains("BPT-HtmlTreeItem-Selected"); }, enumerable: true, configurable: true }); Object.defineProperty(BreadcrumbItem.prototype, "elementUID", { get: function () { return this._uid; }, enumerable: true, configurable: true }); Object.defineProperty(BreadcrumbItem.prototype, "element", { get: function () { return this._element; }, enumerable: true, configurable: true }); Object.defineProperty(BreadcrumbItem.prototype, "id", { get: function () { return this.getAttribute("id"); }, enumerable: true, configurable: true }); Object.defineProperty(BreadcrumbItem.prototype, "classNames", { get: function () { var retStr = this.getAttribute("class"); if (retStr) { return retStr; } return ""; }, enumerable: true, configurable: true }); BreadcrumbItem.prototype.getAttribute = function (attrName) { var htmlElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this._element, "BPT-HTML"); if (htmlElement) { var attrElements = F12.DomExplorer.DomExplorerWindow.findAllDescendentsByClass(htmlElement, "BPT-HTML-Attribute-Section"); for (var i = 0; i < attrElements.length; i++) { var node = attrElements.item(i); if (node.nodeType === Node.ELEMENT_NODE) { var attrElement = node; var attrNameElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(attrElement, "BPT-HTML-Attribute"); if (attrNameElement && HtmlTreeView.getTextContent(attrNameElement) === attrName) { var attrValueElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(attrElement, "BPT-HTML-Value"); if (attrValueElement) { return HtmlTreeView.getTextContent(attrValueElement); } } } } } return null; }; return BreadcrumbItem; })(); Dom.BreadcrumbItem = BreadcrumbItem; })(Dom || (Dom = {})); // breadcrumbsModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var BreadcrumbsModel = (function (_super) { __extends(BreadcrumbsModel, _super); function BreadcrumbsModel(_selectedElement) { var _this = this; _super.call(this); this._selectedElement = _selectedElement; this.skipNextLoad = false; this.listSource = function (callback, args) { if (!_this.skipNextLoad) { _this.buildBreadcrumbs(); } else { _this.verifyTrail(); } _this.skipNextLoad = false; callback(_this._breadcrumbs); }; } Object.defineProperty(BreadcrumbsModel.prototype, "numberOfBreadcrumbs", { get: function () { return this._breadcrumbs.length; }, enumerable: true, configurable: true }); BreadcrumbsModel.prototype.findBreadcrumbByTagName = function (tagName, nodeIndex) { for (var i = 0; i < this.numberOfBreadcrumbs; i++) { var bci = this.breadcrumb(i); if (tagName === bci.elementName) { if (nodeIndex === 0) { return bci; } nodeIndex--; } } return null; }; BreadcrumbsModel.prototype.findBreadcrumbByClass = function (className, nodeIndex) { for (var i = 0; i < this.numberOfBreadcrumbs; i++) { var bci = this.breadcrumb(i); var classNames = bci.classNames.split(" "); for (var j = 0; j < classNames.length; j++) { if (classNames[j] === className) { if (nodeIndex === 0) { return bci; } nodeIndex--; } } } return null; }; BreadcrumbsModel.prototype.findBreadcrumbById = function (id) { for (var i = 0; i < this.numberOfBreadcrumbs; i++) { var bci = this.breadcrumb(i); if (id === bci.id) { return bci; } } return null; }; BreadcrumbsModel.prototype.breadcrumb = function (index) { return this._breadcrumbs[index]; }; BreadcrumbsModel.prototype.clearSelection = function () { this._selectedElement = undefined; }; BreadcrumbsModel.prototype.setSelectedElement = function (element) { var elementUid = element.get(0).getAttribute("data-id"); for (var i = 0; i < this._breadcrumbs.length; i++) { if (this._breadcrumbs[i].elementUID === elementUid) { this.skipNextLoad = true; } } if (element.get(0) instanceof HTMLElement) { this._selectedElement = element.get(0); } }; BreadcrumbsModel.prototype.findPreviousBreadcrumb = function (uid) { for (var i = 0; i < this.numberOfBreadcrumbs; i++) { var bc = this._breadcrumbs[i]; if (bc.elementUID === uid) { if (i > 0) { return this._breadcrumbs[i - 1]; } return null; } } return null; }; BreadcrumbsModel.prototype.findNextBreadcrumb = function (uid) { for (var i = 0; i < this.numberOfBreadcrumbs; i++) { var bc = this._breadcrumbs[i]; if (bc.elementUID === uid) { if (i < this.numberOfBreadcrumbs - 1) { return this._breadcrumbs[i + 1]; } return null; } } return null; }; BreadcrumbsModel.prototype.verifyTrail = function () { var bcIndex = this.numberOfBreadcrumbs - 1; while (bcIndex >= 0) { var bc = this.breadcrumb(bcIndex); var uid = bc.elementUID; var elementInTree = $m("#tree").find(".BPT-HtmlTreeItem[data-id='" + uid + "']"); if (elementInTree.length === 0) { this._breadcrumbs.splice(bcIndex, this.numberOfBreadcrumbs - bcIndex); } bcIndex--; if (bcIndex >= this.numberOfBreadcrumbs) { bcIndex = this.numberOfBreadcrumbs - 1; } } }; BreadcrumbsModel.prototype.buildBreadcrumbs = function () { this._breadcrumbs = []; var currentElement = this._selectedElement; while (currentElement && currentElement instanceof HTMLElement) { if (!currentElement.classList.contains("BPT-HtmlTreeItem-HiddenRoot")) { var bc = new Dom.BreadcrumbItem(currentElement, currentElement.getAttribute("data-id")); this._breadcrumbs.unshift(bc); } currentElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(currentElement.parentElement, "BPT-HtmlTreeItem"); } this.newBreadcrumbs = true; return this._breadcrumbs; }; return BreadcrumbsModel; })(Common.ModelView.ListModel); Dom.BreadcrumbsModel = BreadcrumbsModel; })(Dom || (Dom = {})); // breadcrumbsView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var T = Common.Templating; var BreadcrumbsView = (function (_super) { __extends(BreadcrumbsView, _super); function BreadcrumbsView(_domExplorerWindow, model, _htmlElementSource, breadcrumbsViewDivId, defaultItemTemplateId, alternateTemplates) { _super.call(this, _htmlElementSource, breadcrumbsViewDivId, defaultItemTemplateId, model, alternateTemplates); this._domExplorerWindow = _domExplorerWindow; this._htmlElementSource = _htmlElementSource; this._forceSelectedIntoView = true; this._grabKeyFocus = false; this._disableKeyBoardTooltip = false; this._listElement = this._htmlElementSource.getElementById(this.listViewDivId); this._tooltipTemplate = new T.Template({ htmlElementSource: this._htmlElementSource, templateId: "breadcrumbTooltip" }); this.init(); _domExplorerWindow.horizontalPane.addResizeListener(this); this.setWidth(_domExplorerWindow.horizontalPane.leftWidth); this.addEventHandlers(); this.updateView(); } BreadcrumbsView.prototype.updateView = function () { if (!this._grabKeyFocus && document.activeElement && !Common.ToolWindowHelpers.isContextMenuUp() && F12.DomExplorer.DomExplorerWindow.findAncestorByClass(document.activeElement, "BPT-HorizontalPane-BreadcrumbBar") != null) { this._grabKeyFocus = true; } if (!this._breadcrumbModel) { this._breadcrumbModel = this.model; } _super.prototype.updateView.call(this); }; BreadcrumbsView.prototype.skipNextLoad = function () { this._breadcrumbModel.skipNextLoad = true; }; BreadcrumbsView.prototype.preViewProcessing = function () { $m("#BreadcrumbsView").show(); }; BreadcrumbsView.prototype.checkToPullDownTooltip = function () { var _this = this; window.setTimeout(function () { if (document.activeElement && F12.DomExplorer.DomExplorerWindow.findAncestorByClass(document.activeElement, "BPT-HorizontalPane-BreadcrumbBar") == null) { _this.closeTooltip(); } }, 0); }; BreadcrumbsView.prototype.postViewProcessing = function () { var _this = this; _super.prototype.postViewProcessing.call(this); this._disableKeyBoardTooltip = false; if (((this._firstBreadcrumbToShow === undefined) && (this._lastBreadcrumbToShow === undefined)) || this._breadcrumbModel.newBreadcrumbs) { this._firstBreadcrumbToShow = 0; this._lastBreadcrumbToShow = undefined; this._breadcrumbModel.newBreadcrumbs = false; } else { if (this._lastBreadcrumbToShow && this._lastBreadcrumbToShow >= this._breadcrumbModel.numberOfBreadcrumbs) { this._lastBreadcrumbToShow = this._breadcrumbModel.numberOfBreadcrumbs - 1; } if (this._firstBreadcrumbToShow && this._firstBreadcrumbToShow >= this._breadcrumbModel.numberOfBreadcrumbs) { this._firstBreadcrumbToShow = 0; this._lastBreadcrumbToShow = undefined; this._breadcrumbModel.newBreadcrumbs = false; } } var bar = $m(".BPT-HorizontalPane-BreadcrumbBar"); var breadcrumbElements = bar.find(".BPT-Breadcrumb, .BPT-Breadcrumb-Selected"); var chevronElements = bar.find(".BPT-HorizontalPane-BreadcrumbChevron"); var positoningLastElement = (this._lastBreadcrumbToShow === undefined); var selectedIndex; do { var doItAgain = false; var selectedIndex = this.calculateFirstOrLastElementToDisplay(bar, breadcrumbElements); if (this._forceSelectedIntoView && ((selectedIndex < this._firstBreadcrumbToShow) || (selectedIndex > this._lastBreadcrumbToShow))) { doItAgain = true; if (positoningLastElement) { if (selectedIndex < this._firstBreadcrumbToShow) { this._firstBreadcrumbToShow--; } else { this._firstBreadcrumbToShow++; } this._lastBreadcrumbToShow = undefined; } else { if (selectedIndex > this._lastBreadcrumbToShow) { this._lastBreadcrumbToShow++; } else { this._lastBreadcrumbToShow--; } this._firstBreadcrumbToShow = undefined; } } else if ((this._firstBreadcrumbToShow !== 0) || (this._lastBreadcrumbToShow !== this._breadcrumbModel.numberOfBreadcrumbs - 1)) { if (!positoningLastElement && this._firstBreadcrumbToShow === 0) { doItAgain = true; positoningLastElement = true; this._lastBreadcrumbToShow = undefined; } else if (positoningLastElement && this._lastBreadcrumbToShow === this._breadcrumbModel.numberOfBreadcrumbs - 1) { doItAgain = true; positoningLastElement = false; this._firstBreadcrumbToShow = undefined; } } } while(doItAgain); for (var i = 0; i < this._breadcrumbModel.numberOfBreadcrumbs; i++) { if (i === selectedIndex) { this._selectedElement = $m(breadcrumbElements.get(i)).get(0); } if (i >= this._firstBreadcrumbToShow && i <= this._lastBreadcrumbToShow) { $m(breadcrumbElements.get(i)).show(); $m(chevronElements.get(i)).show(); var parentElement = breadcrumbElements.get(i).parentNode; parentElement.setAttribute("bcIndex", i); var self = this; parentElement.onmouseenter = function (ev) { if (Common.ToolWindowHelpers.isContextMenuUp()) { return; } var element = ev.target; var span = element.children[0]; var svg = element.children[1]; var path = svg.querySelector("path"); var uid = span.getAttribute("bc-data-uid"); _this._domExplorerWindow.temporaryShowElementHighlight(uid); element["savebackgroundColor"] = path.className.baseVal; span.classList.add("BPT-Breadcrumb-Hover"); path.className.baseVal = "BPT-BreadcrumbChevron-Hover"; if (!_this._tooltipComingId) { _this.closeTooltip(); _this.showTooltipOnBreadcrumb(false, element); } _this._disableKeyBoardTooltip = true; }; parentElement.onmouseleave = function (ev) { var element = ev.target; var span = element.children[0]; var svg = element.children[1]; var path = svg.querySelector("path"); _this._domExplorerWindow.restoreElementHighlight(); _this.closeTooltip(); if (element["savebackgroundColor"] !== undefined) { _this._disableKeyBoardTooltip = false; span.classList.remove("BPT-Breadcrumb-Hover"); path.className.baseVal = element["savebackgroundColor"]; element["savebackgroundColor"] = undefined; } }; } else { $m(breadcrumbElements.get(i)).hide(); $m(chevronElements.get(i)).hide(); } } if (this._firstBreadcrumbToShow > 0) { $m("#breadcrumbLeftArrow").show(); } else { $m("#breadcrumbLeftArrow").hide(); } if (this._lastBreadcrumbToShow < this._breadcrumbModel.numberOfBreadcrumbs - 1) { $m("#breadcrumbRightArrow").show(); } else { $m("#breadcrumbRightArrow").hide(); } if (this._grabKeyFocus) { var selectedElement = bar.find(".BPT-Breadcrumb-Selected"); if (selectedElement) { selectedElement.focus(); } this._grabKeyFocus = false; if (!this._disableKeyBoardTooltip) { this.showTooltipOnBreadcrumb(true); } } this._forceSelectedIntoView = true; }; BreadcrumbsView.prototype.selectBreadcrumbNodeByTagName = function (tagName, nodeIndex) { if (!nodeIndex) { nodeIndex = 0; } var bci = this._breadcrumbModel.findBreadcrumbByTagName(tagName, nodeIndex); this.selectElementByUid(bci.elementUID); }; BreadcrumbsView.prototype.selectBreadcrumbNodeByClass = function (className, nodeIndex) { if (!nodeIndex) { nodeIndex = 0; } var bci = this._breadcrumbModel.findBreadcrumbByClass(className, nodeIndex); this.selectElementByUid(bci.elementUID); }; BreadcrumbsView.prototype.selectBreadcrumbNodeById = function (id) { var bci = this._breadcrumbModel.findBreadcrumbById(id); this.selectElementByUid(bci.elementUID); }; BreadcrumbsView.prototype.showTooltipOnBreadcrumb = function (focus, elementOverWhichToDisplay) { if (!elementOverWhichToDisplay) { var bar = $m(".BPT-HorizontalPane-BreadcrumbBar"); var selectedElement = bar.find(".BPT-Breadcrumb-Selected").get(0); if (!selectedElement) { return; } var element = selectedElement.parentNode; var spanRect = selectedElement.getBoundingClientRect(); var imgRect = selectedElement.nextElementSibling.getBoundingClientRect(); } else { var spanRect = elementOverWhichToDisplay.children[0].getBoundingClientRect(); var imgRect = elementOverWhichToDisplay.children[1].getBoundingClientRect(); var element = elementOverWhichToDisplay; } var displayRect = spanRect; var width = displayRect.width; var left = displayRect.left; var rightArrow = $m("#breadcrumbLeftArrow").get(0); if (rightArrow.style.display !== "none") { var rightArrowRect = rightArrow.getBoundingClientRect(); left -= rightArrowRect.width; } this.popupTooltip(element, left + width / 2, displayRect.top + displayRect.height / 2, false, focus); }; BreadcrumbsView.prototype.onPaneResize = function (leftWidth, rightWidth) { this.setWidth(leftWidth); this.skipNextLoad(); this.updateView(); }; BreadcrumbsView.prototype.addEventHandlers = function () { var _this = this; this.addHandler(this._listElement, "click", ["BPT-Breadcrumb", "BPT-Breadcrumb-Selected"], function (evt) { _this.takeDownContextMenu(); _this._grabKeyFocus = true; var element = evt.target; _this.selectBreadcrumb(element); _this.updateView(); }); this._htmlElementSource.addEventListener("mousedown", function (evt) { _this.checkToPullDownTooltip(); }); }; BreadcrumbsView.prototype.lastKey = function (key) { this._lastKey = key; }; BreadcrumbsView.prototype.setWidth = function (width) { $m("#BreadcrumbsView").parent(".BPT-HorizontalPane-BreadcrumbBar").css("width", width + "px"); }; BreadcrumbsView.prototype.calculateFirstOrLastElementToDisplay = function (bar, breadcrumbElements) { var _this = this; var barRect = bar.get(0).getBoundingClientRect(); var spaceLeft = barRect.width - BreadcrumbsView.ARROW_WIDTH * 2 - 40; var selectedIndex = -1; if (this._lastBreadcrumbToShow === undefined) { breadcrumbElements.each(function (index, element) { if (element.getAttribute("class").indexOf("BPT-Breadcrumb-Selected") >= 0) { selectedIndex = index; } if (index >= _this._firstBreadcrumbToShow && (spaceLeft > 0)) { var elementRect = element.getBoundingClientRect(); if (spaceLeft > elementRect.width) { spaceLeft -= elementRect.width; _this._lastBreadcrumbToShow = index; } else { spaceLeft = 0; } } }); } else { var indexArray = []; breadcrumbElements.each(function (index, element) { if (element.getAttribute("class").indexOf("BPT-Breadcrumb-Selected") >= 0) { selectedIndex = index; } indexArray[index] = element; }); for (var index = indexArray.length - 1; index >= 0 && spaceLeft > 0; index--) { if (index <= this._lastBreadcrumbToShow) { var element = indexArray[index]; var elementRect = element.getBoundingClientRect(); if (spaceLeft > elementRect.width) { spaceLeft -= elementRect.width; this._firstBreadcrumbToShow = index; } else { spaceLeft = 0; } } } } return selectedIndex; }; BreadcrumbsView.prototype.selectBreadcrumb = function (element) { this._selectedElement = element; var uid = element.getAttribute("bc-data-uid"); this.selectElementByUid(uid); }; BreadcrumbsView.prototype.selectElementByUid = function (uid) { var elementInTree = $m("#tree").find(".BPT-HtmlTreeItem[data-id='" + uid + "']"); this.skipNextLoad(); HtmlTreeView.select(elementInTree); var scrollContainer = elementInTree.closest(".BPT-HtmlTree-ScrollContainer").get(0); var elementHeader = elementInTree.find(".BPT-HtmlTreeItem-Header"); Common.ToolWindowHelpers.scrollIntoView(elementHeader.get(0), scrollContainer); }; BreadcrumbsView.prototype.takeDownContextMenu = function () { this._domExplorerWindow.takeDownContextMenu(); }; BreadcrumbsView.prototype.popupTooltip = function (element, x, y, now, focus) { var _this = this; if (Common.ToolWindowHelpers.isContextMenuUp()) { return; } if (!now) { if (this._tooltipComingId) { window.clearTimeout(this._tooltipComingId); } this._tooltipComingId = window.setTimeout(function () { _this._tooltipComingId = null; _this.popupTooltip(element, x, y, true, focus); }, 500); return; } var bcRect = element.getBoundingClientRect(); var bcIndex = element.getAttribute("bcIndex"); if (bcIndex) { var index = parseInt(bcIndex); if (index < this._breadcrumbModel.numberOfBreadcrumbs) { var obj = this._breadcrumbModel.breadcrumb(index); this._tooltip = this._tooltipTemplate.createTemplateElement(obj); $m("#BreadcrumbsView").get(0).appendChild(this._tooltip); var ttRect = this._tooltip.getBoundingClientRect(); $m("#BreadcrumbsView").get(0).removeChild(this._tooltip); this._tooltip.style.left = Math.max(1, x - (ttRect.width / 2)) + "px"; this._tooltip.style.top = (0 - (ttRect.height + 2)) + "px"; this._tooltipConfig = { content: this._tooltip.innerHTML, contentContainsHTML: true, x: Math.max(1, bcRect.left + (bcRect.width / 2) - (ttRect.width / 2)), y: bcRect.top - (ttRect.height + 9) }; Plugin.Tooltip.show(this._tooltipConfig); var bar = $m(".BPT-HorizontalPane-BreadcrumbBar"); var selectedElement = bar.find(".BPT-Breadcrumb-Selected"); if (selectedElement && focus) { selectedElement.focus(); } } } this._tooltipComingId = undefined; }; BreadcrumbsView.prototype.isActiveElementInBreadcrumb = function (bar) { var element = document.activeElement; if (!element) { return false; } var barElement = bar.get(0); while (element.parentNode) { if (element === barElement) { return true; } element = element.parentNode; } return false; }; BreadcrumbsView.prototype.closeTooltip = function () { if (this._tooltipComingId) { window.clearTimeout(this._tooltipComingId); this._tooltipComingId = undefined; return; } if (this._tooltipConfig) { var bar = $m(".BPT-HorizontalPane-BreadcrumbBar"); var doFocus = this.isActiveElementInBreadcrumb(bar); Plugin.Tooltip.dismiss(true); var selectedElement = bar.find(".BPT-Breadcrumb-Selected"); if (selectedElement && doFocus) { selectedElement.focus(); } } }; BreadcrumbsView.prototype.handleKeyPress = function (event) { if (event.ctrlKey || event.shiftKey || event.altKey) { return true; } var selected = $m(".BPT-Breadcrumb-Selected"); var uid = selected.attr("bc-data-uid"); var keyEvent = event; this.lastKey(keyEvent.keyCode); switch (keyEvent.keyCode) { case 37 /* ArrowLeft */: case 38 /* ArrowUp */: var bc = this._breadcrumbModel.findPreviousBreadcrumb(uid); if (bc) { this.closeTooltip(); var selectUid = bc.elementUID; this.selectElementByUid(selectUid); this._grabKeyFocus = true; this.updateView(); } return false; break; case 39 /* ArrowRight */: case 40 /* ArrowDown */: var bc = this._breadcrumbModel.findNextBreadcrumb(uid); if (bc) { this.closeTooltip(); var selectUid = bc.elementUID; this.selectElementByUid(selectUid); this._grabKeyFocus = true; this.updateView(); } return false; break; case 34 /* PageDown */: this.shiftPage(true); return false; break; case 33 /* PageUp */: this.shiftPage(false); return false; break; case 27 /* Escape */: this.closeTooltip(); return false; case 9 /* Tab */: this.closeTooltip(); return true; } return true; }; BreadcrumbsView.prototype.init = function () { var _this = this; var bar = $m(".BPT-HorizontalPane-BreadcrumbBar"); bar.bind("contextmenu", function (ev) { _this.takeDownContextMenu(); _this.closeTooltip(); var element = ev.target; var x = ev.clientX; var y = ev.clientY; if (x <= 0 || y <= 0 || _this._lastKey === 93 /* ContextMenu */) { if (_this._lastKey !== 93 /* ContextMenu */) { _this.selectBreadcrumb(element); } _this._lastKey = undefined; var offset = (_this._selectedElement).getBoundingClientRect(); x = offset.left; y = offset.top; element = _this._selectedElement; } else { _this.selectBreadcrumb(element); } var uid = element.getAttribute("bc-data-uid"); var elementInTree = $m("#tree").find(".BPT-HtmlTreeItem[data-id='" + uid + "']"); _this._grabKeyFocus = false; window.setTimeout(function () { bar.focus(); _this._domExplorerWindow.htmlContextMenu(elementInTree, x, y); _this.skipNextLoad(); _this.updateView(); }, 1); }); bar.bind("keydown", function (event) { _this.takeDownContextMenu(); if (!(_this.handleKeyPress(event))) { event.preventDefault(); return false; } return true; }, true); $m(".BPT-HorizontalPane-BreadcrumbBar-Arrow").bind("click", function (evt) { var element = evt.target; _this.shiftPage((element.getAttribute("id") === "breadcrumbRightArrow")); return false; }); }; BreadcrumbsView.prototype.shiftPage = function (right) { this.takeDownContextMenu(); if (right) { if (this._lastBreadcrumbToShow < this._breadcrumbModel.numberOfBreadcrumbs - 1) { this._lastBreadcrumbToShow++; this._firstBreadcrumbToShow = undefined; } else { return; } } else { if (this._firstBreadcrumbToShow > 0) { this._firstBreadcrumbToShow--; this._lastBreadcrumbToShow = undefined; } else { return; } } this.skipNextLoad(); this._forceSelectedIntoView = false; this._grabKeyFocus = true; this.updateView(); }; BreadcrumbsView.ARROW_WIDTH = 16; return BreadcrumbsView; })(Common.ModelView.ListView); Dom.BreadcrumbsView = BreadcrumbsView; })(Dom || (Dom = {})); // winningStyleModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; (function (Wsp) { var Source = (function () { function Source(selector, value, fileUrl, fileLine, fileColumn, fileLinkText, tooltip, isWinning, isImportant, isEnabled, isDeleted, changeState, ariaChangeStateString, ariaOverriddenString, status, isColor, propertyId) { this.selector = selector; this.value = value; this.fileUrl = fileUrl; this.fileLine = fileLine; this.fileColumn = fileColumn; this.fileLinkText = fileLinkText; this.tooltip = tooltip; this.isWinning = isWinning; this.isImportant = isImportant; this.isEnabled = isEnabled; this.isDeleted = isDeleted; this.changeState = changeState; this.ariaChangeStateString = ariaChangeStateString; this.ariaOverriddenString = ariaOverriddenString; this.status = status; this.isColor = isColor; this.propertyId = propertyId; } Object.defineProperty(Source.prototype, "isWinningAndEnabled", { get: function () { return this.isWinning && this.isEnabled; }, enumerable: true, configurable: true }); Object.defineProperty(Source.prototype, "valueForDisplay", { get: function () { var value = this.valueWithPriority; return value.length ? value : "\u2003"; }, enumerable: true, configurable: true }); Object.defineProperty(Source.prototype, "valueWithPriority", { get: function () { return this.value + (this.isImportant ? " !important" : ""); }, enumerable: true, configurable: true }); Object.defineProperty(Source.prototype, "isDisplayableColor", { get: function () { return this.isValid && this.isColor; }, enumerable: true, configurable: true }); Object.defineProperty(Source.prototype, "isValid", { get: function () { return this.status === 1 /* Valid */; }, enumerable: true, configurable: true }); Object.defineProperty(Source.prototype, "isInvalid", { get: function () { return this.status !== 1 /* Valid */; }, enumerable: true, configurable: true }); Object.defineProperty(Source.prototype, "arialInvalidString", { get: function () { return this.isValid ? "" : Dom.StyleProperty.AriaInvalidString; }, enumerable: true, configurable: true }); return Source; })(); Wsp.Source = Source; var Style = (function () { function Style(_model, propertyName, propertyValue) { this._model = _model; this.propertyName = propertyName; this.propertyValue = propertyValue; this.sources = []; this.enabledCount = 0; this.changeState = Dom.StyleChangeNotifier.CHANGE_BAR_NONE; } Style.prototype.isColor = function () { return this.propertyName.indexOf("color") > -1 ? true : false; }; Style.prototype.hasChildren = function () { return !!this.sources && this.sources.length > 0; }; Style.prototype.addSource = function (source) { this.sources.unshift(source); if (source.isEnabled && !source.isDeleted) { this.enabledCount++; } }; Object.defineProperty(Style.prototype, "children", { get: function () { return this.sources; }, enumerable: true, configurable: true }); Object.defineProperty(Style.prototype, "uniqueId", { get: function () { return "Dom_Wsp_Style" + this.propertyName; }, enumerable: true, configurable: true }); Object.defineProperty(Style.prototype, "expanded", { get: function () { return this._model.isExpanded(this.uniqueId); }, set: function (expanded) { this._model.setExpansionState(this.uniqueId, expanded); }, enumerable: true, configurable: true }); Style.prototype.equals = function (other) { if (!other) { return false; } if (this.propertyName !== other.propertyName || this.propertyValue !== other.propertyValue || this.sources.length !== other.sources.length) { return false; } for (var i = 0; i < this.sources.length; i++) { var lhs = this.sources[i]; var rhs = other.sources[i]; if (lhs.selector !== rhs.selector || lhs.value !== rhs.value || lhs.isWinning !== rhs.isWinning || lhs.fileLinkText !== rhs.fileLinkText || lhs.fileUrl !== rhs.fileUrl) { return false; } } return true; }; Object.defineProperty(Style.prototype, "isEnabled", { get: function () { return this.enabledCount > 0; }, enumerable: true, configurable: true }); Object.defineProperty(Style.prototype, "isEnabledIndeterminate", { get: function () { if (this.enabledCount <= 0) { return false; } var nonDeletedCount = 0; for (var i = 0; i < this.sources.length; i++) { if (!this.sources[i].isDeleted) { nonDeletedCount++; } } return this.enabledCount < nonDeletedCount; }, enumerable: true, configurable: true }); Style.prototype.recalculateEnabledCount = function () { var count = 0; for (var i = 0; i < this.sources.length; i++) { if (this.sources[i].isEnabled && !this.sources[i].isDeleted) { count++; } } this.enabledCount = count; }; Style.prototype.updateChangeState = function () { var changeState = Dom.StyleChangeNotifier.CHANGE_BAR_NONE; var ariaString = ""; for (var i = 0; i < this.sources.length; i++) { if (this.sources[i].changeState !== Dom.StyleChangeNotifier.CHANGE_BAR_NONE) { changeState = Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE; if (!this.expanded) { ariaString = Dom.StyleRule.AriaChangeStateUpdateString; } break; } } this.changeState = changeState; this.ariaChangeStateString = ariaString; }; return Style; })(); Wsp.Style = Style; var Model = (function (_super) { __extends(Model, _super); function Model(_remoteDom, styleCache, createShortenedUrlText) { var _this = this; _super.call(this); this._remoteDom = _remoteDom; this._getStyleResults = {}; this._listenerArray = []; this._showAllStyles = false; this._styleList = []; this.allStylesChanged = new Common.EventSource(); this.listSource = function (callback, args) { styleCache.updateView(args[0], function (elementStyleModel) { _this._elementStyleModel = elementStyleModel; _this._getStyleRuleResults = elementStyleModel.rules; _this._elementStyleModel.addUpdateListener(_this); }); _this._remoteDom.getComputedStyles(args[0]).done(function (stylesResultArray) { if (!stylesResultArray) { return; } _this._getStyleResults = stylesResultArray[0]; _this._styleList = _this.determineWinningStyles(_this._getStyleResults, _this._getStyleRuleResults); callback(_this._styleList); }); }; this._uniqueIdsOfExpandedStyles = {}; this._createShortenedUrlText = function (s) { if (!s) { return undefined; } var shortened = createShortenedUrlText(s); return shortened.replace(/\\"/g, "\""); }; } Model.prototype.clearModel = function () { this._getStyleResults = {}; this._getStyleRuleResults = []; this._styleList = []; this.cache = this._styleList; }; Model.prototype.isExpanded = function (uniqueId) { return this._uniqueIdsOfExpandedStyles[uniqueId] === true; }; Model.prototype.setExpansionState = function (uniqueId, expanded) { if (this.isExpanded(uniqueId) === expanded) { return; } if (expanded) { this._uniqueIdsOfExpandedStyles[uniqueId] = true; } else { delete this._uniqueIdsOfExpandedStyles[uniqueId]; } }; Object.defineProperty(Model.prototype, "showAllStyles", { get: function () { return this._showAllStyles; }, set: function (value) { if (this._showAllStyles !== value) { this._showAllStyles = value; if (this._getStyleResults && this._getStyleRuleResults) { this._styleList = this.determineWinningStyles(this._getStyleResults, this._getStyleRuleResults); this.cache = this._styleList; } this.allStylesChanged.invoke(value); } }, enumerable: true, configurable: true }); Object.defineProperty(Model.prototype, "nameFilter", { get: function () { return this._nameFilter; }, set: function (value) { if (this._nameFilter !== value) { this._nameFilter = value; if (this._getStyleResults && this._getStyleRuleResults) { this._styleList = this.determineWinningStyles(this._getStyleResults, this._getStyleRuleResults); this.cache = this._styleList; } } }, enumerable: true, configurable: true }); Model.prototype.determineWinningStyles = function (getStyleResults, getStyleRuleResults) { var styleList = []; var propertyName; var styleGroups = {}; var propertyNames = []; var addProperty = function (property) { if (property.isApplied && property.isValidName) { if (!styleGroups[property.name]) { styleGroups[property.name] = []; propertyNames.push(property.name); } styleGroups[property.name].unshift(property); } }; for (var i = 0; i < getStyleRuleResults.length; i++) { var rule = getStyleRuleResults[i]; for (var j = rule.properties.length - 1; j >= 0; j--) { var property = rule.properties[j]; if (property.isShorthand) { if (property.isApplied) { property.properties.forEach(addProperty); } } else { addProperty(property); } } } if (this.showAllStyles) { propertyNames = []; for (propertyName in getStyleResults) { if (getStyleResults.hasOwnProperty(propertyName)) { propertyNames.push(propertyName); } } } propertyNames = this.applyPropertyNameFilter(propertyNames); propertyNames.sort(); for (i = 0; i < propertyNames.length; i++) { propertyName = propertyNames[i]; var styleGroup = styleGroups[propertyName]; var style = new Style(this, propertyName, getStyleResults[propertyName]); var changeState = Dom.StyleChangeNotifier.CHANGE_BAR_NONE; if (styleGroup) { for (var j = 0; j < styleGroup.length; j++) { var styleGroupItem = styleGroup[j]; var source = new Source(styleGroupItem.rule.selectorText, styleGroupItem.value, styleGroupItem.rule.fileUrl, styleGroupItem.rule.fileLine, styleGroupItem.rule.fileColumn, styleGroupItem.rule.fileLinkText, styleGroupItem.rule.tooltip, styleGroupItem.isWinning, styleGroupItem.isImportant, styleGroupItem.isEnabled, styleGroupItem.isSubProperty ? styleGroupItem.container.isDeleted : styleGroupItem.isDeleted, styleGroupItem.changeState, styleGroupItem.ariaChangeStateString, styleGroupItem.ariaOverriddenString, styleGroupItem.status, style.isColor(), styleGroupItem.uid); style.addSource(source); if (!style.expanded && source.changeState !== Dom.StyleChangeNotifier.CHANGE_BAR_NONE) { style.changeState = Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE; style.ariaChangeStateString = Dom.StyleRule.AriaChangeStateUpdateString; } } } styleList.push(style); } return styleList; }; Model.prototype.applyPropertyNameFilter = function (propertyNames) { if (!this._nameFilter || this._nameFilter.trim().length === 0) { return propertyNames; } var filteredPropertyNames = []; if (this._nameFilter && this._nameFilter.length > 0) { for (var i = 0; i < propertyNames.length; i++) { var propertyName = propertyNames[i]; if (propertyName.indexOf(this._nameFilter) > -1) { filteredPropertyNames.push(propertyName); } } } return filteredPropertyNames; }; Model.prototype.toggleEnabled = function (propertyId, isEnabled) { var _this = this; return new Plugin.Promise(function (completed, error) { var property = _this._elementStyleModel.getPropertyById(propertyId); if (property) { var owner = property.isSubProperty ? property.owner : property; if (!owner.isDeleted && (isEnabled === undefined || isEnabled !== property.isEnabled)) { property.toggleEnable().then(completed); } else { completed(); } } else { error("Property not found"); } }); }; Model.prototype.forEachStyle = function (func) { this._styleList.forEach(func); }; Model.prototype.addUpdateListener = function (listener) { if (this._listenerArray.indexOf(listener) < 0) { this._listenerArray.push(listener); } }; Model.prototype.removeUpdateListener = function (listener) { var index = this._listenerArray.indexOf(listener); if (index >= 0) { this._listenerArray.splice(index, 1); } }; Model.prototype.onRuleChange = function (evt, rule, args) { this.fireRuleChange(evt, rule, args); }; Model.prototype.onPropertyChange = function (evt, property, args) { if (evt === 3 /* IsWinning */) { this.onPropertyWinningRuleChange(property, args); } else if (evt === 4 /* IsEnabled */) { this.onPropertyEnableChange(property, args); } else if (evt === 2 /* Value */) { this.onPropertyValueChange(property, args); } else if (evt === 6 /* Status */) { this.onPropertyStatusChange(property, args); } else if (evt === 11 /* Change */) { this.onPropertyChangeStateChange(property); } else { this.firePropertyChange(evt, property, args); } }; Model.prototype.fireRuleChange = function (evt, rule, args) { var array = this._listenerArray.slice(0); for (var i = 0, end = array.length; i < end; i++) { var listener = array[i]; listener.onRuleChange(evt, rule, args); } }; Model.prototype.firePropertyChange = function (evt, property, args) { var array = this._listenerArray.slice(0); for (var i = 0, end = array.length; i < end; i++) { var listener = array[i]; listener.onPropertyChange(evt, property, args); } }; Model.prototype.onPropertyStatusChange = function (property, newStatus) { var source = this.findSourceByUid(property.uid); if (!source) { return; } if (source.status !== newStatus) { var oldStatus = source.status; source.status = newStatus; this.firePropertyChange(6 /* Status */, property, newStatus); } }; Model.prototype.onPropertyChangeStateChange = function (property) { var source = this.findSourceByUid(property.uid); if (!source) { return; } if (source.changeState !== property.changeState) { var oldChangeState = source.changeState; source.changeState = property.changeState; var style = this.findStyleByName(property.name); style.updateChangeState(); this.firePropertyChange(11 /* Change */, property); } }; Model.prototype.onPropertyValueChange = function (property, newValueForDisplay) { var source = this.findSourceByUid(property.uid); if (!source) { return; } if (source.valueForDisplay !== newValueForDisplay) { var oldValue = source.value; source.value = property.value; source.isImportant = property.isImportant; this.firePropertyChange(2 /* Value */, property, newValueForDisplay); } }; Model.prototype.onPropertyEnableChange = function (property, isEnabled) { var source = this.findSourceByUid(property.uid); if (!source) { return; } if (source.isEnabled !== isEnabled) { var oldEnabled = source.isEnabled; source.isEnabled = isEnabled; this.firePropertyChange(4 /* IsEnabled */, property, isEnabled); } }; Model.prototype.onPropertyWinningRuleChange = function (property, isWinning) { var source = this.findSourceByUid(property.uid); if (!source) { return; } if (source.isWinning !== isWinning) { var oldWinning = source.isWinning; source.isWinning = isWinning; this.firePropertyChange(3 /* IsWinning */, property, isWinning); } }; Model.prototype.findSourceByUid = function (propertyId) { for (var i = 0, end = this._styleList.length; i < end; i++) { var style = this._styleList[i]; var children = style.children; for (var j = 0, jend = children.length; j < jend; j++) { var source = children[j]; if (source.propertyId === propertyId) { return source; } } } return null; }; Model.prototype.findStyleByName = function (name) { for (var i = 0, end = this._styleList.length; i < end; i++) { var style = this._styleList[i]; if (style.propertyName === name) { return style; } } }; Model.prototype.getPropertyById = function (propertyId) { if (!propertyId) { return null; } return this._elementStyleModel.getPropertyById(propertyId); }; Model.prototype.handleFileLinkClick = function (encodedUrl, line, column) { try { var url = decodeURI(encodedUrl); Plugin.Host.showDocument(url, line || 1, column || 1); } catch (ex) { } }; Model.prototype.startSingleEdit = function () { this._remoteDom.startSingleEdit(); }; Model.prototype.endSingleEdit = function () { this._remoteDom.endSingleEdit(); }; Model.prototype.toggleEnableForStyle = function (style, isEnabled) { var _this = this; var promiseList = []; if (isEnabled === undefined || isEnabled !== style.isEnabled) { var newIsEnabled = !style.isEnabled; style.sources.forEach(function (source) { var property = _this.getPropertyById(source.propertyId); var owner = property.isSubProperty ? property.owner : property; if (property && !owner.isDeleted && property.isEnabled !== newIsEnabled) { promiseList.push(property.toggleEnable()); style.enabledCount += newIsEnabled ? 1 : -1; } }); } return Plugin.Promise.join(promiseList).then(function () { return style.recalculateEnabledCount(); }); }; Model.prototype.insertNewSource = function (newProperty, insertBeforeProperty) { for (var i = 0, end = this._styleList.length; i < end; i++) { var style = this._styleList[i]; var children = style.children; for (var j = 0, jend = children.length; j < jend; j++) { var source = children[j]; if (source.propertyId === insertBeforeProperty.uid) { var source = new Source(newProperty.rule.selectorText, newProperty.value, newProperty.rule.fileUrl, newProperty.rule.fileLine, newProperty.rule.fileColumn, newProperty.rule.fileLinkText, newProperty.rule.tooltip, newProperty.isWinning, newProperty.isImportant, newProperty.isEnabled, newProperty.isSubProperty ? newProperty.container.isDeleted : newProperty.isDeleted, newProperty.changeState, newProperty.ariaChangeStateString, newProperty.ariaOverriddenString, newProperty.status, style.isColor(), newProperty.uid); children.splice(j, 0, source); return source; } } } }; Model.prototype.tcGetStyleList = function () { return this._styleList; }; return Model; })(Common.ModelView.ListModel); Wsp.Model = Model; })(Dom.Wsp || (Dom.Wsp = {})); var Wsp = Dom.Wsp; })(Dom || (Dom = {})); // changesModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var ChangesModel = (function (_super) { __extends(ChangesModel, _super); function ChangesModel(_remoteDom, _domExplorer) { var _this = this; _super.call(this); this._remoteDom = _remoteDom; this._domExplorer = _domExplorer; this._changedSources = []; this._ruleMap = {}; this._collapsedStyles = {}; this.listSource = function (callback) { Dom.ElementStyleModel.create(_this._remoteDom, null, function (styles) { _this._changedSources = []; _this._ruleMap = {}; _this._styles = styles; styles.addUpdateListener(_this); styles.rules.forEach(function (rule) { if (_this.changesInRuleAreSignificant(rule)) { var url = rule.styleHref || rule.fileUrl; if (rule.isInlined) { url = _this._inlineStyleString || (_this._inlineStyleString = Common.ToolWindowHelpers.loadString("InlineStyleSelector")); } else if (rule.wasCreatedInSession) { url = _this._newRuleString || (_this._newRuleString = Common.ToolWindowHelpers.loadString("ChangesViewNewInSessionCSSSource")); } else if (!url) { url = _this._unknownSourceString || (_this._unknownSourceString = Common.ToolWindowHelpers.loadString("ChangesViewUnknownCSSSource")); } var changedSource = _this.findSource(url); if (!changedSource) { changedSource = new Dom.ChangedSource(url, _this, rule.isInlined); _this._changedSources.push(changedSource); } var changedRule = new Dom.ChangedRule(changedSource, rule, url); _this._ruleMap[rule.uid] = changedRule; changedSource.add(changedRule); } }); _this._changedSources.forEach(function (changedSource) { changedSource.sort(); }); callback(_this._changedSources); styles.addUpdateListener(_this); }); }; } Object.defineProperty(ChangesModel.prototype, "changes", { get: function () { return this._changedSources; }, enumerable: true, configurable: true }); Object.defineProperty(ChangesModel.prototype, "textForCopy", { get: function () { var first = true; var text = ""; this._changedSources.forEach(function (source) { if (!first) { text += "\r\n"; } text += source.textForCopy; first = false; }); return text; }, enumerable: true, configurable: true }); ChangesModel.prototype.isCollapsed = function (id) { return !!this._collapsedStyles[id]; }; ChangesModel.prototype.setCollapsedState = function (id, isCollapsed) { if (this.isCollapsed(id) === isCollapsed) { return; } if (isCollapsed) { this._collapsedStyles[id] = true; } else { delete this._collapsedStyles[id]; } }; ChangesModel.prototype.lookupSource = function (uid) { for (var i = 0; i < this._changedSources.length; i++) { var source = this._changedSources[i]; if (source.uniqueId === uid) { return source; } } }; ChangesModel.prototype.lookupRule = function (uid) { return this._ruleMap[uid]; }; ChangesModel.prototype.selectElement = function (uid) { var _this = this; this._remoteDom.getParentChainForStyle(uid).done(function (chain) { if (chain) { _this._domExplorer.domTree.expandElementChain(chain, false); } }); }; ChangesModel.prototype.navigateFileLink = function (originalUrl, line, column) { try { var url = decodeURI(originalUrl); Plugin.Host.showDocument(url, line || 1, column || 1); } catch (ex) { } }; ChangesModel.prototype.addUpdateListener = function (listener) { this._styles.addUpdateListener(listener); }; ChangesModel.prototype.onRuleChange = function (event, rule, args) { if (event === 7 /* FileLinkTooltip */) { this._changedSources.forEach(function (source) { source.updateTooltip(rule, args); }); } }; ChangesModel.prototype.onPropertyChange = function (event, property, arg) { }; ChangesModel.prototype.findSource = function (source) { for (var i = 0; i < this._changedSources.length; i++) { var changedSource = this._changedSources[i]; if (changedSource.source === source) { return changedSource; } } }; ChangesModel.prototype.changesInRuleAreSignificant = function (rule) { if (!rule.isOriginal) { return true; } for (var i = 0; i < rule.properties.length; i++) { var property = rule.properties[i]; if (!property.isOriginal && !(property.wasCreatedInSession && !property.isEnabled && property.status === 1 /* Valid */)) { return true; } } return false; }; return ChangesModel; })(Common.ModelView.ListModel); Dom.ChangesModel = ChangesModel; })(Dom || (Dom = {})); // eventsModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var EventHandler = (function () { function EventHandler(column, cookie, documentUrl, functionName, line, text, tooltip) { this.column = column; this.cookie = cookie; this.documentUrl = documentUrl; this.functionName = functionName; this.line = line; this.text = text; this.tooltip = tooltip; } return EventHandler; })(); Dom.EventHandler = EventHandler; var EventAndHandlers = (function () { function EventAndHandlers(_model, eventName, children) { this._model = _model; this.eventName = eventName; this.children = children; this.isDirty = false; } Object.defineProperty(EventAndHandlers.prototype, "uniqueId", { get: function () { return this.eventName; }, enumerable: true, configurable: true }); Object.defineProperty(EventAndHandlers.prototype, "expanded", { get: function () { return !this._model.isCollapsed(this.uniqueId); }, set: function (expanded) { this._model.setCollapsedState(this.uniqueId, !expanded); }, enumerable: true, configurable: true }); EventAndHandlers.prototype.hasChildren = function () { return !!this.children && this.children.length > 0; }; return EventAndHandlers; })(); Dom.EventAndHandlers = EventAndHandlers; var EventsModel = (function (_super) { __extends(EventsModel, _super); function EventsModel(remoteDom, styleCache, createShortenedUrlText) { var _this = this; _super.call(this); this._uniqueIdsOfCollapsedStyles = {}; this.listSource = function (callback, args) { remoteDom.collectEvents(args[0], function (e) { _this.onEventHandlersRetrieved(e, callback); }, function (e) { _this.onEventHandlerAdded(e, callback); }, function (e) { _this.onEventHandlerRemoved(e, callback); }); }; } Object.defineProperty(EventsModel.prototype, "updateCallback", { get: function () { return this._updateCallback; }, set: function (callback) { this._updateCallback = callback; }, enumerable: true, configurable: true }); EventsModel.prototype.isCollapsed = function (uniqueId) { return this._uniqueIdsOfCollapsedStyles[uniqueId] === true; }; EventsModel.prototype.setCollapsedState = function (uniqueId, collapsed) { if (this.isCollapsed(uniqueId) === collapsed) { return; } if (collapsed) { this._uniqueIdsOfCollapsedStyles[uniqueId] = true; } else { delete this._uniqueIdsOfCollapsedStyles[uniqueId]; } }; EventsModel.prototype.onEventHandlerAdded = function (handler, callback) { var _this = this; if (!handler) { return; } var cache = this.cache; Plugin.Host.getDocumentLocation(handler.document).done(function (loc) { _this.processAddedEventHandler(cache, handler, loc); if (callback) { callback(cache); } }); }; EventsModel.prototype.onEventHandlerRemoved = function (handler, callback) { if (!handler) { return; } this.processRemovedEventHandler(this.cache, handler); if (callback) { callback(this.cache); } }; EventsModel.prototype.onEventHandlersRetrieved = function (events, callback) { var _this = this; var eventList = []; var eventsToProcess = events.length; if (eventsToProcess) { for (var i = 0; i < events.length; i++) { var event = events[i]; Plugin.Host.getDocumentLocation(event.document).done(function (loc) { _this.processAddedEventHandler(eventList, event, loc); eventsToProcess--; if (!eventsToProcess) { callback(eventList); } }); } } else { callback(eventList); } }; EventsModel.prototype.processAddedEventHandler = function (eventList, e, loc) { var match = this.findMatchingEventAndHandlers(e.eventName, eventList); if (!match) { match = new EventAndHandlers(this, e.eventName, []); eventList.push(match); } else { for (var i = 0; i < match.children.length; i++) { if (match.children[i].cookie === e.cookie) { return; } } } var line = e.line + 1; var column = e.column + 1; var text = null; var tooltip = null; text = Common.ToolWindowHelpers.createFileLinkText(e.document, line); if (e.document !== undefined) { if (e.document.indexOf("eval code") === 0) { tooltip = Common.ToolWindowHelpers.loadString("EvalCodeEventHandlerToolTip"); } else if (e.document.indexOf("Function code") === 0) { tooltip = Common.ToolWindowHelpers.loadString("FunctionCodeEventHandlerToolTip"); } else if (e.document.indexOf("script block") === 0) { tooltip = Common.ToolWindowHelpers.loadString("DynamicScriptBlockEventHandlerToolTip"); } else { tooltip = Common.ToolWindowHelpers.loadString("EventHandlerTooltip", [ Common.EncodingUtilities.escapeHtml(e.eventName), e.usesCapture, Common.EncodingUtilities.escapeHtml(loc), line, column]); } } else { text = e.document; tooltip = Common.ToolWindowHelpers.loadString("ExternalEventHandlerTooltip", [Common.EncodingUtilities.escapeHtml(e.eventName), e.usesCapture]); } match.children.push(new EventHandler(column, e.cookie, Common.EncodingUtilities.escapeHtml(e.document), e.functionName, line, text, tooltip)); match.isDirty = true; return; }; EventsModel.prototype.processRemovedEventHandler = function (eventList, e) { var match = this.findMatchingEventAndHandlers(e.eventName, eventList); if (!match) { return; } for (var i = 0; i < match.children.length; i++) { if (match.children[i].cookie === e.cookie) { match.children.splice(i, 1); return; } } }; EventsModel.prototype.findMatchingEventAndHandlers = function (eventName, eventList) { var match = null; for (var i = 0; i < eventList.length; i++) { if (eventList[i].eventName === eventName) { return eventList[i]; } } return null; }; return EventsModel; })(Common.ModelView.ListModel); Dom.EventsModel = EventsModel; })(Dom || (Dom = {})); // expandingListView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var ExpandingListView = (function (_super) { __extends(ExpandingListView, _super); function ExpandingListView(htmlElementSource, viewDivId, defaultItemTemplateId, model, _expansionChangeCallback, alternateTemplates, localizer, idPropertyName, sortPropertyName, isChanged, clearDirtyFlag) { _super.call(this, htmlElementSource, viewDivId, defaultItemTemplateId, model, alternateTemplates, localizer, idPropertyName, sortPropertyName, isChanged, clearDirtyFlag); this._expansionChangeCallback = _expansionChangeCallback; this.addClickHandlerThatExpandsAndCollapsesChildren(); this.addKeyboardNavigationHandlers(); this.addFocusSettingDivClickHandler(); } ExpandingListView.prototype.postViewProcessing = function () { _super.prototype.postViewProcessing.call(this); var menuConfig = this.getMenuConfig(); if (menuConfig) { this._contextMenuController = new ExpandingContextMenuController(this, this.listRoot, menuConfig); } var headerElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this.listRoot, ExpandingListView.HEADER_CLASS); if (headerElement) { headerElement.tabIndex = 1; } }; ExpandingListView.prototype.findHeaderOrChild = function (element) { while (element.parentElement && !(element.classList.contains(ExpandingListView.HEADER_CLASS) || element.classList.contains(ExpandingListView.CHILD_VALUE_CONTAINER_CLASS))) { element = element.parentElement; } return element; }; ExpandingListView.prototype.getMenuConfig = function () { return null; }; ExpandingListView.prototype.beforeUpdate = function (newThing, oldThing, updatedElement) { this._lastItemHadFocus = false; this._subItemWithFocus = null; if (this.idPropertyName) { var activeElement = this.htmlElementSource.activeElement; if (activeElement) { var updatedHeaderElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(updatedElement, ExpandingListView.HEADER_CLASS); var activeItemElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(activeElement, ExpandingListView.LIST_ITEM_CLASS); var activeHeaderElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(activeItemElement, ExpandingListView.HEADER_CLASS); this._lastItemHadFocus = updatedHeaderElement === activeHeaderElement; if (activeElement.classList.contains(ExpandingListView.CHILD_VALUE_CONTAINER_CLASS)) { this._subItemWithFocus = activeElement.getAttribute("data-listsubid"); } } } }; ExpandingListView.prototype.afterUpdate = function (newThing, oldThing) { if (this._lastItemHadFocus) { var elementToGainFocus; if (this._subItemWithFocus) { elementToGainFocus = this.listRoot.querySelector("[data-listsubid='" + this._subItemWithFocus + "']"); } if (!elementToGainFocus) { elementToGainFocus = this.listRoot.querySelector("[data-listid='" + oldThing[this.idPropertyName] + "'] > ." + ExpandingListView.HEADER_CLASS); } if (elementToGainFocus) { this.setFocus(elementToGainFocus); } } }; ExpandingListView.prototype.beforeDelete = function (oldThing, deletedElement) { var activeElement = this.htmlElementSource.activeElement; var itemElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(activeElement, ExpandingListView.LIST_ITEM_CLASS); this._lastItemHadFocus = itemElement === deletedElement; }; ExpandingListView.prototype.afterDelete = function () { if (this._lastItemHadFocus) { var elementToGainFocus = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(this.listRoot, ExpandingListView.HEADER_CLASS); if (elementToGainFocus) { this.setFocus(elementToGainFocus); } } }; ExpandingListView.prototype.toggleExpander = function (element) { var collapsibleSection = element.parentElement; var wasExpanded = collapsibleSection.getAttribute("aria-expanded") === "true"; collapsibleSection.setAttribute("aria-expanded", wasExpanded ? "false" : "true"); if (this._expansionChangeCallback) { this._expansionChangeCallback(element.parentElement.parentElement.getAttribute("data-listid"), !wasExpanded); } }; ExpandingListView.prototype.addClickHandlerThatExpandsAndCollapsesChildren = function () { var _this = this; this.addHandler(this.listRoot, "click", [ExpandingListView.EXPAND_ICON_CLASS], function (evt) { _this.toggleExpander(evt.target); return false; }); }; ExpandingListView.prototype.addKeyboardNavigationHandlers = function () { var _this = this; this.addHandler(this.listRoot, "keydown", null, function (keyDownEvent) { if (keyDownEvent.ctrlKey || keyDownEvent.shiftKey || keyDownEvent.altKey) { return true; } if (Common.ToolWindowHelpers.isContextMenuUp()) { return true; } if (HtmlTreeView.currentFocusOnInput()) { return true; } var element = keyDownEvent.target; var srcElement = keyDownEvent.srcElement; if (keyDownEvent.key === Common.Keys.DOWN) { _this.moveFocusDown(srcElement); } else if (keyDownEvent.key === Common.Keys.UP) { _this.moveFocusUp(srcElement); } else if (keyDownEvent.key === Common.Keys.LEFT) { _this.focusParentOrCollapse(srcElement); } else if (keyDownEvent.key === Common.Keys.RIGHT) { _this.expandOrFocusChild(srcElement); } else if (keyDownEvent.key === Common.Keys.HOME) { _this.moveFocusToFirst(srcElement); } else if (keyDownEvent.key === Common.Keys.END) { _this.moveFocusToLast(srcElement); } else { return true; } return false; }); }; ExpandingListView.prototype.focusParentOrCollapse = function (htmlElement) { var listItemDiv; if (this.isChild(htmlElement)) { listItemDiv = htmlElement.parentElement.parentElement; var computedValueDiv = listItemDiv.children[0]; this.setFocus(computedValueDiv); return; } var expandIcon = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(htmlElement.parentElement, ExpandingListView.EXPAND_ICON_CLASS); if (expandIcon) { var collapsibleSection = expandIcon.parentElement; var wasExpanded = collapsibleSection.getAttribute("aria-expanded") === "true"; if (wasExpanded) { this.toggleExpander(expandIcon); } } }; ExpandingListView.prototype.expandOrFocusChild = function (htmlElement) { if (this.isChild(htmlElement)) { return; } if (htmlElement.getAttribute("aria-expanded") !== "true") { var expandIcon = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(htmlElement, ExpandingListView.EXPAND_ICON_CLASS); if (expandIcon) { this.toggleExpander(expandIcon); } return; } var collapsedSectionDiv = htmlElement.nextElementSibling; if (collapsedSectionDiv && collapsedSectionDiv.children && collapsedSectionDiv.children.length) { var valueContainer = collapsedSectionDiv.children[0]; this.setFocus(valueContainer); } }; ExpandingListView.prototype.findFocusableUp = function (htmlElement) { var previousHtmlElement = htmlElement.previousElementSibling; if (previousHtmlElement) { return previousHtmlElement; } var listItemDiv; if (this.isChild(htmlElement)) { listItemDiv = htmlElement.parentElement.parentElement; return F12.DomExplorer.DomExplorerWindow.findDescendentByClass(listItemDiv, ExpandingListView.HEADER_CLASS); } listItemDiv = htmlElement.parentElement; var previousListItemDiv = listItemDiv.previousElementSibling; if (!previousListItemDiv) { return null; } var previousListItemDivsHeader = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(previousListItemDiv, ExpandingListView.HEADER_CLASS); if (previousListItemDivsHeader.getAttribute("aria-expanded") === "true") { if (previousListItemDiv.children && previousListItemDiv.children.length >= 2) { var previousCollapsedSectionDiv = previousListItemDiv.children[1]; return previousCollapsedSectionDiv.lastElementChild; } } return previousListItemDivsHeader; }; ExpandingListView.prototype.moveFocusUp = function (htmlElement) { var elementToFocus = this.findFocusableUp(htmlElement); if (elementToFocus) { this.setFocus(elementToFocus); } }; ExpandingListView.prototype.moveFocusToFirst = function (element) { var moveTo = element; var prev; while (prev = this.findFocusableUp(moveTo)) { moveTo = prev; } if (moveTo) { this.setFocus(moveTo); } }; ExpandingListView.prototype.findFocusableDown = function (htmlElement) { var nextHtmlElement = htmlElement.nextElementSibling; if (nextHtmlElement && this.isChild(htmlElement)) { return nextHtmlElement; } var listItemDiv; if (this.isChild(htmlElement)) { listItemDiv = htmlElement.parentElement.parentElement; } else { if (htmlElement.getAttribute("aria-expanded") === "true") { var collapsedSectionDiv = htmlElement.nextElementSibling; if (collapsedSectionDiv && collapsedSectionDiv.children.length) { var valueContainer = collapsedSectionDiv.children[0]; return valueContainer; } } listItemDiv = htmlElement.parentElement; } var nextListItemDiv = listItemDiv.nextElementSibling; if (nextListItemDiv) { return F12.DomExplorer.DomExplorerWindow.findDescendentByClass(nextListItemDiv, ExpandingListView.HEADER_CLASS); } return null; }; ExpandingListView.prototype.moveFocusDown = function (htmlElement) { var elementToFocus = this.findFocusableDown(htmlElement); if (elementToFocus) { this.setFocus(elementToFocus); } }; ExpandingListView.prototype.moveFocusToLast = function (element) { var moveTo = element; var next; while (next = this.findFocusableDown(moveTo)) { moveTo = next; } if (moveTo) { this.setFocus(moveTo); } }; ExpandingListView.prototype.isChild = function (htmlElement) { return htmlElement.classList.contains(ExpandingListView.CHILD_VALUE_CONTAINER_CLASS); }; ExpandingListView.prototype.addFocusSettingDivClickHandler = function () { var _this = this; this.addHandler(this.listRoot, "click", null, function (evt) { var element = _this.findHeaderOrChild(evt.target); if (element.focus) { _this.setFocus(element); } return true; }); }; ExpandingListView.LIST_ITEM_CLASS = "BPT-ExpandingList-Item"; ExpandingListView.EXPAND_ICON_CLASS = "BPT-ExpandingList-ExpandIcon"; ExpandingListView.HEADER_CLASS = "BPT-ExpandingList-Header"; ExpandingListView.CHILD_VALUE_CONTAINER_CLASS = "BPT-ExpandingList-Child-Value-Container"; return ExpandingListView; })(Common.ModelView.ReconcilingListView); Dom.ExpandingListView = ExpandingListView; var ContextMenuItems; (function (ContextMenuItems) { ContextMenuItems[ContextMenuItems["CopyObject"] = 0] = "CopyObject"; })(ContextMenuItems || (ContextMenuItems = {})); var ExpandingContextMenuController = (function () { function ExpandingContextMenuController(_expandingView, _elementListener, _config) { var _this = this; this._expandingView = _expandingView; this._elementListener = _elementListener; this._config = _config; this._menuId = "ExpandingViewContextMenu" + ExpandingContextMenuController.Uid++; this.initialize(); this._menuItems = []; this._config.menuItems.forEach(function (item) { _this._menuItems.push({ id: item.name, type: 1 /* command */, label: Common.ToolWindowHelpers.loadString(item.textIdentifier) }); }); } ExpandingContextMenuController.prototype.initialize = function () { var _this = this; this._contextMenuListener = function (e) { return _this.onContextMenu(e); }; this._keydownListener = function (e) { return _this.onKeydown(e); }; this._elementListener.addEventListener("contextmenu", this._contextMenuListener); this._elementListener.addEventListener("keydown", this._keydownListener); }; ExpandingContextMenuController.prototype.uninitialize = function () { this._elementListener.removeEventListener("contextmenu", this._contextMenuListener); this._elementListener.removeEventListener("keydown", this._keydownListener); }; ExpandingContextMenuController.prototype.onKeydown = function (event) { var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; if (event.keyCode === 121 /* F10 */ && shiftKey) { var selectedItem = document.querySelector("#" + this._expandingView.listViewDivId + " :focus") || this._elementListener; var rect = selectedItem.getBoundingClientRect(); this.showContextMenu(selectedItem, rect.left, rect.top); event.preventDefault(); event.stopImmediatePropagation(); } return true; }; ExpandingContextMenuController.prototype.onContextMenu = function (evt) { var selectedItem = null; var x = evt.clientX; var y = evt.clientY; if (this._config.getSelectedItem) { selectedItem = this._config.getSelectedItem(x, y); } else if (this._expandingView) { if (x <= 0 || y <= 0) { selectedItem = document.querySelector("#" + this._expandingView.listViewDivId + " :focus"); if (selectedItem) { var offset = selectedItem.getBoundingClientRect(); x = offset.left; y = offset.top; } } else { selectedItem = this._expandingView.findHeaderOrChild(document.elementFromPoint(x, y)); if (selectedItem) { this._expandingView.setFocus(selectedItem); } } } this.showContextMenu(selectedItem, x, y); evt.preventDefault(); evt.stopImmediatePropagation(); return false; }; ExpandingContextMenuController.prototype.onMenuItemClicked = function (menuId, itemId, selection) { for (var i = 0; i < this._menuItems.length; i++) { if (this._menuItems[i].id === itemId) { this._config.menuItems[i].execute(selection); break; } } this.dismiss(); }; ExpandingContextMenuController.prototype.showContextMenu = function (selectedItem, x, y) { var _this = this; this.dismiss(); this._selection = selectedItem; if (!this._contextMenu) { for (var i = 0; i < this._menuItems.length; i++) { this._menuItems[i].disabled = this.createIsDisabledFunction(this._config.menuItems[i].isDisabled); } this._contextMenu = Plugin.ContextMenu.create(this._menuItems, this._menuId, null, null, function (menuId, menuItem) { return _this.onMenuItemClicked(menuId, menuItem.id, _this._selection); }); this._dismissHandler = function (e) { _this.dismiss(); }; } if (this._elementListener) { this._contextMenu.attach(this._elementListener); } this._contextMenu.addEventListener("dismiss", this._dismissHandler); this._contextMenu.show(parseInt(x.toFixed(0)), parseInt(y.toFixed(0))); Common.ToolWindowHelpers.contextMenuUp(true); return false; }; ExpandingContextMenuController.prototype.createIsDisabledFunction = function (func) { var _this = this; return func ? function () { return func(_this._selection); } : function () { return false; }; }; ExpandingContextMenuController.prototype.dismiss = function () { if (this._contextMenu) { this._contextMenu.removeEventListener("dismiss", this._dismissHandler); this._contextMenu.dismiss(); this._contextMenu.dispose(); this._contextMenu = null; } Common.ToolWindowHelpers.contextMenuUp(false); }; ExpandingContextMenuController.Uid = 0; return ExpandingContextMenuController; })(); Dom.ExpandingContextMenuController = ExpandingContextMenuController; })(Dom || (Dom = {})); // winningStyleView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; (function (Wsp) { var T = Common.Templating; var Static = (function () { function Static() { } Static.getPropertyId = function (e) { var parent = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(e, Static.CSS_SOURCE); var propertyId = (parent ? parent.getAttribute("data-uid") : "") || ""; return propertyId; }; Static.isHeader = function (e) { return e.classList.contains(Static.CSS_HEADER); }; Static.isSource = function (e) { return e.classList.contains(Static.CSS_SOURCE); }; Static.findHeaderOrSourceAncestor = function (e) { while (e) { if (Static.isHeader(e) || Static.isSource(e)) { return e; } e = e.parentElement; } return null; }; Static.isCurrentFocusOnInput = function () { var e = document.activeElement; if (!e) { return false; } var s = e.tagName; var isInputText = s === "INPUT" && e.getAttribute("type") === "text"; var isTextArea = s === "TEXTAREA"; return isInputText || isTextArea; }; Static.ALL_STYLES_BUTTON_ID = "allWinningStylesButton"; Static.CSS_ARIA_INVALID = "BPT-Style-PropertyValueAriaInvalid"; Static.CSS_ARIA_CHANGE_STATE = "BPT-WinningStyle-PropertyAriaChangeState"; Static.CSS_ARIA_OVERRIDDEN = "BPT-WinningStyle-PropertyAriaOverridden"; Static.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON = "BPT-ToolbarToggleButton-StateOn"; Static.CSS_CHANGE_BAR = "BPT-Style-ChangeBar"; Static.CSS_FILE_LINK = "BPT-FileLink"; Static.CSS_HEADER = "BPT-ExpandingList-Header"; Static.CSS_HEADER_CHECKBOX = "BPT-WinningStyle-HeaderCheckBox"; Static.CSS_HEADER_COLOR = "BPT-WinningStyle-Color"; Static.CSS_HEADER_COLOR_HIDDEN = "BPT-WinningStyle-Color-Hidden"; Static.CSS_HEADER_VALUE = "BPT-WinningStyle-PropertyValue-Grid"; Static.CSS_INVALID_PROPERTY = "BPT-Style-InvalidProperty"; Static.CSS_NOT_WINNING = "BPT-WinningStyle-NotWinning"; Static.CSS_PROPERTY_NAME = "BPT-WinningStyle-PropertyName"; Static.CSS_PROPERTY_VALUE = "BPT-Style-PropertyValue"; Static.CSS_SCROLL_CONTAINER = "BPT-DataTree-ScrollContainer"; Static.CSS_SOURCE = "BPT-ExpandingList-Child-Value-Container"; Static.CSS_SOURCE_CHECKBOX = "BPT-WinningStyle-SourceCheckBox"; Static.CSS_SOURCE_COLOR = "BPT-WinningStyle-SourceColor"; Static.FILTER_TEXT_BOX_ID = "winningStylesFilterTextBox"; Static.MAX_PROPERTY_VALUE_ROWS = 5; Static.NO_RESULTS_MESSAGE_ID = "winningStylesNoResultsMessage"; return Static; })(); var View = (function (_super) { __extends(View, _super); function View(_domExplorer, _bridge, htmlElementSource, viewDivId, defaultItemTemplateId, _model, alternateTemplates) { var _this = this; _super.call(this, htmlElementSource, viewDivId, defaultItemTemplateId, _model, function (uniqueId, expanded) { return _model.setExpansionState(uniqueId, expanded); }, alternateTemplates, null, "uniqueId", "propertyName", function (a, b) { return !a.equals(b); }); this._domExplorer = _domExplorer; this._bridge = _bridge; this._model = _model; this._tcPropertyEnableCallback = null; this._listElement = this.htmlElementSource.getElementById(this.listViewDivId); this.initializeAllStylesButton(); this._model.allStylesChanged.addHandler(function (newValue) { if (!_this._allStylesButton) { return; } var newValueStr = "" + !newValue; if (_this._allStylesButton.getAttribute("aria-pressed") !== newValueStr) { _this._allStylesButton.setAttribute("aria-pressed", newValueStr); } if (newValue) { _this._allStylesButton.classList.remove(Static.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON); } else { _this._allStylesButton.classList.add(Static.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON); } _this.renderView(); }); this.menuItems = [ { name: "copyProperty", textIdentifier: "CopyPropertyMenuText", execute: function (selectedElement) { return _this.copyObject(selectedElement); } }, { name: "viewSource", textIdentifier: "ViewSourceMenuText", execute: function (selectedElement) { window.setTimeout(function () { if (_this.canViewSource(selectedElement)) { _this.viewSource(selectedElement); } }, 0); }, isDisabled: function (selectedElement) { return !_this.canViewSource(selectedElement); } } ]; this._model.addUpdateListener(this); this.registerClickHandler(); this.registerKeydownHandler(); this.registerDOMAttrModifiedHandler(); this.initializeAllStylesButton(); this.addNameFilterHandlers(); } View.prototype.clearView = function () { _super.prototype.clearView.call(this); this._model.clearModel(); this.initializeAllStylesButton(); this.synchronizeNoResultsMessage(); }; View.prototype.toggleExpander = function (element) { _super.prototype.toggleExpander.call(this, element); var propertyName = element.parentElement.getAttribute("data-name"); var style = this._model.findStyleByName(propertyName); if (style) { style.updateChangeState(); this.updateStyleChangeBar(style); } }; View.prototype.registerClickHandler = function () { var _this = this; this.addHandler(this._listElement, "click", [Static.CSS_SOURCE_CHECKBOX, Static.CSS_FILE_LINK, Static.CSS_HEADER_CHECKBOX, Static.CSS_PROPERTY_VALUE], function (evt) { var e = evt.target; if (e.classList.contains(Static.CSS_SOURCE_CHECKBOX)) { _this.togglePropertyCheckBox(e); _this.select(e.parentElement); return false; } if (e.classList.contains(Static.CSS_FILE_LINK)) { _this.viewSource(e); return false; } if (e.classList.contains(Static.CSS_HEADER_CHECKBOX)) { _this.toggleHeaderCheckBox(e); _this.select(e.parentElement); return false; } if (e.classList.contains(Static.CSS_PROPERTY_VALUE)) { var sourceElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(e, Static.CSS_SOURCE); if (sourceElement) { _this.select(sourceElement); var property = _this.findClosestProperty(e); _this.editProperty(property); return true; } } return true; }); }; View.prototype.viewSource = function (e) { var property = this.findClosestProperty(e); if (property) { this.openTargetElementFileLink(property); } }; View.prototype.canViewSource = function (e) { var property = this.findClosestProperty(e); return !!property; }; View.prototype.editProperty = function (property) { if (property && !property.isDeleted) { if (property.isProperty) { this.prepareEditBox(property); } else { this.editSubproperty(property); } } }; View.prototype.registerKeydownHandler = function () { var _this = this; this.addHandler(this._listElement, "keydown", null, function (keyEvent) { if (_this._isInEditMode) { return true; } var e = (keyEvent.target); var noKeys = !keyEvent.ctrlKey && !keyEvent.shiftKey && !keyEvent.altKey; var ctrlKey = keyEvent.ctrlKey && !keyEvent.shiftKey && !keyEvent.altKey; if (keyEvent.key === Common.Keys.SPACEBAR && noKeys) { var headerSourceElement = Static.findHeaderOrSourceAncestor(e); if (headerSourceElement) { var checkBox = e.firstElementChild; if (Static.isHeader(headerSourceElement)) { _this.toggleHeaderCheckBox(checkBox); } else { _this.togglePropertyCheckBox(checkBox); } return false; } } if (keyEvent.key === Common.Keys.ENTER && noKeys) { var property = _this.findClosestProperty(e); _this.editProperty(property); return false; } if (keyEvent.key === Common.Keys.C && ctrlKey) { _this.copyObject(e); return false; } return true; }); }; View.prototype.prepareEditBox = function (property) { if (!this.enterEditValue(property)) { this.setCurrentSelection(property); } }; View.prototype.editSubproperty = function (subproperty) { var ourProperty = subproperty.container; for (var i = subproperty.rule.properties.length - 1; i >= 0; i--) { var otherProperty = subproperty.rule.properties[i]; if (otherProperty === ourProperty) { break; } if (otherProperty.name === subproperty.name) { this.prepareEditBox(otherProperty); return; } } this.editAddedLonghandPropertyFromShorthandSubproperty(subproperty); }; View.prototype.editAddedLonghandPropertyFromShorthandSubproperty = function (subproperty) { var _this = this; var propertyName = subproperty.name; var scrollContainer = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(this._listElement, Static.CSS_SCROLL_CONTAINER); var subpropertyElement = this.findElementForProperty(subproperty); var property = subproperty.rule.addProperty(); var completeAdd = function (completed) { var obj = _this._model.insertNewSource(property, subproperty); var newElement = _this.insertNewPropertyIntoView(subpropertyElement, obj); Common.ToolWindowHelpers.scrollIntoView(newElement, scrollContainer); _this.prepareEditBox(property); completed(property); }; return new Plugin.Promise(function (completed) { property.commitName(propertyName).then(function () { return completeAdd(completed); }); }); }; View.prototype.insertNewPropertyIntoView = function (insertBeforeElement, obj) { var newElement = this.instantiateTemplate("winningStylesPropertyTemplate", obj); insertBeforeElement.parentElement.insertBefore(newElement, insertBeforeElement); return newElement; }; View.prototype.instantiateTemplate = function (templateId, obj) { var template = new T.Template({ htmlElementSource: document, templateId: templateId }); var newElement = this.htmlElementSource.createElement("div"); newElement.innerHTML = template.createTemplateText(obj); return newElement.firstElementChild; }; View.prototype.setCurrentSelection = function (property) { var e = this.findElementForProperty(property); if (e) { this.setFocus(e); } }; View.prototype.findElementForProperty = function (property, className) { var selector = "." + Static.CSS_SOURCE + "[data-uid='" + property.uid + "']" + (className ? " ." + className : ""); var element = this._listElement.querySelector(selector); return element; }; View.prototype.enterEditValue = function (property) { var _this = this; var runEdit = function (func) { _this._isInEditMode = true; setTimeout(func, 0); }; runEdit(function () { return _this.editPropertyValue(property); }); return true; }; View.prototype.editPropertyValue = function (property) { var _this = this; var e = this.findElementForProperty(property, Static.CSS_PROPERTY_VALUE); if (!e) { return; } var sourceElement = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(e, Static.CSS_SOURCE); if (!sourceElement) { return; } this._domExplorer.traceWriter.raiseEvent(511 /* Dom_Intellisense_Start */); var cssAndHtmlMetadataSource = new F12.DomExplorer.CssAndHtmlMetadataSource(); var provider = new F12.DomExplorer.StylePropertyValueIntellisenseProvider(property.name, cssAndHtmlMetadataSource); provider.onShouldOpenOnTextChange = function (text) { return !text.match(/^-?\d/); }; var intellisenseContext = new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge(), new Common.Intellisense.IntellisenseMenu("intellisenseListBox", null, null, 500, true, provider), provider, this._bridge); this._domExplorer.traceWriter.raiseEvent(512 /* Dom_Intellisense_Stop */); var semicolonKey = new Dom.ValueEditorKey(";"); var valueEditor = new Dom.ValueEditor(document, this._domExplorer, this._bridge, window, Static.MAX_PROPERTY_VALUE_ROWS, intellisenseContext); valueEditor.addExitKeys(semicolonKey); valueEditor.enableCommitOnChange(); valueEditor.enableNumericChanges(); var isSingleEditStarted = false; var textareaBorderLeftWidth = 1; var textareaBorderRightWidth = 1; var sourceElementPaddingRight = 1; var width = sourceElement.offsetWidth + sourceElement.offsetLeft - e.offsetLeft - textareaBorderLeftWidth - textareaBorderRightWidth - sourceElementPaddingRight; var colorElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(sourceElement, Static.CSS_SOURCE_COLOR); if (colorElement) { var colorStyle = window.getComputedStyle(colorElement); if (colorStyle && colorStyle.display !== "none") { width += colorElement.offsetWidth; width += parseInt(colorStyle.marginLeft, 10) + parseInt(colorStyle.marginRight, 10); } } e.textContent = e.textContent.trim(); var timer = null; var newPropertyValue; valueEditor.show(e, width, function (newValue, oldValue) { return new Plugin.Promise(function (completed) { if (!isSingleEditStarted) { _this._model.startSingleEdit(); isSingleEditStarted = true; } if (timer !== null) { window.clearTimeout(timer); } newPropertyValue = newValue; timer = window.setTimeout(function () { property.commitValue(newPropertyValue); timer = null; }, 200); completed(true); }); }).done(function (completion) { if (timer !== null) { window.clearTimeout(timer); property.commitValue(newPropertyValue); } if (isSingleEditStarted) { _this._model.endSingleEdit(); } _this._isInEditMode = false; property.refreshValueDisplay(); _this.updateViewSetFocus(property); var sourceElement = _this.findElementForProperty(property); if (sourceElement) { _this.updateStatus(property, sourceElement); } if (_this._domExplorer.documentMode < 9) { var selected = HtmlTreeView.getSelected($m("#tree")); _this._domExplorer.refreshElementForLowDocModes(selected, false); } }); }; View.prototype.updateViewSetFocus = function (property) { if (!this._isInEditMode) { this._oneShotPropertyFocus = property; this.updateView(); } }; View.prototype.registerDOMAttrModifiedHandler = function () { var _this = this; this.addHandler(this._listElement, "DOMAttrModified", null, function (evt) { if (evt.attrName === "aria-checked") { var e = Static.findHeaderOrSourceAncestor(evt.target); if (e) { var newIsEnabled = evt.newValue === "true"; var checkBox = e.firstElementChild; if (Static.isHeader(e)) { _this.toggleHeaderCheckBox(checkBox, newIsEnabled); } else { _this.togglePropertyCheckBox(checkBox, newIsEnabled); } } } return true; }); }; View.prototype.postViewProcessing = function () { _super.prototype.postViewProcessing.call(this); this.synchronizeCheckBoxState(); if (this._oneShotPropertyFocus) { if (!Static.isCurrentFocusOnInput()) { var propertyElement = this.findElementForProperty(this._oneShotPropertyFocus); if (propertyElement) { this.select(propertyElement); } } this._oneShotPropertyFocus = null; } }; View.prototype.synchronizeCheckBoxState = function () { var _this = this; this._model.forEachStyle(function (style) { return _this.setCheckBoxState(style); }); }; View.prototype.openTargetElementFileLink = function (property) { var rule = property.rule; var url = rule.styleHref || rule.fileUrl; this._model.handleFileLinkClick(url, rule.fileLine, rule.fileColumn); }; View.prototype.findFocus = function () { return this._listElement.querySelector(":focus"); }; View.prototype.findClosestProperty = function (e) { if (!e) { return; } var propertyId = Static.getPropertyId(e); if (!propertyId) { return; } var property = this._model.getPropertyById(propertyId); return property; }; View.prototype.getMenuConfig = function () { return this; }; View.prototype.preViewProcessing = function () { _super.prototype.preViewProcessing.call(this); this.synchronizeViewAndModel(); }; View.prototype.synchronizeViewAndModel = function () { this._model.showAllStyles = this.getAllStylesButtonState(); this._model.nameFilter = this.htmlElementSource.getElementById(Static.FILTER_TEXT_BOX_ID).value; this.synchronizeNoResultsMessage(); }; View.prototype.synchronizeNoResultsMessage = function () { var noResultsMessageDiv = this.htmlElementSource.getElementById(Static.NO_RESULTS_MESSAGE_ID); if (this._model.length === 0) { noResultsMessageDiv.style.display = "block"; } else { noResultsMessageDiv.style.display = "none"; } }; View.prototype.copyObject = function (selectedElement) { var property = this.findClosestProperty(selectedElement); if (property) { clipboardData.setData("Text", property.formatForCopy); return; } var style = this._model.findStyleByName(selectedElement.getAttribute("data-name")); if (style) { clipboardData.setData("Text", style.propertyName + ": " + style.propertyValue + ";"); return; } clipboardData.clearData("Text"); }; View.prototype.initializeAllStylesButton = function () { var _this = this; this._allStylesButton = this.htmlElementSource.getElementById(Static.ALL_STYLES_BUTTON_ID); if (!this._allStylesButton) { return; } if (!this._allStylesButtonInitialized) { this._allStylesButton.classList.add(Static.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON); this._allStylesButton.setAttribute("aria-pressed", "true"); this._allStylesButtonInitialized = true; } this.addHandler(this._allStylesButton, "mouseover", null, function (mouseEvent) { Plugin.Tooltip.show({ content: _this.getAllStylesButtonToolTip() }); return true; }); this._allStylesButton.setAttribute("aria-label", this.getAllStylesButtonToolTip()); this.addHandler(this._allStylesButton, "click", null, function (mouseEvent) { _this.synchronizeAllStylesModelStateWithButtonState(); return false; }); this.addHandler(this._allStylesButton, "keydown", null, function (keyEvent) { if (_this._isInEditMode) { return true; } var noKeys = !keyEvent.ctrlKey && !keyEvent.shiftKey && !keyEvent.altKey; if ((keyEvent.key === Common.Keys.SPACEBAR || keyEvent.key === Common.Keys.ENTER) && noKeys) { _this.synchronizeAllStylesModelStateWithButtonState(); return false; } return true; }); this.addHandler(this._allStylesButton, "DOMAttrModified", null, function (mutationEvent) { if (mutationEvent.attrName === "aria-pressed") { if (mutationEvent.target === _this._allStylesButton) { var pressed = mutationEvent.newValue === "true"; if (pressed === _this._model.showAllStyles) { _this._model.showAllStyles = !_this._model.showAllStyles; } } } return true; }); }; View.prototype.synchronizeAllStylesModelStateWithButtonState = function () { this._model.showAllStyles = this.getAllStylesButtonState(); }; View.prototype.getAllStylesButtonState = function () { if (!this._allStylesButton) { this._allStylesButton = this.htmlElementSource.getElementById(Static.ALL_STYLES_BUTTON_ID); } return !this._allStylesButton.classList.contains(Static.CSS_BPT_TOOLBAR_TOGGLE_BUTTON_STATE_ON); }; View.prototype.getAllStylesButtonToolTip = function () { if (this.getAllStylesButtonState()) { return Plugin.Resources.getString("UserStylesDomExplorerButtonTooltipOff"); } else { return Plugin.Resources.getString("UserStylesDomExplorerButtonTooltipOn"); } }; View.prototype.addNameFilterHandlers = function () { var _this = this; var filterTextBox = this.htmlElementSource.getElementById(Static.FILTER_TEXT_BOX_ID); if (filterTextBox) { this.addHandler(filterTextBox, "input", null, function (evt) { var e = evt.target; if (_this._model.nameFilter !== e.value) { _this._model.nameFilter = e.value; _this.renderView(); } return true; }); this._filterTextBoxContextMenu = new Dom.TextControlMenuController(filterTextBox); } }; View.prototype.select = function (e) { if (e) { this.setFocus(e); return true; } return false; }; View.prototype.togglePropertyCheckBox = function (e, isEnabled) { this._model.toggleEnabled(Static.getPropertyId(e), isEnabled); }; View.prototype.toggleHeaderCheckBox = function (e, isEnabled) { var headerElement = e.parentElement; var propertyName = headerElement.getAttribute("data-name"); var style = this._model.findStyleByName(propertyName); if (style) { this._model.toggleEnableForStyle(style, isEnabled); } }; View.prototype.onRuleChange = function (evt, rule, args) { if (evt === 2 /* AddProperty */) { this.updateViewSetFocus(this.findClosestProperty(this.findFocus())); } }; View.prototype.onPropertyChange = function (evt, property, args) { if (evt === 3 /* IsWinning */) { this.onPropertyWinningRuleChange(property, args); } else if (evt === 4 /* IsEnabled */) { this.onPropertyEnableChange(property, args); } else if (evt === 2 /* Value */) { this.onPropertyValueChange(property, args); } else if (evt === 6 /* Status */) { this.onPropertyStatusChange(property, args); } else if (evt === 11 /* Change */) { this.onPropertyChangeStatusChange(property); } this.synchronizeStyle(property); var style = this._model.findStyleByName(property.name); if (style) { this.setCheckBoxState(style); } }; View.prototype.synchronizeStyle = function (property) { var name = property.name; var selector = "." + Static.CSS_HEADER + "[data-name='" + name + "']"; var headerElement = this._listElement.querySelector(selector); if (!headerElement) { return; } var dom = F12.DomExplorer.DomExplorerWindow; var style = this._model.findStyleByName(name); if (!style) { return; } if (property.isWinning) { headerElement.setAttribute("data-uid", property.uid); } else if (headerElement.getAttribute("data-uid") === property.uid) { headerElement.setAttribute("data-uid", ""); } this.updateViewSetFocus(this.findClosestProperty(this.findFocus())); }; View.prototype.onPropertyStatusChange = function (property, status) { var sourceElement = this.findElementForProperty(property); if (!sourceElement) { return; } this.updateStatus(property, sourceElement); this.updateColorDisplay(property, sourceElement); }; View.prototype.onPropertyChangeStatusChange = function (property) { var sourceElement = this.findElementForProperty(property); if (!sourceElement) { return; } this.updateSourceChangeBar(property, sourceElement, property.changeState); }; View.prototype.onPropertyWinningRuleChange = function (property, isWinning) { var uid = property.uid; var selector = "." + Static.CSS_SOURCE + "[data-uid='" + uid + "']"; var sourceElement = this._listElement.querySelector(selector); if (!sourceElement) { return; } if (isWinning) { sourceElement.classList.remove(Static.CSS_NOT_WINNING); } else { sourceElement.classList.add(Static.CSS_NOT_WINNING); } var propertyOverriddenElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(sourceElement, Static.CSS_ARIA_OVERRIDDEN); if (propertyOverriddenElement) { propertyOverriddenElement.innerText = property.ariaOverriddenString; } }; View.prototype.onPropertyEnableChange = function (property, isEnabled) { var selector = "." + Static.CSS_SOURCE + "[data-uid='" + property.uid + "'] ." + Static.CSS_SOURCE_CHECKBOX; var checkBoxElement = this._listElement.querySelector(selector); if (checkBoxElement) { checkBoxElement.checked = isEnabled; var style = this._model.findStyleByName(property.name); style.enabledCount += isEnabled ? 1 : -1; checkBoxElement.parentElement.setAttribute("aria-checked", isEnabled); } if (this._tcPropertyEnableCallback) { this._tcPropertyEnableCallback(isEnabled); this._tcPropertyEnableCallback = null; } }; View.prototype.onPropertyValueChange = function (property, newValueForDisplay) { var selector = "." + Static.CSS_SOURCE + "[data-uid='" + property.uid + "']"; var sourceElement = this._listElement.querySelector(selector); if (!sourceElement) { return; } var valueElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(sourceElement, Static.CSS_PROPERTY_VALUE); if (valueElement) { valueElement.textContent = property.valueForDisplay; } this.updateColorDisplay(property, sourceElement); }; View.prototype.updateStatus = function (property, sourceElement) { var valid = property.status === 1 /* Valid */; sourceElement.setAttribute("aria-invalid", "" + (!valid)); var valueElement = this.findElementForProperty(property, Static.CSS_PROPERTY_VALUE); if (valueElement) { if (valid) { valueElement.classList.remove(Static.CSS_INVALID_PROPERTY); } else { valueElement.classList.add(Static.CSS_INVALID_PROPERTY); } } var ariaInvalidElement = this.findElementForProperty(property, Static.CSS_ARIA_INVALID); if (ariaInvalidElement) { ariaInvalidElement.innerText = valid ? "" : Dom.StyleProperty.AriaInvalidString; } }; View.prototype.updateSourceChangeBar = function (property, sourceElement, changeState) { var changeBarElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(sourceElement, Static.CSS_CHANGE_BAR); changeBarElement.setAttribute("data-change", changeState); var ariaChangeStateElement = this.findElementForProperty(property, Static.CSS_ARIA_CHANGE_STATE); if (ariaChangeStateElement) { ariaChangeStateElement.innerText = property.ariaChangeStateString; } var removed = changeState === Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE; changeBarElement.parentElement.setAttribute("data-removed", removed); this.updateStyleChangeBar(this._model.findStyleByName(property.name)); }; View.prototype.updateStyleChangeBar = function (style) { var selector = "." + Static.CSS_HEADER + "[data-name='" + style.propertyName + "'] > ." + Static.CSS_CHANGE_BAR; var changeBarElement = this._listElement.querySelector(selector); if (changeBarElement) { var changeState = style.expanded ? Dom.StyleChangeNotifier.CHANGE_BAR_NONE : style.changeState; changeBarElement.setAttribute("data-change", changeState); var ariaChangeStateElement = changeBarElement.nextElementSibling; if (ariaChangeStateElement && ariaChangeStateElement.classList.contains(Static.CSS_ARIA_CHANGE_STATE)) { ariaChangeStateElement.innerText = style.expanded ? "" : Dom.StyleRule.AriaChangeStateUpdateString; } } }; View.prototype.updateColorDisplay = function (property, sourceElement) { var colorElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(sourceElement, Static.CSS_SOURCE_COLOR); if (colorElement) { if (property.isDisplayableColor) { colorElement.style.backgroundColor = property.value; colorElement.classList.remove(Static.CSS_HEADER_COLOR_HIDDEN); } else { colorElement.classList.add(Static.CSS_HEADER_COLOR_HIDDEN); } } }; View.prototype.setCheckBoxState = function (style) { var selector = "." + Static.CSS_HEADER + "[data-name='" + style.propertyName + "'] > ." + Static.CSS_HEADER_CHECKBOX; var checkBoxElement = this._listElement.querySelector(selector); if (checkBoxElement) { checkBoxElement.checked = style.isEnabled; checkBoxElement.indeterminate = style.isEnabledIndeterminate; checkBoxElement.parentElement.setAttribute("aria-checked", style.isEnabled); } }; Object.defineProperty(View.prototype, "tcPropertyEnableCallback", { get: function () { return this._tcPropertyEnableCallback; }, set: function (value) { this._tcPropertyEnableCallback = value; }, enumerable: true, configurable: true }); View.prototype.tcQuery = function (selector) { return this._listElement.querySelector(selector); }; return View; })(Dom.ExpandingListView); Wsp.View = View; })(Dom.Wsp || (Dom.Wsp = {})); var Wsp = Dom.Wsp; })(Dom || (Dom = {})); // changesView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var ChangesView = (function (_super) { __extends(ChangesView, _super); function ChangesView(domExplorer, bridge, htmlElementSource, changesViewDivId, defaultItemTemplateId, model, styleCache, localizer, alternateTemplates) { var _this = this; _super.call(this, htmlElementSource, changesViewDivId, defaultItemTemplateId, model, function (uniqueId, expanded) { model.setCollapsedState(uniqueId, !expanded); }, alternateTemplates, localizer, "uniqueId", "source"); this._domExplorer = domExplorer; this._bridge = bridge; this._changesListElement = this.htmlElementSource.getElementById(this.listViewDivId); this._emptyMessageElement = this.htmlElementSource.getElementById("changesEmptyMessage"); this._emptyMessageElement.textContent = Common.ToolWindowHelpers.loadString("ChangesViewEmptyMessage"); this._model = model; this._styleCache = styleCache; this.setupEventHandlers(); this.menuItems = [ { name: "copy", textIdentifier: "CopyMenuText", execute: function (selectedElement) { return _this.copyObject(selectedElement); }, isDisabled: function (selectedElement) { return _this.isCopyDisabled(selectedElement); } }, { name: "copyAll", textIdentifier: "CopyAllMenuText", execute: function (selectedElement) { return _this.copyAll(); } }, { name: "revert", textIdentifier: "RevertStyleMenuText", execute: function (selectedElement) { return _this.revert(selectedElement); }, isDisabled: function (selectedElement) { return _this.isRevertDisabled(selectedElement); } }, { name: "viewSource", textIdentifier: "ViewSourceMenuText", execute: function (selectedElement) { window.setTimeout(function () { if (_this.canViewSource(selectedElement)) { _this.viewSource(selectedElement); } }, 0); }, isDisabled: function (selectedElement) { return !_this.canViewSource(selectedElement); } } ]; } ChangesView.prototype.postViewProcessing = function () { this._model.addUpdateListener(this); _super.prototype.postViewProcessing.call(this); this._emptyMessageElement.style.display = this._model.changes.length ? "none" : "block"; }; ChangesView.prototype.navigateLink = function (rule) { if (rule.isInline) { this._model.selectElement(rule.uid); } else { this._model.navigateFileLink(rule.url, rule.line, rule.column); } }; ChangesView.prototype.getMenuConfig = function () { return this; }; ChangesView.prototype.isCopyDisabled = function (selectedElement) { var isSource = selectedElement.classList.contains(Dom.ExpandingListView.HEADER_CLASS); if (isSource) { return false; } var ruleElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(selectedElement, ChangesView.RULE_CLASS); var rule = this.getRuleForElement(ruleElement); return rule.isDeleted; }; ChangesView.prototype.copyObject = function (selectedElement) { var isSource = selectedElement.classList.contains(Dom.ExpandingListView.HEADER_CLASS); var copier; if (isSource) { var uniqueId = selectedElement.parentElement.getAttribute("data-listid"); copier = this._model.lookupSource(uniqueId); } else { var ruleElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(selectedElement, ChangesView.RULE_CLASS); copier = this.getRuleForElement(ruleElement); } this.setClipboard(copier); }; ChangesView.prototype.copyAll = function () { this.setClipboard(this._model); }; ChangesView.prototype.isRevertDisabled = function (selectedElement) { var ruleElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(selectedElement, ChangesView.RULE_CLASS); return !ruleElement; }; ChangesView.prototype.revert = function (selectedElement) { var _this = this; var ruleElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(selectedElement, ChangesView.RULE_CLASS); var rule = this.getRuleForElement(ruleElement); var uid = rule.uid; rule.revert().done(function (result) { _this._styleCache.applyChanges([{ event: "revertRule", uid: uid, obj: result }]); _this.updateView(); }); }; ChangesView.prototype.viewQuery = function (source, rule, className) { var query = "." + Dom.ExpandingListView.LIST_ITEM_CLASS + "[data-listid='" + source.uniqueId + "']"; if (rule) { query += " [data-listsubid='" + rule.uid + "']"; } if (className) { query += " ." + className; } return this.listRoot.querySelector(query); }; ChangesView.prototype.onRuleChange = function (event, modelRule, args) { if (event === 7 /* FileLinkTooltip */) { var rule = this._model.lookupRule(modelRule.uid); if (rule) { var element = this.viewQuery(rule.source, rule, ChangesView.LINK_CLASS); if (element) { element.setAttribute("data-tooltip", args); element = this.viewQuery(rule.source, null, ChangesView.SOURCE_CLASS); if (element) { element.setAttribute("data-tooltip", args); } } } } }; ChangesView.prototype.onPropertyChange = function (event, property, arg) { }; ChangesView.prototype.getRuleForElement = function (element) { if (element && element.classList.contains(ChangesView.RULE_CLASS)) { var uid = element.getAttribute("data-uid"); return this._model.lookupRule(uid); } }; ChangesView.prototype.setClipboard = function (copier) { var text = copier ? copier.textForCopy : null; if (text) { clipboardData.setData("Text", text); } else { clipboardData.clearData("Text"); } }; ChangesView.prototype.viewSource = function (element) { var ruleElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element, ChangesView.RULE_CLASS); if (!ruleElement) { return; } var rule = this.getRuleForElement(ruleElement); if (rule && rule.hasFileLink) { this.navigateLink(rule); } }; ChangesView.prototype.canViewSource = function (element) { var ruleElement = F12.DomExplorer.DomExplorerWindow.findDescendentByClass(element, ChangesView.RULE_CLASS); if (!ruleElement) { return false; } var rule = this.getRuleForElement(ruleElement); return rule ? rule.hasFileLink : false; }; ChangesView.prototype.setupEventHandlers = function () { var _this = this; this.addHandler(this.listRoot, "click", [ChangesView.LINK_CLASS], function (e) { var ruleElement = e.target.nextElementSibling; _this.navigateLink(_this.getRuleForElement(ruleElement)); return false; }); this.addHandler(this.listRoot, "keydown", [Dom.ExpandingListView.HEADER_CLASS, Dom.ExpandingListView.CHILD_VALUE_CONTAINER_CLASS], function (e) { var element = e.target; var ctrlKey = e.ctrlKey && !e.shiftKey && !e.altKey; if (event.keyCode === 67 /* C */ && ctrlKey) { _this.copyObject(element); return false; } var noKeys = !e.ctrlKey && !e.shiftKey && !e.altKey; if (_this.canViewSource(element) && (event.keyCode === 32 /* Space */ || event.keyCode === 13 /* Enter */) && noKeys) { _this.viewSource(element); return false; } return true; }); }; ChangesView.SOURCE_CLASS = "BPT-Changes-Source"; ChangesView.RULE_CLASS = "BPT-Changes-Rule"; ChangesView.LINK_CLASS = "BPT-Changes-Link"; return ChangesView; })(Dom.ExpandingListView); Dom.ChangesView = ChangesView; })(Dom || (Dom = {})); // eventsView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var EventsView = (function (_super) { __extends(EventsView, _super); function EventsView(htmlElementSource, eventsViewDivId, defaultItemTemplateId, model, _documentOpener, alternateTemplates) { _super.call(this, htmlElementSource, eventsViewDivId, defaultItemTemplateId, model, function (uniqueId, expanded) { model.setCollapsedState(uniqueId, !expanded); }, alternateTemplates, null, "uniqueId", "eventName", function (newThing, oldThing) { return newThing.isDirty; }, function (newThing) { newThing.isDirty = false; }); this._documentOpener = _documentOpener; this._focusSettingDivClickHandlerApplied = false; this._addKeyboardNavigationHandlersApplied = false; this.addEventHandlers(); } EventsView.prototype.collapseChange = function (uniqueId, expanded) { this.model.setCollapsedState(uniqueId, expanded); }; EventsView.prototype.addEventHandlers = function () { var _this = this; this.addHandler(this.listRoot, "click", ["BPT-Events-Handler-Link"], function (e) { _this._documentOpener.openDocumentLinkFromEvent(e); return false; }); this.addHandler(this.listRoot, "keydown", null, function (keyDownEvent) { var element = keyDownEvent.target; if ((keyDownEvent.key === "Enter" || keyDownEvent.key === "Spacebar") && !keyDownEvent.ctrlKey && !keyDownEvent.shiftKey && !keyDownEvent.altKey) { _this.openDocument(keyDownEvent); return false; } return true; }); }; EventsView.prototype.openDocument = function (keyDownEvent) { if (keyDownEvent.target) { var linkElement = $m(keyDownEvent.target).children(".BPT-FileLink").get(0); this._documentOpener.openDocumentLinkFromElement(linkElement); } }; return EventsView; })(Dom.ExpandingListView); Dom.EventsView = EventsView; })(Dom || (Dom = {})); // tabItem.ts var Dom; (function (Dom) { "use strict"; var TabItem = (function () { function TabItem() { } TabItem.init = function (item, selectedCallback) { item.addClass("BPT-Tab-Item"); F12.Tools.Utility.Assert.areEqual(item.attr("role"), "tab", "Missing tab role"); F12.Tools.Utility.Assert.areEqual(item.parent().attr("role"), "tablist", "Missing tablist role"); item.bind("click focus", function () { var currentElement = item.parent().find(".BPT-Tab-Item[aria-selected='true']"); if (currentElement.length > 0 && currentElement.get(0) !== item.get(0)) { currentElement.attr("aria-selected", "false"); } if (item.attr("aria-selected") !== "true") { item.attr("aria-selected", "true"); } }); item.get(0).addEventListener("DOMAttrModified", function (evt) { if (evt.attrName === "aria-selected") { var isSelected = evt.newValue === "true"; if (isSelected) { item.attr("tabindex", "1"); selectedCallback(); } else { item.removeAttr("tabindex"); } } }); }; TabItem.isActive = function (query) { return query.attr("aria-selected") === "true"; }; return TabItem; })(); Dom.TabItem = TabItem; })(Dom || (Dom = {})); // horizontalPane.ts var Dom; (function (Dom) { "use strict"; var HorizontalPane = (function () { function HorizontalPane(container) { var _this = this; this._listeners = []; this._minPaneSize = 240; this._container = container; this._leftPane = this._container.children(".BPT-HorizontalPane-Left"); this._rightPane = this._container.children(".BPT-HorizontalPane-Right"); this._leftPane.addClass("BPT-Pane"); this._rightPane.addClass("BPT-Pane"); var windowWidth = window.outerWidth; this._curWidth = (windowWidth > 0 ? Math.max(300, (windowWidth / 100) * 30) : 300); this._divider = $m("
      "); this._divider.addClass("BPT-Pane-Divider"); this._rightPane.parent().get(0).insertBefore(this._divider.get(0), this._rightPane.get(0)); window.onresize = function () { _this.refreshPaneWidth(); }; this.refreshPaneWidth(); this._divider.bind("mousedown", function (evt) { var prevCursor = document.body.style.cursor; document.body.style.cursor = "w-resize"; var mouseMoveHandler, mouseUpHandler; mouseMoveHandler = function (evt) { var dividerLoc = _this._divider.get(0).getBoundingClientRect().left; _this.setPaneWidth(_this._rightPane.width() - evt.pageX + dividerLoc); }; mouseUpHandler = function () { $m(document).unbind("mousemove", mouseMoveHandler); $m(document).unbind("mouseup", mouseUpHandler); document.body.style.cursor = prevCursor; }; $m(document).bind("mousemove", mouseMoveHandler); $m(document).bind("mouseup", mouseUpHandler); evt.stopImmediatePropagation(); evt.preventDefault(); }); } Object.defineProperty(HorizontalPane.prototype, "leftWidth", { get: function () { return this._leftWidth; }, enumerable: true, configurable: true }); Object.defineProperty(HorizontalPane.prototype, "rightWidth", { get: function () { return this._rightWidth; }, enumerable: true, configurable: true }); HorizontalPane.prototype.addResizeListener = function (listener) { if (this._listeners.indexOf(listener) < 0) { this._listeners.push(listener); } }; HorizontalPane.prototype.refreshPaneWidth = function () { this.setPaneWidth(this._curWidth); }; HorizontalPane.prototype.removeResizeListener = function (listener) { var index = this._listeners.indexOf(listener); if (index >= 0) { this._listeners.splice(index, 1); } }; HorizontalPane.prototype.setPaneWidth = function (newWidth) { var _this = this; if (newWidth <= 0) { return; } this._curWidth = newWidth = Math.max(this._minPaneSize, newWidth); this._curWidth = newWidth = Math.round(this._curWidth); var paneSize = this._container.outerWidth(true); if (paneSize < this._minPaneSize * 2) { newWidth = paneSize >> 1; } else if (paneSize - newWidth < this._minPaneSize) { newWidth = paneSize - this._minPaneSize; } this._leftPane.css("width", "calc(100% - " + (newWidth + this._divider.width()) + "px)"); this._rightPane.css("width", newWidth + "px"); this._leftWidth = this._leftPane.outerWidth(false); this._rightWidth = this._rightPane.outerWidth(false); this._listeners.forEach(function (listener) { listener.onPaneResize(_this._leftWidth, _this._rightWidth); }); }; return HorizontalPane; })(); Dom.HorizontalPane = HorizontalPane; })(Dom || (Dom = {})); // valueEditor.ts var Dom; (function (Dom) { "use strict"; var ValueEditorKey = (function () { function ValueEditorKey(key, shiftKey, ctrlKey, altKey, metaKey) { if (typeof shiftKey === "undefined") { shiftKey = false; } if (typeof ctrlKey === "undefined") { ctrlKey = false; } if (typeof altKey === "undefined") { altKey = false; } if (typeof metaKey === "undefined") { metaKey = false; } this.key = key; this.shiftKey = shiftKey; this.ctrlKey = ctrlKey; this.altKey = altKey; this.metaKey = metaKey; } ValueEditorKey.prototype.equalTo = function (other) { return this.key === other.key && this.shiftKey === other.shiftKey && this.ctrlKey === other.ctrlKey && this.altKey === other.altKey && this.metaKey === other.metaKey; }; ValueEditorKey.EnterKey = new ValueEditorKey("Enter"); ValueEditorKey.CtrlEnterKey = new ValueEditorKey("Enter", false, true); ValueEditorKey.TabKey = new ValueEditorKey("Tab"); ValueEditorKey.ShiftTabKey = new ValueEditorKey("Tab", true); ValueEditorKey.EscapeKey = new ValueEditorKey("Esc"); ValueEditorKey.UpKey = new ValueEditorKey("Up"); ValueEditorKey.DownKey = new ValueEditorKey("Down"); ValueEditorKey.ShiftUpKey = new ValueEditorKey("Up", true); ValueEditorKey.ShiftDownKey = new ValueEditorKey("Down", true); ValueEditorKey.ShiftF10Key = new ValueEditorKey("F10", true); return ValueEditorKey; })(); Dom.ValueEditorKey = ValueEditorKey; var ValueEditorExitMode; (function (ValueEditorExitMode) { ValueEditorExitMode[ValueEditorExitMode["Cancelled"] = 0] = "Cancelled"; ValueEditorExitMode[ValueEditorExitMode["Dismissed"] = 1] = "Dismissed"; ValueEditorExitMode[ValueEditorExitMode["Committed"] = 2] = "Committed"; })(ValueEditorExitMode || (ValueEditorExitMode = {})); var ValueEditor = (function () { function ValueEditor(_htmlElementSource, _domExplorer, _bridge, _view, _maxRows, _intellisenseContext, _oldValue) { if (typeof _maxRows === "undefined") { _maxRows = 1; } this._htmlElementSource = _htmlElementSource; this._domExplorer = _domExplorer; this._bridge = _bridge; this._view = _view; this._maxRows = _maxRows; this._intellisenseContext = _intellisenseContext; this._oldValue = _oldValue; this._exitKeys = [ValueEditorKey.EnterKey, ValueEditorKey.TabKey, ValueEditorKey.ShiftTabKey]; this._cancelKey = ValueEditorKey.EscapeKey; this._arrowKeys = [ValueEditorKey.UpKey, ValueEditorKey.DownKey, ValueEditorKey.ShiftUpKey, ValueEditorKey.ShiftDownKey]; this.doTrim = true; this._maxRows = Math.min(this._maxRows, 1000); } ValueEditor.prototype.addExitKeys = function () { var exitKeys = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { exitKeys[_i] = arguments[_i + 0]; } this._exitKeys = this._exitKeys.concat(exitKeys); }; ValueEditor.prototype.removeExitKeys = function () { var _this = this; var exitKeys = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { exitKeys[_i] = arguments[_i + 0]; } exitKeys.forEach(function (key, index, exitKeys) { for (var i = 0; i < _this._exitKeys.length; i++) { if (_this._exitKeys[i] === key) { _this._exitKeys.splice(i, 1); break; } } }); }; ValueEditor.prototype.enableNumericChanges = function () { this._isNumericArrowsEnabled = true; }; ValueEditor.prototype.enableStripDelimiter = function (stripDelimiter) { this._stripDelimiter = stripDelimiter; }; ValueEditor.prototype.enableTabsInData = function () { this.removeExitKeys(Dom.ValueEditorKey.TabKey, Dom.ValueEditorKey.ShiftTabKey); this._allowTabs = true; }; ValueEditor.prototype.enableCommitOnChange = function () { this._isCommitOnChangeEnabled = true; }; ValueEditor.prototype.show = function (element, width, onCommit) { var _this = this; this._element = element; this._onCommit = onCommit; this._dragElements = []; this._textBox = this._htmlElementSource.createElement("textarea"); this._textBox.classList.add("BPT-EditBox"); this._textBox.setAttribute("role", "textbox"); this._textBox.setAttribute("spellcheck", "false"); this._textBox.setAttribute("aria-label", element.getAttribute("aria-label")); if (this._maxRows === 1) { this._textBox.rows = 1; this._textBox.removeAttribute("aria-multiline"); } else { this._textBox.setAttribute("aria-multiline", "true"); } var parent = element.parentNode; while (parent) { if (parent.draggable) { this._dragElements.push(parent); parent.draggable = false; } parent = parent.parentNode; } var style = this._view.getComputedStyle(element); this._textBox.style.fontFamily = style.fontFamily; this._textBox.style.fontSize = style.fontSize; this._textBox.style.fontWeight = style.fontWeight; this._textBox.style.fontStyle = style.fontStyle; this._textBox.style.lineHeight = style.lineHeight; this._textBox.style.width = (width || element.offsetWidth + 10) + "px"; this._textBox.style.overflowX = "hidden"; this._markActiveElements = F12.DomExplorer.DomExplorerWindow.findAllAncestorsByClass(element, "BPT-EditBox-MarkActive"); this._markActiveElements.forEach(function (element) { element.classList.add("BPT-EditBox-Active"); }); var parent = this._element.parentElement; this._originalOverflow = parent.style.overflow; parent.style.overflow = "visible"; this._originalMaxHeight = parent.style.maxHeight; this._textBox.rows = 1; ValueEditor.replace(this._element, this._textBox); var range = this._textBox.createTextRange(); var lineHeight = range.boundingHeight; this.setInitialValue(this._lastCommitValue = this._originalValue = this._oldValue || this._element.textContent); this._updateHandler = function (evt) { if (_this._maxRows > 1) { _this._textBox.rows = Math.max(Math.min(Math.ceil(_this._textBox.scrollHeight / lineHeight), _this._maxRows), 1); } _this._textBox.style.height = _this._textBox.rows * lineHeight + "px"; if (_this._isCommitOnChangeEnabled) { _this.checkForValueCommit(false); } else { _this._textBox.classList.remove(ValueEditor.InvalidValueClass); } }; this._updateHandler(); if (parent.classList.contains("BPT-EditBox-MaxHeightOverride")) { parent.style.maxHeight = this._maxRows * lineHeight + "px"; } this._textBox.addEventListener("input", this._updateHandler); if (this._intellisenseContext) { this._intellisenseContext.initialize(this._textBox); } this._keyDownHandler = function (evt) { if (!_this.onKeyPress(evt)) { evt.preventDefault(); evt.stopPropagation(); } }; this._textBox.addEventListener("keydown", this._keyDownHandler); this._textBox.addEventListener("mousedown", this.stopPropagationHandler); this._textBox.addEventListener("mouseup", this.stopPropagationHandler); this._textBox.addEventListener("click", this.stopPropagationHandler); this._textBox.addEventListener("dblclick", this.stopPropagationHandler); this._bridge.addEventListener("deactivated", (this._deactivatedHandler = this.deactivated.bind(this))); if (Plugin.F12) { Plugin.F12.addEventListener("navigatesubframes", (this._navigateFramesHandler = this.navigateFrames.bind(this))); Common.NavigationUtilities.disableNavigation(); } this._textBoxContextMenu = new Dom.TextControlMenuController(this._textBox); this._mouseWheelHandler = function (evt) { if (_this._isNumericArrowsEnabled) { var changeAmount = Math.floor(evt.wheelDelta / 120); if (evt.shiftKey) { changeAmount *= 10; } _this.numericValueChange(changeAmount); evt.preventDefault(); evt.stopPropagation(); } }; this._textBox.addEventListener("mousewheel", this._mouseWheelHandler); if (this._intellisenseContext) { var intellisenseMenu = this._intellisenseContext.intellisenseMenu; if (this._isCommitOnChangeEnabled) { var onSelectionChanged = intellisenseMenu.onSelectionChanged; intellisenseMenu.onSelectionChanged = function (value) { if (onSelectionChanged) { onSelectionChanged(value); } _this.checkForValueCommit(false, value.text); }; var onClosing = intellisenseMenu.onClosing; intellisenseMenu.onClosing = function () { if (onClosing) { onClosing(); } _this.checkForValueCommit(false); }; } var onChoiceCommitted = intellisenseMenu.onChoiceCommitted; intellisenseMenu.onChoiceCommitted = function (value, commitSource) { if (onChoiceCommitted) { onChoiceCommitted(value, commitSource); } _this.checkForValueCommit(false, value.text); _this.completeEdit(2 /* Committed */, commitSource === 0 /* Tab */ ? ValueEditorKey.TabKey : ValueEditorKey.EnterKey); }; } this._dismissCheck = function (evt) { if (_this._isDismissed) { return; } var target = evt.target; if (target === _this._textBox) { return; } if (Common.ToolWindowHelpers.isContextMenuUp()) { return; } var htmlElementTargetParent = target.parentElement; if (target.className === "intellisenseListBox" || (htmlElementTargetParent && htmlElementTargetParent.className === "intellisenseListBox")) { return; } if (_this.shouldContinueEdit && _this.shouldContinueEdit(target)) { return; } if (target.nodeName === "HTML") { return; } _this._isDismissed = true; _this.completeEdit(1 /* Dismissed */); }; this._htmlElementSource.addEventListener("mousedown", this._dismissCheck); this._htmlElementSource.addEventListener("mouseup", this._dismissCheck, true); this._htmlElementSource.addEventListener("click", this._dismissCheck, true); this._htmlElementSource.addEventListener("dblclick", this._dismissCheck, true); this._textBox.select(); this._textBox.focus(); this._promiseExec = new EditorShowPromiseExecutive(); return new Plugin.Promise(this._promiseExec.init.bind(this._promiseExec)); }; ValueEditor.replace = function (element, replaceWith) { var parent = element.parentElement; if (parent) { var nextSibling = element.nextSibling; parent.removeChild(element); if (nextSibling) { parent.insertBefore(replaceWith, nextSibling); } else { parent.appendChild(replaceWith); } } }; ValueEditor.prototype.stopPropagationHandler = function (evt) { evt.stopPropagation(); Plugin.ContextMenu.dismissAll(); }; ValueEditor.prototype.setInitialValue = function (text) { this._textBox.value = text; var range = this._textBox.createTextRange(); var useUndo = range.queryCommandSupported("ms-clearUndoStack"); if (useUndo) { range.execCommand("ms-clearUndoStack"); } }; ValueEditor.prototype.setValue = function (text, start, end) { var range = this._textBox.createTextRange(); var useUndo = range.queryCommandSupported("ms-beginUndoUnit"); if (useUndo) { range.execCommand("ms-beginUndoUnit"); } range.moveStart("character", start); range.moveEnd("character", end - this._textBox.value.length); range.text = text; if (useUndo) { range.execCommand("ms-endUndoUnit"); } }; ValueEditor.prototype.checkForValueCommit = function (isCancel, newValue) { var _this = this; return new Plugin.Promise(function (completed) { if (newValue === undefined) { newValue = isCancel ? _this._originalValue : _this._textBox.value; if (_this.doTrim) { newValue = newValue.trim(); } } if (_this._lastCommitValue !== newValue) { if (_this._onCommit) { _this._onCommit(newValue, _this._originalValue).done(function (isSuccess) { if (isSuccess) { _this._lastCommitValue = newValue; _this._textBox.classList.remove(ValueEditor.InvalidValueClass); } else { _this._textBox.classList.add(ValueEditor.InvalidValueClass); } completed(isSuccess); }); } else { _this._lastCommitValue = newValue; completed(true); } } else { completed(true); } }); }; ValueEditor.prototype.deactivated = function () { this.completeEdit(0 /* Cancelled */); }; ValueEditor.prototype.navigateFrames = function () { this.completeEdit(0 /* Cancelled */); }; ValueEditor.prototype.completeEdit = function (exitMode, exitKey) { var _this = this; if (!this._promiseExec.isCompleted) { if (this._stripDelimiter) { var s = this._textBox.value; if (s.length >= 2) { var first = s[0]; var last = s[s.length - 1]; if (first === last && this._stripDelimiter.indexOf(first) !== -1) { this._textBox.value = s.substr(1, s.length - 2); } } } this.checkForValueCommit(exitMode === 0 /* Cancelled */).done(function (isValidated) { if (_this._element && (isValidated || exitMode === 1 /* Dismissed */)) { if (isValidated && !_this._oldValue) { _this._element.textContent = _this._textBox.value; } if (_this._intellisenseContext) { _this._intellisenseContext.uninitialize(); } var parent = _this._textBox.parentElement; if (parent && parent.style) { parent.style.overflow = _this._originalOverflow; if (parent.classList.contains("BPT-EditBox-MaxHeightOverride")) { parent.style.maxHeight = _this._originalMaxHeight; } } ValueEditor.replace(_this._textBox, _this._element); _this._element = null; _this._markActiveElements.forEach(function (element) { element.classList.remove("BPT-EditBox-Active"); }); _this._textBox.removeEventListener("keydown", _this._keyDownHandler); _this._textBox.removeEventListener("input", _this._updateHandler); _this._textBox.removeEventListener("mousedown", _this.stopPropagationHandler); _this._textBox.removeEventListener("mouseup", _this.stopPropagationHandler); _this._textBox.removeEventListener("click", _this.stopPropagationHandler); _this._textBox.removeEventListener("dblclick", _this.stopPropagationHandler); _this._textBox.removeEventListener("mousewheel", _this._mouseWheelHandler); _this._htmlElementSource.removeEventListener("mousedown", _this._dismissCheck); _this._htmlElementSource.removeEventListener("mouseup", _this._dismissCheck, true); _this._htmlElementSource.removeEventListener("click", _this._dismissCheck, true); _this._htmlElementSource.removeEventListener("dblclick", _this._dismissCheck, true); _this._bridge.removeEventListener("deactivated", _this._deactivatedHandler); if (Plugin.F12) { Plugin.F12.removeEventListener("navigatesubframes", _this._navigateFramesHandler); Common.NavigationUtilities.enableNavigation(); } _this._textBoxContextMenu.uninitialize(); var dragElements = _this._dragElements; _this._dragElements = []; for (var i = 0, end = dragElements.length; i < end; i++) { dragElements[i].draggable = true; } _this._promiseExec.completed({ newValue: _this._lastCommitValue, oldValue: _this._originalValue, exitKey: exitKey, wasCancelled: exitMode === 0 /* Cancelled */ || !isValidated }); } }); } }; ValueEditor.prototype.onKeyPress = function (evt) { if (this._element) { var key = new ValueEditorKey(evt.key, evt.shiftKey, evt.ctrlKey, evt.altKey, evt.metaKey); if (key.equalTo(ValueEditorKey.EscapeKey)) { this.completeEdit(0 /* Cancelled */, key); return false; } for (var i = 0; i < this._exitKeys.length; i++) { if (key.equalTo(this._exitKeys[i])) { this.completeEdit(2 /* Committed */, key); return false; } } if (this._allowTabs && (key.equalTo(Dom.ValueEditorKey.TabKey) || key.equalTo(Dom.ValueEditorKey.ShiftTabKey))) { if (key.equalTo(Dom.ValueEditorKey.TabKey)) { var start = this._textBox.selectionStart; var end = this._textBox.selectionEnd; this.setValue("\t", start, end); } return false; } if (this._isNumericArrowsEnabled && (!this._intellisenseContext || !this._intellisenseContext.intellisenseMenu.isOpen)) { for (var i = 0; i < this._arrowKeys.length; i++) { if (key.equalTo(this._arrowKeys[i])) { var changeAmount = (key.shiftKey ? 10 : 1) * (key.key === "Up" ? 1 : -1); if (this.numericValueChange(changeAmount)) { return false; } break; } } } } return true; }; ValueEditor.prototype.numericValueChange = function (changeAmount) { var caret = this._textBox.selectionStart; var match = this.findNumberAtCaret(); if (match) { var length = match.length - match.extraLength; var num = length ? parseInt(this._textBox.value.substr(match.start, length)) : 0; var newNum = (num + changeAmount).toString(); this.setValue(newNum, match.start, match.start + length); this._textBox.selectionStart = match.start; this._textBox.selectionEnd = match.start + newNum.length + match.extraLength; this.checkForValueCommit(false); } return !!match; }; ValueEditor.prototype.findNumberAtCaret = function () { var start = this._textBox.selectionStart; var value = this._textBox.value; var match; var matchStart; var matchLength; var extraLength; var matched; var numberRegex = /^-?\d*(\.?\d*(%|[a-zA-Z]+)?)/; var digitRegex = /\d/; do { match = value.substr(start).match(numberRegex); matched = match && digitRegex.test(value.substr(start, match[0].length)); if (matched) { matchStart = start; matchLength = match[0].length; extraLength = match[1].length; } start--; } while(start >= 0 && (match && match[0].length || start === this._textBox.selectionStart - 1)); if (matchLength) { return { start: matchStart, length: matchLength, extraLength: extraLength }; } ; }; ValueEditor.InvalidValueClass = "BPT-EditBox-Invalid"; return ValueEditor; })(); Dom.ValueEditor = ValueEditor; var EditorShowPromiseExecutive = (function () { function EditorShowPromiseExecutive() { this._hasCompleted = false; } Object.defineProperty(EditorShowPromiseExecutive.prototype, "isCompleted", { get: function () { return this._hasCompleted; }, enumerable: true, configurable: true }); EditorShowPromiseExecutive.prototype.init = function (completed) { this._completed = completed; }; EditorShowPromiseExecutive.prototype.completed = function (completion) { this._hasCompleted = true; this._completed(completion); }; return EditorShowPromiseExecutive; })(); Dom.EditorShowPromiseExecutive = EditorShowPromiseExecutive; })(Dom || (Dom = {})); // tabPanes.ts var Dom; (function (Dom) { "use strict"; var TabPanes = (function () { function TabPanes(_bridge, _remoteDom, _styleCache, _domExplorer) { var _this = this; this._bridge = _bridge; this._remoteDom = _remoteDom; this._styleCache = _styleCache; this._domExplorer = _domExplorer; this.activeTab = null; this._scrollPositions = {}; this._pseudoStatesToggle = document.getElementById("pseudoStatesToggle"); this._pseudoStatesPanel = document.getElementById("pseudoStatesPanel"); this._rightPane = document.getElementById("pane-right"); this.installPseudoStateEvents(); if (!TabPanes.PseudoStatesToggleTooltipOn) { TabPanes.PseudoStatesToggleTooltipOn = Common.ToolWindowHelpers.loadString("PseudoClassesButtonTooltipOn"); TabPanes.PseudoStatesToggleTooltipOff = Common.ToolWindowHelpers.loadString("PseudoClassesButtonTooltipOff"); } this.initializePseudoStatesToggle(); window.addEventListener("resize", function (event) { _this.setScrollHeight(); }); } TabPanes.prototype.initializePseudoStatesToggle = function () { var _this = this; if (!this._pseudoStatesToggle) { return; } this._pseudoStatesToggle.setAttribute("aria-pressed", "false"); this._pseudoStatesToggleTooltip = TabPanes.PseudoStatesToggleTooltipOff; $m(this._pseudoStatesToggle).bind("mouseover", function (mouseEvent) { if (Common.ToolWindowHelpers.isContextMenuUp()) { return true; } Plugin.Tooltip.show({ content: _this._pseudoStatesToggleTooltip }); return false; }); this._pseudoStatesToggle.addEventListener("DOMAttrModified", function (mutationEvent) { if (mutationEvent.attrName === "aria-pressed") { if (mutationEvent.target === _this._pseudoStatesToggle) { if (mutationEvent.newValue !== mutationEvent.prevValue) { var pressed = mutationEvent.newValue === "true"; _this.displayPseudoState(pressed); } } } return true; }); }; Object.defineProperty(TabPanes.prototype, "tabLoadedCallback", { get: function () { return this._tabLoadedCallback; }, set: function (callback) { this._tabLoadedCallback = callback; }, enumerable: true, configurable: true }); TabPanes.prototype.executeCleanup = function () { this.storeScrollPosition(); $m(".BPT-HorizontalPane-Right-Tab").hide().addClass("BPT-Tab-Inactive"); if (this._cleanup) { this._cleanup(); this._cleanup = null; } }; TabPanes.prototype.onDetach = function () { this.displayPseudoState(false); this.executeCleanup(); }; TabPanes.prototype.clearLayoutAndStylesState = function () { $m(".BPT-HorizontalPane-Right-Content > .BPT-DataTree-Container").data("previousUid", ""); this._styleCache.clearState(); this._styleView && this._styleView.clearView(); this.clearLayoutView(); }; TabPanes.prototype.clearState = function () { this.clearLayoutAndStylesState(); this._winningStyleView && this._winningStyleView.clearView(); }; TabPanes.prototype.storeScrollPosition = function () { var scrollContainer = $m("#pane-right"); this._scrollPositions[this.activeTab] = { left: scrollContainer.scrollLeft(), top: scrollContainer.scrollTop() }; }; TabPanes.prototype.restoreScrollPosition = function () { var scrollPosition = this._scrollPositions[this.activeTab]; if (!scrollPosition) { scrollPosition = { left: 0, top: 0 }; this._scrollPositions[this.activeTab] = scrollPosition; } var scrollContainer = $m("#pane-right"); scrollContainer.scrollLeft(scrollPosition.left); scrollContainer.scrollTop(scrollPosition.top); }; TabPanes.prototype.applyRemoteStyleChanges = function (changes) { this._styleCache.applyChanges(changes); if (this.activeTab === "changesView" && this._changesView) { this._changesView.updateView(); } }; TabPanes.prototype.setHorizontalPane = function (horizontalPane) { horizontalPane.addResizeListener(this); }; TabPanes.prototype.onPaneResize = function (leftWidth, rightWidth) { var tabItems = $m(".BPT-Tabbar > .BPT-Tab-Item"); var itemCount = tabItems.length; var width = $m(".BPT-Tabbar").width(); var element; var tabTextTotalWidth = 0; for (var i = 0; i < itemCount; i++) { element = tabItems.get(i); element.style.padding = ""; tabTextTotalWidth += element.scrollWidth + 1; } var minPadding = itemCount * 6; var totalPadding = Math.max(width - tabTextTotalWidth, minPadding); var itemPadding = (Math.min((totalPadding / itemCount), 28) / 2); var labelWidth = ((width - itemPadding) / itemCount) + "px"; for (var i = 0; i < itemCount; i++) { element = tabItems.get(i); element.style.maxWidth = labelWidth; element.style.paddingLeft = element.style.paddingRight = itemPadding + "px"; } }; TabPanes.prototype.showStyles = function (uid, tagName) { var _this = this; this.setActiveTab("stylesView", uid, tagName, { pseudo: true, allStyles: false }, function () { if (_this._styleView) { _this._styleView.clearView(); } }, 521 /* Dom_StylesTabLoad_Start */); if (!uid || !tagName || (/^#/).test(tagName)) { if (this._styleView) { this._styleView.clearView(); } this.onTabLoadComplete(522 /* Dom_StylesTabLoad_Stop */); return; } if (!this._styleModel) { this._styleModel = new Dom.StyleModel(this._remoteDom, this._domExplorer, this._styleCache); this._styleModel.setLoadArgs([uid]); this._styleView = new Dom.StyleView(this._domExplorer, this._bridge, this._remoteDom, document, TabPanes.StyleListId, TabPanes.StyleRuleTemplateId, this._styleModel, Plugin.Resources); this._styleView.renderViewCallback = function () { return _this.onTabLoadComplete(522 /* Dom_StylesTabLoad_Stop */); }; } else { this._styleModel.setLoadArgs([uid]); } this._styleView.updateView(); }; TabPanes.prototype.getStyleModel = function () { return this._styleModel; }; TabPanes.prototype.getStyleView = function () { return this._styleView; }; TabPanes.prototype.showWinningStyles = function (uid, tagName) { var _this = this; if (!this._winningStyleModel) { this._winningStyleModel = new Dom.Wsp.Model(this._remoteDom, this._styleCache, Common.ToolWindowHelpers.createShortenedUrlText); this._winningStyleView = new Dom.Wsp.View(this._domExplorer, this._bridge, document, TabPanes.WinningStyleListId, TabPanes.WinningStyleItemTemplateId, this._winningStyleModel); this._winningStyleView.renderViewCallback = function () { return _this.onTabLoadComplete(528 /* Dom_ComputedTabLoad_Stop */); }; } this.setActiveTab("winningStylesView", uid, tagName, { pseudo: true, allStyles: true }, function () { if (_this._winningStyleView) { _this._winningStyleView.clearView(); } }, 527 /* Dom_ComputedTabLoad_Start */); if (!uid || !tagName || (/^#/).test(tagName)) { this._winningStyleView.clearView(); this.onTabLoadComplete(528 /* Dom_ComputedTabLoad_Stop */); return; } this._winningStyleModel.setLoadArgs([uid]); this._winningStyleView.updateView(); }; TabPanes.prototype.getWinningStyleModel = function () { return this._winningStyleModel; }; TabPanes.prototype.getWinningStyleView = function () { return this._winningStyleView; }; TabPanes.prototype.showLayout = function (uid, tagName) { var _this = this; var layoutView = $m("#layoutView"); this.setActiveTab("layoutView", uid, tagName, { pseudo: true, allStyles: false }, function () { layoutView.attr("data-uid", ""); layoutView.attr("data-tag", ""); }, 531 /* Dom_LayoutTabLoad_Start */); if (!uid || !tagName || (/^#/).test(tagName)) { this.clearLayoutView(); this.onTabLoadComplete(532 /* Dom_LayoutTabLoad_Stop */); return; } $m("#layout-offset-layer").show(); var previousUid = layoutView.attr("data-uid"); var gleamRequired = uid === previousUid; layoutView.attr("data-uid", uid); layoutView.attr("data-tag", tagName); var gleamLayoutChange = F12.DomExplorer.gleamChange; this._remoteDom.getComputedBox(uid).done(function (obj) { if (obj) { layoutView.find("[data-layoutProperty]").each(function (index) { var element = $m(this); var prop = element.attr("data-layoutProperty"); var value = obj[prop] == null ? "" : obj[prop] + ""; value = value.replace(/px$/, ""); if (gleamRequired && element.text() !== value) { gleamLayoutChange(element); } element.text(value); }); } _this.onTabLoadComplete(532 /* Dom_LayoutTabLoad_Stop */); }); }; TabPanes.prototype.showEvents = function (uid, tagName) { var _this = this; this.setActiveTab("eventsView", uid, tagName, { pseudo: false, allStyles: false }, function () { if (_this._eventsView) { _this._eventsView.clearView(); } _this._remoteDom.clearCurrentEventProxy(); }, 533 /* Dom_EventsTabLoad_Start */); if (!uid || !tagName || (/^#/).test(tagName)) { if (this._eventsView) { this._eventsView.clearView(); } this.onTabLoadComplete(534 /* Dom_EventsTabLoad_Stop */); return; } if (!this._eventsModel) { this._eventsModel = new Dom.EventsModel(this._remoteDom, this._styleCache, Common.ToolWindowHelpers.createShortenedUrlText); this._eventsModel.setLoadArgs([uid]); this._eventsView = new Dom.EventsView(document, TabPanes.EventsListId, TabPanes.EventsTemplateId, this._eventsModel, this._domExplorer); this._eventsModel.updateCallback = this._eventsView.renderView.bind(this._eventsView); this._eventsView.renderViewCallback = function () { return _this.onTabLoadComplete(534 /* Dom_EventsTabLoad_Stop */); }; } else { this._eventsModel.setLoadArgs([uid]); } this._eventsView.updateView(); }; TabPanes.prototype.showChanges = function () { var _this = this; this.setActiveTab("changesView", null, null, { pseudo: false, allStyles: false }, function () { if (_this._changesView) { _this._changesView.clearView(); } }, 529 /* Dom_ChangesTabLoad_Start */); if (!this._changesModel) { this._changesModel = new Dom.ChangesModel(this._remoteDom, this._domExplorer); this._changesView = new Dom.ChangesView(this._domExplorer, this._bridge, document, TabPanes.ChangesListId, TabPanes.ChangesItemTemplateId, this._changesModel, this._styleCache); this._changesView.renderViewCallback = function () { return _this.onTabLoadComplete(530 /* Dom_ChangesTabLoad_Stop */); }; } this._changesView.updateView(); }; TabPanes.prototype.getChangesModel = function () { return this._changesModel; }; TabPanes.prototype.getChangesView = function () { return this._changesView; }; TabPanes.prototype.isPseudoStatePanelAvailable = function () { return this._pseudoStatesToggle.getAttribute("data-show") === "true"; }; TabPanes.prototype.isPseudoStatePanelOpen = function () { return this._pseudoStatesPanel.getAttribute("data-show") === "true"; }; TabPanes.prototype.togglePseudoStatePanel = function () { if (this.isPseudoStatePanelAvailable()) { var oldState = this._pseudoStatesToggle.classList.contains(TabPanes.ToggleButtonOn); if (oldState) { this._pseudoStatesToggle.classList.remove(TabPanes.ToggleButtonOn); } else { this._pseudoStatesToggle.classList.add(TabPanes.ToggleButtonOn); } var newState = !oldState; this.displayPseudoState(newState); return newState; } }; TabPanes.prototype.isPseudoClassEnabled = function (pseudoClass) { var pseudoSelector = this._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='" + pseudoClass + "']"); if (pseudoSelector) { var checkbox = pseudoSelector.firstElementChild; return !checkbox.disabled; } }; TabPanes.prototype.getPseudoClassState = function (pseudoClass) { if (this.isPseudoStatePanelAvailable() && !!this.isPseudoClassEnabled(pseudoClass)) { var pseudoSelector = this._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='" + pseudoClass + "']"); var checkbox = pseudoSelector.firstElementChild; return checkbox.checked; } }; TabPanes.prototype.setPseudoClassState = function (pseudoClass, forceOn) { var _this = this; return new Plugin.Promise(function (completed, error) { if (!_this.isPseudoStatePanelAvailable()) { error(new Error("Pseudo state panel not available")); } else if (!_this.isPseudoClassEnabled(pseudoClass)) { error(new Error(pseudoClass + " state is unavailable for the current element")); } else { var pseudoSelector = _this._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='" + pseudoClass + "']"); var checkbox = pseudoSelector.firstElementChild; _this.tabLoadedCallback = completed; checkbox.click(); } }); }; TabPanes.prototype.setActiveTab = function (tab, uid, tagName, show, cleanup, traceEvent) { var _this = this; if (traceEvent) { this.raiseTraceEvents(traceEvent); } this._currentUid = uid; this.executeCleanup(); this.activeTab = tab; var container = $m("#" + tab).show().removeClass("BPT-Tab-Inactive"); var showPseudo = show.pseudo && this._domExplorer.documentMode >= 7; var showOptions = showPseudo || show.allStyles; var optionsPanel = $m("#optionalButtonsPanel"); if (showOptions) { optionsPanel.removeClass("BPT-OptionsPanel-Hidden"); } else { optionsPanel.addClass("BPT-OptionsPanel-Hidden"); } this.updatePseudoStates(showPseudo, tagName ? tagName.toLowerCase() : tagName); var allStylesButton = $m("#allWinningStylesButton"); if (show.allStyles) { allStylesButton.show(); } else { allStylesButton.hide(); } this.restoreScrollPosition(); this.setPaneLeftJustification(); this._cleanup = function () { TabPanes.PseudoStateList.forEach(function (state) { var pseudoSelector = _this._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='" + state + "']"); var checkbox = pseudoSelector.firstElementChild; checkbox.checked = false; }); cleanup(); }; }; TabPanes.prototype.onTabLoadComplete = function (traceEvent) { Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsDomExplorerTabChanged); if (traceEvent) { this.raiseTraceEvents(traceEvent); } if (this._tabLoadedCallback) { this._tabLoadedCallback(); this._tabLoadedCallback = null; } }; TabPanes.prototype.setPaneLeftJustification = function () { var containerLeftEdge = document.getElementsByClassName("BPT-Tab-Container")[0].getBoundingClientRect().left; var dividerLocation = document.getElementsByClassName("BPT-Pane-Divider")[0].getBoundingClientRect().left; var offset = dividerLocation - containerLeftEdge + 3; $m(document.getElementById("pane-right")).css("left", offset + "px"); }; TabPanes.prototype.clearLayoutView = function () { var layoutView = $m("#layoutView"); layoutView.find("[data-layoutProperty]").text(""); $m("#layout-offset-layer").hide(); }; TabPanes.prototype.installPseudoStateEvents = function () { var _this = this; if (this._pseudoStatesPanel) { var list = this._pseudoStatesPanel.querySelectorAll(".BPT-PseudoCheckbox"); for (var i = 0; i < list.length; i++) { list[i].addEventListener("change", function (evt) { var element = evt.target; var state = element.parentElement.getAttribute("data-name"); _this._remoteDom.setPseudoStyling(_this._currentUid, state, element.checked).done(function () { _this._domExplorer.refreshCSSView(); }); }); } } }; TabPanes.prototype.updatePseudoStates = function (show, tagName) { var _this = this; this._pseudoStatesToggle.setAttribute("data-show", show); if (show) { this.displayPseudoState(this._pseudoStatesToggle.classList.contains(TabPanes.ToggleButtonOn)); TabPanes.PseudoStateList.forEach(function (state) { var pseudoSelector = _this._pseudoStatesPanel.querySelector(".BPT-PseudoSelector[data-name='" + state + "']"); var checkbox = pseudoSelector.firstElementChild; if (state === "visited" && tagName !== "a") { checkbox.checked = false; checkbox.disabled = true; pseudoSelector.classList.add("BPT-PseudoSelector-Disabled"); } else { checkbox.disabled = false; pseudoSelector.classList.remove("BPT-PseudoSelector-Disabled"); _this._remoteDom.getPseudoStyling(_this._currentUid, state).done(function (isSet) { checkbox.checked = isSet; }); } }); } else { this.displayPseudoState(false); } }; TabPanes.prototype.displayPseudoState = function (showPanel) { if (showPanel) { this._pseudoStatesToggle.classList.add(TabPanes.ToggleButtonOn); } else { this._pseudoStatesToggle.classList.remove(TabPanes.ToggleButtonOn); } this._pseudoStatesPanel.setAttribute("data-show", showPanel); this._pseudoStatesToggleTooltip = showPanel ? TabPanes.PseudoStatesToggleTooltipOff : TabPanes.PseudoStatesToggleTooltipOn; this._pseudoStatesToggle.setAttribute("aria-label", this._pseudoStatesToggleTooltip); var pressed = this._pseudoStatesToggle.getAttribute("aria-pressed") === "true"; if (pressed !== showPanel) { this._pseudoStatesToggle.setAttribute("aria-pressed", showPanel ? "true" : "false"); } this.setScrollHeight(); }; TabPanes.prototype.setScrollHeight = function () { this._rightPane.style.maxHeight = (this._rightPane.parentElement.clientHeight - this._rightPane.offsetTop) + "px"; }; TabPanes.prototype.raiseTraceEvents = function (traceEvents) { if (this._domExplorer) { this._domExplorer.raiseTraceEvents(traceEvents); } }; TabPanes.PseudoStateList = ["hover", "visited"]; TabPanes.StyleListId = "styleList"; TabPanes.StyleRuleTemplateId = "styleRuleTemplate"; TabPanes.WinningStyleListId = "winningStylesList"; TabPanes.WinningStyleItemTemplateId = "winningStylesItemTemplate"; TabPanes.EventsTemplateId = "eventsTemplate"; TabPanes.EventsListId = "eventsList"; TabPanes.ChangesListId = "changesList"; TabPanes.ChangesItemTemplateId = "changesTemplate"; TabPanes.ToggleButtonOn = "BPT-ToolbarToggleButton-StateOn"; return TabPanes; })(); Dom.TabPanes = TabPanes; })(Dom || (Dom = {})); // domTree.ts var Dom; (function (Dom) { "use strict"; (function (EditMode) { EditMode[EditMode["None"] = 0] = "None"; EditMode[EditMode["Name"] = 1] = "Name"; EditMode[EditMode["Value"] = 2] = "Value"; EditMode[EditMode["Add"] = 3] = "Add"; })(Dom.EditMode || (Dom.EditMode = {})); var EditMode = Dom.EditMode; ; var DomTree = (function () { function DomTree(_domExplorer, _bridge, _remoteDom) { this._domExplorer = _domExplorer; this._bridge = _bridge; this._remoteDom = _remoteDom; this._forceRefreshAttributes = ["style", "class", "id", "checked", "color", "type", "align", "valign"]; } DomTree.prototype.expandToRemoteSelectedElement = function (adjustFocus) { var _this = this; if (typeof adjustFocus === "undefined") { adjustFocus = false; } this._remoteDom.getParentChainForSelectedElement().done(function (chain) { _this.expandElementChain(chain, adjustFocus); }); }; DomTree.prototype.createHtmlTreeItems = function (parentElement, children, skipHandlers, virtualElementCount) { var _this = this; if (!children) { return; } var existingIdMap = {}; var existingElements = parentElement.children(".BPT-HtmlTree-ChildCollection").children(); for (var elementIndex = 0; elementIndex < existingElements.length; elementIndex++) { var uid = $m(existingElements.get(elementIndex)).attr("data-id"); existingIdMap[uid] = true; } this.initializeIntellisenseProvider(); for (var i = 0; i < children.length; i++) { children[i].text = children[i].text || ""; if (!skipHandlers) { this.addEventHandlers(parentElement, children[i].uid); } var id = children[i].uid; if (existingIdMap[id]) { existingIdMap[id] = false; } } for (var removed in existingIdMap) { if (existingIdMap[removed]) { this._remoteDom.removeChildMappings(removed); } } if (skipHandlers) { parentElement.data("forceShowAll", true); } return HtmlTreeView.addElements(parentElement, children, function (a, b, c, d) { return _this.expandCallback(a, b, c, d); }, function (a, b, c) { return _this.valueEditCallback(a, b, c); }, function (a, b, c) { return _this.selectCallback(a, b, c); }, true, true, virtualElementCount); }; DomTree.prototype.addEventHandlers = function (parentElement, childUid) { this._remoteDom.addTreeModifiedEvent(childUid); this._remoteDom.addAttrModifiedEvent(childUid); }; DomTree.prototype.initializeAttributeModifiedEvent = function () { var _this = this; var treeRoot = $m("#tree"); this._remoteDom.setupAttributeModifiedEvent(function (modifications) { var selected = HtmlTreeView.getSelected(treeRoot); var parents = selected.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot"); var doRefresh = false; var attrForcingRefresh; modifications.forEach(function (attributeModification) { var gleamAttributeChange = F12.DomExplorer.gleamChange; var directParentElement = document.querySelector("div[data-id='" + attributeModification.uid + "']"); doRefresh = doRefresh || selected.attr("data-id") === attributeModification.uid; if (!doRefresh) { for (var i = 0; i < parents.length; i++) { if (parents.get(i).getAttribute("data-id") === attributeModification.uid) { doRefresh = true; break; } } } if (!attrForcingRefresh && doRefresh) { if (_this._forceRefreshAttributes.indexOf(attributeModification.attrName) >= 0) { attrForcingRefresh = attributeModification.attrName; } } if (directParentElement) { var directParent = $m(directParentElement); var header = directParent.children(".BPT-HtmlTreeItem-Header"); var attrNode = header.find(".BPT-HTML-Attribute-Section[data-attrName='" + attributeModification.attrName + "']"); var editbox = attrNode.find(".BPT-EditBox"); if (attributeModification.attrChange === 3) { if (editbox.length > 0) { editbox.trigger("valueRemoved"); } else { attrNode.remove(); } } else { if (editbox.length > 0) { editbox.trigger("valueChanged", attributeModification.newValue); } else { var gleamChange = false; if (attrNode.length > 0) { attrNode = attrNode.find(".BPT-HTML-Value"); if (attrNode.length) { var oldValue = attrNode.text(); if (oldValue !== attributeModification.newValue) { attrNode.text(attributeModification.newValue); gleamChange = true; } } } else { var newAttribute = HtmlTreeView.addAttribute(directParent, attributeModification.attrName, attributeModification.newValue); attrNode = newAttribute.find(".BPT-HTML-Value"); gleamChange = true; } if (gleamChange) { gleamAttributeChange(attrNode); } } if (Dom.TabItem.isActive($m("#layoutTabButton"))) { var activeElement = document.activeElement; if (activeElement && activeElement.classList && activeElement.classList.contains("BPT-EditBox")) { if ($m("#layoutView .BPT-EditBox").length > 0) { doRefresh = false; } } } } } }); if (doRefresh) { _this.refreshAfterAttributeChange(attrForcingRefresh || "", null); } Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsDomExplorerAttributeChanged); }); }; DomTree.prototype.initializeTreeModifiedEvent = function () { var _this = this; var treeRoot = $m("#tree"); this._remoteDom.setupTreeModifiedEvent(function (modifiedNodes) { modifiedNodes.forEach(function (obj) { var treeHadFocus = !!document.querySelector("#tree :focus") && document.hasFocus(); var focusInTreeInput = treeHadFocus && HtmlTreeView.currentFocusOnInput() && document.activeElement; var gleamTextChange = F12.DomExplorer.gleamChange; var directParent = treeRoot.find(".BPT-HtmlTreeItem[data-id='" + obj.uid + "']"); function appendChildElement(newText) { newText = newText || ""; var headerTextElement = directParent.find(".BPT-HTML-Text"); if (headerTextElement.length === 1) { headerTextElement.text(newText); } else { headerTextElement.remove(); headerTextElement = $m("").addClass("BPT-HTML-Text").text(newText); directParent.find(".BPT-HtmlTreeItem-Header").children().first().append(headerTextElement); } gleamTextChange(headerTextElement); } var newText; if (directParent.length > 0) { if (HtmlTreeView.isExpanded(directParent)) { if (obj.children) { var selectedParentOrChild = directParent.find(".BPT-HtmlTreeItem-Selected").length > 0; if (obj.children.length === 1 && !obj.children[0].tag && obj.children[0].text && obj.children[0].text.length < _this._domExplorer.maxInlineLength && !obj.children[0].text.match(/\n/g)) { newText = obj.children[0].text; obj.children = null; appendChildElement(newText); HtmlTreeView.toggle(directParent); HtmlTreeView.changeExpandableState(directParent, false); if (selectedParentOrChild) { HtmlTreeView.select(directParent); } } else { directParent.data("forceShowAll", false); _this.createHtmlTreeItems(directParent, obj.children, null, obj.childCount); } } else { HtmlTreeView.toggle(directParent); HtmlTreeView.changeExpandableState(directParent, false); if (selectedParentOrChild) { HtmlTreeView.select(directParent); } } } else if (HtmlTreeView.isCollapsed(directParent)) { if (!obj.children || obj.children.length === 0) { HtmlTreeView.changeExpandableState(directParent, false); } } else { newText = obj.text; var autoexpand = false; if (obj.children && obj.children.length === 1 && !obj.children[0].tag && obj.children[0].text) { if (obj.children[0].text.length < _this._domExplorer.maxInlineLength && !obj.children[0].text.match(/\n/g)) { newText = obj.children[0].text; obj.children = null; } else { autoexpand = true; } } if (obj.children && obj.children.length === 0) { obj.children = null; } appendChildElement(newText); HtmlTreeView.changeExpandableState(directParent, !!obj.children); if (autoexpand) { HtmlTreeView.toggle(directParent); } } _this._domExplorer.updateBreadcrumbs(); } if (focusInTreeInput) { HtmlTreeView.adjustTabindex(); focusInTreeInput.focus(); } else if (treeHadFocus) { HtmlTreeView.focusSelected(); } else { HtmlTreeView.adjustTabindex(); } }); }); }; DomTree.prototype.isUnderEditableItem = function (element) { var badTags = ["#doctype", "script", "noscript", "style"]; if (this._domExplorer.documentMode < 9) { badTags.push("#comment"); } if (badTags.indexOf(element.attr("data-tag")) >= 0) { return false; } var parents = element.parents(".BPT-HtmlTreeItem"); for (var i = 0; i < parents.length; i++) { var parentElement = parents.get(0); if (badTags.indexOf(parentElement.getAttribute("data-tag")) >= 0) { return false; } } return true; }; DomTree.prototype.editAttribute = function (uid, name, value, callback) { var _this = this; if (this._domExplorer.traceWriter) { this._domExplorer.traceWriter.raiseEvent(545 /* Dom_CommitEditAttribute_Start */); } this._remoteDom.editAttribute(uid, name, value).done(function (succeeded) { if (callback) { callback(succeeded); } if (_this._domExplorer.traceWriter) { _this._domExplorer.traceWriter.raiseEvent(546 /* Dom_CommitEditAttribute_Stop */); } }); }; DomTree.prototype.removeAttribute = function (uid, name, callback) { this._remoteDom.removeAttribute(uid, name).done(callback); }; DomTree.prototype.editTextRemote = function (uid, newText, callback) { this._remoteDom.editText(uid, newText).done(callback); }; DomTree.prototype.editAttributeName = function (uid, nameElement, newAttributeElement) { var _this = this; var attributeSectionElement = this.findOwnerAttributeSection(nameElement); var parentElement = attributeSectionElement.closest(".BPT-HTML"); var nextEditable = this.findNextEditableElement(attributeSectionElement, false); var previousEditable = this.findPreviousEditableElement(attributeSectionElement); var valueElement = nameElement.next(".BPT-HTML-Value"); var value = valueElement.text(); var valueEditor = new Dom.ValueEditor(document, this._domExplorer, this._bridge, window); valueEditor.shouldContinueEdit = this.shouldContinueEdit; var equalsKey = new Dom.ValueEditorKey("="); valueEditor.addExitKeys(equalsKey); var width = Math.min(Math.max(nameElement.width() + 30, 70), this.findWidthForTreeItem(nameElement)); var editElement = $m("").text(nameElement.text()); editElement.attr("aria-label", Plugin.Resources.getString("/Common/EditAttributeNameAriaLabel")); nameElement.text(""); nameElement.append(editElement); var existingElement; valueEditor.show(editElement.get(0), width, function (newValue, oldValue) { return new Plugin.Promise(function (completed) { var oldName = oldValue.toLowerCase(); var newName = newValue.toLowerCase(); if (newName && newName !== oldName) { var currentAttributes = attributeSectionElement.closest(".BPT-HTML").find(".BPT-HTML-Attribute"); var editValueElement = valueElement; for (var i = 0; i < currentAttributes.length; i++) { var otherElement = $m(currentAttributes.get(i)); if (otherElement.get(0) !== nameElement.get(0) && otherElement.text().toLowerCase() === newName) { existingElement = _this.findOwnerAttributeSection(otherElement); completed(true); return; } } _this._remoteDom.enableEditChaining(); _this.editAttribute(uid, newName, value, function (succeeded) { if (succeeded) { attributeSectionElement.attr("data-attrName", newName); nameElement.text(newName); if (!newAttributeElement) { _this.removeAttribute(uid, oldName); } _this.refreshAfterAttributeChange(oldName, newName); } _this._remoteDom.disableEditChaining(); completed(succeeded); }); } else { completed(true); } }); }).done(function (completion) { var oldName = completion.oldValue.toLowerCase(); var newName = completion.newValue.toLowerCase(); nameElement.text(completion.wasCancelled ? oldName : newName); var isAttributeRemoved; if (!completion.wasCancelled && !newName && !newAttributeElement) { isAttributeRemoved = true; _this.removeAttribute(uid, oldName, function (succeeded) { if (succeeded || !value) { attributeSectionElement.remove(); _this.refreshAfterAttributeChange(oldName, newName); } }); } else if (!completion.wasCancelled && newName !== oldName) { if (existingElement) { nameElement.text(oldName); if (newAttributeElement) { newAttributeElement.remove(); } _this.editAttributeValue(uid, existingElement); return; } } else if (newAttributeElement) { isAttributeRemoved = true; newAttributeElement.remove(); } else { nameElement.text(oldName); } var moveTo; var mode = 0 /* None */; if (!completion.wasCancelled && completion.exitKey && !completion.exitKey.equalTo(Dom.ValueEditorKey.EnterKey)) { if (completion.exitKey.equalTo(Dom.ValueEditorKey.ShiftTabKey)) { moveTo = previousEditable; mode = 2 /* Value */; } else if (isAttributeRemoved) { moveTo = nextEditable; mode = 1 /* Name */; } else { moveTo = attributeSectionElement; mode = 2 /* Value */; } } if (moveTo && moveTo.length) { _this.moveEditor(moveTo, mode); } else if (parentElement.closest(".BPT-HtmlTreeItem").hasClass("BPT-HtmlTreeItem-Selected")) { _this.resetFocusToContainerItem(parentElement); } }); }; DomTree.prototype.getCssClassesUsedInCurrentDocument = function (callback) { this._remoteDom.getCssClassesUsedInCurrentDocument(this._domExplorer.currentSelectedId).done(function (cssClasses) { var choices = []; for (var i = 0; i < cssClasses.length; i++) { var cssClass = cssClasses[i]; choices.push(new Common.Intellisense.IntellisenseChoice(cssClass, cssClass)); } callback(choices); }); }; DomTree.prototype.getEditAsHtmlText = function (uid, callback) { this._remoteDom.getHTMLString(uid, false).done(callback); }; DomTree.prototype.setEditAsHtmlText = function (uid, text, callback) { var _this = this; if (this._domExplorer.traceWriter) { this._domExplorer.traceWriter.raiseEvent(543 /* Dom_CommitEditAsHtml_Start */); } this._remoteDom.replaceElement(uid, text).done(function (succeeded) { if (callback) { callback(succeeded); } if (_this._domExplorer.traceWriter) { _this._domExplorer.traceWriter.raiseEvent(544 /* Dom_CommitEditAsHtml_Stop */); } }); }; DomTree.prototype.editAsHtml = function (uid, editingElement, width) { var _this = this; if (this._domExplorer.traceWriter) { this._domExplorer.traceWriter.raiseEvent(541 /* Dom_EnterEditAsHtml_Start */); } this.getEditAsHtmlText(uid, function (textToEdit) { var valueEditor = new Dom.ValueEditor(document, _this._domExplorer, _this._bridge, window, Number.MAX_VALUE, null, textToEdit); var extraExitKey = new Dom.ValueEditorKey("Enter", false, true); valueEditor.addExitKeys(extraExitKey); valueEditor.enableTabsInData(); valueEditor.removeExitKeys(Dom.ValueEditorKey.EnterKey); valueEditor.shouldContinueEdit = _this.shouldContinueEdit; var element = editingElement.get(0); if (_this._domExplorer.traceWriter) { _this._domExplorer.traceWriter.raiseEvent(542 /* Dom_EnterEditAsHtml_Stop */); } valueEditor.show(element, width).done(function (completion) { if (!completion.wasCancelled && (completion.oldValue !== completion.newValue)) { _this.resetFocusToContainerItem(editingElement.parent()); _this.setEditAsHtmlText(uid, completion.newValue); } else { _this.resetFocusToContainerItem(editingElement); } }); }); }; DomTree.prototype.editAttributeValue = function (uid, attributeSection) { var _this = this; var valueContext = attributeSection.children(".BPT-HTML-Value"); var attrName = attributeSection.attr("data-attrName"); if (attrName === "class") { this.updateClassIntellisenseProvider(); var intellisenseContext = new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge(), new Common.Intellisense.IntellisenseMenu("intellisenseListBox", null, null, 500, true), this._classIntellisenseProvider, this._bridge); } var itemWidth = this.findWidthForTreeItem(valueContext); var width = Math.min(Math.max(valueContext.width() + 30, 120), itemWidth); var valueEditor = new Dom.ValueEditor(document, this._domExplorer, this._bridge, window, width === itemWidth ? 3 : 1, intellisenseContext); valueEditor.enableStripDelimiter("'\""); valueEditor.shouldContinueEdit = this.shouldContinueEdit; var editElement = $m("").text(valueContext.text()); editElement.attr("aria-label", Plugin.Resources.getString("/Common/EditAttributeValueAriaLabel")); valueContext.text(""); valueContext.append(editElement); valueEditor.show(editElement.get(0), width, function (newValue, oldValue) { return new Plugin.Promise(function (completed) { _this.editAttribute(uid, attrName, newValue, function (succeeded) { if (succeeded) { _this.refreshAfterAttributeChange(_this.findNameForAttribute(attributeSection).text(), null); } completed(succeeded); }); }); }).done(function (completion) { valueContext.text(completion.wasCancelled ? completion.oldValue : completion.newValue); var moveTo; var mode = 1 /* Name */; if (!completion.wasCancelled && completion.exitKey && !completion.exitKey.equalTo(Dom.ValueEditorKey.EnterKey)) { if (completion.exitKey.equalTo(Dom.ValueEditorKey.TabKey)) { moveTo = _this.findNextEditableElement(attributeSection, true); if (!moveTo.length) { moveTo = attributeSection; mode = 3 /* Add */; } } else { moveTo = attributeSection; } } if (moveTo && moveTo.length) { _this.moveEditor(moveTo, mode); } else if (valueContext.closest(".BPT-HtmlTreeItem").hasClass("BPT-HtmlTreeItem-Selected")) { _this.resetFocusToContainerItem(valueContext); } }); }; DomTree.prototype.editNewAttribute = function (uid, element) { this._domExplorer.traceWriter.raiseEvent(509 /* Dom_AddAttribute_Start */); var newAttribute = HtmlTreeView.addAttribute(element, "", ""); this.editAttributeName(uid, this.findNameForAttribute(newAttribute), newAttribute); this._domExplorer.traceWriter.raiseEvent(510 /* Dom_AddAttribute_Stop */); }; DomTree.prototype.editFirstAttribute = function (uid, element) { var firstAttribute = this.findFirstAttribute(element); if (firstAttribute.length) { this.editAttributeName(uid, this.findNameForAttribute(firstAttribute)); } else { this.editNewAttribute(uid, element); } }; DomTree.prototype.resetFocusToContainerItem = function (element) { var elementInQuestion = element.get(0); var scrollContainer = F12.DomExplorer.DomExplorerWindow.findAncestorByClass(elementInQuestion, "BPT-HtmlTree-ScrollContainer"); if (scrollContainer != null) { var saveScrollTop = scrollContainer.scrollTop; HtmlTreeView.select(element.closest(".BPT-HtmlTreeItem")); element.closest(".BPT-HtmlTree-Container").focus(); scrollContainer.scrollTop = saveScrollTop; HtmlTreeView.focusSelected(); } }; DomTree.prototype.editText = function (uid, editingElement) { var _this = this; if (this.isUnderEditableItem(editingElement)) { var editor = new Dom.ValueEditor(document, this._domExplorer, this._bridge, window, 20); editor.shouldContinueEdit = this.shouldContinueEdit; editor.doTrim = false; editor.show(editingElement.get(0), this.findWidthForTreeItem(editingElement), function (newText, oldText) { return new Plugin.Promise(function (completed) { _this.editTextRemote(uid, newText, function () { completed(true); }); }); }).done(function (completion) { var moveTo; var mode = 0 /* None */; if (!completion.wasCancelled && completion.exitKey && !completion.exitKey.equalTo(Dom.ValueEditorKey.EnterKey)) { if (completion.exitKey.equalTo(Dom.ValueEditorKey.TabKey)) { moveTo = _this.findNextEditableElement(editingElement, false); mode = 1 /* Name */; } else { moveTo = _this.findPreviousEditableElement(editingElement); mode = 2 /* Value */; } } if (moveTo && moveTo.length) { _this.moveEditor(moveTo, mode); } else { _this.resetFocusToContainerItem(editingElement); } }); } else { this.resetFocusToContainerItem(editingElement); } }; DomTree.prototype.valueEditCallback = function (parentElement, editingElement, ctrl) { var uid = parentElement.attr("data-id"); if (ctrl) { var element = editingElement || parentElement; if (this._domExplorer.canDeleteItem(element)) { var uid = parentElement.attr("data-id"); this.editAsHtml(uid, element, this._domExplorer.horizontalPane.leftWidth * .80); } } else { if (this.isUnderEditableItem(parentElement)) { if (editingElement) { if (editingElement.hasClass("BPT-HTML-Attribute")) { this.editAttributeName(uid, editingElement); } else if (editingElement.hasClass("BPT-HTML-Attribute-Section")) { this.editAttributeValue(uid, editingElement); } else if (editingElement.hasClass("BPT-HTML-Text")) { this.editText(uid, editingElement); } } else { var tag = parentElement.attr("data-tag"); if (tag === "#text") { this.editText(uid, parentElement.find(".BPT-HTML-Text")); } else if (tag !== "#comment" && tag !== "#doctype") { this.editFirstAttribute(uid, parentElement); } } } } }; DomTree.prototype.selectCallback = function (parentElement, id, tag) { var _this = this; if (this._domExplorer.currentSelectedId !== id) { if (this._tabRefreshTimeout) { window.clearTimeout(this._tabRefreshTimeout); } var refreshTab = function () { _this._domExplorer.traceWriter.raiseEvent(513 /* Dom_SelectElement_Start */); _this._domExplorer.tabPanes.clearState(); var overrideId; if (Dom.TabItem.isActive($m("#stylesTabButton"))) { var idTag = _this._domExplorer.selectNodeOrParent(id, tag); _this._domExplorer.tabPanes.showStyles(idTag.id, idTag.tag); overrideId = idTag.id; } else if (Dom.TabItem.isActive($m("#winningStylesTabButton"))) { var idTag = _this._domExplorer.selectNodeOrParent(id, tag); _this._domExplorer.tabPanes.showWinningStyles(idTag.id, idTag.tag); overrideId = idTag.id; } else if (Dom.TabItem.isActive($m("#layoutTabButton"))) { _this._domExplorer.tabPanes.showLayout(id, tag); } else if (Dom.TabItem.isActive($m("#eventsTabButton"))) { _this._domExplorer.tabPanes.showEvents(id, tag); } _this._domExplorer.updateBreadcrumbs(); _this._domExplorer.showElementHighlight(overrideId || id); _this._remoteDom.storeElementForConsole(id); _this._domExplorer.traceWriter.raiseEvent(514 /* Dom_SelectElement_Stop */); }; this._domExplorer.currentSelectedId = id; if (!this._immediateTabRefresh) { this._tabRefreshTimeout = window.setTimeout(refreshTab, 100); } else { refreshTab(); this._immediateTabRefresh = false; } } }; DomTree.prototype.expandElementChain = function (chain, adjustFocus) { if (typeof adjustFocus === "undefined") { adjustFocus = false; } var elements = []; this._domExplorer.traceWriter.raiseEvent(503 /* Dom_ExpandNode_Start */); var end = Math.min(chain.length, HtmlTreeView.DOM_TREE_DEPTH_LIMIT); for (var i = 0; i < end; i++) { if (chain[i].children) { var element = $m("div[data-id=" + chain[i].uid + "]"); this.createHtmlTreeItems(element, chain[i].children, true); element.removeClass("BPT-HtmlTreeItem-Collapsed").addClass("BPT-HtmlTreeItem-Expanded"); element.attr("aria-expanded", "true"); elements.push({ element: element, children: chain[i].children }); } } for (var index = 0; index < elements.length; index++) { for (var j = 0; j < elements[index].children.length; j++) { this.addEventHandlers(elements[index].element, elements[index].children[j].uid); } } this._immediateTabRefresh = true; var selectUID = chain.pop().uid; var selectedElement = null; if (selectUID === "uid-selectchild") { selectUID = chain.pop().uid; selectedElement = $m("div[data-id=" + selectUID + "]"); selectedElement = selectedElement.find(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); } else { selectedElement = $m("div[data-id='" + selectUID + "']"); } HtmlTreeView.select(selectedElement.closest(".BPT-HtmlTreeItem"), adjustFocus); Common.ToolWindowHelpers.scrollIntoView(selectedElement.get(0), selectedElement.closest(".BPT-HtmlTree-ScrollContainer").get(0)); this._domExplorer.traceWriter.raiseEvent(504 /* Dom_ExpandNode_Stop */); }; DomTree.prototype.expandCallback = function (isExpanding, parentElement, id, onExpandComplete) { var _this = this; if (isExpanding) { var showAll = parentElement.data("forceShowAll"); var result = []; if (showAll) { var loadingDiv = $m("").addClass("BPT-HtmlTree-ChildCollection-ShowAll").addClass("BPT-HtmlTreeItem"); loadingDiv.text(Common.ToolWindowHelpers.loadString("LoadingText")); parentElement.children(".BPT-HtmlTreeItem-Footer").prepend(loadingDiv); } this._remoteDom.getChildren(id, showAll, function (chunk) { result.push.apply(result, chunk.children); if (chunk.chunkNumber + 1 === chunk.chunkCount) { _this.renderChildren(result, chunk.totalChildCount, parentElement, onExpandComplete); result = []; if (loadingDiv) { loadingDiv.remove(); } } }); } else { this._domExplorer.raiseTraceEvents(519 /* Dom_CollapseElement_Start */); this._remoteDom.removeChildMappings(id).done(function () { if (_this._domExplorer.expandCallback) { _this._domExplorer.expandCallback(parentElement.get(0), false); } _this._domExplorer.raiseTraceEvents(520 /* Dom_CollapseElement_Stop */); }); } }; DomTree.prototype.initializeIntellisenseProvider = function () { this._classIntellisenseProvider = new Common.Intellisense.StaticContentProvider(); this.updateClassIntellisenseProvider(); }; DomTree.prototype.updateClassIntellisenseProvider = function () { var _this = this; this._domExplorer.traceWriter.raiseEvent(511 /* Dom_Intellisense_Start */); this.getCssClassesUsedInCurrentDocument(function (choices) { _this._classIntellisenseProvider.choices = choices; _this._domExplorer.traceWriter.raiseEvent(512 /* Dom_Intellisense_Stop */); }); }; DomTree.prototype.findFirstAttribute = function (element) { return element.children(".BPT-HtmlTreeItem-Header").find(".BPT-HTML-Attribute-Section").first(); }; DomTree.prototype.findEmbeddedText = function (element) { return element.children(".BPT-HtmlTreeItem-Header").find(".BPT-HTML > .BPT-HTML-Text"); }; DomTree.prototype.findNextAttribute = function (element) { return element.next(".BPT-HTML-Attribute-Section"); }; DomTree.prototype.findPreviousAttribute = function (element) { return element.prev(".BPT-HTML-Attribute-Section"); }; DomTree.prototype.areAttributesEditable = function (element) { return this.isUnderEditableItem(element) && !/^#/.test(element.attr("data-tag")); }; DomTree.prototype.findNextEditableElement = function (element, onlyAttributes) { var newElement = this.findNextAttribute(element); if (!onlyAttributes && !newElement.length) { var emptyElement = newElement; newElement = element; var startElement = this.findOwnerItem(element).get(0); do { if (!newElement.hasClass("BPT-HTML-Text") && this.isUnderEditableItem(newElement)) { var textElement = this.findEmbeddedText(this.findOwnerItem(newElement)); if (textElement.length) { return textElement; } } newElement = HtmlTreeView.findNextElementDown(newElement.closest(".BPT-HtmlTreeItem")); if (newElement.length && newElement.get(0) === startElement) { return emptyElement; } if (!newElement.length) { newElement = HtmlTreeView.first; } } while(newElement.length && !this.areAttributesEditable(newElement)); } return newElement; }; DomTree.prototype.findPreviousEditableElement = function (element) { var newElement = this.findPreviousAttribute(element); if (!newElement.length) { var emptyElement = newElement; var owner = this.findOwnerItem(element); newElement = owner.attr("data-tag") === "#text" ? owner : element; var startElement = this.findOwnerItem(element).get(0); do { if (newElement.hasClass("BPT-HTML-Text")) { newElement = this.findOwnerItem(element); } else { newElement = HtmlTreeView.findNextElementUp(newElement.closest(".BPT-HtmlTreeItem")); if (newElement.length && newElement.get(0) === startElement) { return emptyElement; } if (newElement.length && this.isUnderEditableItem(newElement)) { var textElement = this.findEmbeddedText(newElement); if (textElement.length) { return textElement; } } } if (!newElement.length) { newElement = HtmlTreeView.last; } } while(newElement.length && !this.areAttributesEditable(newElement)); } return newElement; }; DomTree.prototype.findOwnerAttributeSection = function (element) { return element.closest(".BPT-HTML-Attribute-Section"); }; DomTree.prototype.findOwnerItem = function (element) { return element.closest(".BPT-HtmlTreeItem"); }; DomTree.prototype.findNameForAttribute = function (element) { return element.find(".BPT-HTML-Attribute"); }; DomTree.prototype.findValueForAttribute = function (element) { return element.find(".BPT-HTML-Value"); }; DomTree.prototype.moveEditor = function (element, mode) { var _this = this; window.setTimeout(function () { var item = _this.findOwnerItem(element); HtmlTreeView.select(item); var uid = item.attr("data-id"); if (element.hasClass("BPT-HTML-Attribute-Section")) { if (mode === 2 /* Value */) { _this.editAttributeValue(uid, element); } else if (mode === 3 /* Add */) { _this.editNewAttribute(uid, _this.findOwnerItem(element)); } else { _this.editAttributeName(uid, _this.findNameForAttribute(element)); } } else if (element.hasClass("BPT-HTML-Text")) { _this.editText(uid, element); } else { var tag = element.attr("data-tag"); if (tag === "#text") { _this.editText(uid, element.find(".BPT-HTML-Text")); } else if (mode === 1 /* Name */) { _this.editFirstAttribute(uid, element); } else { _this.editNewAttribute(uid, element); } } }, 0); }; DomTree.prototype.findWidthForTreeItem = function (element) { var item = element.closest(".BPT-HtmlTreeItem-Header"); var compStyle = window.getComputedStyle(item.get(0), null); var borderWidth = parseInt(compStyle.borderLeftWidth, 10) + parseInt(compStyle.borderRightWidth, 10); return item.width() - borderWidth; }; DomTree.prototype.refreshAfterAttributeChange = function (oldName, newName) { if (this._forceRefreshAttributes.indexOf(newName) >= 0 || this._forceRefreshAttributes.indexOf(oldName) >= 0) { this._domExplorer.refreshCSSView(newName === "style" || oldName === "style"); } else { if ((oldName && oldName.indexOf("on") === 0) || (newName && newName.indexOf("on") === 0)) { this._domExplorer.refreshEventsView(); } this._domExplorer.updateBreadcrumbs(true); } }; DomTree.prototype.shouldContinueEdit = function (htmlElementTarget) { var htmlElementTargetParent = htmlElementTarget.parentElement; if (((htmlElementTarget.className.indexOf("BPT-HorizontalPane-Left") > -1) && (htmlElementTarget.className.indexOf("BPT-HtmlTree-ScrollContainer") > -1)) || (htmlElementTargetParent && (htmlElementTargetParent.className.indexOf("BPT-HorizontalPane-Left") > -1) && (htmlElementTargetParent.className.indexOf("BPT-HtmlTree-ScrollContainer") > -1))) { return true; } return false; }; DomTree.prototype.renderChildren = function (children, totalCount, parentElement, onExpandComplete) { if (!children) { return; } var childGroup = this.createHtmlTreeItems(parentElement, children, false, totalCount); Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsTreeViewToggleEnd); if (onExpandComplete) { onExpandComplete(childGroup); } if (this._domExplorer.expandCallback) { this._domExplorer.expandCallback(parentElement.get(0), true); } }; return DomTree; })(); Dom.DomTree = DomTree; })(Dom || (Dom = {})); // styleChangeNotifier.ts var Dom; (function (Dom) { "use strict"; (function (StyleRuleChangeEvent) { StyleRuleChangeEvent[StyleRuleChangeEvent["Uid"] = 0] = "Uid"; StyleRuleChangeEvent[StyleRuleChangeEvent["Selector"] = 1] = "Selector"; StyleRuleChangeEvent[StyleRuleChangeEvent["AddProperty"] = 2] = "AddProperty"; StyleRuleChangeEvent[StyleRuleChangeEvent["AddRule"] = 3] = "AddRule"; StyleRuleChangeEvent[StyleRuleChangeEvent["Remove"] = 4] = "Remove"; StyleRuleChangeEvent[StyleRuleChangeEvent["Select"] = 5] = "Select"; StyleRuleChangeEvent[StyleRuleChangeEvent["Change"] = 6] = "Change"; StyleRuleChangeEvent[StyleRuleChangeEvent["FileLinkTooltip"] = 7] = "FileLinkTooltip"; })(Dom.StyleRuleChangeEvent || (Dom.StyleRuleChangeEvent = {})); var StyleRuleChangeEvent = Dom.StyleRuleChangeEvent; (function (StylePropertyChangeEvent) { StylePropertyChangeEvent[StylePropertyChangeEvent["Uid"] = 0] = "Uid"; StylePropertyChangeEvent[StylePropertyChangeEvent["Name"] = 1] = "Name"; StylePropertyChangeEvent[StylePropertyChangeEvent["Value"] = 2] = "Value"; StylePropertyChangeEvent[StylePropertyChangeEvent["IsWinning"] = 3] = "IsWinning"; StylePropertyChangeEvent[StylePropertyChangeEvent["IsEnabled"] = 4] = "IsEnabled"; StylePropertyChangeEvent[StylePropertyChangeEvent["IsApplied"] = 5] = "IsApplied"; StylePropertyChangeEvent[StylePropertyChangeEvent["Status"] = 6] = "Status"; StylePropertyChangeEvent[StylePropertyChangeEvent["ClearSubproperties"] = 7] = "ClearSubproperties"; StylePropertyChangeEvent[StylePropertyChangeEvent["AddSubproperty"] = 8] = "AddSubproperty"; StylePropertyChangeEvent[StylePropertyChangeEvent["Select"] = 9] = "Select"; StylePropertyChangeEvent[StylePropertyChangeEvent["Remove"] = 10] = "Remove"; StylePropertyChangeEvent[StylePropertyChangeEvent["Change"] = 11] = "Change"; })(Dom.StylePropertyChangeEvent || (Dom.StylePropertyChangeEvent = {})); var StylePropertyChangeEvent = Dom.StylePropertyChangeEvent; var StyleChangeNotifier = (function () { function StyleChangeNotifier(listeners) { this.listeners = listeners; } StyleChangeNotifier.prototype.notifyRuleChange = function (event, rule, arg) { this.listeners.forEach(function (listener) { listener.onRuleChange(event, rule, arg); }); }; StyleChangeNotifier.prototype.notifyPropertyChange = function (event, property, arg) { this.listeners.forEach(function (listener) { listener.onPropertyChange(event, property, arg); }); }; StyleChangeNotifier.CHANGE_BAR_ADD = "add"; StyleChangeNotifier.CHANGE_BAR_REMOVE = "remove"; StyleChangeNotifier.CHANGE_BAR_UPDATE = "update"; StyleChangeNotifier.CHANGE_BAR_NONE = ""; return StyleChangeNotifier; })(); Dom.StyleChangeNotifier = StyleChangeNotifier; })(Dom || (Dom = {})); // styleRule.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var StyleRule = (function (_super) { __extends(StyleRule, _super); function StyleRule(_model, listeners, _uid, wasCreatedInSession, isDeleted, _selectorText) { _super.call(this, listeners); this._model = _model; this._uid = _uid; this.wasCreatedInSession = wasCreatedInSession; this.isDeleted = isDeleted; this._selectorText = _selectorText; this.properties = []; if (!StyleRule.InheritedFromString) { StyleRule.InheritedFromString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("DOMExplorerInheritedFromText", [""]) : ""; } if (!StyleRule.AriaChangeStateRemoveString) { StyleRule.AriaChangeStateRemoveString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateRemove") : ""; } if (!StyleRule.AriaChangeStateAddString) { StyleRule.AriaChangeStateAddString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateAdd") : ""; } if (!StyleRule.AriaChangeStateUpdateString) { StyleRule.AriaChangeStateUpdateString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateUpdate") : ""; } this.updateChangeState(); } Object.defineProperty(StyleRule.prototype, "ariaLabel", { get: function () { var result = ""; result += this.ariaChangeStateString; if (this.isInherited) { result += StyleRule.InheritedFromString + " "; result += this.displayInheritedFrom + " : "; } if (this.parent) { result += this.parent + " : "; } if (this.selectorText) { result += this.selectorText + " "; } if (this.fileLinkText) { result += " : " + this.fileLinkText; } return result; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "isRule", { get: function () { return true; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "isProperty", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "isSubProperty", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "container", { get: function () { return null; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "uid", { get: function () { return this._uid; }, set: function (value) { if (value !== this._uid) { var oldUid = this._uid; this._model.remapRuleId(this, oldUid, value); this.notifyRuleChange(0 /* Uid */, this, value); this._uid = value; } }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "selectorText", { get: function () { return this._selectorText; }, set: function (value) { if (value !== this._selectorText) { this._selectorText = value; this.notifyRuleChange(1 /* Selector */, this, value); } }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "formatForCopy", { get: function () { var text = (!this.isInlined ? this._selectorText + " " : "") + "{\r\n"; if (this.parent) { text = "/*" + this.parent + "*/\r\n" + text; } for (var i = 0; i < this.properties.length; i++) { var property = this.properties[i]; if ((property.isEnabled || property.status !== 1 /* Valid */) && !property.isDeleted) { if (property.isShorthand && property.isEnabledIndeterminate) { property.properties.forEach(function (subproperty) { if (subproperty.isEnabled) { text += " " + subproperty.formatForCopy + "\r\n"; } }); } else { text += " " + property.formatForCopy + "\r\n"; } } } return text + "}\r\n"; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "isNew", { get: function () { return Dom.ElementStyleModel.isNew(this._uid); }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "isEditable", { get: function () { return !this.isInlined; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "isOriginal", { get: function () { return !this.isDeleted && (this.isInlined || this._selectorText === this.originalSelectorText); }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "displayInheritedFrom", { get: function () { return this.target.description; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "ariaChangeStateString", { get: function () { switch (this.changeState) { case Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE: return StyleRule.AriaChangeStateRemoveString; case Dom.StyleChangeNotifier.CHANGE_BAR_ADD: return StyleRule.AriaChangeStateAddString; case Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE: return StyleRule.AriaChangeStateUpdateString; } return ""; }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "changeState", { get: function () { return this._changeState; }, set: function (value) { if (this._changeState !== value) { this._changeState = value; this.notifyRuleChange(6 /* Change */, this, value); } }, enumerable: true, configurable: true }); Object.defineProperty(StyleRule.prototype, "extendedChangeState", { get: function () { return this._extendedChangeState; }, set: function (value) { if (this._extendedChangeState !== value) { this._extendedChangeState = value; this.notifyRuleChange(6 /* Change */, this, value); } }, enumerable: true, configurable: true }); StyleRule.prototype.setOriginal = function (selectorText) { this.originalSelectorText = selectorText; this.updateChangeState(); }; StyleRule.prototype.addProperty = function (remoteProperty, doNotify, before) { var _this = this; if (typeof doNotify === "undefined") { doNotify = false; } var property; if (remoteProperty) { property = new Dom.StyleProperty(this._model, this.listeners, remoteProperty.wasCreatedInSession, remoteProperty.current, remoteProperty.original, remoteProperty.originalLonghand, remoteProperty.isApplied, remoteProperty.isWinning, remoteProperty.isDeleted, remoteProperty.status, remoteProperty.uid, this); } else { property = new Dom.StyleProperty(this._model, this.listeners, true, { name: "", value: "", isImportant: false, isEnabled: true }, null, null, true, true, false, "Valid", Dom.ElementStyleModel.createNewId(), this); } this._model.remapPropertyId(property, null, property.uid); var position = this.getPositionForRule(before); this.properties.splice(position, 0, property); if (doNotify) { this.notifyRuleChange(2 /* AddProperty */, this, property); } if (remoteProperty) { remoteProperty.longhand.forEach(function (longhand) { var subProperty = new Dom.StyleProperty(_this._model, _this.listeners, false, longhand.current, null, null, longhand.isApplied, longhand.isWinning, false, longhand.status, longhand.uid, _this); property.addSubproperty(subProperty, doNotify); }); property.lookupLonghandOriginals(); } this.updateChangeState(); return property; }; StyleRule.prototype.recalculateWinning = function () { this.properties.forEach(function (property) { property.recalculateWinning(); }); }; StyleRule.prototype.remove = function () { this.recalculateWinning(); this._model.removeRule(this); this.notifyRuleChange(4 /* Remove */, this); }; StyleRule.prototype.removeProperty = function (property) { var properties = this.properties; property.clearSubproperties(); for (var i = 0; i < properties.length; i++) { if (properties[i] === property) { properties.splice(i, 1); this._model.removeProperty(property); this.updateChangeState(); return i; } } return -1; }; StyleRule.prototype.revert = function () { var _this = this; if (this.wasCreatedInSession) { return this.commitDelete(); } else { return new Plugin.Promise(function (completed, error) { _this._model.editRuleRevert(_this._uid, function (result) { if (result) { _this.removeNewProperties(); _this.updateFromRemote(result); completed(result); } else { error(); } }); }); } }; StyleRule.prototype.updateWinningProperty = function (propertyName, winningPropertyId) { this.properties.forEach(function (property) { property.updateWinning(propertyName, winningPropertyId); }); }; StyleRule.prototype.commitDelete = function () { var _this = this; return new Plugin.Promise(function (completed, error) { if (_this.isNew) { _this.remove(); completed(); } else { _this._model.editRuleDelete(_this._uid, function (remoteRule) { if (remoteRule) { _this.updateFromRemote(remoteRule); } else { _this.remove(); } completed(); }); } }); }; StyleRule.prototype.select = function () { this.notifyRuleChange(5 /* Select */, this); }; StyleRule.prototype.updateFromRemote = function (remoteRule) { this.uid = remoteRule.uid; this.isDeleted = remoteRule.isDeleted; if (!this.isInlined) { this.selectorText = remoteRule.selector; this.originalSelectorText = remoteRule.originalSelector; } for (var i = 0; i < this.properties.length; i++) { this.properties[i].updateFromRemote(remoteRule.properties[i]); } this.updateChangeState(); }; StyleRule.prototype.removeNewProperties = function () { var toRemove = []; this.properties.forEach(function (property) { if (property.wasCreatedInSession) { toRemove.push(property); } }); toRemove.forEach(function (property) { property.remove(false); }); }; StyleRule.prototype.commitSelector = function (selectorText) { var _this = this; return new Plugin.Promise(function (completed, error) { if (selectorText !== _this._selectorText) { var self = _this; if (_this.isNew) { _this._selectorText = selectorText; completed(); } else { _this._model.editRuleSelector(_this._uid, selectorText, function (remoteRule) { if (remoteRule) { self.updateFromRemote(remoteRule); completed(); } else { self.notifyRuleChange(1 /* Selector */, _this, _this._selectorText); error(); } }); } } else { completed(); } }); }; StyleRule.prototype.commitNewRule = function (property) { var _this = this; var position = this.getPositionForRule(this); return new Plugin.Promise(function (completed, error) { _this._model.addRule(_this._selectorText, property.name, property.value, property.isImportant, position, function (result) { if (result && result.properties.length) { _this.updateFromRemote(result); completed(); } else { error(); } }); }); }; StyleRule.prototype.addRemoteProperty = function (name, value, isImportant) { var _this = this; this._model.addProperty(this.uid, name, value, isImportant, null, function (result) { if (result) { var property = _this.addProperty(result, true); property.recalculateWinning(); } }); }; StyleRule.prototype.setExistingOrAddNewProperty = function (name, value, isImportant) { var property; for (var i = this.properties.length - 1; i >= 0; i--) { if (this.properties[i].name === name) { property = this.properties[i]; break; } } if (property) { property.commitValue(value + (isImportant ? " !important" : "")); } else { this.addRemoteProperty(name, value, isImportant); } }; StyleRule.prototype.updateChangeState = function () { if (this.isDeleted) { this.changeState = this.extendedChangeState = Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE; } else if (this.wasCreatedInSession) { this.changeState = this.extendedChangeState = Dom.StyleChangeNotifier.CHANGE_BAR_ADD; } else if (!this.isOriginal) { this.changeState = this.extendedChangeState = Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE; } else { this.changeState = this.extendedChangeState = Dom.StyleChangeNotifier.CHANGE_BAR_NONE; for (var i = 0; i < this.properties.length; i++) { var property = this.properties[i]; if (property.isApplied && property.changeState) { this.extendedChangeState = Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE; } } } }; StyleRule.prototype.getPositionForRule = function (selection) { var position = this.properties.length; if (selection) { for (var i = 0; i < this.properties.length; i++) { if (this.properties[i].uid === selection.uid) { position = i; break; } } } return position; }; return StyleRule; })(Dom.StyleChangeNotifier); Dom.StyleRule = StyleRule; })(Dom || (Dom = {})); // styleCache.ts var Dom; (function (Dom) { "use strict"; var StyleCache = (function () { function StyleCache(_remoteDom) { this._remoteDom = _remoteDom; } StyleCache.prototype.clearState = function () { this._cache = null; }; StyleCache.prototype.updateView = function (uid, updateTabCallback) { var _this = this; if (!this._cache) { Dom.ElementStyleModel.create(this._remoteDom, uid, function (result) { _this._cache = result; updateTabCallback(result); }); } else { updateTabCallback(this._cache); } }; StyleCache.prototype.applyChanges = function (changes) { if (this._cache) { this._cache.applyChanges(changes); } }; return StyleCache; })(); Dom.StyleCache = StyleCache; })(Dom || (Dom = {})); // app.ts var F12; (function (F12) { "use strict"; (function (DomExplorer) { var DomExplorerApp = (function () { function DomExplorerApp() { } DomExplorerApp.prototype.main = function () { var _this = this; Plugin.addEventListener("pluginready", function () { try { if (Plugin) { if (Plugin.Tooltip) { Plugin.Tooltip.defaultTooltipContentToHTML = false; } var traceWriter = new Common.TraceWriter(); if (Plugin.F12) { _this.bridge = new DomExplorer.IEBridge(Plugin.F12, window.external, traceWriter); } else if (Plugin.VS) { _this.bridge = new DomExplorer.VSBridge(Plugin.VS, traceWriter); } } var traceWriter = new Common.TraceWriter(); _this.domExplorer = new DomExplorer.DomExplorerWindow(_this.bridge, traceWriter); _this.domExplorer.initialize(); if (_this.onDomExplorerAppLoaded) { _this.onDomExplorerAppLoaded(); } } catch (ex) { diagnosticOutput("Exception in window.onload: " + ex.toString(), ex.stack); } }); }; return DomExplorerApp; })(); DomExplorer.DomExplorerApp = DomExplorerApp; DomExplorer.App = new DomExplorerApp(); })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // domExplorer.ts function diagnosticOutput(s, stackTrace) { "use strict"; try { var element = document.querySelector("#diagnostic-output"); if (!element) { element = document.createElement("div"); element.setAttribute("id", "diagnostic-output"); element.innerHTML = "Diagnostic:"; document.body.insertBefore(element, document.body.firstChild); element = document.querySelector("#diagnostic-output"); } if (element) { var br = document.createElement("br"); element.appendChild(br); var text = document.createTextNode(s); element.appendChild(text); } if (stackTrace) { var traceElement = document.querySelector("#diagnostic-trace"); if (!traceElement) { traceElement = document.createElement("div"); traceElement.setAttribute("id", "diagnostic-trace"); traceElement.innerHTML = "StackTrace:"; element.appendChild(traceElement); traceElement = document.querySelector("#diagnostic-trace"); } if (traceElement) { element.innerHTML += "
      " + stackTrace; } } } catch (ex) { } } var F12; (function (F12) { "use strict"; (function (DomExplorer) { var Assert = F12.Tools.Utility.Assert; (function (SearchDirection) { SearchDirection[SearchDirection["Next"] = 1] = "Next"; SearchDirection[SearchDirection["Previous"] = -1] = "Previous"; })(DomExplorer.SearchDirection || (DomExplorer.SearchDirection = {})); var SearchDirection = DomExplorer.SearchDirection; var DomExplorerWindow = (function () { function DomExplorerWindow(bridge, traceWriter) { var _this = this; this._activatedFocusToken = Number.NaN; this._initializationErrorMessage = null; this._currentElementHighlightUid = ""; this._temporaryElementHighlightUid = ""; this._lastKnownElementHighlightUid = ""; this._highlightIsShown = false; this._events = {}; this.maxInlineLength = 70; this.currentSelectedId = ""; this._bridge = bridge; this._remoteDom = new DomExplorer.RemoteDom(this._bridge); this._traceWriter = traceWriter; this.traceWriter.raiseEvent(501 /* Dom_Window_Create_Start */); this._state = "initializing"; this._throttle = new Common.MessageThrottle(); this.domTree = new Dom.DomTree(this, this._bridge, this._remoteDom); this._styleCache = new Dom.StyleCache(this._remoteDom); this.tabPanes = new Dom.TabPanes(this._bridge, this._remoteDom, this._styleCache, this); this._domExplorerModel = new DomExplorer.DomExplorerModel(); this._bridge.addEventListener("switchTab", function (e) { return _this.switchTab(e.tabIndex); }); } DomExplorerWindow.prototype.tcGetToolbar = function () { return this._toolbar; }; DomExplorerWindow.prototype.addEventListener = function (type, listener) { if (!this._events[type]) { this._events[type] = []; } this._events[type].push(listener); }; DomExplorerWindow.prototype.removeEventListener = function (type, listener) { var listeners = this._events[type]; if (listeners) { var i = listeners.indexOf(listener); listeners.splice(i, 1); } }; DomExplorerWindow.prototype.fireEventListener = function (type) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } var listeners = this._events[type]; if (listeners) { for (var i = 0, n = listeners.length; i < n; i++) { var listener = listeners[i]; listener(args); } } }; DomExplorerWindow.prototype.onDomExplorerBeforeMenuLoaded = function () { }; DomExplorerWindow.prototype.onDomExplorerMenuLoaded = function () { }; Object.defineProperty(DomExplorerWindow.prototype, "traceWriter", { get: function () { return this._traceWriter; }, enumerable: true, configurable: true }); Object.defineProperty(DomExplorerWindow.prototype, "documentMode", { get: function () { return this._domExplorerModel.currentDocMode; }, enumerable: true, configurable: true }); DomExplorerWindow.prototype.getPageUri = function () { return this._pageUri; }; Object.defineProperty(DomExplorerWindow.prototype, "state", { get: function () { return this._state; }, enumerable: true, configurable: true }); DomExplorerWindow.findAncestorByClass = function (element, className) { while (element) { if (element.classList.contains(className)) { return element; } element = element.parentElement; } return null; }; DomExplorerWindow.findAllAncestorsByClass = function (element, className) { var list = []; while (element) { if (element.classList.contains(className)) { list.push(element); } element = element.parentElement; } return list; }; DomExplorerWindow.findDescendentByClass = function (element, className) { return element ? element.querySelector("." + className) : null; }; DomExplorerWindow.findAllDescendentsByClass = function (element, className) { return element ? element.querySelectorAll("." + className) : null; }; DomExplorerWindow.detabify = function (text, spacesPerTab) { if (spacesPerTab === undefined) { spacesPerTab = 8; } var buffer = ""; var nonTabChars = 0; var originalCharCount = text.length; for (var i = 0; i < originalCharCount; i++) { var c = text.charAt(i); if (c === "\t") { buffer += Array(spacesPerTab - nonTabChars + 1).join(" "); } else { buffer += c; } nonTabChars = (c === "\n" || c === "\t") ? 0 : (nonTabChars + 1) % spacesPerTab; } return buffer; }; DomExplorerWindow.prototype.temporaryShowElementHighlight = function (uid) { if (!uid || !this._domExplorerModel.showLayoutIsEnabled) { return; } this._temporaryElementHighlightUid = uid === this._currentElementHighlightUid ? "" : uid; this.remoteHighlight(uid); }; DomExplorerWindow.prototype.remoteHighlight = function (uid) { if (this._lastKnownElementHighlightUid !== uid) { this._lastKnownElementHighlightUid = uid; this._remoteDom.hoverItem(uid); this._highlightIsShown = true; } }; DomExplorerWindow.prototype.showElementHighlight = function (uid) { if (!uid) { return; } this._currentElementHighlightUid = uid; this._temporaryElementHighlightUid = ""; if (this._domExplorerModel.showLayoutIsEnabled) { this.remoteHighlight(uid); } }; DomExplorerWindow.prototype.hideElementHighlight = function (forceHide) { if (typeof forceHide === "undefined") { forceHide = false; } this._temporaryElementHighlightUid = ""; this._lastKnownElementHighlightUid = ""; if (this._state === "ready") { if (this._highlightIsShown || forceHide) { this._remoteDom.hideHoverItem(); this._highlightIsShown = false; } } }; DomExplorerWindow.prototype.refreshElementHighlight = function () { if (this._currentElementHighlightUid && !this._temporaryElementHighlightUid) { this.restoreElementHighlight(); } }; DomExplorerWindow.prototype.restoreElementHighlight = function () { this._temporaryElementHighlightUid = ""; this._lastKnownElementHighlightUid = ""; if (this._state === "ready") { if (this._currentElementHighlightUid) { this.showElementHighlight(this._currentElementHighlightUid); } else { this.hideElementHighlight(); } } }; DomExplorerWindow.prototype.initialize = function () { var _this = this; this._initializationErrorMessage = ""; var loc = function (resourceId, params) { return Common.ToolWindowHelpers.loadString(resourceId, params); }; var logFn = function (x) { diagnosticOutput("Issue in DomExplorer.initialize with selector: " + x.selector); }; try { this._toolbar = new Common.Controls.ToolbarControl("Common.toolbarTemplateWithSearchBox"); this._toolbar.title = Plugin.Resources.getString("DomToolLabelText"); this._toolbar.model = this._domExplorerModel; this._toolbar.panelTemplateId = "DomExplorer.domExplorerButtonPanel"; document.getElementById("toolbar").appendChild(this._toolbar.rootElement); this._bridge.channel.addMessageProcessor("Throttle Messages", Common.MessageThrottle.splitMessage); this._bridge.channel.addMessageHandler("Combine Messages", this._throttle.combineMessages.bind(this._throttle)); this._bridge.channel.addMessageHandler("Refresh Tree", this.handleRefreshTree.bind(this)); this._bridge.addEventListener("attach", this.onAttach.bind(this)); this._bridge.addEventListener("detach", this.onDetach.bind(this)); this._bridge.addEventListener("break", this.onBreak.bind(this)); this._bridge.addEventListener("run", this.onRun.bind(this)); this._bridge.addEventListener("load", this.onLoad.bind(this)); this.onAttach(); Common.ToolWindowHelpers.registerErrorComponent("DomExplorerWindow", this.onError); Common.ToolWindowHelpers.initializeToolWindow(); this.initializeTabs(); this.initializeToolbarButtons(); this.initializeGlobalCommands(); this.initializeLayoutButtons(); this.initializeContextMenus(); $m("#attributeNodeLabel > div > span:first-child").text(loc("AttributeNodeLabel")); $m("#stylesTabButton").text(loc("StylesTabButtonText")).bind("mouseover", function (e) { return _this.showToolTip(loc("StylesTabButtonTooltip")); }); $m("#layoutTabButton").text(loc("LayoutTabButtonText")).bind("mouseover", function (e) { return _this.showToolTip(loc("LayoutTabButtonTooltip")); }); $m("#eventsTabButton").text(loc("EventsTabButtonText")).bind("mouseover", function (e) { return _this.showToolTip(loc("EventsTabButtonTooltip")); }); $m("#changesTabButton").text(loc("ChangesTabButtonText")).bind("mouseover", function (e) { return _this.showToolTip(loc("ChangesTabButtonTooltip")); }); $m("#searchbox").placeholder(loc("DOMExplorerFindBoxHinting")).bind("mouseover", function (e) { return _this.showToolTip(loc("DOMSearchBoxToolTip")); }); $m("#searchNextResult").bind("mouseover", function (e) { return _this.showToolTip(loc("DOMSearchNextButtonToolTip")); }); $m("#searchNextResult").attr("aria-label", loc("DOMSearchNextButtonToolTip")); $m("#searchPreviousResult").bind("mouseover", function (e) { return _this.showToolTip(loc("DOMSearchPreviousButtonToolTip")); }); $m("#searchPreviousResult").attr("aria-label", loc("DOMSearchPreviousButtonToolTip")); $m("#pseudoStatesPanel [data-name='hover']").bind("mouseover", function (e) { return _this.showToolTip(loc("PseudoClassHoverTooltip")); }); $m("#pseudoStatesPanel [data-name='visited']").bind("mouseover", function (e) { return _this.showToolTip(loc("PseudoClassVisitedTooltip")); }); $m("#pseudoHoverLabel").text(loc("PseudoClassHover")); $m("#pseudoVisitedLabel").text(loc("PseudoClassVisited")); $m("#winningStylesTabButton").text(loc("ComputedStylesTabButtonText")).bind("mouseover", function (e) { return _this.showToolTip(loc("ComputedStylesTabButtonTooltip")); }); $m("#winningStylesFilterTextBox").placeholder(loc("DOMExplorerComputedStylesFilterTextBoxPlaceholder")); $m("#winningStylesFilterTextBox").bind("mouseover", function (e) { return _this.showToolTip(loc("DOMExplorerComputedStylesFilterTextBoxPlaceholder")); }); $m("#winningStylesNoResultsMessage").text(loc("DOMExplorerComputedStylesNoResultsMessage")); $m("*.BPT-HorizontalPane-Right-Tab").hide(); $m("#breadcrumbRightArrow").hide(); $m("#breadcrumbLeftArrow").hide(); $m("#searchPreviousResult").attr("disabled", ""); $m("#searchNextResult").attr("disabled", ""); if (window["lastScriptError"]) { this.onError(window["lastScriptError"].message, window["lastScriptError"].file, window["lastScriptError"].line, window["lastScriptError"].additionalInfo); } this._bridge.addEventListener("activated", this.onActivated.bind(this)); this._bridge.addEventListener("deactivated", this.onDeactivated.bind(this)); if (Plugin.F12) { Plugin.F12.addEventListener("profilingstarted", function (e) { _this.onProfilingStateChange(true); }); Plugin.F12.addEventListener("profilingstopped", function (e) { _this.onProfilingStateChange(false); }); Common.NavigationUtilities.registerNavigationFrames([ Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body, function () { return _this._toolbar.getActiveElement(); }), Common.NavigationUtilities.makeNavigationFrameFromCallback(document.getElementById("paneRight"), function () { return _this.getActiveTabElement(); }) ]); Common.NavigationUtilities.registerFocusHandlers(Plugin.F12.PluginId.Dom); } if (Plugin.F12) { Plugin.F12.TraceWriter.markToolReady(); } this.traceWriter.raiseEvent(502 /* Dom_Window_Create_Stop */); } catch (ex) { diagnosticOutput("Exception during DomExplorer.initialize: " + ex.toString(), ex.stack); } }; DomExplorerWindow.prototype.showToolTip = function (text) { var tooltipConfig = { content: text }; Plugin.Tooltip.show(tooltipConfig); }; DomExplorerWindow.prototype.onAttach = function () { if (Plugin.F12 && Plugin.F12.Profiler.getIsProfiling()) { this.onProfilingStateChange(true); return; } this.traceWriter.raiseEvent(539 /* Dom_RemoteInjection_Start */); try { var engineId = this._bridge.engine.engineId; this._bridge.channel.loadScript(engineId, "../Common/messageThrottle.js"); this._bridge.channel.loadScript(engineId, "../Common/isDebugBuild.js"); this._bridge.channel.loadScript(engineId, "../Common/assert.js"); this._bridge.channel.loadScript(engineId, "../Common/encodingUtilities.js"); this._bridge.channel.loadScript(engineId, "../Common/remoteHelpers.js"); this._bridge.channel.loadScript(engineId, "../Common/remoteEditStack.js"); this._bridge.channel.loadScript(engineId, "DomExplorerRemote.js"); } catch (ex) { this.traceWriter.raiseEvent(540 /* Dom_RemoteInjection_Stop */); return; } this.traceWriter.raiseEvent(540 /* Dom_RemoteInjection_Stop */); }; DomExplorerWindow.prototype.onDetach = function () { this._domExplorerModel.currentDocMode = undefined; $m("#tree > :first-child > *").remove(); $m(".BPT-DataTree-Container").each(function (index, item) { DataTreeView.clear($m(item)); }); $m("#pane").hide(); this.tabPanes.onDetach(); $m("#layoutView[data-layoutProperty]").text(""); this._domExplorerModel.domExplorerIsReady = false; this._domExplorerModel.selectElementIsEnabled = false; this._state = "detached"; if (Plugin.F12) { this.colorPickerViewModel.isVisible = false; } }; DomExplorerWindow.prototype.onBreak = function () { this.stopSelectElementByClick(); this._domExplorerModel.domExplorerIsReady = false; }; DomExplorerWindow.prototype.onRun = function () { if (this._domExplorerModel.currentDocMode >= 9) { this._domExplorerModel.domExplorerIsReady = true; } }; DomExplorerWindow.prototype.onLoad = function (e) { var scriptElement = document.createElement("script"); scriptElement.src = e.url; scriptElement.type = "text/javascript"; document.getElementsByTagName("head").item(0).appendChild(scriptElement); }; DomExplorerWindow.prototype.handleRefreshTree = function (message) { var refreshTreeMessage = "RefreshTree:"; if (message.data.substr(0, refreshTreeMessage.length) === refreshTreeMessage) { var connectionInfo = JSON.parse(message.data.substring(refreshTreeMessage.length)); var docMode = parseFloat(connectionInfo.docMode); this._pageUri = connectionInfo.contextInfo; this.populateTree(docMode); if (Plugin.F12) { this.paletteViewModel.runColorCollection(); } Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsDomExplorerReady); message.handled = true; } }; DomExplorerWindow.prototype.onError = function (message, file, line, additionalInfo) { try { if (file) { var parts = file.split("/"); if (parts.length > 0) { file = parts[parts.length - 1]; } } var errorMessage = Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("DomExplorerScriptError")) + "
      " + Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("ScriptErrorMessage", [message])) + "
      " + Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("ScriptErrorFile", [file])) + "
      " + Common.EncodingUtilities.escapeHtml(Common.ToolWindowHelpers.loadString("ScriptErrorLine", [line])) + "\r\n" + additionalInfo; $m("#scriptErrorMessageText").html(errorMessage); $m("#scriptErrorSection").show(); if (typeof this._initializationErrorMessage === "string") { this._initializationErrorMessage += errorMessage; } } catch (ex) { } }; DomExplorerWindow.prototype.populateTree = function (docMode) { this._domExplorerModel.currentDocMode = docMode; var eventsTabButton = document.getElementById("eventsTabButton"); if (docMode < 9) { eventsTabButton.style.display = "none"; if (eventsTabButton.classList.contains("BPT-TabCycle-Item")) { eventsTabButton.classList.remove("BPT-TabCycle-Item"); } document.getElementById("eventsView").style.display = "none"; } else { eventsTabButton.style.display = ""; if (!eventsTabButton.classList.contains("BPT-TabCycle-Item")) { eventsTabButton.classList.add("BPT-TabCycle-Item"); } document.getElementById("eventsView").style.display = ""; } this.refreshTree(this.domExplorerLoaded.bind(this)); }; DomExplorerWindow.prototype.refreshElementForLowDocModes = function (selectedElement, selectParent, refreshAll) { var _this = this; if (typeof refreshAll === "undefined") { refreshAll = false; } if (this._domExplorerModel.currentDocMode < 9) { var targetParents = selectedElement.parents(DomExplorerWindow.ItemSelector).not(DomExplorerWindow.HiddenRootSelector); targetParents = targetParents.length > 0 ? targetParents : selectedElement; var targetParentChain = []; targetParents.each(function (i, e) { targetParentChain[(targetParents.length - 1) - i] = e.getAttribute("data-id"); }); var isTextNode = selectedElement.attr("data-tag") === "#text"; var parentUid = targetParentChain[targetParentChain.length - 1]; var toggleUid = isTextNode ? targetParentChain[targetParentChain.length - 2] : parentUid; if (refreshAll) { toggleUid = targetParentChain[0]; } var toggle = $m("[data-id=" + toggleUid + "]"); HtmlTreeView.toggle(toggle); selectParent = selectParent || isTextNode; HtmlTreeView.expandElementChains([targetParentChain], function () { var reselect = selectParent ? $m("[data-id=" + parentUid + "]") : $m("[data-id=" + selectedElement.attr("data-id") + "]"); if (reselect && reselect.length) { HtmlTreeView.select(reselect); } _this.refreshCSSView(); }); } }; DomExplorerWindow.prototype.refreshTree = function (complete) { var _this = this; this._state = "refreshing"; if (this._initializationErrorMessage) { $m("#scriptErrorMessageText").html(this._initializationErrorMessage); $m("#scriptErrorSection").show(); } else { $m("#scriptErrorMessagetext").html(""); $m("#scriptErrorSection").hide(); } this._initializationErrorMessage = null; var tree = $m("#tree"); $m("#tree > :first-child > *").remove(); tree.attr("tabindex", "1"); this.currentSelectedId = ""; this._currentElementHighlightUid = ""; this._temporaryElementHighlightUid = ""; this.hideElementHighlight(true); this._bridge.channel.clearCallbacks(); $m("*.BPT-HorizontalPane").show(); $m("*.BPT-Toolbar").show(); $m("#pane").show(); this.horizontalPane.refreshPaneWidth(); this._remoteDom.clearStyleCache(); $m(".BPT-DataTree-Container").each(function (index, item) { DataTreeView.clear($m(item)); }); this.tabPanes.clearState(); this.tabPanes.executeCleanup(); Dom.StyleModel.clearCollapsedRules(); $m("#layoutView[data-layoutProperty]").text(""); this._domExplorerModel.domExplorerIsReady = false; this._domExplorerModel.selectElementIsEnabled = false; this._domExplorerModel.domExplorerIsReady = true; var hostId = typeof Plugin["F12"] === "undefined" ? "vs" : "f12"; this._remoteDom.initializeHost(hostId); this._remoteDom.setKeyBindCallbacks(function () { _this.giveHostForeground(); }, function () { _this.startSelectElementByClick(); }, function () { _this.stopSelectElementByClick(); }, function () { _this.domTree.expandToRemoteSelectedElement(true); }); this._remoteDom.getRootElement().done(function (domObj) { if (domObj) { _this.createExpandableHtmlTree(tree, domObj, complete); } else { window.setTimeout(function () { return _this.refreshTree(complete); }, 1000); } }); if (this.tabPanes.activeTab) { $m("#" + this.tabPanes.activeTab).show(); } }; DomExplorerWindow.prototype.giveHostForeground = function () { var _this = this; this._remoteDom.allowProcessToTakeForeground().done(function () { return _this._bridge.takeForeground(); }); }; DomExplorerWindow.prototype.tcSearchNext = function (complete, error) { this.searchDomTree(1 /* Next */, complete, error); }; DomExplorerWindow.prototype.tcSearchPrevious = function (complete, error) { this.searchDomTree(-1 /* Previous */, complete, error); }; DomExplorerWindow.prototype.tcSetSearchText = function (text) { if (typeof text === "string") { var e = document.getElementById("searchbox"); if (e) { e.value = text; return true; } } return false; }; DomExplorerWindow.prototype.performUndo = function () { var _this = this; this.traceWriter.raiseEvent(505 /* Dom_UndoRedo_Start */); this._remoteDom.undoLastEdit().done(function () { return _this.traceWriter.raiseEvent(506 /* Dom_UndoRedo_Stop */); }); }; DomExplorerWindow.prototype.performNextEdit = function () { var _this = this; this.traceWriter.raiseEvent(505 /* Dom_UndoRedo_Start */); this._remoteDom.performNextEdit().done(function () { return _this.traceWriter.raiseEvent(506 /* Dom_UndoRedo_Stop */); }); }; DomExplorerWindow.prototype.setTestEditCallbacks = function (testEditCallback, testUndoCallback) { this._remoteDom.setTestEditCallbacks(testEditCallback, testUndoCallback); }; DomExplorerWindow.prototype.deleteElement = function (uid, selectedItem, callback) { var _this = this; this._remoteDom.deleteElement(uid).done(function (success) { _this.refreshElementForLowDocModes(selectedItem, true); _this.updateBreadcrumbs(); if (callback) { callback(success); } }); }; DomExplorerWindow.prototype.isEditableElement = function (tagName) { if (typeof tagName !== "string") { return false; } return ["html", "head", "body", "script", "#doctype"].indexOf(tagName.toLowerCase()) < 0; }; DomExplorerWindow.prototype.raiseTraceEvents = function (traceEvents) { if (this.traceWriter) { this.traceWriter.raiseEvent(traceEvents); } }; DomExplorerWindow.prototype.canDeleteItem = function (selectedItem) { var hasItemSelected = selectedItem != null && selectedItem.length > 0; var parentOfSelected = hasItemSelected ? selectedItem.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first() : null; var hasParent = parentOfSelected != null && parentOfSelected.length > 0; var isChildOfEditableItem = hasParent && this.domTree.isUnderEditableItem(selectedItem); var tagName = hasItemSelected ? selectedItem.attr("data-tag") : null; tagName = tagName || ""; var isTextNode = hasItemSelected && (tagName === "#text"); return hasItemSelected && (isTextNode || this.isEditableElement(tagName)) && isChildOfEditableItem; }; DomExplorerWindow.prototype.htmlContextMenu = function (selectedItem, x, y) { this._domTreeContextMenuController.showContextMenu(selectedItem, x, y); }; DomExplorerWindow.prototype.takeDownContextMenu = function () { this._domTreeContextMenuController.dismiss(); }; DomExplorerWindow.prototype.openDocumentLinkFromEvent = function (event) { if (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) { var query = $m(event.target); var element = query.get(0); this.openDocumentLinkFromElement(element); } }; DomExplorerWindow.prototype.openDocumentLinkFromElement = function (element) { if (!element) { return; } var url = element.getAttribute("data-linkUrl"); var line = element.getAttribute("data-linkLine"); var col = element.getAttribute("data-linkCol"); var lineNumber = 0; if (line) { lineNumber = parseInt(line, 10); } var colNumber = 0; if (col) { colNumber = parseInt(col, 10); } try { url = decodeURI(url); Plugin.Host.showDocument(url, lineNumber || 1, colNumber || 1); } catch (ex) { } }; DomExplorerWindow.prototype.startSelectElementByClick = function () { this._domExplorerModel.selectElementIsEnabled = true; }; DomExplorerWindow.prototype.stopSelectElementByClick = function () { this._domExplorerModel.selectElementIsEnabled = false; }; DomExplorerWindow.prototype.getAttributeCopyText = function (selectedItem) { if (selectedItem.length === 1) { var name = DataTreeView.getName(selectedItem).text(); var value = DataTreeView.getValue(selectedItem).text(); return name + "=\"" + value + "\""; } return ""; }; DomExplorerWindow.prototype.getEventCopyText = function (selectedItem) { var textToCopy = ""; if (selectedItem.length === 1) { textToCopy = DataTreeView.getName(selectedItem).text(); var children = DataTreeView.getChildren(selectedItem); if (children.length > 0) { textToCopy += "\r\n"; for (var i = 0; i < children.length; i++) { var childRow = $m(children.get(i)); textToCopy += DataTreeView.getName(childRow).text() + " " + DataTreeView.getValue(childRow).text() + "\r\n" + DomExplorerWindow.detabify(childRow.attr("title")) + (i < children.length - 2 ? "\r\n\r\n" : ""); } } else { textToCopy += " " + DataTreeView.getValue(selectedItem).text().replace(/\t+/g, "\t") + "\r\n" + DomExplorerWindow.detabify(selectedItem.attr("title")); } } return textToCopy; }; DomExplorerWindow.prototype.createExpandableHtmlTree = function (htmlTree, domObject, complete) { var _this = this; this._remoteDom.attachMediaQueryEvents(function (changes) { if (changes) { _this.tabPanes.applyRemoteStyleChanges(changes); } else { _this.refreshCSSView(); } }); this.domTree.initializeTreeModifiedEvent(); this.domTree.initializeAttributeModifiedEvent(); htmlTree.children().first().children().remove(); var root = HtmlTreeView.addRootElement(htmlTree, domObject.uid, domObject.tag, null, function (a, b, c, d) { return _this.domTree.expandCallback(a, b, c, d); }); var autoOpenCount = 0; var autoExpand = function (childGroup) { if (autoOpenCount === 0) { var html = childGroup.children(".BPT-HtmlTreeItem").matchAttr("data-tag", "html"); if (html.length === 0) { var rootUid = childGroup.parent().attr("data-id"); _this._remoteDom.attachDOMContentLoadedEvent(rootUid, function (elementInfo) { _this.onDOMContentLoaded(elementInfo); if (complete) { complete(); } }); } else { HtmlTreeView.toggle(html, autoExpand); autoOpenCount++; } } else if (autoOpenCount === 1) { var body = childGroup.children(".BPT-HtmlTreeItem").matchAttr("data-tag", "body"); if (body.length === 0) { var htmlUid = childGroup.parent().attr("data-id"); _this._remoteDom.attachDOMContentLoadedEvent(htmlUid, function (elementInfo) { _this.onDOMContentLoaded(elementInfo); if (complete) { complete(); } }); } else { if (body.hasClass("BPT-HtmlTreeItem-Collapsed")) { HtmlTreeView.toggle(body, function () { window.setTimeout(function () { htmlTree.closest(".BPT-HtmlTree-ScrollContainer").get(0).scrollTop = 0; }, 0); Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsDomExplorerRefreshEnd); if (complete) { complete(); } }); } else if (complete) { complete(); } } } else { if (complete) { complete(); } } }; if (root.hasClass("BPT-HtmlTreeItem-Collapsed")) { HtmlTreeView.toggle(root, autoExpand); } root.bind("mouseover", function (event) { var element = $m(event.target).closest(".BPT-HtmlTreeItem-Header"); if (element.length > 0) { var element = element.parent(); if (!element.hasClass("BPT-HtmlTreeItem-HiddenRoot")) { var uid = element.attr("data-id"); var tag = element.attr("data-tag"); var parentUid; if (tag === "#text" || tag === "") { var parentOfElement = element.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); if (parentOfElement.length) { parentUid = parentOfElement.attr("data-id"); } } _this.temporaryShowElementHighlight(parentUid || uid); } } return false; }); root.bind("mouseout", function (event) { var element = $m(event.toElement).closest(".BPT-HtmlTreeItem-Header"); if (element.length === 0) { if (_this._currentElementHighlightUid) { _this.showElementHighlight(_this._currentElementHighlightUid); } else { _this.hideElementHighlight(); } } return false; }); root = null; }; DomExplorerWindow.prototype.onDOMContentLoaded = function (elementInfo) { if (elementInfo && elementInfo.uid && elementInfo.children) { var element = $m("#tree").find(".BPT-HtmlTreeItem[data-id='" + elementInfo.uid + "']"); this.domTree.createHtmlTreeItems(element, elementInfo.children); this.updateBreadcrumbs(); } }; DomExplorerWindow.prototype.updateBreadcrumbs = function (skipLoad) { var selected = HtmlTreeView.getSelected($m("#tree")); if (selected.get(0) instanceof HTMLElement) { var element = selected.get(0); if (!this._breadcrumbsModel) { this._breadcrumbsModel = new Dom.BreadcrumbsModel(element); this.breadcrumbsView = new Dom.BreadcrumbsView(this, this._breadcrumbsModel, document, DomExplorerWindow.BreadcrumbsListId, DomExplorerWindow.BreadcrumbsTemplateId); } else { this._breadcrumbsModel.setSelectedElement(selected); } if (skipLoad) { this.breadcrumbsView.skipNextLoad(); } this.breadcrumbsView.updateView(); this.refreshElementHighlight(); } else { if (this._breadcrumbsModel) { this._breadcrumbsModel.clearSelection(); this.breadcrumbsView.updateView(); } } }; DomExplorerWindow.prototype.selectBreadcrumbNodeByTagName = function (tagName, nodeIndex) { this.breadcrumbsView.selectBreadcrumbNodeByTagName(tagName, nodeIndex); }; DomExplorerWindow.prototype.selectBreadcrumbNodeByClass = function (className, nodeIndex) { this.breadcrumbsView.selectBreadcrumbNodeByClass(className, nodeIndex); }; DomExplorerWindow.prototype.selectBreadcrumbNodeById = function (id, callback) { this.breadcrumbsView.selectBreadcrumbNodeById(id); }; DomExplorerWindow.prototype.showTooltipOnSelectedBreadcrumb = function () { this.breadcrumbsView.showTooltipOnBreadcrumb(true); }; DomExplorerWindow.prototype.registerExpandCallback = function (callback) { this.expandCallback = callback; }; DomExplorerWindow.prototype.refreshCSSView = function (isInlineStyleUpdate) { if (typeof isInlineStyleUpdate === "undefined") { isInlineStyleUpdate = false; } var isStylesActive = Dom.TabItem.isActive($m("#stylesTabButton")); var isWinningActive = Dom.TabItem.isActive($m("#winningStylesTabButton")); var isLayoutActive = Dom.TabItem.isActive($m("#layoutTabButton")); var selected = HtmlTreeView.getSelected($m("#tree")); var uid = selected.attr("data-id"); var tag = selected.attr("data-tag"); if (isWinningActive && !isInlineStyleUpdate) { var winningStyleView = this.tabPanes.getWinningStyleView(); if (selected.length > 0 && winningStyleView) { this.tabPanes.clearLayoutAndStylesState(); winningStyleView.updateView(); } else { this.tabPanes.clearState(); } } else if (isStylesActive && !isInlineStyleUpdate) { this.tabPanes.clearState(); if (selected.length > 0) { if (isStylesActive) { var doClearStyles = true; if (tag === "#text") { var parentOfSelected = selected.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); if (parentOfSelected.length) { this.tabPanes.showStyles(parentOfSelected.attr("data-id"), parentOfSelected.attr("data-tag")); doClearStyles = false; } } else { this.tabPanes.showStyles(uid, tag); doClearStyles = false; } if (doClearStyles) { this.tabPanes.showStyles(); } } } } else if (isLayoutActive) { this.tabPanes.showLayout(uid, tag); } this.updateBreadcrumbs(); }; DomExplorerWindow.prototype.refreshEventsView = function () { var isEventsActive = Dom.TabItem.isActive($m("#eventsTabButton")); if (!isEventsActive) { return; } var selected = HtmlTreeView.getSelected($m("#tree")); var uid = selected.attr("data-id"); var tag = selected.attr("data-tag"); this.tabPanes.clearState(); if (selected.length > 0) { this.tabPanes.showEvents(uid, tag); } else { this.tabPanes.showEvents(); } }; DomExplorerWindow.prototype.isColorProperty = function (propertyName) { switch (propertyName.toLowerCase()) { case "background-color": case "border-bottom-color": case "border-left-color": case "border-right-color": case "border-top-color": case "color": case "column-rule-color": case "layout-border-bottom-color": case "layout-border-left-color": case "layout-border-right-color": case "layout-border-top-color": case "outline-color": case "stop-color": case "flood-color": case "lighting-color": case "scrollbar-3dlight-color": case "scrollbar-arrow-color": case "scrollbar-base-color": case "scrollbar-darkshadow-color": case "scrollbar-face-color": case "scrollbar-highlight-color": case "scrollbar-shadow-color": case "scrollbar-track-color": return true; } return false; }; DomExplorerWindow.prototype.selectElementFromConsole = function (completed) { this._remoteDom.selectElementFromConsole().done(completed); }; DomExplorerWindow.hasDataTag = function (itemSet, dataTag) { if (!itemSet) { return false; } if (!dataTag) { return false; } for (var i = 0, end = itemSet.length; i < end; i++) { var node = itemSet.get(i); if (node && typeof node["getAttribute"] === "function" && node.getAttribute("data-tag").toLowerCase() === dataTag) { return true; } } return false; }; DomExplorerWindow.prototype.onActivated = function () { var _this = this; this.restoreElementHighlight(); if (this._activatedFocusToken) { window.clearTimeout(this._activatedFocusToken); this._activatedFocusToken = Number.NaN; } this._activatedFocusToken = window.setTimeout(function () { document.getElementById("tree").focus(); HtmlTreeView.focusSelected(true); _this._activatedFocusToken = Number.NaN; }, 0); }; DomExplorerWindow.prototype.onDeactivated = function () { if (this._activatedFocusToken) { window.clearTimeout(this._activatedFocusToken); this._activatedFocusToken = Number.NaN; } this._domExplorerModel.selectElementIsEnabled = false; this.hideElementHighlight(true); }; DomExplorerWindow.prototype.onProfilingStateChange = function (started) { if (started) { Plugin.F12.ErrorDisplay.show(Plugin.Resources.getString("DOMExplorerDisabledWhileProfiling")); this._bridge.fireDetachedEvent(); } else { Plugin.F12.ErrorDisplay.close(); this._bridge.fireAttachedEvent(); } }; DomExplorerWindow.prototype.initializeTabs = function () { var _this = this; HtmlTreeView.init($m("#tree"), function () { return _this.updateBreadcrumbs(); }, this.traceWriter); HtmlTreeViewDragDrop.init(this._bridge.channel, function () { return _this._bridge.engine; }, document, function () { return _this._domExplorerModel.currentDocMode >= 9; }, this.traceWriter); this.horizontalPane = new Dom.HorizontalPane($m("#pane")); this.tabPanes.setHorizontalPane(this.horizontalPane); Dom.TabItem.init($m("#stylesTabButton"), function () { var selected = HtmlTreeView.getSelected($m("#tree")); if (selected.length > 0) { var idTag = _this.selectNodeOrParent(selected.attr("data-id"), selected.attr("data-tag")); _this.tabPanes.showStyles(idTag.id, idTag.tag); } else { _this.tabPanes.showStyles(); } }); Dom.TabItem.init($m("#winningStylesTabButton"), function () { var selected = HtmlTreeView.getSelected($m("#tree")); if (selected.length > 0) { var idTag = _this.selectNodeOrParent(selected.attr("data-id"), selected.attr("data-tag")); _this.tabPanes.showWinningStyles(idTag.id, idTag.tag); } else { _this.tabPanes.showWinningStyles(); } }); Dom.TabItem.init($m("#layoutTabButton"), function () { var selected = HtmlTreeView.getSelected($m("#tree")); if (selected.length > 0) { _this.tabPanes.showLayout(selected.attr("data-id"), selected.attr("data-tag")); } else { _this.tabPanes.showLayout(); } }); Dom.TabItem.init($m("#eventsTabButton"), function () { var selected = HtmlTreeView.getSelected($m("#tree")); if (selected.length > 0) { _this.tabPanes.showEvents(selected.attr("data-id"), selected.attr("data-tag")); } else { _this.tabPanes.showEvents(); } }); Dom.TabItem.init($m("#changesTabButton"), function () { _this.tabPanes.showChanges(); }); }; DomExplorerWindow.prototype.selectNodeOrParent = function (id, tag) { var result = { id: id, tag: tag }; if (tag === "#text") { var selected = $m("div[data-id=" + id + "]"); var parentOfSelected = selected.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); if (parentOfSelected.length) { result.id = parentOfSelected.attr("data-id"); result.tag = parentOfSelected.attr("data-tag"); } } return result; }; DomExplorerWindow.prototype.searchDomTree = function (searchDirection, complete, error) { var _this = this; var searchterm = $m("#searchbox").val(); if (searchterm) { this.traceWriter.raiseEvent(537 /* Dom_Search_Start */); this._remoteDom.findTerm(this.currentSelectedId, searchterm, searchDirection).done(function (chain) { var found = chain.length !== 0; if (found) { $m("#searchBoxBorder").removeClass("BPT-SearchBox-NoResult"); $m("#searchPreviousResult").removeAttr("disabled"); $m("#searchNextResult").removeAttr("disabled"); _this.domTree.expandElementChain(chain); } else { $m("#searchBoxBorder").addClass("BPT-SearchBox-NoResult"); $m("#searchPreviousResult").attr("disabled", ""); $m("#searchNextResult").attr("disabled", ""); } if (complete) { complete(found); } _this.traceWriter.raiseEvent(538 /* Dom_Search_Stop */); }); } else if (error) { error("Invalid searchterm"); } }; DomExplorerWindow.prototype.initializeGlobalCommands = function () { var _this = this; if (Plugin.F12) { var onKeyDown = function (keyEvent) { var ctrlShiftKey = keyEvent.shiftKey && keyEvent.ctrlKey && !keyEvent.altKey; var shiftKey = keyEvent.shiftKey && !keyEvent.ctrlKey && !keyEvent.altKey; var ctrlKey = keyEvent.ctrlKey && !keyEvent.shiftKey && !keyEvent.altKey; var noKeys = !keyEvent.shiftKey && !keyEvent.ctrlKey && !keyEvent.altKey; if (keyEvent.keyCode === 66 /* B */ && ctrlKey) { _this._domExplorerModel.selectElementIsEnabled = !_this._domExplorerModel.selectElementIsEnabled; return false; } else if (keyEvent.keyCode === 73 /* I */ && ctrlShiftKey) { _this._domExplorerModel.showLayoutIsEnabled = !_this._domExplorerModel.showLayoutIsEnabled; return false; } else if (keyEvent.keyCode === 70 /* F */ && ctrlKey) { document.getElementById("searchbox").focus(); return false; } else if (keyEvent.keyCode === 75 /* K */ && ctrlKey) { _this.colorPickerViewModel.isVisible = true; return false; } else if (keyEvent.keyCode === 114 /* F3 */ && noKeys) { _this.searchDomTree(1 /* Next */); return false; } else if (keyEvent.keyCode === 116 /* F5 */ && noKeys && _this._domExplorerModel.currentDocMode < 9) { var selected = HtmlTreeView.getSelected($m("#tree")); _this.refreshElementForLowDocModes(selected, false, true); return false; } else if (keyEvent.keyCode === 114 /* F3 */ && shiftKey) { _this.searchDomTree(-1 /* Previous */); return false; } else if (keyEvent.keyCode === 90 /* Z */ && ctrlKey && !_this.isInTextControl()) { _this.performUndo(); return false; } else if (keyEvent.keyCode === 89 /* Y */ && ctrlKey && !_this.isInTextControl()) { _this.performNextEdit(); return false; } return true; }; document.addEventListener("keydown", function (e) { return onKeyDown(e); }); Plugin.F12.addEventListener("keydown", function (e) { return onKeyDown(e); }); this.colorPickerControl.onCustomKeyDown = function (e) { var ctrlKey = e.ctrlKey && !e.shiftKey && !e.altKey; if (e.keyCode === 75 /* K */ && ctrlKey) { _this.colorPickerViewModel.isVisible = false; return true; } return false; }; } else { this._findCommandBinding = Plugin.VS.Commands.bindCommand({ name: "find", onexecute: function () { document.getElementById("searchbox").focus(); } }); this._findNextCommandBinding = Plugin.VS.Commands.bindCommand({ name: "findnext", onexecute: function () { _this.searchDomTree(1 /* Next */); } }); this._findPrevCommandBinding = Plugin.VS.Commands.bindCommand({ name: "findprev", onexecute: function () { _this.searchDomTree(-1 /* Previous */); } }); this._redoCommandBinding = Plugin.VS.Commands.bindCommand({ name: "redo", onexecute: function () { if (!_this.isInTextControl()) { _this.performNextEdit(); } } }); this._refreshCommandBinding = Plugin.VS.Commands.bindCommand({ name: "refresh", onexecute: function () { if (_this._domExplorerModel.currentDocMode < 9) { var selected = HtmlTreeView.getSelected($m("#tree")); _this.refreshElementForLowDocModes(selected, false, true); } } }); this._selectElementCommandBinding = Plugin.VS.Commands.bindCommand({ name: "selectelement", onexecute: function () { _this._domExplorerModel.selectElementIsEnabled = !_this._domExplorerModel.selectElementIsEnabled; } }); this._showLayoutCommandBinding = Plugin.VS.Commands.bindCommand({ name: "showlayout", onexecute: function () { _this._domExplorerModel.showLayoutIsEnabled = !_this._domExplorerModel.showLayoutIsEnabled; } }); this._undoCommandBinding = Plugin.VS.Commands.bindCommand({ name: "undo", onexecute: function () { if (!_this.isInTextControl()) { _this.performUndo(); } } }); } }; DomExplorerWindow.prototype.initializeToolbarButtons = function () { var _this = this; this._domExplorerModel.selectElementIsEnabledChanged.addHandler(function (newSelectValue) { if (newSelectValue) { _this._bridge.allowRemoteToTakeForeground().done(function () { _this._remoteDom.takeForeground().done(function (result) { if (!result) { _this._remoteDom.getHWND().done(function (hwnd) { _this._bridge.setForeground(hwnd.toString()).done(); }); } }); }); _this._remoteDom.selectElementByClick(function () { _this._domExplorerModel.selectElementIsEnabled = false; _this.giveHostForeground(); _this.domTree.expandToRemoteSelectedElement(); _this.focusToTree(); }); } else { _this._remoteDom.cancelSelectElementByClick(); } }); this._domExplorerModel.showLayoutIsEnabledChanged.addHandler(function (newSelectValue) { if (newSelectValue) { _this.restoreElementHighlight(); } else { _this.hideElementHighlight(); } }); if (Plugin.F12) { this.paletteViewModel = new DomExplorer.PaletteViewModel(this._remoteDom); this.colorPickerViewModel = new DomExplorer.ColorPickerViewModel(this._bridge, this.paletteViewModel); var colorPickerHost = new Common.TemplateControl("DomExplorer.colorPickerHost"); colorPickerHost.model = this.colorPickerViewModel; this.colorPickerControl = colorPickerHost.getNamedControl("colorPicker"); document.getElementById("toolbar").appendChild(this.colorPickerControl.rootElement); this.colorPickerViewModel.dockElement = this._toolbar.getNamedElement("colorPickerButton"); } else { this._toolbar.getNamedControl("colorPickerButton").isVisible = false; } this._toolbar.addClickHandlerToButton("refreshButton", function (event) { var selected = HtmlTreeView.getSelected($m("#tree")); var element = selected.length > 0 ? selected : $m("[data-tag=\"html\"]"); _this.refreshElementForLowDocModes(element, false, true); return false; }); this._domTreeContextMenuController = new Dom.DomTreeContextMenuController(this, this._remoteDom, "tree"); this._findBoxContextMenu = new Dom.TextControlMenuController(document.getElementById("searchbox")); $m("#searchbox").bind("keydown", function (event) { var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; var noKeys = !event.shiftKey && !event.ctrlKey && !event.altKey; if (event.keyCode === 13 /* Enter */ && noKeys) { _this.searchDomTree(1 /* Next */); return false; } return true; }); document.getElementById("searchbox").addEventListener("input", function (event) { $m("#searchBoxBorder").removeClass("BPT-SearchBox-NoResult"); $m("#searchPreviousResult").attr("disabled", ""); $m("#searchNextResult").attr("disabled", ""); }); $m("#searchbox").bind("click keydown", function (event) { $m("#searchbox").focus(); return true; }); $m("#searchNextResult").bind("click keydown", function (event) { if (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) { _this.searchDomTree(1 /* Next */); return false; } return true; }); $m("#searchPreviousResult").bind("click keydown", function (event) { var keyEvent = event; if (event.type === "click" || keyEvent.keyCode === 13 /* Enter */ || keyEvent.keyCode === 32 /* Space */) { _this.searchDomTree(-1 /* Previous */); return false; } return true; }); if (Plugin.F12) { document.getElementById("tabStartMarker").setAttribute("tabindex", "-1"); document.getElementById("tabEndMarker").setAttribute("tabindex", "-1"); } else { $m("#tabStartMarker,#tabEndMarker").bind("focus", function (event) { var tabstops = $m("[tabindex='1']"); if (tabstops.length > 2) { var validStops = []; for (var i = 1; i < tabstops.length - 1; i++) { var element = tabstops.get(i); var inactiveTab = $m(element).closest(".BPT-Tab-Inactive"); if (!inactiveTab.length) { validStops.push(element); } } var selectElement = event.target.id === "tabStartMarker" ? validStops[validStops.length - 1] : validStops[0]; selectElement.focus(); } }); } }; DomExplorerWindow.prototype.isInTextControl = function () { return ((document.activeElement instanceof HTMLTextAreaElement) || (document.activeElement instanceof HTMLInputElement && document.activeElement.type.toLowerCase() === "text")); }; DomExplorerWindow.prototype.editLayoutValue = function (uid, propertyName, newValue) { if (propertyName === "offsetLeft") { propertyName = "left"; } else if (propertyName === "offsetTop") { propertyName = "top"; } else if (propertyName === "clientWidth") { propertyName = "width"; } else if (propertyName === "clientHeight") { propertyName = "height"; } this._styleCache.updateView(uid, function (styles) { styles.setInlineProperty(propertyName, newValue, false); }); }; DomExplorerWindow.prototype.initializeLayoutButtons = function () { var _this = this; var layoutView = $m("#layoutView"); var layoutEditContainer = document.getElementById("Layout-EditContainer"); var editElement = layoutEditContainer.firstElementChild; var valueEditHandler = function (event) { if (document.activeElement && document.activeElement["type"] !== "text") { if (event.type === "click" || (event.type === "keydown" && (event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */) && !event.ctrlKey && !event.shiftKey && !event.altKey)) { var valueContext = event.target; var uid = layoutView.attr("data-uid"); var tagName = layoutView.attr("data-tag"); var prop = valueContext.getAttribute("data-layoutProperty"); if (uid && tagName) { var contextRect = valueContext.getBoundingClientRect(); var viewRect = layoutView.get(0).getBoundingClientRect(); var offsetRect = document.getElementById("layout-offset-layer").getBoundingClientRect(); var style = window.getComputedStyle(valueContext); var height = style.transform === "none" ? contextRect.height : contextRect.width; var width = 60; var top = contextRect.top + contextRect.height / 2 - height / 2 - viewRect.top; var left = offsetRect.left - viewRect.left - viewRect.left; if (prop === "height" || valueContext.classList.contains("BPT-Layout-Left")) { left += contextRect.left; } else if (prop === "width" || valueContext.classList.contains("BPT-Layout-Right")) { left += contextRect.right - width; } else { left += contextRect.left + contextRect.width / 2 - width / 2; } layoutEditContainer.style.left = left + "px"; layoutEditContainer.style.top = top + "px"; layoutEditContainer.style.display = "block"; editElement.textContent = valueContext.textContent; var contextColor = valueContext.style.color; valueContext.style.color = "transparent"; var valueEditor = new Dom.ValueEditor(document, _this, _this._bridge, window); valueEditor.enableCommitOnChange(); valueEditor.enableNumericChanges(); _this._remoteDom.enableEditChaining(); valueEditor.show(editElement, width, function (newValue, oldValue) { return new Plugin.Promise(function (completed) { if (newValue) { if (/^\d*(\.\d+)?$/.test(newValue)) { newValue += "px"; } _this.editLayoutValue(uid, prop, newValue); } completed(true); }); }).done(function (completion) { _this._remoteDom.disableEditChaining(); layoutEditContainer.style.display = "none"; valueContext.style.color = contextColor; if (!completion.wasCancelled) { valueContext.textContent = completion.newValue; _this.tabPanes.showLayout(uid, tagName); } }); } return false; } } }; layoutView.find("[data-layoutProperty]").bind("click keydown", valueEditHandler); }; DomExplorerWindow.prototype.addElements = function (parentUid, beforeUid, htmlText, callback) { var _this = this; this._remoteDom.addElement(parentUid, beforeUid, htmlText).done(function (success) { if (success) { var selected = HtmlTreeView.getSelected($m("#tree")); _this.refreshElementForLowDocModes(selected, false); _this.updateBreadcrumbs(); if (callback) { callback(success); } } }); }; DomExplorerWindow.prototype.replaceElements = function (parentUid, htmlText) { var _this = this; this._remoteDom.replaceElement(parentUid, htmlText).done(function (success) { if (success) { var selected = HtmlTreeView.getSelected($m("#tree")); _this.refreshElementForLowDocModes(selected, false); _this.updateBreadcrumbs(); } }); }; DomExplorerWindow.prototype.isPasteAsChildCapableElement = function (tagNameLowerCase) { return ["html", "script", "noscript", "style", "#doctype", "#comment", "iframe", "frame", "#text"].indexOf(tagNameLowerCase) < 0; }; DomExplorerWindow.prototype.canPasteAsChild = function (selectedItem) { var hasItemSelected = selectedItem != null && selectedItem.length > 0; var dataTag = hasItemSelected ? selectedItem.attr("data-tag") : null; dataTag = dataTag || ""; var tagName = dataTag.toLowerCase(); var canPasteAsChildOfSelected = hasItemSelected && !!tagName && this.isPasteAsChildCapableElement(tagName); var clipboardText = clipboardData.getData("Text"); var parentOfSelected = selectedItem ? selectedItem.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first() : null; var hasParent = parentOfSelected != null && parentOfSelected.length > 0; var isChildOfEditableItem = hasParent && this.domTree.isUnderEditableItem(selectedItem); var canPaste = hasItemSelected && isChildOfEditableItem && canPasteAsChildOfSelected && clipboardText !== ""; return canPaste; }; DomExplorerWindow.prototype.doCut = function (item) { var _this = this; Assert.isTrue(item != null, "doCut item parameter cannot be null/undefined"); Assert.areEqual(item.length, 1, "doCut item parameter must have one-and-only-one node"); Assert.isTrue(item.hasClass("BPT-HtmlTreeItem"), "doCut item parameter must be a BPT-HtmlTreeItem"); Assert.areEqual(item.parents(".BPT-HtmlTree-Container").length, 1, "doCut item parameter must reside in the #tree"); this.raiseTraceEvents(515 /* Dom_CutElement_Start */); this.copyOuterHtmlToClipboard(item); var uid = item.attr("data-id"); var postOpCallback = function (success) { _this.focusToTree(); _this.raiseTraceEvents(516 /* Dom_CutElement_Stop */); }; this.deleteElement(uid, item, postOpCallback); }; DomExplorerWindow.prototype.getContextMenuTarget = function (e, isDataTree) { var treeItem, offset; var treeClass = (isDataTree ? ".BPT-DataTreeItem" : ".BPT-HtmlTreeItem"); var selectedItem = null; var x = e instanceof MouseEvent ? e.clientX : 0; var y = e instanceof MouseEvent ? e.clientY : 0; if (x <= 0 || x <= 0) { if (e.eventPhase === e.BUBBLING_PHASE && e.srcElement) { treeItem = $m(e.srcElement).closest(treeClass).not(treeClass + "-HiddenRoot").first(); } else { treeItem = $m(e.currentTarget).find(treeClass + "-Selected").first(); } if (treeItem.length > 0) { selectedItem = treeItem; offset = treeItem.get(0).getBoundingClientRect(); x = offset.left; y = offset.top; } } else { selectedItem = $m(document.elementFromPoint(x, y)).closest(treeClass); selectedItem = (selectedItem.length > 0 ? selectedItem : null); } if (selectedItem !== null && selectedItem.length > 0) { selectedItem.trigger("click"); } return { target: selectedItem, x: x, y: y }; }; DomExplorerWindow.prototype.initializeContextMenus = function () { var _this = this; $m("#tree").bind("keydown", function (event) { var wasHandled = false; var htmlTree = $m("#tree"); var element = $m(event.target); if (element.hasClass("BPT-HtmlTree-ChildCollection-ShowAll")) { return; } if (_this.isInTextControl()) { return true; } if (!Common.ToolWindowHelpers.hasSelectedText()) { var selectedElement = HtmlTreeView.getSelected(htmlTree); if (selectedElement.length > 0) { var uid = selectedElement.attr("data-id"); var canDelete = _this.canDeleteItem(selectedElement); var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; var ctrlKey = event.ctrlKey && !event.shiftKey && !event.altKey; var noKeys = !event.shiftKey && !event.ctrlKey && !event.altKey; if (canDelete && event.keyCode === 88 /* X */ && ctrlKey) { wasHandled = true; _this.doCut(selectedElement); } else if (event.keyCode === 67 /* C */ && ctrlKey) { wasHandled = true; var element = selectedElement; var dataTag = element.attr("data-tag") || ""; if (dataTag === "#text") { element = element.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first(); if (element && element.length) { _this.copyOuterHtmlToClipboard(element); } } else { _this.copyOuterHtmlToClipboard(element); } } else if (canDelete && event.keyCode === 46 /* Delete */ && noKeys) { wasHandled = true; var focusToTreeCallback = function (success) { _this.focusToTree(); }; _this.deleteElement(uid, selectedElement, focusToTreeCallback); } else if (event.keyCode === 86 /* V */ && ctrlKey) { wasHandled = true; if (_this.canPasteAsChild(selectedElement)) { _this.pasteClipboardToHtml(selectedElement, null); } } } } return !wasHandled; }); $m(document).bind("copy", function (e) { Common.ToolWindowHelpers.copySelectedTextToClipboard(); e.stopImmediatePropagation(); return false; }, true); }; DomExplorerWindow.prototype.copyOuterHtmlToClipboard = function (selectedElement) { var uid = selectedElement.attr("data-id"); this._remoteDom.getHTMLString(uid, false).done(function (textToCopy) { if (textToCopy) { clipboardData.setData("Text", textToCopy); } }); }; DomExplorerWindow.prototype.pasteClipboardToHtml = function (parentElement, beforeChild) { var _this = this; this.raiseTraceEvents(517 /* Dom_PasteElement_Start */); var text = clipboardData.getData("Text"); if (text) { var parentUid = parentElement.attr("data-id"); var beforeChildUid = beforeChild && beforeChild.length > 0 ? beforeChild.attr("data-id") : null; this.addElements(parentUid, beforeChildUid, text, function (success) { if (!HtmlTreeView.isExpandable(parentElement)) { HtmlTreeView.changeExpandableState(parentElement, true); } if (HtmlTreeView.isCollapsed(parentElement)) { HtmlTreeView.toggle(parentElement); } _this.raiseTraceEvents(518 /* Dom_PasteElement_Stop */); }); } else { this.raiseTraceEvents(518 /* Dom_PasteElement_Stop */); } }; DomExplorerWindow.prototype.focusToTree = function () { HtmlTreeView.focusSelected(); }; DomExplorerWindow.prototype.domExplorerLoaded = function () { if (Plugin.F12 && Plugin.F12.getInspectElementId) { var inspectElementId = Plugin.F12.getInspectElementId(); if (inspectElementId) { this._remoteDom.inspectElementById(inspectElementId); } } this._state = "ready"; this.fireEventListener("domExplorerLoaded"); }; DomExplorerWindow.prototype.switchTab = function (tabIndex) { switch (tabIndex) { case 0: $m("#stylesTabButton").click(); break; case 1: $m("#winningStylesTabButton").click(); break; case 2: $m("#layoutTabButton").click(); break; case 3: $m("#eventsTabButton").click(); break; case 4: $m("#changesTabButton").click(); break; } }; DomExplorerWindow.prototype.getActiveTabElement = function () { var tabList = ["stylesTabButton", "winningStylesTabButton", "layoutTabButton", "eventsTabButton", "changesTabButton"]; var activeTab; for (var i = 0; i < tabList.length; i++) { activeTab = document.getElementById(tabList[i]); if (Dom.TabItem.isActive($m(activeTab))) { break; } } return activeTab; }; DomExplorerWindow.BreadcrumbsListId = "BreadcrumbsView"; DomExplorerWindow.BreadcrumbsTemplateId = "breadcrumbsTemplate"; DomExplorerWindow.HiddenRootSelector = ".BPT-HtmlTreeItem-HiddenRoot"; DomExplorerWindow.ItemSelector = ".BPT-HtmlTreeItem"; return DomExplorerWindow; })(); DomExplorer.DomExplorerWindow = DomExplorerWindow; function gleamChange(node) { var n = node && node.get && node.get(0); if (!n) { return; } if (n["gleamToken"]) { window.clearTimeout(n["gleamToken"]); delete n["gleamToken"]; } else { node.addClass("BPT-HTML-Attribute-Changed"); } n["gleamToken"] = window.setTimeout(function () { node.removeClass("BPT-HTML-Attribute-Changed"); delete n["gleamToken"]; }, 1000); } DomExplorer.gleamChange = gleamChange; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // menus.ts var Dom; (function (Dom) { "use strict"; var MenuTextControlItems; (function (MenuTextControlItems) { MenuTextControlItems[MenuTextControlItems["MenuTreeCut"] = 0] = "MenuTreeCut"; MenuTextControlItems[MenuTextControlItems["MenuTreeCopy"] = 1] = "MenuTreeCopy"; MenuTextControlItems[MenuTextControlItems["MenuTreePaste"] = 2] = "MenuTreePaste"; })(MenuTextControlItems || (MenuTextControlItems = {})); var TextControlMenuController = (function () { function TextControlMenuController(_textArea) { this._textArea = _textArea; this._menuId = "TextControlContextMenu" + TextControlMenuController.MenuUid++; this._menuItems = [ { id: "menuTextControlCut", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CutMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlX") }, { id: "menuTextControlCopy", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlC") }, { id: "menuTextControlPaste", type: 1 /* command */, label: Plugin.Resources.getString("/Common/PasteMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlV") } ]; this.initialize(); } TextControlMenuController.prototype.initialize = function () { var _this = this; this._contextMenuListener = function (e) { return _this.onContextMenu(e); }; this._keydownListener = function (e) { return _this.onKeydown(e); }; this._textArea.addEventListener("contextmenu", this._contextMenuListener); this._textArea.addEventListener("keydown", this._keydownListener); }; TextControlMenuController.prototype.uninitialize = function () { this._textArea.removeEventListener("contextmenu", this._contextMenuListener); this._textArea.removeEventListener("keydown", this._keydownListener); }; TextControlMenuController.prototype.onKeydown = function (event) { var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; if (event.keyCode === 121 /* F10 */ && shiftKey) { this._textArea = event.target; var offset = this._textArea.getBoundingClientRect(); this.showContextMenu(this._textArea, offset.left, offset.top); event.preventDefault(); event.stopImmediatePropagation(); } return true; }; TextControlMenuController.prototype.onContextMenu = function (e) { this.showContextMenu(e.target, e.clientX, e.clientY); e.preventDefault(); e.stopImmediatePropagation(); return false; }; TextControlMenuController.prototype.onMenuItemClicked = function (menuId, itemId, selectedText, pasteText) { if (menuId === this._menuId) { var uid; var textToCopy; switch (itemId) { case this._menuItems[0 /* MenuTreeCut */].id: clipboardData.setData("text", selectedText); this.replaceText(""); break; case this._menuItems[1 /* MenuTreeCopy */].id: clipboardData.setData("text", selectedText); break; case this._menuItems[2 /* MenuTreePaste */].id: this.replaceText(pasteText); break; } this.dismiss(); } }; TextControlMenuController.prototype.replaceText = function (newText) { var range = this._textArea.createTextRange(); var useundo = range.queryCommandSupported("ms-beginundounit"); if (useundo) { range.execCommand("ms-beginundounit"); } range.moveStart("character", this._start); range.moveEnd("character", this._end - this._textArea.value.length); range.text = newText; if (useundo) { range.execCommand("ms-endundounit"); } }; TextControlMenuController.prototype.showContextMenu = function (textArea, x, y) { var _this = this; this.dismiss(); if (x <= 0 || y <= 0) { var offset = textArea.getBoundingClientRect(); x = offset.left; y = offset.top; } if (!textArea || (textArea.tagName !== "TEXTAREA" && (textArea.tagName !== "INPUT" || !textArea.hasAttribute("type") || textArea.getAttribute("type") !== "text"))) { return true; } this._start = textArea.selectionStart; this._end = textArea.selectionEnd; var selectedText = textArea.value.substring(this._start, this._end); var pasteText = clipboardData.getData("text"); this._canCut = (selectedText !== ""); this._canCopy = (selectedText !== ""); this._canPaste = !!pasteText; if (!this._contextMenu) { this._menuItems[0 /* MenuTreeCut */].disabled = function () { return !_this._canCut; }; this._menuItems[1 /* MenuTreeCopy */].disabled = function () { return !_this._canCopy; }; this._menuItems[2 /* MenuTreePaste */].disabled = function () { return !_this._canPaste; }; this._contextMenu = Plugin.ContextMenu.create(this._menuItems, this._menuId, null, null, function (menuId, menuItem) { return _this.onMenuItemClicked(menuId, menuItem.id, selectedText, pasteText); }); this._dismissHandler = function (e) { _this.dismiss(); }; } if (textArea) { this._contextMenu.attach(textArea); } this._contextMenu.addEventListener("dismiss", this._dismissHandler); this._contextMenu.show(parseInt(x.toFixed(0)), parseInt(y.toFixed(0))); Common.ToolWindowHelpers.contextMenuUp(true); return false; }; TextControlMenuController.prototype.dismiss = function () { if (this._contextMenu) { this._contextMenu.removeEventListener("dismiss", this._dismissHandler); this._contextMenu.dismiss(); this._contextMenu.dispose(); this._contextMenu = null; } Common.ToolWindowHelpers.contextMenuUp(false); }; TextControlMenuController.MenuUid = 0; return TextControlMenuController; })(); Dom.TextControlMenuController = TextControlMenuController; var MenuHtmlTreeItems; (function (MenuHtmlTreeItems) { MenuHtmlTreeItems[MenuHtmlTreeItems["MenuTreeAddAttribute"] = 0] = "MenuTreeAddAttribute"; MenuHtmlTreeItems[MenuHtmlTreeItems["MenuTreeDelete"] = 1] = "MenuTreeDelete"; MenuHtmlTreeItems[MenuHtmlTreeItems["MenuTreeEditAsHtml"] = 3] = "MenuTreeEditAsHtml"; MenuHtmlTreeItems[MenuHtmlTreeItems["MenuTreeCut"] = 4] = "MenuTreeCut"; MenuHtmlTreeItems[MenuHtmlTreeItems["MenuTreeCopy"] = 5] = "MenuTreeCopy"; MenuHtmlTreeItems[MenuHtmlTreeItems["MenuTreePasteAsChild"] = 6] = "MenuTreePasteAsChild"; MenuHtmlTreeItems[MenuHtmlTreeItems["MenuTreePasteBefore"] = 7] = "MenuTreePasteBefore"; MenuHtmlTreeItems[MenuHtmlTreeItems["MenuTreeCopyElementWithStyles"] = 8] = "MenuTreeCopyElementWithStyles"; })(MenuHtmlTreeItems || (MenuHtmlTreeItems = {})); var DomTreeContextMenuController = (function () { function DomTreeContextMenuController(_domExplorer, _remoteDom, _htmlID) { this._domExplorer = _domExplorer; this._remoteDom = _remoteDom; this._htmlID = _htmlID; this._menuId = "DomExplorerMenuTreeView"; this._menuItems = [ { id: "menuTreeAddAttribute", type: 1 /* command */, label: Plugin.Resources.getString("/Common/AddAttributeMenuText") }, { id: "menuTreeDelete", type: 1 /* command */, label: Plugin.Resources.getString("/Common/DeleteElement"), accessKey: Plugin.Resources.getString("AccessKeyDel") }, { id: "separator", type: 3 /* separator */ }, { id: "menuTreeEditAsHtml", type: 1 /* command */, label: Plugin.Resources.getString("/Common/EditAsHtmlMenuText") }, { id: "menuTreeCut", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CutMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlX") }, { id: "menuTreeCopy", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlC") }, { id: "menuTreePasteAsChild", type: 1 /* command */, label: Plugin.Resources.getString("/Common/PasteAsChildMenuText"), accessKey: Plugin.Resources.getString("AccessKeyCtrlV") }, { id: "menuTreePasteBefore", type: 1 /* command */, label: Plugin.Resources.getString("/Common/PasteBeforeMenuText") }, { id: "menuTreeCopyElementWithStyles", type: 1 /* command */, label: Plugin.Resources.getString("/Common/CopyElementWithStylesMenuText") } ]; this.initialize(); } DomTreeContextMenuController.prototype.initialize = function () { var _this = this; this._contextMenuListener = document.getElementById(this._htmlID); this._contextMenuListener.addEventListener("contextmenu", function (e) { return _this.onContextMenu(e); }); this._contextMenuListener.addEventListener("keydown", function (e) { return _this.onKeydown(e); }); }; DomTreeContextMenuController.prototype.onKeydown = function (event) { this._domExplorer.onDomExplorerBeforeMenuLoaded(); var shiftKey = event.shiftKey && !event.ctrlKey && !event.altKey; if (event.keyCode === 121 /* F10 */ && shiftKey) { var targetInfo = this._domExplorer.getContextMenuTarget(event, false); this._selectedItem = targetInfo.target; this.showContextMenu(this._selectedItem, targetInfo.x, targetInfo.y); event.preventDefault(); event.stopPropagation(); } this._domExplorer.onDomExplorerMenuLoaded(); return true; }; DomTreeContextMenuController.prototype.onContextMenu = function (e) { this._domExplorer.onDomExplorerBeforeMenuLoaded(); var element = $m(e.target); if (element.hasClass("BPT-HtmlTree-ChildCollection-ShowAll")) { return; } var targetInfo = this._domExplorer.getContextMenuTarget(e, false); this._selectedItem = targetInfo.target; this.showContextMenu(this._selectedItem, targetInfo.x, targetInfo.y); e.preventDefault(); e.stopPropagation(); this._domExplorer.onDomExplorerMenuLoaded(); return false; }; DomTreeContextMenuController.prototype.onMenuItemClicked = function (menuId, itemId, selectedItem) { var _this = this; if (menuId === this._menuId) { var uid; var textToCopy; var focusToTreeCallback = function (success) { _this._domExplorer.focusToTree(); }; switch (itemId) { case this._menuItems[0 /* MenuTreeAddAttribute */].id: uid = selectedItem.attr("data-id"); this._domExplorer.domTree.editNewAttribute(uid, selectedItem); break; case this._menuItems[1 /* MenuTreeDelete */].id: uid = selectedItem.attr("data-id"); this._domExplorer.deleteElement(uid, selectedItem, focusToTreeCallback); break; case this._menuItems[4 /* MenuTreeCut */].id: this._domExplorer.doCut(selectedItem); break; case this._menuItems[5 /* MenuTreeCopy */].id: if (Common.ToolWindowHelpers.hasSelectedText()) { Common.ToolWindowHelpers.copySelectedTextToClipboard(); } else if (this._isTextNode) { this._domExplorer.copyOuterHtmlToClipboard(this._parentOfSelected); } else { this._domExplorer.copyOuterHtmlToClipboard(selectedItem); } this._domExplorer.focusToTree(); break; case this._menuItems[3 /* MenuTreeEditAsHtml */].id: uid = selectedItem.attr("data-id"); this._domExplorer.domTree.editAsHtml(uid, selectedItem, this._domExplorer.horizontalPane.leftWidth * .80); this._domExplorer.focusToTree(); break; case this._menuItems[6 /* MenuTreePasteAsChild */].id: this._domExplorer.pasteClipboardToHtml(selectedItem, null); this._domExplorer.focusToTree(); break; case this._menuItems[7 /* MenuTreePasteBefore */].id: this._domExplorer.pasteClipboardToHtml(this._parentOfSelected, selectedItem); this._domExplorer.focusToTree(); break; case this._menuItems[8 /* MenuTreeCopyElementWithStyles */].id: uid = selectedItem.attr("data-id"); this.copySelectedElementWithStyles(uid); break; default: this._domExplorer.focusToTree(); break; } this.dismiss(); } else { this._domExplorer.focusToTree(); } }; DomTreeContextMenuController.prototype.dismiss = function () { if (this._contextMenu) { this._contextMenu.removeEventListener("dismiss", this._dismissHandler); this._contextMenu.dismiss(); this._contextMenu.dispose(); this._contextMenu = null; } Common.ToolWindowHelpers.contextMenuUp(false); }; DomTreeContextMenuController.prototype.copySelectedElementWithStyles = function (uid) { this._remoteDom.copyElementWithStyle(uid).done(function (copy) { if (copy) { clipboardData.setData("Text", copy); } }); }; DomTreeContextMenuController.prototype.showContextMenu = function (selectedItem, x, y) { var _this = this; this.dismiss(); this._selectedItem = selectedItem; var hasItemSelected = this._selectedItem != null && this._selectedItem.length > 0; var dataTag = hasItemSelected ? this._selectedItem.attr("data-tag") : null; dataTag = dataTag || ""; var tagName = dataTag.toLowerCase(); this._isTextNode = tagName === "#text"; var isComment = tagName === "#comment"; var isDocType = tagName === "#doctype"; var isScriptNode = tagName === "script"; var isStyleNode = tagName === "style"; var isWithinBody = tagName === "body" || (hasItemSelected && F12.DomExplorer.DomExplorerWindow.hasDataTag(this._selectedItem.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot"), "body")); var hasSelectedText = Common.ToolWindowHelpers.hasSelectedText(); var clipboardText = clipboardData.getData("Text"); this._parentOfSelected = hasItemSelected ? this._selectedItem.parents(".BPT-HtmlTreeItem").not(".BPT-HtmlTreeItem-HiddenRoot").first() : null; var hasParent = this._parentOfSelected != null && this._parentOfSelected.length > 0; var isChildOfEditableItem = hasParent && this._domExplorer.domTree.isUnderEditableItem(this._selectedItem); this._canAddAttribute = hasItemSelected && !this._isTextNode && !isComment && !isDocType && !isScriptNode && !isStyleNode; this._canDelete = this._domExplorer.canDeleteItem(this._selectedItem); this._canEditAsHtml = this._canDelete; this._canCut = this._canDelete; this._canCopy = Common.ToolWindowHelpers.hasSelectedText() || hasItemSelected; this._canCopyWithStyles = hasItemSelected && !this._isTextNode && !isComment && isWithinBody; this._canPaste = hasItemSelected && isChildOfEditableItem && clipboardText !== "" && this._domExplorer.canPasteAsChild(this._selectedItem); this._canPasteBefore = hasItemSelected && isChildOfEditableItem && clipboardText !== "" && (this._isTextNode || this._domExplorer.isEditableElement(tagName)) && !isDocType; if (!this._contextMenu) { this._menuItems[0 /* MenuTreeAddAttribute */].disabled = function () { return !_this._canAddAttribute; }; this._menuItems[1 /* MenuTreeDelete */].disabled = function () { return !_this._canDelete; }; this._menuItems[3 /* MenuTreeEditAsHtml */].disabled = function () { return !_this._canEditAsHtml; }; this._menuItems[4 /* MenuTreeCut */].disabled = function () { return !_this._canCut; }; this._menuItems[5 /* MenuTreeCopy */].disabled = function () { return !_this._canCopy; }; this._menuItems[6 /* MenuTreePasteAsChild */].disabled = function () { return !_this._canPaste; }; this._menuItems[7 /* MenuTreePasteBefore */].disabled = function () { return !_this._canPasteBefore; }; this._menuItems[8 /* MenuTreeCopyElementWithStyles */].disabled = function () { return !_this._canCopyWithStyles; }; this._contextMenu = Plugin.ContextMenu.create(this._menuItems, this._menuId, null, null, function (menuId, menuItem) { return _this.onMenuItemClicked(menuId, menuItem.id, _this._selectedItem); }); this._dismissHandler = function (e) { _this.dismiss(); }; } if (hasItemSelected) { this._contextMenu.attach(this._selectedItem.get(0)); } this._contextMenu.addEventListener("dismiss", this._dismissHandler); this._contextMenu.show(parseInt(x.toFixed(0)), parseInt(y.toFixed(0))); Common.ToolWindowHelpers.contextMenuUp(true); }; return DomTreeContextMenuController; })(); Dom.DomTreeContextMenuController = DomTreeContextMenuController; })(Dom || (Dom = {})); // colorPickerTestContract.ts var Dom; (function (Dom) { "use strict"; var ColorPickerTestContract = (function () { function ColorPickerTestContract(domView, styleView, bridge) { this._toolbarInstance = { viewModel: domView.colorPickerViewModel, control: domView.colorPickerControl }; this._stylesPaneInstance = { viewModel: styleView.colorPickerViewModel, control: styleView.colorPickerControl }; this._styleView = styleView; this._bridge = bridge; this._shownInstance = null; } ColorPickerTestContract.prototype.showToolbarColorPicker = function () { var _this = this; return new Plugin.Promise(function (completed) { F12.Tools.Utility.Assert.isNull(_this._shownInstance); _this._toolbarInstance.viewModel.isVisible = true; _this._shownInstance = _this._toolbarInstance; completed(); }); }; ColorPickerTestContract.prototype.showStylesPaneColorPicker = function (colorPropertyIndex) { var _this = this; return new Plugin.Promise(function (completed) { F12.Tools.Utility.Assert.isNull(_this._shownInstance); var colorSquare = (_this._styleView.htmlElementSource.querySelectorAll(ColorPickerTestContract.COLOR_SQUARE_SELECTOR)[colorPropertyIndex]); F12.Tools.Utility.Assert.hasValue(colorSquare); colorSquare.click(); F12.Tools.Utility.Assert.isTrue(_this._stylesPaneInstance.viewModel.isVisible); _this._shownInstance = _this._stylesPaneInstance; completed(); }); }; ColorPickerTestContract.prototype.hideColorPicker = function () { var _this = this; return new Plugin.Promise(function (completed) { _this._shownInstance.viewModel.isVisible = false; _this._shownInstance = null; completed(); }); }; ColorPickerTestContract.prototype.isToolbarColorPickerShown = function () { return this._toolbarInstance.viewModel.isVisible; }; ColorPickerTestContract.prototype.isStylesPaneColorPickerShown = function () { return this._stylesPaneInstance.viewModel.isVisible; }; ColorPickerTestContract.prototype.getColor = function () { return this._shownInstance.viewModel.color; }; ColorPickerTestContract.prototype.setColor = function (color) { var _this = this; return new Plugin.Promise(function (completed) { _this._shownInstance.viewModel.color = color; completed(); }); }; ColorPickerTestContract.prototype.getHue = function () { return this.getSlidersControl().hue; }; ColorPickerTestContract.prototype.getSaturation = function () { return this.getSlidersControl().saturation; }; ColorPickerTestContract.prototype.getLightness = function () { return this.getSlidersControl().lightness; }; ColorPickerTestContract.prototype.getAlpha = function () { return this.getSlidersControl().alpha; }; ColorPickerTestContract.prototype.setHue = function (value) { var _this = this; return new Plugin.Promise(function (completed) { _this.getSlidersControl().hue = value; completed(); }); }; ColorPickerTestContract.prototype.setSaturation = function (value) { var _this = this; return new Plugin.Promise(function (completed) { _this.getSlidersControl().saturation = value; completed(); }); }; ColorPickerTestContract.prototype.setLightness = function (value) { var _this = this; return new Plugin.Promise(function (completed) { _this.getSlidersControl().lightness = value; completed(); }); }; ColorPickerTestContract.prototype.setAlpha = function (value) { var _this = this; return new Plugin.Promise(function (completed) { _this.getSlidersControl().alpha = value; completed(); }); }; ColorPickerTestContract.prototype.getPalette = function () { var _this = this; return new Plugin.Promise(function (completed) { var palette = _this.getPaletteViewModel(); if (!palette.isLoading) { var colors = palette.colors.filter(function () { return true; }); completed(colors); return; } var registration = palette.propertyChanged.addHandler(function (propertyName) { if (propertyName === F12.DomExplorer.PaletteViewModel.IsLoadingPropertyName) { F12.Tools.Utility.Assert.isFalse(palette.isLoading); var colors = palette.colors.filter(function () { return true; }); registration.unregister(); completed(colors); } }); }); }; ColorPickerTestContract.prototype.setColorFromPalette = function (index) { var _this = this; return new Plugin.Promise(function (completed) { var palette = _this.getPaletteViewModel(); if (!palette.isLoading) { _this.getRibbonControl().selectedIndex = index; completed(); return; } var registration = palette.propertyChanged.addHandler(function (propertyName) { if (propertyName === F12.DomExplorer.PaletteViewModel.IsLoadingPropertyName) { F12.Tools.Utility.Assert.isFalse(palette.isLoading); _this.getRibbonControl().selectedIndex = index; registration.unregister(); completed(); } }); }); }; ColorPickerTestContract.prototype.startEyedropper = function () { var _this = this; return new Plugin.Promise(function (completed) { _this._shownInstance.viewModel.isEyedropperActive = true; completed(); }); }; ColorPickerTestContract.prototype.stopEyedropper = function (select, x, y) { var _this = this; return new Plugin.Promise(function (completed) { _this._bridge.clickEyedropper(select, x, y); completed(); }); }; ColorPickerTestContract.prototype.getPaletteViewModel = function () { return this._shownInstance.viewModel.palette; }; ColorPickerTestContract.prototype.getRibbonControl = function () { return this._shownInstance.control.getNamedControl(Common.Controls.ColorPickerControl.PALETTE_NAME); }; ColorPickerTestContract.prototype.getSlidersControl = function () { return this._shownInstance.control.getNamedControl(Common.Controls.ColorPickerControl.SLIDERS_CONTROL_NAME); }; ColorPickerTestContract.COLOR_SQUARE_SELECTOR = "." + Dom.StyleView.CssProperty + " > ." + Dom.StyleView.CssPropertyColor + ":not(." + Dom.StyleView.CssPropertyColorHidden + ")"; return ColorPickerTestContract; })(); Dom.ColorPickerTestContract = ColorPickerTestContract; })(Dom || (Dom = {})); // DomExplorer.templates.ts var ControlTemplates; (function (ControlTemplates) { var DomExplorer = (function () { function DomExplorer() { } DomExplorer.domExplorerButtonPanel = "\
      \
      \
      \
      \
      \
      \ "; DomExplorer.colorPickerHost = "\
      \
      \
      \ "; return DomExplorer; })(); ControlTemplates.DomExplorer = DomExplorer; })(ControlTemplates || (ControlTemplates = {})); // converters.ts var F12; (function (F12) { "use strict"; (function (DomExplorer) { var Converters = (function () { function Converters() { } Converters.initialize = function () { Converters.ToRefreshButtonEnabled = Converters.isDocModeLessThanMinimum(Converters.ADVANCED_FEATURES_DOCMODE_MINIMUM); Converters.ToShowLayoutButtonTooltip = Converters.boolToEnabledDisabledTooltip("ToDisableShowLayoutButtonTooltipWithShortcut", "ToEnableShowLayoutButtonTooltipWithShortcut"); }; Converters.boolToEnabledDisabledTooltip = function (enabledResourceKey, disabledResourceKey) { return { convertTo: function (from) { return Plugin.Resources.getString(from ? enabledResourceKey : disabledResourceKey); }, convertFrom: null }; }; Converters.isDocModeLessThanMinimum = function (minimumDocMode) { return { convertTo: function (docMode) { if (docMode) { return docMode < minimumDocMode; } else { return false; } }, convertFrom: null }; }; Converters.ADVANCED_FEATURES_DOCMODE_MINIMUM = 9; return Converters; })(); DomExplorer.Converters = Converters; Converters.initialize(); })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // domExplorerModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (DomExplorer) { var DomExplorerModel = (function (_super) { __extends(DomExplorerModel, _super); function DomExplorerModel() { _super.call(this); this.showLayoutIsEnabledChanged = new Common.EventSource(); this.selectElementIsEnabledChanged = new Common.EventSource(); } DomExplorerModel.initialize = function () { Common.ObservableHelpers.defineProperty(DomExplorerModel, "domExplorerIsReady", false); Common.ObservableHelpers.defineProperty(DomExplorerModel, "showLayoutIsEnabled", false, function (obj, oldValue, newValue) { return obj.showLayoutIsEnabledChanged.invoke(newValue); }); Common.ObservableHelpers.defineProperty(DomExplorerModel, "selectElementIsEnabled", false, function (obj, oldValue, newValue) { return obj.selectElementIsEnabledChanged.invoke(newValue); }); Common.ObservableHelpers.defineProperty(DomExplorerModel, "currentDocMode", undefined); }; return DomExplorerModel; })(Common.Observable); DomExplorer.DomExplorerModel = DomExplorerModel; DomExplorerModel.initialize(); })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // remoteDom.ts var F12; (function (F12) { "use strict"; (function (DomExplorer) { var RemoteDom = (function () { function RemoteDom(bridge) { this._channel = bridge.channel; this._engine = bridge.engine; } RemoteDom.prototype.abortPaletteCollection = function () { return this.call("abortPaletteCollection", []); }; RemoteDom.prototype.addElement = function (parentUid, beforeUid, htmlText) { return this.call("addElement", [parentUid, beforeUid, htmlText]); }; RemoteDom.prototype.addAttrModifiedEvent = function (uid) { return this.call("addAttrModifiedEvent", [uid]); }; RemoteDom.prototype.addTreeModifiedEvent = function (uid) { return this.call("addTreeModifiedEvent", [uid]); }; RemoteDom.prototype.allowProcessToTakeForeground = function () { return this.call("allowProcessToTakeForeground", []); }; RemoteDom.prototype.attachDOMContentLoadedEvent = function (uid, eventCallback) { return this.call("attachDOMContentLoadedEvent", [uid, eventCallback]); }; RemoteDom.prototype.attachMediaQueryEvents = function (changeCallback) { return this.call("attachMediaQueryEvents", [changeCallback]); }; RemoteDom.prototype.cancelSelectElementByClick = function () { return this.call("cancelSelectElementByClick", []); }; RemoteDom.prototype.clearCurrentEventProxy = function () { return this.call("clearCurrentEventProxy", []); }; RemoteDom.prototype.clearStyleCache = function () { return this.call("clearStyleCache", []); }; RemoteDom.prototype.collectEvents = function (uid, retreivedCallback, addedCallback, removedCallback) { return this.call("collectEvents", [uid, retreivedCallback, addedCallback, removedCallback]); }; RemoteDom.prototype.copyElementWithStyle = function (uid) { return this.call("copyElementWithStyle", [uid]); }; RemoteDom.prototype.deleteElement = function (uid) { return this.call("deleteElement", [uid]); }; RemoteDom.prototype.disableEditChaining = function () { return this.call("disableEditChaining", []); }; RemoteDom.prototype.editAttribute = function (uid, name, value) { return this.call("editAttribute", [uid, name, value]); }; RemoteDom.prototype.editStylePropertyAdd = function (ruleId, name, value, isImportant, beforePropertyId) { return this.call("editStylePropertyAdd", [ruleId, name, value, isImportant, beforePropertyId]); }; RemoteDom.prototype.editStylePropertyEnable = function (propertyId, isEnabled) { return this.call("editStylePropertyEnable", [propertyId, isEnabled]); }; RemoteDom.prototype.editStylePropertyName = function (propertyId, name) { return this.call("editStylePropertyName", [propertyId, name]); }; RemoteDom.prototype.editStylePropertyValue = function (propertyId, value, isImportant) { return this.call("editStylePropertyValue", [propertyId, value, isImportant]); }; RemoteDom.prototype.editStyleRuleAdd = function (selector, name, value, isImportant, position) { return this.call("editStyleRuleAdd", [selector, name, value, isImportant, position]); }; RemoteDom.prototype.editStyleRuleRemove = function (ruleId) { return this.call("editStyleRuleRemove", [ruleId]); }; RemoteDom.prototype.editStyleRuleSelector = function (ruleId, selector) { return this.call("editStyleRuleSelector", [ruleId, selector]); }; RemoteDom.prototype.editText = function (uid, newText) { return this.call("editText", [uid, newText]); }; RemoteDom.prototype.enableEditChaining = function () { return this.call("enableEditChaining", []); }; RemoteDom.prototype.endSingleEdit = function () { return this.call("endSingleEdit", []); }; RemoteDom.prototype.findTerm = function (uid, searchTerm, searchDirection) { return this.call("findTerm", [uid, searchTerm, searchDirection]); }; RemoteDom.prototype.getChangedStyles = function (uid) { return this.call("getChangedStyles", [uid]); }; RemoteDom.prototype.getChildren = function (uid, showAll, callback) { return this.call("getChildren", [uid, showAll, callback]); }; RemoteDom.prototype.getComputedBox = function (uid) { return this.call("getComputedBox", [uid]); }; RemoteDom.prototype.getComputedStyles = function (uid) { return this.call("getComputedStyles", [uid]); }; RemoteDom.prototype.getCssClassesUsedInCurrentDocument = function (uid) { return this.call("getCssClassesUsedInCurrentDocument", [uid]); }; RemoteDom.prototype.getHTMLString = function (uid, isInnerHtml) { return this.call("getHTMLString", [uid, isInnerHtml]); }; RemoteDom.prototype.getHWND = function () { return this.call("getHWND", []); }; RemoteDom.prototype.getParentChainForSelectedElement = function () { return this.call("getParentChainForSelectedElement", []); }; RemoteDom.prototype.getParentChainForStyle = function (uid) { return this.call("getParentChainForStyle", [uid]); }; RemoteDom.prototype.getPseudoStyling = function (uid, state) { return this.call("getPseudoStyling", [uid, state]); }; RemoteDom.prototype.getRootElement = function () { return this.call("getRootElement", []); }; RemoteDom.prototype.getStyles = function (uid) { return this.call("getStyles", [uid]); }; RemoteDom.prototype.getWinningProperty = function (name) { return this.call("getWinningProperty", [name]); }; RemoteDom.prototype.hideHoverItem = function () { return this.call("hideHoverItem", []); }; RemoteDom.prototype.hoverItem = function (uid) { return this.call("hoverItem", [uid]); }; RemoteDom.prototype.initializeHost = function (hostId) { return this.call("initializeHost", [hostId]); }; RemoteDom.prototype.inspectElementById = function (uid) { return this.call("inspectElementById", [uid]); }; RemoteDom.prototype.performNextEdit = function () { return this.call("performNextEdit", []); }; RemoteDom.prototype.removeAttribute = function (uid, name) { return this.call("removeAttribute", [uid, name]); }; RemoteDom.prototype.removeChildMappings = function (uid) { return this.call("removeChildMappings", [uid]); }; RemoteDom.prototype.removeStyleProperty = function (propertyId) { return this.call("removeStyleProperty", [propertyId]); }; RemoteDom.prototype.replaceElement = function (parentUid, htmlText) { return this.call("replaceElement", [parentUid, htmlText]); }; RemoteDom.prototype.revertProperty = function (propertyId) { return this.call("revertProperty", [propertyId]); }; RemoteDom.prototype.revertRule = function (ruleId) { return this.call("revertRule", [ruleId]); }; RemoteDom.prototype.runPaletteCollection = function (callback) { return this.call("runPaletteCollection", [callback]); }; RemoteDom.prototype.selectElementByClick = function (callback) { return this.call("selectElementByClick", [callback]); }; RemoteDom.prototype.selectElementFromConsole = function () { return this.call("selectElementFromConsole", []); }; RemoteDom.prototype.setKeyBindCallbacks = function (giveHostForegroundCallback, startSelectElementByClickCallback, stopSelectElementByClickCallback, expandToRemoteSelectedElementCallback) { return this.call("setKeyBindCallbacks", [giveHostForegroundCallback, startSelectElementByClickCallback, stopSelectElementByClickCallback, expandToRemoteSelectedElementCallback]); }; RemoteDom.prototype.setPseudoStyling = function (uid, state, isForcedOn) { return this.call("setPseudoStyling", [uid, state, isForcedOn]); }; RemoteDom.prototype.setTestEditCallbacks = function (editWorkedCallback, testUndoCallback) { return this.call("setTestEditCallbacks", [editWorkedCallback, testUndoCallback]); }; RemoteDom.prototype.setupAttributeModifiedEvent = function (callback) { return this.call("setupAttributeModifiedEvent", [callback]); }; RemoteDom.prototype.setupTreeModifiedEvent = function (callback) { return this.call("setupTreeModifiedEvent", [callback]); }; RemoteDom.prototype.startSingleEdit = function () { return this.call("startSingleEdit", []); }; RemoteDom.prototype.storeElementForConsole = function (uid) { return this.call("storeElementForConsole", [uid]); }; RemoteDom.prototype.takeForeground = function () { return this.call("takeForeground", []); }; RemoteDom.prototype.undoLastEdit = function () { return this.call("undoLastEdit", []); }; RemoteDom.prototype.call = function (command, args) { var _this = this; return new Plugin.Promise(function (completed) { _this._channel.call(_this._engine, command, args, completed); }); }; return RemoteDom; })(); DomExplorer.RemoteDom = RemoteDom; })(F12.DomExplorer || (F12.DomExplorer = {})); var DomExplorer = F12.DomExplorer; })(F12 || (F12 = {})); // changedSelector.ts var Dom; (function (Dom) { "use strict"; var ChangedSelector = (function () { function ChangedSelector(selectorText, changeState, isSelectorChanged) { this.selectorText = selectorText; this.changeState = changeState; this.isSelectorChanged = isSelectorChanged; if (!ChangedSelector.AriaChangeStateRemoveString) { ChangedSelector.AriaChangeStateRemoveString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateRemove") : ""; } if (!ChangedSelector.AriaChangeStateAddString) { ChangedSelector.AriaChangeStateAddString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateAdd") : ""; } } Object.defineProperty(ChangedSelector.prototype, "ariaChangeStateString", { get: function () { switch (this.changeState) { case Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE: return ChangedSelector.AriaChangeStateRemoveString; case Dom.StyleChangeNotifier.CHANGE_BAR_ADD: return ChangedSelector.AriaChangeStateAddString; } return ""; }, enumerable: true, configurable: true }); return ChangedSelector; })(); Dom.ChangedSelector = ChangedSelector; })(Dom || (Dom = {})); // changedProperty.ts var Dom; (function (Dom) { "use strict"; var ChangedProperty = (function () { function ChangedProperty(name, value, isImportant, changeState, isNameChanged, isValueChanged, isPriorityChanged) { if (typeof isNameChanged === "undefined") { isNameChanged = false; } if (typeof isValueChanged === "undefined") { isValueChanged = false; } if (typeof isPriorityChanged === "undefined") { isPriorityChanged = false; } this.name = name; this.value = value; this.isImportant = isImportant; this.changeState = changeState; this.isNameChanged = isNameChanged; this.isValueChanged = isValueChanged; this.isPriorityChanged = isPriorityChanged; if (!ChangedProperty.AriaChangeStateRemoveString) { ChangedProperty.AriaChangeStateRemoveString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateRemove") : ""; } if (!ChangedProperty.AriaChangeStateAddString) { ChangedProperty.AriaChangeStateAddString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateAdd") : ""; } } Object.defineProperty(ChangedProperty.prototype, "priority", { get: function () { return this.isImportant ? " !important" : ""; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedProperty.prototype, "ariaChangeStateString", { get: function () { switch (this.changeState) { case Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE: return ChangedProperty.AriaChangeStateRemoveString; case Dom.StyleChangeNotifier.CHANGE_BAR_ADD: return ChangedProperty.AriaChangeStateAddString; } return ""; }, enumerable: true, configurable: true }); return ChangedProperty; })(); Dom.ChangedProperty = ChangedProperty; })(Dom || (Dom = {})); // changedRule.ts var Dom; (function (Dom) { "use strict"; var ChangedRule = (function () { function ChangedRule(source, _rule, _url) { var _this = this; this.source = source; this._rule = _rule; this._url = _url; this._selectors = []; this._properties = []; var isSelectorChanged = this._rule.changeState === Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE; if (isSelectorChanged) { this._selectors.push(new Dom.ChangedSelector(this._rule.originalSelectorText, Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE, isSelectorChanged)); this._selectors.push(new Dom.ChangedSelector(this._rule.selectorText, Dom.StyleChangeNotifier.CHANGE_BAR_ADD, isSelectorChanged)); } else { var selector = this._rule.isDeleted ? this._rule.originalSelectorText : this._rule.selectorText; this._selectors.push(new Dom.ChangedSelector(selector, this._rule.changeState, isSelectorChanged)); } var groupedUpdates = []; this._rule.properties.forEach(function (property) { if (!(property.wasCreatedInSession && !property.isEnabled && property.status === 1 /* Valid */)) { if (property.isDeleted || (!property.isEnabled && property.status === 1 /* Valid */)) { _this._properties.push(new Dom.ChangedProperty(property.originalName, property.originalValue, property.originalIsImportant, Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE, isNameChanged, isValueChanged, isPriorityChanged)); } else if (property.changeState === Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE) { if (property.isShorthand && property.isEnabledIndeterminate) { _this._properties.push(new Dom.ChangedProperty(property.originalName, property.originalValue, property.originalIsImportant, Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE)); property.properties.forEach(function (subproperty) { if (subproperty.isEnabled) { groupedUpdates.push(new Dom.ChangedProperty(subproperty.name, subproperty.value, subproperty.isImportant, Dom.StyleChangeNotifier.CHANGE_BAR_ADD)); } }); } else { var isNameChanged = property.name !== property.originalName; var isValueChanged = property.value !== property.originalValue; var isPriorityChanged = property.isImportant !== property.originalIsImportant; _this._properties.push(new Dom.ChangedProperty(property.originalName, property.originalValue, property.originalIsImportant, Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE, isNameChanged, isValueChanged, isPriorityChanged)); groupedUpdates.push(new Dom.ChangedProperty(property.name, property.value, property.isImportant, Dom.StyleChangeNotifier.CHANGE_BAR_ADD, isNameChanged, isValueChanged, isPriorityChanged)); } } else { var change = new Dom.ChangedProperty(property.name, property.value, property.isImportant, property.changeState); if (property.changeState === Dom.StyleChangeNotifier.CHANGE_BAR_NONE) { if (groupedUpdates.length) { _this._properties = _this._properties.concat(groupedUpdates); groupedUpdates = []; } _this._properties.push(change); } else if (property.changeState === Dom.StyleChangeNotifier.CHANGE_BAR_ADD && property.isShorthand && property.isEnabledIndeterminate) { property.properties.forEach(function (subproperty) { if (subproperty.isEnabled) { groupedUpdates.push(new Dom.ChangedProperty(subproperty.name, subproperty.value, subproperty.isImportant, Dom.StyleChangeNotifier.CHANGE_BAR_ADD)); } }); } else { groupedUpdates.push(change); } } } }); if (groupedUpdates.length) { this._properties = this._properties.concat(groupedUpdates); } } Object.defineProperty(ChangedRule.prototype, "uid", { get: function () { return this._rule.uid; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "url", { get: function () { return this._url; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "isInline", { get: function () { return this._rule.isInlined; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "isDeleted", { get: function () { return this._rule.isDeleted; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "line", { get: function () { return this._rule.fileLine; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "column", { get: function () { return this._rule.fileColumn; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "hasFileLink", { get: function () { return this._rule.isInlined || (!this._rule.wasCreatedInSession && this._rule.fileLine > 0); }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "fileLink", { get: function () { if (this._rule.isInlined) { return this._rule.target.description; } return Common.ToolWindowHelpers.createFileLinkText(null, this._rule.fileLine, this._rule.fileColumn); }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "selectors", { get: function () { return this._selectors; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "properties", { get: function () { return this._properties; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "parent", { get: function () { return this._rule.parent; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "tooltip", { get: function () { return this.source.displaySourceTooltip; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "footerState", { get: function () { var state = this._rule.changeState; if (state === Dom.StyleChangeNotifier.CHANGE_BAR_ADD || state === Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE) { return state; } return Dom.StyleChangeNotifier.CHANGE_BAR_NONE; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedRule.prototype, "textForCopy", { get: function () { return this._rule.formatForCopy; }, enumerable: true, configurable: true }); ChangedRule.prototype.revert = function () { return this._rule.revert(); }; ChangedRule.prototype.matches = function (rule) { return this._rule === rule; }; ChangedRule.compare = function (a, b) { if (a._rule.isInlined) { if (b._rule.isInlined) { var aDesc = a._rule.target.description; var bDesc = b._rule.target.description; return aDesc === bDesc ? 0 : (aDesc > bDesc ? 1 : -1); } return -1; } if (b._rule.isInlined) { return 1; } if (a.line === b.line) { return a.column - b.column; } return a.line - b.line; }; return ChangedRule; })(); Dom.ChangedRule = ChangedRule; })(Dom || (Dom = {})); // changedSource.ts var Dom; (function (Dom) { "use strict"; var ChangedSource = (function () { function ChangedSource(source, _model, isInline) { this.source = source; this._model = _model; this.children = []; var id = ChangedSource.ID_MAP[this.source]; if (!id) { id = "changeId" + ChangedSource.NEXT_UNIQUE_ID++; ChangedSource.ID_MAP[this.source] = id; } this.uniqueId = id; this._tooltip = source; } Object.defineProperty(ChangedSource.prototype, "displaySource", { get: function () { return Common.ToolWindowHelpers.getTruncatedFileName(this.source, 50); }, enumerable: true, configurable: true }); Object.defineProperty(ChangedSource.prototype, "displaySourceTooltip", { get: function () { return this._tooltip; }, enumerable: true, configurable: true }); Object.defineProperty(ChangedSource.prototype, "expanded", { get: function () { return !this._model.isCollapsed(this.source); }, enumerable: true, configurable: true }); Object.defineProperty(ChangedSource.prototype, "textForCopy", { get: function () { var first = true; var text = ""; this.children.forEach(function (rule) { if (!first) { text += "\r\n"; } text += "/* "; if (rule.isDeleted) { text += Common.ToolWindowHelpers.loadString("RemoveStyleMenuText") + " "; } if (rule.hasFileLink) { if (rule.isInline) { text += rule.url + " " + rule.fileLink; } else { text += Common.ToolWindowHelpers.createFileLinkText(rule.url, rule.line, rule.column, Number.MAX_VALUE); } } else { text += rule.url; } text += " */\r\n"; if (!rule.isDeleted) { text += rule.textForCopy; } first = false; }); return text; }, enumerable: true, configurable: true }); ChangedSource.prototype.add = function (change) { this.children.push(change); }; ChangedSource.prototype.sort = function () { this.children.sort(Dom.ChangedRule.compare); }; ChangedSource.prototype.updateTooltip = function (rule, tooltip) { for (var i = 0; i < this.children.length; i++) { if (this.children[i].matches(rule)) { this._tooltip = tooltip; break; } } }; ChangedSource.NEXT_UNIQUE_ID = 0; ChangedSource.ID_MAP = {}; return ChangedSource; })(); Dom.ChangedSource = ChangedSource; })(Dom || (Dom = {})); // elementStyleModel.ts var Dom; (function (Dom) { "use strict"; var ElementStyleModel = (function () { function ElementStyleModel(_remoteDom) { this._remoteDom = _remoteDom; this._ruleMap = {}; this._propertyMap = {}; this._inheritedTargets = {}; this._inlinedStyleName = Common.ToolWindowHelpers.loadString("InlineStyleSelector"); this._listeners = []; this.rules = []; } ElementStyleModel.create = function (remoteDom, elementUid, callback) { var model = new ElementStyleModel(remoteDom); var command; var args; if (elementUid) { command = remoteDom.getStyles; args = [elementUid]; } else { command = remoteDom.getChangedStyles; args = []; } command.call(remoteDom, args).done(function (allStyles) { if (allStyles) { for (var i = 0; i < allStyles.length; i++) { model.processRawStyle(allStyles[i], i); } callback(model); } }); }; ElementStyleModel.createNewId = function () { return ElementStyleModel.NewUidTag + ElementStyleModel.NextUid++; }; ElementStyleModel.prototype.addUpdateListener = function (listener) { if (this._listeners.indexOf(listener) < 0) { this._listeners.push(listener); } }; ElementStyleModel.prototype.removeUpdateListener = function (listener) { var index = this._listeners.indexOf(listener); if (index >= 0) { this._listeners.splice(index, 1); } }; ElementStyleModel.prototype.updateWinningRule = function (propertyName) { var _this = this; this._remoteDom.getWinningProperty(propertyName).done(function (winningPropertyId) { _this.rules.forEach(function (rule) { rule.updateWinningProperty(propertyName, winningPropertyId); }); }); }; ElementStyleModel.prototype.togglePropertyEnable = function (property, isEnabled, callback) { this._remoteDom.editStylePropertyEnable(property.uid, isEnabled).done(callback); }; ElementStyleModel.prototype.editRuleSelector = function (ruleId, newSelector, callback) { this._remoteDom.editStyleRuleSelector(ruleId, newSelector).done(callback); }; ElementStyleModel.prototype.editRuleDelete = function (ruleId, callback) { this._remoteDom.editStyleRuleRemove(ruleId).done(callback); }; ElementStyleModel.prototype.editRuleRevert = function (uid, callback) { this._remoteDom.revertRule(uid).done(callback); }; ElementStyleModel.prototype.addRule = function (selector, name, value, isImportant, position, callback) { this._remoteDom.editStyleRuleAdd(selector, name, value, isImportant, position).done(callback); }; ElementStyleModel.prototype.addProperty = function (uid, name, value, isImportant, beforeUid, callback) { this._remoteDom.editStylePropertyAdd(uid, name, value, isImportant, beforeUid).done(callback); }; ElementStyleModel.prototype.editPropertyName = function (uid, name, callback) { this._remoteDom.editStylePropertyName(uid, name).done(callback); }; ElementStyleModel.prototype.editPropertyValue = function (uid, value, isImportant, callback) { this._remoteDom.editStylePropertyValue(uid, value, isImportant).done(callback); }; ElementStyleModel.prototype.editPropertyRevert = function (uid, callback) { this._remoteDom.revertProperty(uid).done(callback); }; ElementStyleModel.prototype.editPropertyDelete = function (uid, callback) { var _this = this; this._remoteDom.removeStyleProperty(uid).done(function (result) { if (!result) { delete _this._propertyMap[uid]; } callback(result); }); }; ElementStyleModel.prototype.applyChanges = function (changes) { var _this = this; var property; var rule; changes.forEach(function (change) { switch (change.event) { case "updateProperty": property = _this.getPropertyById(change.uid); if (property) { property.updateFromRemote(change.obj); if (!change.isDynamic) { property.select(); } } break; case "removeProperty": property = _this.getPropertyById(change.uid); if (property) { property.remove(!change.isDynamic); } break; case "addProperty": rule = _this.getRuleById(change.uid); if (rule) { var property = rule.addProperty(change.obj, true, _this.getPropertyById(change.beforeUid)); property.recalculateWinning(); if (!change.isDynamic) { property.select(); } } break; case "updateRule": rule = _this.getRuleById(change.uid); if (rule) { rule.updateFromRemote(change.obj); if (!change.isDynamic) { rule.select(); } } break; case "revertRule": rule = _this.getRuleById(change.uid); if (rule) { if (change.obj) { rule.removeNewProperties(); rule.updateFromRemote(change.obj); } else { rule.remove(); } } break; case "removeRule": rule = _this.getRuleById(change.uid); if (rule) { rule.remove(); } break; case "addRule": var position = _this.rules.length; if (change.beforeUid) { for (var i = 0; i < _this.rules.length; i++) { if (_this.rules[i].uid === change.beforeUid) { position = i; break; } } } rule = _this.processRawStyle(change.obj, position, true); if (!change.isDynamic) { rule.select(); } break; } }); }; ElementStyleModel.prototype.getRuleById = function (ruleUid) { return this._ruleMap[ruleUid]; }; ElementStyleModel.prototype.getPropertyById = function (uid) { return this._propertyMap[uid]; }; ElementStyleModel.prototype.remapPropertyId = function (property, oldUid, newUid) { if (oldUid) { delete this._propertyMap[oldUid]; } if (newUid) { this._propertyMap[newUid] = property; } }; ElementStyleModel.prototype.remapRuleId = function (rule, oldUid, newUid) { delete this._ruleMap[oldUid]; this._ruleMap[newUid] = rule; }; ElementStyleModel.prototype.removeProperty = function (property) { delete this._propertyMap[property.uid]; }; ElementStyleModel.prototype.createNewRule = function (selector) { var rule = new Dom.StyleRule(this, this._listeners, ElementStyleModel.createNewId(), true, false, selector); this._ruleMap[rule.uid] = rule; this.rules.splice(1, 0, rule); return rule; }; ElementStyleModel.prototype.removeRule = function (rule) { if (rule.isInlined) { return false; } delete this._ruleMap[rule.uid]; var rules = this.rules; for (var i = 0; i < rules.length; i++) { if (rules[i] === rule) { rules.splice(i, 1); return true; } } return false; }; ElementStyleModel.prototype.setInlineProperty = function (propertyName, value, isImportant) { for (var i = 0; i < this.rules.length; i++) { var rule = this.rules[i]; if (rule.isInlined && !rule.isInherited) { rule.setExistingOrAddNewProperty(propertyName, value, isImportant); return true; } } return false; }; ElementStyleModel.isNew = function (id) { return id.substr(0, ElementStyleModel.NewUidTagLength) === ElementStyleModel.NewUidTag; }; ElementStyleModel.prototype.processRawStyle = function (remoteRule, index, isRemoteChange) { if (typeof isRemoteChange === "undefined") { isRemoteChange = false; } var uid = remoteRule.uid; var rule = new Dom.StyleRule(this, this._listeners, uid, remoteRule.wasCreatedInSession, remoteRule.isDeleted, remoteRule.isInlined ? this._inlinedStyleName : remoteRule.selector); if (remoteRule.declarationLocation) { rule.fileUrl = remoteRule.declarationLocation.uri; rule.fileLine = remoteRule.declarationLocation.line + 1; rule.fileColumn = remoteRule.declarationLocation.column + 1; } else { rule.fileUrl = remoteRule.styleHref; } if (rule.fileUrl) { rule.fileLinkText = Common.ToolWindowHelpers.createFileLinkText(rule.fileUrl, rule.fileLine); Plugin.Host.getDocumentLocation(rule.fileUrl).done(function (loc) { rule.tooltip = Common.ToolWindowHelpers.loadString("StyleRuleFileTooltip", [Common.EncodingUtilities.escapeHtml(loc), rule.fileLine, rule.fileColumn]); rule.notifyRuleChange(7 /* FileLinkTooltip */, rule, rule.tooltip); }); } rule.styleHref = remoteRule.styleHref; rule.target = remoteRule.target; rule.isInherited = remoteRule.isInherited; rule.isInlined = remoteRule.isInlined; rule.parent = remoteRule.parent; rule.isFirstRuleInTargetGroup = remoteRule.isInherited && remoteRule.target && !this._inheritedTargets[remoteRule.target.uid]; rule.setOriginal(remoteRule.originalSelector); this.rules.splice(index, 0, rule); this._ruleMap[uid] = rule; if (remoteRule.properties) { for (var i = 0; i < remoteRule.properties.length; i++) { var property = rule.addProperty(remoteRule.properties[i]); } } if (rule.isFirstRuleInTargetGroup && rule.target) { this._inheritedTargets[rule.target.uid] = rule.target; } if (isRemoteChange) { rule.notifyRuleChange(3 /* AddRule */, rule); rule.recalculateWinning(); } return rule; }; ElementStyleModel.NewUidTag = "new-"; ElementStyleModel.NewUidTagLength = ElementStyleModel.NewUidTag.length; ElementStyleModel.NextUid = 0; return ElementStyleModel; })(); Dom.ElementStyleModel = ElementStyleModel; })(Dom || (Dom = {})); // stylePropertyStatus.ts var Dom; (function (Dom) { "use strict"; (function (StylePropertyStatus) { StylePropertyStatus[StylePropertyStatus["Unknown"] = 0] = "Unknown"; StylePropertyStatus[StylePropertyStatus["Valid"] = 1] = "Valid"; StylePropertyStatus[StylePropertyStatus["InvalidName"] = 2] = "InvalidName"; StylePropertyStatus[StylePropertyStatus["InvalidValue"] = 3] = "InvalidValue"; })(Dom.StylePropertyStatus || (Dom.StylePropertyStatus = {})); var StylePropertyStatus = Dom.StylePropertyStatus; })(Dom || (Dom = {})); // styleProperty.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Dom; (function (Dom) { "use strict"; var StyleProperty = (function (_super) { __extends(StyleProperty, _super); function StyleProperty(_model, _listeners, wasCreatedInSession, current, original, originalLonghand, _isApplied, _isWinning, isDeleted, status, _uid, rule) { _super.call(this, _listeners); this._model = _model; this._listeners = _listeners; this.wasCreatedInSession = wasCreatedInSession; this.original = original; this.originalLonghand = originalLonghand; this._isApplied = _isApplied; this._isWinning = _isWinning; this.isDeleted = isDeleted; this._uid = _uid; this.rule = rule; this.properties = []; this._status = StyleProperty.convertStatusStringToStatus(status); this.owner = this; this._name = current.name; this._value = current.value; this._isImportant = current.isImportant; this._isEnabled = current.isEnabled; if (!StyleProperty.AriaOverriddenString) { StyleProperty.AriaOverriddenString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaOverridden") : ""; } if (!StyleProperty.AriaInvalidString) { StyleProperty.AriaInvalidString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("SingleError", [""]) + ":" : ""; } if (!StyleProperty.AriaChangeStateRemoveString) { StyleProperty.AriaChangeStateRemoveString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateRemove") : ""; } if (!StyleProperty.AriaChangeStateAddString) { StyleProperty.AriaChangeStateAddString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateAdd") : ""; } if (!StyleProperty.AriaChangeStateUpdateString) { StyleProperty.AriaChangeStateUpdateString = typeof Plugin !== "undefined" && typeof Plugin.Resources !== "undefined" ? Common.ToolWindowHelpers.loadString("AriaChangeStateUpdate") : ""; } this.updateChangeState(); } Object.defineProperty(StyleProperty.prototype, "isApplied", { get: function () { return this._isApplied; }, set: function (value) { if (value !== this._isApplied) { this._isApplied = value; this.notifyPropertyChange(5 /* IsApplied */, this, value); } }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isEnabled", { get: function () { return this._isEnabled; }, set: function (value) { var _this = this; if (value !== this._isEnabled) { this._isEnabled = value; this.notifyPropertyChange(4 /* IsEnabled */, this, value); if (this.isSubProperty) { var shorthand = this.owner; shorthand._isEnabled = shorthand._isEnabled || this.isEnabledIndeterminate; var notifyValue = this.isEnabledIndeterminate ? undefined : this._isEnabled; this.notifyPropertyChange(4 /* IsEnabled */, shorthand, notifyValue); } else if (this.isShorthand) { this.properties.forEach(function (subproperty) { subproperty._isEnabled = value; _this.notifyPropertyChange(4 /* IsEnabled */, subproperty, value); }); } } }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isWinning", { get: function () { return this._isWinning; }, set: function (value) { this._isWinning = value; this.notifyPropertyChange(3 /* IsWinning */, this, value); }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "name", { get: function () { return this._name; }, set: function (value) { if (value !== this._name) { this._name = value; this.notifyPropertyChange(1 /* Name */, this, value); } }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "originalName", { get: function () { return this.original ? this.original.name : ""; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "value", { get: function () { return this._value; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "originalValue", { get: function () { return this.original ? this.original.value : ""; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isImportant", { get: function () { return this._isImportant; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "originalIsImportant", { get: function () { return this.original ? this.original.isImportant : false; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "uid", { get: function () { return this._uid; }, set: function (value) { if (value !== this._uid) { var ownerUid = this.owner.uid; var oldUid = this._uid; this._model.remapPropertyId(this, oldUid, value); this.notifyPropertyChange(0 /* Uid */, this, value); this._uid = value; } }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "status", { get: function () { return this._status; }, set: function (value) { if (value !== this._status) { this._status = value; this.notifyPropertyChange(6 /* Status */, this, value); } }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isRule", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isProperty", { get: function () { return this.owner === this; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isSubProperty", { get: function () { return this.owner !== this; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isEditable", { get: function () { return this.isProperty; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "container", { get: function () { return this.owner === this ? this.rule : this.owner; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isNew", { get: function () { return Dom.ElementStyleModel.isNew(this._uid); }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isDisplayableColor", { get: function () { return (this.isColor && this._status === 1 /* Valid */ && !StyleProperty.isNonDisplayableColorValue(this._value)) || this.isSupPropertyDisplayableColor; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "colorForDisplay", { get: function () { if (this.isDisplayableColor) { if (this.isShorthand) { for (var i = 0; i < this.properties.length; i++) { var subproperty = this.properties[i]; if (subproperty.isDisplayableColor) { return subproperty.value; } } } else { return this._value; } return ""; } }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "valueForDisplay", { get: function () { var value = this.valueWithPriority; return value.length ? value : "\u2003"; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isEnabledIndeterminate", { get: function () { var subproperties = this.isSubProperty ? this.owner.properties : this.properties; var countEnabled = 0; for (var i = 0; i < subproperties.length; i++) { var subproperty = subproperties[i]; if (subproperty.isEnabled) { countEnabled++; } } return !!countEnabled && countEnabled !== subproperties.length; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "enabledMixedState", { get: function () { return this.isEnabledIndeterminate ? "mixed" : ("" + this._isEnabled); }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isShorthand", { get: function () { return this.properties.length > 0; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isNameDisplayedAsInvalid", { get: function () { return !this.isValidName && /^([^-]|-ms)/.test(this.name); }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isValidName", { get: function () { return this._status === 1 /* Valid */ || this._status === 3 /* InvalidValue */; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isValidValue", { get: function () { return this._status === 1 /* Valid */ || this._status === 2 /* InvalidName */; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isInvalid", { get: function () { return this._status !== 1 /* Valid */; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isStrikeThrough", { get: function () { return !this._isWinning && this._status === 1 /* Valid */; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isOriginal", { get: function () { if (this.isDeleted || !this.original || this._name !== this.original.name || this._value !== this.original.value || this._isImportant !== this.original.isImportant || this._isEnabled !== this.original.isEnabled) { return false; } if (this.isShorthand) { for (var i = 0; i < this.properties.length; i++) { if (!this.properties[i].isOriginal) { return false; } } } return true; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "formatForCopy", { get: function () { return this.name + ": " + this.valueWithPriority + ";"; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "ariaOverriddenString", { get: function () { return this.isStrikeThrough ? StyleProperty.AriaOverriddenString : ""; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "ariaInvalidNameString", { get: function () { return !this.isValidName ? StyleProperty.AriaInvalidString : ""; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "ariaInvalidValueString", { get: function () { return !this.isValidValue ? StyleProperty.AriaInvalidString : ""; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "ariaChangeStateString", { get: function () { switch (this.changeState) { case Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE: return StyleProperty.AriaChangeStateRemoveString; case Dom.StyleChangeNotifier.CHANGE_BAR_ADD: return StyleProperty.AriaChangeStateAddString; case Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE: return StyleProperty.AriaChangeStateUpdateString; } return ""; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "isColor", { get: function () { return this.name.indexOf("color") > -1; }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "valueWithPriority", { get: function () { return this._value + (this._isImportant ? " !important" : ""); }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "changeState", { get: function () { return this._changeState; }, set: function (value) { if (this._changeState !== value) { this._changeState = value; this.container.updateChangeState(); this.notifyPropertyChange(11 /* Change */, this); } }, enumerable: true, configurable: true }); Object.defineProperty(StyleProperty.prototype, "extendedChangeState", { get: function () { return this._extendedChangeState; }, set: function (value) { if (this._extendedChangeState !== value) { this._extendedChangeState = value; this.container.updateChangeState(); this.notifyPropertyChange(11 /* Change */, this); } }, enumerable: true, configurable: true }); StyleProperty.isNonDisplayableColorValue = function (value) { return value === "" || value === "inherit" || value === "currentColor" || value === "flavor" || value === "invert" || value === "transparent"; }; StyleProperty.prototype.addSubproperty = function (subproperty, doNotify) { subproperty.original = this.getLonghandOriginal(this.properties.length); subproperty.updateChangeState(); this.properties.push(subproperty); subproperty.owner = this; this._model.remapPropertyId(subproperty, null, subproperty.uid); if (doNotify) { this.notifyPropertyChange(8 /* AddSubproperty */, this, subproperty); } }; StyleProperty.prototype.clearSubproperties = function () { var _this = this; this.properties.forEach(function (subproperty) { _this._model.remapPropertyId(subproperty, subproperty.uid, null); }); this.properties = []; this.notifyPropertyChange(7 /* ClearSubproperties */, this); }; StyleProperty.prototype.select = function () { this.notifyPropertyChange(9 /* Select */, this); }; StyleProperty.prototype.updateWinning = function (propertyName, winningPropertyId) { var foundInSubproperty = false; var winningCount = 0; this.properties.forEach(function (subproperty) { if (subproperty.uid === winningPropertyId) { subproperty.isWinning = true; foundInSubproperty = true; } else if (subproperty.name === propertyName) { subproperty.isWinning = false; foundInSubproperty = true; } if (subproperty._isWinning) { winningCount++; } }); if (foundInSubproperty) { this.isWinning = winningCount > 0; } else if (this.uid === winningPropertyId) { this.isWinning = true; } else if (this.name === propertyName && !this.isShorthand) { this.isWinning = false; } }; StyleProperty.prototype.recalculateWinning = function () { var _this = this; if (this.isShorthand) { this.properties.forEach(function (subproperty) { _this._model.updateWinningRule(subproperty.name); }); } else { this._model.updateWinningRule(this.name); } }; StyleProperty.prototype.toggleEnable = function () { var _this = this; return new Plugin.Promise(function (completed) { var value = !_this._isEnabled; _this._model.togglePropertyEnable(_this, value, function () { _this.isEnabled = value; _this.recalculateWinning(); _this.updateChangeState(); if (_this.isShorthand) { _this.properties.forEach(function (subproperty) { subproperty.updateChangeState(); }); } completed(); }); }); }; StyleProperty.prototype.commitName = function (newName) { var _this = this; return new Plugin.Promise(function (completed, error) { if (_this._name !== newName) { var oldName = _this._name; _this._name = newName; if (_this.isNew) { _this.commitNewProperty().then(completed, error); } else { _this._model.editPropertyName(_this._uid, _this._name, function (result) { _this._name = oldName; if (result) { _this.recalculateWinning(); _this.updateFromRemote(result); completed(); } else { _this.refreshNameDisplay(); error(); } }); } } else { completed(); } }); }; StyleProperty.prototype.commitValue = function (newValue, newImportant) { var _this = this; if (typeof newImportant === "undefined") { newImportant = false; } return new Plugin.Promise(function (completed, error) { if (newValue.match(/!important$/)) { newValue = newValue.substring(0, newValue.length - 10).trim(); newImportant = true; } if (_this._value !== newValue || _this._isImportant !== newImportant) { var oldValue = _this._value; var oldImportant = _this._isImportant; _this._value = newValue; _this._isImportant = newImportant; if (_this.isNew) { _this.commitNewProperty().then(completed, error); } else { _this._model.editPropertyValue(_this._uid, _this._value, _this._isImportant, function (result) { if (result) { _this.updateFromRemote(result); completed(); } else { _this._value = oldValue; _this._isImportant = oldImportant; _this.refreshValueDisplay(); error(); } }); } } else { completed(); } }); }; StyleProperty.prototype.revert = function () { var _this = this; if (this.wasCreatedInSession) { return this.commitDelete(true); } else { return new Plugin.Promise(function (completed, error) { _this._model.editPropertyRevert(_this._uid, function (result) { if (result) { _this.recalculateWinning(); _this.updateFromRemote(result); completed(); } else { error(); } }); }); } }; StyleProperty.prototype.lookupLonghandOriginals = function () { for (var i = 0; i < this.properties.length; i++) { var property = this.properties[i]; property.original = this.getLonghandOriginal(i); property.updateChangeState(); } }; StyleProperty.prototype.updateFromRemote = function (remoteProperty) { var _this = this; this.remoteUpdateProperty(remoteProperty); var i; var property; if (this.properties.length === remoteProperty.longhand.length) { for (i = 0; i < this.properties.length; i++) { property = this.properties[i]; var longhand = remoteProperty.longhand[i]; longhand.original = this.getLonghandOriginal(i); property.remoteUpdateProperty(longhand); } } else { this.clearSubproperties(); remoteProperty.longhand.forEach(function (longhand) { property = new StyleProperty(_this._model, _this._listeners, false, longhand.current, null, null, longhand.isApplied, true, false, longhand.status, longhand.uid, _this.rule); _this.addSubproperty(property, true); }); this.lookupLonghandOriginals(); } this.recalculateWinning(); }; StyleProperty.prototype.remove = function (changeSelection) { this.recalculateWinning(); var index = this.rule.removeProperty(this); var nextSelection; if (changeSelection) { nextSelection = index < this.rule.properties.length ? this.rule.properties[index] : (index > 0 ? this.rule.properties[index - 1] : this.rule); } this.notifyPropertyChange(10 /* Remove */, this, nextSelection); }; StyleProperty.prototype.commitDelete = function (changeSelection) { var _this = this; return new Plugin.Promise(function (completed, error) { _this._model.editPropertyDelete(_this.uid, function (result) { if (result) { _this.recalculateWinning(); _this.updateFromRemote(result); } else { _this.remove(changeSelection); } completed(); }); }); }; StyleProperty.prototype.refreshNameDisplay = function () { this.notifyPropertyChange(1 /* Name */, this, this._name); this.notifyPropertyChange(6 /* Status */, this, this._status); }; StyleProperty.prototype.setValue = function (value, isImportant) { this._value = value; this._isImportant = isImportant; this.notifyPropertyChange(2 /* Value */, this, this.valueForDisplay); }; StyleProperty.prototype.refreshValueDisplay = function () { this.notifyPropertyChange(2 /* Value */, this, this.valueForDisplay); this.notifyPropertyChange(6 /* Status */, this, this._status); }; StyleProperty.prototype.updateChangeState = function () { if (this.isDeleted || this.container.isDeleted) { this.changeState = Dom.StyleChangeNotifier.CHANGE_BAR_REMOVE; } else if (this.wasCreatedInSession || this.container.wasCreatedInSession) { this.changeState = Dom.StyleChangeNotifier.CHANGE_BAR_ADD; } else if (!this.isOriginal) { this.changeState = Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE; } else { this.changeState = Dom.StyleChangeNotifier.CHANGE_BAR_NONE; for (var i = 0; i < this.properties.length; i++) { if (this.properties[i].changeState) { this.changeState = Dom.StyleChangeNotifier.CHANGE_BAR_UPDATE; } } } this.extendedChangeState = this.changeState; }; Object.defineProperty(StyleProperty.prototype, "isSupPropertyDisplayableColor", { get: function () { if (this.isShorthand) { for (var i = 0; i < this.properties.length; i++) { var subproperty = this.properties[i]; if (subproperty.isDisplayableColor) { return true; } } } return false; }, enumerable: true, configurable: true }); StyleProperty.convertStatusStringToStatus = function (status) { switch (status) { case "Valid": return 1 /* Valid */; case "UnrecognizedProperty": return 2 /* InvalidName */; case "InvalidValue": return 3 /* InvalidValue */; } return 0 /* Unknown */; }; StyleProperty.prototype.getLonghandOriginal = function (index) { if (this.originalLonghand && this.originalLonghand.length === this.properties.length) { return this.originalLonghand[index]; } return { name: "", value: "", isImportant: false, isEnabled: false }; }; StyleProperty.prototype.commitNewProperty = function () { var _this = this; if (this.rule.isNew) { return this.rule.commitNewRule(this); } else { var position = -1; for (var i = 0; i < this.rule.properties.length; i++) { if (this.rule.properties[i] === this) { position = i; break; } } var nextUid = position < this.rule.properties.length - 1 ? this.rule.properties[position + 1].uid : null; return new Plugin.Promise(function (completed, error) { _this._model.addProperty(_this.rule.uid, _this._name, _this._value, _this._isImportant, nextUid, function (result) { if (result) { _this.updateFromRemote(result); completed(); } else { error(); } }); }); } }; StyleProperty.prototype.remoteUpdateProperty = function (remoteProperty) { var current = remoteProperty.current; this.uid = remoteProperty.uid; this.wasCreatedInSession = remoteProperty.wasCreatedInSession; this.original = remoteProperty.original; this.originalLonghand = remoteProperty.originalLonghand; this.name = current.name; this.status = StyleProperty.convertStatusStringToStatus(remoteProperty.status); this.isEnabled = current.isEnabled; this.isApplied = remoteProperty.isApplied; this.isDeleted = remoteProperty.isDeleted; this.setValue(current.value, current.isImportant); this.updateChangeState(); }; return StyleProperty; })(Dom.StyleChangeNotifier); Dom.StyleProperty = StyleProperty; })(Dom || (Dom = {})); .BPT-Events-EventName { color: #FF0000; /* [{plugin-font-editor-html-attribute-name-color}] */ -ms-grid-column: 2; } .BPT-Events-Function-Name { float: left; margin-left: 26px; word-break: break-all; } .BPT-Events-Location { float: right; margin-left: 10px; margin-right: 4px; } .BPT-ExpandingList-Header[aria-expanded='false'] > .BPT-ExpandingList-ExpandIcon { background-image: url('../common/images/itemCollapsedIcon.png'); /*[url({plugin-image-icon-item-collapsed})]*/ background-size: 10px 10px; } .BPT-ExpandingList-Header[aria-expanded='false'] + .BPT-ExpandingList-Collapsed-Section { display: none; } .BPT-ExpandingList-Header[aria-expanded='true'] > .BPT-ExpandingList-ExpandIcon { background-image: url(''); /*[url({plugin-image-icon-item-expanded})]*/ background-size: 10px 10px; } .BPT-ExpandingList-Header { display: -ms-grid; -ms-grid-columns: 17px auto auto 25px; } .BPT-ExpandingList-ExpandIcon { width: 10px; height: 10px; margin-top: 3px; -ms-grid-column: 1; background-repeat: no-repeat; } .BPT-ExpandingList-Child-Value-Container { overflow: auto; } .BPT-ExpandingList-Header { width: calc(100% - 2px); overflow: auto; overflow-x: hidden; white-space: normal; } .BPT-ExpandingList-Child-Value-Container { white-space: normal; } .BPT-ExpandingList-Header:focus, .BPT-ExpandingList-Child-Value-Container:focus { background: TRANSPARENT; /*[{plugin-font-editor-selected-background-color rgba(0.155)}]*/ border-width: 0px; padding: 0px; } @media screen and (-ms-high-contrast) { .BPT-ExpandingList-Header:focus, .BPT-ExpandingList-Child-Value-Container:focus { border-color: TRANSPARENT; /*[{plugin-font-editor-selected-border-color}]*/ } }  #layoutView { margin: 4px auto auto 5px; } #layoutViewTable { font-family: Consolas, monospace; display: table; overflow: hidden; } /* Need to explicitly override the CSS selector from domExplorer.css ** .BPT-HorizontalPane-Right-Content > div > *:not(.BPT-Toolbar) ** in our special #layout-offset-layer selector case. */ #layout-offset-layer { font-family: inherit; } div.BPT-Layout-Layer { display: table-cell; padding: .1em 1px; text-align: center; border-top: 1px solid #84ACDD; border-left: 1px solid #84ACDD; border-bottom: 1px solid #84ACDD; border-right: 1px solid #84ACDD; white-space: nowrap; } div.BPT-Layout-Top, div.BPT-Layout-Bottom { font-family: inherit; text-align: center; padding: 0.2em; height: 1em; } div.BPT-Layout-Left-Outer-Cell { display: table-cell; font-family: inherit; height: 1.4em; max-width: 1.4em; min-width: 1.4em; position: relative; vertical-align: middle; white-space: nowrap; width: 1.4em; } div.BPT-Layout-Left-Coord { font-family: inherit; height: 1.4em; left: -3.3em; position: relative; width: 1px; } div.BPT-Layout-Left { display: inline-block; font-family: inherit; height: 1.4em; line-height: 1.4em; position: relative; text-align: center; transform: rotate(-90deg); width: 8em; } div.BPT-Layout-Right-Outer-Cell { display: table-cell; font-family: inherit; height: 1.4em; max-width: 1.4em; min-width: 1.4em; position: relative; vertical-align: middle; white-space: nowrap; width: 1.4em; } div.BPT-Layout-Right-Coord { font-family: inherit; height: 1.4em; left: -3.3em; position: relative; width: 0; } div.BPT-Layout-Right { display: inline-block; font-family: inherit; height: 1.4em; line-height: 1.4em; position: relative; text-align: center; transform: rotate(-90deg); width: 8em; } div.BPT-Layout-Label { font-family: inherit; display: block; font-size: .85em; padding: 0px 5px; width: 0px; height: 0px; overflow: visible; color: gray; } #layout-offset-layer { background-color: #FFFFFF; border-color: #999999; color: black; } #layout-margin-layer { background-color: #FFEFC7; border-color: #FAD05B; color: black; } #layout-border-layer { background-color: #D3E7BC; border-color: #9BCD61; color: black; } #layout-padding-layer { background-color: #FBD4C7; border-color: #F7A387; color: black; } #layout-size-layer { background-color: #E2F3FB; border-color: #A8DDF6; color: black; height: 2em; line-height: 2em; min-width: 10em; vertical-align: middle; } { "start_url": "dom/dom.html", "domain": "http://microsoft.com", "name":"Dom", "version":"1.0", "f12": { "start_url": "dom.html", "localized_tab_resource": "DomToolLabelText", "localized_tooltip_id": 814, "resource_aliases" : { "Common": { "is_default" : true } }, "themed_images": { "plugin-image-icon-dom-explorer-show-all-styles": { "bitmap_source": "images\\i_just_my_code.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-error": { "bitmap_source": "images\\i_error.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-inspect": { "bitmap_source": "images\\i_inspect.png", "background_color": "f12-toolbar-background-color" }, "plugin-image-icon-dom-explorer-show-layout": { "bitmap_source": "images\\i_show-layout.png", "background_color": "f12-toolbar-background-color" }, "plugin-image-icon-dom-explorer-refresh": { "bitmap_source": "images\\i_refresh.png", "background_color": "f12-toolbar-background-color" }, "plugin-common-image-icon-next": { "bitmap_source": "..\\common\\images\\i_next.png", "background_color": "plugin-background-color" }, "plugin-common-image-icon-previous": { "bitmap_source": "..\\common\\images\\i_previous.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-breadcrumb-right": { "bitmap_source": "images\\BreadcrumbScrollRight.png", "background_color": "plugin-breadcrumb-background-color" }, "plugin-image-icon-dom-explorer-breadcrumb-right-hover": { "bitmap_source": "images\\BreadcrumbScrollRightHover.png", "background_color": "plugin-breadcrumb-background-color" }, "plugin-image-icon-dom-explorer-breadcrumb-left": { "bitmap_source": "images\\BreadcrumbScrollLeft.png", "background_color": "plugin-breadcrumb-background-color" }, "plugin-image-icon-dom-explorer-breadcrumb-left-hover": { "bitmap_source": "images\\BreadcrumbScrollLeftHover.png", "background_color": "plugin-breadcrumb-background-color" }, "plugin-image-icon-item-collapsed": { "bitmap_source": "..\\Common\\images\\itemCollapsedIcon.png", "background_color": "plugin-background-color" }, "plugin-image-icon-item-expanded": { "bitmap_source": "..\\Common\\images\\itemExpandedIcon.png", "background_color": "plugin-background-color" }, "plugin-image-icon-red-underline": { "bitmap_source": "images\\red_squiggly.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-show-pseudo_classes": { "bitmap_source": "images\\i_show_pseudo_classes.png", "background_color": "plugin-background-color" }, "plugin-common-image-colorpicker-toggle": { "bitmap_source": "..\\Common\\images\\colorPicker\\eyedropperButton.png", "background_color": "plugin-background-color" }, "plugin-common-image-colorpicker-color-background": { "bitmap_source": "..\\Common\\images\\colorPicker\\checkeredBackground.png", "background_color": "plugin-background-color" }, "plugin-common-image-colorpicker-eyedropper": { "bitmap_source": "..\\Common\\images\\colorPicker\\eyedropperButton.png", "background_color": "plugin-background-color" }, "plugin-common-image-colorpicker-slider-button": { "bitmap_source": "..\\Common\\images\\colorPicker\\sliderButton.png", "background_color": "plugin-background-color" }, "plugin-common-image-colorpicker-hue": { "bitmap_source": "..\\Common\\images\\colorPicker\\hueColorBar.png", "background_color": "plugin-background-color" }, "plugin-common-image-colorpicker-saturation": { "bitmap_source": "..\\Common\\images\\colorPicker\\saturationColorBar.png", "background_color": "plugin-background-color" }, "plugin-common-image-colorpicker-lightness": { "bitmap_source": "..\\Common\\images\\colorPicker\\lightnessColorBar.png", "background_color": "plugin-background-color" }, "plugin-common-image-colorpicker-alpha": { "bitmap_source": "..\\Common\\images\\colorPicker\\alphaColorBar.png", "background_color": "plugin-background-color" } } }, "vs": { "resource_aliases" : { "Common": { "type" : "Embedded", "name" : "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost", "path" : "Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Resources", "is_default" : true } }, "guid_symbols": { "guidShellStandardSet": "5efc7975-14bc-11cf-9b2b-00aa00573819", "guidHtmlToolHostCmdSet": "a654f3df-4bdb-4863-a750-75cdb50a03bc" }, "command_aliases": { "find": { "guid": "guidShellStandardSet", "id": 97, "focus": true }, "findnext": { "guid": "guidShellStandardSet", "id": 370, "focus": true }, "findprev": { "guid": "guidShellStandardSet", "id": 371, "focus": true }, "redo": { "guid": "guidShellStandardSet", "id": 29, "focus": true }, "refresh": { "guid": "guidHtmlToolHostCmdSet", "id": 261, "focus": true }, "selectelement": { "guid": "guidHtmlToolHostCmdSet", "id": 262, "focus": true }, "showlayout": { "guid": "guidHtmlToolHostCmdSet", "id": 263, "focus": true }, "undo": { "guid": "guidShellStandardSet", "id": 43, "focus": true } }, "theme_token_aliases": { "plugin-font-console-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Plain Text" }, "plugin-font-console-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Plain Text" }, "plugin-font-console-input-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Input Text" }, "plugin-font-console-input-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Input Text" }, "plugin-font-console-output-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Output Text" }, "plugin-font-console-output-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Output Text" }, "plugin-font-console-error-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Error Text" }, "plugin-font-console-error-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Error Text" }, "plugin-font-console-info-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Info Text" }, "plugin-font-console-info-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Info Text" }, "plugin-font-console-warning-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "ForegroundColor", "name": "Console Warning Text" }, "plugin-font-console-warning-background-color": { "category": "2AA714AE-53BE-4393-84E0-DC95B57A1891", "key_type": "BackgroundColor", "name": "Console Warning Text" }, "plugin-font-editor-color": { "category": "58e96763-1d3b-4e05-b6ba-ff7115fd0b7b", "key_type": "ForegroundColor", "name": "Plain Text" }, "plugin-font-editor-background-color": { "category": "58e96763-1d3b-4e05-b6ba-ff7115fd0b7b", "key_type": "BackgroundColor", "name": "Plain Text" }, "plugin-font-editor-keyword-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "Keyword" }, "plugin-font-editor-keyword-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "Keyword" }, "plugin-font-editor-string-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "String" }, "plugin-font-editor-string-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "String" }, "plugin-font-editor-number-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "Number" }, "plugin-font-editor-number-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "Number" }, "plugin-font-editor-symbol-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "SymbolDefinitionClassificationFormat" }, "plugin-font-editor-symbol-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "SymbolDefinitionClassificationFormat" }, "plugin-font-editor-html-tag-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Tag Delimiter" }, "plugin-font-editor-html-tag-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Tag Delimiter" }, "plugin-font-editor-html-element-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Element Name" }, "plugin-font-editor-html-element-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Element Name" }, "plugin-font-editor-html-comment-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Comment" }, "plugin-font-editor-html-comment-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Comment" }, "plugin-font-editor-html-attribute-name-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Attribute" }, "plugin-font-editor-html-attribute-name-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Attribute" }, "plugin-font-editor-html-attribute-value-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Attribute Value" }, "plugin-font-editor-html-attribute-value-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Attribute Value" }, "plugin-font-editor-html-operator-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Operator" }, "plugin-font-editor-html-operator-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "HTML Operator" }, "plugin-font-editor-css-name-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CSS Property Name" }, "plugin-font-editor-css-name-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "CSS Property Name" }, "plugin-font-editor-css-value-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CSS Property Value" }, "plugin-font-editor-css-value-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "CSS Property Value" }, "plugin-font-editor-css-selector-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CSS Selector" }, "plugin-font-editor-css-selector-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "CSS Selector" }, "plugin-font-editor-inactive-selected-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "Inactive Selected Text" }, "plugin-font-editor-selected-background-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "BackgroundColor", "name": "Selected Text" }, "plugin-font-editor-selected-border-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "outlining.collapsehintadornment" }, "plugin-font-editor-collapse-adornment-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "outlining.collapsehintadornment" }, "plugin-environment-background-gradient-begin": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "EnvironmentBackgroundGradientBegin" }, "plugin-filetab-hot-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabHotText" }, "plugin-filetab-inactive-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabInactiveText" }, "plugin-filetab-inactive-gradient-top-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabInactiveGradientTop" }, "plugin-filetab-hot-gradient-top-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabHotGradientTop" }, "plugin-filetab-selected-gradient-top-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabSelectedGradientTop" }, "plugin-filetab-selected-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "FileTabSelectedText" }, "plugin-searchcontrol-selection-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "Selection" }, "plugin-searchcontrol-unfocused-watermark-text-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "UnfocusedWatermarkText" }, "plugin-searchcontrol-unfocused-background-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "Unfocused" }, "plugin-searchcontrol-unfocused-border-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "UnfocusedBorder" }, "plugin-searchcontrol-mouseover-watermark-text-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "MouseOverWatermarkText" }, "plugin-searchcontrol-mouseover-background-background-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "MouseOverBackground" }, "plugin-searchcontrol-mouseover-background-foreground-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "ForegroundColor", "name": "MouseOverBackground" }, "plugin-searchcontrol-mouseover-border-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "MouseOverBorder" }, "plugin-pseudo-class-panel-disabled-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "ForegroundColor", "name": "ToolboxDisabledContentMouseOver" }, "plugin-styles-deleted-item-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "ForegroundColor", "name": "Disabled" }, "plugin-styles-changebar-add-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "deltadiff.add.word" }, "plugin-styles-changebar-update-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ExtensionManagerStarHighlight2" }, "plugin-styles-changebar-remove-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "deltadiff.remove.word" }, "plugin-commandbar-gradient-begin-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarGradientBegin" }, "plugin-vertical-resize-grip-middle-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "VerticalResizeGripMiddle" }, "plugin-font-current-line-active-format-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CurrentLineActiveFormat" }, "plugin-font-current-line-inactive-format-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "CurrentLineInactiveFormat" }, "plugin-font-editor-current-statement-background-color": { "category": "ff349800-ea43-46c1-8c98-878e78f46501", "key_type": "BackgroundColor", "name": "Current Statement" }, "plugin-font-editor-current-statement-color": { "category": "ff349800-ea43-46c1-8c98-878e78f46501", "key_type": "ForegroundColor", "name": "Current Statement" }, "plugin-tab-header-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolWindowTabGradientEnd" }, "plugin-tab-header-active-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolWindowTabSelectedTab" }, "plugin-tab-header-hover-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolWindowTabMouseOverBackgroundBegin" }, "plugin-tab-header-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolWindowTabText" }, "plugin-tab-header-active-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolWindowTabSelectedText" }, "plugin-tab-header-hover-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolWindowTabMouseOverText" }, "plugin-breadcrumb-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolWindowBackground" }, "plugin-border-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ActiveBorder" }, "plugin-breadcrumb-border-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ActiveBorder" }, "plugin-breadcrumb-hover-color": { "category": "92ecf08e-8b13-4cf4-99e9-ae2692382185", "key_type": "ForegroundColor", "name": "SelectedItemInactive" }, "plugin-breadcrumb-hover-background-color": { "category": "92ecf08e-8b13-4cf4-99e9-ae2692382185", "key_type": "BackgroundColor", "name": "SelectedItemInactive" }, "plugin-breadcrumb-selected-color": { "category": "92ecf08e-8b13-4cf4-99e9-ae2692382185", "key_type": "ForegroundColor", "name": "SelectedItemActive" }, "plugin-breadcrumb-selected-background-color": { "category": "92ecf08e-8b13-4cf4-99e9-ae2692382185", "key_type": "BackgroundColor", "name": "SelectedItemActive" }, "plugin-breadcrumb-tooltip-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "ForegroundColor", "name": "ToolTip" }, "plugin-breadcrumb-tooltip-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolTip" }, "plugin-breadcrumb-tooltip-border-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolTipBorder" }, "plugin-perftools-grid-column-sizer": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "VerticalResizeGripMiddle" }, "f12-intellisense-hover-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "MenuText" }, "f12-intellisense-hover-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "Menu" }, "f12-intellisense-checked-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "HighlightText" }, "f12-intellisense-checked-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "Highlight" }, "f12-toolbar-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarGradientBegin" }, "f12-toolbar-button-selected-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarSelected" }, "f12-toolbar-button-selected-border-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarSelectedBorder" }, "f12-toolbar-button-selected-text-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarTextSelected" }, "f12-toolbar-button-hover-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseOverBackgroundBegin" }, "f12-toolbar-button-hover-text-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarTextHover" }, "f12-toolbar-button-border-hover-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarBorder" }, "f12-toolbar-button-pressed-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBackgroundBegin" } }, "themed_images": { "plugin-image-icon-item-collapsed": { "bitmap_source": "common/images/itemCollapsedIcon.png", "background_color": "plugin-background-color" }, "plugin-image-icon-item-expanded": { "bitmap_source": "common/images/itemExpandedIcon.png", "background_color": "plugin-background-color" }, "plugin-image-icon-red-underline": { "bitmap_source": "dom/images/red_squiggly.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-show-all-styles": { "bitmap_source": "dom/images/i_just_my_code.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-critical": { "bitmap_source": "common/images/critical.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-inspect-32x": { "bitmap_source": "dom/images/Inspect_32x.png", "background_color": "f12-toolbar-background-color" }, "plugin-image-icon-dom-explorer-show-layout-32x": { "bitmap_source": "dom/images/ShowLayout_32x.png", "background_color": "f12-toolbar-background-color" }, "plugin-image-icon-dom-explorer-refresh-32x": { "bitmap_source": "dom/images/Refresh_32x.png", "background_color": "f12-toolbar-background-color" }, "plugin-image-icon-dom-explorer-next": { "bitmap_source": "common/images/i_next.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-previous": { "bitmap_source": "common/images/i_previous.png", "background_color": "plugin-background-color" }, "plugin-image-icon-dom-explorer-breadcrumb-right": { "bitmap_source": "dom/images/BreadcrumbScrollRight.png", "background_color": "plugin-breadcrumb-background-color" }, "plugin-image-icon-dom-explorer-breadcrumb-right-hover": { "bitmap_source": "dom/images/BreadcrumbScrollRightHover.png", "background_color": "plugin-breadcrumb-background-color" }, "plugin-image-icon-dom-explorer-breadcrumb-left": { "bitmap_source": "dom/images/BreadcrumbScrollLeft.png", "background_color": "plugin-breadcrumb-background-color" }, "plugin-image-icon-dom-explorer-breadcrumb-left-hover": { "bitmap_source": "dom/images/BreadcrumbScrollLeftHover.png", "background_color": "plugin-breadcrumb-background-color" }, "plugin-image-icon-dom-explorer-show-pseudo_classes": { "bitmap_source": "dom/images/i_show_pseudo_classes.png", "background_color": "plugin-background-color" } } }, "file_aliases": { "PerformanceTraceExtension": { "path": "PerformanceTrace.dll", "optional": true } } } // // Copyright (C) Microsoft. All rights reserved. // // // remoteChunker.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var Chunker = (function () { function Chunker() { } Chunker.prototype.sendChildren = function (mappedNode, children, showAll, callback) { var count = children.length; if (mappedNode.isLimited && mappedNode.ele.childNodes) { count = 0; var childNodes = mappedNode.ele.childNodes; for (var index = 0; index < childNodes.length; index++) { var element = childNodes.item(index); if (!htmlTreeHelpers.isEmptyTextElement(element)) { count++; } } } if (count <= remoteHelpers.childrenElementLimit) { callback({ children: children, chunkNumber: 0, chunkCount: 1, totalChildCount: count }); } else if (!showAll) { children = children.slice(0, remoteHelpers.childrenElementLimit); callback({ children: children, chunkNumber: 0, chunkCount: 1, totalChildCount: count }); } else { if (mappedNode.isLimited) { htmlTreeHelpers.getChildrenForMappedNode(mappedNode.ele.uniqueID, false, true); } var chunkNumber = 0; var chunkCount = Math.ceil(count / remoteHelpers.childrenElementLimit); while (chunkNumber * remoteHelpers.childrenElementLimit < count) { var chunk = children.slice(chunkNumber * remoteHelpers.childrenElementLimit, (chunkNumber + 1) * remoteHelpers.childrenElementLimit); callback({ children: chunk, chunkNumber: chunkNumber++, chunkCount: chunkCount, totalChildCount: count }); } } }; return Chunker; })(); RemoteDom.Chunker = Chunker; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // cssInformationExtractor.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var CssInformationExtractor = (function () { function CssInformationExtractor() { } CssInformationExtractor.getCssClassesUsedInCurrentDocument = function (elementSource) { var selectors = []; CssInformationExtractor.collectSelectors(elementSource.styleSheets, selectors); var cssClassSet = {}; CssInformationExtractor.extractClassNamesFromSelectorText(selectors, cssClassSet); CssInformationExtractor.extractClassNamesFromClassAttributes(elementSource, cssClassSet); return CssInformationExtractor.createArrayFromClassSet(cssClassSet); }; CssInformationExtractor.collectSelectors = function (styleSheets, selectors) { for (var i = 0; i < styleSheets.length; i++) { var styleSheet = styleSheets[i]; if (styleSheet.imports && styleSheet.imports.length) { CssInformationExtractor.collectSelectors(styleSheet.imports, selectors); } try { for (var j = 0; j < styleSheet.rules.length; j++) { var rule = styleSheet.rules[j]; selectors.push(rule.selectorText); } } catch (e) { Common.RemoteHelpers.encounteredException(e); } } }; CssInformationExtractor.createArrayFromClassSet = function (cssClassSet) { var cssClasses = []; for (var cssClass in cssClassSet) { if (cssClass !== "BPT-DomExplorer-Ignore") { cssClasses.push(cssClass); } } cssClasses.sort(); return cssClasses; }; CssInformationExtractor.extractClassNamesFromSelectorText = function (selectors, cssClassSet) { var newCssClass; for (var i = 0; i < selectors.length; i++) { var selectorText = selectors[i]; var selectorParts = String.prototype.split.call(selectorText, /([~+>,]|\s)+/); for (var l = 0; l < selectorParts.length; l++) { var selectorPart = selectorParts[l]; var dotIndex = selectorPart.indexOf("."); while (dotIndex !== -1) { var endOfClassIndex = CssInformationExtractor.findEndOfClass(selectorPart, dotIndex); if (endOfClassIndex === -1) { newCssClass = selectorPart.substring(dotIndex + 1); if (newCssClass !== "") { cssClassSet[newCssClass] = true; } dotIndex = -1; } else { newCssClass = selectorPart.substring(dotIndex + 1, endOfClassIndex + 1); if (newCssClass) { cssClassSet[newCssClass] = true; } dotIndex = selectorPart.indexOf(".", dotIndex + 1); } } } } }; CssInformationExtractor.extractClassNamesFromClassAttributes = function (elementSource, cssClassSet) { var nodes = elementSource.querySelectorAll("[class]"); for (var i = 0; i < nodes.length; i++) { var htmlElement = nodes.item(i); var classList = htmlElement.classList; if (!classList) { var className = htmlElement.className; if (className) { var view = Common.RemoteHelpers.getDefaultView(mainBrowser.document); if (view && view.SVGAnimatedString && className instanceof view.SVGAnimatedString) { var animatedValue = className; className = animatedValue.baseVal; if (animatedValue.baseVal !== animatedValue.animVal) { className += " " + animatedValue.animVal; } } if (className && className.split) { var classNames = String.prototype.split.call(className, /\s+/); for (var classNameIndex = 0; classNameIndex < classNames.length; classNameIndex++) { className = classNames[classNameIndex]; cssClassSet[className] = true; } } } } else { for (var j = 0; j < classList.length; j++) { var cssClass = classList.item(j); cssClassSet[cssClass] = true; } } } }; CssInformationExtractor.findEndOfClass = function (selectorPart, dotIndex) { var sub = selectorPart.substring(dotIndex + 1); var endIndex = String.prototype.search.call(sub, /[.#\[:>~)]/); if (endIndex === -1) { return -1; } return endIndex + dotIndex; }; return CssInformationExtractor; })(); RemoteDom.CssInformationExtractor = CssInformationExtractor; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // remoteMutationManager.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var MutationManager = (function () { function MutationManager(_timerService, _useTimeoutCheck) { this._timerService = _timerService; this._useTimeoutCheck = _useTimeoutCheck; this._treeModifiedCallback = null; this._attributeModifiedCallback = null; this._treeModifiedMap = {}; this._attributeModifiedMap = {}; this._treeModifiedTimeoutWaiting = false; this._attributeModifiedTimeoutWaiting = false; } Object.defineProperty(MutationManager.prototype, "treeModifiedCallback", { get: function () { return this._treeModifiedCallback; }, set: function (f) { this._treeModifiedCallback = f; }, enumerable: true, configurable: true }); Object.defineProperty(MutationManager.prototype, "attributeModifiedCallback", { get: function () { return this._attributeModifiedCallback; }, set: function (f) { this._attributeModifiedCallback = f; }, enumerable: true, configurable: true }); MutationManager.limitChildListSize = function (modifications, uidToMappedNodeMap) { modifications.forEach(function (modification) { if (modification.children && modification.children.length > remoteHelpers.childrenElementLimit) { var mappedNode = uidToMappedNodeMap[modification.uid]; modification.children = modification.children.slice(0, remoteHelpers.childrenElementLimit); } }); }; MutationManager.prototype.fireTreeModified = function (mappedNode, uid) { var _this = this; if (mappedNode.listenForTreeModified) { this._treeModifiedMap[uid] = mappedNode; if (this._useTimeoutCheck.useTimeout()) { if (!this._treeModifiedTimeoutWaiting) { this._timerService.setTimeout(function () { _this.treeModificationTimeoutCallback(); }, 200); this._treeModifiedTimeoutWaiting = true; } } else { this.treeModificationTimeoutCallback(); } } }; MutationManager.prototype.fireAttributeModified = function (element, attrName, newValue, changeType, callback) { var _this = this; var mappedNode = this.lookupMappedNode(element); if (mappedNode) { if (attrName === "value") { changeType = (mappedNode.hasValueAttribute ? 1 : 2); mappedNode.hasValueAttribute = true; } if (changeType === 1 || changeType === 3) { for (var i = 0; i < mappedNode.mapped.attributes.length; i++) { if (mappedNode.mapped.attributes[i].name === attrName) { if (changeType === 1) { mappedNode.mapped.attributes[i].value = newValue; } else { mappedNode.mapped.attributes.splice(i, 1); } break; } } } else if (changeType === 2) { mappedNode.mapped.attributes.push({ name: attrName, value: newValue }); } if (!mappedNode.pendingAttrModified) { mappedNode.pendingAttrModified = {}; } var uid = element["uniqueID"] || element["bpt-uid"]; mappedNode.pendingAttrModified[attrName] = { event: "attrModified", uid: uid, attrName: attrName, newValue: newValue, attrChange: changeType }; this._attributeModifiedMap[uid] = mappedNode; if (this._useTimeoutCheck.useTimeout()) { if (!this._attributeModifiedTimeoutWaiting) { this._timerService.setTimeout(function () { _this.attributeModificationTimeoutCallback(); }, 200); this._attributeModifiedTimeoutWaiting = true; } } else { this.attributeModificationTimeoutCallback(); } if (callback) { callback(element); } } }; MutationManager.prototype.treeModificationTimeoutCallback = function () { var _this = this; var uids = Object.keys(this._treeModifiedMap); var modifications = []; uids.forEach(function (uidToAppend) { var mappedNodeToAppend = _this._treeModifiedMap[uidToAppend]; modifications.push({ uid: uidToAppend, event: "treeModified", children: mappedNodeToAppend.childrenNodes, childCount: mappedNodeToAppend.childrenNodes ? mappedNodeToAppend.childrenNodes.length : 0 }); }); MutationManager.limitChildListSize(modifications, this._treeModifiedMap); this._treeModifiedMap = {}; this._treeModifiedCallback(modifications); this._treeModifiedTimeoutWaiting = false; }; MutationManager.prototype.attributeModificationTimeoutCallback = function () { var _this = this; var attributeModificationList = []; var uids = Object.keys(this._attributeModifiedMap); uids.forEach(function (uid) { var mappedNode = _this._attributeModifiedMap[uid]; if (mappedNode.pendingAttrModified) { var attributeNames = Object.keys(mappedNode.pendingAttrModified); attributeNames.forEach(function (attributeName) { var attributeModification = mappedNode.pendingAttrModified[attributeName]; attributeModificationList.push({ uid: uid, attrName: attributeName, newValue: attributeModification.newValue, attrChange: attributeModification.attrChange }); }); } mappedNode.pendingAttrModified = {}; }); this._attributeModifiedMap = {}; this._attributeModifiedCallback(attributeModificationList); this._attributeModifiedTimeoutWaiting = false; }; MutationManager.prototype.lookupMappedNode = function (element) { var mappedNode = null; var uid = element["uniqueID"] || element["bpt-uid"]; if (uid) { if (htmlTreeHelpers.mapping[uid] && htmlTreeHelpers.mapping[uid].ele === element) { mappedNode = htmlTreeHelpers.mapping[uid]; } } else { for (uid in htmlTreeHelpers.mapping) { if (htmlTreeHelpers.mapping[uid].ele === element) { mappedNode = htmlTreeHelpers.mapping[uid]; break; } } } return mappedNode; }; return MutationManager; })(); RemoteDom.MutationManager = MutationManager; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // remoteElementCopier.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var RemoteElementCopier = (function () { function RemoteElementCopier(_diagOmStyles) { this._diagOmStyles = _diagOmStyles; } RemoteElementCopier.constructDoctypeString = function (node) { var doctype = ""; if (node) { doctype = ""; } return doctype; }; RemoteElementCopier.prototype.computeHtmlForAncestorsAndDescendants = function (elementToCopy) { var root = this.copyElementPlusAncestors(elementToCopy); var doctype = RemoteElementCopier.constructDoctypeString(elementToCopy.ownerDocument.doctype); var htmlTag = this.constructHtmlTagString(elementToCopy); var elementsToSearchForStyles = this.findElementsToSearchForStyles(elementToCopy); var elementToStyleRulesMap = this.makeElementToStyleRulesMap(elementsToSearchForStyles); var orderedStyleRules = this.putRulesInTheRightOrder(elementToStyleRulesMap); var result = doctype + "\r\n" + htmlTag + "\r\n\r\n\r\n\r\n\r\n"; result += root.outerHTML; result += "\r\n\r\n"; return result; }; RemoteElementCopier.prototype.copyElementPlusAncestors = function (elementToCopy) { var ancestorElements = []; var ancestorElement = elementToCopy.parentElement; if (elementToCopy.tagName !== "BODY") { while (ancestorElement) { ancestorElements.push(ancestorElement); ancestorElement = ancestorElement.parentElement; if (ancestorElement && !ancestorElement.parentElement) { ancestorElement = null; } } } var container = null; var root = null; var styleSet = {}; for (var i = ancestorElements.length - 1; i >= 0; i--) { var createdAncestor = this.copyElementWithAttributes(ancestorElements[i]); if (container) { container.appendChild(createdAncestor); } else { root = createdAncestor; } container = createdAncestor; } var copy = this.copyElementWithAttributes(elementToCopy); copy.innerHTML = elementToCopy.innerHTML; if (container) { container.appendChild(copy); return root; } return copy; }; RemoteElementCopier.prototype.findElementsToSearchForStyles = function (element) { var ancestorsAndDescendants = []; var nextElement = element; while (nextElement) { ancestorsAndDescendants.push(nextElement); nextElement = nextElement.parentElement; } var elementsToSearchForChildren = [element]; while (elementsToSearchForChildren.length > 0) { var elementToProcess = elementsToSearchForChildren.pop(); var currentChildren = elementToProcess.children; if (currentChildren) { for (var i = 0; i < currentChildren.length; i++) { elementsToSearchForChildren.push(currentChildren[i]); ancestorsAndDescendants.push(currentChildren[i]); } } } return ancestorsAndDescendants; }; RemoteElementCopier.prototype.getTextForRules = function (styleRules) { var cssText = ""; styleRules.forEach(function (rule) { if (rule.parentRule && rule.parentRule) { var mediaRule = rule.parentRule; if (mediaRule.media && mediaRule.media.mediaText) { cssText += "/* @media " + mediaRule.media.mediaText + " */\r\n"; } else if (rule.parentStyleSheet) { var linkElement = rule.parentStyleSheet.owningElement; if (linkElement.tagName === "LINK" && linkElement.media) { cssText += "/* media " + linkElement.media + "*/\r\n"; } } } cssText += rule.selectorText; cssText += " {\r\n"; var styleDeclaration = rule.style; var stylePropertyList = styles.getParsedPropertyList(styleDeclaration); for (var i = 0; i < stylePropertyList.length; i++) { try { var styleProperty = stylePropertyList[i]; var name = styleProperty.propertyName; var value = styleProperty.value; var importance = styleProperty.important; if (name) { cssText += "\t" + name + ": "; if (value) { cssText += value; } if (importance) { cssText += " !important"; } cssText += ";\r\n"; } } catch (e) { Common.RemoteHelpers.encounteredException(e); } } cssText += "}\r\n"; }); return cssText; }; RemoteElementCopier.prototype.makeElementToStyleRulesMap = function (elements) { var result = []; for (var i = 0; i < elements.length; i++) { var element = elements[i]; var styleRules = this.getStyleRules(element); if (styleRules.length > 0) { result.push({ element: element, styleRules: styleRules }); } } return result; }; RemoteElementCopier.prototype.getStyleRules = function (element) { var styleRules = []; this._diagOmStyles.calculateTracedStyles(element); try { var appliedStyles = this._diagOmStyles.getTracedStyles(element).getAppliedStyles(); } catch (ex) { return styleRules; } for (var i = appliedStyles.length - 1; i >= 0; i--) { var styleRule = Common.RemoteHelpers.getRuleForStyleObject(appliedStyles[i], element); if (styleRule) { styleRules.push(styleRule); } } return styleRules; }; RemoteElementCopier.prototype.copyElementWithAttributes = function (source) { var copy = source.ownerDocument.createElement(source.tagName); for (var i = 0; i < source.attributes.length; i++) { copy.setAttribute(source.attributes[i].name, source.attributes[i].value); } return copy; }; RemoteElementCopier.prototype.constructHtmlTagString = function (elementToCopy) { var node = elementToCopy.ownerDocument.documentElement; var htmlTag = ""; if (node && node.attributes) { htmlTag = " indexOfRule) { orderedRules.splice(indexOfPrecedingRule, 1); orderedRules.splice(indexOfRule, 0, precedingRule); } } precedingRule = rule; } } return orderedRules; }; return RemoteElementCopier; })(); RemoteDom.RemoteElementCopier = RemoteElementCopier; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // remoteDomService.ts var domexplorer; (function (domexplorer) { (function (Remote) { var RemoteHelpers = Common.RemoteHelpers; var RemoteDomService = (function () { function RemoteDomService(browser) { this._browser = browser; } Object.defineProperty(RemoteDomService.prototype, "browser", { get: function () { return this._browser; }, enumerable: true, configurable: true }); RemoteDomService.prototype.initialize = function () { this._loaded = false; this._callbacks = {}; if (this._browser.document.readyState !== "loading") { this._loaded = true; } else { var view = RemoteHelpers.getDefaultView(this._browser.document); this._onLoadListener = RemoteHelpers.addSafeListener(view, this._browser.document, "DOMContentLoaded", this.onload.bind(this)); } }; RemoteDomService.prototype.cleanUp = function () { if (this._onLoadListener) { RemoteHelpers.removeListener(this._browser.document, "DOMContentLoaded", this._onLoadListener); } this._callbacks = {}; }; RemoteDomService.prototype.onload = function () { if (this._loaded) { throw new Error("DOM loaded multiple times."); } this._loaded = true; this.fireEvent("loaded", null); }; RemoteDomService.prototype.fireEvent = function (type, arg) { if (this._callbacks[type]) { for (var i = 0, n = this._callbacks[type].length; i < n; i++) { this._callbacks[type][i](arg); } } }; RemoteDomService.prototype.attachEvent = function (type, callback) { if (!this._callbacks[type]) { this._callbacks[type] = []; } this._callbacks[type].push(callback); }; RemoteDomService.prototype.addEventListener = function (type, callback) { switch (type) { case "loaded": if (this._loaded) { callback(); } this.attachEvent(type, callback); break; default: throw new Error("Invalid event listener type."); } }; RemoteDomService.prototype.removeEventListener = function (type, callback) { if (!this._callbacks) { return; } if (this._callbacks[type]) { var index = this._callbacks[type].lastIndexOf(callback); if (index !== -1) { this._callbacks[type].splice(index, 1); } } }; return RemoteDomService; })(); Remote.RemoteDomService = RemoteDomService; })(domexplorer.Remote || (domexplorer.Remote = {})); var Remote = domexplorer.Remote; })(domexplorer || (domexplorer = {})); // appliedStyleRule.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var AppliedStyleRule = (function () { function AppliedStyleRule(targetElement, cachedStyle, wasCreatedInSession) { if (typeof wasCreatedInSession === "undefined") { wasCreatedInSession = false; } this.wasCreatedInSession = wasCreatedInSession; this.properties = []; this.uid = cachedStyle.uid; this.isInlined = targetElement.style === cachedStyle.style; var cssRule = cachedStyle.rule; this.selector = cssRule ? cssRule.selectorText : undefined; this.parent = this.computeParentMediaRule(cssRule); this.declarationLocation = cachedStyle.source; if (cssRule && cssRule.parentStyleSheet) { this.styleHref = cssRule.parentStyleSheet.href; } if (!wasCreatedInSession) { this.originalSelector = this.selector; } } Object.defineProperty(AppliedStyleRule.prototype, "hasChanged", { get: function () { if (!this.properties.length || (this.wasCreatedInSession && this.isDeleted)) { return false; } if (!this.wasCreatedInSession && !this.isInlined && this.selector !== this.originalSelector) { return true; } for (var i = 0; i < this.properties.length; i++) { if (this.properties[i].hasChanged) { return true; } } return false; }, enumerable: true, configurable: true }); AppliedStyleRule.prototype.setIsInheritedAndTarget = function (isInherited, messageHandlers, targetElement) { this.isInherited = isInherited; this.target = new RemoteDom.AppliedStyleTarget(this.isInherited ? messageHandlers.getElementUid(targetElement) : this.uid, targetElement); }; AppliedStyleRule.prototype.addProperty = function (property, position) { this.properties.splice(position, 0, property); }; AppliedStyleRule.prototype.removeProperty = function (property) { for (var i = 0; i < this.properties.length; i++) { if (this.properties[i] === property) { this.properties.splice(i, 1); return; } } }; AppliedStyleRule.prototype.clearProperties = function () { this.properties = []; }; AppliedStyleRule.prototype.forEachProperty = function (func) { for (var i = 0; i < this.properties.length; i++) { func(this.properties[i]); } }; AppliedStyleRule.prototype.computeParentMediaRule = function (ruleApplied) { var parentRule = null; if (ruleApplied) { var mediaParentRule = ruleApplied.parentRule; if (mediaParentRule && mediaParentRule.media) { parentRule = "@media " + mediaParentRule.media.mediaText; } else if (ruleApplied.parentStyleSheet) { var linkElement = ruleApplied.parentStyleSheet.owningElement; if (linkElement.tagName === "LINK" && linkElement.media) { parentRule = "media " + linkElement.media; } } } return parentRule; }; return AppliedStyleRule; })(); RemoteDom.AppliedStyleRule = AppliedStyleRule; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // appliedStyleTarget.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var AppliedStyleTarget = (function () { function AppliedStyleTarget(uid, element) { this.uid = uid; this.description = element.tagName.toLowerCase(); var id = element.getAttribute("id"); if (id) { this.description += "#" + id; } else { var className = element.className; if (className && typeof className === "string" && className.trim().length > 0) { this.description += "." + className.trim().split(" ")[0]; } } } return AppliedStyleTarget; })(); RemoteDom.AppliedStyleTarget = AppliedStyleTarget; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // appliedStyleProperty.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var AppliedStyleProperty = (function () { function AppliedStyleProperty(current, status, wasCreatedInSession) { if (typeof wasCreatedInSession === "undefined") { wasCreatedInSession = false; } this.current = current; this.status = status; this.wasCreatedInSession = wasCreatedInSession; this.longhand = []; this.isApplied = true; this.uid = remoteHelpers.getUid(); if (!wasCreatedInSession) { this.original = new RemoteDom.AppliedPropertyValue(current.name, current.value, current.isImportant, current.isEnabled); this._isSettingOriginalLonghands = true; } } Object.defineProperty(AppliedStyleProperty.prototype, "hasChanged", { get: function () { var original = this.original; var current = this.current; if (this.wasCreatedInSession && (this.status !== RemoteDom.DiagnosticProperty.VALID_STATUS || this.current.isEnabled)) { return true; } if (!this.wasCreatedInSession && this.isDeleted) { return true; } if (original && (original.name !== current.name || original.value !== current.value || original.isImportant !== current.isImportant || original.isEnabled !== current.isEnabled)) { return true; } if (this.longhand.length && (!this.originalLonghand || this.originalLonghand.length === this.longhand.length)) { for (var i = 0; i < this.longhand.length; i++) { var subproperty = this.longhand[i]; original = this.originalLonghand ? this.originalLonghand[i] : null; current = subproperty.current; if (original && (original.name !== current.name || original.value !== current.value || original.isImportant !== current.isImportant || original.isEnabled !== current.isEnabled)) { return true; } if (!original && !current.isEnabled) { return true; } } } return false; }, enumerable: true, configurable: true }); AppliedStyleProperty.prototype.addLonghandProperty = function (property, position) { this.longhand.splice(position, 0, property); if (this._isSettingOriginalLonghands) { if (!this.originalLonghand) { this.originalLonghand = []; } var current = property.current; this.originalLonghand.push(new RemoteDom.AppliedPropertyValue(current.name, current.value, current.isImportant, current.isEnabled)); } }; AppliedStyleProperty.prototype.clearLonghandProperties = function () { this.longhand = []; this._isSettingOriginalLonghands = false; }; return AppliedStyleProperty; })(); RemoteDom.AppliedStyleProperty = AppliedStyleProperty; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // remoteColorPicker.ts var domexplorer; (function (domexplorer) { (function (Remote) { var RemoteDomService = domexplorer.Remote.RemoteDomService; var RemoteColorPicker = (function () { function RemoteColorPicker(remoteDomService, diagnostics) { this._remoteDomService = remoteDomService; this._diagnostics = diagnostics; this._onLoadCallback = this.onLoad.bind(this); this._onTimeoutCallback = this.onTimeout.bind(this); this._stepNodesCallback = this.stepNodes.bind(this); this._stepStylesCallback = this.stepStyles.bind(this); } RemoteColorPicker.prototype.startPalette = function (callback) { if (this._running) { this.stopPalette(); } this._remoteDomService.initialize(); this._callback = callback; this._colors = []; this._running = true; this._diagnostics.setTimeout(this._onTimeoutCallback, 10000); this._remoteDomService.addEventListener("loaded", this._onLoadCallback); }; RemoteColorPicker.prototype.stopPalette = function () { this._remoteDomService.removeEventListener("loaded", this._onLoadCallback); this._diagnostics.clearTimeout(this._onTimeoutCallback); this.clearImmediate(this._stepNodesCallback); this.clearImmediate(this._stepStylesCallback); this._running = false; this._remoteDomService.cleanUp(); }; RemoteColorPicker.prototype.submitPalette = function () { F12.Tools.Utility.Assert.isTrue(this._running); if (this._nodesCounted && this._stylesCounted) { this.stopPalette(); this._callback(this._colors); } }; RemoteColorPicker.prototype.onTimeout = function () { F12.Tools.Utility.Assert.isTrue(this._running); this._nodesCounted = true; this._stylesCounted = true; this.submitPalette(); }; RemoteColorPicker.prototype.onLoad = function () { F12.Tools.Utility.Assert.isTrue(this._running); this._nodes = []; this._rules = []; this._sheets = []; this._nodesCounted = false; this._stylesCounted = false; try { var document = this._remoteDomService.browser.document; this._nodes.push(document.body); for (var i = 0, n = document.styleSheets.length; i < n; i++) { this._sheets.push(document.styleSheets[i]); } this.setImmediate(this._stepNodesCallback); this.setImmediate(this._stepStylesCallback); } catch (ex) { this.stopPalette(); } }; RemoteColorPicker.prototype.stepNodes = function () { F12.Tools.Utility.Assert.isTrue(this._running); try { var found = []; for (var i = 0; i < RemoteColorPicker.MAX_STEP_COUNT && this._nodes.length > 0 && this._running; i++) { var node = this._nodes.pop(); var colors = this.getColors(node); this._colors = this._colors.concat(colors); if (node.childNodes) { for (var j = 0, n = node.childNodes.length; j < n; j++) { this._nodes.push(node.childNodes[j]); } } } if (this._nodes.length > 0) { this.setImmediate(this._stepNodesCallback); } else { this._nodesCounted = true; this.submitPalette(); } } catch (ex) { this.stopPalette(); } }; RemoteColorPicker.prototype.stepStyles = function () { F12.Tools.Utility.Assert.isTrue(this._running); try { var found = []; if (this._rules.length === 0) { if (this._sheets.length === 0) { return; } var sheet = this._sheets.pop(); if (typeof sheet !== "undefined" && typeof sheet.rules !== "undefined") { for (var i = 0, n = sheet.rules.length; i < n; i++) { this._rules.push(sheet.rules[i]); } } if (sheet.imports) { for (var i = 0, n = sheet.imports.length; i < n; i++) { this._sheets.push(sheet.imports[i]); } } } for (var i = 0; i < RemoteColorPicker.MAX_STEP_COUNT && this._rules.length > 0; i++) { var rule = this._rules.pop(); var colors = this.getColors(rule); this._colors = this._colors.concat(colors); } if (this._sheets.length > 0 || this._rules.length > 0) { this.setImmediate(this._stepStylesCallback); } else { this._stylesCounted = true; this.submitPalette(); } } catch (ex) { this.stopPalette(); } }; RemoteColorPicker.prototype.getColors = function (item) { var found = []; var prop; if (item && item.style) { for (var i = 0, n = RemoteColorPicker.COLOR_PROPERTIES.length; i < n; i++) { prop = RemoteColorPicker.COLOR_PROPERTIES[i]; var value = item.style[prop]; if (value) { found.push(value); } } } return found; }; RemoteColorPicker.prototype.setImmediate = function (callback) { this._diagnostics.setTimeout(callback, 0); }; RemoteColorPicker.prototype.clearImmediate = function (callback) { this._diagnostics.clearTimeout(callback); }; RemoteColorPicker.MAX_STEP_COUNT = 25; RemoteColorPicker.COLOR_PROPERTIES = [ "backgroundColor", "borderBottomColor", "borderColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "columnRuleColor", "floodColor", "lightingColor", "outlineColor", "scrollbar3dLightColor", "scrollbarArrowColor", "scrollbarBaseColor", "scrollbarShadowColor", "scrollbarDarkShadowColor", "scrollbarFaceColor", "scrollbarHighlightColor", "scrollbarTrackColor", "stopColor" ]; return RemoteColorPicker; })(); Remote.RemoteColorPicker = RemoteColorPicker; })(domexplorer.Remote || (domexplorer.Remote = {})); var Remote = domexplorer.Remote; })(domexplorer || (domexplorer = {})); // mappedStylePropertyCollection.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var MappedStylePropertyCollection = (function () { function MappedStylePropertyCollection() { this._mappedProperties = []; } Object.defineProperty(MappedStylePropertyCollection.prototype, "propertyNames", { get: function () { var names = ""; this._mappedProperties.forEach(function (mappedProperty) { names += "." + mappedProperty.appliedProperty.current.name; }); return names; }, enumerable: true, configurable: true }); Object.defineProperty(MappedStylePropertyCollection.prototype, "isEmpty", { get: function () { return !this._mappedProperties.length; }, enumerable: true, configurable: true }); Object.defineProperty(MappedStylePropertyCollection.prototype, "hasAppliedProperties", { get: function () { for (var i = 0; i < this._mappedProperties.length; i++) { if (this._mappedProperties[i].appliedProperty.isApplied) { return true; } } return false; }, enumerable: true, configurable: true }); Object.defineProperty(MappedStylePropertyCollection.prototype, "length", { get: function () { return this._mappedProperties.length; }, enumerable: true, configurable: true }); MappedStylePropertyCollection.prototype.addProperty = function (mappedProperty, position) { if (typeof position === "undefined") { position = -1; } if (position < 0 || position >= this._mappedProperties.length) { this._mappedProperties.push(mappedProperty); this._mappedProperties.length - 1; position = this._mappedProperties.length; } else { this._mappedProperties.splice(position, 0, mappedProperty); } this.addAppliedProperty(mappedProperty.appliedProperty, position); }; MappedStylePropertyCollection.prototype.addAppliedProperty = function (appliedProperty, position) { }; MappedStylePropertyCollection.prototype.removeProperty = function (removeMappedProperty) { for (var i = 0; i < this._mappedProperties.length; i++) { var mappedProperty = this._mappedProperties[i]; if (mappedProperty === removeMappedProperty) { this._mappedProperties.splice(i, 1); this.removeAppliedProperty(mappedProperty.appliedProperty); } } }; MappedStylePropertyCollection.prototype.removeAppliedProperty = function (appliedProperty) { }; MappedStylePropertyCollection.prototype.forEachProperty = function (func) { for (var i = 0; i < this._mappedProperties.length; i++) { if (func(this._mappedProperties[i], i)) { return i; } } return -1; }; MappedStylePropertyCollection.prototype.clearProperties = function () { this._mappedProperties = []; this.clearAppliedProperties(); }; MappedStylePropertyCollection.prototype.clearAppliedProperties = function () { }; MappedStylePropertyCollection.prototype.lookupMappedProperty = function (matches) { for (var i = 0; i < this._mappedProperties.length; i++) { var mappedProperty = this._mappedProperties[i]; var matched = matches(mappedProperty); if (matched) { return matched; } } }; MappedStylePropertyCollection.prototype.lookupMappedPropertyPosition = function (mappedProperty) { for (var i = 0; i < this._mappedProperties.length; i++) { if (mappedProperty === this._mappedProperties[i]) { return i; } } return -1; }; return MappedStylePropertyCollection; })(); RemoteDom.MappedStylePropertyCollection = MappedStylePropertyCollection; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // mappedStyleProperty.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (RemoteDom) { var MappedStyleProperty = (function (_super) { __extends(MappedStyleProperty, _super); function MappedStyleProperty(appliedProperty, mappedRule, diagProperty, _owner) { _super.call(this); this.appliedProperty = appliedProperty; this.mappedRule = mappedRule; this.diagProperty = diagProperty; this._owner = _owner; } MappedStyleProperty.prototype.setEnabled = function (isEnabled) { this.forEachProperty(function (mappedProperty) { mappedProperty.setEnabled(isEnabled); return false; }); this.diagProperty.enabled = isEnabled; this.appliedProperty.current.isEnabled = isEnabled; if (this._owner && isEnabled) { this._owner.appliedProperty.current.isEnabled = true; } }; MappedStyleProperty.prototype.setValue = function (value, isImportant, wasEnabledOrInvalid) { var current = this.appliedProperty.current; var oldValue = current.value; var oldImportant = current.isImportant; var setFunc = function () { current.value = value; current.isImportant = isImportant; }; var resetFunc = function () { current.value = oldValue; current.isImportant = oldImportant; }; var succeeded = this.mappedRule.commitChanges(setFunc, resetFunc, this.mappedRule.lookupMappedPropertyPosition(this)); if (succeeded) { this.diagProperty.enabled = !this.diagProperty.isEmptyInvalid && wasEnabledOrInvalid && this.diagProperty.isValid; current.isEnabled = this.diagProperty.enabled; } return succeeded; }; MappedStyleProperty.prototype.setName = function (name, longhandEnabledStates) { var current = this.appliedProperty.current; var oldName = current.name; var setFunc = function () { current.name = name; }; var resetFunc = function () { current.name = oldName; }; var succeeded = this.mappedRule.commitChanges(setFunc, resetFunc, this.mappedRule.lookupMappedPropertyPosition(this)); if (succeeded) { this.mappedRule.setAppliedState(this); if (longhandEnabledStates) { this.resetLonghandEnabledStates(longhandEnabledStates); } } return succeeded; }; MappedStyleProperty.prototype.setAll = function (name, value, isImportant, isEnabled, longhandEnabledStates) { var current = this.appliedProperty.current; var oldName = current.name; var oldValue = current.value; var oldImportant = current.isImportant; var setFunc = function () { current.name = name; current.value = value; current.isImportant = isImportant; }; var resetFunc = function () { current.value = oldValue; current.isImportant = oldImportant; }; var succeeded = this.mappedRule.commitChanges(setFunc, resetFunc, this.mappedRule.lookupMappedPropertyPosition(this)); if (succeeded) { this.diagProperty.enabled = isEnabled; current.isEnabled = this.diagProperty.enabled; this.mappedRule.setAppliedState(this); if (longhandEnabledStates) { this.resetLonghandEnabledStates(longhandEnabledStates); } } return succeeded; }; MappedStyleProperty.prototype.addAppliedProperty = function (appliedProperty, position) { this.appliedProperty.addLonghandProperty(appliedProperty, position); }; MappedStyleProperty.prototype.clearAppliedProperties = function () { this.appliedProperty.clearLonghandProperties(); }; MappedStyleProperty.prototype.getLonghandEnabledStates = function () { var enabledStates; var longhand = this.appliedProperty.longhand; if (longhand) { enabledStates = []; longhand.forEach(function (property) { enabledStates.push(property.current.isEnabled); }); } return enabledStates; }; MappedStyleProperty.prototype.resetLonghandEnabledStates = function (enabledStates) { var longhand = this.diagProperty.longhands; if (longhand && enabledStates && longhand.length === enabledStates.length) { var appliedLonghand = this.appliedProperty.longhand; for (var i = 0; i < longhand.length; i++) { longhand[i].enabled = enabledStates[i]; appliedLonghand[i].current.isEnabled = longhand[i].enabled; } } }; return MappedStyleProperty; })(RemoteDom.MappedStylePropertyCollection); RemoteDom.MappedStyleProperty = MappedStyleProperty; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // stylePropertyMap.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var StylePropertyMap = (function () { function StylePropertyMap() { this._properties = {}; } StylePropertyMap.prototype.add = function (uid, property) { this._properties[uid] = property; }; StylePropertyMap.prototype.remove = function (uid) { delete this._properties[uid]; }; StylePropertyMap.prototype.lookupByUid = function (uid) { return this._properties[uid]; }; StylePropertyMap.prototype.clear = function () { this._properties = {}; }; StylePropertyMap.prototype.forEach = function (func) { for (var uid in this._properties) { func(this._properties[uid]); } }; return StylePropertyMap; })(); RemoteDom.StylePropertyMap = StylePropertyMap; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // styleRuleMap.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var StyleRuleMap = (function () { function StyleRuleMap() { this._rules = {}; } StyleRuleMap.prototype.add = function (uid, rule) { this._rules[uid] = rule; }; StyleRuleMap.prototype.remove = function (uid) { delete this._rules[uid]; }; StyleRuleMap.prototype.lookupByUid = function (uid) { return this._rules[uid]; }; StyleRuleMap.prototype.clear = function () { this._rules = {}; }; return StyleRuleMap; })(); RemoteDom.StyleRuleMap = StyleRuleMap; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // mappedStyleRule.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (RemoteDom) { var MappedStyleRule = (function (_super) { __extends(MappedStyleRule, _super); function MappedStyleRule(_styleUtilities, appliedRule, cachedStyle, element) { _super.call(this); this._styleUtilities = _styleUtilities; this.appliedRule = appliedRule; this.cachedStyle = cachedStyle; this.element = element; } Object.defineProperty(MappedStyleRule.prototype, "cssText", { get: function () { var text = ""; this.forEachProperty(function (mappedProperty) { var current = mappedProperty.appliedProperty.current; text += MappedStyleRule.preparePropertyName(current.name) + ": "; text += MappedStyleRule.preparePropertyValue(current.value + (current.isImportant ? " !important" : "")) + "; "; }); return text; }, enumerable: true, configurable: true }); MappedStyleRule.prepareSelector = function (selector) { return selector; }; MappedStyleRule.preparePropertyName = function (name) { return name; }; MappedStyleRule.preparePropertyValue = function (value) { return value; }; MappedStyleRule.prototype.addAppliedProperty = function (appliedProperty, position) { this.appliedRule.addProperty(appliedProperty, position); }; MappedStyleRule.prototype.removeAppliedProperty = function (appliedProperty) { this.appliedRule.removeProperty(appliedProperty); }; MappedStyleRule.prototype.clearAppliedProperties = function () { this.appliedRule.clearProperties(); }; MappedStyleRule.prototype.lookupActiveMappedProperty = function (propertyName) { return this.lookupMappedProperty(function (mappedProperty) { if (mappedProperty.diagProperty.enabled && mappedProperty.diagProperty.activeInBlock && mappedProperty.appliedProperty.current.name === propertyName) { return mappedProperty; } return mappedProperty.lookupMappedProperty(function (mappedProperty) { if (mappedProperty.diagProperty.enabled && mappedProperty.diagProperty.activeInBlock && mappedProperty.appliedProperty.current.name === propertyName) { return mappedProperty; } }); }); }; MappedStyleRule.prototype.setAppliedState = function (mappedProperty) { mappedProperty.appliedProperty.isApplied = this._styleUtilities.getAppliedState(mappedProperty); }; MappedStyleRule.prototype.propertyAdd = function (name, value, isImportant, isEnabled, mappedProperty, beforeUid, longhandEnabledStates) { var _this = this; var appliedProperty; if (mappedProperty) { appliedProperty = mappedProperty.appliedProperty; appliedProperty.current.name = name; appliedProperty.current.value = value; appliedProperty.current.isImportant = isImportant; appliedProperty.current.isEnabled = isEnabled; mappedProperty.diagProperty = null; mappedProperty.mappedRule = this; } else { appliedProperty = new RemoteDom.AppliedStyleProperty(new RemoteDom.AppliedPropertyValue(name, value, isImportant, isEnabled), RemoteDom.DiagnosticProperty.VALID_STATUS, true); mappedProperty = new RemoteDom.MappedStyleProperty(appliedProperty, this, null); } var beforeProperty = beforeUid ? this.lookupMappedProperty(function (afterProperty) { if (afterProperty.appliedProperty.uid === beforeUid) { return afterProperty; } }) : null; var position = beforeProperty ? this.lookupMappedPropertyPosition(beforeProperty) : this.length; var setFunc = function () { _this.addProperty(mappedProperty, position); }; var resetFunc = function () { _this.removeProperty(mappedProperty); }; if (this.commitChanges(setFunc, resetFunc, position)) { this._styleUtilities.mapProperty(mappedProperty); this.setAppliedState(mappedProperty); if (longhandEnabledStates) { mappedProperty.resetLonghandEnabledStates(longhandEnabledStates); } return mappedProperty; } }; MappedStyleRule.prototype.propertyHardRemove = function (mappedProperty) { var _this = this; var position = this.lookupMappedPropertyPosition(mappedProperty); var setFunc = function () { _this.removeProperty(mappedProperty); }; var resetFunc = function () { _this.addProperty(mappedProperty, position); }; if (this.commitChanges(setFunc, resetFunc)) { this._styleUtilities.unmapProperty(mappedProperty); return true; } return false; }; MappedStyleRule.prototype.remove = function () { var _this = this; var deleteStates = []; var setFunc = function () { _this.forEachProperty(function (mappedProperty) { deleteStates.push(mappedProperty.isDeleted); mappedProperty.isDeleted = true; }); }; var resetFunc = function () { var next = 0; _this.forEachProperty(function (mappedProperty) { mappedProperty.isDeleted = deleteStates[next++]; }); }; var isSuccess = this.commitChanges(setFunc, resetFunc); if (isSuccess) { this.appliedRule.isDeleted = true; this.forEachProperty(function (mappedProperty) { mappedProperty.appliedProperty.isDeleted = true; }); } return isSuccess ? deleteStates : null; }; MappedStyleRule.prototype.unremove = function (deleteStates, enableStates, enabledLonghandStates) { var _this = this; if (deleteStates.length !== this.length || enableStates.length !== this.length || enabledLonghandStates.length !== this.length) { return false; } var next; var setFunc = function () { next = 0; _this.forEachProperty(function (mappedProperty) { mappedProperty.isDeleted = deleteStates ? deleteStates[next++] : false; }); }; var resetFunc = function () { _this.forEachProperty(function (mappedProperty) { mappedProperty.isDeleted = true; }); }; var isSuccess = this.commitChanges(setFunc, resetFunc); if (isSuccess) { this.appliedRule.isDeleted = false; if (enableStates) { next = 0; this.forEachProperty(function (mappedProperty) { mappedProperty.appliedProperty.isDeleted = mappedProperty.isDeleted; mappedProperty.diagProperty.enabled = enableStates[next]; mappedProperty.appliedProperty.current.isEnabled = mappedProperty.diagProperty.enabled; mappedProperty.resetLonghandEnabledStates(enabledLonghandStates[next]); next++; }); } } return isSuccess; }; MappedStyleRule.prototype.propertyRemove = function (mappedProperty) { mappedProperty.diagProperty.enabled = false; mappedProperty.isDeleted = true; mappedProperty.appliedProperty.isDeleted = true; this.refresh(false); return true; }; MappedStyleRule.prototype.propertyUnremove = function (mappedProperty, isEnabled, longhandEnabledStates) { mappedProperty.isDeleted = false; mappedProperty.appliedProperty.isDeleted = false; mappedProperty.diagProperty.enabled = isEnabled; mappedProperty.appliedProperty.current.isEnabled = mappedProperty.diagProperty.enabled; if (longhandEnabledStates) { mappedProperty.resetLonghandEnabledStates(longhandEnabledStates); } this.refresh(false); return true; }; MappedStyleRule.prototype.removeAllProperties = function () { var _this = this; var properties = []; this.forEachProperty(function (mappedProperty) { properties.push(mappedProperty); return false; }); var setFunc = function () { _this.clearProperties(); }; var resetFunc = function () { properties.forEach(function (mappedProperty) { _this.addProperty(mappedProperty); return false; }); }; return this.commitChanges(setFunc, resetFunc); }; MappedStyleRule.prototype.movePropertiesFromRule = function (otherRule) { var _this = this; var newProperties = []; var longhandEnabledStates = []; var setFunc = function () { otherRule.forEachProperty(function (mappedProperty) { newProperties.push(mappedProperty); longhandEnabledStates.push(mappedProperty.getLonghandEnabledStates()); _this.addProperty(mappedProperty); mappedProperty.mappedRule = _this; mappedProperty.forEachProperty(function (subproperty) { subproperty.mappedRule = _this; }); }); }; var resetFunc = function () { otherRule.forEachProperty(function (mappedProperty) { _this.removeProperty(mappedProperty); mappedProperty.mappedRule = otherRule; mappedProperty.forEachProperty(function (subproperty) { subproperty.mappedRule = otherRule; }); }); }; if (this.commitChanges(setFunc, resetFunc) && otherRule.removeAllProperties()) { newProperties.forEach(function (mappedProperty, index) { mappedProperty.resetLonghandEnabledStates(longhandEnabledStates[index]); }); return true; } return false; }; MappedStyleRule.prototype.reconcileProperty = function (updateApplied, mappedProperty, diagProperty, isDynamicUpdate) { var _this = this; var appliedProperty = mappedProperty.appliedProperty; mappedProperty.diagProperty = diagProperty; var changed = false; try { var current = appliedProperty.current; var wasEnabled = current.isEnabled; if (isDynamicUpdate && mappedProperty.isDeleted) { current.isEnabled = true; mappedProperty.isDeleted = false; if (updateApplied) { appliedProperty.isDeleted = false; } } if (diagProperty.isValid) { if (appliedProperty.status !== RemoteDom.DiagnosticProperty.VALID_STATUS) { diagProperty.enabled = true; } else if (!current.isEnabled) { diagProperty.enabled = false; } current.isEnabled = diagProperty.enabled; } else { current.isEnabled = false; } if (wasEnabled !== current.isEnabled || mappedProperty.isDeleted !== appliedProperty.isDeleted) { changed = true; } if (updateApplied) { if (current.name !== diagProperty.propertyName || current.value !== diagProperty.value || appliedProperty.status !== diagProperty.status || current.isImportant !== diagProperty.important) { changed = true; current.name = diagProperty.propertyName; current.value = diagProperty.value; appliedProperty.status = diagProperty.status; current.isImportant = diagProperty.important; if (isDynamicUpdate) { appliedProperty.wasCreatedInSession = false; appliedProperty.original = new RemoteDom.AppliedPropertyValue(current.name, current.value, current.isImportant, current.isEnabled); } } var originalLonghand = []; var subPropertyNames = mappedProperty.propertyNames; if (subPropertyNames.length && subPropertyNames === diagProperty.longhandNames) { mappedProperty.forEachProperty(function (mappedLonghand, index) { var longhandDiag = diagProperty.longhands[index]; var longhandApplied = mappedLonghand.appliedProperty; mappedLonghand.diagProperty = diagProperty.longhands[index]; longhandApplied.current.value = longhandDiag.value; longhandApplied.current.isImportant = longhandDiag.important; longhandApplied.current.isEnabled = longhandDiag.enabled; originalLonghand.push(new RemoteDom.AppliedPropertyValue(longhandDiag.propertyName, longhandDiag.value, longhandDiag.important, longhandDiag.enabled)); }); } else { mappedProperty.forEachProperty(function (mappedSubProperty) { _this._styleUtilities.unmapProperty(mappedSubProperty); return false; }); mappedProperty.clearProperties(); appliedProperty.longhand = []; if (diagProperty.isShorthand) { for (var i = 0; i < diagProperty.longhands.length; i++) { var diagLonghand = diagProperty.longhands[i]; try { var appliedLonghand = new RemoteDom.AppliedStyleProperty(new RemoteDom.AppliedPropertyValue(diagLonghand.propertyName, diagLonghand.value, diagLonghand.important, diagLonghand.enabled), diagLonghand.status); var mappedLonghand = new RemoteDom.MappedStyleProperty(appliedLonghand, this, diagLonghand, mappedProperty); mappedProperty.addProperty(mappedLonghand); originalLonghand.push(new RemoteDom.AppliedPropertyValue(diagLonghand.propertyName, diagLonghand.value, diagLonghand.important, diagLonghand.enabled)); this._styleUtilities.mapProperty(mappedLonghand); } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } } } if (isDynamicUpdate) { appliedProperty.originalLonghand = originalLonghand; } } } else { mappedProperty.forEachProperty(function (mappedLonghand, index) { mappedLonghand.diagProperty = diagProperty.longhands[index]; return false; }); } } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } return changed; }; MappedStyleRule.prototype.commitChanges = function (setFunc, resetFunc, index) { var _this = this; if (typeof index === "undefined") { index = -1; } var oldLength = this.length; setFunc(); var expectedLength = this.length; var isRemove = oldLength > expectedLength; if (!this.cachedStyle.update(this.cssText)) { resetFunc(); return false; } var propertyList = this.cachedStyle.propertyList; var updateSucceeded = propertyList.length === expectedLength; if (!updateSucceeded) { resetFunc(); this.cachedStyle.update(this.cssText); propertyList = this.cachedStyle.propertyList; } this.forEachProperty(function (mappedProperty, nextIndex) { var diagProperty = propertyList[nextIndex]; if (mappedProperty.isDeleted) { diagProperty.enabled = false; } var needAppliedUpdate = updateSucceeded && !isRemove && (index < 0 || nextIndex === index); _this.reconcileProperty(needAppliedUpdate, mappedProperty, diagProperty, false); }); this._lastCssText = this.cachedStyle.style.cssText; return updateSucceeded; }; MappedStyleRule.prototype.refresh = function (isDynamicUpdate) { var _this = this; var changes = []; if (this.cachedStyle.style && this._lastCssText !== this.cachedStyle.style.cssText) { var listCopy = []; this.forEachProperty(function (mappedProperty, index) { listCopy.push(mappedProperty); return false; }); var propertyList = this.cachedStyle.propertyList; propertyList.forEach(function (diagProperty) { for (var i = 0; i < listCopy.length; i++) { var mappedProperty = listCopy[i]; if (mappedProperty.diagProperty.propertyName === diagProperty.propertyName) { listCopy.splice(i, 1); if (_this.reconcileProperty(true, mappedProperty, diagProperty, isDynamicUpdate)) { changes.push({ event: "updateProperty", uid: mappedProperty.appliedProperty.uid, obj: mappedProperty.appliedProperty, isDynamic: isDynamicUpdate }); } return; } } var mappedProperty = _this._styleUtilities.processPropertyFromAppliedStyle(_this, _this, _this.cachedStyle, diagProperty, null, !isDynamicUpdate); if (mappedProperty) { _this.addProperty(mappedProperty); _this._styleUtilities.mapProperty(mappedProperty); mappedProperty.appliedProperty.isApplied = _this._styleUtilities.getAppliedState(mappedProperty); changes.push({ event: "addProperty", uid: mappedProperty.mappedRule.appliedRule.uid, obj: mappedProperty.appliedProperty, isDynamic: isDynamicUpdate }); } }); listCopy.forEach(function (mappedProperty) { _this.removeProperty(mappedProperty); _this._styleUtilities.unmapProperty(mappedProperty); changes.push({ event: "removeProperty", uid: mappedProperty.appliedProperty.uid, isDynamic: isDynamicUpdate }); }); this._lastCssText = this.cachedStyle.style.cssText; } return changes; }; return MappedStyleRule; })(RemoteDom.MappedStylePropertyCollection); RemoteDom.MappedStyleRule = MappedStyleRule; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // diagnosticProperty.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var DiagnosticProperty = (function () { function DiagnosticProperty(diagProperty, isParsed, _cachedStyle) { this.isParsed = isParsed; this._cachedStyle = _cachedStyle; this.update(diagProperty); if (this.isEmptyInvalid) { this.enabled = false; } } Object.defineProperty(DiagnosticProperty.prototype, "longhandNames", { get: function () { var names = ""; if (this.isShorthand) { this.longhands.forEach(function (longhandDiagProperty) { names += "." + longhandDiagProperty.propertyName; }); } return names; }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "activeInBlock", { get: function () { return this._diagProperty.activeInBlock; }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "enabled", { get: function () { return this._diagProperty.enabled; }, set: function (value) { if (this._diagProperty.enabled !== value) { var wasAllowed = this._cachedStyle.allowMutations; this._cachedStyle.allowMutations = false; this._diagProperty.enabled = value; this._cachedStyle.allowMutations = wasAllowed; } }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "important", { get: function () { return this._diagProperty.important; }, set: function (newImportant) { this._diagProperty.important = newImportant; }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "isShorthand", { get: function () { return this.isValid && this._diagProperty.longhands.length > 0; }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "propertyName", { get: function () { return this._diagProperty.propertyName; }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "value", { get: function () { return this._diagProperty.value; }, set: function (newValue) { this._diagProperty.value = newValue; }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "status", { get: function () { return this.isEmptyInvalid ? "InvalidValue" : this._diagProperty.status; }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "isValid", { get: function () { return this.status === DiagnosticProperty.VALID_STATUS; }, enumerable: true, configurable: true }); Object.defineProperty(DiagnosticProperty.prototype, "isEmptyInvalid", { get: function () { return this._diagProperty.value.length === 0 && DiagnosticProperty.InvalidEmptyProperties.indexOf(this._diagProperty.propertyName) >= 0; }, enumerable: true, configurable: true }); DiagnosticProperty.prototype.update = function (diagProperty) { if (this._diagProperty && this.isParsed) { this._diagProperty.enabled = false; } this._diagProperty = diagProperty; this.longhands = []; if (diagProperty.longhands && diagProperty.longhands.length) { for (var i = 0; i < diagProperty.longhands.length; i++) { try { var longhandDiag = diagProperty.longhands[i]; if (longhandDiag.status) { this.longhands.push(new DiagnosticProperty(longhandDiag, false, this._cachedStyle)); } } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } } } }; DiagnosticProperty.VALID_STATUS = "Valid"; DiagnosticProperty.UNRECOGNIZED_STATUS = "UnrecognizedProperty"; DiagnosticProperty.INVALID_VALUE_STATUS = "InvalidValue"; DiagnosticProperty.InvalidEmptyProperties = [ "background", "background-image", "background-attachment", "background-repeat", "background-position-x", "background-position-y", "background-size", "background-origin", "background-clip", "background-color", "border-image", "content", "font-family", "quotes" ]; return DiagnosticProperty; })(); RemoteDom.DiagnosticProperty = DiagnosticProperty; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // cachedStyle.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var CachedStyle = (function () { function CachedStyle(style, rule) { this.style = style; this.rule = rule; this.allowMutations = true; this.uid = remoteHelpers.getUid(); if (this.rule) { try { var location = styles.getSourceLocation(this.style); if (location && location.fileURI) { this.source = { uri: location.fileURI, line: location.line, column: location.column }; } } catch (e) { Common.RemoteHelpers.encounteredException(e); } } } Object.defineProperty(CachedStyle.prototype, "propertyList", { get: function () { this.refresh(false); return this._propertyList; }, enumerable: true, configurable: true }); CachedStyle.prototype.update = function (cssText) { try { this.allowMutations = false; this.style.cssText = cssText; this.refresh(true); this.allowMutations = true; return true; } catch (e) { this.allowMutations = true; return false; } }; CachedStyle.prototype.refresh = function (force) { if (this.style && (force || !this._propertyList || this._lastCssText !== this.style.cssText)) { var parsedList = styles.getParsedPropertyList(this.style); var mergedList = []; for (var i = 0; i < parsedList.length; i++) { this.addProperty(parsedList[i], true, mergedList); } var dynamicList = styles.getDynamicPropertyList(this.style); for (i = 0; i < dynamicList.length; i++) { var dynamicProperty = dynamicList[i]; var found = false; for (var j = mergedList.length - 1; !found && j >= 0; j--) { var parsedProperty = mergedList[j]; try { if (parsedProperty.propertyName === dynamicProperty.propertyName) { parsedProperty.update(dynamicProperty); parsedProperty.isParsed = false; found = true; } } catch (e) { Common.RemoteHelpers.encounteredException(e); } } if (!found) { this.addProperty(dynamicProperty, false, mergedList); } } this._propertyList = mergedList; this._lastCssText = this.style.cssText; } }; CachedStyle.prototype.addProperty = function (diagProperty, isParsed, mergedList) { var prop; try { prop = new RemoteDom.DiagnosticProperty(diagProperty, isParsed, this); } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } if (prop) { mergedList.push(prop); } }; return CachedStyle; })(); RemoteDom.CachedStyle = CachedStyle; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // remoteStyleCache.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var RemoteStyleCache = (function () { function RemoteStyleCache(_styleUtilities, _messageHandlers) { this._styleUtilities = _styleUtilities; this._messageHandlers = _messageHandlers; this._cache = []; } RemoteStyleCache.prototype.lookup = function (style, element) { var cachedStyle; for (var i = 0; i < this._cache.length; i++) { if (this._cache[i].style === style) { cachedStyle = this._cache[i]; break; } } if (!cachedStyle) { var rule = Common.RemoteHelpers.getRuleForStyleObject(style, element); cachedStyle = new RemoteDom.CachedStyle(style, rule); this._cache.push(cachedStyle); } return cachedStyle; }; RemoteStyleCache.prototype.clear = function () { this._cache = []; }; RemoteStyleCache.prototype.forEach = function (func) { for (var i = 0; i < this._cache.length; i++) { func(this._cache[i]); } }; return RemoteStyleCache; })(); RemoteDom.RemoteStyleCache = RemoteStyleCache; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // styleUtilities.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var StyleUtilities = (function () { function StyleUtilities(_messageHandlers, _domUtilities) { this._messageHandlers = _messageHandlers; this._domUtilities = _domUtilities; this._propertyMap = new RemoteDom.StylePropertyMap(); this._ruleMap = new RemoteDom.StyleRuleMap(); this._currentRules = []; this._forcedPseudoStyling = {}; this._newRuleStyleSheets = {}; this._dummyTracedStyles = { getAppliedProperties: function () { return []; }, getAppliedStyles: function (filter) { return []; }, getInheritanceChain: function (filter) { return []; }, isInheritable: function (property) { return false; } }; this.styleProperties = [ "margin-top", "margin-right", "margin-left", "margin-bottom", "padding-top", "padding-right", "padding-left", "padding-bottom", "border-top-width", "border-right-width", "border-left-width", "border-bottom-width", "width", "height", "left", "top" ]; this.elementProperties = ["clientHeight", "clientWidth", "clientTop", "clientLeft", "offsetLeft", "offsetTop"]; this._styleCache = new RemoteDom.RemoteStyleCache(this, this._messageHandlers); } StyleUtilities.prototype.getComputedStyle = function (element) { var doc = element.ownerDocument; var win = Common.RemoteHelpers.getDefaultView(doc); return Common.RemoteHelpers.getComputedStyle(win, element); }; StyleUtilities.prototype.standardizeLayoutUnits = function (value) { if (value === undefined || value === null) { return; } var groups = String.prototype.match.call(value.toString(), /^(-?[0-9]+(?:\.[0-9]*)?)\s*([a-z]*)$/); if (groups && groups.length > 1) { if (groups[1] === 0) { value = "0"; } else { var decIndex = groups[1].indexOf("."); if (decIndex > -1 && (groups[1].length - decIndex) > 3) { value = "" + parseFloat(groups[1]).toFixed(2) + groups[2]; } if (!groups[2]) { value += "px"; } } } return value; }; StyleUtilities.prototype.stylechange = function (changes) { this._domUtilities.mediaStyleChangeCallback(changes); }; StyleUtilities.prototype.styleAttrModified = function (element) { try { for (var i = 0; i < this._currentRules.length; i++) { var mappedRule = this._currentRules[i]; if (mappedRule.cachedStyle.style === element.style) { if (mappedRule.cachedStyle.allowMutations) { var changes = mappedRule.refresh(element !== this.editingElement); if (changes.length) { this.stylechange(changes); } } break; } } } catch (e) { } }; StyleUtilities.prototype.refreshCurrentRules = function (element) { this._currentElement = element; this._currentRules = this.getCurrentRules(); var retVal = []; for (var i = 0; i < this._currentRules.length; i++) { var rule = this._currentRules[i].appliedRule; if (!rule.wasCreatedInSession || !rule.isDeleted) { retVal.push(rule); } } return retVal; }; StyleUtilities.prototype.getChangedRules = function () { var _this = this; var rules = []; this._styleCache.forEach(function (cachedStyle) { var mappedRule = _this.lookupMappedRule(cachedStyle.uid); if (mappedRule && mappedRule.appliedRule.hasChanged) { rules.push(mappedRule.appliedRule); } }); return rules; }; StyleUtilities.prototype.lookupMappedRule = function (ruleUid) { return this._ruleMap.lookupByUid(ruleUid); }; StyleUtilities.prototype.lookupMappedProperty = function (propertyUid) { return this._propertyMap.lookupByUid(propertyUid); }; StyleUtilities.prototype.mapRule = function (mappedRule) { var _this = this; this._ruleMap.add(mappedRule.appliedRule.uid, mappedRule); mappedRule.forEachProperty(function (mappedProperty) { _this.mapProperty(mappedProperty); mappedProperty.forEachProperty(function (mappedSubProperty) { _this.mapProperty(mappedSubProperty); return false; }); return false; }); }; StyleUtilities.prototype.unmapRule = function (mappedRule) { var _this = this; this._ruleMap.remove(mappedRule.appliedRule.uid); mappedRule.forEachProperty(function (mappedProperty) { _this.unmapProperty(mappedProperty); mappedProperty.forEachProperty(function (mappedSubProperty) { _this.unmapProperty(mappedSubProperty); return false; }); return false; }); }; StyleUtilities.prototype.mapProperty = function (mappedProperty) { this._propertyMap.add(mappedProperty.appliedProperty.uid, mappedProperty); }; StyleUtilities.prototype.unmapProperty = function (mappedProperty) { this._propertyMap.remove(mappedProperty.appliedProperty.uid); }; StyleUtilities.prototype.addNewRule = function (selector, position, oldMappedRule) { var mappedRule = this.addRule(selector, position, oldMappedRule); if (mappedRule) { this.mapRule(mappedRule); } return mappedRule; }; StyleUtilities.prototype.getRulePosition = function (mappedRule) { var position = this._currentRules.length; for (var i = 0; i < this._currentRules.length; i++) { if (this._currentRules[i].appliedRule.uid === mappedRule.appliedRule.uid) { position = i; break; } } return position; }; StyleUtilities.prototype.getRuleByPosition = function (position) { if (position >= 0 && position < this._currentRules.length) { return this._currentRules[position]; } }; StyleUtilities.prototype.getCurrentRules = function () { var _this = this; styles.calculateTracedStyles(this._currentElement); var rules = []; var haveInlineStyle; this._tracedStyles = this.getSafeTracedStyles(this._currentElement); var styleObjectsEncountered = []; var mappedRule; this._tracedStyles.getInheritanceChain().forEach(function (traceElement) { var isInherited = traceElement !== _this._currentElement; var appliedStyles = _this.getSafeTracedStyles(traceElement).getAppliedStyles(); appliedStyles.forEach(function (style) { if (styleObjectsEncountered.indexOf(style) < 0) { styleObjectsEncountered.push(style); try { var isInline = style === traceElement.style; if (isInline && traceElement === _this._currentElement) { haveInlineStyle = true; } rules.push(_this.processRuleFromAppliedStyle(traceElement, _this._styleCache.lookup(style, traceElement), isInherited)); } catch (ex) { } } }); }); if (!haveInlineStyle) { var inlineStyle = this._styleCache.lookup(this._currentElement.style, this._currentElement); mappedRule = this.processRuleFromAppliedStyle(this._currentElement, inlineStyle, false); rules.unshift(mappedRule); } var winningRuleMap = {}; var appliedRules = []; rules.forEach(function (mappedRule) { _this.determineAppliedAndWinningState(mappedRule, winningRuleMap); if ((mappedRule.appliedRule.isInlined && !mappedRule.appliedRule.isInherited) || mappedRule.hasAppliedProperties) { appliedRules.push(mappedRule); } }); return appliedRules; }; StyleUtilities.prototype.getAppliedState = function (mappedProperty) { return !mappedProperty.mappedRule.appliedRule.isInherited || mappedProperty.diagProperty.status === RemoteDom.DiagnosticProperty.UNRECOGNIZED_STATUS || this._tracedStyles.isInheritable(mappedProperty.diagProperty.propertyName); }; StyleUtilities.prototype.processPropertyFromAppliedStyle = function (mappedPropertyCollection, mappedRule, cachedStyle, diagProperty, owner, wasCreatedInSession) { if (typeof wasCreatedInSession === "undefined") { wasCreatedInSession = false; } var propertyName = diagProperty.propertyName; var isEnabled = diagProperty.enabled && diagProperty.isValid; var property = new RemoteDom.AppliedStyleProperty(new RemoteDom.AppliedPropertyValue(propertyName, diagProperty.value, diagProperty.important, isEnabled), diagProperty.status, wasCreatedInSession); var mappedProperty = new RemoteDom.MappedStyleProperty(property, mappedRule, diagProperty, owner); if (diagProperty.isShorthand) { this.processPropertyListFromAppliedStyle(mappedProperty, mappedRule, cachedStyle, diagProperty.longhands, mappedProperty); } return mappedProperty; }; StyleUtilities.prototype.getWinningProperty = function (propertyName) { var winningStyleUid = this.calculateWinningStyle(propertyName); for (var i = 0; i < this._currentRules.length; i++) { var currentRule = this._currentRules[i]; if (currentRule.cachedStyle.uid === winningStyleUid) { var mappedProperty = currentRule.lookupActiveMappedProperty(propertyName); if (mappedProperty) { return mappedProperty; } } } }; StyleUtilities.prototype.copyElementWithStyle = function (element) { var elementCopier = new F12.RemoteDom.RemoteElementCopier(styles); return elementCopier.computeHtmlForAncestorsAndDescendants(element); }; StyleUtilities.prototype.getElementForStyle = function (uid) { var mappedRule = this.lookupMappedRule(uid); if (mappedRule && mappedRule.appliedRule.isInlined) { return mappedRule.element; } }; StyleUtilities.prototype.clearCache = function (unsetPseudoStyling) { this._styleCache.clear(); this._ruleMap.clear(); this._propertyMap.clear(); this.clearForcedPseudoStyling(unsetPseudoStyling); this._newRuleStyleSheets = {}; }; StyleUtilities.prototype.setPseudoStyling = function (element, state, isSet) { var list = this._forcedPseudoStyling[state]; if (!list) { list = this._forcedPseudoStyling[state] = []; } if (isSet) { list.push(element); } else { var index = list.indexOf(element); if (index >= 0) { list.splice(list.indexOf(element), 1); } } switch (state.toLowerCase()) { case "active": emulation.setActiveStyling(element, isSet); break; case "focus": emulation.setFocusStyling(element, isSet); break; case "hover": emulation.setHoverStyling(element, isSet); break; case "visited": emulation.setVisitedStyling(element, isSet); break; case "link": emulation.setLinkStyling(element, isSet); break; } }; StyleUtilities.prototype.getPseudoStyling = function (element, state) { var list = this._forcedPseudoStyling[state]; return list ? list.indexOf(element) >= 0 : false; }; StyleUtilities.prototype.addCurrentRule = function (newMappedRule, position) { this._currentRules.splice(position, 0, newMappedRule); }; StyleUtilities.prototype.replaceCurrentRule = function (newMappedRule, replacedMappedRule) { for (var i = 0; i < this._currentRules.length; i++) { if (this._currentRules[i] === replacedMappedRule) { this._currentRules[i] = newMappedRule; break; } } }; StyleUtilities.prototype.clearForcedPseudoStyling = function (doSetFalse) { var _this = this; if (doSetFalse) { for (var state in this._forcedPseudoStyling) { var list = this._forcedPseudoStyling[state]; if (list) { list.forEach(function (element) { _this.setPseudoStyling(element, state, false); }); } } } this._forcedPseudoStyling = {}; }; StyleUtilities.prototype.findStyleSheetByTitle = function (title, ownerDocument) { for (var i = 0; i < ownerDocument.styleSheets.length; i++) { var sheet = ownerDocument.styleSheets[i]; if (sheet.title === title) { return sheet; } } }; StyleUtilities.prototype.addRule = function (selector, position, oldMappedRule) { var mappedRule; try { var sheet; var oldRule; var oldMediaRuleSelector; if (oldMappedRule) { oldRule = oldMappedRule.cachedStyle.rule; if (oldRule) { sheet = oldRule.parentStyleSheet; var parentRule = oldRule.parentRule; if (parentRule && parentRule.media) { oldMediaRuleSelector = parentRule.media.mediaText; } } } if (!sheet) { sheet = this.createStyleSheetForNewRule(); } var index; var rule; if (sheet.insertRule) { var ruleText = RemoteDom.MappedStyleRule.prepareSelector(selector) + " { }"; if (oldMediaRuleSelector) { ruleText = "@media " + oldMediaRuleSelector + " { " + ruleText + " }"; } index = sheet.cssRules.length; sheet.insertRule(ruleText, index); if (oldMediaRuleSelector) { rule = sheet.cssRules[index].cssRules[0]; } else { rule = sheet.cssRules[index]; } } else { index = sheet.rules.length; sheet.addRule(selector, "cursor: inherit;", index); rule = sheet.rules[index]; rule.style.cssText = ""; } styles.calculateTracedStyles(this._currentElement); var tracedStyles = this.getSafeTracedStyles(this._currentElement); var wasCreatedInSession = oldMappedRule ? oldMappedRule.appliedRule.wasCreatedInSession : true; mappedRule = this.processRuleFromAppliedStyle(this._currentElement, this._styleCache.lookup(rule.style, this._currentElement), false, wasCreatedInSession); this.determineAppliedAndWinningState(mappedRule, tracedStyles); if (oldMappedRule) { this.replaceCurrentRule(mappedRule, oldMappedRule); var appliedRule = oldMappedRule.appliedRule; mappedRule.appliedRule.styleHref = appliedRule.styleHref; mappedRule.appliedRule.declarationLocation = appliedRule.declarationLocation; mappedRule.appliedRule.isInherited = appliedRule.isInherited; } else { this.addCurrentRule(mappedRule, position); } } catch (ex) { } return mappedRule; }; StyleUtilities.prototype.createStyleSheetForNewRule = function () { var ownerDocument = this._currentElement.ownerDocument; var bodyId = ownerDocument.body.uniqueID; if (!this._newRuleStyleSheets[bodyId]) { var styleElement = ownerDocument.createElement("style"); ownerDocument.getElementsByTagName("head")[0].appendChild(styleElement); styleElement.title = "__BROWSERTOOLS_DOMEXPLORER_DYNAMIC_STYLES"; this._newRuleStyleSheets[bodyId] = this.findStyleSheetByTitle(styleElement.title, ownerDocument); styleElement.title = ""; } return this._newRuleStyleSheets[bodyId]; }; StyleUtilities.prototype.determineAppliedAndWinningState = function (mappedRule, winningRuleMap) { var _this = this; mappedRule.forEachProperty(function (mappedProperty) { var isApplied = _this.getAppliedState(mappedProperty); mappedProperty.appliedProperty.isApplied = isApplied; mappedProperty.appliedProperty.isWinning = isApplied && _this.getWinningState(mappedProperty, winningRuleMap); return false; }); }; StyleUtilities.prototype.getWinningState = function (mappedProperty, winningRuleMap) { var _this = this; var diagProperty = mappedProperty.diagProperty; try { var styleUid = mappedProperty.mappedRule.cachedStyle.uid; if (mappedProperty.isEmpty) { return diagProperty.activeInBlock && diagProperty.enabled && diagProperty.isValid && this.calculateWinningStyle(diagProperty.propertyName, winningRuleMap) === styleUid; } var winningCount = 0; if (diagProperty.activeInBlock) { mappedProperty.forEachProperty(function (longhandMappedProperty) { longhandMappedProperty.appliedProperty.isWinning = _this.getWinningState(longhandMappedProperty, winningRuleMap); if (longhandMappedProperty.appliedProperty.isWinning) { winningCount++; } return false; }); } return winningCount > 0; } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } return false; }; StyleUtilities.prototype.processRuleFromAppliedStyle = function (element, cachedStyle, isInherited, wasCreatedInSession) { if (typeof wasCreatedInSession === "undefined") { wasCreatedInSession = false; } var mappedRule = this.lookupMappedRule(cachedStyle.uid); if (!mappedRule) { var appliedRule = new RemoteDom.AppliedStyleRule(element, cachedStyle, wasCreatedInSession); var mappedRule = new RemoteDom.MappedStyleRule(this, appliedRule, cachedStyle, element); this.processPropertyListFromAppliedStyle(mappedRule, mappedRule, cachedStyle, cachedStyle.propertyList); this.mapRule(mappedRule); } mappedRule.refresh(!wasCreatedInSession); mappedRule.appliedRule.setIsInheritedAndTarget(isInherited, this._messageHandlers, element); return mappedRule; }; StyleUtilities.prototype.processPropertyListFromAppliedStyle = function (mappedPropertyCollection, mappedRule, cachedStyle, propertyList, owner) { if (propertyList) { for (var propertyIndex = 0; propertyIndex < propertyList.length; propertyIndex++) { var diagProperty = propertyList[propertyIndex]; try { var mappedProperty = this.processPropertyFromAppliedStyle(mappedPropertyCollection, mappedRule, cachedStyle, diagProperty, owner); if (mappedProperty) { mappedPropertyCollection.addProperty(mappedProperty); } } catch (e) { Common.RemoteHelpers.encounteredException(e); } } } }; StyleUtilities.prototype.checkPropertyListForWinningProperty = function (propertyName, propertyList) { if (propertyList) { for (var p = 0; p < propertyList.length; p++) { var diagProperty = propertyList[p]; try { if (diagProperty.enabled && diagProperty.activeInBlock) { if (diagProperty.longhands && diagProperty.longhands.length) { for (var l = 0; l < diagProperty.longhands.length; l++) { try { var longhand = diagProperty.longhands[l]; if (longhand.activeInBlock && longhand.enabled && longhand.propertyName === propertyName) { return true; } } catch (e) { Common.RemoteHelpers.encounteredException(e); } } } else if (diagProperty.propertyName === propertyName) { return true; } } } catch (e) { Common.RemoteHelpers.encounteredException(e); } } } }; StyleUtilities.prototype.checkInheritanceChainForWinningStyle = function (propertyName) { styles.calculateTracedStyles(this._currentElement); var tracedStyles = this.getSafeTracedStyles(this._currentElement); try { var inheritanceChain = tracedStyles.getInheritanceChain(propertyName); var styleObjectsEncountered = []; for (var i = 0; i < inheritanceChain.length; i++) { var traceElement = inheritanceChain[i]; var appliedStyles = this.getSafeTracedStyles(traceElement).getAppliedStyles(propertyName); for (var j = 0; j < appliedStyles.length; j++) { var style = this._styleCache.lookup(appliedStyles[j], traceElement); var property = this.checkPropertyListForWinningProperty(propertyName, style.propertyList); if (property) { return style.uid; } } } } catch (e) { Common.RemoteHelpers.encounteredException(e); } }; StyleUtilities.prototype.calculateWinningStyle = function (propertyName, winningRuleMap) { var winningStyle; if (winningRuleMap && winningRuleMap.hasOwnProperty(propertyName)) { winningStyle = winningRuleMap[propertyName]; } else { winningStyle = this.checkInheritanceChainForWinningStyle(propertyName); if (winningRuleMap) { winningRuleMap[propertyName] = winningStyle; } } return winningStyle; }; StyleUtilities.prototype.getSafeTracedStyles = function (element) { try { if (element) { return styles.getTracedStyles(element); } } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } return this._dummyTracedStyles; }; return StyleUtilities; })(); RemoteDom.StyleUtilities = StyleUtilities; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // addElement.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var AddElement = (function () { function AddElement(_element, _beforeElement, _htmlText) { this._element = _element; this._beforeElement = _beforeElement; this._htmlText = _htmlText; this._newElements = []; this.type = "AddElement"; } AddElement.createElements = function (document, htmlText, parentTag) { if (typeof parentTag === "undefined") { parentTag = "div"; } var div = document.createElement(parentTag); var view = Common.RemoteHelpers.getDefaultView(document); if (view.WinJS) { view.WinJS.Utilities.setInnerHTMLUnsafe(div, htmlText); } else { div.innerHTML = htmlText; } var newElements = []; for (var i = 0; i < div.childNodes.length; i++) { var element = div.childNodes.item(i); newElements.push(element); } return newElements; }; AddElement.prototype.description = function () { return this.type; }; AddElement.prototype.performUndo = function () { for (var i = 0; i < this._newElements.length; i++) { this._element.removeChild(this._newElements[i]); } return true; }; AddElement.prototype.performEdit = function () { this._newElements = AddElement.createElements(this._element.ownerDocument, this._htmlText, this._element.tagName); for (var i = 0; i < this._newElements.length; i++) { if (!this._beforeElement) { this._element.appendChild(this._newElements[i]); } else { this._element.insertBefore(this._newElements[i], this._beforeElement); } } return true; }; return AddElement; })(); RemoteDom.AddElement = AddElement; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // deleteElement.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var DeleteElement = (function () { function DeleteElement(_element, _isStyle) { this._element = _element; this._isStyle = _isStyle; this.type = "DeleteElement"; } DeleteElement.prototype.description = function () { return this.type; }; DeleteElement.prototype.performUndo = function () { if (this._isStyle) { this._element.innerHTML = this._oldStyle; return true; } else { if (this._nextSibling) { this._oldParent.insertBefore(this._element, this._nextSibling); } else { this._oldParent.appendChild(this._element); } return true; } }; DeleteElement.prototype.performEdit = function () { if (this._isStyle) { this._oldStyle = this._element.innerHTML; this._element.innerHTML = ""; return true; } else { this._nextSibling = (this._element.nextElementSibling ? this._element.nextElementSibling : this._element.nextSibling); this._oldParent = this._element.parentNode; this._element.parentNode.removeChild(this._element); return true; } }; return DeleteElement; })(); RemoteDom.DeleteElement = DeleteElement; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editAttribute.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditAttribute = (function () { function EditAttribute(_styleUtilities, htmlTreeHelpers, _element, _name, _newValue) { this._styleUtilities = _styleUtilities; this._element = _element; this._name = _name; this._newValue = _newValue; this._htmlTreeHelpers = htmlTreeHelpers; this.type = "EditAttribute"; if (this._name === "value" && htmlTreeHelpers.hasSpecialValueAttribute(this._element)) { this._valueElement = this._element; this._oldValue = this._valueElement.value; } else { this._oldValue = this._element.getAttribute(this._name); } } EditAttribute.prototype.description = function () { return this.type; }; EditAttribute.prototype.performUndo = function () { if (this._name === "style") { this._styleUtilities.editingElement = this._element; } if (this._valueElement) { this._valueElement.value = this._oldValue; } else { if (!this._oldValue) { if (this._name === "style") { this._element.setAttribute(this._name, "color:inherit"); if (Common.RemoteHelpers.getDocumentMode() < 9) { this._styleUtilities.styleAttrModified(this._element); } } this._element.removeAttribute(this._name); } else { this._element.setAttribute(this._name, this._oldValue); } } this._styleUtilities.editingElement = null; return true; }; EditAttribute.prototype.performEdit = function () { var isSuccess = true; if (this._name === "style") { this._styleUtilities.editingElement = this._element; } if (this._valueElement) { this._valueElement.value = this._newValue; RemoteDom.domUtilities.getMutationManager().fireAttributeModified(this._element, this._name, this._newValue, 1); } else { try { this._element.setAttribute(this._name, this._newValue); if (this._name === "style" && Common.RemoteHelpers.getDocumentMode() < 9) { this._styleUtilities.styleAttrModified(this._element); } } catch (ex) { isSuccess = false; } } this._styleUtilities.editingElement = null; return isSuccess; }; return EditAttribute; })(); RemoteDom.EditAttribute = EditAttribute; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editStylePropertyAdd.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditStylePropertyAdd = (function () { function EditStylePropertyAdd(_styleUtilities, _mappedRule, _newName, _newValue, _newIsImportant, _beforeUid) { this._styleUtilities = _styleUtilities; this._mappedRule = _mappedRule; this._newName = _newName; this._newValue = _newValue; this._newIsImportant = _newIsImportant; this._beforeUid = _beforeUid; this.type = "EditStylePropertyAdd"; } EditStylePropertyAdd.prototype.description = function () { return this.type; }; EditStylePropertyAdd.prototype.performEdit = function (isRedo) { this._mappedProperty = this._mappedRule.propertyAdd(this._newName, this._newValue, this._newIsImportant, true, this._mappedProperty, this._beforeUid); if (this._mappedProperty) { var appliedProperty = this._mappedProperty.appliedProperty; if (isRedo) { this._styleUtilities.stylechange([{ event: "addProperty", uid: this._mappedRule.appliedRule.uid, obj: appliedProperty, beforeUid: this._beforeUid }]); } else { appliedProperty.isApplied = true; } this.result = appliedProperty; return true; } return false; }; EditStylePropertyAdd.prototype.performUndo = function () { this._mappedRule.propertyHardRemove(this._mappedProperty); this._styleUtilities.stylechange([{ event: "removeProperty", uid: this._mappedProperty.appliedProperty.uid }]); return true; }; return EditStylePropertyAdd; })(); RemoteDom.EditStylePropertyAdd = EditStylePropertyAdd; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editStylePropertyEnable.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditStylePropertyEnable = (function () { function EditStylePropertyEnable(_styleUtilities, _mappedProperty, _newValue) { this._styleUtilities = _styleUtilities; this._mappedProperty = _mappedProperty; this._newValue = _newValue; this._oldValue = this._mappedProperty.appliedProperty.current.isEnabled; this.type = "EditStylePropertyEnable"; } EditStylePropertyEnable.prototype.description = function () { return this.type; }; EditStylePropertyEnable.prototype.performUndo = function () { if (this._newValue !== this._oldValue) { this._mappedProperty.setEnabled(this._oldValue); var appliedProperty = this._mappedProperty.appliedProperty; this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); return true; } return false; }; EditStylePropertyEnable.prototype.performEdit = function (isRedo) { if (this._newValue !== this._oldValue) { this._mappedProperty.setEnabled(this._newValue); if (isRedo) { var appliedProperty = this._mappedProperty.appliedProperty; this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); } return true; } return false; }; return EditStylePropertyEnable; })(); RemoteDom.EditStylePropertyEnable = EditStylePropertyEnable; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editStylePropertyName.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditStylePropertyName = (function () { function EditStylePropertyName(_styleUtilities, _mappedProperty, _newName) { this._styleUtilities = _styleUtilities; this._mappedProperty = _mappedProperty; this._newName = _newName; this.type = "EditStylePropertyName"; var appliedProperty = this._mappedProperty.appliedProperty; this._oldName = appliedProperty.current.name; this._oldEnabledLonghands = this._mappedProperty.getLonghandEnabledStates(); } EditStylePropertyName.prototype.description = function () { return this.type + " " + this._oldName + "=" + this._newName + " chainingid=" + this.chainingUid; }; EditStylePropertyName.prototype.performUndo = function () { this._mappedProperty.setName(this._oldName, this._oldEnabledLonghands); var appliedProperty = this._mappedProperty.appliedProperty; this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); return true; }; EditStylePropertyName.prototype.performEdit = function (isRedo) { var isSuccess = this._mappedProperty.setName(this._newName); if (isSuccess) { this.result = this._mappedProperty.appliedProperty; if (isRedo) { var appliedProperty = this._mappedProperty.appliedProperty; this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); } } return isSuccess; }; return EditStylePropertyName; })(); RemoteDom.EditStylePropertyName = EditStylePropertyName; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editStylePropertyRemove.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditStylePropertyRemove = (function () { function EditStylePropertyRemove(_styleUtilities, _mappedProperty) { this._styleUtilities = _styleUtilities; this._mappedProperty = _mappedProperty; this.type = "EditStylePropertyRemove"; this._mappedRule = this._mappedProperty.mappedRule; var appliedProperty = this._mappedProperty.appliedProperty; var current = appliedProperty.current; this._oldName = current.name; this._oldValue = current.value; this._oldIsImportant = current.isImportant; this._oldEnabled = current.isEnabled; this._isHardDelete = appliedProperty.wasCreatedInSession; this._oldEnabledLonghands = this._mappedProperty.getLonghandEnabledStates(); } EditStylePropertyRemove.prototype.description = function () { return this.type + " " + this._oldName + " chainingid=" + this.chainingUid; }; EditStylePropertyRemove.prototype.performUndo = function () { var appliedProperty = this._mappedProperty.appliedProperty; if (this._isHardDelete) { this._mappedRule.propertyAdd(this._oldName, this._oldValue, this._oldIsImportant, this._oldEnabled, this._mappedProperty, this._oldBeforeUid, this._oldEnabledLonghands); this._styleUtilities.stylechange([{ event: "addProperty", uid: this._mappedRule.appliedRule.uid, obj: appliedProperty, beforeUid: this._oldBeforeUid }]); } else { this._mappedRule.propertyUnremove(this._mappedProperty, this._oldEnabled, this._oldEnabledLonghands); this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); } return true; }; EditStylePropertyRemove.prototype.performEdit = function (isRedo) { var _this = this; if (this._isHardDelete && !isRedo) { var found = false; this._mappedRule.forEachProperty(function (mappedProperty) { if (found) { _this._oldBeforeUid = mappedProperty.appliedProperty.uid; return true; } else if (mappedProperty === _this._mappedProperty) { found = true; } }); } var isSuccess = this._isHardDelete ? this._mappedRule.propertyHardRemove(this._mappedProperty) : this._mappedRule.propertyRemove(this._mappedProperty); if (isSuccess) { this.result = this._isHardDelete ? null : this._mappedProperty.appliedProperty; if (isRedo) { var appliedProperty = this._mappedProperty.appliedProperty; if (this._isHardDelete) { this._styleUtilities.stylechange([{ event: "removeProperty", uid: appliedProperty.uid }]); } else { this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); } } } return isSuccess; }; return EditStylePropertyRemove; })(); RemoteDom.EditStylePropertyRemove = EditStylePropertyRemove; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editStylePropertyValue.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { ; var EditStylePropertyValue = (function () { function EditStylePropertyValue(_styleUtilities, _mappedProperty, _newValue, _newIsImportant) { this._styleUtilities = _styleUtilities; this._mappedProperty = _mappedProperty; this._newValue = _newValue; this._newIsImportant = _newIsImportant; this.type = "EditStylePropertyValue"; var current = this._mappedProperty.appliedProperty.current; this._oldValue = current.value; this._oldIsImportant = current.isImportant; this._oldIsEnabled = current.isEnabled; try { this._oldIsInvalid = !this._mappedProperty.diagProperty.isValid; } catch (ex) { Common.RemoteHelpers.encounteredException(ex); this._oldIsInvalid = true; } } EditStylePropertyValue.prototype.getOldValue = function () { return { value: this._oldValue, isImportant: this._oldIsImportant, isEnabled: this._oldIsEnabled, isInvalid: this._oldIsInvalid }; }; EditStylePropertyValue.prototype.setOldValue = function (newOldValue) { this._oldValue = newOldValue.value; this._oldIsImportant = newOldValue.isImportant; this._oldIsEnabled = newOldValue.isEnabled; this._oldIsInvalid = newOldValue.isInvalid; }; EditStylePropertyValue.prototype.hasValueChanged = function () { return this._oldValue !== this._newValue || this._oldIsImportant !== this._newIsImportant; }; EditStylePropertyValue.prototype.description = function () { return this.type + " " + this._mappedProperty.appliedProperty.current.name + "=" + this._newValue + " oldValue =" + this._oldValue + " chainingid=" + this.chainingUid; }; EditStylePropertyValue.prototype.performUndo = function () { this._mappedProperty.setValue(this._oldValue, this._oldIsImportant, this._oldIsEnabled); var appliedProperty = this._mappedProperty.appliedProperty; this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); return true; }; EditStylePropertyValue.prototype.performEdit = function (isRedo) { var isSuccess = this._mappedProperty.setValue(this._newValue, this._newIsImportant, isRedo ? this._newIsEnabled : this._oldIsEnabled || this._oldIsInvalid); if (isSuccess) { var appliedProperty = this._mappedProperty.appliedProperty; this._newIsEnabled = appliedProperty.current.isEnabled; this.result = appliedProperty; if (isRedo) { this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); } } return isSuccess; }; return EditStylePropertyValue; })(); RemoteDom.EditStylePropertyValue = EditStylePropertyValue; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editStyleRuleAdd.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditStyleRuleAdd = (function () { function EditStyleRuleAdd(_styleUtilities, _selector, _newName, _newValue, _newIsImportant, _newPosition) { this._styleUtilities = _styleUtilities; this._selector = _selector; this._newName = _newName; this._newValue = _newValue; this._newIsImportant = _newIsImportant; this._newPosition = _newPosition; this.type = "EditStyleRuleAdd"; } EditStyleRuleAdd.prototype.description = function () { return this.type; }; EditStyleRuleAdd.prototype.performEdit = function (isRedo) { if (!isRedo) { this._mappedRule = this._styleUtilities.addNewRule(this._selector, this._newPosition); } if (this._mappedRule) { this._mappedProperty = this._mappedRule.propertyAdd(this._newName, this._newValue, this._newIsImportant, true, this._mappedProperty); if (isRedo) { var appliedRule = this._mappedRule.appliedRule; var beforeRule = this._styleUtilities.getRuleByPosition(this._styleUtilities.getRulePosition(this._mappedRule) + 1); var beforeUid = beforeRule ? beforeRule.appliedRule.uid : null; this._styleUtilities.stylechange([{ event: "addRule", uid: appliedRule.uid, obj: appliedRule, beforeUid: beforeUid }]); } this.result = this._mappedRule.appliedRule; return true; } return false; }; EditStyleRuleAdd.prototype.performUndo = function () { this._mappedRule.removeAllProperties(); this._styleUtilities.stylechange([{ event: "removeRule", uid: this._mappedRule.appliedRule.uid }]); return true; }; return EditStyleRuleAdd; })(); RemoteDom.EditStyleRuleAdd = EditStyleRuleAdd; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editStyleRuleRemove.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditStyleRuleRemove = (function () { function EditStyleRuleRemove(_styleUtilities, _mappedRule) { var _this = this; this._styleUtilities = _styleUtilities; this._mappedRule = _mappedRule; this._oldDeleteStates = []; this._oldEnabledStates = []; this._oldEnabledLonghands = []; this.type = "EditStyleRuleRemove"; this._mappedRule.forEachProperty(function (mappedProperty) { _this._oldEnabledStates.push(mappedProperty.appliedProperty.current.isEnabled); _this._oldEnabledLonghands.push(mappedProperty.getLonghandEnabledStates()); }); } EditStyleRuleRemove.prototype.description = function () { return this.type; }; EditStyleRuleRemove.prototype.performEdit = function (isRedo) { this._oldDeleteStates = this._mappedRule.remove(); if (this._oldDeleteStates) { var appliedRule = this._mappedRule.appliedRule; this.result = appliedRule.wasCreatedInSession ? null : appliedRule; if (isRedo) { if (appliedRule.wasCreatedInSession) { this._styleUtilities.stylechange([{ event: "removeRule", uid: appliedRule.uid }]); } else { this._styleUtilities.stylechange([{ event: "updateRule", uid: appliedRule.uid, obj: appliedRule }]); } } return true; } this.result = null; return false; }; EditStyleRuleRemove.prototype.performUndo = function () { var isSuccess = this._mappedRule.unremove(this._oldDeleteStates, this._oldEnabledStates, this._oldEnabledLonghands); var appliedRule = this._mappedRule.appliedRule; if (appliedRule.wasCreatedInSession) { var beforeRule = this._styleUtilities.getRuleByPosition(this._styleUtilities.getRulePosition(this._mappedRule) + 1); var beforeUid = beforeRule ? beforeRule.appliedRule.uid : null; this._styleUtilities.stylechange([{ event: "addRule", uid: appliedRule.uid, obj: appliedRule, beforeUid: beforeUid }]); } else { this._styleUtilities.stylechange([{ event: "updateRule", uid: appliedRule.uid, obj: appliedRule }]); } return isSuccess; }; return EditStyleRuleRemove; })(); RemoteDom.EditStyleRuleRemove = EditStyleRuleRemove; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editStyleRuleSelector.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditStyleRuleSelector = (function () { function EditStyleRuleSelector(_styleUtilities, _oldMappedRule, _newSelector) { var _this = this; this._styleUtilities = _styleUtilities; this._oldMappedRule = _oldMappedRule; this._newSelector = _newSelector; this.type = "EditStyleRuleSelector"; this._oldSelector = this._oldMappedRule.appliedRule.selector; this._oldOriginalSelector = this._oldMappedRule.appliedRule.originalSelector; this._oldProperties = []; this._oldMappedRule.forEachProperty(function (mappedProperty) { _this._oldProperties.push(mappedProperty); return false; }); } EditStyleRuleSelector.prototype.description = function () { return this.type; }; EditStyleRuleSelector.prototype.performEdit = function (isRedo) { if (!isRedo) { var position = this._styleUtilities.getRulePosition(this._oldMappedRule); this._newMappedRule = this._styleUtilities.addNewRule(this._newSelector, position, this._oldMappedRule); this._newMappedRule.appliedRule.originalSelector = this._oldOriginalSelector; } if (this._newMappedRule && this._newMappedRule.movePropertiesFromRule(this._oldMappedRule)) { if (isRedo) { this._styleUtilities.stylechange([{ event: "updateRule", uid: this._oldMappedRule.appliedRule.uid, obj: this._newMappedRule.appliedRule }]); } this.result = this._newMappedRule.appliedRule; return true; } return false; }; EditStyleRuleSelector.prototype.performUndo = function () { if (this._oldMappedRule.movePropertiesFromRule(this._newMappedRule)) { this._styleUtilities.replaceCurrentRule(this._oldMappedRule, this._newMappedRule); this._styleUtilities.stylechange([{ event: "updateRule", uid: this._newMappedRule.appliedRule.uid, obj: this._oldMappedRule.appliedRule }]); return true; } return false; }; return EditStyleRuleSelector; })(); RemoteDom.EditStyleRuleSelector = EditStyleRuleSelector; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // editText.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var EditText = (function () { function EditText(_node, _newValue) { this._node = _node; this._newValue = _newValue; this.type = "EditText"; this._oldValue = this.getTextContent(this._node); this._textNodeCase = (this._node.nodeName === "#text"); this._parentNode = this._node.parentNode; } EditText.prototype.description = function () { return this.type; }; EditText.prototype.performUndo = function () { if (this._textNodeCase) { this._parentNode.replaceChild(this._node, this._newTextNode); } else { this.setTextContent(this._node, this._oldValue); } return true; }; EditText.prototype.performEdit = function () { if (this._textNodeCase) { var doc = this._node.ownerDocument; if (!this._newTextNode) { this._newTextNode = doc.createTextNode(""); this.setTextNodeContent(this._newTextNode, this._newValue); } this._parentNode.replaceChild(this._newTextNode, this._node); } else { this.setTextContent(this._node, this._newValue); } return true; }; EditText.prototype.setTextNodeContent = function (textNode, value) { if (Common.RemoteHelpers.getDocumentMode() < 9) { textNode.nodeValue = value; } else { textNode.textContent = value; } }; EditText.prototype.setTextContent = function (node, value) { if (Common.RemoteHelpers.getDocumentMode() < 9) { node.innerText = value; } else { node.textContent = value; } }; EditText.prototype.getTextContent = function (node) { if (Common.RemoteHelpers.getDocumentMode() < 9) { return node.innerText; } else { return node.textContent; } }; return EditText; })(); RemoteDom.EditText = EditText; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // appliedPropertyValue.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var AppliedPropertyValue = (function () { function AppliedPropertyValue(name, value, isImportant, isEnabled) { this.name = name; this.value = value; this.isImportant = isImportant; this.isEnabled = isEnabled; } return AppliedPropertyValue; })(); RemoteDom.AppliedPropertyValue = AppliedPropertyValue; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // removeAttribute.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var RemoveAttribute = (function () { function RemoveAttribute(_styleUtilities, htmlTreeHelpers, uid, _name) { this._styleUtilities = _styleUtilities; this._name = _name; this.type = "RemoveAttribute"; var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } this._element = mappedNode.ele; if (this._name === "value" && htmlTreeHelpers.hasSpecialValueAttribute(this._element)) { this._oldValue = this._element.value; this._valueSpecialCase = true; } else { this._oldValue = this._element.getAttribute(this._name); this._valueSpecialCase = false; } } RemoveAttribute.prototype.description = function () { return this.type; }; RemoveAttribute.prototype.performUndo = function () { if (this._name === "style") { this._styleUtilities.editingElement = this._element; } if (this._valueSpecialCase) { this._element.value = this._oldValue; } else { this._element.setAttribute(this._name, this._oldValue); if (this._name === "style" && Common.RemoteHelpers.getDocumentMode() < 9) { this._styleUtilities.styleAttrModified(this._element); } } this._styleUtilities.editingElement = null; return true; }; RemoveAttribute.prototype.performEdit = function () { if (this._name === "style") { this._styleUtilities.editingElement = this._element; } if (this._valueSpecialCase) { this._element.value = ""; } else { if (this._name === "style") { this._element.setAttribute(this._name, "color:inherit"); if (Common.RemoteHelpers.getDocumentMode() < 9) { this._styleUtilities.styleAttrModified(this._element); } } this._element.removeAttribute(this._name); } this._styleUtilities.editingElement = null; return true; }; return RemoveAttribute; })(); RemoteDom.RemoveAttribute = RemoveAttribute; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // reparentEdit.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var ReparentEdit = (function () { function ReparentEdit(_moveThisNode, _byThisNode, _reparentAction) { this._moveThisNode = _moveThisNode; this._byThisNode = _byThisNode; this._reparentAction = _reparentAction; this.type = "reparent"; this._originalParent = this._moveThisNode.parentNode; this._originalNextSibling = this._moveThisNode.nextSibling; } ReparentEdit.prototype.description = function () { return this.type; }; ReparentEdit.prototype.performEdit = function () { if (!this._moveThisNode || !this._moveThisNode.parentNode || !this._byThisNode || !this._byThisNode.parentNode) { return false; } if (!this._moveThisNode.ownerDocument || !this._byThisNode.ownerDocument || this._moveThisNode.ownerDocument !== this._byThisNode.ownerDocument) { return false; } if (this._reparentAction === "first child") { this._byThisNode.insertBefore(this._moveThisNode, this._byThisNode.firstChild); } else if (this._reparentAction === "last child") { this._byThisNode.appendChild(this._moveThisNode); } else if (this._reparentAction === "before sibling") { this._byThisNode.parentNode.insertBefore(this._moveThisNode, this._byThisNode); } else if (this._reparentAction === "after sibling") { this._byThisNode.parentNode.insertBefore(this._moveThisNode, this._byThisNode.nextSibling); } return true; }; ReparentEdit.prototype.performUndo = function () { if (!this._moveThisNode || !this._moveThisNode.parentNode || !this._originalParent) { return false; } if (!this._moveThisNode.ownerDocument || !this._originalParent.ownerDocument || this._moveThisNode.ownerDocument !== this._originalParent.ownerDocument) { return false; } if (this._originalNextSibling) { this._originalParent.insertBefore(this._moveThisNode, this._originalNextSibling); } else { this._originalParent.appendChild(this._moveThisNode); } return true; }; return ReparentEdit; })(); RemoteDom.ReparentEdit = ReparentEdit; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // replaceElement.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var ReplaceElement = (function () { function ReplaceElement(_element, _htmlText) { this._element = _element; this._htmlText = _htmlText; this._newElements = []; this.type = "ReplaceElement"; this._parentElement = _element.parentElement || _element.parentNode; this._nextSibling = this._element.nextElementSibling || this._element.nextSibling; } ReplaceElement.prototype.description = function () { return this.type; }; ReplaceElement.prototype.performUndo = function () { for (var i = 0; i < this._newElements.length; i++) { this._parentElement.removeChild(this._newElements[i]); } if (this._nextSibling) { this._parentElement.insertBefore(this._element, this._nextSibling); } else { this._parentElement.appendChild(this._element); } return true; }; ReplaceElement.prototype.performEdit = function () { this._newElements = RemoteDom.AddElement.createElements(this._parentElement.ownerDocument, this._htmlText, this._parentElement.tagName); var fragment = this._parentElement.ownerDocument.createDocumentFragment(); for (var i = 0; i < this._newElements.length; i++) { fragment.appendChild(this._newElements[i]); } if (this._nextSibling) { this._parentElement.insertBefore(fragment, this._nextSibling); } else { this._parentElement.appendChild(fragment); } this._parentElement.removeChild(this._element); return true; }; return ReplaceElement; })(); RemoteDom.ReplaceElement = ReplaceElement; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // revertProperty.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var RevertProperty = (function () { function RevertProperty(_styleUtilities, _mappedProperty) { var _this = this; this._styleUtilities = _styleUtilities; this._mappedProperty = _mappedProperty; this.type = "RevertProperty"; var appliedProperty = this._mappedProperty.appliedProperty; var current = appliedProperty.current; this._oldName = current.name; this._oldValue = current.value; this._oldIsImportant = current.isImportant; this._oldIsEnabled = current.isEnabled; this._oldEnabledLonghands = this._mappedProperty.getLonghandEnabledStates(); if (appliedProperty.originalLonghand) { this._newEnabledLonghands = []; appliedProperty.originalLonghand.forEach(function (value) { _this._newEnabledLonghands.push(value.isEnabled); }); } try { this._oldIsInvalid = !this._mappedProperty.diagProperty.isValid; } catch (ex) { Common.RemoteHelpers.encounteredException(ex); this._oldIsInvalid = true; } } RevertProperty.prototype.description = function () { return this.type + " chainingid=" + this.chainingUid; }; RevertProperty.prototype.performUndo = function () { this._mappedProperty.setAll(this._oldName, this._oldValue, this._oldIsImportant, this._oldIsEnabled, this._oldEnabledLonghands); if (this._oldIsDeleted) { this._mappedProperty.mappedRule.propertyRemove(this._mappedProperty); } var appliedProperty = this._mappedProperty.appliedProperty; this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); return true; }; RevertProperty.prototype.performEdit = function (isRedo) { var isSuccess = true; this._oldIsDeleted = this._mappedProperty.isDeleted; if (this._oldIsDeleted) { isSuccess = this._mappedProperty.mappedRule.propertyUnremove(this._mappedProperty, true, this._newEnabledLonghands); } if (isSuccess) { var original = this._mappedProperty.appliedProperty.original; isSuccess = !!original && this._mappedProperty.setAll(original.name, original.value, original.isImportant, original.isEnabled, this._newEnabledLonghands); if (isSuccess) { var appliedProperty = this._mappedProperty.appliedProperty; this.result = appliedProperty; if (isRedo) { this._styleUtilities.stylechange([{ event: "updateProperty", uid: appliedProperty.uid, obj: appliedProperty }]); } } } return isSuccess; }; return RevertProperty; })(); RemoteDom.RevertProperty = RevertProperty; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // revertRule.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var RevertRule = (function () { function RevertRule(_styleUtilities, _mappedRule) { var _this = this; this._styleUtilities = _styleUtilities; this._mappedRule = _mappedRule; this._propertyEdits = []; this.type = "RevertRule"; this._mappedRule.forEachProperty(function (mappedProperty) { var edit = mappedProperty.appliedProperty.wasCreatedInSession ? new RemoteDom.EditStylePropertyRemove(_this._styleUtilities, mappedProperty) : new RemoteDom.RevertProperty(_this._styleUtilities, mappedProperty); _this._propertyEdits.push(edit); }); } RevertRule.prototype.description = function () { return this.type + " chainingid=" + this.chainingUid; }; RevertRule.prototype.performUndo = function () { var isSuccess = true; this._propertyEdits.forEach(function (revertProperty) { var reverted = revertProperty.performUndo(); isSuccess = isSuccess || reverted; return !reverted; }); if (isSuccess && this._editSelector) { this._editSelector.performUndo(); } var appliedRule = this._mappedRule.appliedRule; if (isSuccess && this._wasDeleted) { appliedRule.isDeleted = true; } this.result = appliedRule; this._styleUtilities.stylechange([{ event: "updateRule", uid: appliedRule.uid, obj: appliedRule }]); return isSuccess; }; RevertRule.prototype.performEdit = function (isRedo) { var isSuccess = true; this._propertyEdits.forEach(function (edit) { var reverted = edit.performEdit(isRedo); isSuccess = isSuccess || reverted; return !reverted; }); if (isSuccess) { var appliedRule = this._mappedRule.appliedRule; if (appliedRule.selector !== appliedRule.originalSelector) { if (!this._editSelector) { this._editSelector = new RemoteDom.EditStyleRuleSelector(this._styleUtilities, this._mappedRule, appliedRule.originalSelector); } if (this._editSelector.performEdit(isRedo)) { this._newMappedRule = this._editSelector._newMappedRule; if (this._newMappedRule) { appliedRule = this._newMappedRule.appliedRule; appliedRule.originalSelector = appliedRule.selector; } } } this._wasDeleted = appliedRule.isDeleted; appliedRule.isDeleted = false; this.result = appliedRule; if (isRedo) { this._styleUtilities.stylechange([{ event: "updateRule", uid: appliedRule.uid, obj: appliedRule }]); } } return isSuccess; }; return RevertRule; })(); RemoteDom.RevertRule = RevertRule; })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // remote.ts var F12; (function (F12) { "use strict"; (function (RemoteDom) { var Assert = F12.Tools.Utility.Assert; var inspectElementHandler; var remoteDomService = new domexplorer.Remote.RemoteDomService(browser); var colorPicker = new domexplorer.Remote.RemoteColorPicker(remoteDomService, diagnostics); RemoteDom.remoteCode = { editStack: null, hostId: null, onKeyDownSafe: null, unloadSafe: null, scriptExecutionSupported: null, safeMqlListener: null, mediaQueryLists: null, _storedElements: {}, getUidOrNull: function domeExplorer$remoteCode$getUidOrNull(element) { if (!element) { return null; } return element["uniqueID"] || element["bpt-uid"] || null; }, initialize: function domExplorer$remoteCode$initialize() { RemoteDom.remoteCode.editStack = new Common.EditStack(); if (typeof browser !== "undefined") { Common.RemoteHelpers.addListener(browser, "beforeScriptExecute", RemoteDom.remoteCode.onBeforeScriptExecute); Common.RemoteHelpers.addListener(browser, "inspectElement", (inspectElementHandler = function (e) { RemoteDom.dom$messageHandlers.inspectElement(e.target); })); } remoteHelpers.initialize("DomExplorer", RemoteDom.remoteCode.initializePage, "__BROWSERTOOLS_DOMEXPLORER_ADDED", RemoteDom.remoteCode.onDetach); }, initializePage: function domExplorer$remoteCode$initializePage() { try { browser.executeScript("(function(){})();" + Common.RemoteHelpers.getJMCScriptUrl("dom")); RemoteDom.remoteCode.scriptExecutionSupported = true; } catch (e) { RemoteDom.remoteCode.scriptExecutionSupported = false; } try { var defaultView = Common.RemoteHelpers.getDefaultView(mainBrowser.document); RemoteDom.remoteCode.addRemotePageFunctions(defaultView); var connectionInfo = { docMode: Common.RemoteHelpers.getDocumentMode(), contextInfo: defaultView.location.href }; remoteHelpers.port.postMessage("RefreshTree:" + JSON.stringify(connectionInfo)); } catch (ex) { return; } }, onDetach: function domExplorer$remoteCode$onDetach() { RemoteDom.dom$messageHandlers.cancelSelectElementByClick(); RemoteDom.remoteCode.editStack = undefined; styleUtilities.clearCache(true); RemoteDom.domUtilities.reset(); Common.RemoteHelpers.removeListener(browser, "beforeScriptExecute", RemoteDom.remoteCode.onBeforeScriptExecute); Common.RemoteHelpers.removeListener(browser, "inspectElement", inspectElementHandler); try { RemoteDom.remoteCode.detachMediaQueryEvents(); var defaultView = Common.RemoteHelpers.getDefaultView(mainBrowser.document); if (defaultView["__BROWSERTOOLS_DOMEXPLORER_ADDED"]) { defaultView["__BROWSERTOOLS_DOMEXPLORER_ADDED"] = null; } if (RemoteDom.remoteCode.onKeyDownSafe) { Common.RemoteHelpers.removeListener(mainBrowser.document, "keydown", RemoteDom.remoteCode.onKeyDownSafe, true); } if (RemoteDom.remoteCode.unloadSafe) { Common.RemoteHelpers.removeListener(defaultView, "unload", RemoteDom.remoteCode.unloadSafe, true); RemoteDom.remoteCode.unloadSafe = null; } } catch (ex) { } }, detachMediaQueryEvents: function () { if (RemoteDom.remoteCode.safeMqlListener && RemoteDom.remoteCode.mediaQueryLists) { while (RemoteDom.remoteCode.mediaQueryLists.length > 0) { var mediaQueryList = RemoteDom.remoteCode.mediaQueryLists.pop(); mediaQueryList.removeListener(RemoteDom.remoteCode.safeMqlListener); } } }, onBeforeScriptExecute: function domExplorer$remoteCode$onBeforeScriptExecute(dispatchWindow) { if (dispatchWindow && dispatchWindow.browserOrWindow) { dispatchWindow = dispatchWindow.browserOrWindow; } var realWindow = null; try { realWindow = Common.RemoteHelpers.getDefaultView(dispatchWindow.document); } catch (ex) { return; } RemoteDom.domUtilities.removeHighlight(); if (realWindow === Common.RemoteHelpers.getDefaultView(mainBrowser.document)) { if (remoteHelpers.port) { remoteHelpers.postAllMessages(); } RemoteDom.remoteCode.initializePage(); } else { RemoteDom.domUtilities.reloadFrame(realWindow); } }, addRemotePageFunctions: function domExplorer$remoteCode$addRemotePageFunctions(realWindow) { if (RemoteDom.remoteCode.scriptExecutionSupported) { if (!RemoteDom.remoteCode.onKeyDownSafe) { RemoteDom.remoteCode.onKeyDownSafe = Common.RemoteHelpers.addSafeListener(realWindow, mainBrowser.document, "keydown", RemoteDom.remoteCode.onKeyDown, true); } realWindow.console = realWindow.console || new realWindow.Object(); realWindow.console.select = remoteHelpers.createSafeFunction(realWindow, RemoteDom.dom$messageHandlers.selectElementFromConsole); realWindow.__BROWSERTOOLS_DOMEXPLORER_ADDED = true; } }, onKeyDown: function domExplorer$remoteCode$onKeyDown(e) { if (e.keyCode === 123 && RemoteDom.remoteCode.hostId === "vs") { RemoteDom.remoteCode.vsFocusCallback(); return Common.RemoteHelpers.eventHandled(e); } else if (e.keyCode === 66 && e.ctrlKey && !e.shiftKey && !e.altKey) { if (!RemoteDom.domUtilities.isSelectingElement && RemoteDom.remoteCode.startSelectElementByClickCallback) { RemoteDom.remoteCode.startSelectElementByClickCallback(); return Common.RemoteHelpers.eventHandled(e); } else if (RemoteDom.domUtilities.isSelectingElement && RemoteDom.remoteCode.stopSelectElementByClickCallback) { RemoteDom.remoteCode.stopSelectElementByClickCallback(); return Common.RemoteHelpers.eventHandled(e); } } } }; RemoteDom.domUtilities = { isSelectingElement: false, selectElementLastSelected: null, selectElementClickCallback: null, mediaStyleChangeCallback: null, currentEventProxy: null, attachedDomModifiedDocs: [], attachedAttrModifiedDocs: [], getMutationManager: function () { if (!RemoteDom.domUtilities.mutationManager) { RemoteDom.domUtilities.mutationManager = new F12.RemoteDom.MutationManager(diagnostics, remoteHelpers); } return RemoteDom.domUtilities.mutationManager; }, getChunker: function () { if (!RemoteDom.domUtilities.chunker) { RemoteDom.domUtilities.chunker = new F12.RemoteDom.Chunker(); } return RemoteDom.domUtilities.chunker; }, currentEventProxyListeners: [], removeAllCurrentEventProxyListeners: function () { if (RemoteDom.domUtilities.currentEventProxy) { if (RemoteDom.domUtilities.currentEventProxyListeners) { for (var i = 0; i < RemoteDom.domUtilities.currentEventProxyListeners.length; i++) { var listener = RemoteDom.domUtilities.currentEventProxyListeners[i]; RemoteDom.domUtilities.currentEventProxy.removeEventListener(listener.name, listener.callback); } } RemoteDom.domUtilities.currentEventProxyListeners = []; } }, reset: function domExplorer$domUtilities$reset() { remoteHelpers.uid = 0; RemoteDom.domUtilities.removeHighlight(); RemoteDom.domUtilities.isSelectingElement = false; RemoteDom.domUtilities.selectElementLastSelected = null; RemoteDom.domUtilities.selectElementClickCallback = null; for (var j = 0; j < RemoteDom.domUtilities.attachedDomModifiedDocs.length; j++) { try { var treeModified = RemoteDom.domUtilities.attachedDomModifiedDocs[j]; if (treeModified.doc && treeModified.handler) { Common.RemoteHelpers.removeListener(treeModified.doc, "DOMNodeInserted", treeModified.handler, true); Common.RemoteHelpers.removeListener(treeModified.doc, "DOMNodeRemoved", treeModified.handler, true); Common.RemoteHelpers.removeListener(treeModified.doc, "DOMCharacterDataModified", treeModified.handler, true); } } catch (ex) { } } RemoteDom.domUtilities.attachedDomModifiedDocs = []; for (var k = 0; k < RemoteDom.domUtilities.attachedAttrModifiedDocs.length; k++) { try { var attrModified = RemoteDom.domUtilities.attachedAttrModifiedDocs[k]; if (attrModified.doc && attrModified.handler) { Common.RemoteHelpers.removeListener(attrModified.doc, "DOMAttrModified", attrModified.handler, true); } } catch (ex) { } } RemoteDom.domUtilities.attachedAttrModifiedDocs = []; if (RemoteDom.domUtilities.currentEventProxy) { RemoteDom.domUtilities.removeAllCurrentEventProxyListeners(); RemoteDom.domUtilities.currentEventProxy = null; } var defaultView = Common.RemoteHelpers.getDefaultView(mainBrowser.document); for (var i = 0; i <= 4; i++) { if (typeof defaultView["$" + i] !== "undefined" && defaultView["$" + i] === RemoteDom.remoteCode._storedElements["$" + i]) { defaultView["$" + i] = undefined; } } RemoteDom.remoteCode._storedElements = {}; htmlTreeHelpers.reset(); }, basicHighlightColor: { margin: "rgba(250, 212, 107, 0.75)", border: "rgba(120, 181, 51, 0.75)", padding: "rgba(247, 163, 135, 0.75)", content: "rgba(168, 221, 246, 0.75)" }, selectElementColor: { margin: "rgba(250, 212, 107, 0.50)", border: "rgba(120, 181, 51, 0.50)", padding: "rgba(247, 163, 135, 0.50)", content: "rgba(168, 221, 246, 0.50)" }, hoverElementColor: { margin: "rgba(250, 212, 107, 0.50)", border: "rgba(120, 181, 51, 0.50)", padding: "rgba(247, 163, 135, 0.50)", content: "rgba(168, 221, 246, 0.50)" }, highlightElement: function domExplorer$domUtilities$highlightElement(element, color) { if (!element || !element.tagName || !color) { return; } if (typeof browser !== "undefined" && typeof browser.highlightElement === "function") { try { browser.highlightElement(element, color.margin, color.border, color.padding, color.content); } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } } }, removeHighlight: function domExplorer$domUtilities$removeHighlight() { if (typeof browser !== "undefined" && typeof browser.highlightElement === "function") { try { browser.highlightElement(null, "", "", "", ""); } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } } }, selectElementInLiveDomEnable: function domExplorer$domUtilities$selectElementInLiveDomEnable() { if (!RemoteDom.domUtilities.isSelectingElement) { return; } if (typeof browser !== "undefined" && typeof browser.elementSelectionEventsEnabled !== "undefined") { browser.elementSelectionEventsEnabled = true; browser.addEventListener("selectElement", RemoteDom.domUtilities.selectElementHandler); browser.addEventListener("hoverElement", RemoteDom.domUtilities.hoverElementHandler); } }, selectElementInLiveDomDisable: function domExplorer$domUtilities$selectElementInLiveDomDisable() { if (!RemoteDom.domUtilities.isSelectingElement) { return; } if (typeof browser !== "undefined" && typeof browser.elementSelectionEventsEnabled !== "undefined") { browser.elementSelectionEventsEnabled = false; browser.removeEventListener("selectElement", RemoteDom.domUtilities.selectElementHandler); browser.removeEventListener("hoverElement", RemoteDom.domUtilities.hoverElementHandler); } }, selectElementHandler: function domExplorer$domUtilities$selectElementHandler(event) { if (event.target) { RemoteDom.domUtilities.highlightElement(event.target, RemoteDom.domUtilities.selectElementColor); } RemoteDom.domUtilities.selectElementLastSelected = event.target; if (RemoteDom.domUtilities.selectElementClickCallback) { RemoteDom.domUtilities.selectElementClickCallback(); } }, hoverElementHandler: function domExplorer$domUtilities$hoverElementHandler(event) { if (event.target) { RemoteDom.domUtilities.highlightElement(event.target, RemoteDom.domUtilities.hoverElementColor); } }, getElementAtCoords: function domExplorer$domUtilities$getElementAtCoords(doc, x, y) { var checkForValidElement = function (element) { if (typeof element.className !== "string" || element.className.indexOf("win-appbarclickeater") === -1) { if (element.tagName === "IFRAME" || element.tagName === "FRAME") { var frame = element; var rect = RemoteDom.domUtilities.getClientRect(element); var currentWindow = Common.RemoteHelpers.getDefaultView(element.ownerDocument); var result = Common.RemoteHelpers.getValidWindow(currentWindow, frame.contentWindow); if (result.isValid) { var offset = Common.RemoteHelpers.getPageOffset(doc); return RemoteDom.domUtilities.getElementAtCoords(result.window.document, x - rect.left + offset.x, y - rect.top + offset.y); } } else { return element; } } return false; }; var validElement; if ((typeof doc.msElementsFromPoint) === "function") { var elements = doc.msElementsFromPoint(x, y); for (var i = 0; i < elements.length; i++) { validElement = checkForValidElement(elements[i]); if (typeof validElement !== "boolean") { var win = Common.RemoteHelpers.getDefaultView(doc); var computedStyle = Common.RemoteHelpers.getComputedStyle(win, validElement); if (computedStyle.visibility !== "hidden") { return validElement; } } } } else { var element = doc.elementFromPoint(x, y); if (element) { validElement = checkForValidElement(element); if (typeof validElement !== "boolean") { return validElement; } else { var previousVisibility = element.style.visibility; element.style.visibility = "hidden"; var realElement = RemoteDom.domUtilities.getElementAtCoords(doc, x, y); element.style.visibility = previousVisibility; return realElement; } } } return null; }, getClientRect: function domExplorer$domUtilities$getClientRect(element) { if (element && element.getBoundingClientRect) { var rect = element.getBoundingClientRect(); if (rect.top !== undefined && rect.left !== undefined && rect.width !== undefined && rect.height !== undefined) { var offset = Common.RemoteHelpers.getPageOffset(element.ownerDocument); return { left: rect.left + offset.x, top: rect.top + offset.y, width: rect.width, height: rect.height }; } } var top = 0; var left = 0; var curEle = element; while (curEle && curEle !== mainBrowser.document.body && curEle !== mainBrowser.document) { top += curEle.offsetTop; left += curEle.offsetLeft; curEle = curEle.offsetParent; } return { left: left, top: top, width: element.offsetWidth, height: element.offsetHeight }; }, reloadFrame: function domExplorer$domUtilities$reloadFrame(realWindow) { if (!mainBrowser || !realWindow || !mainBrowser.document || !realWindow.document) { RemoteDom.remoteCode.initializePage(); return; } var iframeChain = RemoteDom.dom$messageHandlers.getIFrameChain(mainBrowser.document, realWindow.document); if (iframeChain.length > 0) { var targetElement = iframeChain[0]; var uid = ""; var mappedNode = null; try { uid = RemoteDom.remoteCode.getUidOrNull(targetElement); if (uid) { if (htmlTreeHelpers.mapping[uid] && htmlTreeHelpers.mapping[uid].ele === targetElement) { mappedNode = htmlTreeHelpers.mapping[uid]; } } else { for (uid in htmlTreeHelpers.mapping) { if (htmlTreeHelpers.mapping[uid] && htmlTreeHelpers.mapping[uid].ele === targetElement) { mappedNode = htmlTreeHelpers.mapping[uid]; break; } } } } catch (ex) { if ((ex.number & 0xFFFFFFFF) === (0x800A0046 & 0xFFFFFFFF)) { htmlTreeHelpers.deleteMappedNode(uid); RemoteDom.remoteCode.initializePage(); return; } else { throw ex; } } if (!mappedNode) { var targetParent = targetElement.parentNode; mappedNode = null; uid = RemoteDom.remoteCode.getUidOrNull(targetParent); if (uid) { if (htmlTreeHelpers.mapping[uid] && htmlTreeHelpers.mapping[uid].ele === targetParent) { mappedNode = htmlTreeHelpers.mapping[uid]; } } else { for (uid in htmlTreeHelpers.mapping) { if (htmlTreeHelpers.mapping[uid].ele === targetParent) { mappedNode = htmlTreeHelpers.mapping[uid]; break; } } } if (mappedNode) { var root = targetParent.ownerDocument; for (var docIndex = 0; docIndex < RemoteDom.domUtilities.attachedDomModifiedDocs.length; docIndex++) { if (RemoteDom.domUtilities.attachedDomModifiedDocs[docIndex].doc === root) { var domMutationEvent = { type: "DOMNodeInserted", target: targetElement }; RemoteDom.domUtilities.attachedDomModifiedDocs[docIndex].handler(domMutationEvent); break; } } } } } }, getRootElementOfNode: function domExplorer$domUtilities$getRootElementOfNode(element) { if (element && element.parentNode) { var currentParent = element.parentNode; while (currentParent.parentNode) { currentParent = currentParent.parentNode; } return currentParent; } else { return element; } }, isWhiteSpaceOnlyTextNode: function domExplorer$domUtilities$isWhiteSpaceOnlyTextNode(element) { function containsOnlyWhiteSpace(element) { var content = Common.RemoteHelpers.getLeafTextContent(element); if (typeof content === "string") { return !/\S/.test(content); } } return element !== null && element.nodeType === 3 && containsOnlyWhiteSpace(element); }, getSubsequentNonTextNodeSibling: function domExplorer$domUtilities$getNextNonTextNodeSiblingElement(element, direction) { if (element) { var ele = (direction === 1 /* Next */) ? element.nextSibling : element.previousSibling; while (RemoteDom.domUtilities.isWhiteSpaceOnlyTextNode(ele)) { ele = (direction === 1 /* Next */) ? ele.nextSibling : ele.previousSibling; } return ele; } return null; }, lastElementInsideIframe: function domExplorer$domUtilities$lastElementInsideIframe(iframe) { var view = Common.RemoteHelpers.getDefaultView(iframe.ownerDocument); var result = Common.RemoteHelpers.getValidWindow(view, iframe.contentWindow); if (!result.isValid) { return null; } var element; var childElement = result.window.document; do { element = childElement; childElement = RemoteDom.searchUtilities.getSubsequentNonWhiteSpacedChild(childElement, -1 /* Previous */); } while(childElement); return element.tagName === "IFRAME" || element.tagName === "FRAME" ? RemoteDom.domUtilities.lastElementInsideIframe(element) : element; }, getSubsequentElementAfterIframe: function domExplorer$domUtilities$getSubsequentElementAfterIframe(parentFrame, currentFrame, searchDirection) { if (parentFrame) { var tags = parentFrame.querySelectorAll("iframe, frame"); for (var i = 0, n = tags.length; i < n; i++) { if (currentFrame === tags[i]) { var ele = RemoteDom.domUtilities.getSubsequentNonTextNodeSibling(currentFrame, searchDirection); if (searchDirection === -1 /* Previous */) { if (ele) { if (ele.tagName === "IFRAME" || ele.tagName === "FRAME") { return RemoteDom.domUtilities.lastElementInsideIframe(ele); } else if (ele.childNodes && ele.childNodes.length > 0 && RemoteDom.searchUtilities.getSubsequentNonWhiteSpacedChild(ele, searchDirection)) { return RemoteDom.searchUtilities.getDeepestRightChild(ele); } else { return ele; } } else { return currentFrame.parentNode; } } else { if (ele) { return ele; } else { var element = currentFrame; while (element.parentNode) { var nextElement = RemoteDom.domUtilities.getSubsequentNonTextNodeSibling(element.parentNode, 1 /* Next */); if (nextElement) { return nextElement; } else { element = element.parentNode; } } } } } } } return null; }, findParentChainForElement: function domExplorer$domUtilities$findParentChainForElement(currentNode) { var parentChain = []; var staleNodes = false; try { var iframeChain = null; var iframePosition = 0; var startNode = currentNode; while (currentNode) { parentChain.splice(0, 0, currentNode); if (currentNode.parentNode) { currentNode = currentNode.parentNode; } else { if (Common.RemoteHelpers.getDefaultView(currentNode) === Common.RemoteHelpers.getDefaultView(mainBrowser.document)) { break; } else { if (!iframeChain) { iframeChain = RemoteDom.dom$messageHandlers.getIFrameChain(mainBrowser.document, RemoteDom.domUtilities.getRootElementOfNode(currentNode)); } if (iframeChain) { currentNode = iframeChain[iframePosition]; iframePosition++; } else { break; } } } } RemoteDom.domUtilities.expandChain = []; var parentUidChain = [{ uid: "uid0", children: null }]; var children; var lastNotFoundIndex = -1; for (var i = 1; i < parentChain.length; i++) { var parentElement = parentChain[i]; var found = false; var uid = RemoteDom.remoteCode.getUidOrNull(parentElement); if (uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (mappedNode && mappedNode.ele === parentElement) { parentUidChain.push({ uid: uid, children: null }); if (mappedNode.isLimited) { parentUidChain[i].children = mappedNode.childrenNodes; } found = true; } } if (!found) { for (uid in htmlTreeHelpers.mapping) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (mappedNode.ele === parentElement || (mappedNode.isIframeElement && htmlTreeHelpers.getIframeRootForMappedNode(uid) === parentElement)) { parentUidChain.push({ uid: uid, children: null }); if (mappedNode.isLimited) { parentUidChain[i].children = mappedNode.childrenNodes; } found = true; break; } } } if (!found) { if (lastNotFoundIndex === i) { if (startNode.parentNode && startNode.parentNode.tagName === "STYLE" || startNode.parentNode.tagName === "SCRIPT") { parentUidChain.push({ uid: "uid-selectchild", children: null }); } break; } lastNotFoundIndex = i; children = htmlTreeHelpers.getChildrenForMappedNode(parentUidChain[i - 1].uid, false, true); parentUidChain[i - 1].children = children; i--; } else { children = htmlTreeHelpers.getChildrenForMappedNode(parentUidChain[i - 1].uid, false, true); parentUidChain[i - 1].children = children; } } } catch (ex) { if ((ex.number & 0xFFFFFFFF) === (0x800A0046 & 0xFFFFFFFF)) { staleNodes = true; } else { throw ex; } } if (staleNodes) { RemoteDom.remoteCode.initializePage(); } return parentUidChain; } }; RemoteDom.searchUtilities = { previousDFSElement: null, iframeStack: null, skipTraversal: false, querySelectorResults: [], getSubsequentNonWhiteSpacedChild: function domExplorer$searchUtilities$getSubsequentNonWhiteSpacedChild(element, searchDirection) { if (element && element.childNodes && element.childNodes.length > 0) { if (element.childNodes.length === 1) { var child = element.childNodes[0]; if (element.tagName === "STYLE" && element.styleSheet) { return child; } else if (!child.tagName) { var textContent = Common.RemoteHelpers.getLeafTextContent(child); if (textContent && !String.prototype.match.call(textContent, /\n/g) && textContent.length < htmlTreeHelpers.maxInlineLength) { return null; } } } if (searchDirection === 1 /* Next */) { for (var index = 0; index < element.childNodes.length; index++) { if (!RemoteDom.domUtilities.isWhiteSpaceOnlyTextNode(element.childNodes[index])) { return element.childNodes[index]; } } } else { for (index = element.childNodes.length - 1; index >= 0; index--) { if (!RemoteDom.domUtilities.isWhiteSpaceOnlyTextNode(element.childNodes[index])) { return element.childNodes[index]; } } } } return null; }, getDeepestRightChild: function domExplorer$searchUtilities$getDeepestRightChild(element) { var childElement = element; while (childElement) { element = childElement; childElement = RemoteDom.searchUtilities.getSubsequentNonWhiteSpacedChild(element, -1 /* Previous */); } if (element.tagName === "IFRAME" || element.tagName === "FRAME") { var child = RemoteDom.domUtilities.lastElementInsideIframe(element); RemoteDom.searchUtilities.initializeIframeStack(child, -1 /* Previous */); return child; } return element; }, obtainNextDFSElement: function domExplorer$searchUtilities$obtainNextDFSElement(element, checkChild) { if (element) { if (element.tagName === "IFRAME" || element.tagName === "FRAME") { var e = element; var view = Common.RemoteHelpers.getDefaultView(element.ownerDocument); var result = Common.RemoteHelpers.getValidWindow(view, e.contentWindow); if (result.isValid) { RemoteDom.searchUtilities.iframeStack.push(RemoteDom.domUtilities.getSubsequentElementAfterIframe(RemoteDom.domUtilities.getRootElementOfNode(element), element, 1 /* Next */)); return result.window.document; } } var firstChild = RemoteDom.searchUtilities.getSubsequentNonWhiteSpacedChild(element, 1 /* Next */); if (checkChild && firstChild) { return firstChild; } else { var nextSibling = RemoteDom.domUtilities.getSubsequentNonTextNodeSibling(element, 1 /* Next */); if (nextSibling) { return nextSibling; } else { while (element.parentNode) { var nextElement = RemoteDom.domUtilities.getSubsequentNonTextNodeSibling(element.parentNode, 1 /* Next */); if (nextElement) { return nextElement; } else { element = element.parentNode; } } } } } return null; }, obtainPreviousDFSElement: function domExplorer$searchUtilities$obtainPreviousDFSElement(element, checkChild) { function getSubsequentDFSNode(element) { RemoteDom.searchUtilities.previousDFSElement = element; var prevSibling = RemoteDom.domUtilities.getSubsequentNonTextNodeSibling(element, -1 /* Previous */); if (prevSibling) { var deepestChild = RemoteDom.searchUtilities.getDeepestRightChild(prevSibling); return deepestChild ? deepestChild : element.parentNode; } return element.parentNode; } if (element.tagName === "IFRAME" || element.tagName === "FRAME") { RemoteDom.searchUtilities.previousDFSElement = element; var previousElement = RemoteDom.domUtilities.getSubsequentElementAfterIframe(RemoteDom.domUtilities.getRootElementOfNode(element), element, -1 /* Previous */); RemoteDom.searchUtilities.initializeIframeStack(previousElement, -1 /* Previous */); return previousElement; } var firstChild = RemoteDom.searchUtilities.getSubsequentNonWhiteSpacedChild(element, 1 /* Next */); if (checkChild && firstChild) { if (RemoteDom.searchUtilities.previousDFSElement === firstChild) { return getSubsequentDFSNode(element); } else if (firstChild && (firstChild.tagName === "IFRAME" || firstChild.tagName === "FRAME")) { var view = Common.RemoteHelpers.getDefaultView(firstChild.ownerDocument); var result = Common.RemoteHelpers.getValidWindow(view, firstChild.contentWindow); if (result.isValid && RemoteDom.searchUtilities.previousDFSElement === result.window.document) { return getSubsequentDFSNode(element); } } else { return RemoteDom.searchUtilities.getDeepestRightChild(element); } } else { return getSubsequentDFSNode(element); } }, initializeIframeStack: function domExplorer$searchUtilities$initializeIframeStack(startElement, searchDirection) { var iframeChain = RemoteDom.dom$messageHandlers.getIFrameChain(mainBrowser.document, RemoteDom.domUtilities.getRootElementOfNode(startElement)); RemoteDom.searchUtilities.iframeStack = []; RemoteDom.searchUtilities.iframeStack.push(mainBrowser.document); if (iframeChain && iframeChain.length > 0) { for (var index = iframeChain.length; index > 0; index--) { var parentDocument = mainBrowser.document; if (index !== iframeChain.length) { var parentWindow = Common.RemoteHelpers.getDefaultView(iframeChain[index].ownerDocument); var result = Common.RemoteHelpers.getValidWindow(parentWindow, iframeChain[index].contentWindow); if (result.isValid) { parentDocument = result.window.document; } } if (searchDirection === 1 /* Next */) { RemoteDom.searchUtilities.iframeStack.push(RemoteDom.domUtilities.getSubsequentElementAfterIframe(parentDocument, iframeChain[index - 1], 1 /* Next */)); } else { RemoteDom.searchUtilities.iframeStack.push(iframeChain[index - 1]); } } } if (startElement.parentNode && startElement !== mainBrowser.document.documentElement) { if (startElement.children && startElement.children.length > 0) { RemoteDom.searchUtilities.previousDFSElement = startElement.children[0]; } } }, listContainsElement: function domExplorer$searchUtilities$listContainsElement(elementList, element) { if (elementList && elementList.length > 0) { for (var index = 0; index < elementList.length; index++) { if (element === elementList[index]) { return index; } } } return -1; }, obtainSubsequentDFSElement: function domExplorer$searchUtilities$obtainSubsequentDFSElement(element, searchDirection, startElement) { var checkChild = !(element === startElement && element !== mainBrowser.document && searchDirection === -1 /* Previous */); if (searchDirection === 1 /* Next */) { return RemoteDom.searchUtilities.obtainNextDFSElement(element, checkChild); } else { return RemoteDom.searchUtilities.obtainPreviousDFSElement(element, checkChild); } }, popOutOfIframe: function domExplorer$searchUtilities$popOutOfIframe() { var element = RemoteDom.searchUtilities.iframeStack.pop(); if (RemoteDom.searchUtilities.iframeStack.length === 0) { RemoteDom.searchUtilities.iframeStack.push(mainBrowser.document); RemoteDom.searchUtilities.previousDFSElement = null; } return element; }, queryFrameUsingQuerySelector: function queryframeUsingQuerySelector(element, userQuerySelector) { var ownerDocument = mainBrowser.document["__unitTest"] ? mainBrowser.document : (element.ownerDocument || element); for (var resultIndex = 0; resultIndex < RemoteDom.searchUtilities.querySelectorResults.length; resultIndex++) { if (RemoteDom.searchUtilities.querySelectorResults[resultIndex].doc === ownerDocument) { return RemoteDom.searchUtilities.querySelectorResults[resultIndex].result; } } var resultsArray = []; try { if (ownerDocument.querySelectorAll) { var results = ownerDocument.querySelectorAll(userQuerySelector); if (results && results.length > 0) { for (var index = 0; index < results.length; index++) { resultsArray.push(results[index]); } } RemoteDom.searchUtilities.querySelectorResults.push({ doc: ownerDocument, result: resultsArray }); } } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } return resultsArray; }, getSearchResult: function domExplorer$searchUtilities$getSearchResult(startElement, userTextTerm, searchDirection, startFromCurrentElement) { RemoteDom.searchUtilities.querySelectorResults = []; RemoteDom.searchUtilities.initializeIframeStack(startElement, searchDirection); var element = startElement; var docTraversalComplete = false; var searchProgress = false; while (!docTraversalComplete) { if (!startFromCurrentElement) { searchProgress = true; element = RemoteDom.searchUtilities.obtainSubsequentDFSElement(element, searchDirection, startElement); } else { startFromCurrentElement = false; } if (element) { var results = RemoteDom.searchUtilities.queryFrameUsingQuerySelector(element, userTextTerm); if (results && RemoteDom.searchUtilities.listContainsElement(results, element) !== -1) { return element; } var stringifiedNode = htmlTreeHelpers.createStringForElement(element); if (stringifiedNode && stringifiedNode.toLowerCase().indexOf(userTextTerm.toLowerCase()) !== -1) { return element; } } if (element === startElement && searchProgress) { docTraversalComplete = true; } while (!element) { element = RemoteDom.searchUtilities.popOutOfIframe(); startFromCurrentElement = true; } } return null; } }; RemoteDom.dom$messageHandlers = { initializeHost: function domExplorer$messageHandlers$initializeHost(hostId) { RemoteDom.remoteCode.hostId = hostId; }, startSingleEdit: function domExplorer$messageHandlers$startSingleEdit() { RemoteDom.remoteCode.editStack.startSingleEdit(); }, endSingleEdit: function domExplorer$messageHandlers$endSingleEdit() { RemoteDom.remoteCode.editStack.endSingleEdit(); }, enableEditChaining: function domExplorer$messageHandlers$enableEditChaining() { RemoteDom.remoteCode.editStack.enableChaining(); }, disableEditChaining: function domExplorer$messageHandlers$disableEditChaining() { RemoteDom.remoteCode.editStack.disableChaining(); }, undoLastEdit: function domExplorer$messageHandlers$performUndo() { return RemoteDom.remoteCode.editStack.undo(); }, performNextEdit: function domExplorer$messageHandlers$performEdit() { return RemoteDom.remoteCode.editStack.performNextEdit(); }, setTestEditCallbacks: function domExplorer$messageHandlers$performEdit(testEditCallback, testUndoCallback) { RemoteDom.remoteCode.editStack.setTestEditCallbacks(testEditCallback, testUndoCallback); }, somethingToUndo: function domExplorer$messageHandlers$somethingToUndo() { return RemoteDom.remoteCode.editStack.somethingToUndo(); }, somethingToDo: function domExplorer$messageHandlers$somethingToDo() { return RemoteDom.remoteCode.editStack.somethingToDo(); }, getRootElement: function domExplorer$messageHandlers$getRootElement() { RemoteDom.domUtilities.reset(); if ((typeof mainBrowser.document) === "object") { if (Common.RemoteHelpers.getDocumentMode() < 9 && mainBrowser.document.readyState !== "complete") { var defaultView = Common.RemoteHelpers.getDefaultView(mainBrowser.document); Common.RemoteHelpers.addSafeListener(defaultView, mainBrowser.document, "readystatechange", function () { if (mainBrowser.document.readyState === "complete") { RemoteDom.remoteCode.initializePage(); } }, false); } return htmlTreeHelpers.createMappedNode(mainBrowser.document, false, false); } return null; }, getChildren: function domExplorer$messageHandlers$getChildren(uid, showAll, callback) { try { var ret = htmlTreeHelpers.getChildrenForMappedNode(uid, false, showAll); } catch (ex) { if ((ex.number & 0xFFFFFFFF) === (0x800A0046 & 0xFFFFFFFF)) { htmlTreeHelpers.deleteMappedNode(uid); ret = null; } else { throw ex; } } if (!ret) { RemoteDom.remoteCode.onBeforeScriptExecute(Common.RemoteHelpers.getDefaultView(mainBrowser.document)); } else { RemoteDom.domUtilities.getChunker().sendChildren(htmlTreeHelpers.mapping[uid], ret, showAll, callback); } }, attachDOMContentLoadedEvent: function domExplorer$messageHandlers$attachDOMContentLoadedEvent(uid, callback) { if (!mainBrowser.document.addEventListener || !RemoteDom.remoteCode.scriptExecutionSupported) { return; } var defaultView = Common.RemoteHelpers.getDefaultView(mainBrowser.document); Common.RemoteHelpers.addSafeListener(defaultView, mainBrowser.document, "DOMContentLoaded", function () { RemoteDom.dom$messageHandlers.getChildren(uid, true, function (chunk) { callback({ uid: uid, children: chunk.children }); }); }, true); }, removeChildMappings: function domExplorer$messageHandlers$removeChildMappings(uid) { htmlTreeHelpers.deleteMappedNode(uid, true); }, editAttribute: function domExplorer$messageHandlers$editAttribute(uid, name, value) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } var edit = new F12.RemoteDom.EditAttribute(styleUtilities, htmlTreeHelpers, mappedNode.ele, name, value); return RemoteDom.remoteCode.editStack.performEdit(edit); }, removeAttribute: function domExplorer$messageHandlers$removeAttribute(uid, name) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } var edit = new F12.RemoteDom.RemoveAttribute(styleUtilities, htmlTreeHelpers, uid, name); return RemoteDom.remoteCode.editStack.performEdit(edit); }, editText: function domExplorer$messageHandlers$editText(uid, newText) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } var element = mappedNode.ele; if (Common.RemoteHelpers.getLeafTextContent(element) !== newText) { var edit = new F12.RemoteDom.EditText(element, newText); RemoteDom.remoteCode.editStack.performEdit(edit); } return false; }, hoverItem: function domExplorer$messageHandlers$hoverItem(uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { RemoteDom.domUtilities.currentHoverItemUid = null; RemoteDom.domUtilities.removeHighlight(); return; } RemoteDom.domUtilities.currentHoverItemUid = uid; var element = mappedNode.ele; RemoteDom.domUtilities.highlightElement(element, RemoteDom.domUtilities.basicHighlightColor); }, hideHoverItem: function domExplorer$messageHandlers$hideHoverItem() { RemoteDom.domUtilities.removeHighlight(); }, attachMediaQueryEvents: function domExplorer$messageHandlers$attachMediaQueryEvents(mediaChangeCallback) { RemoteDom.domUtilities.mediaStyleChangeCallback = mediaChangeCallback; if (Common.RemoteHelpers.getDocumentMode() <= 9) { return; } var defaultView = Common.RemoteHelpers.getDefaultView(mainBrowser.document); if (!defaultView) { return; } if (RemoteDom.remoteCode.scriptExecutionSupported) { RemoteDom.remoteCode.safeMqlListener = remoteHelpers.createSafeFunction(defaultView, function (mql) { styleUtilities.stylechange(); }); RemoteDom.remoteCode.mediaQueryLists = []; var numStyleSheets = mainBrowser.document.styleSheets.length; for (var i = 0; i < numStyleSheets; i++) { var styleSheet = mainBrowser.document.styleSheets[i]; if (styleSheet.media) { var mediaQueryList = defaultView.matchMedia(styleSheet.media.mediaText); mediaQueryList.addListener(RemoteDom.remoteCode.safeMqlListener); RemoteDom.remoteCode.mediaQueryLists.push(mediaQueryList); } var cssStyleSheet = styleSheet; try { var numRules = cssStyleSheet.cssRules.length; for (var j = 0; j < numRules; j++) { var rule = styleSheet.cssRules[j]; if (rule.type === defaultView.CSSRule.MEDIA_RULE || rule.type === defaultView.CSSRule.IMPORT_RULE) { var importRule = rule; mediaQueryList = defaultView.matchMedia(importRule.media.mediaText); mediaQueryList.addListener(RemoteDom.remoteCode.safeMqlListener); RemoteDom.remoteCode.mediaQueryLists.push(mediaQueryList); } } } catch (ex) { Common.RemoteHelpers.encounteredException(ex); } } } }, selectElementByClick: function domExplorer$messageHandlers$selectElementByClick(selectCallback) { if (RemoteDom.domUtilities.isSelectingElement || !mainBrowser.document.body) { return; } RemoteDom.domUtilities.isSelectingElement = true; RemoteDom.domUtilities.selectElementInLiveDomEnable(); RemoteDom.domUtilities.selectElementClickCallback = selectCallback; }, cancelSelectElementByClick: function domExplorer$messageHandlers$cancelSelectElementByClick() { if (RemoteDom.domUtilities.isSelectingElement) { RemoteDom.domUtilities.removeHighlight(); RemoteDom.domUtilities.selectElementInLiveDomDisable(); RemoteDom.domUtilities.isSelectingElement = false; RemoteDom.domUtilities.selectElementClickCallback = null; } }, getIFrameChain: function domExplorer$messageHandlers$getIFrameChain(rootDocument, findDocument) { var tags = rootDocument.querySelectorAll("iframe, frame"); for (var i = 0, n = tags.length; i < n; i++) { var frame = tags[i]; var view = Common.RemoteHelpers.getDefaultView(rootDocument); var result = Common.RemoteHelpers.getValidWindow(view, frame.contentWindow); if (result.isValid) { if (result.window.document === findDocument) { return [tags[i]]; } var chain = RemoteDom.dom$messageHandlers.getIFrameChain(result.window.document, findDocument); if (chain && chain.length > 0) { chain.push(tags[i]); return chain; } } } return []; }, getParentChainForSelectedElement: function domExplorer$messageHandlers$getParentChainForSelectedElement() { return RemoteDom.domUtilities.findParentChainForElement(RemoteDom.domUtilities.selectElementLastSelected); }, inspectElement: function domExplorer$messageHandlers$inspectElement(element) { if (!element || !htmlTreeHelpers.isElementAccessible(element)) { return; } RemoteDom.dom$messageHandlers.selectElementFromConsole(element); RemoteDom.remoteCode.vsFocusCallback(true); }, inspectElementById: function domExplorer$messageHandlers$inspectElementById(inspectElementId) { try { var element = dom.getElementByUniqueId(inspectElementId); RemoteDom.dom$messageHandlers.inspectElement(element); } catch (ex) { } }, findTerm: function domExplorer$messageHandlers$findTerm(currentSelectedUID, searchTerm, searchDirection, isQuerySelectorSearch) { RemoteDom.searchUtilities.previousDFSElement = null; RemoteDom.searchUtilities.iframeStack = null; var startFromCurrent = false; var element = null; var mappedNode; var matches = currentSelectedUID.match(/^(style|script)/); if (matches) { mappedNode = htmlTreeHelpers.mapping[currentSelectedUID.replace(matches[0], "")]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { element = mainBrowser.document; } else { if (searchDirection === 1 /* Next */) { element = RemoteDom.searchUtilities.obtainNextDFSElement(mappedNode.ele, false); startFromCurrent = true; if (!element) { RemoteDom.searchUtilities.initializeIframeStack(mappedNode.ele, 1 /* Next */); if (RemoteDom.searchUtilities.iframeStack && RemoteDom.searchUtilities.iframeStack.length) { element = RemoteDom.searchUtilities.iframeStack[RemoteDom.searchUtilities.iframeStack.length - 1]; RemoteDom.searchUtilities.iframeStack = null; } else { element = mainBrowser.document; } } } else { element = mappedNode.ele; } } } else { mappedNode = htmlTreeHelpers.mapping[currentSelectedUID]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { element = mainBrowser.document; } else { element = mappedNode.ele; } } var result = RemoteDom.searchUtilities.getSearchResult(element, searchTerm, searchDirection, startFromCurrent); return result ? RemoteDom.domUtilities.findParentChainForElement(result) : []; }, getComputedBox: function domExplorer$messageHandlers$getComputedBox(uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } var element = mappedNode.ele; if (!element.tagName) { return; } var computedBox = { offsetTop: 0, offsetLeft: 0, clientWidth: 0, clientHeight: 0 }; var win = Common.RemoteHelpers.getDefaultView(mainBrowser.document); var compStyle = Common.RemoteHelpers.getComputedStyle(win, element); var i; var styleProperties = styleUtilities.styleProperties; for (i = 0; i < styleProperties.length; i++) { computedBox[styleProperties[i]] = compStyle[styleProperties[i]]; } var elementProperties = styleUtilities.elementProperties; for (i = 0; i < elementProperties.length; i++) { computedBox[elementProperties[i]] = element[elementProperties[i]]; } if (Common.RemoteHelpers.getDocumentMode() >= 9 && typeof computedBox.offsetTop === "undefined" && typeof computedBox.offsetLeft === "undefined") { if (element && element.getBoundingClientRect) { var rect = element.getBoundingClientRect(); if (rect.top !== undefined && rect.left !== undefined && rect.width !== undefined && rect.height !== undefined) { var body = mainBrowser.document.body; var docElem = mainBrowser.document.documentElement; var scrollTop = win.pageYOffset || docElem.scrollTop || body.scrollTop; var scrollLeft = win.pageXOffset || docElem.scrollLeft || body.scrollLeft; var clientTop = docElem.clientTop || body.clientTop || 0; var clientLeft = docElem.clientLeft || body.clientLeft || 0; computedBox.offsetTop = Math.round(rect.top + scrollTop - clientTop); computedBox.offsetLeft = Math.round(rect.left + scrollLeft - clientLeft); computedBox.clientWidth = rect.width; computedBox.clientHeight = rect.height; } } } for (var prop in computedBox) { if (computedBox[prop]) { computedBox[prop] = styleUtilities.standardizeLayoutUnits(computedBox[prop]); } } return computedBox; }, getComputedBoxValueByElement: function domExplorer$messageHandlers$getComputedBoxValueByElement(element, property) { var value; var i; var styleProperties = styleUtilities.styleProperties; for (i = 0; i < styleProperties.length; i++) { if (styleProperties[i] === property) { var win = Common.RemoteHelpers.getDefaultView(mainBrowser.document); var compStyle = Common.RemoteHelpers.getComputedStyle(win, element); value = compStyle[property]; break; } } var elementProperties = styleUtilities.elementProperties; for (i = 0; i < elementProperties.length; i++) { if (elementProperties[i] === property) { value = element[property]; break; } } return styleUtilities.standardizeLayoutUnits(value); }, addAttrModifiedEvent: function domExplorer$messageHandlers$addAttrModifiedEvent(uid) { var nodeToAddCallbackTo = htmlTreeHelpers.mapping[uid]; if (!nodeToAddCallbackTo || !htmlTreeHelpers.isElementAccessible(nodeToAddCallbackTo.ele)) { return false; } var defaultView = Common.RemoteHelpers.getDefaultView(nodeToAddCallbackTo.ele.ownerDocument); if (nodeToAddCallbackTo.pendingAttrModified) { RemoteDom.domUtilities.getMutationManager().fireAttributeModified(nodeToAddCallbackTo); } if (htmlTreeHelpers.hasSpecialValueAttribute(nodeToAddCallbackTo.ele) && nodeToAddCallbackTo.ele.attachEvent && RemoteDom.remoteCode.scriptExecutionSupported) { if (nodeToAddCallbackTo.onValueModified) { Common.RemoteHelpers.removeListener(nodeToAddCallbackTo.ele, "propertychange", nodeToAddCallbackTo.onValueModified); } var onPropertyChanged = function (e) { if (e.propertyName === "value") { RemoteDom.domUtilities.getMutationManager().fireAttributeModified(e.srcElement, "value", e.srcElement.value, 0); } }; nodeToAddCallbackTo.onValueModified = Common.RemoteHelpers.addSafeListener(defaultView, nodeToAddCallbackTo.ele, "propertychange", onPropertyChanged); } if (!htmlTreeHelpers.isElementAccessible(nodeToAddCallbackTo.ele.ownerDocument)) { return false; } var root = nodeToAddCallbackTo.ele.ownerDocument; for (var docIndex = 0; docIndex < RemoteDom.domUtilities.attachedAttrModifiedDocs.length; docIndex++) { var docInfo = RemoteDom.domUtilities.attachedAttrModifiedDocs[docIndex]; if (docInfo.doc === root) { nodeToAddCallbackTo.onAttributeModified = docInfo.callback; return false; } } if (RemoteDom.remoteCode.scriptExecutionSupported) { var onModified = function (e) { var parentElement = e.srcElement; if (!parentElement) { return; } RemoteDom.domUtilities.getMutationManager().fireAttributeModified(e.target, e.attrName, e.newValue, e.attrChange, e.attrName === "style" ? styleUtilities.styleAttrModified.bind(styleUtilities) : null); }; var onModifiedSafe = Common.RemoteHelpers.addSafeListener(defaultView, root, "DOMAttrModified", onModified, true); RemoteDom.domUtilities.attachedAttrModifiedDocs.push({ doc: root, handler: onModifiedSafe }); } return true; }, setupTreeModifiedEvent: function domExplorer$messageHandlers$setupTreeModifiedEvent(callback) { RemoteDom.domUtilities.getMutationManager().treeModifiedCallback = callback; }, setupAttributeModifiedEvent: function domExplorer$messageHandlers$setupAttributeModifiedEvent(callback) { RemoteDom.domUtilities.getMutationManager().attributeModifiedCallback = callback; }, addTreeModifiedEvent: function domExplorer$messageHandlers$addTreeModifiedEvent(uid) { var nodeToAddCallbackTo = htmlTreeHelpers.mapping[uid]; if (!nodeToAddCallbackTo || !htmlTreeHelpers.isElementAccessible(nodeToAddCallbackTo.ele)) { return false; } nodeToAddCallbackTo.listenForTreeModified = true; if (!htmlTreeHelpers.isElementAccessible(nodeToAddCallbackTo.ele.ownerDocument)) { return false; } var root = nodeToAddCallbackTo.ele.ownerDocument; for (var docIndex = 0; docIndex < RemoteDom.domUtilities.attachedDomModifiedDocs.length; docIndex++) { var docInfo = RemoteDom.domUtilities.attachedDomModifiedDocs[docIndex]; if (docInfo.doc === root) { return false; } } var deferModifiedList = []; var deferModifiedTimeoutFlag = false; var onModified = function domExplorer$messageHandlers$addTreeModifiedEvent$onModified(e) { function addFirstChild(mappedNode, mappedChild) { mappedNode.childrenNodes = [mappedChild]; var mapping = htmlTreeHelpers.mapping; var entry = mapping[mappedChild.uid]; if (entry && entry.ele && entry.ele.nodeName === "#text") { var textContent = Common.RemoteHelpers.getLeafTextContent(entry.ele); if (!String.prototype.match.call(textContent, /\n/g) && textContent.length < htmlTreeHelpers.maxInlineLength) { mappedNode.mapped.hasChildren = false; mappedNode.mapped.text = textContent; } else { mappedNode.mapped.hasChildren = true; } } } function findMappedNodeByElement(element) { var uidString = RemoteDom.remoteCode.getUidOrNull(element); return uidString && htmlTreeHelpers.mapping[uidString]; } function removeElementFromMappedNode(mappedNode, element) { if (mappedNode.mapped && mappedNode.mapped.hasChildren && !mappedNode.childrenNodes) { mappedNode.childrenNodes = [{ uid: "expandMe" }]; } if (mappedNode.childrenNodes) { if (mappedNode.childrenNodes.length === 1 && mappedNode.childrenNodes[0].uid === "expandMe") { if (mappedNode.ele.childNodes.length === 0 || mappedNode.ele.children && mappedNode.ele.children.length === 1 && mappedNode.ele.children[0].uniqueID === element.uniqueID) { mappedNode.childrenNodes = []; } } else { var mapping = htmlTreeHelpers.mapping; for (var i = 0; i < mappedNode.childrenNodes.length; i++) { var childUid = mappedNode.childrenNodes[i].uid; var childNode = mapping[childUid]; if (childNode && mapping[childUid].ele === element) { htmlTreeHelpers.deleteMappedNode(childUid); mappedNode.childrenNodes.splice(i, 1); break; } } } mappedNode.mapped.hasChildren = (mappedNode.childrenNodes && mappedNode.childrenNodes.length > 0); } else if (element.nodeName === "#text") { delete mappedNode.mapped.text; } } function synchronizeMappedNodeChildren(mappedNode) { var e = mappedNode.ele; var children; try { children = e.childNodes; } catch (ex) { children = undefined; } var i; var end; var mappedNodeChildrenMap = {}; if (mappedNode.childrenNodes) { for (i = 0, end = mappedNode.childrenNodes.length; i < end; i++) { var uid = mappedNode.childrenNodes[i].uid; mappedNodeChildrenMap[uid] = true; } } var newChildren = []; if (children) { for (i = 0, end = children.length; i < end; i++) { var child = children[i]; var childUid = RemoteDom.remoteCode.getUidOrNull(child); var found = childUid && mappedNodeChildrenMap[childUid]; if (!found) { newChildren.push(child); } } } for (i = 0, end = newChildren.length; i < end; i++) { if (mappedNode.isExpanded) { addElementToMappedNode(mappedNode, newChildren[i]); } else { addElementToNonExpandedMappedNode(mappedNode, newChildren[i]); } } return newChildren.length > 0; } function synchronizeMappedNodeChildrenFn() { deferModifiedTimeoutFlag = false; for (var i = 0, end = deferModifiedList.length; i < end; i++) { var mappedNode = deferModifiedList[i].mappedNode; if (synchronizeMappedNodeChildren(mappedNode)) { var uid = deferModifiedList[i].uid; RemoteDom.domUtilities.getMutationManager().fireTreeModified(mappedNode, uid); } } deferModifiedList = []; } function deferSynchronizeMappedNodeChildren(mappedNode, uid) { deferModifiedList.push({ mappedNode: mappedNode, uid: uid }); if (!deferModifiedTimeoutFlag) { try { deferModifiedTimeoutFlag = true; diagnostics.setTimeout(synchronizeMappedNodeChildrenFn, 0); } catch (e) { Common.RemoteHelpers.encounteredException(e); } } } function removeMappedNodeAndDescendants(node) { if (node.hasChildNodes) { for (var i = 0; i < node.childNodes.length; i++) { var childNode = node.childNodes[i]; removeMappedNodeAndDescendants(childNode); } } var uid = RemoteDom.remoteCode.getUidOrNull(node); if (uid) { var map = htmlTreeHelpers.mapping; delete map[uid]; } } function addElementToMappedNode(mappedNode, element) { var mappedChild = htmlTreeHelpers.createMappedNode(element, false); if (mappedChild) { if (!mappedNode.childrenNodes || mappedNode.childrenNodes.length === 0) { addFirstChild(mappedNode, mappedChild); } else { var found = false; var existingChildren = mappedNode.ele.childNodes; var insertIndex = 0; for (var nodeIndex = 0; nodeIndex < existingChildren.length; nodeIndex++, insertIndex++) { var existingChild = existingChildren[nodeIndex]; if (existingChild === element) { mappedNode.childrenNodes.splice(insertIndex, 0, mappedChild); found = true; break; } else if (existingChild.nodeName === "#text") { var text = Common.RemoteHelpers.getLeafTextContent(existingChild); if (typeof text === "string" && !/\S/.test(text)) { insertIndex--; } } } if (!found) { mappedNode.childrenNodes.push(mappedChild); } } } } function addElementToNonExpandedMappedNode(mappedNode, element) { var mappedChild = htmlTreeHelpers.createMappedNode(element, false); if (mappedChild && (!mappedNode.childrenNodes || mappedNode.childrenNodes.length === 0) && !mappedNode.mapped.hasChildren) { addFirstChild(mappedNode, mappedChild); } else { mappedNode.mapped.hasChildren = true; mappedNode.childrenNodes = [{ uid: "expandMe" }]; } } function removeTextElementIfAlreadyExistsInMapping(element) { if (!element) { return; } if (element.nodeName !== "#text") { return; } var mappedNode = findMappedNodeByElement(element); var parentUid = mappedNode && mappedNode.mapped && mappedNode.mapped.parentUid; if (!parentUid) { return; } var parentMappedNode = htmlTreeHelpers.mapping[parentUid]; if (!parentMappedNode) { return; } removeElementFromMappedNode(parentMappedNode, element); RemoteDom.domUtilities.getMutationManager().fireTreeModified(parentMappedNode, parentUid); } function workaroundReconciliation(element) { if (!element || !element.childNodes || element.childNodes.length !== 1 || element.firstChild.nodeType !== element.firstChild.TEXT_NODE) { return; } var mappedNode = findMappedNodeByElement(element); if (!mappedNode.childrenNodes) { return; } var children = mappedNode.childrenNodes.slice(0); for (var i = 0, end = children.length; i < end; i++) { var childUid = children[i].uid; if (typeof childUid !== "string" || !childUid) { continue; } var childMappedNode = htmlTreeHelpers.mapping[childUid]; if (childMappedNode && childMappedNode.ele !== element.firstChild) { removeElementFromMappedNode(mappedNode, childMappedNode.ele); } } } var element = e.target; if (!element) { return; } var parentElement = e.target.parentNode; if (!parentElement) { var uid = RemoteDom.remoteCode.getUidOrNull(element); if (uid && htmlTreeHelpers.mapping[uid]) { htmlTreeHelpers.deleteMappedNode(uid); } return; } var parentMappedNode = findMappedNodeByElement(parentElement); if (parentMappedNode) { var parentUid = RemoteDom.remoteCode.getUidOrNull(parentElement); if (e.type === "DOMNodeInserted" || e.type === "DOMCharacterDataModified") { if (e.type === "DOMCharacterDataModified") { workaroundReconciliation(e.target.parentNode); } if (e.target.nodeName === "#text") { removeTextElementIfAlreadyExistsInMapping(e.target); } if (parentMappedNode.isExpanded) { addElementToMappedNode(parentMappedNode, element); } else { addElementToNonExpandedMappedNode(parentMappedNode, element); } } else if (e.type === "DOMNodeRemoved") { removeElementFromMappedNode(parentMappedNode, element); removeMappedNodeAndDescendants(element); deferSynchronizeMappedNodeChildren(parentMappedNode, parentUid); } RemoteDom.domUtilities.getMutationManager().fireTreeModified(parentMappedNode, parentUid); } }; var onUnload = function domExplorer$messageHandlers$addTreeModifiedEvent$onUnload(e) { RemoteDom.remoteCode.editStack.reset(); var target = Common.RemoteHelpers.getEventTarget(e); if (!target) { return; } var iframeChain = RemoteDom.dom$messageHandlers.getIFrameChain(mainBrowser.document, target.document); if (iframeChain.length > 0) { var targetElement = iframeChain[0]; var mappedNode = null; var uid = RemoteDom.remoteCode.getUidOrNull(targetElement); if (uid) { if (htmlTreeHelpers.mapping[uid] && htmlTreeHelpers.mapping[uid].ele === targetElement) { mappedNode = htmlTreeHelpers.mapping[uid]; } } else { for (uid in htmlTreeHelpers.mapping) { if (htmlTreeHelpers.mapping[uid].ele === targetElement) { mappedNode = htmlTreeHelpers.mapping[uid]; break; } } } if (mappedNode) { var removeEvent = { type: "DOMNodeRemoved", target: mappedNode.ele }; onModified(removeEvent); } } }; if (RemoteDom.remoteCode.scriptExecutionSupported) { var root = nodeToAddCallbackTo.ele.ownerDocument; var defaultView = Common.RemoteHelpers.getDefaultView(root); var onModifiedSafe = Common.RemoteHelpers.addSafeListener(defaultView, root, "DOMNodeInserted", onModified, true); Common.RemoteHelpers.addListener(root, "DOMNodeRemoved", onModifiedSafe, true); Common.RemoteHelpers.addListener(root, "DOMCharacterDataModified", onModifiedSafe, true); if (!RemoteDom.remoteCode.unloadSafe) { RemoteDom.remoteCode.unloadSafe = Common.RemoteHelpers.addSafeListener(defaultView, defaultView, "unload", onUnload, true); } RemoteDom.domUtilities.attachedDomModifiedDocs.push({ doc: root, handler: onModifiedSafe }); } return true; }, getElementUid: function domExplorer$messageHandlers$getElementUid(element) { if (element) { var uid = element["uniqueID"]; if (uid && htmlTreeHelpers.mapping[uid]) { return uid; } uid = element["bpt-uid"]; if (uid && htmlTreeHelpers.mapping[uid]) { return uid; } } return null; }, getWinningProperty: function domExplorer$messageHandlers$getWinningRule(propertyName) { var mappedProperty = styleUtilities.getWinningProperty(propertyName); return mappedProperty ? mappedProperty.appliedProperty.uid : ""; }, getCssClassesUsedInCurrentDocument: function domExplorer$messageHandlers$getCssClassesUsedInCurrentDocument(uid) { if (Common.RemoteHelpers.getDocumentMode() < 8) { return []; } var docToSearch = mainBrowser.document; if (uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return []; } try { if (mappedNode.ele.ownerDocument) { docToSearch = mappedNode.ele.ownerDocument; } } catch (ex) { return []; } } return F12.RemoteDom.CssInformationExtractor.getCssClassesUsedInCurrentDocument(docToSearch); }, getComputedStyles: function domExplorer$messageHandlers$getComputedStyles(uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } if (mappedNode.parentUid) { mappedNode = htmlTreeHelpers.mapping[mappedNode.parentUid]; if (!mappedNode) { return; } } var element = mappedNode.ele; var computedStyles = styleUtilities.getComputedStyle(element); return [computedStyles]; }, arrayContains: function domExplorer$messageHandlers$arrayContains(array, value) { for (var i = 0; i < array.length; i++) { if (array[i] === value) { return true; } } return false; }, clearStyleCache: function domExplorer$messageHandlers$clearStyleCache() { styleUtilities.clearCache(false); RemoteDom.remoteCode.editStack.reset(); }, getParentChainForStyle: function domExplorer$messageHandlers$getParentChainForStyle(uid) { var element = styleUtilities.getElementForStyle(uid); if (element) { return RemoteDom.domUtilities.findParentChainForElement(element); } }, getStyles: function domExplorer$messageHandlers$getStyles(uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } if (mappedNode.parentUid) { mappedNode = htmlTreeHelpers.mapping[mappedNode.parentUid]; if (!mappedNode) { return; } } return styleUtilities.refreshCurrentRules(mappedNode.ele); }, getChangedStyles: function domExplorer$messageHandlers$getChangedStyles() { return styleUtilities.getChangedRules(); }, editStylePropertyEnable: function domExplorer$messageHandlers$editStylePropertyEnable(propertyUid, enable) { var mappedProperty = styleUtilities.lookupMappedProperty(propertyUid); if (mappedProperty) { var edit = new F12.RemoteDom.EditStylePropertyEnable(styleUtilities, mappedProperty, enable); RemoteDom.remoteCode.editStack.performEdit(edit); } }, deleteElement: function domExplorer$messageHandlers$deleteElement(uid) { var isStyle = false; if (uid.substr(0, 5) === "style") { uid = uid.substr(5); isStyle = true; } var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return false; } var edit = new F12.RemoteDom.DeleteElement(mappedNode.ele, isStyle); return RemoteDom.remoteCode.editStack.performEdit(edit); }, addElement: function domExplorer$messageHandlers$addElement(parentUid, beforeUid, htmlText) { var parentNode = htmlTreeHelpers.mapping[parentUid]; if (!parentNode || !htmlTreeHelpers.isElementAccessible(parentNode.ele)) { return false; } var parentElement = parentNode.ele; var beforeElement = null; if (beforeUid) { var beforeNode = htmlTreeHelpers.mapping[beforeUid]; if (!beforeNode || !htmlTreeHelpers.isElementAccessible(beforeNode.ele)) { return false; } beforeElement = beforeNode.ele; } var edit = new F12.RemoteDom.AddElement(parentElement, beforeElement, htmlText); return RemoteDom.remoteCode.editStack.performEdit(edit); }, replaceElement: function domExplorer$messageHandlers$replaceElement(parentUid, htmlText) { var parentNode = htmlTreeHelpers.mapping[parentUid]; if (!parentNode || !htmlTreeHelpers.isElementAccessible(parentNode.ele)) { return false; } var edit = new F12.RemoteDom.ReplaceElement(parentNode.ele, htmlText); return RemoteDom.remoteCode.editStack.performEdit(edit); }, editStylePropertyValue: function domExplorer$messageHandlers$editStylePropertyValue(propertyUid, newValue, isImportant) { var mappedProperty = styleUtilities.lookupMappedProperty(propertyUid); if (mappedProperty) { var edit = new F12.RemoteDom.EditStylePropertyValue(styleUtilities, mappedProperty, newValue, isImportant); RemoteDom.remoteCode.editStack.performEdit(edit); return edit.result; } }, editStylePropertyName: function domExplorer$messageHandlers$editStylePropertyValue(propertyUid, newName) { var mappedProperty = styleUtilities.lookupMappedProperty(propertyUid); if (mappedProperty) { var edit = new F12.RemoteDom.EditStylePropertyName(styleUtilities, mappedProperty, newName); RemoteDom.remoteCode.editStack.performEdit(edit); return edit.result; } }, revertProperty: function domExplorer$messageHandlers$editStylePropertyValue(propertyUid, newName) { var mappedProperty = styleUtilities.lookupMappedProperty(propertyUid); if (mappedProperty) { var edit = new F12.RemoteDom.RevertProperty(styleUtilities, mappedProperty); RemoteDom.remoteCode.editStack.performEdit(edit); return edit.result; } }, removeStyleProperty: function domExplorer$messageHandlers$removeStyleProperty(propertyUid) { var mappedProperty = styleUtilities.lookupMappedProperty(propertyUid); if (mappedProperty) { var edit = new F12.RemoteDom.EditStylePropertyRemove(styleUtilities, mappedProperty); RemoteDom.remoteCode.editStack.performEdit(edit); return edit.result; } }, clearCurrentEventProxy: function domExplorer$messageHandlers$clearCurrentEventProxy() { RemoteDom.domUtilities.removeAllCurrentEventProxyListeners(); RemoteDom.domUtilities.currentEventProxy = null; }, collectEvents: function domExplorer$messageHandlers$collectEvents(uid, handlersRetrievedCallback, handlerAddedCallback, handlerRemovedCallback) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } var mappedElement = mappedNode.ele; RemoteDom.domUtilities.removeAllCurrentEventProxyListeners(); RemoteDom.domUtilities.currentEventProxy = dom.getElementEventHelper(mappedElement); if (!RemoteDom.domUtilities.currentEventProxy) { return; } RemoteDom.domUtilities.currentEventProxy = dom.getElementEventHelper(mappedElement); var addedCallback = function (a) { RemoteDom.dom$messageHandlers.onAdded(handlerAddedCallback, a); }; var removedCallback = function (a) { RemoteDom.dom$messageHandlers.onRemoved(handlerRemovedCallback, a); }; Common.RemoteHelpers.addListener(RemoteDom.domUtilities.currentEventProxy, "listenerAdded", addedCallback); Common.RemoteHelpers.addListener(RemoteDom.domUtilities.currentEventProxy, "listenerRemoved", removedCallback); if (!RemoteDom.domUtilities.currentEventProxyListeners) { RemoteDom.domUtilities.currentEventProxyListeners = []; } RemoteDom.domUtilities.currentEventProxyListeners.push({ name: "listenerAdded", callback: addedCallback }); RemoteDom.domUtilities.currentEventProxyListeners.push({ name: "listenerRemoved", callback: removedCallback }); var listeners = RemoteDom.domUtilities.currentEventProxy.getEventHandlers(); handlersRetrievedCallback(listeners); }, onAdded: function (handlerAddedCallback, a) { handlerAddedCallback(a.listener); }, onRemoved: function (handlerRemovedCallback, a) { handlerRemovedCallback(a.listener); }, getDocumentMode: function domExplorer$messageHandlers$getDocumentMode() { return Common.RemoteHelpers.getDocumentMode(); }, getHTMLString: function domExplorer$messageHandlers$getHTMLString(uid, getInnerHTML) { var style = false; if (uid.substr(0, 5) === "style") { uid = uid.substr(5); style = true; } var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } if (style) { if (mappedNode.ele.nodeName === "STYLE") { return mappedNode.ele.styleSheet ? mappedNode.ele.styleSheet.cssText : Common.RemoteHelpers.getLeafTextContent(mappedNode.ele); } } var element = mappedNode.ele; if (!element.tagName) { if (element.nodeType === element.DOCUMENT_TYPE_NODE) { return Common.RemoteHelpers.getDocumentTypeNodeText(element); } if (element.text) { return element.text; } var textContent = Common.RemoteHelpers.getLeafTextContent(element); if (textContent) { return textContent; } return; } var resultHtml; if (getInnerHTML) { resultHtml = dom.getElementInnerHTML(mappedNode.ele); } else { resultHtml = dom.getElementOuterHTML(mappedNode.ele); } return resultHtml; }, vsFocusCallback: Function, startSelectElementByClickCallback: Function, stopSelectElementByClickCallback: Function, expandToSelectedItemCallback: Function, setKeyBindCallbacks: function domExplorer$messageHandlers$setKeyBindCallbacks(onVSFocusCallback, startSelectElementByClickCallback, stopSelectElementByClickCallback, expandToSelectedItemCallback) { RemoteDom.remoteCode.vsFocusCallback = onVSFocusCallback; RemoteDom.remoteCode.startSelectElementByClickCallback = startSelectElementByClickCallback; RemoteDom.remoteCode.stopSelectElementByClickCallback = stopSelectElementByClickCallback; RemoteDom.remoteCode.expandToSelectedItemCallback = expandToSelectedItemCallback; }, allowProcessToTakeForeground: function domExplorer$messageHandlers$allowProcessToTakeForeground() { try { external.allowProcessToTakeForeground(); } catch (e) { } }, getHWND: function domExplorer$messageHandlers$getHWND() { return toolUI.getHWND(); }, takeForeground: function domExplorer$messageHandlers$takeForeground() { try { external.takeForeground(); return true; } catch (e) { return false; } }, runPaletteCollection: function domExplorer$messageHandlers$runPaletteCollection(callback) { colorPicker.startPalette(callback); }, abortPaletteCollection: function domExplorer$messageHandlers$abortPaletteCollection() { colorPicker.stopPalette(); }, editStyleRuleAdd: function domExplorer$messageHandlers$editStyleRuleAdd(selectorText, propertyName, propertyValue, isImportant, position) { var edit = new F12.RemoteDom.EditStyleRuleAdd(styleUtilities, selectorText, propertyName, propertyValue, isImportant, position); RemoteDom.remoteCode.editStack.performEdit(edit); return edit.result; }, editStyleRuleRemove: function domExplorer$messageHandlers$EditStyleRuleRemove(ruleUid) { var mappedRule = styleUtilities.lookupMappedRule(ruleUid); if (mappedRule) { var edit = new F12.RemoteDom.EditStyleRuleRemove(styleUtilities, mappedRule); if (RemoteDom.remoteCode.editStack.performEdit(edit)) { return edit.result; } } }, revertRule: function domExplorer$messageHandlers$EditStyleRuleRevert(ruleUid) { var mappedRule = styleUtilities.lookupMappedRule(ruleUid); if (mappedRule) { var edit = new F12.RemoteDom.RevertRule(styleUtilities, mappedRule); if (RemoteDom.remoteCode.editStack.performEdit(edit)) { return edit.result; } } }, editStylePropertyAdd: function domExplorer$messageHandlers$editStylePropertyAdd(ruleUid, propertyName, propertyValue, isImportant, beforeUid) { var mappedRule = styleUtilities.lookupMappedRule(ruleUid); if (mappedRule) { var edit = new F12.RemoteDom.EditStylePropertyAdd(styleUtilities, mappedRule, propertyName, propertyValue, isImportant, beforeUid); if (RemoteDom.remoteCode.editStack.performEdit(edit)) { return edit.result; } } }, editStyleRuleSelector: function domExplorer$messageHandler$editRuleSelector(ruleUid, selector) { var mappedRule = styleUtilities.lookupMappedRule(ruleUid); if (mappedRule) { var edit = new F12.RemoteDom.EditStyleRuleSelector(styleUtilities, mappedRule, selector); if (RemoteDom.remoteCode.editStack.performEdit(edit)) { return edit.result; } } }, storeElementForConsole: function domExplorer$messageHandlers$storeElementForConsole(uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } try { if (mappedNode.ele.ownerDocument === mainBrowser.document) { for (var i = 5; i > 0; i--) { RemoteDom.remoteCode._storedElements["$" + i] = RemoteDom.remoteCode._storedElements["$" + (i - 1)]; } RemoteDom.remoteCode._storedElements["$0"] = mappedNode.ele; var defaultView = Common.RemoteHelpers.getDefaultView(mainBrowser.document); for (var i = 0; i <= 4; i++) { if ((typeof defaultView["$" + i]) === "undefined" || defaultView["$" + i] === RemoteDom.remoteCode._storedElements["$" + (i + 1)]) { defaultView["$" + i] = RemoteDom.remoteCode._storedElements["$" + i]; } } if (Common.RemoteHelpers.getDocumentMode() >= 9) { var eventParm = new mainBrowser.document.parentWindow.Object; eventParm.node = mappedNode.ele; var selectNodeEvent = mainBrowser.document.createEvent("CustomEvent"); selectNodeEvent.initCustomEvent("BPT-SelectedNode", false, false, eventParm); mainBrowser.document.parentWindow.dispatchEvent(selectNodeEvent); } } } catch (ex) { return; } }, selectElementFromConsole: function domExplorer$messageHandlers$selectElementFromConsole(element) { if (element && element.ownerDocument) { var view = Common.RemoteHelpers.getDefaultView(element.ownerDocument); if (view && Common.RemoteHelpers.isElement(view, element)) { RemoteDom.domUtilities.selectElementLastSelected = element; RemoteDom.remoteCode.expandToSelectedItemCallback(); return; } } var win = Common.RemoteHelpers.getDefaultView(mainBrowser.document); win.console.error("ConsoleSelectError"); }, reparent: function domExplorer$messageHandlers$reparent(moveThisUid, byThisUid, reparentAction) { var mappedMoveThisNode = htmlTreeHelpers.mapping[moveThisUid]; if (!mappedMoveThisNode || !htmlTreeHelpers.isElementAccessible(mappedMoveThisNode.ele)) { return; } var mappedByThisNode = htmlTreeHelpers.mapping[byThisUid]; if (!mappedByThisNode || !htmlTreeHelpers.isElementAccessible(mappedByThisNode.ele)) { return; } var moveThisElement = mappedMoveThisNode.ele; var byThisElement = mappedByThisNode.ele; var edit = new F12.RemoteDom.ReparentEdit(moveThisElement, byThisElement, reparentAction); return RemoteDom.remoteCode.editStack.performEdit(edit); }, copyElementWithStyle: function domExplorer$copyElementWithStyle(uid) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } var elementThatMightBeTheBody = mappedNode.ele; while (elementThatMightBeTheBody) { if (elementThatMightBeTheBody.tagName === "BODY") { return styleUtilities.copyElementWithStyle(mappedNode.ele); } elementThatMightBeTheBody = elementThatMightBeTheBody.parentElement; } return; }, setPseudoStyling: function domExplorer$messageHandlers$setPseudoStyling(uid, state, isSet) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return; } styleUtilities.setPseudoStyling(mappedNode.ele, state, isSet); }, getPseudoStyling: function domExplorer$messageHandlers$getPseudoStyling(uid, state) { var mappedNode = htmlTreeHelpers.mapping[uid]; if (!mappedNode || !htmlTreeHelpers.isElementAccessible(mappedNode.ele)) { return false; } return styleUtilities.getPseudoStyling(mappedNode.ele, state); } }; var styleUtilities = new RemoteDom.StyleUtilities(RemoteDom.dom$messageHandlers, F12.RemoteDom.domUtilities); })(F12.RemoteDom || (F12.RemoteDom = {})); var RemoteDom = F12.RemoteDom; })(F12 || (F12 = {})); // remoteMain.ts var remoteHelpers; (function () { "use strict"; remoteHelpers = new Common.RemoteHelpers(F12.RemoteDom.dom$messageHandlers); F12.RemoteDom.remoteCode.initialize(); })(); .BPT-Style-Rule[aria-expanded='false'] > .BPT-Style-ExpandIcon, .BPT-Style-Property[aria-expanded='false'] > .BPT-Style-PropertyValue-ExpandIcon { background-image: url(''); /*[url({plugin-image-icon-item-collapsed})]*/ background-size: 10px 10px; } .BPT-Style-Rule[aria-expanded='true'] > .BPT-Style-ExpandIcon, .BPT-Style-Property[aria-expanded='true'] > .BPT-Style-PropertyValue-ExpandIcon { background-image: url(''); /*[url({plugin-image-icon-item-expanded})]*/ background-size: 10px 10px; } .BPT-Style-Rule[aria-expanded='false'] + .BPT-Style-Properties, .BPT-Style-Property[aria-expanded='false'] + .BPT-Style-Properties, .BPT-Style-Property-LongHand + .BPT-Style-Properties { display: none; } .BPT-Style-Rule:focus, .BPT-Style-Property:focus, .BPT-Style-SubProperty:focus { background: TRANSPARENT; /*[{plugin-font-editor-selected-background-color rgba(0.155)}]*/ border-color: transparent; } @media screen and (-ms-high-contrast) { .BPT-Style-Rule:focus, .BPT-Style-Property:focus, .BPT-Style-SubProperty:focus { border-color: TRANSPARENT; /*[{plugin-font-editor-selected-border-color}]*/ } .BPT-Style-Rule, .BPT-Style-Property, .BPT-Style-SubProperty { border-color: transparent; border-width: 1px; border-style: solid; } } .BPT-Style-Rule { display: -ms-grid; -ms-grid-columns: 4px 13px 1fr; width: 100%; overflow: hidden; } .BPT-Style-Rule[data-removed='true'] { color: TRANSPARENT; /*[{plugin-pseudo-class-panel-disabled-color}]*/ } .BPT-Style-ExpandIcon { -ms-grid-column: 2; } .BPT-Style-ExpandIcon, .BPT-Style-PropertyValue-ExpandIcon { background-repeat: no-repeat; width: 10px; height: 10px; margin-top: 4px; margin-left: 3px; } .BPT-Style-Selector-Container { margin-left: 0; -ms-grid-column: 3; overflow: hidden; text-overflow: ellipsis; white-space: normal; word-wrap: break-word; /* max-height here is based on 7 rows that match the line-height of .BPT-HorizontalPane-Right-Content in domExplorer.css. */ max-height: calc(7 * 1.3em); } .BPT-Style-Rule[aria-expanded='false'] > .BPT-Style-Selector-Container { /* max-height here is based on 1 row that match the line-height of .BPT-HorizontalPane-Right-Content in domExplorer.css. */ max-height: calc(1 * 1.3em); white-space: nowrap; } .BPT-Style-FileReference { float: right; } .BPT-Style-Selector, .BPT-Style-ParentRule { color: #880000; /*[{plugin-font-editor-css-selector-color}]*/ } .BPT-Style-Rule[data-removed='true'] .BPT-Style-Selector, .BPT-Style-ParentRule[data-removed='true'] { color: TRANSPARENT; /*[{plugin-styles-deleted-item-color}]*/ } .BPT-Style-ParentRule { margin-left: 17px; white-space: normal; word-wrap: break-word; } .BPT-Style-BlockOpener { margin-left: 8px; } .BPT-EditBox-Active > .BPT-Style-Selector-Container > .BPT-Style-BlockOpener, .BPT-EditBox-Active > .BPT-Style-Selector-Container > .BPT-Style-FileReference { display: none; } .BPT-Style-BlockFooter { margin-left: 8px; } .BPT-Style-EmptyRuleSpace { height: 18px; display: none; } .BPT-Style-BlockFooter:only-child > .BPT-Style-EmptyRuleSpace { display: block; } .BPT-Style-Rule[aria-expanded='true'] .BPT-Style-CollapsedBlockFooter { display: none; } .BPT-Style-Property { display: -ms-grid; -ms-grid-columns: 4px 28px auto auto auto auto 1fr; } .BPT-Style-SubProperty { display: -ms-grid; -ms-grid-columns: 4px 43px auto auto auto auto 1fr; } .BPT-Style-Changebar { display: inline-block; width: 4px; background-color: transparent; -ms-grid-column: 1; } .BPT-Style-ChangeBar[data-change="add"] { background-color: #00B294; /*[{plugin-styles-changebar-add-color}]*/ } .BPT-Style-ChangeBar[data-change="update"] { background-color: #FF8C00; /*[{plugin-styles-changebar-update-color}]*/ } .BPT-Style-ChangeBar[data-change="remove"] { background-color: #BA141A; /*[{plugin-styles-changebar-remove-color}]*/ } .BPT-Style-Property > .BPT-Style-Property-Checkbox, .BPT-Style-SubProperty > .BPT-Style-Property-Checkbox { margin-left: 15px; margin-right: 0; margin-top: 2px; -ms-grid-column: 2; max-height: 13px; background-color: transparent; width: 10px; padding: 0; } .BPT-Style-SubProperty > .BPT-Style-Property-Checkbox { margin-left: 30px; } .BPT-Style-Property[aria-invalid='true'] > .BPT-Style-Property-Checkbox { width: 0; } .BPT-Style-Property[data-removed='true'] > .BPT-Style-Property-Checkbox { width: 0; } .BPT-Style-Property-NotApplied { display: none; } .BPT-Style-PropertyName-Container { -ms-grid-column: 3; } .BPT-Style-PropertyName, .BPT-Style-SubPropertyName { color: #FF0000; /*[{plugin-font-editor-html-attribute-name-color}]*/ } .BPT-Style-Property[data-removed='true'] .BPT-Style-PropertyName { color: TRANSPARENT; /*[{plugin-pseudo-class-panel-disabled-color}]*/ } .BPT-Style-PropertyName-Colon { -ms-grid-column: 4; margin-right: 6px; } .BPT-Style-PropertyValue-ExpandIcon { -ms-grid-column: 5; } .BPT-Style-Property[data-removed='true'] > .BPT-Style-PropertyValue-ExpandIcon { display: none; } .BPT-EditBox-Active > .BPT-Style-Property > .BPT-Style-PropertyValue-ExpandIcon, .BPT-Style-Property-LongHand > .BPT-Style-PropertyValue-ExpandIcon { display: none; } .BPT-Style-PropertyValue-Container { -ms-grid-column: 7; white-space: normal; word-wrap: break-word; overflow: hidden; /* max-height here is based on 3 rows that match the line-height of .BPT-HorizontalPane-Right-Content in domExplorer.css. */ max-height: calc(3 * 1.3em); } .BPT-Style-PropertyValue, .BPT-Style-SubPropertyValue { color: #0000FF; /*[{plugin-font-editor-css-value-color}]*/ } .BPT-Style-Property[data-removed='true'] .BPT-Style-PropertyValue { color: TRANSPARENT; /*[{plugin-pseudo-class-panel-disabled-color}]*/ } .BPT-Style-Color { border: solid black 1px; margin: 2px; width: 10px; height: 10px; -ms-grid-column: 6; } .BPT-Style-Property[data-removed='true'] > .BPT-Style-Color { display: none; } .BPT-EditBox-Active > .BPT-Style-Property .BPT-Style-Color, .BPT-Style-Color-Hidden, .BPT-EditBox-Active > .BPT-Style-Property > .BPT-Style-PropertyValue-Container > .BPT-Style-Property-SemiColon { display: none; } .BPT-Style-NotWinning:not([data-removed='true']) { text-decoration: line-through; } .BPT-Style-InvalidProperty { background-image: url('images/red_squiggly.png'); /*[url({plugin-image-icon-red-underline})]*/ background-size: 8px 4px; background-repeat: repeat-x; background-position: left bottom; } .BPT-Style-Item { width: 100%; margin-bottom: 6px; } .BPT-Style-InheritedFrom { color: rgba(0, 0, 0, 0.75); /*[{plugin-tab-header-color}]*/ background-color: #dbe0e7; /*[{plugin-tab-header-background-color}]*/ padding: 0 4px 0 8px; margin-top: 7px; width: 100%; height: 19px; } a.BPT-Style-InheritedFromTarget { color: rgba(0, 0, 0, 0.75); /*[{plugin-tab-header-color} ]*/ text-decoration: underline; } a.BPT-Style-InheritedFromTarget:visited { color: rgba(0, 0, 0, 0.75); /*[{plugin-tab-header-color}]*/ text-decoration: underline; } .BPT-WinningStyle-PropertyName { color: TRANSPARENT; /* [{plugin-font-editor-html-attribute-name-color}] */ } .BPT-WinningStyle-Color { border: solid black 1px; height: 11px; margin: 2px; padding: 0px; width: 11px; } .BPT-WinningStyle-FileReference { float: right; } .BPT-WinningStyle-Filter { float: left; } .BPT-WinningStyle-Filter-InputText { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: 9pt; margin: 2px; } .BPT-WinningStyle-AllStyles { float: right; margin-top: 3px; } .BPT-WinningStyle-AllStyles-Text { float: right; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ margin-top: 1px; } .BPT-WinningStyle-AllStyles-CheckBox { float: right; } .BPT-WinningStyle-NotWinning, .BPT-WinningStyle-NotWinning .BPT-WinningStyle-LeftSide { text-decoration: line-through; } #winningStylesNoResultsMessage { clear: both; margin-left: 6px; } #winningStylesView .BPT-ExpandingList-Header { -ms-grid-columns: 4px 15px 16px auto 8px auto 1fr; display: -ms-grid; } #winningStylesView .BPT-ExpandingList-Header > .BPT-Style-ChangeBar { -ms-grid-column: 1; } #winningStylesView .BPT-ExpandingList-Header > .BPT-ExpandingList-ExpandIcon { -ms-grid-column: 2; } #winningStylesView .BPT-ExpandingList-Header > .BPT-WinningStyle-HeaderCheckBox { -ms-grid-column: 3; } #winningStylesView .BPT-ExpandingList-Header > .BPT-WinningStyle-PropertyName { -ms-grid-column: 4; } #winningStylesView .BPT-ExpandingList-Header > .BPT-WinningStyle-HeaderColon { -ms-grid-column: 5; } #winningStylesView .BPT-ExpandingList-Header > .BPT-WinningStyle-Color { -ms-grid-column: 6; } #winningStylesView .BPT-ExpandingList-Header > .BPT-WinningStyle-PropertyValue-Grid { -ms-grid-column: 7; word-break: break-all; } #winningStylesView .BPT-HTML-Tag { color: TRANSPARENT; /*[{plugin-font-editor-css-selector-color}]*/ } #winningStylesView [data-removed="true"] .BPT-HTML-Tag, #winningStylesView [data-removed="true"] .BPT-Style-PropertyValue { color: TRANSPARENT; /*[{plugin-styles-deleted-item-color}]*/ } input.BPT-WinningStyle-HeaderCheckBox[type='checkbox'], input.BPT-WinningStyle-SourceCheckBox[type='checkbox'] { background-color: transparent; margin-left: 0; margin-right: 0; margin-top: 2px; max-height: 13px; padding: 0; vertical-align: baseline; width: 10px; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide { -ms-grid-columns: 4px 37px auto 8px auto auto; display: -ms-grid; overflow: hidden; float: left; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide > .BPT-Style-ChangeBar { -ms-grid-column: 1; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide > input.BPT-WinningStyle-SourceCheckBox[type='checkbox'] { -ms-grid-column: 2; margin-left: 22px; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide[data-removed="true"] > input.BPT-WinningStyle-SourceCheckBox[type='checkbox'] { width: 0; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide > .BPT-HTML-Tag { -ms-grid-column: 3; overflow: hidden; text-overflow: clip; white-space: nowrap; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide > .BPT-HTML-Tag > div { max-width: 100px; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide > .BPT-WinningStyle-Separator { -ms-grid-column: 4; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide > .BPT-WinningStyle-SourceColor { -ms-grid-column: 5; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > div.BPT-WinningStyle-LeftSide > .BPT-Style-PropertyValue-Container { -ms-grid-column: 6; word-break: break-all; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > .BPT-WinningStyle-FileReference { margin-left: 5px; overflow: hidden; position: relative; text-align: right; text-overflow: clip; white-space: nowrap; } #winningStylesView .BPT-ExpandingList-Child-Value-Container > .BPT-WinningStyle-FileReference > span { right: 0; } #winningStylesView .BPT-EditBox-Active .BPT-EditBox-HideOnEdit, #winningStylesView .BPT-WinningStyle-Color .BPT-WinningStyle-Color-Hidden { display: none; } .BPT-Changes-Source { color:TRANSPARENT; /* [{plugin-tab-header-active-color}] */ -ms-grid-column: 2; } .BPT-Changes-Link { float: right; } .BPT-Changes-Rule { margin-left: 26px; margin-bottom: 8px; background-color: transparent; color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .BPT-Changes-Selector { white-space: normal; word-wrap: break-word; border: 1px solid transparent; } .BPT-Changes-Property { display: -ms-grid; -ms-grid-columns: 12px auto 6px 1fr; border: 1px solid transparent; } .BPT-Changes-Property[data-change="add"], .BPT-Changes-Selector[data-change="add"], .BPT-Changes-BlockFooter[data-change="add"] { background-color: rgba(0, 178, 148, 0.15); /*TODO: add resource*/ } .BPT-Changes-Property[data-change="remove"], .BPT-Changes-Selector[data-change="remove"], .BPT-Changes-BlockFooter[data-change="remove"] { background-color: rgba(186, 20, 26, 0.15); /*TODO: add resource*/ } .BPT-Changes-PropertyName, .BPT-Changes-PropertyValue { width: 100%; white-space: normal; word-wrap: break-word; } .BPT-Changes-PropertyName { -ms-grid-column: 2; } .BPT-Changes-PropertyValue { -ms-grid-column: 4; } .BPT-Changes-Highlight { font-weight: bold; } #changesEmptyMessage { word-wrap: break-word; white-space: normal; } PNG  IHDR bOK pHYs+ cHRMz%u0`:o_FIDATxڔ 0 ?0#C3LnxFhG%P8Ey6f7q `uMRNa3Z^z\!&J ;OФ$IgyBp~Q&ZaN~)&;4De#PIENDB`PNG  IHDR bOK pHYs+ cHRMz%u0`:o_FIDATxڔA 0 d]vTK7! e_^7Q~ Hu@&ZA|Z^z!&s R*$N:39Wub/M?3jwe7n;4IENDB`PNG  IHDR bOK pHYs+ cHRMz%u0`:o_FIDATxڌб0 dP0IFH(#0i;`5Rt&Mj$HZeRaE4+#I04@'"L/3_ܧ ,k?N\wSD{4IENDB`PNG  IHDR bOK pHYs+ cHRMz%u0`:o_FIDATxڌ0ߌPClLt XJBf8hwy;Y|RaLջXɂ ?}ʂ)rQUT5 뫳Sw>bqlnLJ 5> }n W C3?n4c"6Q:OIENDB`PNG  IHDR$l gAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEVC rvryƳyAȵa1;2l|Qޕt[%pnSlx]q.IOh%e(٘.[Bh4gJzferrCvWR`hrU0'ki'WYEb9R~]tw`8#P}}ttEQpB0bv7NA awA[P ` F *a F J9U  dj`âq) F BJ#¨J#.&>c >@|ux`.3%˕EU`ɑikrGX֤*4 4>USnNdžX|?9;*"޶@M+tckH91qMsѽ>`2lVRCInj:#zSdtAȵaX6|%KcHWnSlx]q.IOgggh%eD(.[Bh4gJzferꛛ=dg|Ko4*Uo݄L;*èa<Ȼ*nőb( ᡾\mk FAw?bv7NA awA[P ` F *a F J9U  dj`âq) F BJ#¨J#.&>c >@u7ԫ2`MrxcU`ɑiXI9²&uWѠ|d񡨒Ƨt[p?6] cA#IENDB`PNG  IHDR$l gAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV5\6&T́1JHeL}hV'pGB-{3o(]I5{2Zmi*8B3:#{Z3`s #aJ r"6FGRTr"~mZdH ^.9:Ol]󉎊׿9}d}TDz`#l@ЈƸtܥosy/C*yJjSs"prҤDno/muSS+ ^1'aEn;boN[$'2ujOHr?HJ%¥KVp*)uA.8 IVd2 prZ ^'7N^ڒoG SZԤFhrqk( 1'8GI5* !Atp Fw[ WjBM0]A<9K`sg9>7elQB,5 a nd>j*9 j.V eeCj5wTHq\o`z0GgZ|̪zXo{2:L w)fLjQǪ/2$.8bɼ\r"KtMT"GNLꁯ L.Y!,#6yc kT gOOOD낉KD.I%O\ÔP9U+:9ۆr9U"@HKbR޹$I'Pb̲RrR_g傲]P u%}lRLlAZnRx# )IX[mHRu +IAʿ9 }e:H_$ [|e/rɀ\u=66x`d.ղG1Z/~A@hS{ c?1I9SCxBsu9F @L}hSο% i8A?ANn{G聱]jS<.bΜ#@ 98s6+%U9 mY]2yC7Lj~, }{H $oKw-22ZH6pr )!58[$pǤV4wURwl6ڒ*IENDB`PNG  IHDR$l gAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV߂r11'}F^KuaaWry}8s1Lqwa_?. I쇝yyirUx̓ 9f8?-_Ksy-~/ZfJީ6/E}L)9en"7wROӛi%~H,;c<9g˕ b.'w1K> + I| )U/GYXxfbBԚ Qk++^,DYXx{6X-(aq"o^'A0^QߟDEKttA }{-$+ћyy\"rUxc\6<ƩrhaZK 0N$%CsU(w0O.hacgشޢ+mh`t=*ϕ,1E(#V$|1\ O)]!mejh05XcJAԃ912$^\*A0g>lA)bO̓3`\ԐXg\$q1X,L r˕$C>Ou0C1jzrŋ5/֬W,WXZ^\b!jzrŋػoA#Ee h?]IENDB`PNG  IHDR$l gAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEVZ MGzE@{u^]WE@{u^]WE@{u^]W-ڄ#mBӑީx5A]{:31(zebFcČFz8D 9Mh:h&4]E@{u^]WE@{u^]WE@{u^]wh>Z MGzQ tUbFcČxk21tfbF#=L "jA&4}h"h.ګ"h.ګ"h.;Z MGz-ڄ#S(jQ *1tfboe8W96ԉ IENDB`PNG  IHDR `|"ptEXtSoftwareAdobe ImageReadyqe<qiTXtXML:com.adobe.xmp t.IDATxZiLU>RhPҾ@)-ҒH..5& ImZmI5%Z R s;ygIܹsιe曷f~~VU&̀ 8@8Uc%c3T{e0 %JX?4pDƜl^:ƎBEEܺu d2&@dd$߿[ EXg03xd8z)))5ŭ6mW\ .TS]]-wuv+3}BPP'̀h4ҥKpaptt},.;^9QBsssE---㈈`\C̀taLb¹0???4;lt4ГHh0'Wڂ>!7~ʰ9K(e {a||\N¹B*'٫)/--IFj ԀS z%^Rdʏ9e҉'K,i hqqH V0k؎;x#4Ĩ)N9XG!+Q.*^Jӧ,X( DGb6ٳja/j^hI sA}}tX<J6OD?ȶ;F3D鬎j9#z||<899)鷸ꑌ<)J I."|@`Xܯ*W{& 44444|ϵP{ ]75+I\ᕧYvsNF}1 ,_f> =]4t5jls[DòyF-N#3o݋x&=lo|෬]a#%tHx]8.C&dS| {c|p +!'+/١p/{0&{-Me,o_:W¨^|shR>S˲O8`zZOT-Ř aphJ-Vs{AMq>]߫d}Z/v0.`\͓yõ UíxTr?W~.޽{Ik׮غu+lذA遆z'DGG[KKETVVͳ-> uuu"|_6oxxr|6mľQA{::: 88l$&&Rw#%t<..N4ng% )>@3 vE SVvZˊ477S^|S zU ZـTVVDR`ˆKiqʱ~Cz> ryƢRfQqRmmyACCCPSS#%@cuUUx( \xl+p$fY YOJJrFXux=00Pv}@4|@3? IENDB`.BPT-ScriptErrorMessageIcon { background-image: url('images/i_error.png'); /*[url({plugin-image-icon-dom-explorer-error})]*/ background-repeat: no-repeat; background-size: 18px 54px; width: 18px; height: 18px; display: inline-block; float: left; vertical-align: middle; margin-top: 6px; } .BPT-Toolbar .selectElementButton .buttonIcon { background-image: url('images/i_inspect.png'); /*[url({plugin-image-icon-dom-explorer-inspect})]*/ } .BPT-Toolbar .showLayoutButton .buttonIcon { background-image: url('images/i_show-layout.png'); /*[url({plugin-image-icon-dom-explorer-show-layout})]*/ } .BPT-Toolbar .refreshButton .buttonIcon { background-image: url('images/i_refresh.png'); /*[url({plugin-image-icon-dom-explorer-refresh})]*/ } .BPT-Toolbar .BPT-button.colorPickerButton .buttonIcon { background-image: url('../common/images/colorPicker/eyedropperButton.png'); /*[url({plugin-common-image-colorpicker-toggle})]*/ }// // Copyright (C) Microsoft. All rights reserved. // // gridControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; (function (Grid) { (function (Utility) { var TreeNodeSort = (function () { function TreeNodeSort() { } TreeNodeSort.stableReverse = function (array, comparer) { var result = []; for (var index = array.length - 1; index >= 0; index--) { var firstDiffIndex = index - 1; for (; firstDiffIndex >= 0; firstDiffIndex--) { if (0 !== comparer(array[firstDiffIndex], array[index])) { break; } } for (var equalIndex = firstDiffIndex + 1; equalIndex <= index; equalIndex++) { result.push(array[equalIndex]); } index = firstDiffIndex + 1; } for (var index = 0; index < result.length; index++) { array[index] = result[index]; } }; TreeNodeSort.defaultComparer = function (column, order, rowA, rowB) { var v1 = rowA[column.index], v2 = rowB[column.index]; if (typeof v1 === "undefined" || v1 === null) { if (typeof v2 === "undefined" || v2 === null) { return 0; } else { return -1; } } return v1.toLocaleUpperCase().localeCompare(v2.toLocaleUpperCase()); }; TreeNodeSort.sortComparer = function (sortOrder, sortColumns, rowA, rowB) { for (var i = 0; i < sortOrder.length; i++) { var orderInfo = sortOrder[i]; var column = sortColumns[i]; var comparer = column.comparer || Utility.TreeNodeSort.defaultComparer; var result = comparer(column, orderInfo.order, rowA, rowB); if (result === 0) { continue; } else if (orderInfo.order === "desc") { return -result; } else { return result; } } return 0; }; return TreeNodeSort; })(); Utility.TreeNodeSort = TreeNodeSort; })(Grid.Utility || (Grid.Utility = {})); var Utility = Grid.Utility; var TreeInfo = (function () { function TreeInfo(gridData, expandStates, toggleFunction) { this.gridData = gridData; this.expandStates = expandStates; this.toggleFunction = toggleFunction; } return TreeInfo; })(); Grid.TreeInfo = TreeInfo; var ColumnInfo = (function () { function ColumnInfo(index, text, tooltip, width, canSortBy, getColumnValue, getCellCSSClass, comparer) { this.index = index; this.text = text; this.tooltip = tooltip; this.width = width; this.canSortBy = canSortBy; this.getColumnValue = getColumnValue; this.getCellCSSClass = getCellCSSClass; this.comparer = comparer; this.hasHTMLContent = false; this.hasMixedContent = false; } ColumnInfo.MIN_RESIZE_WIDTH = 60; return ColumnInfo; })(); Grid.ColumnInfo = ColumnInfo; var SortOrderInfo = (function () { function SortOrderInfo(index, order) { this.index = index; this.order = order; } return SortOrderInfo; })(); Grid.SortOrderInfo = SortOrderInfo; var TreeNode = (function () { function TreeNode(data, expandState) { this.data = data; this.expandState = expandState; this.children = []; } return TreeNode; })(); Grid.TreeNode = TreeNode; var GutterOptions = (function () { function GutterOptions(icon, checkbox) { this.icon = icon; this.checkbox = checkbox; } return GutterOptions; })(); Grid.GutterOptions = GutterOptions; var GridOptions = (function () { function GridOptions(childDataCallback, columns, sortOrders, preEditCellCallback, commitEditCellCallback, postEditCellCallback) { this.childDataCallback = childDataCallback; this.columns = columns; this.sortOrders = sortOrders; this.allowMultiSelect = false; this.allowSortOnMultiColumns = false; this.asyncInit = true; this.autoSort = true; this.coreCssClass = "grid"; this.cssClass = ""; this.expandStates = []; this.extendViewportBy = 3; this.gutter = new GutterOptions(); this.header = false; this.height = "100%"; this.initialSelection = false; this.keepSelection = false; this.payloadSize = 200; this.source = null; this.preEditCellCallback = preEditCellCallback; this.commitEditCellCallback = commitEditCellCallback; this.postEditCellCallback = postEditCellCallback; this.disableRightClickSelection = true; this.isGridEnabled = true; this.prerenderCallback = null; this.onRowToggleCallback = null; this.keyboardEventHandler = null; this.commitOnTab = false; } return GridOptions; })(); Grid.GridOptions = GridOptions; var RowIndexInfo = (function () { function RowIndexInfo(rowIndex, dataIndex) { this.rowIndex = rowIndex; this.dataIndex = dataIndex; } return RowIndexInfo; })(); Grid.RowIndexInfo = RowIndexInfo; var Size = (function () { function Size(width, height) { this.width = width; this.height = height; } return Size; })(); var Range = (function () { function Range(start, end) { this.start = start; this.end = end; } return Range; })(); Grid.Range = Range; var ColumnSizing = (function () { function ColumnSizing(active, index, originalWidth, origin) { this.active = active; this.index = index; this.originalWidth = originalWidth; this.origin = origin; } return ColumnSizing; })(); Grid.ColumnSizing = ColumnSizing; var GridControl = (function (_super) { __extends(GridControl, _super); function GridControl(root, options) { _super.call(this, root); this._options = options; this._canvas = null; this._contentSpacer = null; this._element = null; this._gutter = null; this._gutterHeader = null; this._header = null; this._headerCanvas = null; this._dataSource = []; this._rows = {}; this._columns = []; this._expandStates = null; this._expandedCount = 0; this._sortOrder = []; this._rowInfoMap = {}; this._commitEditCellCallback = null; this._selectedRows = null; this._selectionStart = -1; this._selectionCount = 0; this._selectedIndex = -1; this._active = false; this._activeAriaId = null; this._getChildDataCallback = null; this._canvasHeight = 300; this._canvasWidth = 300; this._contentSize = null; this._measurements = {}; this._count = 0; this._indentIndex = 0; this._indentLevels = null; this._visibleRange = []; this._columnSizing = null; this._sizingElement = null; this._copyInProgress = false; this._resetScroll = false; this._ignoreScroll = false; this._scrollTop = 0; this._scrollLeft = 0; this._cancelable = null; this._onAriaExpandedModifiedHandler = this.onAriaExpandedModified.bind(this); this.initialize(); } Object.defineProperty(GridControl.prototype, "isVerticalScrollbarVisible", { get: function () { return this._canvasHeight < this._canvas.scrollHeight; }, enumerable: true, configurable: true }); GridControl.prototype.initialize = function () { this._element = document.createElement("div"); this._element.className = this._options.coreCssClass; this._element.style.height = this._options.height; this.rootElement.appendChild(this._element); this._buildDom(); this._contentSize = new Size(300, 400); this._takeMeasurements(); this._getChildDataCallback = this._options.childDataCallback || null; this._commitEditCellCallback = this._options.commitEditCellCallback || null; if (this._options.asyncInit) { window.setTimeout(function () { this._attachEvents(); }.bind(this), 10); } else { this._attachEvents(); } this.initializeDataSource(); }; GridControl.prototype.findClosestElement = function (element, selector) { var stop = this._element.parentNode; var closest = element; while (closest && closest !== stop) { if (closest.msMatchesSelector(selector)) { return closest; } closest = closest.parentNode; } return closest; }; GridControl.prototype.fireCustomEvent = function (element, eventName, args) { var customEvent = document.createEvent("Event"); customEvent.initEvent(eventName, true, true); customEvent.customData = args; element.dispatchEvent(customEvent); }; GridControl.prototype.onAriaExpandedModified = function (event) { if (event.attrName === "aria-expanded") { var rowInfo = this.getRowInfoFromEvent(event, ".grid-row"); if (rowInfo) { this.tryToggle(event.newValue === "true", false, rowInfo.dataIndex); } } }; GridControl.prototype.createElementWithClass = function (tagName, className) { var element = document.createElement(tagName); if (className) { element.className = className; } return element; }; GridControl.expand = function (states) { var result = []; if (states.length > 0) { var stack = []; var currState = { level: 1, origCount: states.length, remainingCount: states.length }; stack.push(currState); var i = 0; while (i < states.length) { result.push(currState.level); currState.remainingCount--; while (currState.remainingCount === 0) { stack.pop(); if (stack.length == 0) { if (i === (states.length - 1)) { break; } else { throw new Error("invalid descendant counts, nesting not possible"); } } var newState = stack[stack.length - 1]; newState.remainingCount -= currState.origCount; currState = newState; if (currState.remainingCount < 0) { throw new Error("invalid descendant counts, cannot convert to indentation levels"); } } var nextCount = Math.abs(states[i]); if (nextCount > 0) { var nextItem = { level: result[result.length - 1] + 1, origCount: nextCount, remainingCount: nextCount }; stack.push(nextItem); currState = nextItem; } i++; } if (stack.length > 0) { throw new Error("invalid descendant counts, more input expected"); } } return result; }; GridControl.addItemsToTree = function (dataSource, expandStates, start, count, parentNode) { var end = Math.min(start + count, dataSource.length); for (var i = start; i < end; i++) { var node = new TreeNode(dataSource[i], expandStates[i]); var childrenCount = Math.abs(node.expandState); if (childrenCount > 0) { GridControl.addItemsToTree(dataSource, expandStates, i + 1, childrenCount, node); i += childrenCount; } parentNode.children.push(node); } }; GridControl.walkTree = function (tree, visit) { if (visit) { visit(tree); var numChildren = 0; var children = tree.children; if (children && (numChildren = children.length)) { for (var i = 0; i < numChildren; i++) { var item = children[i]; GridControl.walkTree(item, visit); } } } }; GridControl.makeElementUnselectable = function (element) { element.setAttribute("unselectable", "on"); var elements = element.querySelectorAll("*"); for (var i = 0; i < elements.length; i++) { var e = elements[i]; switch (e.tagName) { case "FRAME": case "IFRAME": case "TEXTAREA": case "INPUT": case "SELECT": break; default: e.setAttribute("unselectable", "on"); } } }; GridControl.toDecimalLocaleString = function (value, includeGroupSeparators, cultureInfo) { var zeroPad = function (str, count, left) { for (var l = str.length; l < count; l++) { str = (left ? ('0' + str) : (str + '0')); } return str; }; var exponent, nf, split, numberString = value.toString(), right = ""; if (cultureInfo) { nf = cultureInfo.numberFormat; } else { nf = Sys.CultureInfo.CurrentCulture; } split = numberString.split(/e/i); numberString = split[0]; exponent = (split.length > 1 ? parseInt(split[1], 10) : 0); split = numberString.split('.'); numberString = split[0]; right = split.length > 1 ? split[1] : ""; if (exponent > 0) { right = zeroPad(right, exponent, false); numberString += right.slice(0, exponent); right = right.substr(exponent); } else if (exponent < 0) { exponent = -exponent; numberString = zeroPad(numberString, exponent + 1, true); right = numberString.slice(-exponent, numberString.length) + right; numberString = numberString.slice(0, -exponent); } if (right.length > 0) { right = nf.NumberDecimalSeparator + right; } if (includeGroupSeparators === true) { var groupSizes = nf.NumberGroupSizes, sep = nf.NumberGroupSeparator, curSize = groupSizes[0], curGroupIndex = 1, stringIndex = numberString.length - 1, ret = ""; while (stringIndex >= 0) { if (curSize === 0 || curSize > stringIndex) { if (ret.length > 0) { return numberString.slice(0, stringIndex + 1) + sep + ret + right; } else { return numberString.slice(0, stringIndex + 1) + right; } } if (ret.length > 0) { ret = numberString.slice(stringIndex - curSize + 1, stringIndex + 1) + sep + ret; } else { ret = numberString.slice(stringIndex - curSize + 1, stringIndex + 1); } stringIndex -= curSize; if (curGroupIndex < groupSizes.length) { curSize = groupSizes[curGroupIndex]; curGroupIndex++; } } return numberString.slice(0, stringIndex + 1) + sep + ret + right; } else { return numberString + right; } }; GridControl.convertValueToDisplayString = function (value, format) { if (value != null) { if (typeof value === "string") { return value; } else if (value instanceof Date) { return value.localeFormat(format || "G"); } else if (typeof value === "number") { if (format) { return value.localeFormat(format); } else { return GridControl.toDecimalLocaleString(value); } } else if (typeof value === "boolean") { return value ? "True" : "False"; } else { return value.toString(); } } return ""; }; GridControl.prototype._getId = function () { return GridControl.TYPE_NAME; }; GridControl.prototype.getSelectionCount = function () { return this._selectionCount; }; Object.defineProperty(GridControl.prototype, "expandedCount", { set: function (count) { this._expandedCount = count; if (this._options.expandedCountChangedCallback) { this._options.expandedCountChangedCallback(this._expandedCount); } }, enumerable: true, configurable: true }); GridControl.prototype.getExpandedCount = function () { return this._expandedCount; }; GridControl.prototype.getElement = function () { return this._element; }; GridControl.prototype._enhance = function (element) { this._buildDom(); }; GridControl.prototype._buildDom = function () { var fragment = document.createDocumentFragment(); var gutterOptions = this._options.gutter; var gutterVisible = gutterOptions && (gutterOptions.icon || gutterOptions.checkbox); this._canvas = document.createElement("div"); this._canvas.className = "grid-canvas"; this._canvas.setAttribute("role", "treegrid"); this._contentSpacer = document.createElement("div"); this._contentSpacer.className = "grid-content-spacer"; this._canvas.appendChild(this._contentSpacer); if (this._options.header) { this._element.classList.add("has-header"); this._header = document.createElement("div"); this._header.className = "grid-header"; this._headerCanvas = document.createElement("div"); this._headerCanvas.className = "grid-header-canvas"; this._header.appendChild(this._headerCanvas); fragment.appendChild(this._header); } if (gutterVisible) { this._element.classList.add("has-gutter"); this._gutter = document.createElement("div"); this._gutter.className = "grid-gutter"; this._canvas.appendChild(this._gutter); if (this._header) { this._gutterHeader = document.createElement("div"); this._gutterHeader.className = "grid-gutter-header"; this._header.appendChild(this._gutterHeader); } } fragment.appendChild(this._canvas); this._element.appendChild(fragment); }; GridControl.prototype._attachEvents = function () { var _this = this; window.addEventListener("resize", function (e) { return _this._onContainerResize(e); }); this._element.addEventListener("mousedown", function (e) { return _this._onContainerMouseDown(e); }); this._canvas.addEventListener("keydown", function (e) { return _this._onKeyDown(e); }); this._canvas.addEventListener("mousedown", function (e) { return _this._onRowMouseDown(e); }); this._canvas.addEventListener("dblclick", function (e) { return _this.onEditCell(e); }); this._canvas.addEventListener("scroll", function (e) { return _this._onCanvasScroll(e); }); this._canvas.addEventListener("selectstart", function () { return false; }); if (this._header) { this._header.addEventListener("mousedown", function (e) { return _this._onHeaderMouseDown(e); }); this._header.addEventListener("mouseup", function (e) { return _this._onHeaderMouseUp(e); }); this._header.addEventListener("click", function (e) { return _this._onHeaderClick(e); }); this._header.addEventListener("dblclick", function (e) { return _this._onHeaderDblClick(e); }); } if (this._gutter) { this._gutter.addEventListener("click", function (e) { return _this._onGutterClick(e); }); this._gutter.addEventListener("mouseover", function (e) { var row = _this.findClosestElement(e.target, ".grid-gutter-row"); if (row) { row.classList.add("grid-gutter-row-hover"); } }); this._gutter.addEventListener("mouseout", function (e) { var row = _this.findClosestElement(e.target, ".grid-gutter-row"); if (row) { row.classList.remove("grid-gutter-row-hover"); } }); } }; GridControl.prototype._mergeExpandStates = function (parentIndex, oldExpandStates, newExpandStates) { var netIncreaseInExpandStates = newExpandStates.length - 1; oldExpandStates.splice(parentIndex + 1, 1); for (var i = 0; i <= netIncreaseInExpandStates; i++) { oldExpandStates.splice(parentIndex + i + 1, 0, newExpandStates[i]); } var countSinceLastParent = 0; for (var i = parentIndex; i >= 0; i--) { var origValue = oldExpandStates[i]; if (Math.abs(origValue) > countSinceLastParent) { if (origValue < 0) { oldExpandStates[i] = origValue - netIncreaseInExpandStates; } else { oldExpandStates[i] = origValue + netIncreaseInExpandStates; } countSinceLastParent = 0; } else { countSinceLastParent++; } } }; GridControl.prototype._takeMeasurements = function () { var cssClass = this._options.coreCssClass; if (this._options.cssClass) { cssClass += " " + this._options.cssClass; } var measurementContainer = this.createElementWithClass("div", cssClass); measurementContainer.style.position = "absolute"; measurementContainer.style.left = "-5000px"; measurementContainer.style.top = "-5000px"; measurementContainer.style.width = "1000px"; measurementContainer.style.height = "500px"; document.body.appendChild(measurementContainer); var row = this.createElementWithClass("div", "grid-row grid-row-normal"); measurementContainer.appendChild(row); var cell = this.createElementWithClass("div", "grid-cell"); cell.style.width = "100px"; cell.innerText = "1"; row.appendChild(cell); this._measurements.rowHeight = row.offsetHeight; this._measurements.cellOffset = cell.offsetWidth - 100; var textUnit = this.createElementWithClass("div"); textUnit.style.overflow = "hidden"; textUnit.style.width = "1em"; textUnit.style.height = "1ex"; cell.appendChild(textUnit); this._measurements.unitEx = textUnit.offsetHeight; var gutter = this.createElementWithClass("div", "grid-gutter"); gutter.appendChild(this.createElementWithClass("div", "grid-gutter-row grid-gutter-row-selected")); measurementContainer.appendChild(gutter); if (this._gutter) { this._measurements.gutterWidth = gutter.clientWidth; } else { this._measurements.gutterWidth = 0; } document.body.removeChild(measurementContainer); }; GridControl.prototype.initializeDataSource = function () { if (this._resetScroll) { this._ignoreScroll = true; try { var canvas = this._canvas; canvas.scrollTop = 0; canvas.scrollLeft = 0; this._scrollLeft = 0; this._scrollTop = 0; this._resetScroll = false; } finally { this._ignoreScroll = false; } } this.setDataSource(this._options.source, this._options.expandStates, this._options.columns, this._options.sortOrders); if (this._expandedCount > 0) { if (this._options.keepSelection && this._selectedIndex >= 0) { this._selectRow(Math.min(this._selectedIndex, this._expandedCount - 1)); } else { this._selectRow(this._options.initialSelection !== false ? 0 : -1); } } else { this.setSelectedRowIndex(-1); } }; GridControl.prototype.setDataSource = function (source, expandStates, columns, sortOrder, selectedIndex, focus, scrollToBottom) { var _this = this; var i, l, count; this._rowInfoMap = {}; this._dataSource = source || []; this._count = count = this._dataSource.length; if (expandStates) { this._expandStates = expandStates; this._indentLevels = GridControl.expand(expandStates); } else { this._indentLevels = null; this._expandStates = null; } this.expandedCount = count; this._updateRanges(); this._columns = []; if (columns) { var defaultGetCellContents = function (rowInfo, dataIndex, expandedState, level, column, indentIndex, columnOrder) { return _this._drawCell(rowInfo, dataIndex, expandedState, level, column, indentIndex, columnOrder); }; var defaultGetHeaderCellContents = function (column, columnOrder) { return _this._drawHeaderCellValue(column, columnOrder); }; var defaultGetColumnValue = function (dataIndex, columnIndex, columnOrder) { return _this.getColumnValue(dataIndex, columnIndex, columnOrder); }; for (i = 0, l = columns.length; i < l; i++) { var column = columns[i]; column.index = typeof (column.index) !== "undefined" ? column.index : String(i); column.canSortBy = column.canSortBy !== false; column.canMove = column.canMove !== false; column.width = typeof (column.width) !== "undefined" ? column.width : 100; column.getCellContents = column.getCellContents || defaultGetCellContents; column.getHeaderCellContents = column.getHeaderCellContents || defaultGetHeaderCellContents; column.getColumnValue = column.getColumnValue || defaultGetColumnValue; this._columns.push(column); } } this._sortOrder = []; if (sortOrder) { for (i = 0, l = sortOrder.length; i < l; i++) { var columnSortOrder = sortOrder[i]; if (columnSortOrder.order !== "desc") { columnSortOrder.order = "asc"; } this._sortOrder.push(columnSortOrder); } } this._clearSelection(); this._determineIndentIndex(); if (this._options.asyncInit) { window.setImmediate(function () { _this._layoutAfterSetDataSource(selectedIndex, focus, scrollToBottom); }); } else { this._layoutAfterSetDataSource(selectedIndex, focus, scrollToBottom); } }; GridControl.prototype.getDataSource = function () { return this._dataSource; }; GridControl.prototype._layoutAfterSetDataSource = function (selectedIndex, focus, scrollToBottom) { this.layout(undefined, focus); this._ensureSelectedIndex(selectedIndex); if (scrollToBottom) { this.scrollToBottom(function () { }); } this._selectRow(selectedIndex, null, null, (focus === true)); }; GridControl.prototype._adjustForDynamicData = function (newRows, newExpandStates, parentIndex) { if (this._options.isGridEnabled) { this._dataSource.splice(parentIndex + 1, 1); for (var i = 0; i < newRows.length; i++) { this._dataSource.splice(parentIndex + i + 1, 0, newRows[i]); } this._mergeExpandStates(parentIndex, this._expandStates, newExpandStates); var count = this._dataSource.length; this._count = count; if (this._expandStates) { this._indentLevels = GridControl.expand(this._expandStates); } else { this._indentLevels = null; } this.expandedCount = count; this._updateRanges(); this._clearSelection(); this._determineIndentIndex(); this._layoutAfterSetDataSource(this._getRowIndex(parentIndex)); } }; GridControl.prototype._ensureSelectedIndex = function (index) { var oldSelectedIndex = this._selectedIndex; if (typeof index === "number") { this._selectedIndex = index; } if (this._selectedIndex >= 0) { if (this._count <= this._selectedIndex) { this._selectedIndex = this._count - 1; } if (this._selectedIndex !== oldSelectedIndex) { this._addSelection(this._selectedIndex); } } }; GridControl.prototype.getRowInfo = function (dataIndex) { return this._rows[dataIndex]; }; GridControl.prototype.getRowData = function (dataIndex) { return this._dataSource[dataIndex]; }; GridControl.prototype.getColumns = function () { return this._columns || []; }; GridControl.prototype.getSortOrder = function () { return this._sortOrder || []; }; GridControl.prototype.insertAdditionalDynamicData = function (dynamicData, insertIndex) { if (dynamicData !== null) { this._adjustForDynamicData(dynamicData.itemsWithPlaceholders, dynamicData.expandStates, insertIndex - 1); } }; GridControl.prototype._determineIndentIndex = function () { var _columns = this._columns, i, l; for (i = 0, l = _columns.length; i < l; i++) { if (_columns[i].indent) { this._indentIndex = i; return; } } this._indentIndex = 0; }; GridControl.prototype._getDataIndex = function (visibleIndex) { var i, l, lastIndex = -1; var ranges = this._visibleRange; var range; if (visibleIndex < 0) { return -1; } for (i = 0, l = ranges.length; i < l; i++) { range = ranges[i]; lastIndex += range.end - range.start + 1; if (visibleIndex <= lastIndex) { return range.end - lastIndex + visibleIndex; } } return visibleIndex; }; GridControl.prototype._getRowIndex = function (dataIndex) { var i, l, result = 0; var ranges = this._visibleRange; var range; for (i = 0, l = ranges.length; i < l; i++) { range = ranges[i]; if (dataIndex >= range.start) { if (dataIndex <= range.end) { return result + dataIndex - range.start; } } else { break; } result += range.end - range.start + 1; } return -Math.max(0, result - 1); }; GridControl.prototype._updateRanges = function () { var i = 0, first = 0, l = this._count, newRanges = [], count = 0; if (this._expandStates) { while (i < l) { var state = this._expandStates[i]; if (state < 0) { newRanges[newRanges.length] = new Range(first, i); count += (i - first) + 1; i += 1 - state; first = i; } else { i++; } } if (first < l) { newRanges[newRanges.length] = new Range(first, l - 1); count += (l - first); } } else { count = l; newRanges[newRanges.length] = new Range(0, count); } this.expandedCount = count; this._visibleRange = newRanges; }; GridControl.prototype.expandNode = function (dataIndex) { var _this = this; if (!this._options.isGridEnabled) { return; } if (this._options.onRowToggleCallback) { this._options.onRowToggleCallback(this._dataSource, dataIndex, true); } if (this._dataSource[dataIndex + 1].isPlaceholder) { this._getChildDataCallback(this._dataSource[dataIndex], function (dynamicData) { if (dynamicData !== null) { _this._adjustForDynamicData(dynamicData.itemsWithPlaceholders, dynamicData.expandStates, dataIndex); } }); } if (this._expandStates) { var state = this._expandStates[dataIndex]; if (state < 0) { this._expandStates[dataIndex] = -state; this._updateRanges(); var row = this._rows[dataIndex]; if (row) { row.isDirty = true; } } } }; GridControl.prototype.collapseNode = function (dataIndex) { if (!this._options.isGridEnabled) { return; } if (this._expandStates) { var state = this._expandStates[dataIndex]; if (state > 0) { if (this._options.onRowToggleCallback) { this._options.onRowToggleCallback(this._dataSource, dataIndex, false); } this._expandStates[dataIndex] = -state; this._updateRanges(); var row = this._rows[dataIndex]; if (row) { row.isDirty = true; } } } this.layout(); }; GridControl.prototype.expandAllNodes = function () { var i = 0, l = this._count, states = this._expandStates, result = false, rows = this._rows; if (states) { while (i < l) { var state = states[i]; if (state < 0) { states[i] = -state; result = true; var row = rows[i]; if (row) { row.isDirty = true; } } i++; } if (result) { this._updateRanges(); } } return result; }; GridControl.prototype.collapseAllNodes = function () { var i = 0, l = this._count, states = this._expandStates, result = false, rows = this._rows; if (states) { while (i < l) { var state = states[i]; if (state > 0) { states[i] = -state; result = true; var row = rows[i]; if (row) { row.isDirty = true; } } i++; } if (result) { this._updateRanges(); } } return result; }; GridControl.prototype.expandAll = function () { var _this = this; this._updateExpansionStateAndRedraw(function () { return _this.expandAllNodes; }); }; GridControl.prototype.collapseAll = function () { var _this = this; this._updateExpansionStateAndRedraw(function () { return _this.collapseAllNodes; }); }; GridControl.prototype._updateExpansionStateAndRedraw = function (action) { var dataIndex, oldSelectedIndex = this._selectedIndex; if (oldSelectedIndex >= 0) { dataIndex = this._getDataIndex(oldSelectedIndex); } action(); if (oldSelectedIndex >= 0) { this._clearSelection(); this._addSelection(Math.abs(this._getRowIndex(dataIndex))); } this._layoutContentSpacer(); this._redraw(); this._notifyForPrerender(); }; GridControl.prototype.tryToggle = function (expand, shiftKey, rowDataIndex) { var state; if (!this._expandStates || this._selectedIndex < 0 || this._expandedCount <= 0) { return false; } var dataIndex = typeof rowDataIndex !== "undefined" ? rowDataIndex : this._getDataIndex(this._selectedIndex); var row = this._rows[dataIndex]; if (!row) { return false; } { state = this._expandStates[dataIndex]; if (state !== 0) { if (expand) { if (state < 0) { this.expandNode(dataIndex); } else { return false; } } else { if (state > 0) { this.collapseNode(dataIndex); } else { return false; } } this._clearSelection(); this._addSelection(this._getRowIndex(dataIndex), null, null, true); this._layoutContentSpacer(); this._redraw(); this._notifyForPrerender(); return true; } } return false; }; GridControl.prototype.layoutOnResize = function () { this._onContainerResize(undefined); }; GridControl.prototype._getVisibleRowIndices = function () { var top = this._scrollTop, bottom = top + this._canvasHeight, count = this._expandedCount - 1, rh = this._measurements.rowHeight; return { first: Math.min(count, Math.max(0, Math.ceil(top / rh))), last: Math.min(count, Math.floor(bottom / rh) - 1) }; }; GridControl.prototype._getRowIntoView = function (rowIndex, force) { if (force) { this._canvas.scrollTop = Math.max(0, Math.min(rowIndex || 0, this._expandedCount - 1)) * this._measurements.rowHeight; return true; } var visibleIndices = this._getVisibleRowIndices(); var firstIndex = visibleIndices.first; var lastIndex = visibleIndices.last; var count = lastIndex - firstIndex; if (rowIndex < firstIndex || rowIndex > lastIndex) { if (this._selectedIndex > firstIndex) { firstIndex = Math.max(rowIndex - count, 0); } else { firstIndex = Math.max(0, Math.min(rowIndex + count, this._expandedCount - 1) - count); } this._canvas.scrollTop = firstIndex * this._measurements.rowHeight; return true; } return false; }; GridControl.prototype.getSelectedRowIntoView = function (force) { return this._getRowIntoView(this._selectedIndex, force); }; GridControl.prototype.cacheRows = function (aboveRange, visibleRange, belowRange) { }; GridControl.prototype._updateViewport = function (includeNonDirtyRows, forcePercentWidthCalculation) { var resultCount = this._count, above = [], below = [], visible = [], states = this._expandStates || [], maxIndex = this._expandedCount - 1; var range = this.getViewPortRanges(); var cachingStart = Math.max(0, range.start - this._options.payloadSize); var cachingEnd = Math.min(maxIndex, range.end + this._options.payloadSize); var dataIndex = this._getDataIndex(cachingStart); var lastVisible = range.start; for (var i = cachingStart; i <= cachingEnd && dataIndex < resultCount; i++) { if (i < range.start) { above[above.length] = new RowIndexInfo(i, dataIndex); } else if (i > range.end) { below[below.length] = new RowIndexInfo(i, dataIndex); } else { visible[visible.length] = new RowIndexInfo(i, dataIndex); lastVisible = i; this._lastRenderedDataIndex = dataIndex; } var nodeState = states[dataIndex]; if (nodeState < 0) { dataIndex += (1 - nodeState); } else { dataIndex++; } } this.measureColumnSize(forcePercentWidthCalculation); this.cacheRows(above, visible, below); this._drawRows(visible, includeNonDirtyRows); }; GridControl.prototype._cleanUpRows = function () { var rows = this._rows, hasGutter = this._gutter, dataIndex; for (dataIndex in rows) { var row = rows[dataIndex]; if (row.row.parentElement) { row.row.parentElement.removeChild(row.row); delete this._rowInfoMap[row.row.id]; } if (hasGutter && row.gutterRow.parentElement) { row.gutterRow.parentElement.removeChild(row.gutterRow); } } this._rows = {}; }; GridControl.prototype._drawRows = function (visibleRange, includeNonDirtyRows) { var states = this._expandStates, expandedState = 0, levels = this._indentLevels, level = 0, hasGutter = this._gutter, canvasDom = this._canvas, gutterCanvasDom, updateRow; if (this._editBoxControl) { this._editBoxControl.dismiss(); this._editBoxControl = null; } var fragment = document.createDocumentFragment(); var gutterFragment = null; if (hasGutter) { gutterCanvasDom = this._gutter; gutterFragment = document.createDocumentFragment(); } var existingRows = this._rows; var newRows = {}; this._rows = newRows; var visibleRowCount = visibleRange.length; for (var i = 0; i < visibleRowCount; i++) { var range = visibleRange[i]; var rowIndex = range.rowIndex; var dataIndex = range.dataIndex; var row = existingRows[dataIndex]; if (row) { updateRow = (row.rowIndex !== rowIndex); if (updateRow) { row.rowIndex = rowIndex; row.row.id = "row_" + this._getId() + "_" + rowIndex; this._rowInfoMap[row.row.id] = row; } else { updateRow = row.isDirty; delete row.isDirty; } if (includeNonDirtyRows) { updateRow = true; } delete existingRows[dataIndex]; } else { updateRow = true; var rowElement = this.createElementWithClass("div", "grid-row grid-row-normal"); rowElement.id = "row_" + this._getId() + "_" + rowIndex; rowElement.setAttribute("role", "row"); fragment.appendChild(rowElement); var rowInfo = { rowIndex: rowIndex, dataIndex: dataIndex, row: rowElement }; if (hasGutter) { var gutterRowElement = this.createElementWithClass("div", "grid-gutter-row grid-gutter-row-normal"); gutterFragment.appendChild(gutterRowElement); gutterRowElement.id = "gtr_" + rowElement.id; this._rowInfoMap[gutterRowElement.id] = rowInfo; rowInfo.gutterRow = gutterRowElement; } this._rowInfoMap[rowElement.id] = rowInfo; row = rowInfo; } newRows[dataIndex] = row; if (updateRow) { if (states) { expandedState = states[dataIndex]; level = levels[dataIndex]; row.row.setAttribute("aria-level", "" + level); } this._updateRow(row, rowIndex, dataIndex, expandedState, level); } } for (var existingRowIdx in existingRows) { row = existingRows[existingRowIdx]; if (hasGutter) { delete this._rowInfoMap[row.gutterRow.id]; row.gutterRow.parentElement.removeChild(row.gutterRow); } delete this._rowInfoMap[row.row.id]; row.row.parentElement.removeChild(row.row); } canvasDom.appendChild(fragment); if (hasGutter) { gutterCanvasDom.appendChild(gutterFragment); } }; GridControl.prototype.updateRow = function (rowIndex, dataIndex) { var expandedState = 0, level = 0; if (typeof dataIndex === "undefined" || dataIndex < 0) { dataIndex = this._getDataIndex(rowIndex); } else if (typeof rowIndex === "undefined" || rowIndex < 0) { rowIndex = this._getRowIndex(dataIndex); } var rowInfo = this._rows[dataIndex]; if (rowInfo) { if (this._expandStates) { expandedState = this._expandStates[dataIndex]; level = this._indentLevels[dataIndex]; } this._updateRow(rowInfo, rowIndex, dataIndex, expandedState, level); } }; GridControl.prototype._updateRow = function (rowInfo, rowIndex, dataIndex, expandedState, level) { var indentIndex = this._indentIndex; if (this._gutter) { var gutterOptions = this._options.gutter; var gutterRow = rowInfo.gutterRow; var gutterRowElem = gutterRow.firstElementChild; gutterRowElem.style.top = (rowIndex * this._measurements.rowHeight) + "px"; gutterRowElem.style.left = "0px"; gutterRowElem.style.width = (this._measurements.gutterWidth) + "px"; gutterRowElem.style.height = (this._measurements.rowHeight) + "px"; if (gutterOptions.checkbox) { var gutterCheckbox = this.createElementWithClass("input", "checkbox " + (gutterOptions.checkbox.cssClass || "")); gutterCheckbox.setAttribute("type", "checkbox"); var gutterCheckboxCellElem = this.createElementWithClass("div", "grid-gutter-cell grid-gutter-checkbox"); gutterCheckboxCellElem.appendChild(gutterCheckbox[0]); gutterRowElem.appendChild(gutterCheckboxCellElem); } if (gutterOptions.icon) { var gutterIconCss = "grid-gutter-cell grid-gutter-icon "; if (typeof gutterOptions.icon.cssClass !== "undefined") { gutterIconCss += gutterOptions.icon.cssClass + " "; } if (typeof gutterOptions.icon.index !== "undefined") { gutterIconCss += (this.getColumnValue(dataIndex, gutterOptions.icon.index, -1) || "") + " "; } if (gutterOptions.icon.ownerDraw !== false) { gutterIconCss += (this._getGutterIconClass(rowIndex, dataIndex, expandedState, level) || ""); } var gutterIconElem = this.createElementWithClass("div", gutterIconCss); gutterRowElem.appendChild(gutterIconElem); } this._drawGutterCell(rowInfo, rowIndex, dataIndex, expandedState, level); } var rowElement = rowInfo.row; rowElement.innerHTML = ""; rowElement.style.top = (rowIndex * this._measurements.rowHeight) + "px"; rowElement.style.left = this._measurements.gutterWidth + "px"; rowElement.style.height = (this._measurements.rowHeight) + "px"; rowElement.style.width = isNaN(this._contentSize.width) ? "" : (this._contentSize.width + 2) + "px"; var columns = this._columns; for (var i = 0, l = columns.length; i < l; i++) { var column = columns[i]; if (column.hidden) { continue; } var cellElement = column.getCellContents(rowInfo, dataIndex, expandedState, level, column, indentIndex, i); if (cellElement) { cellElement.setAttribute("role", "gridcell"); cellElement.setAttribute("aria-readonly", !cellElement.classList.contains("grid-cell-editable") + ""); rowElement.appendChild(cellElement); } } GridControl.makeElementUnselectable(rowElement); if (this._gutter) { GridControl.makeElementUnselectable(gutterRowElem); } this._updateRowSelectionStyle(rowInfo, this._selectedRows, this._selectedIndex); rowElement.removeEventListener("DOMAttrModified", this._onAriaExpandedModifiedHandler); if (expandedState !== 0) { rowElement.setAttribute("aria-expanded", expandedState > 0 ? "true" : "false"); rowElement.addEventListener("DOMAttrModified", this._onAriaExpandedModifiedHandler); } }; GridControl.prototype._getGutterIconClass = function (rowIndex, dataIndex, expandedState, level) { return ""; }; GridControl.prototype._drawGutterCell = function (rowInfo, rowIndex, dataIndex, expandedState, level) { }; GridControl._setTooltip = function (element, value, height) { var tooltip = { content: value, height: height }; element.setAttribute("data-plugin-vs-tooltip", JSON.stringify(tooltip)); }; GridControl.prototype._drawCell = function (rowInfo, dataIndex, expandedState, level, column, indentIndex, columnOrder) { var width = column.width || 20, href; var cellElement = this.createElementWithClass("div", "grid-cell"); cellElement.style.width = isNaN(width) ? String(width) : width + "px"; if (column.cellDecorator) { var dataItem = this._dataSource[dataIndex]; column.cellDecorator(cellElement, dataItem); } else { if (typeof column.hrefIndex !== "undefined") { href = this.getColumnValue(dataIndex, column.hrefIndex, -1); } var value = this.getColumnText(dataIndex, column, columnOrder); var isTruncated = false; if (value.length > GridControl.MAX_CELL_CONTENT_SIZE) { isTruncated = true; cellElement.setAttribute("grid-edit-value", value); value = value.substr(0, GridControl.MAX_CELL_CONTENT_SIZE); } if (!column.hasHTMLContent && !(column.hasMixedContent && column.getCellCSSClass && column.getCellCSSClass(dataIndex, column.index, columnOrder, this._dataSource).indexOf("grid-mixed-cell-html") !== -1)) { GridControl._setTooltip(cellElement, isTruncated ? value + "..." : value, 65); } if (href) { var link = document.createElement("a"); link.setAttribute("href", href); link.innerText = value; cellElement.appendChild(link); } else { if (value) { if (column.hasHTMLContent || (column.hasMixedContent && column.getCellCSSClass && column.getCellCSSClass(dataIndex, column.index, columnOrder, this._dataSource).indexOf("grid-mixed-cell-html") !== -1)) { cellElement.innerHTML = value; } else { cellElement.innerText = value; } } else { cellElement.innerHTML = " "; } } } if (columnOrder === indentIndex && level > 0) { var indent = ((level * GridControl.INDENT_WIDTH) - 13); column.indentOffset = indent; if (expandedState !== 0) { var treeSign = this.createElementWithClass("div", "icon grid-tree-icon"); treeSign.style.left = indent + "px"; cellElement.appendChild(treeSign); if (expandedState > 0) { treeSign.classList.add("icon-tree-expanded"); } else { treeSign.classList.add("icon-tree-collapsed"); } } cellElement.style.textIndent = (level * GridControl.INDENT_WIDTH) + "px"; } if (column.hasGlyph) { var glyphMargin = 2; var glyphClass = column.getGlyphClass(dataIndex, column.index, columnOrder, this._dataSource); if (glyphClass && glyphClass !== "") { var glyphElement = this.createElementWithClass("div", glyphClass + " grid-cell-glyph"); glyphElement.style.left = (level * GridControl.INDENT_WIDTH + glyphMargin) + "px"; cellElement.appendChild(glyphElement); cellElement.style.textIndent = (level * GridControl.INDENT_WIDTH + GridControl.GLYPH_WIDTH + glyphMargin) + "px"; } } if (column.getCellCSSClass) { var cellStyle = column.getCellCSSClass(dataIndex, column.index, columnOrder, this._dataSource); if (cellStyle) { var styles = cellStyle.trim().split(" "); for (var index = 0; index < styles.length; index++) { if (styles[index]) { cellElement.classList.add(styles[index]); } } } } if (column.rowCss) { cellElement.classList.add(column.rowCss); } return cellElement; }; GridControl.prototype._drawSplitters = function () { var _this = this; if (this._options.drawRowSplitters && this._dataSource.length > 0) { var splitters = this._canvas.querySelectorAll(".grid-row-splitter"); for (var index = 0; index < splitters.length; index++) { var element = splitters[index]; element.parentElement.removeChild(element); } var rowInfo = this.getRowInfo(this._lastRenderedDataIndex); var left = 0; if (rowInfo) { var scrollHeight = (this._canvas.scrollHeight - 1) + "px"; for (var index = 0; index < this._columns.length - 1; index++) { var column = this._columns[index]; if (column.hidden) { continue; } var splitter = this.createElementWithClass("div", "grid-row-splitter"); left += parseInt(rowInfo.row.children[index].style.width); splitter.style.left = left + "px"; splitter.style.height = scrollHeight; splitter.setAttribute("grid-splitter-index", "" + index); if (column.fixed || this._columns[index + 1].fixed) { splitter.classList.add("fixed"); } else { splitter.addEventListener("mousedown", function (e) { _this._onSplitterMouseDown(e); }); splitter.addEventListener("dblclick", function (e) { _this._onSplitterDblClick(e); }); } this._canvas.appendChild(splitter); } } } }; GridControl.prototype._drawHeader = function () { var columns = this._columns, sortOrder = this._sortOrder; if (this._header) { var fragment = document.createDocumentFragment(); for (var i = 0, l = columns.length; i < l; i++) { var column = columns[i]; if (column.hidden) { continue; } var headerElement = this.createElementWithClass("div", "grid-header-column"); GridControl._setTooltip(headerElement, column.tooltip, 65); headerElement.style.width = (column.width || 20) + "px"; headerElement._data = { columnIndex: i, header: true }; var seperatorElement = this.createElementWithClass("div", "separator"); if (column.fixed) { seperatorElement.style.cursor = "auto"; } seperatorElement._data = { columnIndex: i, separator: true }; headerElement.appendChild(seperatorElement); var headerCellElement = column.getHeaderCellContents(column, i); if (column.headerCss) { headerCellElement.classList.add(column.headerCss); } if (column.tooltip) { GridControl._setTooltip(headerCellElement, column.tooltip, 65); } headerElement.appendChild(headerCellElement); var sortElement = this.createElementWithClass("div", "sort-handle"); sortOrder.forEach(function (element, index, array) { if (element.index === column.index) { if (element.order === "asc") { headerElement.classList.add("ascending"); } else if (element.order === "desc") { headerElement.classList.add("descending"); } return false; } }); headerElement.appendChild(sortElement); fragment.appendChild(headerElement); } this._headerCanvas.innerHTML = ""; this._headerCanvas.appendChild(fragment); GridControl.makeElementUnselectable(this._header); } }; GridControl.prototype._drawHeaderCellValue = function (column, columnOrder) { var cellElement = document.createElement("div"); cellElement.classList.add("title"); cellElement.innerText = column.text || ""; if (columnOrder === this._indentIndex && !(typeof this._indentLevels === "undefined" || this._indentLevels === null)) { cellElement.classList.add("indented-title"); } return cellElement; }; GridControl.prototype._layoutContentSpacer = function () { var width = 0, columns = this._columns; for (var i = 0, l = columns.length; i < l; i++) { if (columns[i].hidden) { continue; } width += (columns[i].width || 20) + this._measurements.cellOffset; } width = width + 2; var height = Math.max(1, this._expandedCount * this._measurements.rowHeight); this._contentSpacer.style.width = width + "px"; this._contentSpacer.style.height = height + "px"; if (this._gutter) { this._gutter.style.height = height + "px"; } this._ignoreScroll = true; try { var scrollTop = Math.max(0, Math.min(this._scrollTop, height - this._canvasHeight)); if (scrollTop !== this._scrollTop) { this._scrollTop = scrollTop; this._canvas.scrollTop = scrollTop; } var scrollLeft = Math.max(0, Math.min(this._scrollLeft, width - this._canvasWidth)); if (scrollLeft !== this._scrollLeft) { this._scrollLeft = scrollLeft; this._canvas.scrollLeft = scrollLeft; } } finally { this._ignoreScroll = false; } this._contentSize.width = width; this._contentSize.height = height; }; GridControl.prototype._layoutHeader = function () { if (this._header) { this._headerCanvas.style.left = this._measurements.gutterWidth - this._scrollLeft + "px"; } if (this._gutter) { this._gutter.style.left = this._scrollLeft + "px"; } }; GridControl.prototype.layout = function (forcePercentWidthCalculation, forceFocus) { if (typeof forceFocus === "undefined") { forceFocus = true; } this._measureCanvasSize(); var focusedRow = -1; if (document.activeElement && this._canvas.contains(document.activeElement)) { focusedRow = this._selectedIndex; } this._cleanUpRows(); this._fixScrollPos(); this._layoutContentSpacer(); this._updateViewport(false, forcePercentWidthCalculation); if (!document.activeElement && focusedRow >= 0) { this._addSelection(focusedRow, null, null, forceFocus); } this._layoutHeader(); this._drawHeader(); this._drawSplitters(); }; GridControl.prototype._fixScrollPos = function () { var oldIgnoreScroll = this._ignoreScroll; this._ignoreScroll = true; try { this._canvas.scrollLeft = this._scrollLeft; this._canvas.scrollTop = this._scrollTop; } finally { this._ignoreScroll = oldIgnoreScroll; } }; GridControl.prototype.redraw = function () { this._fixScrollPos(); this._redraw(true); }; GridControl.prototype._redraw = function (includeNonDirtyRows) { this._layoutHeader(); this._updateViewport(includeNonDirtyRows); }; GridControl.prototype.getColumnValue = function (dataIndex, columnIndex, columnOrder) { return this._dataSource[dataIndex][columnIndex]; }; GridControl.prototype.getColumnText = function (dataIndex, column, columnOrder) { var text; var value = column.getColumnValue(dataIndex, column.index, columnOrder, this._dataSource); if (typeof value !== "string") { text = GridControl.convertValueToDisplayString(value, column.format); } else { text = value; } column.maxLength = Math.max(column.maxLength || 0, text.length); return text; }; GridControl.prototype._getExpandState = function (dataIndex) { var result = 0; if (this._expandStates) { if (typeof (this._expandStates[dataIndex]) === "number") { result = this._expandStates[dataIndex]; } } return result; }; GridControl.prototype.getViewPortRanges = function () { var maxIndex = this._expandedCount - 1; var visibleIndices = this._getVisibleRowIndices(); var firstIndex = visibleIndices.first; var lastIndex = visibleIndices.last; firstIndex = Math.max(0, firstIndex - this._options.extendViewportBy); lastIndex = Math.min(maxIndex, lastIndex + this._options.extendViewportBy); var startDataIndex = this._getDataIndex(firstIndex); var endDataIndex = this._getDataIndex(lastIndex); return new Range(Math.min(startDataIndex, firstIndex), Math.max(endDataIndex, lastIndex)); }; GridControl.prototype.scrollToBottom = function (callback) { this._scrollRenderComplete = callback; if ((this._canvas.scrollTop + this._canvas.clientHeight) >= this._canvas.scrollHeight) { if (this._scrollRenderComplete) { this._scrollRenderComplete(); this._scrollRenderComplete = null; } } else { this._canvas.scrollTop = this._canvas.scrollHeight; } }; GridControl.prototype.setViewState = function (enabled) { this._options.isGridEnabled = enabled; if (enabled) { this.rootElement.classList.remove("busy"); } else { this.rootElement.classList.add("busy"); } }; GridControl.prototype._selectRow = function (rowIndex, dataIndex, options, focus) { var ctrl = options && options.ctrl, shift = options && options.shift, rightClick = options && options.rightClick; if (ctrl) { this._addSelection(rowIndex, dataIndex, { toggle: true }); } else if (shift) { this._clearSelection(); this._addSelectionRange(rowIndex, dataIndex); } else if (rightClick) { if (!this._selectedRows || !(this._selectedRows.hasOwnProperty(rowIndex))) { this._clearSelection(); this._addSelection(rowIndex, dataIndex); } else { this._selectedIndex = rowIndex; this._updateAriaAttribute(); } } else { this._clearSelection(); this._addSelection(rowIndex, dataIndex, null, focus); } }; GridControl.prototype._selectAll = function () { if (this._count > 0 && this._options.allowMultiSelect !== false) { this._clearSelection(); this._selectionStart = 0; var prevIndex = Math.max(0, this._selectedIndex); this._addSelectionRange(this._count - 1, undefined, { doNotFireEvent: true }); this._selectedIndex = prevIndex; this._updateSelectionStyles(); this._selectionChanged(); } }; GridControl.prototype.getSelectedRowIndex = function () { return this._selectedIndex; }; GridControl.prototype.setSelectedRowIndex = function (selectedRowIndex) { this._clearSelection(); this._addSelection(selectedRowIndex); }; GridControl.prototype.getSelectedDataIndex = function () { return this._getDataIndex(this._selectedIndex); }; GridControl.prototype.getSelectedDataIndices = function () { var index, rows = this._selectedRows, indices = []; if (rows) { for (index in rows) { indices[indices.length] = rows[index]; } } return indices; }; GridControl.prototype.ensureDataIndexExpanded = function (dataIndex) { var rowIndex = this._getRowIndex(dataIndex); while (rowIndex < 0 || (dataIndex > 0 && rowIndex === 0)) { this.expandNode(this._getDataIndex(-rowIndex)); rowIndex = this._getRowIndex(dataIndex); } return rowIndex; }; GridControl.prototype.setSelectedDataIndex = function (dataIndex, expandNodes) { var rowIndex = expandNodes ? this.ensureDataIndexExpanded(dataIndex) : this._getRowIndex(dataIndex); this.setSelectedRowIndex(rowIndex); }; GridControl.prototype._clearSelection = function () { this._selectionCount = 0; this._selectedRows = null; }; GridControl.prototype._addSelection = function (rowIndex, dataIndex, options, focus) { var keepSelectionStart = options && options.keepSelectionStart, doNotFireEvent = options && options.doNotFireEvent, toggle = options && options.toggle; if (this._options.allowMultiSelect === false) { keepSelectionStart = false; this._clearSelection(); } if (!this._selectedRows) { this._selectedRows = {}; } if (rowIndex >= 0) { var add = true; if (!(this._selectedRows.hasOwnProperty(rowIndex))) { this._selectionCount++; } else if (toggle) { add = false; this._selectionCount = Math.max(0, this._selectionCount - 1); delete this._selectedRows[rowIndex]; } if (typeof (dataIndex) !== "number") { dataIndex = this._getDataIndex(rowIndex); } if (add) { this._selectedRows[rowIndex] = dataIndex; } this._selectedIndex = rowIndex; this._updateAriaAttribute(); if (this._selectionStart < 0 || !keepSelectionStart) { this._selectionStart = rowIndex; } } else { dataIndex = -1; this._selectedIndex = -1; } if (!doNotFireEvent) { this._updateSelectionStyles(); this._selectionChanged(); if (focus) { this.focus(); } this._selectedIndexChanged(this._selectedIndex, dataIndex); } }; GridControl.prototype._addSelectionRange = function (rowIndex, dataIndex, options) { var doNotFireEvent = options && options.doNotFireEvent, prevSelectedDataIndex = -1, selectedDataIndex; if (this._options.allowMultiSelect === false) { this._addSelection(rowIndex, dataIndex); } else { if (this._selectedRows) { prevSelectedDataIndex = this._selectedRows[this._selectedIndex]; } if (this._selectionStart < 0) { this._selectionStart = rowIndex; } var start = Math.min(this._selectionStart, rowIndex); var end = Math.max(this._selectionStart, rowIndex); if (typeof (dataIndex) !== "number" || start !== rowIndex) { dataIndex = this._getDataIndex(start); } for (var i = start; i <= end; i++) { this._addSelection(i, dataIndex, { keepSelectionStart: true, doNotFireEvent: true }); if (i === rowIndex) { selectedDataIndex = dataIndex; } var nodeState = this._getExpandState(dataIndex); if (nodeState < 0) { dataIndex += (1 - nodeState); } else { dataIndex++; } } this._selectedIndex = rowIndex; this._updateAriaAttribute(); if (!doNotFireEvent) { this._updateSelectionStyles(); this._selectionChanged(); if (prevSelectedDataIndex !== selectedDataIndex) { this._selectedIndexChanged(this._selectedIndex, selectedDataIndex); } } } }; GridControl.prototype._updateAriaAttribute = function () { if (this._active) { var dataIndex = this._getDataIndex(this._selectedIndex); if (dataIndex >= 0) { var rowInfo = this.getRowInfo(dataIndex); if (rowInfo && rowInfo.row) { var id = rowInfo.row.getAttribute("id"); if (id !== this._activeAriaId) { this._canvas.setAttribute("aria-activedescendant", id); this._activeAriaId = id; } } } } }; GridControl.prototype._updateSelectionStyles = function () { var _this = this; if (this._delayedUpdateCookie) { window.clearTimeout(this._delayedUpdateCookie); } this._delayedUpdateCookie = window.setTimeout(function () { var dataIndex, selectedRows = _this._selectedRows, focusIndex = _this._selectedIndex, rows = _this._rows; for (dataIndex in rows) { var rowInfo = rows[dataIndex]; _this._updateRowSelectionStyle(rowInfo, selectedRows, focusIndex); } }, 10); }; GridControl.prototype._selectionChanged = function () { this.selectionChanged(this._selectedIndex, this._selectionCount, this._selectedRows); this.fireCustomEvent(this._element, "selectionchanged", [{ selectedIndex: this._selectedIndex, selectedCount: this._selectionCount, selectedRows: this._selectedRows }]); }; GridControl.prototype.selectionChanged = function (selectedIndex, selectedCount, selectedRows) { }; GridControl.prototype._selectedIndexChanged = function (selectedRowIndex, selectedDataIndex) { this.selectedIndexChanged(selectedRowIndex, selectedDataIndex); this.fireCustomEvent(this._element, GridControl.EVENT_SELECTED_INDEX_CHANGED, [selectedRowIndex, selectedDataIndex]); }; GridControl.prototype.selectedIndexChanged = function (selectedRowIndex, selectedDataIndex) { }; GridControl.prototype._updateRowSelectionStyle = function (rowInfo, selectedRows, focusIndex) { var rowIndex = rowInfo.rowIndex; var rowElement = rowInfo.row; var gutterElement = rowInfo.gutterRow; rowElement.classList.remove("grid-row-selected"); rowElement.classList.remove("grid-row-selected-blur"); rowElement.classList.remove("grid-row-current"); rowElement.setAttribute("tabindex", "-1"); if (gutterElement) { gutterElement.classList.remove("grid-gutter-row-selected"); gutterElement.classList.remove("grid-gutter-row-selected-blur"); gutterElement.classList.remove("grid-gutter-row-current"); gutterElement.querySelector("input.checkbox").setAttribute("checked", String(false)); } if (selectedRows && selectedRows.hasOwnProperty(rowIndex)) { if (gutterElement) { gutterElement.querySelector("input.checkbox").setAttribute("checked", String(true)); } if (this._active) { rowElement.classList.add("grid-row-selected"); rowElement.setAttribute("tabindex", "1"); if (gutterElement) { gutterElement.classList.add("grid-gutter-row-selected"); } } else { rowElement.classList.add("grid-row-selected-blur"); rowElement.setAttribute("tabindex", "1"); if (gutterElement) { gutterElement.classList.add("grid-gutter-row-selected-blur"); } } } if (rowIndex === focusIndex) { rowElement.classList.add("grid-row-current"); if (gutterElement) { gutterElement.classList.add("grid-gutter-row-current"); } } }; GridControl.prototype.focus = function (timeout) { var _this = this; var doSetFocus = function () { if (document.activeElement === _this._canvas) { return; } try { if (_this._selectedIndex > -1) { var dataIndex = _this._getDataIndex(_this._selectedIndex); var rowInfo = _this._rows[dataIndex]; if (rowInfo) { var rowElement = rowInfo.row; if (rowElement) { rowElement.focus(); } } } } catch (ex) { } }; if (!timeout) { doSetFocus(); } else { window.setTimeout(function () { doSetFocus(); }, timeout); } }; GridControl.prototype._notifyForPrerender = function () { if (this._options.prerenderCallback) { var range = this.getViewPortRanges(); this._options.prerenderCallback(range.start, range.end); } }; GridControl.prototype.measureColumnSize = function (forcePercentWidthCalculation) { var remainingWidth = this._canvas.clientWidth - (this.isVerticalScrollbarVisible ? 0 : 17); for (var index = 0; index < this._columns.length; index++) { var columnInfo = this._columns[index]; if (columnInfo.fixed) { remainingWidth -= columnInfo.width; } } if (remainingWidth > 0) { if (forcePercentWidthCalculation) { for (var index = 0; index < this._columns.length; index++) { var columnInfo = this._columns[index]; if (!columnInfo.fixed && columnInfo.percentWidth) { columnInfo.percentWidth = columnInfo.width / remainingWidth; } } } for (var index = 0; index < this._columns.length; index++) { var columnInfo = this._columns[index]; if (!columnInfo.fixed && columnInfo.percentWidth) { columnInfo.width = remainingWidth * columnInfo.percentWidth; } } } }; GridControl.prototype._onContainerMouseDown = function (e) { var targetElement = e.target; if (targetElement.classList.contains("grid-edit-box")) { return; } this.focus(10); }; GridControl.prototype._measureCanvasSize = function () { this._canvasHeight = this._canvas.clientHeight; this._canvasWidth = this._canvas.clientWidth; }; GridControl.prototype._onContainerResize = function (e) { var _this = this; if (!this._resizeLayoutTimeout) { this._resizeLayoutTimeout = window.setTimeout(function () { _this.measureColumnSize(false); _this.layout(); _this._notifyForPrerender(); _this._resizeLayoutTimeout = null; }, 200); } }; GridControl.prototype._setupMoveEvents = function () { var _this = this; document.addEventListener("mousemove", function (e) { return _this._onDocumentMouseMove(e); }); document.addEventListener("mouseup", function (e) { return _this._onDocumentMouseUp(e); }); }; GridControl.prototype._clearMoveEvents = function () { document.removeEventListener("mousemove", null, true); document.removeEventListener("mouseup", null, true); }; GridControl.prototype._onDocumentMouseMove = function (e) { var columnSizing = this._columnSizing; if (columnSizing && columnSizing.active === true) { var delta = e.pageX - columnSizing.origin; var newWidth = Math.max(15, columnSizing.originalWidth + delta); var column = this._columns[columnSizing.index]; column.width = newWidth; this._applyColumnSizing(columnSizing.index); this._moveSizingElement(columnSizing.index); } }; GridControl.prototype._onDocumentMouseUp = function (e) { var _this = this; window.setImmediate(function () { _this._tryFinishColumnSizing(false); }); return false; }; GridControl.prototype._onHeaderMouseDown = function (e) { if (e.which !== 1) { return true; } var separator = this.findClosestElement(e.target, ".separator"); if (separator && separator._data) { var columnIndex = separator._data.columnIndex; var column = this._columns[columnIndex]; if (!column.fixed) { this._columnSizing = new ColumnSizing(true, columnIndex, column.width, e.pageX); this._moveSizingElement(columnIndex); this._setupMoveEvents(); e.stopImmediatePropagation(); e.preventDefault(); return false; } } }; GridControl.prototype._onHeaderMouseUp = function (e) { return false; }; GridControl.prototype._onHeaderClick = function (e) { var headerColumn = this.findClosestElement(e.target, ".grid-header-column"); if (headerColumn) { if (!this._columnSizing) { var separator = this.findClosestElement(e.target, ".separator"); if (separator && separator._data) { return false; } else if (headerColumn._data) { var columnIndex = headerColumn._data.columnIndex; var column = this._columns[columnIndex]; if (column.canSortBy && !column.fixed) { this._sortBy(column, e.shiftKey); } } } } }; GridControl.prototype._onHeaderDblClick = function (e) { var separator = this.findClosestElement(e.target, ".separator"); if (separator && separator._data) { this._tryFinishColumnSizing(true); var columnIndex = separator._data.columnIndex; var column = this._columns[columnIndex]; var maxLength = Math.max(column.maxLength || 0, 3); var ratio = 1.1 + 0.7 * Math.exp(-maxLength / 20); var originalWidth = column.width; column.width = (column.indentOffset || 0) + Math.round(maxLength * ratio * this._measurements.unitEx); this._applyColumnSizing(columnIndex, originalWidth, true); return false; } }; GridControl.prototype.getCellContentWidth = function (cell) { if (document.createRange) { var range = document.createRange(); if (cell.firstChild && cell.firstChild.nodeType === Node.TEXT_NODE) { range.selectNodeContents(cell.firstChild); var rect = range.getBoundingClientRect(); return parseInt(cell.style.textIndent, 10) + rect.width; } } return cell.clientWidth; }; GridControl.prototype._onSplitterDblClick = function (e) { var _this = this; var maxWidth = 0; var splitter = e.target; if (splitter) { var columnIndex = parseInt(splitter.getAttribute("grid-splitter-index"), 10); var maxWidth = 0; for (var rowIndex in this._rows) { var row = this._rows[rowIndex]; if (row) { var columnWidth = this.getCellContentWidth(row.row.children[columnIndex]); maxWidth = maxWidth > columnWidth ? maxWidth : columnWidth; } } var leftColumn = this._columns[columnIndex]; var rightColumn = this._columns[columnIndex + 1]; if (leftColumn.hasGlyph) { maxWidth += GridControl.GLYPH_WIDTH; } var currentDiff = leftColumn.width - (maxWidth + 3); var newLeftWidth = leftColumn.width - currentDiff; var newRightWidth = rightColumn.width + currentDiff; if (newLeftWidth >= ColumnInfo.MIN_RESIZE_WIDTH && newRightWidth >= ColumnInfo.MIN_RESIZE_WIDTH) { leftColumn.width -= currentDiff; rightColumn.width += currentDiff; window.setImmediate(function () { _this.layout(true); }); } else if (newRightWidth < ColumnInfo.MIN_RESIZE_WIDTH) { newLeftWidth -= (ColumnInfo.MIN_RESIZE_WIDTH - newRightWidth); newRightWidth = ColumnInfo.MIN_RESIZE_WIDTH; } } }; GridControl.prototype._onSplitterMouseDown = function (e) { var _this = this; var splitterOffset, columnIndex; var leftColumn, rightColumn; var onMouseMove = function (e) { var splitter = document.querySelector(".grid-row-splitter.active"); if (splitter) { var currentDiff = e.clientX - splitterOffset; var newLeftWidth = leftColumn.width + currentDiff; var newRightWidth = rightColumn.width - currentDiff; if (newLeftWidth >= ColumnInfo.MIN_RESIZE_WIDTH && newRightWidth >= ColumnInfo.MIN_RESIZE_WIDTH) { splitter.style.left = (splitter.offsetLeft + currentDiff) + "px"; splitterOffset = e.clientX; leftColumn.width += currentDiff; rightColumn.width -= currentDiff; } } }; var onMouseUp = function (e) { var splitter = document.querySelector(".grid-row-splitter.active"); if (splitter) { splitter.classList.remove("active"); window.setImmediate(function () { _this.layout(true); }); } document.removeEventListener("mousemove", onMouseMove); document.removeEventListener("mouseup", onMouseUp); }; if (e.button === 0 /* LeftButton */) { var splitter = e.target; columnIndex = parseInt(splitter.getAttribute("grid-splitter-index"), 10); leftColumn = this._columns[columnIndex]; rightColumn = this._columns[columnIndex + 1]; if (!leftColumn.fixed && !rightColumn.fixed) { splitter.classList.add("active"); splitterOffset = e.clientX; document.addEventListener("mousemove", onMouseMove); document.addEventListener("mouseup", onMouseUp); } } }; GridControl.prototype._moveSizingElement = function (columnIndex) { var left = this._measurements.gutterWidth; if (!this._sizingElement) { if (columnIndex < 0) { return; } this._sizingElement = this.createElementWithClass("div", "grid-column-sizing"); this._canvas.appendChild(this._sizingElement); } this._sizingElement.style.height = (this._canvas.clientHeight - 1) + "px"; this._sizingElement.style.top = this._scrollTop + "px"; if (columnIndex < 0) { this._sizingElement.style.left = "-5000px"; this._sizingElement.style.top = "-5000px"; this._sizingElement.style.height = 0 + "px"; } else { var i = 0; while (i <= columnIndex) { var column = this._columns[i++]; if (!column.hidden) { left += column.width; } } this._sizingElement.style.left = (left - 1) + "px"; } }; GridControl.prototype._getVisibleColumnIndex = function (columnIndex) { var columnCounter = 0, visibleColumnIndex = 0, length = this._columns.length; if (this._columns[columnIndex].hidden) { return -1; } while (columnCounter < columnIndex) { if (!this._columns[columnCounter].hidden) { visibleColumnIndex++; } columnCounter++; } return visibleColumnIndex; }; GridControl.prototype._applyColumnSizing = function (columnIndex, initialWidth, finish) { var domColumnIndex = this._getVisibleColumnIndex(columnIndex) + 1, column = this._columns[columnIndex], columnSizeChanged = false; initialWidth = initialWidth || -1; if (column) { columnSizeChanged = column.width !== initialWidth; var columnDiv = this.rootElement.querySelector(".grid-header-canvas .grid-header-column:nth-child(" + domColumnIndex + ")"); columnDiv.style.width = column.width + "px"; } if (finish === true) { if (columnSizeChanged) { this.layout(); } this._onColumnResize(column); } }; GridControl.prototype._onColumnResize = function (column) { this.fireCustomEvent(this._element, "columnresize", [column]); }; GridControl.prototype._tryFinishColumnSizing = function (cancel) { var columnSizing = this._columnSizing; if (columnSizing) { if (columnSizing.active === true) { if (!cancel) { this._applyColumnSizing(columnSizing.index, columnSizing.originalWidth, true); } this._moveSizingElement(-1); } this._columnSizing = null; this._clearMoveEvents(); } }; GridControl.prototype._getSortColumns = function (sortOrder) { var columns = this._columns, sortColumns = []; for (var i = 0, l = sortOrder.length; i < l; i++) { var c; var sc = sortOrder[i]; columns.forEach(function (element, index, array) { if (element.index === sc.index) { c = element; return false; } }); sortColumns.push(c); } return sortColumns; }; GridControl.prototype._sortBy = function (column, add) { var sortOrder = this._sortOrder.slice(0), found = false; if (column) { for (var i = 0, l = sortOrder.length; i < l; i++) { var sc = sortOrder[i]; if (sc.index === column.index) { sortOrder.splice(i, 1); found = true; break; } } var sc; if (found) { sc = new SortOrderInfo(sc.index, sc.order === "asc" ? "desc" : "asc"); } else { sc = new SortOrderInfo(column.index, "asc"); } if (add && this._options.allowSortOnMultiColumns) { sortOrder.push(sc); } else { sortOrder = [sc]; } } var sortColumns = this._getSortColumns(sortOrder); this._onSort(sortOrder, sortColumns); }; GridControl.prototype._onSort = function (sortOrder, sortColumns) { if (this.onSort(sortOrder, sortColumns) !== false) { this.fireCustomEvent(this._element, "sort", [{ sortOrder: sortOrder, sortColumns: sortColumns }]); } }; GridControl.prototype.onSort = function (sortOrder, sortColumns) { if (this._options.autoSort) { this._trySorting(sortOrder, sortColumns); this._sortOrder = sortOrder; this.layout(); } return true; }; GridControl.prototype._trySorting = function (sortOrder, sortColumns) { var _this = this; if (!sortColumns) { sortColumns = this._getSortColumns(sortOrder); } var selectedDatas = [], sumOfSelectedRowIndices = 0; for (var rowIndex in this._selectedRows) { var dataIndex = this._selectedRows[rowIndex]; var data = this._dataSource[dataIndex]; if (data) { selectedDatas.push(data); sumOfSelectedRowIndices += parseInt(rowIndex); } } var rootNode = new TreeNode(null, null); GridControl.addItemsToTree(this._dataSource, this._expandStates, 0, this._dataSource.length, rootNode); if (this._sortOrder && this._sortOrder.length === 1 && sortOrder.length === 1 && this._sortOrder[0] !== sortOrder[0] && this._sortOrder[0].index === sortOrder[0].index) { if (this._sortOrder[0].order !== sortOrder[0].order) { GridControl.walkTree(rootNode, function (node) { Utility.TreeNodeSort.stableReverse(node.children, function (v1, v2) { return Utility.TreeNodeSort.sortComparer(sortOrder, sortColumns, v1.data, v2.data); }); }); } } else { GridControl.walkTree(rootNode, function (node) { node.children.sort(function (v1, v2) { return Utility.TreeNodeSort.sortComparer(sortOrder, sortColumns, v1.data, v2.data); }); }); } this._dataSource = []; this._expandStates = []; for (var i = 0; i < rootNode.children.length; i++) { GridControl.walkTree(rootNode.children[i], function (node) { _this._dataSource.push(node.data); _this._expandStates.push(node.expandState); }); } this._indentLevels = GridControl.expand(this._expandStates); this._updateRanges(); if (this._selectionCount > 0) { this._clearSelection(); var sumOfNewSelectedRowIndices = 0; for (var i = 0; i < selectedDatas.length; i++) { var dataIndex = this._dataSource.indexOf(selectedDatas[i]); if (dataIndex >= 0) { var dataRowIndex = this._getRowIndex(dataIndex); this._addSelection(dataRowIndex, dataIndex); sumOfNewSelectedRowIndices += dataRowIndex; } } this._scrollTop += (sumOfNewSelectedRowIndices - sumOfSelectedRowIndices) / this._selectionCount * this._measurements.rowHeight; } }; GridControl.prototype._onCanvasScroll = function (e) { var canvas = this._canvas; this._resetScroll = true; this._scrollLeft = canvas.scrollLeft; this._scrollTop = canvas.scrollTop; if (!this._ignoreScroll) { this._notifyForPrerender(); this._redraw(); if (this._scrollRenderComplete) { this._scrollRenderComplete(); this._scrollRenderComplete = null; } } return false; }; GridControl.prototype.getRowInfoFromEvent = function (e, selector) { var element = this.findClosestElement(e.target, selector); return this._rowInfoMap[element.id]; }; GridControl.prototype._getClickedCell = function (e) { return this.findClosestElement(e.target, ".grid-cell"); }; GridControl.prototype._isCellEditing = function (cellElement) { return cellElement.querySelectorAll(".grid-edit-box").length === 1; }; GridControl.prototype.createEditBox = function (rowDataIndex, columnIndex, editElement) { if (!this._options.isGridEnabled) { return; } if (this._options.preEditCellCallback !== null) { this._options.preEditCellCallback(rowDataIndex, columnIndex); } var inputBox; var columnInfo = this.getColumns()[columnIndex]; if (columnInfo.getEditBox) { inputBox = columnInfo.getEditBox(rowDataIndex, columnInfo); } this._editBoxControl = new Grid.GridCellEditControl(rowDataIndex, columnIndex, editElement, this, this._options, inputBox); editElement.innerHTML = ""; editElement.appendChild(this._editBoxControl.inputElement); try { this._editBoxControl.inputElement.select(); this._editBoxControl.inputElement.focus(); } catch (ex) { } }; GridControl.prototype.onEditCell = function (e) { var targetElement = e.target; if (!targetElement.classList.contains("grid-tree-icon")) { var cellElement = this._getClickedCell(e); if (this._isCellEditing(cellElement)) { return; } if (cellElement && cellElement.classList.contains("grid-cell-editable")) { var rowInfo = this.getRowInfoFromEvent(e, ".grid-row"); if (rowInfo) { var cells = rowInfo.row.children; var totalCells = cells.length; var columnIndex = -1; for (var index = 0; index < totalCells; index++) { if (cellElement === cells[index]) { columnIndex = index; } } this.createEditBox(rowInfo.dataIndex, columnIndex, cellElement); } } } }; GridControl.prototype._onRowMouseDown = function (e) { var rowInfo = this.getRowInfoFromEvent(e, ".grid-row"); if (rowInfo) { var targetElement = e.target; if (e.which === 1 && targetElement.classList.contains("grid-tree-icon")) { this._onToggle(rowInfo); } else if (!(e.which === 3 && this._options && this._options.disableRightClickSelection)) { this._selectRow(rowInfo.rowIndex, rowInfo.dataIndex, { ctrl: e.ctrlKey, shift: e.shiftKey, rightClick: e.which === 3 }); this.focus(0); } } }; GridControl.prototype._onGutterClick = function (e) { var rowInfo = this.getRowInfoFromEvent(e, ".grid-gutter-row"); if (rowInfo) { if (!this._selectedRows || typeof (this._selectedRows[rowInfo.rowIndex]) !== "number") { this._selectRow(rowInfo.rowIndex, rowInfo.dataIndex); } } }; GridControl.prototype._onBlur = function (e) { var targetElement = e.target; if (targetElement.classList.contains("grid-edit-box")) { e.stopPropagation(); return; } this._active = false; this._updateSelectionStyles(); }; GridControl.prototype._onFocus = function (e) { var targetElement = e.target; if (targetElement.classList.contains("grid-edit-box")) { e.stopPropagation(); return; } this._active = true; this._updateSelectionStyles(); this._updateAriaAttribute(); }; GridControl.prototype._onKeyDown = function (e) { var bounds = { lo: -1, hi: -1 }, keyCode = Common.KeyCodes, canvas = this._canvas; if (!this._options.isGridEnabled) { return false; } if (this._copyInProgress) { if (e.keyCode === 27 /* Escape */) { if (this._cancelable) { this._cancelable.cancel(); } } return false; } if (this._count > 0) { bounds = { lo: 0, hi: this._expandedCount - 1 }; } if (this._selectedIndex < 0) { this._addSelection(bounds.lo); } if (this._options.keyboardEventHandler) { if (this._options.keyboardEventHandler.keys.indexOf(e.key) !== -1) { var handled = this._options.keyboardEventHandler.handler(e, this._dataSource, this._getDataIndex(this._selectedIndex)); if (handled) { e.preventDefault(); return false; } } } switch (e.keyCode) { case 40 /* ArrowDown */: this._clearSelection(); this._addSelection(Math.min(this._selectedIndex + 1, bounds.hi), null, null, true); break; case 38 /* ArrowUp */: this._clearSelection(); this._addSelection(Math.max(this._selectedIndex - 1, bounds.lo), null, null, true); break; case 34 /* PageDown */: this._clearSelection(); var visibleIndices = this._getVisibleRowIndices(); if (this._selectedIndex < visibleIndices.last) { this._addSelection(visibleIndices.last, null, null, true); } else { var pageCount = visibleIndices.last - visibleIndices.first + 1; this._addSelection(Math.min(this._selectedIndex + pageCount, bounds.hi), null, null, true); } break; case 33 /* PageUp */: this._clearSelection(); var visibleIndices = this._getVisibleRowIndices(); if (this._selectedIndex > visibleIndices.first) { this._addSelection(visibleIndices.first, null, null, true); } else { var pageCount = visibleIndices.last - visibleIndices.first + 1; this._addSelection(Math.max(this._selectedIndex - pageCount, bounds.lo), null, null, true); } break; case 39 /* ArrowRight */: this.tryToggle(true, e.shiftKey); break; case 37 /* ArrowLeft */: if (!this.tryToggle(false, e.shiftKey)) { var dataIndex = this._getDataIndex(this._selectedIndex); var index = dataIndex - 1; while (index >= 0) { if (dataIndex - index <= Math.abs(this._expandStates[index])) { this._selectRow(this._getRowIndex(index), null, null, true); break; } index--; } } break; case 36 /* Home */: this._clearSelection(); this._addSelection(bounds.lo, null, null, true); break; case 35 /* End */: this._clearSelection(); this._addSelection(bounds.hi, null, null, true); break; case 113 /* F2 */: var rowInfo = this.getRowInfo(this._getDataIndex(this._selectedIndex)); if (rowInfo) { var firstEditableIndex = this._getFirstEditableCellIndex(rowInfo.row.children); if (firstEditableIndex >= 0) { this.createEditBox(rowInfo.dataIndex, firstEditableIndex, rowInfo.row.children[firstEditableIndex]); } } break; default: return true; } this.getSelectedRowIntoView(); e.preventDefault(); return false; }; GridControl.prototype._getFirstEditableCellIndex = function (cells) { for (var index = 0; index < cells.length; index++) { if (cells[index].classList.contains("grid-cell-editable")) { return index; } } return -1; }; GridControl.prototype._onToggle = function (rowInfo) { if (this._expandStates) { var state = this._expandStates[rowInfo.dataIndex]; if (state !== 0) { if (state > 0) { this.collapseNode(rowInfo.dataIndex); } else if (state < 0) { this.expandNode(rowInfo.dataIndex); } this._clearSelection(); this._addSelection(Math.min(rowInfo.rowIndex, this._expandedCount - 1), rowInfo.dataIndex, null, true); this._layoutContentSpacer(); this._redraw(); this._notifyForPrerender(); } } }; GridControl.prototype.getExpandStates = function () { return this._expandStates; }; GridControl.TYPE_NAME = "GridControl"; GridControl.MAX_CELL_CONTENT_SIZE = 1000; GridControl.MAX_COPY_SIZE = 1000; GridControl.PAYLOAD_SIZE = 200; GridControl.EVENT_SELECTED_INDEX_CHANGED = "selectedIndexChanged"; GridControl.INDENT_WIDTH = 12; GridControl.GLYPH_WIDTH = 10; return GridControl; })(Common.Controls.Legacy.Control); Grid.GridControl = GridControl; })(Debugger.Grid || (Debugger.Grid = {})); var Grid = Debugger.Grid; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // gridCellEditControl.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; (function (Grid) { var GridCellEditControl = (function () { function GridCellEditControl(dataIndex, columnIndex, editElement, gridControl, options, inputElement) { this._dataIndex = dataIndex; this._columnIndex = columnIndex; this._ignoreCommitCallback = false; this._gridControl = gridControl; this._options = options; this._editElement = editElement; this._textValue = editElement.hasAttribute("grid-edit-value") ? editElement.getAttribute("grid-edit-value") : editElement.innerText; this._cachedInnerHTML = editElement.innerHTML; this._inputElement = inputElement || document.createElement("input"); this._inputElement.value = this._textValue; this._inputElement.classList.add("grid-edit-box"); this._keyboardHandler = this.keyboardHandler.bind(this); this._inputElement.addEventListener("keydown", this._keyboardHandler); this._focusHandler = this.focusHandler.bind(this); this._inputElement.addEventListener("focusout", this._focusHandler); } Object.defineProperty(GridCellEditControl.prototype, "inputElement", { get: function () { return this._inputElement; }, enumerable: true, configurable: true }); GridCellEditControl.prototype.dismiss = function () { this._editElement.innerHTML = this._cachedInnerHTML; this._editElement.focus(); this.notifyPostEdit(); }; GridCellEditControl.prototype.notifyPostEdit = function () { this._inputElement.removeEventListener("keydown", this._keyboardHandler); this._inputElement.removeEventListener("focusout", this._focusHandler); if (this._options.postEditCellCallback !== null) { this._options.postEditCellCallback(this._dataIndex, this._columnIndex); } }; GridCellEditControl.prototype.keyboardHandler = function (e) { var rowInfo = this._gridControl.getRowInfo(this._dataIndex); var columns = this._gridControl.getColumns(); if (e.keyCode === 13 /* Enter */) { this.commitValue(e); e.stopPropagation(); return false; } else if (e.keyCode === 27 /* Escape */) { this.dismiss(); e.stopPropagation(); e.preventDefault(); return false; } else if (e.keyCode === 9 /* Tab */) { if (this._options.commitOnTab) { this.commitValue(e); } else if (rowInfo) { var cells = rowInfo.row.children; this._ignoreCommitCallback = true; this._editElement.innerHTML = this._cachedInnerHTML; this.notifyPostEdit(); var editColumnIndex = this._columnIndex; if (e.shiftKey) { while (editColumnIndex > 0) { editColumnIndex--; var cell = cells[editColumnIndex]; if (cell.classList.contains("grid-cell-editable")) { this._gridControl.createEditBox(this._dataIndex, editColumnIndex, cell); break; } } } else { while (editColumnIndex < columns.length - 1) { editColumnIndex++; var cell = cells[editColumnIndex]; if (cell.classList.contains("grid-cell-editable")) { this._gridControl.createEditBox(this._dataIndex, editColumnIndex, cell); break; } } if (columns.length > 0 && editColumnIndex === columns.length - 1) { cells[0].parentElement.focus(); } } e.stopPropagation(); return false; } } else if (e.keyCode === 38 /* ArrowUp */ || e.keyCode === 40 /* ArrowDown */ || e.keyCode === 33 /* PageUp */ || e.keyCode === 34 /* PageDown */) { return true; } else { e.stopPropagation(); return Common.preventIEKeys(e); } }; GridCellEditControl.prototype.focusHandler = function (e) { this.commitValue(e); }; GridCellEditControl.prototype.commitValue = function (e) { var data = this._inputElement.value; this._editElement.innerText = this._ignoreCommitCallback ? this._textValue : data; if (this._options.commitEditCellCallback && !this._ignoreCommitCallback) { this._options.commitEditCellCallback(data, this._dataIndex, this._columnIndex); } this.notifyPostEdit(); e.stopPropagation(); e.preventDefault(); return false; }; return GridCellEditControl; })(); Grid.GridCellEditControl = GridCellEditControl; })(Debugger.Grid || (Debugger.Grid = {})); var Grid = Debugger.Grid; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // Debugger.templates.ts var ControlTemplates; (function (ControlTemplates) { var Debugger = (function () { function Debugger() { } Debugger.debuggerButtonsPanel = "\
      \
      \
      \
      \
      \
      \
      \
      \
      \
      \
      \
      \
      \ "; Debugger.exceptionMenuDropDown = "\
        \
        \
        \
        \
      \ "; return Debugger; })(); ControlTemplates.Debugger = Debugger; })(ControlTemplates || (ControlTemplates = {})); // commonStructs.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; (function (Tristate) { Tristate[Tristate["On"] = 0] = "On"; Tristate[Tristate["Off"] = 1] = "Off"; Tristate[Tristate["Disabled"] = 2] = "Disabled"; })(Debugger.Tristate || (Debugger.Tristate = {})); var Tristate = Debugger.Tristate; var Source = (function () { function Source(id, parentId, isRootChild, url, mimeType, length, isDynamicCode, headers, longDocumentId, sourceMapUrl, sourceUrlOverride) { this.id = id; this.parentId = parentId; this.isRootChild = isRootChild; this.url = url; this.mimeType = mimeType; this.length = length; this.isDynamicCode = isDynamicCode; this.headers = headers; this.longDocumentId = longDocumentId; this.sourceMapUrl = sourceMapUrl; this.sourceUrlOverride = sourceUrlOverride; } return Source; })(); Debugger.Source = Source; (function (CauseBreakAction) { CauseBreakAction[CauseBreakAction["BreakOnAny"] = 0] = "BreakOnAny"; CauseBreakAction[CauseBreakAction["BreakOnAnyNewWorkerStarting"] = 1] = "BreakOnAnyNewWorkerStarting"; CauseBreakAction[CauseBreakAction["BreakIntoSpecificWorker"] = 2] = "BreakIntoSpecificWorker"; CauseBreakAction[CauseBreakAction["UnsetBreakOnAnyNewWorkerStarting"] = 3] = "UnsetBreakOnAnyNewWorkerStarting"; })(Debugger.CauseBreakAction || (Debugger.CauseBreakAction = {})); var CauseBreakAction = Debugger.CauseBreakAction; (function (BreakResumeAction) { BreakResumeAction[BreakResumeAction["Abort"] = 0] = "Abort"; BreakResumeAction[BreakResumeAction["Continue"] = 1] = "Continue"; BreakResumeAction[BreakResumeAction["StepInto"] = 2] = "StepInto"; BreakResumeAction[BreakResumeAction["StepOver"] = 3] = "StepOver"; BreakResumeAction[BreakResumeAction["StepOut"] = 4] = "StepOut"; BreakResumeAction[BreakResumeAction["Ignore"] = 5] = "Ignore"; BreakResumeAction[BreakResumeAction["StepDocument"] = 6] = "StepDocument"; })(Debugger.BreakResumeAction || (Debugger.BreakResumeAction = {})); var BreakResumeAction = Debugger.BreakResumeAction; (function (BreakpointState) { BreakpointState[BreakpointState["Deleted"] = 0] = "Deleted"; BreakpointState[BreakpointState["Disabled"] = 1] = "Disabled"; BreakpointState[BreakpointState["Enabled"] = 2] = "Enabled"; BreakpointState[BreakpointState["Pending"] = 3] = "Pending"; })(Debugger.BreakpointState || (Debugger.BreakpointState = {})); var BreakpointState = Debugger.BreakpointState; (function (ExceptionFilter) { ExceptionFilter[ExceptionFilter["None"] = 0] = "None"; ExceptionFilter[ExceptionFilter["Unhandled"] = 1] = "Unhandled"; ExceptionFilter[ExceptionFilter["Handled"] = 2] = "Handled"; })(Debugger.ExceptionFilter || (Debugger.ExceptionFilter = {})); var ExceptionFilter = Debugger.ExceptionFilter; (function (BreakReason) { BreakReason[BreakReason["Step"] = 0] = "Step"; BreakReason[BreakReason["Breakpoint"] = 1] = "Breakpoint"; BreakReason[BreakReason["DebuggerBlock"] = 2] = "DebuggerBlock"; BreakReason[BreakReason["HostInitiated"] = 3] = "HostInitiated"; BreakReason[BreakReason["LanguageInitiated"] = 4] = "LanguageInitiated"; BreakReason[BreakReason["DebuggerHalt"] = 5] = "DebuggerHalt"; BreakReason[BreakReason["Error"] = 6] = "Error"; BreakReason[BreakReason["Jit"] = 7] = "Jit"; })(Debugger.BreakReason || (Debugger.BreakReason = {})); var BreakReason = Debugger.BreakReason; (function (ConnectionResult) { ConnectionResult[ConnectionResult["Succeeded"] = 0] = "Succeeded"; ConnectionResult[ConnectionResult["Failed"] = 1] = "Failed"; ConnectionResult[ConnectionResult["FailedAlreadyAttached"] = 2] = "FailedAlreadyAttached"; })(Debugger.ConnectionResult || (Debugger.ConnectionResult = {})); var ConnectionResult = Debugger.ConnectionResult; Debugger.breakpointIdNotFound = "BKP:notfound:"; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // UrlRewriter.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var UrlRewriter = (function () { function UrlRewriter() { } UrlRewriter.rewriteSourceMapUrl = function (url) { return UrlRewriter.rewrite(url, UrlRewriter.SOURCEMAP_REWRITE_REGEX, UrlRewriter.SOURCEMAP_REWRITE_VALUE); }; UrlRewriter.rewriteAuthoredSourceUrl = function (url) { return UrlRewriter.rewrite(url, UrlRewriter.AUTHORED_SOURCE_REWRITE_REGEX, UrlRewriter.AUTHORED_SOURCE_REWRITE_VALUE); }; UrlRewriter.reset = function () { UrlRewriter.Regexes = {}; }; UrlRewriter.rewrite = function (url, regexName, valueName) { if (!url) { return url; } var entry = UrlRewriter.Regexes[regexName]; if (typeof entry === "undefined") { var value = Plugin.F12.getRegEntryForF12(regexName); if (value) { entry = { regex: new RegExp(value, "i"), value: Plugin.F12.getRegEntryForF12(valueName) }; } else { entry = { regex: null, value: null }; } UrlRewriter.Regexes[regexName] = entry; } if (entry && entry.regex) { url = url.replace(entry.regex, entry.value); } return url; }; UrlRewriter.SOURCEMAP_REWRITE_REGEX = "SourceMapRewriteRegex"; UrlRewriter.SOURCEMAP_REWRITE_VALUE = "SourceMapRewriteValue"; UrlRewriter.AUTHORED_SOURCE_REWRITE_REGEX = "AuthoredSourceRewriteRegex"; UrlRewriter.AUTHORED_SOURCE_REWRITE_VALUE = "AuthoredSourceRewriteValue"; UrlRewriter.Regexes = {}; return UrlRewriter; })(); Debugger.UrlRewriter = UrlRewriter; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // tabControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var TabOptions = (function () { function TabOptions() { } TabOptions.SLIDE_TIME_MILLISEC = 100; TabOptions.CLOSE_TIME_MILLISEC = 30; TabOptions.SCROLL_AMOUNT_PIXELS = 50; return TabOptions; })(); Debugger.TabOptions = TabOptions; var TabControl = (function (_super) { __extends(TabControl, _super); function TabControl(root, documentController) { var _this = this; _super.call(this); this._items = []; this._itemsByFrontendId = []; this._selectedItem = null; this.rootElement = root; this._tabOptions = new TabOptions(); if (documentController) { this._tabOptions.onSelectCallback = function (doc, activation) { documentController.openDocument.call(documentController, doc, undefined, activation); }; this._tabOptions.onCloseCallback = function (doc) { documentController.closeDocument.call(documentController, doc, false); }; this._tabOptions.onCloseAllCallback = documentController.closeAllDocuments.bind(documentController); } var html = "
        "; this.rootElement.innerHTML = html; var tabContainer = document.querySelector(".tabBarContainer"); var tabNavigation = document.createElement("div"); tabNavigation.id = "tabNavigation"; tabNavigation.innerHTML = "
        "; tabNavigation.classList.add("tabNavigation"); tabNavigation.classList.add("hiddenButton"); tabContainer.appendChild(tabNavigation); var previousButton = document.getElementById("prevTabButton"); var nextButton = document.getElementById("nextTabButton"); previousButton.addEventListener("click", this.scrollToPreviousTab.bind(this)); nextButton.addEventListener("click", this.scrollToNextTab.bind(this)); previousButton.addEventListener("mousedown", this.startScrollToPrevious.bind(this)); previousButton.addEventListener("mouseup", this.stopScrollToPrevious.bind(this)); nextButton.addEventListener("mousedown", this.startScrollToNext.bind(this)); nextButton.addEventListener("mouseup", this.stopScrollToNext.bind(this)); this._barPanel = new Common.Controls.Legacy.Control(document.querySelector(".tabBar")); this._contentPane = new Common.Controls.Legacy.Control(document.querySelector(".tabContentPane")); window.addEventListener("resize", function (e) { _this.realignControl(false); }); } Object.defineProperty(TabControl.prototype, "tabOptions", { get: function () { return this._tabOptions; }, enumerable: true, configurable: true }); Object.defineProperty(TabControl.prototype, "length", { get: function () { return this._items.length; }, enumerable: true, configurable: true }); Object.defineProperty(TabControl.prototype, "selectedItem", { get: function () { return this._selectedItem; }, enumerable: true, configurable: true }); TabControl.prototype.documentAdded = function (doc, isRuntime) { }; TabControl.prototype.documentRemoved = function (doc) { }; TabControl.prototype.documentClosed = function (doc, isRuntimeTriggered) { this.removeTab(this._itemsByFrontendId[doc.frontendId], isRuntimeTriggered); }; TabControl.prototype.documentOpened = function (doc, activation, location) { var tabItem = this._itemsByFrontendId[doc.frontendId]; if (!tabItem) { var tabItem = this._itemsByFrontendId[doc.frontendId] = new Debugger.TabItem(doc, true); this._items.push(tabItem); tabItem.title = doc.url; tabItem.tooltipString = doc.url; this.addTabElement(tabItem, activation !== 0 /* BackgroundOpen */); } if (activation !== 0 /* BackgroundOpen */) { this.setSelectedItem(tabItem, activation === 2 /* SwitchWithFocus */); } return Plugin.Promise.wrap(null); }; TabControl.prototype.documentUpdated = function (doc, hasMimeTypeChanged) { }; TabControl.prototype.documentUrlChanged = function (doc) { var tabItem = this._itemsByFrontendId[doc.frontendId]; if (tabItem) { tabItem.title = doc.url; tabItem.tooltipString = doc.url; } }; TabControl.prototype.documentAsLibraryStateChanged = function (doc) { }; TabControl.prototype.doLayout = function () { this.realignControl(false); }; TabControl.prototype.realignControl = function (withAnimation) { this.performOverflowCheck(); this.realignTabs(withAnimation); if (this.selectedItem) { this.setTabViewable(this.selectedItem, withAnimation); } }; TabControl.prototype.removeTab = function (tabItem, fastClose) { var _this = this; var nextItem = null; var indexOfItem = this._items.indexOf(tabItem); if (indexOfItem < 0) { return Plugin.Promise.wrap(null); } if (this.selectedItem === tabItem) { if (indexOfItem < this._items.length - 1) { nextItem = this._items[indexOfItem + 1]; } else if (indexOfItem > 0) { nextItem = this._items[indexOfItem - 1]; } this.setSelectedItem(null); } if (tabItem.contextMenu) { tabItem.contextMenu.dispose(); } this._items.splice(indexOfItem, 1); var doc = tabItem.doc; Tools.Utility.Assert.hasValue(this._itemsByFrontendId[doc.frontendId]); this._itemsByFrontendId[doc.frontendId] = null; return new Plugin.Promise(function (completed, error) { if (fastClose) { _this.deleteTabItemElement(tabItem); _this.realignControl(false); completed(); } else { var step = tabItem.header.rootElement.clientWidth / TabOptions.CLOSE_TIME_MILLISEC; _this.shrinkAndRemove(tabItem).then(function () { completed(); }); } }); }; TabControl.prototype.closeAllTabs = function () { if (this._tabOptions && this._tabOptions.onCloseAllCallback) { return this._tabOptions.onCloseAllCallback(false, null); } return Plugin.Promise.wrap(null); }; TabControl.prototype.closeAllTabsButThis = function (tabItem) { if (this._tabOptions && this._tabOptions.onCloseAllCallback) { return this._tabOptions.onCloseAllCallback(false, tabItem.doc); } return Plugin.Promise.wrap(null); }; TabControl.prototype.containsTab = function (tabItem) { return this._items.indexOf(tabItem) >= 0; }; TabControl.prototype.getTabByIndex = function (index) { if (index < this._items.length) { return this._items[index]; } }; TabControl.prototype.setSelectedItem = function (tabItem, focus) { if (typeof focus === "undefined") { focus = true; } if (this._selectedItem !== tabItem) { if (!this.containsTab(tabItem)) { this._selectedItem = null; return; } if (this._selectedItem) { this._selectedItem.active = false; this._selectedItem.header.rootElement.setAttribute("tabindex", "-1"); } this._selectedItem = tabItem; if (this._selectedItem) { this._selectedItem.active = true; this._selectedItem.header.rootElement.setAttribute("tabindex", "1"); if (focus) { this._selectedItem.focus(); } this._barPanel.rootElement.scrollLeft = 0; } this.setTabViewable(tabItem, true); } else if (tabItem && this.containsTab(tabItem)) { this.setTabViewable(tabItem, false); } }; TabControl.prototype.callCloseCallback = function (tabItem) { if (this._tabOptions && this._tabOptions.onCloseCallback) { this._tabOptions.onCloseCallback(tabItem.doc); } }; TabControl.prototype.callSelectCallback = function (tabItem, activation) { if (this._tabOptions && this._tabOptions.onSelectCallback) { this._tabOptions.onSelectCallback(tabItem.doc, activation); } }; TabControl.prototype.insertBefore = function (tabItem, before) { if (!tabItem.equals(before)) { this._barPanel.rootElement.removeChild(tabItem.header.rootElement); this._barPanel.rootElement.insertBefore(tabItem.header.rootElement, before.header.rootElement); } }; TabControl.prototype.insertAfter = function (insert, after) { if (!insert.equals(after)) { this._barPanel.rootElement.removeChild(insert.header.rootElement); after.header.rootElement.insertAdjacentElement("afterEnd", insert.header.rootElement); } }; TabControl.prototype.selectNextTab = function () { var index = this._items.indexOf(this.selectedItem); if (index >= 0) { index += 1; var selectedItem = index >= this._items.length ? this._items[0] : this._items[index]; this.setSelectedItem(selectedItem); this.callSelectCallback(selectedItem, 1 /* SwitchWithoutFocus */); } }; TabControl.prototype.selectPreviousTab = function () { var index = this._items.indexOf(this.selectedItem); if (index >= 0) { index -= 1; var selectedItem = index < 0 ? this._items[this._items.length - 1] : this._items[index]; this.setSelectedItem(selectedItem); this.callSelectCallback(selectedItem, 1 /* SwitchWithoutFocus */); } }; TabControl.prototype.trySelectTabByNumber = function (tabNumber) { var tabItem = this.getTabByIndex(tabNumber - 1); if (tabItem) { this.setSelectedItem(tabItem); this.callSelectCallback(tabItem, 1 /* SwitchWithoutFocus */); } }; TabControl.prototype.showContextMenu = function (tabItem, e) { if (tabItem.contextMenu) { tabItem.contextMenu.dispose(); tabItem.contextMenu = null; } tabItem.contextMenu = Plugin.ContextMenu.create(this.createMenuItems(tabItem), TabControl.CONTEXT_MENU_ID + tabItem.doc.frontendId); var x = 0; var y = 0; if (e instanceof MouseEvent) { x = e.pageX; y = e.pageY; } if (x <= 0 && y <= 0) { var offset = tabItem.rootElement.getBoundingClientRect(); x = offset.left; y = offset.top; } tabItem.contextMenu.show(x, y); }; TabControl.prototype.createMenuItems = function (tabItem) { var _this = this; var menuItems = []; menuItems.push({ id: "menuItemCloseTabControl" + tabItem.doc.frontendId, callback: function (menuId, menuItem, targetId) { _this.callCloseCallback(tabItem); }, label: Plugin.Resources.getString("TabContextMenuCloseTab"), type: 1 /* command */, accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlF4") }); menuItems.push({ id: "menuItemCloseAllTabControl" + tabItem.doc.frontendId, callback: function (menuId, menuItem, targetId) { _this.closeAllTabs(); }, label: Plugin.Resources.getString("TabContextMenuCloseAllTabs"), type: 1 /* command */ }); menuItems.push({ id: "menuItemCloseOthersTabControl" + tabItem.doc.frontendId, callback: function (menuId, menuItem, targetId) { _this.closeAllTabsButThis(tabItem); }, label: Plugin.Resources.getString("TabContextMenuCloseOtherTabs"), type: 1 /* command */, disabled: function () { return (_this._items.length <= 1); } }); menuItems.push({ id: "menuItemSep1TabControl", type: 3 /* separator */ }); menuItems.push({ id: "menuItemCopyUrlTabControl" + tabItem.doc.frontendId, callback: function (menuId, menuItem, targetId) { clipboardData.setData("Url", tabItem.tooltipString); }, label: Plugin.Resources.getString("ContextMenuCopyURL"), type: 1 /* command */ }); menuItems.push({ id: "menuItemSep2TabControl", type: 3 /* separator */ }); menuItems.push({ id: "menuItemMarkAsLibraryTabControl" + tabItem.doc.frontendId, callback: function (menuId, menuItem, targetId) { tabItem.doc.setIsLibraryFile(!tabItem.doc.isLibraryFile); }, label: Plugin.Resources.getString("TabContextMenuMarkAsLibraryCode"), type: 0 /* checkbox */, checked: function () { return tabItem.doc.isLibraryFile; }, disabled: function () { return !tabItem.doc.isRuntimeDoc || tabItem.doc.isDynamicCode; } }); menuItems.push({ id: "menuItemSep3TabControl", type: 3 /* separator */ }); menuItems.push({ id: "menuItemAddSourceMapTabControl" + tabItem.doc.frontendId, callback: function (menuId, menuItem, targetId) { tabItem.doc.loadSourceMapFromFileSystem(); }, label: Plugin.Resources.getString("TabContextMenuAddSourceMap"), type: 1 /* command */, disabled: function () { return tabItem.doc.isAuthored || tabItem.doc.isDynamicCode || !tabItem.doc.isRuntimeDoc; } }); return menuItems; }; TabControl.prototype.addTabElement = function (tabItem, withAnimation) { tabItem.ownerTabControl = this; this._barPanel.appendChild(tabItem.header); this._contentPane.appendChild(tabItem); this.makeDescendantsUnselectable(tabItem.header.rootElement); this.realignControl(withAnimation); }; TabControl.prototype.startScrollToPrevious = function (e) { var _this = this; e.target.setCapture(); this.clearAllScrollIntervals(); this._scrollPreviousIntervalId = setInterval(function () { _this.moveTabsByOffset(TabOptions.SCROLL_AMOUNT_PIXELS); }, TabOptions.SLIDE_TIME_MILLISEC * 2); e.stopImmediatePropagation(); return false; }; TabControl.prototype.stopScrollToPrevious = function (e) { e.target.releaseCapture(); this.clearAllScrollIntervals(); e.stopImmediatePropagation(); return false; }; TabControl.prototype.startScrollToNext = function (e) { var _this = this; e.target.setCapture(); this.clearAllScrollIntervals(); this._scrollNextIntervalId = setInterval(function () { _this.moveTabsByOffset(-TabOptions.SCROLL_AMOUNT_PIXELS); }, TabOptions.SLIDE_TIME_MILLISEC * 2); e.stopImmediatePropagation(); return false; }; TabControl.prototype.stopScrollToNext = function (e) { e.target.releaseCapture(); this.clearAllScrollIntervals(); e.stopImmediatePropagation(); return false; }; TabControl.prototype.moveTabsByOffset = function (numPixels) { var tabBar = this._barPanel.rootElement; var tabs = tabBar.children; var firstTab = tabs[0]; var lastTab = tabs[tabs.length - 1]; var leftEndOfFirstTab = firstTab.offsetLeft; var rightEndOfLastTab = lastTab.offsetLeft + lastTab.offsetWidth; var leftEndofTabBar = 0; var rightEndofTabBar = tabBar.offsetLeft + tabBar.offsetWidth; var tabsOverflowedOnLeft = leftEndOfFirstTab < leftEndofTabBar; var tabsOverflowedOnRight = rightEndOfLastTab > rightEndofTabBar; if (numPixels > 0 && tabsOverflowedOnLeft) { numPixels = Math.min(leftEndofTabBar - leftEndOfFirstTab, numPixels); } else if (numPixels < 0 && tabsOverflowedOnRight) { numPixels = Math.max(rightEndofTabBar - rightEndOfLastTab, numPixels); } if ((numPixels < 0 && tabsOverflowedOnRight) || (numPixels > 0 && tabsOverflowedOnLeft)) { for (var index = 0; index < tabs.length; index++) { var tabItem = tabs[index]; tabItem.style.transitionDuration = TabOptions.SLIDE_TIME_MILLISEC / (tabs.length * 1000) + "s"; tabItem.style.left = (this.getLeftPos(tabs[index]) + numPixels) + "px"; } } }; TabControl.prototype.scrollToNextTab = function (e) { var tabBar = this._barPanel.rootElement; var posBarRight = tabBar.offsetLeft + tabBar.offsetWidth; var tabs = tabBar.children; var offset; for (var index = 0; index < tabs.length; index++) { var tab = tabs[index]; var offset = posBarRight - (tab.offsetLeft + tab.offsetWidth); if (offset < 0) { this.moveTabsToNewPosition(tabs, this.getLeftPos(tab) + offset, true); break; } } e.stopPropagation(); e.preventDefault(); return false; }; TabControl.prototype.scrollToPreviousTab = function (e) { var tabBar = this._barPanel.rootElement; var posBarLeft = tabBar.offsetLeft; var tabs = tabBar.children; var offset; for (var index = tabs.length - 1; index >= 0; index--) { var tab = tabs[index]; if (posBarLeft > tab.offsetLeft) { this.moveTabsToNewPosition(tabs, this.getLeftPos(tab) + (posBarLeft - tab.offsetLeft), true); break; } } e.stopPropagation(); e.preventDefault(); return false; }; TabControl.prototype.performOverflowCheck = function () { var tabBar = this._barPanel.rootElement; var controlWidth = 0; var tabs = tabBar.children; for (var index = 0; index < tabs.length; index++) { controlWidth += tabs[index].clientWidth; } var tabNav = document.getElementById("tabNavigation"); (controlWidth > tabBar.clientWidth) ? tabNav.classList.remove("hiddenButton") : tabNav.classList.add("hiddenButton"); }; TabControl.prototype.getLeftPos = function (element) { var leftPos = parseInt(element.style.left, 10); if (String(leftPos) === "NaN") { return 0; } return leftPos; }; TabControl.prototype.setTabViewable = function (tabItem, withAnimation) { var rootElement = tabItem.header.rootElement; if (rootElement.offsetWidth > rootElement.parentElement.offsetWidth) { return; } var posTabLeft = rootElement.offsetLeft; var posTabRight = posTabLeft + rootElement.offsetWidth; var posParentLeft = rootElement.parentElement.offsetLeft; var posParentRight = posParentLeft + rootElement.parentElement.offsetWidth; var offset; if (posTabLeft < posParentLeft) { offset = posParentLeft - posTabLeft; } else if (posTabRight > posParentRight) { offset = posParentRight - posTabRight; } if (offset !== null) { this.moveTabsToNewPosition(rootElement.parentElement.children, this.getLeftPos(rootElement) + offset, withAnimation); } }; TabControl.prototype.moveTabsToNewPosition = function (tabs, newPosition, withAnimation) { for (var index = 0; index < tabs.length; index++) { var tabItem = tabs[index]; tabItem.style.transitionDuration = withAnimation ? String(TabOptions.SLIDE_TIME_MILLISEC / (tabs.length * 1000)) + "s" : "0s"; tabItem.style.left = newPosition + "px"; } }; TabControl.prototype.shrinkAndRemove = function (tabItem) { var _this = this; return new Plugin.Promise(function (completed, error) { var htmlElement = tabItem.header.rootElement; htmlElement.style.transitionDuration = String(TabOptions.SLIDE_TIME_MILLISEC / 1000) + "s"; var onTransitionEnd = function () { _this.deleteTabItemElement(tabItem); _this.realignControl(true); htmlElement.removeEventListener("transitionend", onTransitionEnd); completed(); }; htmlElement.addEventListener("transitionend", onTransitionEnd); htmlElement.style.minWidth = "0"; htmlElement.style.width = "0"; }); }; TabControl.prototype.deleteTabItemElement = function (tabItem) { this._barPanel.removeChild(tabItem.header); this._contentPane.removeChild(tabItem); tabItem.ownerTabControl = null; }; TabControl.prototype.clearAllScrollIntervals = function () { clearInterval(this._scrollPreviousIntervalId); clearInterval(this._scrollNextIntervalId); }; TabControl.prototype.realignTabs = function (withAnimation) { var tabBar = this._barPanel.rootElement; var tabs = tabBar.children; if (tabs.length > 0) { var newPosition; if (tabs.length === 1) { newPosition = tabBar.offsetLeft; } else { var marginRight = (tabBar.offsetLeft + tabBar.offsetWidth) - (tabs[tabs.length - 1].offsetLeft + tabs[tabs.length - 1].offsetWidth); var marginLeft = tabBar.offsetLeft - tabs[0].offsetLeft; if (marginRight > 0 && marginLeft > 0) { newPosition = this.getLeftPos(tabs[0]) + Math.min(marginLeft, marginRight); } } this.moveTabsToNewPosition(tabs, newPosition, withAnimation); } }; TabControl.prototype.makeDescendantsUnselectable = function (element) { var elements = element.querySelectorAll("*"); for (var i = 0; i < elements.length; i++) { elements[i].setAttribute("unselectable", "on"); } }; TabControl.CONTEXT_MENU_ID = "TabControlContextMenu"; return TabControl; })(Common.Controls.Legacy.TemplateControl); Debugger.TabControl = TabControl; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // tabItem.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var TabItem = (function (_super) { __extends(TabItem, _super); function TabItem(doc, hasCloseButton) { var _this = this; _super.call(this); this.doc = doc; this.header = new Common.Controls.Legacy.Control(document.createElement("li")); this.header.rootElement.setAttribute("id", TabItem.HTML_ID_PREFIX + doc.frontendId); this.header.rootElement.setAttribute("tabindex", "-1"); this.header.rootElement.setAttribute("role", "tab"); this.header.rootElement.addEventListener("mouseup", this.onMouseUp.bind(this)); this.header.rootElement.addEventListener("click", this.onHeaderClicked.bind(this)); this.header.rootElement.addEventListener("keydown", this.onKeyDown.bind(this)); this.header.rootElement.addEventListener("transitionend", function (e) { return _this.header.rootElement.style.transitionDuration = "0s"; }); this.header.rootElement.addEventListener("DOMAttrModified", function (e) { if (e.attrName === "aria-selected" && e.attrChange === e.MODIFICATION && e.newValue === "true" && !_this.active) { _this.onHeaderClicked(); } }); this.rootElement.className = "tabItemContent"; var tabItemContent = document.createElement("div"); tabItemContent.className = "tabContent"; this.header.rootElement.appendChild(tabItemContent); var titleElement = document.createElement("div"); titleElement.className = "tabTitle"; tabItemContent.appendChild(titleElement); this.header.rootElement.draggable = true; this.header.rootElement.addEventListener("dragstart", function (ev) { if (_this.ownerTabControl) { _this.ownerTabControl.dragTarget = _this; } ev.stopImmediatePropagation(); return false; }); this.header.rootElement.addEventListener("dragend", function (ev) { if (_this.ownerTabControl) { _this.ownerTabControl.dragTarget = null; } }); this.header.rootElement.addEventListener("dragover", function (ev) { ev.preventDefault(); }); this.header.rootElement.addEventListener("dragenter", function (ev) { ev.preventDefault(); }); this.header.rootElement.addEventListener("drop", function (ev) { if (_this.ownerTabControl && _this.ownerTabControl.dragTarget) { var mid = _this.header.rootElement.offsetLeft + _this.header.rootElement.offsetWidth / 2; if (ev.pageX >= mid) { _this.ownerTabControl.insertAfter(_this.ownerTabControl.dragTarget, _this); } else { _this.ownerTabControl.insertBefore(_this.ownerTabControl.dragTarget, _this); } _this.ownerTabControl.dragTarget = null; } }); this.header.rootElement.addEventListener("contextmenu", function (ev) { if (_this.ownerTabControl) { _this.ownerTabControl.showContextMenu(_this, ev); } }); if (hasCloseButton) { var closeButton = document.createElement("div"); closeButton.className = "closeButton"; closeButton.setAttribute("role", "button"); closeButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("CloseTabTooltip")); closeButton.setAttribute("aria-label", Plugin.Resources.getString("CloseTabTooltip")); closeButton.addEventListener("click", this.onCloseButtonClicked.bind(this)); tabItemContent.appendChild(closeButton); } } Object.defineProperty(TabItem.prototype, "active", { get: function () { return this._active; }, set: function (v) { if (this._active !== v) { this._active = v; this.header.rootElement.classList.toggle("active"); this.rootElement.classList.toggle("active"); this.header.rootElement.setAttribute("aria-selected", v + ""); this.onActiveChanged(); } }, enumerable: true, configurable: true }); Object.defineProperty(TabItem.prototype, "title", { get: function () { return this.header.rootElement.getElementsByClassName("tabTitle")[0].innerText; }, set: function (v) { v = v ? v : ""; v = Common.ToolWindowHelpers.getTruncatedFileName(v); this.header.rootElement.getElementsByClassName("tabTitle")[0].innerText = v; }, enumerable: true, configurable: true }); Object.defineProperty(TabItem.prototype, "tooltipString", { get: function () { return this.header.rootElement.getAttribute("data-plugin-vs-tooltip"); }, set: function (v) { this.header.rootElement.setAttribute("data-plugin-vs-tooltip", v); this.header.rootElement.setAttribute("aria-label", v); }, enumerable: true, configurable: true }); TabItem.getTabIdFromHtmlId = function (htmlId) { return htmlId.substr(TabItem.HTML_ID_PREFIX.length); }; TabItem.prototype.focus = function () { this.header.rootElement.focus(); }; TabItem.prototype.equals = function (tab) { return this.header.rootElement === tab.header.rootElement; }; TabItem.prototype.onHeaderClicked = function (e) { if (e === undefined || e.button === 0 /* LeftButton */) { if (this.ownerTabControl) { this.ownerTabControl.callSelectCallback(this, 2 /* SwitchWithFocus */); } } return true; }; TabItem.prototype.onActiveChanged = function () { }; TabItem.prototype.onMouseUp = function (e) { if (e.button === 1 /* MiddleButton */) { if (this.ownerTabControl) { this.ownerTabControl.callCloseCallback(this); } } return true; }; TabItem.prototype.onCloseButtonClicked = function (e) { var targetElement = e.target; if (e.button === 0 /* LeftButton */ && targetElement.classList.contains("closeButton") && this.ownerTabControl) { this.ownerTabControl.callCloseCallback(this); e.preventDefault(); e.stopImmediatePropagation(); } return true; }; TabItem.prototype.onKeyDown = function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { this.onHeaderClicked(); } else if (!e.ctrlKey && !e.shiftKey && !e.altKey && e.keyCode === 37 /* ArrowLeft */) { this.ownerTabControl.selectPreviousTab(); } else if (!e.ctrlKey && !e.shiftKey && !e.altKey && e.keyCode === 39 /* ArrowRight */) { this.ownerTabControl.selectNextTab(); } else if (e.keyCode === 121 /* F10 */ && e.shiftKey && !e.ctrlKey && !e.altKey) { this.ownerTabControl.showContextMenu(this, e); } return true; }; TabItem.HTML_ID_PREFIX = "TabItem:"; return TabItem; })(Common.Controls.Legacy.ContentControl); Debugger.TabItem = TabItem; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // asyncStackProvider.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var AsyncStackProvider = (function () { function AsyncStackProvider(debuggerManager) { this._debuggerManager = debuggerManager; this._retrievals = []; this.asyncFramesAvailable = false; this.ensureEtwCollectorCreated(); var external = window.external; if (external && external.addEventListener) { external.addEventListener("closing", this.stopCollection.bind(this)); } } Object.defineProperty(AsyncStackProvider.prototype, "etwDataSession", { get: function () { return this._etwDataSession; }, enumerable: true, configurable: true }); AsyncStackProvider.prototype.startSession = function () { var _this = this; this.ensureEtwCollectorCreated(); if (this._etwDataCollector) { this._etwDataCollector.startSession("JavaScriptCollectionAgent.dll", "{84393408-B6CD-40F9-BF81-5906D048B16A}").done(function (session) { _this.stopSession(); _this._etwDataSession = session; }, function (e) { _this.stopCollection(); }); } }; AsyncStackProvider.prototype.stopSession = function () { this.cancelPendingRetrievals(); if (this._etwDataSession) { var dataSession = this._etwDataSession; this._etwDataSession = null; return dataSession.stop(); } return Plugin.Promise.wrap(null); }; AsyncStackProvider.prototype.stopCollection = function () { var _this = this; this.stopSession().done(function () { if (_this._etwDataCollector) { _this._etwDataCollector.stopCollection(); _this._etwDataCollector = null; } }); }; AsyncStackProvider.prototype.cancelPendingRetrievals = function () { this.asyncFramesAvailable = false; for (var i in this._retrievals) { this._retrievals[i].cancelRetrieval(); } }; AsyncStackProvider.prototype.getAsyncFrames = function (threadId) { var _this = this; this.cancelPendingRetrievals(); var retrieval = new AsyncStackRetrieval(this); this._retrievals.push(retrieval); if (!this._etwDataSession) { this.finalizeRetrieval(retrieval); return Plugin.Promise.wrap([]); } return new Plugin.Promise(function (completed, error, progress) { return retrieval.queryForAsyncFrames(threadId).done(function (points) { var frames = _this.pointsToFrames(points); _this.finalizeRetrieval(retrieval); completed(frames); }, function (err) { if (err instanceof QueryError) { _this.stopCollection(); } _this.finalizeRetrieval(retrieval); error(); }, function (points) { var frames = _this.pointsToFrames(points); progress(frames); }); }); }; AsyncStackProvider.prototype.pointsToFrames = function (points) { var frames = []; for (var i = 0; i < points.length; i++) { var frame = JSON.parse(points[i].customData); frame.docId = this._debuggerManager.documentController.getRuntimeIdFromLongId(frame.docId); frames.push(frame); } return frames; }; AsyncStackProvider.prototype.ensureEtwCollectorCreated = function () { var external = window.external; if (external && external.etwDataCollector) { this._etwDataCollector = new Common.Data.F12EtwDataCollector(external.etwDataCollector); } }; AsyncStackProvider.prototype.finalizeRetrieval = function (retrieval) { this.asyncFramesAvailable = true; this._retrievals.splice(this._retrievals.indexOf(retrieval), 1); }; return AsyncStackProvider; })(); Debugger.AsyncStackProvider = AsyncStackProvider; var TimeoutError = (function () { function TimeoutError() { this.name = "TimeoutError"; this.message = "Query stopped due to timeout or cancellation. If any frames were returned via 'progress' those are the most up-to-date."; } return TimeoutError; })(); var QueryError = (function () { function QueryError() { this.name = "QueryError"; this.message = "Query failed due to a native error. The ETWCollector should be shut down."; } return QueryError; })(); var AsyncStackRetrieval = (function () { function AsyncStackRetrieval(provider) { this._provider = provider; this._queryCount = 0; this._cancelRequest = false; this._etwKey = AsyncStackRetrieval.ETW_KEY_COUNTER++; Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(386 /* Debugger_AsyncStackProvider_GetFrames_Start */, this._etwKey); } AsyncStackRetrieval.makeEtwParams = function (threadId) { var params = { threadId: "" + threadId, processId: "" + Plugin.F12.getRemoteProcessId() }; return JSON.stringify(params); }; AsyncStackRetrieval.prototype.cancelRetrieval = function () { this._cancelRequest = true; }; AsyncStackRetrieval.prototype.queryForAsyncFrames = function (threadId) { var _this = this; return new Plugin.Promise(function (completed, error, progress) { if (!_this._provider || !_this._provider.etwDataSession) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(387 /* Debugger_AsyncStackProvider_GetFrames_Stop */, _this._etwKey); error(new TimeoutError()); return; } var etwParams = AsyncStackRetrieval.makeEtwParams(threadId); _this._provider.etwDataSession.getGraphDataUpdate(etwParams).done(function (result) { if (_this._queryCount === 0) { _this._originalSet = result; progress(result); } if (_this._cancelRequest) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(387 /* Debugger_AsyncStackProvider_GetFrames_Stop */, _this._etwKey); error(new TimeoutError()); return; } if (result.length > 0 && !_this.resultsMatch(_this._originalSet, result)) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(387 /* Debugger_AsyncStackProvider_GetFrames_Stop */, _this._etwKey); completed(result); return; } _this._queryCount++; if (_this._queryCount < AsyncStackRetrieval.QUERY_COUNT) { setTimeout(function () { _this.queryForAsyncFrames(threadId).then(function (result) { completed(result); }, function (err) { error(err); }); }, AsyncStackRetrieval.QUERY_TIMEOUT); } else { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(388 /* Debugger_AsyncStackProvider_GetFrames_Timeout */, _this._etwKey); error(new TimeoutError()); } }, function (e) { error(new QueryError()); }); }); }; AsyncStackRetrieval.prototype.resultsMatch = function (a, b) { if (!a || !b || a.length !== b.length) { return false; } for (var i = 0; i < a.length; i++) { if (a[i].customData !== b[i].customData || a[i].toolTip !== b[i].toolTip || a[i].timestamp !== b[i].timestamp || a[i].value !== b[i].value) { return false; } } return true; }; AsyncStackRetrieval.QUERY_TIMEOUT = 100; AsyncStackRetrieval.QUERY_COUNT = 30; AsyncStackRetrieval.ETW_KEY_COUNTER = 0; return AsyncStackRetrieval; })(); Debugger.AsyncStackRetrieval = AsyncStackRetrieval; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // stackFrame.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var StackFrame = (function () { function StackFrame(frameId, functionName, rawLocation, location) { this._frameId = frameId; this._functionName = functionName; this._rawLocation = rawLocation; this.numChildren = 0; this.isLibraryMarkerFrame = false; this.isActiveFrame = false; this.isInstructionPointerFrame = false; if (location && location.rawLocation && location.rawLocation.doc) { this._location = new Debugger.DynamicLocation(location.rawLocation, location); } else { this._location = new Debugger.DynamicLocation({ doc: null, offset: 0, length: 0 }); } } Object.defineProperty(StackFrame.prototype, "frameId", { get: function () { return this._frameId; }, enumerable: true, configurable: true }); Object.defineProperty(StackFrame.prototype, "functionName", { get: function () { return this._functionName; }, enumerable: true, configurable: true }); Object.defineProperty(StackFrame.prototype, "rawLocation", { get: function () { return this._rawLocation; }, enumerable: true, configurable: true }); Object.defineProperty(StackFrame.prototype, "location", { get: function () { return this._location; }, set: function (value) { if (this._location) { this._location.cleanup(); } this._location = value; }, enumerable: true, configurable: true }); Object.defineProperty(StackFrame.prototype, "locationString", { get: function () { if (this._location.startPosition && this._location.startPosition.doc) { return this.shortFileName + " (" + this._location.startLineNumber + ", " + this._location.startColumn + ")"; } else if (this.isLibraryMarkerFrame || this instanceof Debugger.CallstackGroup) { return ""; } else { return Plugin.Resources.getString("CallstackUnknownSourceLocation"); } }, enumerable: true, configurable: true }); Object.defineProperty(StackFrame.prototype, "shortFileName", { get: function () { if (this._location.startPosition && this._location.startPosition.doc) { return Common.ToolWindowHelpers.createShortenedUrlText(this._location.startPosition.doc.url); } else { return ""; } }, enumerable: true, configurable: true }); StackFrame.prototype.getCopyText = function () { var text; if (this._location.startPosition && this._location.startPosition.doc) { text = this._functionName + " [" + Plugin.Resources.getString("CallStackLineColumn", this._location.lineNumber, this._location.column) + "], " + this.shortFileName; } else if (this.isLibraryMarkerFrame) { text = this._functionName; } else if (this instanceof Debugger.CallstackGroup) { text = ""; } else { text = this._functionName; } return text; }; StackFrame.prototype.cleanup = function () { if (this._location) { this._location.cleanup(); } }; return StackFrame; })(); Debugger.StackFrame = StackFrame; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // callstackGroup.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var CallstackGroup = (function (_super) { __extends(CallstackGroup, _super); function CallstackGroup(id, name, location, numChildren, isWorker) { _super.call(this, "", null, null, location); this._id = id; this._name = name; this.numChildren = numChildren; this._isWorker = isWorker; this.waitToBreak = false; } Object.defineProperty(CallstackGroup.prototype, "isWorker", { get: function () { return this._isWorker; }, enumerable: true, configurable: true }); Object.defineProperty(CallstackGroup.prototype, "workerId", { get: function () { return this._id; }, enumerable: true, configurable: true }); Object.defineProperty(CallstackGroup.prototype, "functionName", { get: function () { return this._name || ""; }, enumerable: true, configurable: true }); return CallstackGroup; })(Debugger.StackFrame); Debugger.CallstackGroup = CallstackGroup; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // callstack.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var Callstack = (function () { function Callstack(id, name, isWorker) { this._id = id; this._name = name; this._isWorker = isWorker; this._waitToBreak = false; this._rawFrames = []; this._groupedCallstack = []; this._callstackGroup = new Debugger.CallstackGroup(this._id, this._name, null, 0, this._isWorker); } Object.defineProperty(Callstack.prototype, "id", { get: function () { return this._id; }, enumerable: true, configurable: true }); Object.defineProperty(Callstack.prototype, "name", { get: function () { return this._name; }, enumerable: true, configurable: true }); Object.defineProperty(Callstack.prototype, "isWorker", { get: function () { return this._isWorker; }, enumerable: true, configurable: true }); Object.defineProperty(Callstack.prototype, "waitToBreak", { get: function () { return this._waitToBreak; }, set: function (value) { this._waitToBreak = value; this._callstackGroup.waitToBreak = value; }, enumerable: true, configurable: true }); Object.defineProperty(Callstack.prototype, "rawFrames", { get: function () { return this._rawFrames; }, enumerable: true, configurable: true }); Object.defineProperty(Callstack.prototype, "instructionPointerFrame", { get: function () { if (this._rawFrames.length > 0) { return this._rawFrames[this._rawFrames.length - 1]; } return null; }, enumerable: true, configurable: true }); Callstack.prototype.clear = function () { for (var i = 0; i < this._rawFrames.length; i++) { this._rawFrames[i].cleanup(); } this._rawFrames.splice(0, this._rawFrames.length); this._groupedCallstack.splice(0, this._groupedCallstack.length); }; Callstack.prototype.push = function (frame) { this._rawFrames.splice(0, 0, frame); }; Callstack.prototype.pop = function () { if (this._rawFrames.length > 0) { var poppedFrame = this._rawFrames.splice(0, 1)[0]; return poppedFrame; } else { return null; } }; Callstack.prototype.getGroupedCallstack = function () { this._groupedCallstack.splice(0, this._groupedCallstack.length); var passedFrames = 0; for (var i = 0; i < this._rawFrames.length; i++) { var frame = this._rawFrames[i]; if (frame.isAsyncTransition) { var group = new Debugger.CallstackGroup(-1, Plugin.Resources.getString("CallstackAsyncTransitionLabel"), null, passedFrames, false); group.isAsync = true; group.isAsyncTransition = true; this._groupedCallstack.push(group); passedFrames = 0; } else { this._groupedCallstack.push(frame); passedFrames++; } } this._callstackGroup.numChildren = passedFrames; this._groupedCallstack.push(this._callstackGroup); return this._groupedCallstack.reverse(); }; Callstack.prototype.clearAsyncFrames = function () { this._rawFrames = this._rawFrames.filter(function (value) { return !value.isAsync; }); }; return Callstack; })(); Debugger.Callstack = Callstack; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // callstackController.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var CallstackController = (function () { function CallstackController(debuggerManager) { this._debuggerManager = debuggerManager; this._callstacks = []; this._listeners = []; } Object.defineProperty(CallstackController.prototype, "callstacks", { get: function () { return this._callstacks; }, enumerable: true, configurable: true }); Object.defineProperty(CallstackController.prototype, "activeFrame", { get: function () { return this._activeFrame; }, enumerable: true, configurable: true }); Object.defineProperty(CallstackController.prototype, "instructionPointerFrame", { get: function () { return this._instructionPointerFrame; }, enumerable: true, configurable: true }); Object.defineProperty(CallstackController.prototype, "debuggerManager", { get: function () { return this._debuggerManager; }, enumerable: true, configurable: true }); CallstackController.prototype.getCallstack = function (id) { for (var i = 0; i < this._callstacks.length; i++) { if (this._callstacks[i].id === id) { return this._callstacks[i]; } } return null; }; CallstackController.prototype.addAsyncFrames = function (frames, threadId) { var stack = this.getCallstack(threadId); if (stack) { stack.clearAsyncFrames(); for (var i = 0; i < frames.length; i++) { var sourceLocation = { docId: frames[i].docId, start: frames[i].offset, length: frames[i].length }; var doc = this._debuggerManager.documentController.getDocFromRuntimeId(sourceLocation.docId); var docLocation = doc && doc.createDocumentLocation(frames[i].offset, frames[i].length); var newFrame = new Debugger.StackFrame("", frames[i].name, sourceLocation, docLocation); newFrame.isAsync = true; if (newFrame.functionName === "[Async Call]") { newFrame.isAsyncTransition = true; } stack.push(newFrame); } for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].callstacksChanged(); } } }; CallstackController.prototype.clear = function () { this._activeFrame = null; this._listeners.forEach(function (listener) { listener.activeFrameChanged(); }); Plugin.F12.Debugger.notifyOnActiveStackFrameChanged(); this._callstacks.forEach(function (callstack) { callstack.clear(); }); for (var i = 0; i < this._callstacks.length; i++) { if (!this._callstacks[i].isWorker) { this._callstacks.splice(i, 1); break; } } this._listeners.forEach(function (listener) { listener.callstacksChanged(); }); }; CallstackController.prototype.workerAdded = function (workerDescription) { var callstack = new Debugger.Callstack(workerDescription.id, workerDescription.displayName, true); this._callstacks.push(callstack); this.sortCallstack(); for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].callstacksChanged(); } }; CallstackController.prototype.workerRemoved = function (id) { this.removeCallstackForWorkerByWorkerId(id); for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].callstacksChanged(); } }; CallstackController.prototype.onBreak = function (threadDescription, rawFrames, activeStackFrameToUse) { var _this = this; var promise = Plugin.Promise.wrap(null); this.clear(); var callstack = this.getCallstack(threadDescription.id); if (!callstack) { callstack = new Debugger.Callstack(threadDescription.id, threadDescription.displayName, threadDescription.isWorker); this._callstacks.push(callstack); this.sortCallstack(); } callstack.waitToBreak = false; for (var frameIndex = 0; frameIndex < rawFrames.length; frameIndex++) { rawFrames[frameIndex].callStackId = callstack.id; callstack.push(rawFrames[frameIndex]); } var frame = callstack.instructionPointerFrame; if (frame) { frame.isInstructionPointerFrame = true; this._instructionPointerFrame = frame; if (activeStackFrameToUse) { frame = activeStackFrameToUse; } this._activeFrame = frame; this._activeFrame.isActiveFrame = true; for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].callstacksChanged(); } if (frame.location.startPosition) { promise = this._debuggerManager.documentController.openDocument(frame.location.startPosition.doc, frame.location).then(function () { for (var i = 0; i < _this._listeners.length; i++) { _this._listeners[i].activeFrameChanged(frame); } Plugin.F12.Debugger.notifyOnActiveStackFrameChanged(); }); } else { promise = Plugin.Promise.wrap(null); } } return promise; }; CallstackController.prototype.registerListener = function (listener) { if (this._listeners.indexOf(listener) === -1) { this._listeners.push(listener); } }; CallstackController.prototype.unregisterListener = function (listener) { var index = this._listeners.indexOf(listener); if (index >= 0) { this._listeners.splice(index, 1); } }; CallstackController.prototype.goToActiveFrame = function () { return this.goTo(this._activeFrame); }; CallstackController.prototype.goTo = function (frame) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(316 /* Debugger_CallstackController_GoTo_Start */); if (frame && frame.location.startPosition) { return this._debuggerManager.documentController.openDocument(frame.location.startPosition.doc, frame.location); } else { return Plugin.Promise.wrap(null); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(317 /* Debugger_CallstackController_GoTo_Stop */); }; CallstackController.prototype.activate = function (frame) { if (frame && !(frame instanceof Debugger.CallstackGroup) && this._activeFrame !== frame && !frame.isLibraryMarkerFrame && !frame.isAsync) { if (this._activeFrame) { this._activeFrame.isActiveFrame = false; } this._activeFrame = frame; this._activeFrame.isActiveFrame = true; var isInstructionPointer = false; for (var index = 0; index < this._callstacks.length; index++) { if (frame === this._callstacks[index].instructionPointerFrame) { isInstructionPointer = true; break; } } for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].activeFrameChanged(frame); } Plugin.F12.Debugger.notifyOnActiveStackFrameChanged(); } else if (frame && frame.isAsync && frame.location) { this.goTo(frame); } }; CallstackController.prototype.goToNextFrameUpStack = function () { var callStack = this._activeFrame && this.getCallstack(this._activeFrame.callStackId); if (callStack) { var indexOfActiveFrame = callStack.rawFrames.indexOf(this._activeFrame); var targetFrame = indexOfActiveFrame + 1; if (targetFrame > callStack.rawFrames.length - 1) { targetFrame = 0; } return this.goToFrame(targetFrame, callStack); } return Plugin.Promise.wrap(null); }; CallstackController.prototype.goToNextFrameDownStack = function () { var callStack = this._activeFrame && this.getCallstack(this._activeFrame.callStackId); if (callStack) { var indexOfActiveFrame = callStack.rawFrames.indexOf(this._activeFrame); var targetFrame = indexOfActiveFrame - 1; if (targetFrame < 0) { targetFrame = callStack.rawFrames.length - 1; } return this.goToFrame(targetFrame, callStack); } return Plugin.Promise.wrap(null); }; CallstackController.prototype.findCallstackIndexByWorkerId = function (workerId) { for (var i = 0; i < this._callstacks.length; i++) { if (this._callstacks[i].isWorker && this._callstacks[i].id === workerId) { return i; } } return -1; }; CallstackController.prototype.removeCallstackForWorkerByWorkerId = function (workerId) { var index = this.findCallstackIndexByWorkerId(workerId); if (index >= 0) { this._callstacks.splice(index, 1); } }; CallstackController.prototype.sortCallstack = function () { this._callstacks.sort(function idComparator(a, b) { return a.id - b.id; }); }; CallstackController.prototype.goToFrame = function (frameIndex, callStack) { this.activate(callStack.rawFrames[frameIndex]); return this.goTo(callStack.rawFrames[frameIndex]); }; return CallstackController; })(); Debugger.CallstackController = CallstackController; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // callstackWindow.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var CallstackWindow = (function () { function CallstackWindow(controller, rootElement) { var _this = this; this._controller = controller; this._persistenceManager = this._controller.debuggerManager.persistenceManager; this._breakOnWorkerDisabled = false; this._isBroken = false; this._isJMCEnabled = false; this._locationListeners = []; var columnsAvailableWidth = rootElement.clientWidth - CallstackWindow.DEFAULT_ICON_COLUMN_WIDTH; var functionColumn = new Debugger.Grid.ColumnInfo("functionName", Plugin.Resources.getString("StackFramesColumn"), Plugin.Resources.getString("StackFramesColumnTooltip"), columnsAvailableWidth * CallstackWindow.DEFAULT_FUNCTION_NAME_COLUMN_PERCENT_WIDTH, false); functionColumn.getCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { return _this.getCellCSSClass(dataIndex, columnIndex, columnOrder, dataSource); }; functionColumn.percentWidth = CallstackWindow.DEFAULT_FUNCTION_NAME_COLUMN_PERCENT_WIDTH; var locationColumn = new Debugger.Grid.ColumnInfo("locationString", Plugin.Resources.getString("LocationColumn"), Plugin.Resources.getString("LocationColumnTooltip"), columnsAvailableWidth * CallstackWindow.DEFAULT_LOCATION_COLUMN_PERCENT_WIDTH, false); locationColumn.getCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { return _this.getCellCSSClass(dataIndex, columnIndex, columnOrder, dataSource); }; locationColumn.percentWidth = CallstackWindow.DEFAULT_LOCATION_COLUMN_PERCENT_WIDTH; var actionsColumn = new Debugger.Grid.ColumnInfo(null, Plugin.Resources.getString("ActionsColumn"), Plugin.Resources.getString("ActionsColumnTooltip"), CallstackWindow.DEFAULT_ICON_COLUMN_WIDTH, false); actionsColumn.getCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { return _this.getCellCSSClass(dataIndex, columnIndex, columnOrder, dataSource); }; actionsColumn.cellDecorator = this.onCellDecorate.bind(this); actionsColumn.fixed = true; this._columnInfo = [functionColumn, locationColumn]; var gridElement = rootElement.querySelector(".gridcontainer"); this.createGrid(gridElement); gridElement.addEventListener("contextmenu", this.showContextMenu.bind(this)); gridElement.addEventListener("dblclick", this.onMouseDoubleClick.bind(this)); gridElement.addEventListener("keydown", this.onGridElementKeyDown.bind(this)); document.addEventListener("keydown", this.onDocumentKeyDown.bind(this)); if (Plugin.F12) { Plugin.F12.addEventListener("keydown", this.onDocumentKeyDown.bind(this)); } this._toggleJMCFramesButton = document.getElementById("toggleJMCFramesButton"); Common.ButtonHelpers.setupButton(this._toggleJMCFramesButton, "CallstackWindowLibraryFramesHiddenTooltip", function () { _this.showLibraryFrames = !_this.showLibraryFrames; }, this._isJMCEnabled); this._toggleAsyncFramesButton = document.getElementById("toggleAsyncFramesButton"); Common.ButtonHelpers.setupButton(this._toggleAsyncFramesButton, "CallstackWindowAsyncFramesHiddenTooltip", function () { _this.showAsyncFrames = !_this.showAsyncFrames; }, true); this.showLibraryFrames = this._persistenceManager.getSettingAsBoolean(CallstackWindow.SHOW_LIBRARY_FRAMES_SETTINGS_KEY, false); this.showAsyncFrames = this._persistenceManager.getSettingAsBoolean(CallstackWindow.SHOW_ASYNC_FRAMES_SETTINGS_KEY, true); rootElement.parentElement.addEventListener("tabActivated", function (e) { _this.layout(); e.stopImmediatePropagation(); }); } Object.defineProperty(CallstackWindow.prototype, "showLibraryFrames", { get: function () { return this._showLibraryFrames; }, set: function (value) { if (this._showLibraryFrames !== value) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(351 /* Debugger_ToggleCallstackLibraryFrames_Start */); this._showLibraryFrames = value; this._persistenceManager.setSettingAsBoolean(CallstackWindow.SHOW_LIBRARY_FRAMES_SETTINGS_KEY, this._showLibraryFrames); if (!this._showLibraryFrames) { this._toggleJMCFramesButton.classList.add("toggledOn"); Common.ButtonHelpers.changeButtonStatus(this._toggleJMCFramesButton, this._isJMCEnabled, true); this._toggleJMCFramesButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("CallstackWindowLibraryFramesHiddenTooltip")); this._toggleJMCFramesButton.setAttribute("aria-label", Plugin.Resources.getString("CallstackWindowLibraryFramesHiddenTooltip")); } else { this._toggleJMCFramesButton.classList.remove("toggledOn"); Common.ButtonHelpers.changeButtonStatus(this._toggleJMCFramesButton, this._isJMCEnabled, false); this._toggleJMCFramesButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("CallstackWindowLibraryFramesVisibleTooltip")); this._toggleJMCFramesButton.setAttribute("aria-label", Plugin.Resources.getString("CallstackWindowLibraryFramesVisibleTooltip")); } if (this._isJMCEnabled) { this.callstacksChanged(); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(352 /* Debugger_ToggleCallstackLibraryFrames_Stop */); } }, enumerable: true, configurable: true }); Object.defineProperty(CallstackWindow.prototype, "showAsyncFrames", { get: function () { return this._showAsyncFrames; }, set: function (value) { if (this._showAsyncFrames !== value) { this._showAsyncFrames = value; this._persistenceManager.setSettingAsBoolean(CallstackWindow.SHOW_ASYNC_FRAMES_SETTINGS_KEY, this._showAsyncFrames); if (!this._showAsyncFrames) { this._toggleAsyncFramesButton.classList.add("toggledOn"); Common.ButtonHelpers.changeButtonStatus(this._toggleAsyncFramesButton, true, true); this._toggleAsyncFramesButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("CallstackWindowAsyncFramesHiddenTooltip")); this._toggleAsyncFramesButton.setAttribute("aria-label", Plugin.Resources.getString("CallstackWindowAsyncFramesHiddenTooltip")); } else { this._toggleAsyncFramesButton.classList.remove("toggledOn"); Common.ButtonHelpers.changeButtonStatus(this._toggleAsyncFramesButton, true, false); this._toggleAsyncFramesButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("CallstackWindowAsyncFramesVisibleTooltip")); this._toggleAsyncFramesButton.setAttribute("aria-label", Plugin.Resources.getString("CallstackWindowAsyncFramesVisibleTooltip")); } this.callstacksChanged(); } }, enumerable: true, configurable: true }); Object.defineProperty(CallstackWindow.prototype, "isJMCEnabled", { get: function () { return this._isJMCEnabled; }, set: function (value) { this._isJMCEnabled = value; Common.ButtonHelpers.changeButtonStatus(this._toggleJMCFramesButton, this._isJMCEnabled); }, enumerable: true, configurable: true }); CallstackWindow.prototype.callstacksChanged = function () { var _this = this; for (var i = 0; i < this._locationListeners.length; i++) { this._locationListeners[i].unregister(); } this._locationListeners = []; this._groupedCallstacksCache = []; this._expandStates = []; this._displayedInstructionPointerFrame = null; var parentExpandStateIndex = 0; var jmcFrame; for (var threadIndex = 0; threadIndex < this._controller.callstacks.length; threadIndex++) { var groupedThread = this._controller.callstacks[threadIndex].getGroupedCallstack(); parentExpandStateIndex = this._groupedCallstacksCache.length; for (var frameIndex = 0; frameIndex < groupedThread.length; frameIndex++) { var stackFrame = groupedThread[frameIndex]; if (stackFrame.isAsyncTransition) { this._groupedCallstacksCache.push(stackFrame); this._expandStates.push(stackFrame.numChildren * (this.showAsyncFrames ? 1 : -1)); parentExpandStateIndex = this._expandStates.length - 1; jmcFrame = null; } else if (!this.isJMCEnabled || this.showLibraryFrames) { this._groupedCallstacksCache.push(stackFrame); this._expandStates.push(stackFrame.numChildren); if (stackFrame.isInstructionPointerFrame) { this._displayedInstructionPointerFrame = stackFrame; } } else { if (!stackFrame.location.rawLocation.doc || !stackFrame.location.rawLocation.doc.isLibraryFile) { this._groupedCallstacksCache.push(stackFrame); this._expandStates.push(stackFrame.numChildren); jmcFrame = null; } else if (!jmcFrame) { jmcFrame = new Debugger.StackFrame(CallstackWindow.JMC_FRAME_ID, Plugin.Resources.getString("CallstackLibraryCode"), undefined); jmcFrame.isLibraryMarkerFrame = true; this._groupedCallstacksCache.push(jmcFrame); this._expandStates.push(0); } else { if (this._expandStates[parentExpandStateIndex] > 0) { this._expandStates[parentExpandStateIndex]--; } else { this._expandStates[parentExpandStateIndex]++; } } if (stackFrame.isInstructionPointerFrame && stackFrame.location.startPosition && stackFrame.location.startPosition.doc.isLibraryFile) { jmcFrame.isInstructionPointerFrame = true; this._displayedInstructionPointerFrame = jmcFrame; } } } } var rowIndex = this._grid.getSelectedRowIndex(); if (this._groupedCallstacksCache.length === 0 || this._groupedCallstacksCache[0].numChildren === 0) { rowIndex = -1; } else if (rowIndex === -1 && this._groupedCallstacksCache.length > 0) { rowIndex = 0; } var locationChangeHandler = function () { if (!_this._redrawTimeout) { _this._redrawTimeout = window.setTimeout(function () { _this.clearOldFrameDecorations(); _this._grid.redraw(); _this._redrawTimeout = null; }, 50); } }; for (var i = 0; i < this._groupedCallstacksCache.length; i++) { this._locationListeners.push(this._groupedCallstacksCache[i].location.changesCompleted.addHandler(locationChangeHandler)); } this._grid.setDataSource(this._groupedCallstacksCache, this._expandStates, this._columnInfo, null, rowIndex); }; CallstackWindow.prototype.activeFrameChanged = function (frame) { this.clearOldFrameDecorations(); if (frame) { var dataSource = this._grid.getDataSource(); if (dataSource) { var dataIndex = dataSource.indexOf(frame); if (dataIndex >= 0) { var rowInfo = this._grid.getRowInfo(dataIndex); if (rowInfo) { if (frame.isInstructionPointerFrame) { rowInfo.row.classList.add("instructionPointerGlyph"); } else if (frame.isActiveFrame) { rowInfo.row.classList.add("activeFrameGlyph"); dataIndex = dataSource.indexOf(this._displayedInstructionPointerFrame); if (dataIndex >= 0) { rowInfo = this._grid.getRowInfo(dataIndex); if (rowInfo) { rowInfo.row.classList.add("instructionPointerGlyph"); } } } } } else if (this._displayedInstructionPointerFrame) { var dataIndex = dataSource.indexOf(this._displayedInstructionPointerFrame); if (dataIndex >= 0) { var rowInfo = this._grid.getRowInfo(dataIndex); if (rowInfo) { rowInfo.row.classList.add("instructionPointerGlyph"); } } } } } }; CallstackWindow.prototype.navigateTo = function () { return Plugin.Promise.wrap(null); }; CallstackWindow.prototype.layout = function () { this._grid.layoutOnResize(); }; CallstackWindow.prototype.breakStateChanged = function (isBroken, isDisabled) { this._isBroken = isBroken; }; CallstackWindow.prototype.exceptionFilterChanged = function (filter) { }; CallstackWindow.prototype.breakCallComplete = function () { }; CallstackWindow.prototype.justMyCodeStateChanged = function (newValue) { this.isJMCEnabled = newValue; this.callstacksChanged(); }; CallstackWindow.prototype.documentAdded = function (doc) { }; CallstackWindow.prototype.documentRemoved = function (doc) { }; CallstackWindow.prototype.documentClosed = function (doc, isRuntime) { }; CallstackWindow.prototype.documentOpened = function (doc, activation, location) { return Plugin.Promise.wrap(null); }; CallstackWindow.prototype.documentUrlChanged = function (doc) { }; CallstackWindow.prototype.documentUpdated = function (doc) { }; CallstackWindow.prototype.documentAsLibraryStateChanged = function (doc) { if (this.isJMCEnabled) { this.callstacksChanged(); } }; CallstackWindow.isBreakOnWorkerButton = function (element) { return element && element.classList.contains("breakOnWorker"); }; CallstackWindow.prototype.createButton = function (className, tooltipResourceName, clickHandler) { var buttonDiv = document.createElement("div"); var buttonIconDiv = document.createElement("div"); buttonDiv.className = className + " iconShell_18x18"; buttonIconDiv.className = "buttonIcon icon_14x14"; buttonDiv.appendChild(buttonIconDiv); Common.ButtonHelpers.setupButton(buttonDiv, tooltipResourceName, clickHandler); return buttonDiv; }; CallstackWindow.prototype.clearOldFrameDecorations = function () { var cell = this._grid.getElement().querySelector(".instructionPointerGlyph"); if (cell) { cell.classList.remove("instructionPointerGlyph"); } cell = this._grid.getElement().querySelector(".activeFrameGlyph"); if (cell) { cell.classList.remove("activeFrameGlyph"); } }; CallstackWindow.prototype.onCellDecorate = function (cell, dataItem) { var callstackGroup = dataItem; if (callstackGroup.isWorker) { var buttonDiv = this.createButton("breakOnWorker", "ActionsColumnTooltip", null); buttonDiv.setAttribute("workerId", callstackGroup.workerId.toString()); buttonDiv.setAttribute("role", "button"); Common.ButtonHelpers.changeButtonStatus(buttonDiv, !callstackGroup.waitToBreak); cell.appendChild(buttonDiv); } }; CallstackWindow.prototype.onDocumentKeyDown = function (e) { if (e.ctrlKey && !e.altKey && !e.shiftKey) { if (e.keyCode === 188 /* Comma */) { this._controller.goToNextFrameUpStack(); return false; } if (e.keyCode === 190 /* Period */) { this._controller.goToNextFrameDownStack(); return false; } } return true; }; CallstackWindow.prototype.onGridElementKeyDown = function (e) { if (e.keyCode === 121 /* F10 */ && e.shiftKey && !e.ctrlKey && !e.altKey) { this.showContextMenu(e); return false; } return true; }; CallstackWindow.prototype.onMouseDoubleClick = function (e) { if (!CallstackWindow.isBreakOnWorkerButton(e.target)) { var rowInfo = this._grid.getRowInfoFromEvent(e, ".grid-row") || this._grid.getRowInfo(this._grid.getSelectedDataIndex()); if (rowInfo) { var frame = this._groupedCallstacksCache[rowInfo.dataIndex]; if (frame.isLibraryMarkerFrame) { this.showLibraryFrames = true; } else { this._controller.goTo(frame); } } } }; CallstackWindow.prototype.createGrid = function (rootElement) { var _this = this; this._childDataCallback = function childDataCallback(parentTreeItem) { return null; }; var options = new Debugger.Grid.GridOptions(this._childDataCallback, this._columnInfo, null, null); options.asyncInit = false; options.keyboardEventHandler = { keys: [Common.Keys.ENTER], handler: function (e, dataSource, dataIndex) { return _this.keyboardEventHandler(e, dataSource, dataIndex); } }; options.disableRightClickSelection = false; options.drawRowSplitters = true; this._grid = new Debugger.Grid.GridControl(rootElement, options); this._grid.getElement().addEventListener("selectionchanged", function (eventArgs) { if (_this._isBroken) { var index = eventArgs.customData[0].selectedIndex; if (index && index >= 0) { _this._controller.activate(_this._groupedCallstacksCache[index]); } } }); this.callstacksChanged(); }; CallstackWindow.prototype.keyboardEventHandler = function (e, dataSource, dataIndex) { if (e.keyCode === 13 /* Enter */ && !Common.HasAnyOfAltCtrlShiftKeyFlags(e)) { this._controller.goTo(dataSource[dataIndex]); return true; } return false; }; CallstackWindow.prototype.getCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { var classString = ""; var stackFrame = dataSource[dataIndex]; if (stackFrame && columnOrder === CallstackWindow.ICON_CELL_INDEX) { if (stackFrame.isInstructionPointerFrame) { classString += " instructionPointerGlyph"; } else if (stackFrame.isActiveFrame) { classString += " activeFrameGlyph"; } } if (stackFrame && stackFrame.isAsync) { classString += " asyncFrame"; } return classString; }; CallstackWindow.prototype.createMenuItems = function () { var _this = this; var menuItems = []; var frame = this._groupedCallstacksCache[this._contextMenuSelection]; menuItems.push({ id: "menuItemSwitchToFrameCallstackWindow", callback: function (menuId, menuItem) { return _this.goToSource(menuId, menuItem); }, label: Plugin.Resources.getString("CallstackContextMenuGoToSource"), type: 1 /* command */, disabled: function () { return !frame.location.startPosition || !frame.location.startPosition.doc; } }); menuItems.push({ id: "menuItemSep1CallstackWindow", type: 3 /* separator */ }); menuItems.push({ id: "menuItemCopyFrameCallstackWindow", callback: function (menuId, menuItem) { return _this.copyFrame(menuId, menuItem); }, label: Plugin.Resources.getString("CallStackContextMenuCopyFrame"), type: 1 /* command */, disabled: function () { return (_this._groupedCallstacksCache[_this._contextMenuSelection].getCopyText().length === 0); } }); menuItems.push({ id: "menuItemCopyStackCallstackWindow", callback: function (menuId, menuItem) { return _this.copyStack(menuId, menuItem); }, label: Plugin.Resources.getString("CallStackContextMenuCopyStack"), type: 1 /* command */, disabled: function () { return (_this.getCopyStackText().length === 0); } }); var doc = frame.location && frame.location.rawLocation && frame.location.rawLocation.doc; if (doc && doc.isRuntimeDoc && !doc.isDynamicCode) { menuItems.push({ id: "menuItemSep2CallstackWindow", type: 3 /* separator */ }); menuItems.push({ id: "menuItemMarkAsLibraryCallstackWindow", callback: function (menuId, menuItem, targetId) { doc.setIsLibraryFile(!doc.isLibraryFile); }, label: Plugin.Resources.getString("TabContextMenuMarkAsLibraryCode"), type: 0 /* checkbox */, checked: function () { return doc.isLibraryFile; } }); } return menuItems; }; CallstackWindow.prototype.goToSource = function (menuId, menuItem) { this._controller.goTo(this._groupedCallstacksCache[this._contextMenuSelection]); }; CallstackWindow.prototype.copyFrame = function (menuId, menuItem) { clipboardData.setData("Text", this._groupedCallstacksCache[this._contextMenuSelection].getCopyText()); }; CallstackWindow.prototype.copyStack = function (menuId, menuItem) { clipboardData.setData("Text", this.getCopyStackText()); }; CallstackWindow.prototype.getCopyStackText = function () { var stackTrace = ""; this._groupedCallstacksCache.forEach(function (frame) { var text = frame.getCopyText(); if (text) { stackTrace += text + "\r\n"; } }); return stackTrace; }; CallstackWindow.prototype.showContextMenu = function (e) { if (this._grid) { if (this._contextMenu) { this._contextMenu.dispose(); this._contextMenu = null; } var rowInfo = this._grid.getRowInfoFromEvent(e, ".grid-row") || this._grid.getRowInfo(this._grid.getSelectedDataIndex()); if (rowInfo) { this._contextMenuSelection = rowInfo.dataIndex; this._contextMenu = Plugin.ContextMenu.create(this.createMenuItems(), "callstackMenu"); var x = 0; var y = 0; if (e instanceof MouseEvent) { x = e.pageX; y = e.pageY; } if (x <= 0 && y <= 0) { var offset = rowInfo.row.getBoundingClientRect(); x = offset.left; y = offset.top; } this._contextMenu.show(x, y); } } e.preventDefault(); e.stopImmediatePropagation(); }; CallstackWindow.DEFAULT_FUNCTION_NAME_COLUMN_PERCENT_WIDTH = 0.7; CallstackWindow.DEFAULT_LOCATION_COLUMN_PERCENT_WIDTH = 0.3; CallstackWindow.DEFAULT_ICON_COLUMN_WIDTH = 30; CallstackWindow.ICON_CELL_INDEX = 0; CallstackWindow.SHOW_LIBRARY_FRAMES_SETTINGS_KEY = "showLibraryFrames"; CallstackWindow.SHOW_ASYNC_FRAMES_SETTINGS_KEY = "showAsyncFrames"; CallstackWindow.JMC_FRAME_ID = "jmcFrame"; CallstackWindow.ASYNC_FRAME_ID = "asyncFrame"; return CallstackWindow; })(); Debugger.CallstackWindow = CallstackWindow; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // breakpoint.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var Breakpoint = (function () { function Breakpoint(breakpointId, rawLocation, eventTypes, location, url, isBound) { this._breakpointId = breakpointId; this.isEnabled = true; this.isTracepoint = false; this.isBound = isBound; this.condition = ""; var isEventBreakpoint = !!(!location && !url && eventTypes); var isCodeBreakpoint = !!(!eventTypes && location && url); Tools.Utility.Assert.isTrue(isEventBreakpoint || isCodeBreakpoint); this._rawLocation = rawLocation; this._url = url; this._eventTypes = eventTypes; this._location = eventTypes ? null : new Debugger.DynamicLocation(location.rawLocation, location); if (eventTypes) { var text = ""; for (var i = 0; i < this._eventTypes.length; i++) { text += Debugger.BreakpointController.getStringForEventBreakpointType(this._eventTypes[i]); if (i < this._eventTypes.length - 1) { text += " "; } } this._eventTypesText = Plugin.Resources.getString((this._eventTypes.length === 1 ? "EventBreakpointSingleGroup" : "EventBreakpointMultiGroup"), text); } } Object.defineProperty(Breakpoint.prototype, "breakpointId", { get: function () { return this._breakpointId; }, enumerable: true, configurable: true }); Object.defineProperty(Breakpoint.prototype, "rawLocation", { get: function () { return this._rawLocation; }, enumerable: true, configurable: true }); Object.defineProperty(Breakpoint.prototype, "eventTypes", { get: function () { return this._eventTypes; }, enumerable: true, configurable: true }); Object.defineProperty(Breakpoint.prototype, "location", { get: function () { return this._location; }, set: function (location) { if (this._location) { this._location.cleanup(); } this._location = location; }, enumerable: true, configurable: true }); Object.defineProperty(Breakpoint.prototype, "url", { get: function () { return this._url; }, enumerable: true, configurable: true }); Object.defineProperty(Breakpoint.prototype, "tooltipText", { get: function () { if (this._eventTypes) { return this._eventTypesText; } else { return this.url; } }, enumerable: true, configurable: true }); Breakpoint.isUnresolvedId = function (breakpointId) { return (breakpointId.indexOf(":unresolved:") >= 0); }; Breakpoint.prototype.equals = function (breakpoint) { return this._breakpointId === breakpoint.breakpointId; }; Breakpoint.prototype.toString = function (includeFullUrl) { if (typeof includeFullUrl === "undefined") { includeFullUrl = false; } if (this._eventTypes) { return this._eventTypesText; } else { var url = this._url; var position = ""; if (this.location && this.location.startPosition) { url = this.location.startPosition.doc.url; position = " (" + this.location.startPosition.line + ", " + this.location.startPosition.column + ")"; } var finalUrl = Common.ToolWindowHelpers.createShortenedUrlText(url); if (includeFullUrl) { finalUrl += " : " + Common.EncodingUtilities.escapeHtml(url); } return finalUrl + position; } }; Breakpoint.prototype.getGlyphClassName = function () { var className = "breakpointGlyph "; if (this._eventTypes) { if (this.isTracepoint) { className += "eventTracepointImg"; } else if (this.condition) { className += "eventBreakpointConditionalImg"; } else { className += "eventBreakpointImg"; } } else { if (this.isTracepoint) { className += "tracepointimg"; } else if (this.condition) { className += "conditionalimg"; } else { className += "breakpointimg"; } } return className; }; Breakpoint.prototype.resolveTo = function (breakpoint) { if (this.location) { this._location.cleanup(); } this._breakpointId = breakpoint.breakpointId; this.isBound = breakpoint.isBound; this._location = breakpoint.location; this._rawLocation = breakpoint.rawLocation; }; Breakpoint.prototype.cleanUp = function () { if (this.location) { this._location.cleanup(); } this._location = null; this._rawLocation = null; }; return Breakpoint; })(); Debugger.Breakpoint = Breakpoint; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // breakpointController.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var BreakpointController = (function () { function BreakpointController(debuggerManager) { this._breakpoints = []; this._listeners = []; this._debuggerManager = debuggerManager; this._persistenceManager = this._debuggerManager.persistenceManager; BreakpointController.EventBreakpointLocMap = {}; BreakpointController.loadEventBreakpointDescriptions(); } Object.defineProperty(BreakpointController, "eventBreakpointDescriptions", { get: function () { return BreakpointController.EventBreakpointDescriptions; }, enumerable: true, configurable: true }); BreakpointController.loadEventBreakpointDescriptions = function (jsonToParse) { var json; if (typeof jsonToParse === "string") { json = jsonToParse; } else if (Plugin.F12) { json = Plugin.F12.Utilities.readResourceFile("Breakpoints/eventBreakpointDescriptions.json"); } if (json) { BreakpointController.EventBreakpointDescriptions = JSON.parse(json); BreakpointController.EventBreakpointLocMap = {}; for (var i = 0; i < BreakpointController.EventBreakpointDescriptions.categories.length; i++) { var category = BreakpointController.EventBreakpointDescriptions.categories[i]; for (var j = 0; j < category.events.length; j++) { var event = category.events[j]; if (event.nameLocId) { BreakpointController.EventBreakpointLocMap[event.eventKey] = event.nameLocId; } } } } }; BreakpointController.getStringForEventBreakpointType = function (eventKey) { var locId = BreakpointController.EventBreakpointLocMap[eventKey]; if (locId) { return Plugin.Resources.getString("" + locId); } return eventKey; }; BreakpointController.prototype.getBreakpoint = function (breakpointId) { if (breakpointId === null || breakpointId === Debugger.breakpointIdNotFound) { return null; } for (var i = 0; i < this._breakpoints.length; i++) { if (this._breakpoints[i].breakpointId === breakpointId) { return this._breakpoints[i]; } } return null; }; BreakpointController.prototype.getBreakpointAtIndex = function (index) { if (index >= 0 && index < this._breakpoints.length) { return this._breakpoints[index]; } return null; }; BreakpointController.prototype.registerListener = function (listener) { if (this._listeners.indexOf(listener) === -1) { this._listeners.push(listener); } }; BreakpointController.prototype.unregisterListener = function (listener) { var index = this._listeners.indexOf(listener); if (index >= 0) { this._listeners.splice(index, 1); } }; BreakpointController.prototype.deleteAll = function (forceRemove) { var promises = []; for (var i = this._breakpoints.length - 1; i >= 0; i--) { promises.push(this.deleteBreakpoint(this._breakpoints[i], forceRemove)); } return Plugin.Promise.join(promises); }; BreakpointController.prototype.setEnabledState = function (breakpoint, isEnabled) { var _this = this; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(340 /* Debugger_BreakpointController_SetEnabledState_Start */); return this._debuggerManager.setBreakpointEnabledState(breakpoint.breakpointId, isEnabled).then(function (success) { if (success) { breakpoint.isEnabled = isEnabled; _this.breakpointChanged(breakpoint); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(341 /* Debugger_BreakpointController_SetEnabledState_Stop */); return success; }); }; BreakpointController.prototype.setAllEnabledStates = function (isEnabled) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(318 /* Debugger_BreakpointController_SetAllEnabledStates_Start */); var promises = []; for (var i = 0; i < this._breakpoints.length; i++) { promises.push(this.setEnabledState(this._breakpoints[i], isEnabled)); } return Plugin.Promise.join(promises).then(function () { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(319 /* Debugger_BreakpointController_SetAllEnabledStates_Stop */); }); }; BreakpointController.prototype.setBreakpointCondition = function (breakpoint, condition, isTracepoint) { var _this = this; if (!condition) { condition = ""; isTracepoint = false; } return this._debuggerManager.setBreakpointCondition(breakpoint.breakpointId, condition, isTracepoint).then(function (success) { if (success) { breakpoint.condition = condition; breakpoint.isTracepoint = isTracepoint; _this.breakpointChanged(breakpoint); } return success; }); }; BreakpointController.prototype.addCodeBreakpoint = function (location, isTracepoint) { var _this = this; return this._debuggerManager.addCodeBreakpoint(location).then(function (breakpoint) { return _this.afterBreakpointAdded(breakpoint, isTracepoint); }); }; BreakpointController.prototype.addEventBreakpoint = function (eventTypes, condition, isTracepoint) { var _this = this; var promise; var existingBreakpoint = this.getExistingEventBreakpoint(eventTypes); if (existingBreakpoint) { promise = this.setBreakpointCondition(existingBreakpoint, condition, isTracepoint).then(function () { return _this.setEnabledState(existingBreakpoint, true); }).then(function () { return Plugin.Promise.wrap(existingBreakpoint); }); } else { promise = this._debuggerManager.addEventBreakpoint(eventTypes, true, condition, isTracepoint); } return promise.then(function (breakpoint) { return _this.afterBreakpointAdded(breakpoint, false); }); }; BreakpointController.prototype.addPendingBreakpoints = function (breakpointData) { var tempEventBreakpointStorage = []; for (var index = 0; index < breakpointData.length; index++) { var breakpointInfo = breakpointData[index]; if (breakpointInfo.eventTypes) { this.addPendingEventBreakpoint(breakpointInfo, tempEventBreakpointStorage); } else { this.addPendingCodeBreakpoint(breakpointInfo); } } }; BreakpointController.prototype.deleteBreakpoint = function (breakpoint, forceRemove) { var _this = this; if (this.getIndex(breakpoint) >= 0) { var promise = (forceRemove ? Plugin.Promise.wrap(null) : this._debuggerManager.removeBreakpoint(breakpoint.breakpointId)); return promise.then(function () { var breakpointIndex = _this.getIndex(breakpoint); if (breakpointIndex >= 0) { _this._breakpoints.splice(_this.getIndex(breakpoint), 1); _this._persistenceManager.saveState(); breakpoint.cleanUp(); for (var i = 0; i < _this._listeners.length; i++) { _this._listeners[i].breakpointRemoved(breakpoint); } } }); } }; BreakpointController.prototype.resolveBreakpointById = function (existingId, newBreakpointInfo) { if (Debugger.Breakpoint.isUnresolvedId(existingId) && !Debugger.Breakpoint.isUnresolvedId(newBreakpointInfo.breakpointId) && this.hasBreakpointWithId(newBreakpointInfo.breakpointId)) { var existingBreakpoint = this.getBreakpoint(existingId); if (existingBreakpoint) { this.deleteBreakpoint(existingBreakpoint, true); } } else { for (var i = 0; i < this._breakpoints.length; i++) { var bp = this._breakpoints[i]; if (bp.breakpointId === existingId) { bp.resolveTo(newBreakpointInfo); this.breakpointChanged(bp, existingId); break; } } } }; BreakpointController.prototype.unresolveCodeBreakpoints = function (doc) { for (var i = 0; i < this._breakpoints.length; i++) { var breakpoint = this._breakpoints[i]; if (breakpoint.location && breakpoint.location.startPosition && breakpoint.location.startPosition.doc === doc) { breakpoint.isBound = false; this.breakpointChanged(breakpoint); } } }; BreakpointController.prototype.unresolveAllBreakpoints = function () { for (var i = 0; i < this._breakpoints.length; i++) { var breakpoint = this._breakpoints[i]; breakpoint.isBound = false; this.breakpointChanged(breakpoint); } }; BreakpointController.prototype.navigateToBreakpoint = function (breakpoint) { if (!breakpoint.location) { return Plugin.Promise.wrap(null); } return this._debuggerManager.documentController.openDocument(breakpoint.location.startPosition.doc, breakpoint.location); }; BreakpointController.prototype.getBreakpointsStartingAtLine = function (doc, lineNumber) { var breakpoints = []; for (var i = 0; i < this._breakpoints.length; i++) { var breakpoint = this._breakpoints[i]; if (breakpoint.location && breakpoint.location.startPosition.doc === doc && breakpoint.location.startLineNumber === lineNumber) { breakpoints.push(breakpoint); } } return breakpoints; }; BreakpointController.prototype.getBreakpointAtLocation = function (location) { var _this = this; return this._debuggerManager.getBreakpointIdFromLocation(location).then(function (breakpointId) { if (breakpointId !== null) { var breakpoint = _this.getBreakpoint(breakpointId); return Plugin.Promise.wrap(breakpoint); } else { return Plugin.Promise.wrap(null); } }); }; BreakpointController.prototype.getBreakpoints = function (doc) { if (!doc) { return this._breakpoints; } var breakpoints = []; for (var i = 0; i < this._breakpoints.length; i++) { var breakpoint = this._breakpoints[i]; if (breakpoint.location && breakpoint.location.startPosition && breakpoint.location.startPosition.doc === doc) { breakpoints.push(breakpoint); } } return breakpoints; }; BreakpointController.prototype.hasBreakpointWithId = function (breakpointId) { for (var i = 0; i < this._breakpoints.length; i++) { if (this._breakpoints[i].breakpointId === breakpointId) { return true; } } return false; }; BreakpointController.prototype.addOrRemoveBreakpointAtLocation = function (location) { var _this = this; return this.getBreakpointAtLocation(location).then(function (breakpoint) { if (breakpoint) { return _this.deleteBreakpoint(breakpoint); } else { return _this.addCodeBreakpoint(location); } }); }; BreakpointController.prototype.addOrRemoveAllBreakpointsAtLocation = function (location) { var existingBreakpoints = this.getBreakpointsStartingAtLine(location.startPosition.doc, location.lineNumber); if (existingBreakpoints && existingBreakpoints.length > 0) { var promises = []; var foundExisting = false; var selectionLengthIsZero = location.startColumn === location.endColumn; for (var i = 0; i < existingBreakpoints.length; i++) { var bp = existingBreakpoints[i]; var bpContainsLocation = (location.endColumn >= bp.location.startColumn && (location.startColumn <= bp.location.endColumn || bp.location.endLineNumber > bp.location.startLineNumber)); if (selectionLengthIsZero || bpContainsLocation) { promises.push(this.deleteBreakpoint(bp)); foundExisting = true; } } if (foundExisting) { return Plugin.Promise.join(promises); } } return this.addCodeBreakpoint(location); }; BreakpointController.prototype.promptToModifyConditionOrTracepoint = function (breakpoint) { for (var i = 0; i < this._listeners.length; i++) { if (breakpoint.isTracepoint) { this._listeners[i].tracepointPromptInvoked(breakpoint); } else { this._listeners[i].conditionPromptInvoked(breakpoint); } } }; BreakpointController.prototype.documentUrlChanged = function (doc) { var breakpoints = this.getBreakpoints(doc); for (var i = 0; i < breakpoints.length; i++) { for (var j = 0; j < this._listeners.length; j++) { this._listeners[j].breakpointChanged(breakpoints[i]); } } }; BreakpointController.prototype.breakpointChanged = function (breakpoint, previousId) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(342 /* Debugger_BreakpointController_BreakpointChanged_Start */); for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].breakpointChanged(breakpoint, previousId); } this._debuggerManager.testEventObject.fireEvent("breakpointChanged"); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(343 /* Debugger_BreakpointController_BreakpointChanged_Stop */); }; BreakpointController.prototype.updateBreakpointLocations = function (doc) { var bps = this.getBreakpoints(doc); for (var i = 0; i < bps.length; i++) { var breakpoint = bps[i]; var newBP = new Debugger.Breakpoint(breakpoint.breakpointId, breakpoint.rawLocation, breakpoint.eventTypes, breakpoint.location, breakpoint.url, breakpoint.isBound); this.resolveBreakpointById(breakpoint.breakpointId, newBP); } }; BreakpointController.prototype.toggleAll = function () { if (!this.areAnyBreakpointsDisabled()) { this.setAllEnabledStates(false); } else { this.setAllEnabledStates(true); } }; BreakpointController.prototype.areAnyBreakpointsDisabled = function () { var breakpoints = this.getBreakpoints(); for (var id in breakpoints) { var breakpoint = breakpoints[id]; if (!breakpoint.isEnabled) { return true; } } return false; }; BreakpointController.prototype.afterBreakpointAdded = function (breakpoint, showTracepointDialog) { if (breakpoint) { if (this.getIndex(breakpoint) === -1) { this._breakpoints.push(breakpoint); if (showTracepointDialog) { breakpoint.isTracepoint = true; for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].tracepointPromptInvoked(breakpoint); } } for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].breakpointAdded(breakpoint); } this._persistenceManager.saveState(); } return breakpoint.breakpointId; } return null; }; BreakpointController.prototype.getIndex = function (breakpoint) { for (var i = 0; i < this._breakpoints.length; i++) { if (breakpoint.equals(this._breakpoints[i])) { return i; } } return -1; }; BreakpointController.prototype.addPendingCodeBreakpoint = function (breakpointInfo) { var _this = this; this._debuggerManager.addPendingBreakpoint(breakpointInfo.url, breakpointInfo.rawLocation.start, breakpointInfo.condition, breakpointInfo.isEnabled, breakpointInfo.isTracepoint).done(function (breakpointId) { if (breakpointId) { var source = new Debugger.Source(0, 0, false, breakpointInfo.url, "text/javascript", 0, false, null); var location = new Debugger.DocumentLocation(new Debugger.Doc(source), breakpointInfo.oneBasedStartLine, breakpointInfo.oneBasedStartColumn); var breakpoint = new Debugger.Breakpoint(breakpointId, breakpointInfo.rawLocation, null, location, breakpointInfo.displayUrl, false); breakpoint.isEnabled = breakpointInfo.isEnabled; breakpoint.isTracepoint = breakpointInfo.isTracepoint; breakpoint.condition = breakpointInfo.condition; _this._breakpoints.push(breakpoint); for (var i = 0; i < _this._listeners.length; i++) { _this._listeners[i].pendingBreakpointAdded(breakpoint); } } }); }; BreakpointController.prototype.addPendingEventBreakpoint = function (breakpointInfo, tempEventBreakpointStorage) { var _this = this; var existingBreakpoint = this.getExistingEventBreakpoint(breakpointInfo.eventTypes, tempEventBreakpointStorage); if (!existingBreakpoint) { tempEventBreakpointStorage.push({ eventTypes: breakpointInfo.eventTypes }); this._debuggerManager.addEventBreakpoint(breakpointInfo.eventTypes, breakpointInfo.isEnabled, breakpointInfo.condition, breakpointInfo.isTracepoint).done(function (breakpoint) { _this._breakpoints.push(breakpoint); for (var i = 0; i < _this._listeners.length; i++) { _this._listeners[i].breakpointAdded(breakpoint); } }); } }; BreakpointController.prototype.getExistingEventBreakpoint = function (eventTypes, breakpoints) { if (typeof breakpoints === "undefined") { breakpoints = this._breakpoints; } var existingBreakpoint = null; for (var i = 0; i < breakpoints.length; i++) { var breakpoint = breakpoints[i]; if (breakpoint.eventTypes && breakpoint.eventTypes.length > 0 && breakpoint.eventTypes.length === eventTypes.length) { existingBreakpoint = breakpoint; for (var j = 0; j < eventTypes.length; j++) { if (eventTypes[j] !== breakpoint.eventTypes[j]) { existingBreakpoint = null; break; } } if (existingBreakpoint) { break; } } } return existingBreakpoint; }; return BreakpointController; })(); Debugger.BreakpointController = BreakpointController; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // breakpointWindowRow.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var BreakpointWindowRow = (function () { function BreakpointWindowRow(breakpoint, window, controller) { var _this = this; this.breakpoint = breakpoint; this._window = window; this._controller = controller; this.rootElement = document.createElement("div"); this.checkbox = document.createElement("input"); this.icon = document.createElement("span"); this.text = document.createElement("a"); this.editButton = this.createButton("bpEditButton", this.breakpoint.isTracepoint ? "BreakpointsContextMenuAddTraceMessage" : "EditButtonTooltip", function (e) { return _this.activateEditBox(); }); this.deleteButton = this.createButton("bpDeleteButton", "DeleteButtonTooltip", function (e) { return _this._window.onDeleteBreakpointRow(_this); }); var linkContainer = document.createElement("span"); var controlsContainer = document.createElement("span"); this.rootElement.className = "bpRow"; this.checkbox.className = "bpCheckbox"; this.icon.className = "bpIcon"; this.text.className = "bpLink"; this.checkbox.type = "checkbox"; this.icon.textContent = " "; linkContainer.className = "bpText"; controlsContainer.className = "bpItemControls"; this.rootElement.appendChild(this.checkbox); this.rootElement.appendChild(this.icon); linkContainer.appendChild(this.text); this.rootElement.appendChild(linkContainer); controlsContainer.appendChild(this.editButton); controlsContainer.appendChild(this.deleteButton); this.rootElement.appendChild(controlsContainer); this.rootElement.tabIndex = -1; this.checkbox.tabIndex = -1; this.rootElement.addEventListener("contextmenu", this.onContextMenu.bind(this)); this.checkbox.addEventListener("click", this.onCheckboxClicked.bind(this)); this.text.addEventListener("click", this.navigateToBreakpointLocation.bind(this)); this.rootElement.addEventListener("click", this.onClick.bind(this)); this.rootElement.addEventListener("dblclick", this.navigateToBreakpointLocation.bind(this)); this.rootElement.addEventListener("keydown", this.onKeyDown.bind(this)); } BreakpointWindowRow.prototype.activateEditBox = function () { this._window.unselectAll(); this.select(); this._window.promptToSetConditionOrTracepoint(this.breakpoint); return false; }; BreakpointWindowRow.prototype.refresh = function () { this.checkbox.checked = this.breakpoint.isEnabled; this.icon.className = this.breakpoint.getGlyphClassName() + (this.breakpoint.isBound ? "" : " bpUnbound") + (this.breakpoint.isEnabled ? "" : " bpDisabled") + " bpIcon"; this.text.textContent = this.breakpoint.toString(); this.text.setAttribute("data-plugin-vs-tooltip", this.breakpoint.tooltipText); this.editButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString(this.breakpoint.isTracepoint ? "BreakpointsContextMenuAddTraceMessage" : "EditButtonTooltip")); var ariaLabel = ""; if (!this.breakpoint.isEnabled) { ariaLabel = Plugin.Resources.getString("/Common/Disabled") + ", "; } if (!this.breakpoint.isBound) { ariaLabel = Plugin.Resources.getString("UnboundBreakpoint") + ", "; } if (this.breakpoint.eventTypes && this.breakpoint.eventTypes.length > 0) { if (this.breakpoint.isTracepoint) { ariaLabel += Plugin.Resources.getString("EventTracepoint"); } else if (this.breakpoint.condition) { ariaLabel += Plugin.Resources.getString("ConditionalEventBreakpoint"); } else { ariaLabel += Plugin.Resources.getString("EventBreakpoint"); } if (!this.breakpoint.isBound && this.breakpoint.isEnabled) { var unboundReason = Plugin.Resources.getString("EventBreakpointUnboundDocMode"); ariaLabel = unboundReason + ", "; this.icon.setAttribute("data-plugin-vs-tooltip", unboundReason); } else { this.icon.removeAttribute("data-plugin-vs-tooltip"); } } else { if (this.breakpoint.isTracepoint) { ariaLabel += Plugin.Resources.getString("Tracepoint"); } else if (this.breakpoint.condition) { ariaLabel += Plugin.Resources.getString("ConditionalBreakpointTitle"); } else { ariaLabel += Plugin.Resources.getString("BreakpointLabel"); } } ariaLabel += ", " + this.breakpoint.toString(true); this.rootElement.setAttribute("aria-label", ariaLabel); }; BreakpointWindowRow.prototype.select = function () { if (!this.isSelected()) { this._window.addToSelection(this); this.rootElement.classList.add("selected"); } this._window.selectedBreakpointRow = this; }; BreakpointWindowRow.prototype.isSelected = function () { return this.rootElement.classList.contains("selected"); }; BreakpointWindowRow.prototype.unselect = function () { this.rootElement.classList.remove("selected"); this._window.removeFromSelection(this); }; BreakpointWindowRow.prototype.createButton = function (className, tooltipResourceName, clickHandler) { var buttonDiv = document.createElement("div"); var buttonIconDiv = document.createElement("div"); buttonDiv.className = className + " iconShell_18x18"; buttonIconDiv.className = "buttonIcon icon_14x14"; buttonDiv.appendChild(buttonIconDiv); Common.ButtonHelpers.setupButton(buttonDiv, tooltipResourceName, clickHandler); return buttonDiv; }; BreakpointWindowRow.prototype.navigateToBreakpointLocation = function (e) { if (e.button === 0) { this.select(); this._controller.navigateToBreakpoint(this.breakpoint); e.stopImmediatePropagation(); return false; } return true; }; BreakpointWindowRow.prototype.onContextMenu = function (e) { if (this.rootElement === e.target || this.rootElement === e.target.parentElement || this.rootElement === e.target.parentElement.parentElement) { if (!this.isSelected()) { this._window.unselectAll(); this.select(); } var x = 0; var y = 0; if (e instanceof MouseEvent) { x = e.pageX; y = e.pageY; } if (x <= 0 && y <= 0) { var offset = e.target.getBoundingClientRect(); x = offset.left; y = offset.top; } this._window.showContextMenu(x, y, this.breakpoint, this.rootElement); } e.preventDefault(); e.stopImmediatePropagation(); }; BreakpointWindowRow.prototype.onClick = function (e) { if (this.isSelected() && (e.ctrlKey || e.shiftKey)) { this.unselect(); } else { if (!e.ctrlKey && !e.shiftKey && this._window.isMultipleSelection()) { this._window.unselectAll(); } this.select(); } }; BreakpointWindowRow.prototype.onCheckboxClicked = function (e) { if (!this.isSelected()) { this._window.unselectAll(); } this.select(); this._window.setEnabledStateForSelection(!this.breakpoint.isEnabled); e.stopPropagation(); }; BreakpointWindowRow.prototype.onKeyDown = function (e) { if (e.keyCode === 121 /* F10 */ && e.shiftKey && !e.ctrlKey && !e.altKey) { this.onContextMenu(e); } }; return BreakpointWindowRow; })(); Debugger.BreakpointWindowRow = BreakpointWindowRow; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // breakpointWindow.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var BreakpointWindow = (function () { function BreakpointWindow(debuggerShell, controller, rootElement) { var _this = this; this._changesCompletedRegistrations = {}; this._deleteAllBreakpointsButton = rootElement.querySelector("#deleteAllBreakpointsButton"); this._toggleAllBreakpointsButton = rootElement.querySelector("#toggleAllBreakpointsButton"); this._addEventBreakpointButton = rootElement.querySelector("#addEventBreakpointButton"); this._addEventTracepointButton = rootElement.querySelector("#addEventTracepointButton"); Common.ButtonHelpers.setupButton(this._deleteAllBreakpointsButton, "BreakpointsDeleteAllButton", function (e) { return _this._controller.deleteAll(); }, false); Common.ButtonHelpers.setupButton(this._toggleAllBreakpointsButton, "BreakpointsDisableAllToggleButtonTooltip", function (e) { return _this.toggleAll(); }, false); Common.ButtonHelpers.setupButton(this._addEventBreakpointButton, "BreakpointsAddEventBreakpointButtonTooltip", function (e) { return _this.createEventBreakpoint(); }, true); Common.ButtonHelpers.setupButton(this._addEventTracepointButton, "BreakpointsAddEventTracepointButtonTooltip", function (e) { return _this.createEventTracepoint(); }, true); this._breakpointGrid = rootElement.querySelector(".breakpointgrid"); this._rootElement = rootElement; this._rows = []; this._selectedRows = []; this._controller = controller; document.body.addEventListener("click", function (e) { if (_this._menuTargetRow) { _this._menuTargetRow.classList.remove("contextTarget"); _this._menuTargetRow = null; } }); this._rootElement.addEventListener("keydown", function (e) { return _this.onKeyDown(e); }); this._setConditionPrompt = new Debugger.SetConditionPrompt(debuggerShell, document.getElementById("root"), function (value, breakpoint) { return _this._controller.setBreakpointCondition(breakpoint, value, false); }, function (breakpoint) { }, false); this._setTracepointPrompt = new Debugger.SetConditionPrompt(debuggerShell, document.getElementById("root"), function (value, breakpoint) { return _this._controller.setBreakpointCondition(breakpoint, value, true); }, function (breakpoint) { if (breakpoint.condition === "") { _this._controller.deleteBreakpoint(breakpoint); } }, true); this._addEventBreakpointPrompt = new Debugger.AddEventBreakpointPrompt(debuggerShell, document.getElementById("root"), function (eventTypes, condition) { _this._controller.addEventBreakpoint(eventTypes, condition, false); }, function () { }, false); this._addEventTracepointPrompt = new Debugger.AddEventBreakpointPrompt(debuggerShell, document.getElementById("root"), function (eventTypes, condition) { _this._controller.addEventBreakpoint(eventTypes, condition, true); }, function () { }, true); document.addEventListener("keydown", this.updateSpecialKeysState.bind(this)); document.addEventListener("keyup", this.updateSpecialKeysState.bind(this)); } Object.defineProperty(BreakpointWindow.prototype, "focusedBreakpointRow", { get: function () { return this._focusedBreakpointRow; }, set: function (breakpointRow) { for (var index = 0; index < this._rows.length; index++) { this._rows[index].rootElement.tabIndex = -1; } breakpointRow.rootElement.tabIndex = 1; this._focusedBreakpointRow = breakpointRow; breakpointRow.rootElement.focus(); }, enumerable: true, configurable: true }); Object.defineProperty(BreakpointWindow.prototype, "selectedBreakpointRow", { get: function () { return this._selectedBreakpointRow; }, set: function (breakpointRow) { this._selectedBreakpointRow = breakpointRow; this.focusedBreakpointRow = breakpointRow; }, enumerable: true, configurable: true }); BreakpointWindow.prototype.showContextMenu = function (x, y, breakpoint, targetRow) { if (this._menuTargetRow) { this._menuTargetRow.classList.remove("contextTarget"); this._menuTargetRow = null; } this._menuBreakpoint = breakpoint; this._menuTargetRow = targetRow; this._menuTargetRow.classList.add("contextTarget"); if (this._contextMenu) { this._contextMenu.dispose(); this._contextMenu = null; } this._contextMenu = Plugin.ContextMenu.create(this.createMenuItems(breakpoint), "breakpointMenu"); this._contextMenu.show(x, y); }; BreakpointWindow.prototype.promptToSetConditionOrTracepoint = function (breakpoint) { var _this = this; window.setImmediate(function () { if (breakpoint.isTracepoint) { _this._setTracepointPrompt.activate(breakpoint); } else { _this._setConditionPrompt.activate(breakpoint); } }); }; BreakpointWindow.prototype.breakpointAdded = function (breakpoint) { var _this = this; this.addBreakpointToView(breakpoint); if (breakpoint.location) { this._changesCompletedRegistrations[breakpoint.breakpointId] = breakpoint.location.changesCompleted.addHandler(function () { var row = _this.getRowFromBreakpoint(breakpoint); if (row) { row.refresh(); } }); } }; BreakpointWindow.prototype.pendingBreakpointAdded = function (breakpoint) { this.addBreakpointToView(breakpoint); }; BreakpointWindow.prototype.breakpointRemoved = function (breakpoint) { var row = this.getRowFromBreakpoint(breakpoint); if (row) { row.unselect(); this._breakpointGrid.removeChild(row.rootElement); this._rows.splice(this._rows.indexOf(row), 1); } if (this._rows.length === 0) { Common.ButtonHelpers.changeButtonStatus(this._deleteAllBreakpointsButton, false); Common.ButtonHelpers.changeButtonStatus(this._toggleAllBreakpointsButton, false); } var oldRegistration = this._changesCompletedRegistrations[breakpoint.breakpointId]; if (oldRegistration) { oldRegistration.unregister(); this._changesCompletedRegistrations[breakpoint.breakpointId] = null; } }; BreakpointWindow.prototype.breakpointChanged = function (breakpoint) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(344 /* Debugger_BreakpointWindow_BreakpointChanged_Start */); var row = this.getRowFromBreakpoint(breakpoint); if (row) { row.refresh(); } if (this._controller.areAnyBreakpointsDisabled()) { this._toggleAllBreakpointsButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("BreakpointsEnableAllToggleButtonTooltip")); this._toggleAllBreakpointsButton.setAttribute("aria-label", Plugin.Resources.getString("BreakpointsEnableAllToggleButtonTooltip")); } else { this._toggleAllBreakpointsButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("BreakpointsDisableAllToggleButtonTooltip")); this._toggleAllBreakpointsButton.setAttribute("aria-label", Plugin.Resources.getString("BreakpointsDisableAllToggleButtonTooltip")); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(345 /* Debugger_BreakpointWindow_BreakpointChanged_Stop */); }; BreakpointWindow.prototype.conditionPromptInvoked = function (breakpoint) { this._setConditionPrompt.activate(breakpoint); }; BreakpointWindow.prototype.tracepointPromptInvoked = function (breakpoint) { this._setTracepointPrompt.activate(breakpoint); }; BreakpointWindow.prototype.setEnabledStateForSelection = function (state) { for (var index = 0; index < this._selectedRows.length; index++) { this._controller.setEnabledState(this._selectedRows[index].breakpoint, state); } }; BreakpointWindow.prototype.selectAll = function () { for (var index = 0; index < this._rows.length; index++) { var row = this._rows[index]; if (!row.isSelected()) { row.select(); } } }; BreakpointWindow.prototype.unselectAll = function () { for (var index = 0; index < this._rows.length; index++) { this._rows[index].unselect(); } }; BreakpointWindow.prototype.onDeleteBreakpointRow = function (breakpointRow) { if (breakpointRow) { if (this.isMultipleSelection() && breakpointRow.isSelected()) { this.deleteBreakpointsSelection(); } else { this.unselectAll(); this.deleteBreakpoint(breakpointRow); } } }; BreakpointWindow.prototype.toggleAll = function () { this._controller.toggleAll(); }; BreakpointWindow.prototype.createEventBreakpoint = function () { this._addEventBreakpointPrompt.activate(); }; BreakpointWindow.prototype.createEventTracepoint = function () { this._addEventTracepointPrompt.activate(); }; BreakpointWindow.prototype.addToSelection = function (breakpointRow) { if (!this._isAltKeyPressed && this._selectedRows.indexOf(breakpointRow) === -1) { if (!this._isCtrlKeyPressed && !this._isShiftKeyPressed) { this.unselectAll(); } if (this._isShiftKeyPressed && !this._isCtrlKeyPressed) { var selectedBreakpointIndex = this._rows.indexOf(this.selectedBreakpointRow); var currentBreakpointIndex = this._rows.indexOf(breakpointRow); if (selectedBreakpointIndex >= 0 && currentBreakpointIndex >= 0) { var startIndex = selectedBreakpointIndex < currentBreakpointIndex ? selectedBreakpointIndex : currentBreakpointIndex; var endIndex = selectedBreakpointIndex < currentBreakpointIndex ? currentBreakpointIndex : selectedBreakpointIndex; for (var index = startIndex; index <= endIndex; index++) { var currentBreakpointRow = this._rows[index]; if (!currentBreakpointRow.isSelected()) { this._selectedRows.push(currentBreakpointRow); currentBreakpointRow.select(); } } } } else if (!this._isShiftKeyPressed) { this._selectedRows.push(breakpointRow); } } }; BreakpointWindow.prototype.removeFromSelection = function (breakpointRow) { var index = this._selectedRows.indexOf(breakpointRow); if (index >= 0) { this._selectedRows.splice(index, 1); } }; BreakpointWindow.prototype.isMultipleSelection = function () { return this._selectedRows.length > 1; }; BreakpointWindow.prototype.deleteBreakpoint = function (breakpointRow) { if (this._rows.length > 1) { if (this._rows.indexOf(breakpointRow) !== this._rows.length - 1) { this.selectNextBreakpoint(breakpointRow); } else { this.selectPreviousBreakpoint(breakpointRow); } } this._controller.deleteBreakpoint(breakpointRow.breakpoint); }; BreakpointWindow.prototype.deleteBreakpointsSelection = function () { var lastSelectedRowIndex = -1; for (var index = this._rows.length - 1; index >= 0; index--) { if (this._rows[index].isSelected()) { lastSelectedRowIndex = index; break; } } var selectBreakpointRow; if (lastSelectedRowIndex !== this._rows.length - 1) { selectBreakpointRow = this._rows[lastSelectedRowIndex + 1]; } var deleteCandidates = this._selectedRows; for (var index = deleteCandidates.length - 1; index >= 0; index--) { this._controller.deleteBreakpoint(deleteCandidates[index].breakpoint); } if (this._rows.length > 0) { if (selectBreakpointRow) { selectBreakpointRow.select(); } else { this._rows[this._rows.length - 1].select(); } } }; BreakpointWindow.prototype.addBreakpointToView = function (breakpoint) { var row = new Debugger.BreakpointWindowRow(breakpoint, this, this._controller); this._rows.push(row); this._breakpointGrid.appendChild(row.rootElement); this.breakpointChanged(breakpoint); if (this._rows.length === 1) { row.rootElement.tabIndex = 1; this.selectedBreakpointRow = row; } if (!Common.ButtonHelpers.isEnabled(this._deleteAllBreakpointsButton)) { Common.ButtonHelpers.changeButtonStatus(this._deleteAllBreakpointsButton, true); Common.ButtonHelpers.changeButtonStatus(this._toggleAllBreakpointsButton, true); } }; BreakpointWindow.prototype.createMenuItems = function (breakpoint) { var _this = this; var menuItems = []; menuItems.push({ id: "menuItemGoToBreakpointWindow", callback: function (menuId, menuItem) { return _this.onGoToBreakpoint(menuId, menuItem); }, label: Plugin.Resources.getString("BreakpointsContextMenuGoTo"), type: 1 /* command */, disabled: function () { return _this.isMultipleSelection() || !breakpoint.isBound || !breakpoint.location; } }); menuItems.push({ id: "menuItemSep1BreakpointWindow", type: 3 /* separator */ }); menuItems.push({ id: "menuItemAddTraceOrConditionBreakpointWindow", callback: function (menuId, menuItem) { return _this.onEditBreakpoint(menuId, menuItem); }, label: breakpoint.isTracepoint ? Plugin.Resources.getString("BreakpointsContextMenuAddTraceMessage") : Plugin.Resources.getString("BreakpointsContextMenuAddCondition"), type: 1 /* command */, accessKey: Plugin.Resources.getString("/Common/AccessKeyAltF9"), disabled: function () { return _this.isMultipleSelection(); } }); menuItems.push({ id: "menuItemCopyBreakpointWindow", callback: function () { return _this.copySelection(); }, label: Plugin.Resources.getString("BreakpointsContextMenuCopy"), type: 1 /* command */ }); menuItems.push({ id: "menuItemDeleteBreakpointWindow", callback: function (menuId, menuItem) { return _this.onDeleteBreakpoint(menuId, menuItem); }, label: Plugin.Resources.getString("BreakpointsContextMenuDelete"), type: 1 /* command */, accessKey: Plugin.Resources.getString("/Common/AccessKeyF9") }); menuItems.push({ id: "menuItemDeleteAllBreakpointWindow", callback: function (menuId, menuItem) { return _this.onDeleteAllBreakpoints(menuId, menuItem); }, label: Plugin.Resources.getString("BreakpointsConextMenuDeleteAll"), type: 1 /* command */ }); menuItems.push({ id: "menuItemSep2BreakpointWindow", type: 3 /* separator */ }); menuItems.push({ id: "menuItemEnableBreakpointWindow", callback: function () { return _this.setEnabledStateForSelection(true); }, label: Plugin.Resources.getString("BreakpointsContextMenuEnable"), type: 1 /* command */, disabled: function () { return breakpoint.isEnabled; }, accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlF9") }); menuItems.push({ id: "menuItemDisableBreakpointWindow", callback: function () { return _this.setEnabledStateForSelection(false); }, label: Plugin.Resources.getString("BreakpointsContextMenuDisable"), type: 1 /* command */, disabled: function () { return !breakpoint.isEnabled; }, accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlF9") }); menuItems.push({ id: "menuItemEnableAllBreakpointWindow", callback: function (menuId, menuItem) { return _this.onEnableAllBreakpoints(menuId, menuItem); }, label: Plugin.Resources.getString("BreakpointsContextMenuEnableAll"), type: 1 /* command */ }); menuItems.push({ id: "menuItemDisableAllBreakpointWindow", callback: function (menuId, menuItem) { return _this.onDisableAllBreakpoints(menuId, menuItem); }, label: Plugin.Resources.getString("BreakpointsContextMenuDisableAll"), type: 1 /* command */ }); return menuItems; }; BreakpointWindow.prototype.onGoToBreakpoint = function (menuId, menuItem) { var _this = this; window.setImmediate(function () { _this._controller.navigateToBreakpoint(_this._menuBreakpoint); }); }; BreakpointWindow.prototype.onEditBreakpoint = function (menuId, menuItem) { this.getRowFromBreakpoint(this._menuBreakpoint).activateEditBox(); }; BreakpointWindow.prototype.onDeleteBreakpoint = function (menuId, menuItem) { this.onDeleteBreakpointRow(this.getRowFromBreakpoint(this._menuBreakpoint)); }; BreakpointWindow.prototype.onDeleteAllBreakpoints = function (menuId, menuItem) { this._controller.deleteAll(); }; BreakpointWindow.prototype.onEnableAllBreakpoints = function (menuId, menuItem) { this._controller.setAllEnabledStates(true); }; BreakpointWindow.prototype.onDisableAllBreakpoints = function (menuId, menuItem) { this._controller.setAllEnabledStates(false); }; BreakpointWindow.prototype.copySelection = function () { var copyString = ""; for (var index = 0; index < this._selectedRows.length; index++) { copyString += this._selectedRows[index].breakpoint.toString() + "\r\n"; } window.clipboardData.setData("Text", copyString); }; BreakpointWindow.prototype.onKeyDown = function (e) { var handled = false; switch (e.keyCode) { case 65 /* A */: if (e.ctrlKey && !e.shiftKey && !e.altKey) { this.selectAll(); handled = true; } break; case 67 /* C */: if (e.ctrlKey && !e.shiftKey && !e.altKey) { this.copySelection(); handled = true; } break; case 32 /* Space */: if (this.selectedBreakpointRow && this.selectedBreakpointRow === this.focusedBreakpointRow) { this.setEnabledStateForSelection(!this.selectedBreakpointRow.breakpoint.isEnabled); handled = true; } else if (this.focusedBreakpointRow) { this.focusedBreakpointRow.select(); handled = true; } break; case 13 /* Enter */: if (!this.isMultipleSelection() && this.selectedBreakpointRow) { this._controller.navigateToBreakpoint(this.selectedBreakpointRow.breakpoint); handled = true; } break; case 46 /* Delete */: this.onDeleteBreakpointRow(this.selectedBreakpointRow); handled = true; break; case 40 /* ArrowDown */: if (this.focusedBreakpointRow) { if (e.ctrlKey && !e.altKey && !e.shiftKey) { this.focusNextBreakpoint(this.focusedBreakpointRow); } else if (!e.ctrlKey && !e.altKey && e.shiftKey && this.focusedBreakpointRow.isSelected() && this.isNextBreakpointSelected(this.focusedBreakpointRow)) { this.focusedBreakpointRow.unselect(); this.selectNextBreakpoint(this.focusedBreakpointRow); } else { if (!e.shiftKey && !e.ctrlKey && this.isMultipleSelection()) { this.unselectAll(); } this.selectNextBreakpoint(this.focusedBreakpointRow); } handled = true; } break; case 38 /* ArrowUp */: if (this.focusedBreakpointRow) { if (e.ctrlKey && !e.altKey && !e.shiftKey) { this.focusPreviousBreakpoint(this.focusedBreakpointRow); } else if (!e.ctrlKey && !e.altKey && e.shiftKey && this.focusedBreakpointRow.isSelected() && this.isPreviousBreakpointSelected(this.focusedBreakpointRow)) { this.focusedBreakpointRow.unselect(); this.selectPreviousBreakpoint(this.focusedBreakpointRow); } else { if (!e.shiftKey && !e.ctrlKey && this.isMultipleSelection()) { this.unselectAll(); } this.selectPreviousBreakpoint(this.focusedBreakpointRow); } handled = true; } break; case 120 /* F9 */: if (this.selectedBreakpointRow) { if (e.ctrlKey && !e.altKey && !e.shiftKey) { this.setEnabledStateForSelection(!this.selectedBreakpointRow.breakpoint.isEnabled); handled = true; } else if (!e.ctrlKey && e.altKey && !e.shiftKey) { this._controller.promptToModifyConditionOrTracepoint(this.selectedBreakpointRow.breakpoint); handled = true; } else if (!e.ctrlKey && !e.altKey && !e.shiftKey) { this.onDeleteBreakpointRow(this.selectedBreakpointRow); handled = true; } } break; } if (handled) { e.preventDefault(); e.stopPropagation(); return false; } return true; }; BreakpointWindow.prototype.selectNextBreakpoint = function (breakpointRowCurrent) { var index = this._rows.indexOf(breakpointRowCurrent); if (index < this._rows.length - 1) { this._rows[index + 1].select(); } }; BreakpointWindow.prototype.selectPreviousBreakpoint = function (breakpointRowCurrent) { var index = this._rows.indexOf(breakpointRowCurrent); if (index > 0) { this._rows[index - 1].select(); } }; BreakpointWindow.prototype.focusNextBreakpoint = function (breakpointRowFocused) { var index = this._rows.indexOf(breakpointRowFocused); if (index < this._rows.length - 1) { this.focusedBreakpointRow = this._rows[index + 1]; } }; BreakpointWindow.prototype.focusPreviousBreakpoint = function (breakpointRowFocused) { var index = this._rows.indexOf(breakpointRowFocused); if (index > 0) { this.focusedBreakpointRow = this._rows[index - 1]; } }; BreakpointWindow.prototype.isNextBreakpointSelected = function (breakpointRowCurrent) { var index = this._rows.indexOf(breakpointRowCurrent); if (index < this._rows.length - 1) { return this._rows[index + 1].isSelected(); } return false; }; BreakpointWindow.prototype.isPreviousBreakpointSelected = function (breakpointRowCurrent) { var index = this._rows.indexOf(breakpointRowCurrent); if (index > 0) { return this._rows[index - 1].isSelected(); } return false; }; BreakpointWindow.prototype.getRowFromBreakpoint = function (breakpoint) { for (var i = 0; i < this._rows.length; i++) { if (this._rows[i].breakpoint.equals(breakpoint)) { return this._rows[i]; } } return null; }; BreakpointWindow.prototype.updateSpecialKeysState = function (e) { this._isCtrlKeyPressed = e.ctrlKey; this._isShiftKeyPressed = e.shiftKey; this._isAltKeyPressed = e.altKey; }; return BreakpointWindow; })(); Debugger.BreakpointWindow = BreakpointWindow; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // lightDismissPopup.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var LightDismissPopup = (function () { function LightDismissPopup(container, firstElementInTabOrder, lastElementInTabOrder, cancelCallback, openF1HelpCallback) { var _this = this; this.container = container; this.container.style.display = "none"; this.container.classList.add("lightDismissPromptContainer"); this._subContainer = document.createElement("div"); this._subContainer.className = "popupInnerContainer"; this.container.appendChild(this._subContainer); this._firstElementInTabOrder = firstElementInTabOrder; this._lastElementInTabOrder = lastElementInTabOrder; this._cancelCallback = cancelCallback ? cancelCallback : function () { }; this._focusOutListener = function (e) { if (e.target === document.activeElement) { _this.hideControl(); } return false; }; this._documentClickListener = function (e) { if (e.target !== _this.container && !_this.container.contains(e.target)) { _this.hideControl(); } return false; }; this._documentKeydownListener = function (e) { if (e.keyCode === 27 /* Escape */) { _this._cancelCallback(); _this.hideControl(); e.stopImmediatePropagation(); e.preventDefault(); return false; } else if (e.keyCode === 112 /* F1 */) { return (openF1HelpCallback ? openF1HelpCallback() : true); } }; this._popupKeydownListener = function (e) { var handled = false; if (e.keyCode === 9 /* Tab */) { if (e.target === _this._firstElementInTabOrder && e.shiftKey) { _this._lastElementInTabOrder.focus(); handled = true; } else if (e.target === _this._lastElementInTabOrder && !e.shiftKey) { _this._firstElementInTabOrder.focus(); handled = true; } } if (handled) { e.stopPropagation(); e.preventDefault(); return false; } }; } Object.defineProperty(LightDismissPopup.prototype, "subContainer", { get: function () { return this._subContainer; }, enumerable: true, configurable: true }); LightDismissPopup.prototype.showControl = function () { var _this = this; if (!this._isVisible) { this.container.style.display = "block"; this._isVisible = true; window.setImmediate(function () { document.addEventListener("focusout", _this._focusOutListener, true); document.addEventListener("click", _this._documentClickListener, true); document.addEventListener("keydown", _this._documentKeydownListener, true); _this.container.addEventListener("keydown", _this._popupKeydownListener); }); } }; LightDismissPopup.prototype.hideControl = function () { var _this = this; if (this._isVisible) { window.setImmediate(function () { _this.container.style.display = "none"; _this._isVisible = false; document.removeEventListener("focusout", _this._focusOutListener, true); document.removeEventListener("click", _this._documentClickListener, true); document.removeEventListener("keydown", _this._documentKeydownListener, true); _this.container.removeEventListener("keydown", _this._popupKeydownListener); }); } }; return LightDismissPopup; })(); Debugger.LightDismissPopup = LightDismissPopup; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // setConditionPrompt.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var SetConditionPrompt = (function (_super) { __extends(SetConditionPrompt, _super); function SetConditionPrompt(debuggerShell, parent, dataEnteredCallback, _canceledCallback, isTracepoint) { var container = document.createElement("div"); this.container = container; this._debuggerShell = debuggerShell; container.className = "lightDismissPromptContainer " + (isTracepoint ? "setTracepointContainer" : "setConditionContainer"); parent.insertBefore(container, parent.firstElementChild); this._dataEnteredCallback = dataEnteredCallback; this._canceledCallback = _canceledCallback; this._inputBox = document.createElement("input"); var okButton = document.createElement("button"); var cancelButton = document.createElement("button"); _super.call(this, container, this._inputBox, cancelButton, this.cancel); var title = document.createElement("div"); title.textContent = Plugin.Resources.getString(isTracepoint ? "TracepointMessageTitle" : "ConditionalBreakpointTitle"); var instructions = document.createElement("div"); instructions.textContent = Plugin.Resources.getString(isTracepoint ? "TracepointInstructions" : "ConditionalBreakpointInstructions"); var inputContainer = document.createElement("div"); inputContainer.className = "popupInputContainer"; var buttonContainer = document.createElement("div"); buttonContainer.className = "popupButtonContainer"; var label = document.createElement("div"); label.textContent = Plugin.Resources.getString(isTracepoint ? "TracepointLabel" : "ConditionalBreakpointLabel"); this._inputBox.className = "promptInputBox"; this._inputBox.addEventListener("keypress", this.onKeyPress.bind(this)); okButton.addEventListener("click", this.submit.bind(this)); okButton.innerText = Plugin.Resources.getString("OkButtonLabel"); okButton.className = "okButton"; cancelButton.addEventListener("click", this.cancel.bind(this)); cancelButton.innerText = Plugin.Resources.getString("CancelButtonLabel"); cancelButton.className = "cancelButton"; cancelButton.type = "button"; this.subContainer.appendChild(title); this.subContainer.appendChild(instructions); inputContainer.appendChild(label); inputContainer.appendChild(this._inputBox); this.subContainer.appendChild(inputContainer); buttonContainer.appendChild(okButton); buttonContainer.appendChild(cancelButton); this.subContainer.appendChild(buttonContainer); } SetConditionPrompt.prototype.activate = function (breakpoint) { var _this = this; this._breakpoint = breakpoint; this._inputBox.value = breakpoint.condition; this.container.style.top = ""; this.showControl(); var consoleTop = this._debuggerShell.getConsoleTop(); var dialogRect = this.container.getBoundingClientRect(); var dialogHeight = dialogRect.height + 6; var containerTop = dialogRect.top + dialogHeight; if (consoleTop < containerTop) { this.container.style.top = consoleTop - dialogHeight + "px"; } window.setImmediate(function () { _this._inputBox.focus(); _this._inputBox.setSelectionRange(0, _this._inputBox.value.length); }); }; SetConditionPrompt.prototype.submit = function () { this.hideControl(); this._dataEnteredCallback(this._inputBox.value, this._breakpoint); }; SetConditionPrompt.prototype.cancel = function () { this.hideControl(); this._canceledCallback(this._breakpoint); }; SetConditionPrompt.prototype.onKeyPress = function (e) { if (e.keyCode === 13 /* Enter */) { this.submit(); e.stopPropagation(); e.preventDefault(); return false; } return true; }; return SetConditionPrompt; })(Debugger.LightDismissPopup); Debugger.SetConditionPrompt = SetConditionPrompt; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // addEventBreakpointPrompt.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var AddEventBreakpointPrompt = (function (_super) { __extends(AddEventBreakpointPrompt, _super); function AddEventBreakpointPrompt(debuggerShell, parent, dataEnteredCallback, _canceledCallback, isTracepoint) { var _this = this; var container = document.createElement("div"); this._container = container; this._debuggerShell = debuggerShell; this._isTracepointPrompt = isTracepoint; container.className = "lightDismissPromptContainer " + (isTracepoint ? "addEventTracepointContainer" : "addEventBreakpointContainer"); parent.insertBefore(container, parent.firstElementChild); this._dataEnteredCallback = dataEnteredCallback; this._canceledCallback = _canceledCallback; container.addEventListener("keypress", this.onKeyPress.bind(this)); this._selectBox = document.createElement("select"); this._cancelButton = document.createElement("button"); _super.call(this, container, this._selectBox, this._cancelButton, this.cancel, this.openLinkHelp.bind(this)); var title = document.createElement("div"); title.textContent = Plugin.Resources.getString(isTracepoint ? "AddEventTracepointDialogTitle" : "AddEventBreakpointDialogTitle"); this.subContainer.appendChild(title); var instructions = document.createElement("div"); instructions.textContent = Plugin.Resources.getString(isTracepoint ? "EventTracepointInstructions" : "EventBreakpointInstructions"); this.subContainer.appendChild(instructions); var inputContainer = document.createElement("div"); inputContainer.className = "popupInputContainer withHelp"; inputContainer.style.msGridRows = "auto 9px auto"; this.subContainer.appendChild(inputContainer); var eventLabel = document.createElement("div"); eventLabel.textContent = Plugin.Resources.getString("AddEventBreakpointDialogEventLabel"); inputContainer.appendChild(eventLabel); this._selectBox.className = "promptInputBox"; this._selectBox.style.msGridColumnSpan = "3"; inputContainer.appendChild(this._selectBox); var label = document.createElement("div"); label.textContent = Plugin.Resources.getString(isTracepoint ? "TracepointLabel" : "ConditionalBreakpointLabel"); label.style.msGridRow = "3"; inputContainer.appendChild(label); this._inputBox = document.createElement("input"); this._inputBox.className = "promptInputBox"; this._inputBox.setAttribute("aria-label", label.textContent); this._inputBox.style.msGridRow = "3"; inputContainer.appendChild(this._inputBox); var helpButton = document.createElement("button"); helpButton.className = "promptHelpButton"; helpButton.textContent = "?"; helpButton.style.msGridRow = "3"; helpButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString(isTracepoint ? "EventTracepointsHelpButtonTooltip" : "EventBreakpointsHelpButtonTooltip")); helpButton.addEventListener("click", function () { _this.openLinkHelp(); }); inputContainer.appendChild(helpButton); var buttonContainer = document.createElement("div"); buttonContainer.className = "popupButtonContainer"; this.container.appendChild(buttonContainer); var okButton = document.createElement("button"); okButton.addEventListener("click", this.submit.bind(this)); okButton.innerText = Plugin.Resources.getString("EventBreakpointsDialogAddButton"); okButton.className = "okButton"; buttonContainer.appendChild(okButton); this._cancelButton.addEventListener("click", this.cancel.bind(this)); this._cancelButton.innerText = Plugin.Resources.getString("CancelButtonLabel"); this._cancelButton.className = "cancelButton"; this._cancelButton.type = "button"; buttonContainer.appendChild(this._cancelButton); } AddEventBreakpointPrompt.prototype.populateEventSelections = function (descriptions) { if (this._eventSelectionsPopulated) { return; } this._eventSelectionsPopulated = true; var optionGroup = document.createElement("optgroup"); optionGroup.label = Plugin.Resources.getString(descriptions.collectionsTitleLocId); for (var i = 0; i < descriptions.collections.length; i++) { var collection = descriptions.collections[i]; var option = document.createElement("option"); option.innerText = Plugin.Resources.getString(collection.titleLocId); option.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString(collection.tooltipLocId)); option.value = JSON.stringify(collection.eventKeys); optionGroup.appendChild(option); } this._selectBox.appendChild(optionGroup); for (var i = 0; i < descriptions.categories.length; i++) { var category = descriptions.categories[i]; var optionGroup = document.createElement("optgroup"); optionGroup.label = Plugin.Resources.getString(category.titleLocId); for (var j = 0; j < category.events.length; j++) { var event = category.events[j]; var option = document.createElement("option"); option.innerText = Debugger.BreakpointController.getStringForEventBreakpointType(event.eventKey); option.value = JSON.stringify([event.eventKey]); optionGroup.appendChild(option); } this._selectBox.appendChild(optionGroup); } }; AddEventBreakpointPrompt.prototype.activate = function () { var _this = this; this.populateEventSelections(Debugger.BreakpointController.eventBreakpointDescriptions); this._inputBox.value = ""; this._container.style.top = ""; this.showControl(); var consoleTop = this._debuggerShell.getConsoleTop(); var dialogRect = this._container.getBoundingClientRect(); var dialogHeight = dialogRect.height + 6; var containerTop = dialogRect.top + dialogHeight; if (consoleTop < containerTop) { this._container.style.top = consoleTop - dialogHeight + "px"; } window.setImmediate(function () { _this._selectBox.focus(); }); }; AddEventBreakpointPrompt.prototype.openLinkHelp = function () { Plugin.F12.openBrowser(this._isTracepointPrompt ? "http://go.microsoft.com/fwlink/?LinkID=331335" : "http://go.microsoft.com/fwlink/?LinkID=331334"); return false; }; AddEventBreakpointPrompt.prototype.submit = function () { this.hideControl(); var value = this._selectBox.value && JSON.parse(this._selectBox.value); if (value && !this._isTracepointPrompt || this._inputBox.value) { this._dataEnteredCallback(value, this._inputBox.value); } else { this.cancel(); } }; AddEventBreakpointPrompt.prototype.cancel = function () { this.hideControl(); this._canceledCallback(); }; AddEventBreakpointPrompt.prototype.onKeyPress = function (e) { if (e.keyCode === 13 /* Enter */) { if (this._isTracepointPrompt && document.activeElement === this._selectBox && !this._inputBox.value) { this._inputBox.focus(); return true; } if (e.target !== this._cancelButton) { this.submit(); e.stopPropagation(); e.preventDefault(); return false; } } return true; }; return AddEventBreakpointPrompt; })(Debugger.LightDismissPopup); Debugger.AddEventBreakpointPrompt = AddEventBreakpointPrompt; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // eventBreakpointDescriptions.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // DocumentLocation.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DocumentLocation = (function () { function DocumentLocation(doc, startLine, startColumn, endDoc, endLine, endColumn, rawLocation) { Tools.Utility.Assert.isTrue(startLine > 0 && startColumn > 0); this._startPosition = { doc: doc, line: startLine, column: startColumn }; this._endPosition = this._startPosition; if (endDoc instanceof Debugger.Doc && typeof endLine === "number" && typeof endColumn === "number") { this._endPosition = { doc: endDoc, line: endLine, column: endColumn }; } if (rawLocation) { this._rawLocation = rawLocation; } else if (doc) { var startRawLocation = this._startPosition.doc.getRawLocation(this._startPosition); var endRawLocation = this._endPosition.doc.getRawLocation(this._endPosition); if (startRawLocation && endRawLocation) { Tools.Utility.Assert.areEqual(startRawLocation.doc, endRawLocation.doc, "Can't create a DocumentLocation from different raw documents"); this._rawLocation = { doc: startRawLocation.doc, offset: startRawLocation.offset, length: endRawLocation.offset - startRawLocation.offset }; } } } Object.defineProperty(DocumentLocation.prototype, "rawLocation", { get: function () { return this._rawLocation; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "startPosition", { get: function () { return this._startPosition; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "endPosition", { get: function () { return this._endPosition; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "startDisplayText", { get: function () { return DocumentLocation.getPositionDisplayText(this._startPosition); }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "endDisplayText", { get: function () { return DocumentLocation.getPositionDisplayText(this._endPosition); }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "lineNumber", { get: function () { return this._startPosition.line; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "column", { get: function () { return this._startPosition.column; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "startLineNumber", { get: function () { return this._startPosition.line; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "startColumn", { get: function () { return this._startPosition.column; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "endLineNumber", { get: function () { return this._endPosition.line; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentLocation.prototype, "endColumn", { get: function () { return this._endPosition.column; }, enumerable: true, configurable: true }); DocumentLocation.getPositionDisplayText = function (displayPosition) { return Plugin.Resources.getString("DocumentPositionFormat", Common.ToolWindowHelpers.createShortenedUrlText(displayPosition.doc.url), displayPosition.line, displayPosition.column); }; DocumentLocation.areEqual = function (location1, location2) { return location1.rawLocation.doc === location2.rawLocation.doc && location1.rawLocation.offset === location2.rawLocation.offset && location1.rawLocation.length === location2.rawLocation.length && location1.startPosition.line === location2.startPosition.line && location1.startPosition.column === location2.startPosition.column && location1.endPosition.line === location2.endPosition.line && location1.endPosition.column === location2.endPosition.column; }; return DocumentLocation; })(); Debugger.DocumentLocation = DocumentLocation; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // CommonConverters.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var CommonConverters = (function () { function CommonConverters() { } CommonConverters.initialize = function () { CommonConverters.NotDisabledToTrue = CommonConverters.notDisabledToTrueConverter(); CommonConverters.OnToTrue = CommonConverters.onToTrueConverter(); CommonConverters.ToExceptionClass = CommonConverters.exceptionFilterToClassNameConverter(); CommonConverters.ToPrettyPrintTooltip = CommonConverters.tristateTooltip("PrettyPrintButtonOn", "PrettyPrintButtonOff", "PrettyPrintButtonTooltip"); CommonConverters.ToWordWrapTooltip = CommonConverters.tristateTooltip("WordWrapOffButtonTooltip", "WordWrapOnButtonTooltip", "WordWrapButtonOffTooltip"); CommonConverters.ToJMCToolTip = CommonConverters.boolTooltip("JustMyCodeDebugAllCodeTooltip", "JustMyCodeDebugMyCodeTooltip"); CommonConverters.ToSourceMapTooltip = CommonConverters.tristateTooltip("SourceMapOnButtonTooltip", "SourceMapOffButtonTooltip", "SourceMapButtonOffTooltip"); CommonConverters.ToExceptionFilterNone = CommonConverters.exceptionFilterStateConverter(0 /* None */); CommonConverters.ToExceptionFilterUnhandled = CommonConverters.exceptionFilterStateConverter(1 /* Unhandled */); CommonConverters.ToExceptionFilterHandled = CommonConverters.exceptionFilterStateConverter(2 /* Handled */); }; CommonConverters.exceptionFilterToClassNameConverter = function () { return { convertTo: function (filter) { switch (filter) { case 2 /* Handled */: return "breakOnExceptionsButton breakAll"; case 0 /* None */: return "breakOnExceptionsButton breakNone"; case 1 /* Unhandled */: return "breakOnExceptionsButton breakUnhandled"; default: return "breakOnExceptionsButton"; } }, convertFrom: null }; }; CommonConverters.tristateTooltip = function (onResourceKey, offResourceKey, disabledResourceKey) { return { convertTo: function (from) { switch (from) { case 0 /* On */: return Plugin.Resources.getString(onResourceKey); case 1 /* Off */: return Plugin.Resources.getString(offResourceKey); case 2 /* Disabled */: case undefined: case null: return Plugin.Resources.getString(disabledResourceKey); default: F12.Tools.Utility.Assert.fail("Unexpected"); } }, convertFrom: null }; }; CommonConverters.boolTooltip = function (trueResourceKey, falseResourceKey) { return { convertTo: function (from) { return Plugin.Resources.getString(from ? trueResourceKey : falseResourceKey); }, convertFrom: null }; }; CommonConverters.notDisabledToTrueConverter = function () { return { convertTo: function (from) { return (from !== 2 /* Disabled */ && from !== null && typeof from !== "undefined"); }, convertFrom: null }; }; CommonConverters.onToTrueConverter = function () { return { convertTo: function (from) { return from === 0 /* On */; }, convertFrom: function (to) { return to ? 0 /* On */ : 1 /* Off */; } }; }; CommonConverters.exceptionFilterStateConverter = function (destinationFilter) { return { convertTo: function (from) { return from === destinationFilter; }, convertFrom: null }; }; return CommonConverters; })(); Debugger.CommonConverters = CommonConverters; CommonConverters.initialize(); })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // executionController.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var ExecutionController = (function () { function ExecutionController(debuggerManager) { var _this = this; this.propertyChanged = new Common.EventSource(); this._debuggerManager = debuggerManager; this._persistenceManager = this._debuggerManager.persistenceManager; this._listeners = []; this._executionPaused = false; this._isDebuggingDisabled = (Plugin.F12 && Plugin.F12.Profiler.getIsProfiling()); this._breakOnAnyNewWorkerStartingEnabled = false; this._breakState = this._isDebuggingDisabled ? 2 /* Disabled */ : 1 /* Off */; this._debuggerStateAlertElement = document.getElementById(ExecutionController.ARIA_ALERT_ZONE_ID); this._profilingStartedHandler = function (e) { _this.onProfilingStateChange(true); }; this._profilingStoppedHandler = function (e) { _this.onProfilingStateChange(false); }; } Object.defineProperty(ExecutionController.prototype, "debuggerManager", { get: function () { return this._debuggerManager; }, enumerable: true, configurable: true }); Object.defineProperty(ExecutionController.prototype, "isExecutionPaused", { get: function () { return this._executionPaused; }, set: function (v) { var _this = this; if (v !== this._executionPaused) { var promise = Plugin.Promise.as(null); if (v) { promise = this.removeAnyPseudoBreakpoint(); } promise.done(function () { _this._executionPaused = v; _this.breakStateChanged(); _this.propertyChanged.invoke("isExecutionPaused"); }); } }, enumerable: true, configurable: true }); Object.defineProperty(ExecutionController.prototype, "isDebuggingDisabled", { get: function () { return this._isDebuggingDisabled; }, set: function (v) { if (v !== this._isDebuggingDisabled) { this._isDebuggingDisabled = v; this.breakStateChanged(); this.propertyChanged.invoke("isDebuggingDisabled"); } }, enumerable: true, configurable: true }); Object.defineProperty(ExecutionController.prototype, "breakState", { get: function () { return this._breakState; }, set: function (value) { if (this._breakState !== value) { this._breakState = value; this.propertyChanged.invoke("breakState"); } }, enumerable: true, configurable: true }); Object.defineProperty(ExecutionController.prototype, "exceptionFilter", { get: function () { return this._exceptionFilter; }, enumerable: true, configurable: true }); Object.defineProperty(ExecutionController.prototype, "breakOnAnyNewWorkerStartingEnabled", { get: function () { return this._breakOnAnyNewWorkerStartingEnabled; }, set: function (value) { var _this = this; if (this._breakOnAnyNewWorkerStartingEnabled !== value) { this._breakOnAnyNewWorkerStartingEnabled = value; this.propertyChanged.invoke("breakOnAnyNewWorkerStartingEnabled"); this._debuggerManager.causeBreak(this._breakOnAnyNewWorkerStartingEnabled ? 1 /* BreakOnAnyNewWorkerStarting */ : 3 /* UnsetBreakOnAnyNewWorkerStarting */).done(function () { _this._debuggerManager.testEventObject.fireEvent("breakOnNewWorkerToggled"); }); } }, enumerable: true, configurable: true }); ExecutionController.isStepAction = function (breakResumeAction) { switch (breakResumeAction) { case 2 /* StepInto */: case 3 /* StepOver */: case 4 /* StepOut */: case 6 /* StepDocument */: return true; break; case 0 /* Abort */: case 1 /* Continue */: case 5 /* Ignore */: return false; break; default: Tools.Utility.Assert.fail("Unknown BreakResumeAction"); break; } return false; }; ExecutionController.areISourceLocationsEqual = function (s1, s2) { return (s1 && s2 && s1.docId === s2.docId && s1.start === s2.start && s1.length === s2.length); }; ExecutionController.prototype.initialize = function () { if (Plugin.F12) { Plugin.F12.addEventListener("profilingstarted", this._profilingStartedHandler); Plugin.F12.addEventListener("profilingstopped", this._profilingStoppedHandler); } this.onProfilingStateChange(this._isDebuggingDisabled); this.reinitialize(); }; ExecutionController.prototype.uninitialize = function () { if (Plugin.F12) { Plugin.F12.removeEventListener("profilingstarted", this._profilingStartedHandler); Plugin.F12.removeEventListener("profilingstopped", this._profilingStoppedHandler); } }; ExecutionController.prototype.reinitialize = function () { var filterValue = this._persistenceManager.getSetting(ExecutionController.EXCEPTION_FILTER_KEY); var filterId = parseInt(filterValue, 10); this._exceptionFilter = null; if (!isNaN(filterId)) { this.setExceptionFilter(filterId); } else { this.setExceptionFilter(1 /* Unhandled */); } }; ExecutionController.prototype.setExceptionFilter = function (v) { var _this = this; var promise = Plugin.Promise.wrap(null); if (v !== this._exceptionFilter) { promise = this._debuggerManager.setExceptionFilter(v).then(function (success) { if (success) { _this._exceptionFilter = v; for (var i = 0; i < _this._listeners.length; i++) { _this._listeners[i].exceptionFilterChanged(_this._exceptionFilter); } _this.propertyChanged.invoke("exceptionFilter"); _this._persistenceManager.setSetting(ExecutionController.EXCEPTION_FILTER_KEY, "" + v); _this._persistenceManager.saveState(); } }); } return promise; }; ExecutionController.prototype.registerListener = function (listener) { this._listeners.push(listener); }; ExecutionController.prototype.continueExecution = function () { var _this = this; if (this._debuggerManager.isBreakCompleted) { this._debuggerManager.resume(1 /* Continue */).done(function (success) { _this._debuggerManager.testEventObject.fireEvent("debuggerRunning"); if (success) { _this.isExecutionPaused = false; } }); } }; ExecutionController.prototype.breakAny = function () { var _this = this; if (!this._debuggerManager.isBreakCompleted && !this.isDebuggingDisabled) { this.shouldIgnoreBreaks = false; this._debuggerManager.causeBreak(0 /* BreakOnAny */).done(function () { for (var i = 0; i < _this._listeners.length; i++) { _this._listeners[i].breakCallComplete(); } _this.breakState = 0 /* On */; }); } }; ExecutionController.prototype.stepInto = function () { var _this = this; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(302 /* Debugger_StepInto_Start */); if (this._debuggerManager.isBreakCompleted) { this._debuggerManager.resume(2 /* StepInto */).done(function (success) { if (success) { _this.isExecutionPaused = false; } }); } }; ExecutionController.prototype.stepOut = function () { var _this = this; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(303 /* Debugger_StepOut_Start */); if (this._debuggerManager.isBreakCompleted) { this._debuggerManager.resume(4 /* StepOut */).done(function (success) { if (success) { _this.isExecutionPaused = false; } }); } }; ExecutionController.prototype.stepOver = function () { var _this = this; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(301 /* Debugger_StepOver_Start */); if (this._debuggerManager.isBreakCompleted) { this._debuggerManager.resume(3 /* StepOver */).done(function (success) { if (success) { _this.isExecutionPaused = false; } }); } }; ExecutionController.prototype.abort = function () { var _this = this; if (this._debuggerManager.isBreakCompleted) { this._debuggerManager.resume(0 /* Abort */).done(function (success) { if (success) { _this.isExecutionPaused = false; } }); } }; ExecutionController.prototype.stepDocument = function () { var _this = this; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(348 /* Debugger_StepDocument_Start */); if (this._debuggerManager.isBreakCompleted) { this._debuggerManager.resume(6 /* StepDocument */).done(function (success) { if (success) { _this.isExecutionPaused = false; } }); } }; ExecutionController.prototype.canSetNextStatement = function (location) { if (this.isDebuggingDisabled || !location.startPosition.doc.isRuntimeDoc || !this._debuggerManager.isBreakCompleted) { return Plugin.Promise.wrap(false); } return this._debuggerManager.canSetNextStatement(location); }; ExecutionController.prototype.setNextStatement = function (location) { var _this = this; if (this.isDebuggingDisabled || !location.startPosition.doc.isRuntimeDoc) { return Plugin.Promise.wrap(false); } return new Plugin.Promise(function (completed, error) { _this._debuggerManager.setNextStatement(location).done(function (success) { if (!success) { _this._debuggerManager.debuggerShell.editorWindow.addSetNextStatementErrorViewZone(location); } else { _this._debuggerManager.debuggerShell.editorWindow.destroyExceptionDisplays(); } completed(success); }); }); }; ExecutionController.prototype.runToCursor = function (doc, position) { var _this = this; if (this.isDebuggingDisabled || !doc.isRuntimeDoc) { return; } this.removeAnyPseudoBreakpoint().done(function () { var location = new Debugger.DocumentLocation(doc, position.lineNumber, position.column); _this._debuggerManager.addCodeBreakpoint(location, true).done(function (breakpoint) { if (breakpoint) { _this._pseudoBreakpoint = breakpoint; } _this.continueExecution(); }); }); }; ExecutionController.prototype.removeAnyPseudoBreakpoint = function (doc) { var removed = Plugin.Promise.wrap(null); if (this._pseudoBreakpoint && (!doc || doc === this._pseudoBreakpoint.location.startPosition.doc)) { if (!this._debuggerManager.breakpointController.hasBreakpointWithId(this._pseudoBreakpoint.breakpointId)) { if (this._debuggerManager.isAttached) { removed = this._debuggerManager.removeBreakpoint(this._pseudoBreakpoint.breakpointId); } } this._pseudoBreakpoint = null; } return removed; }; ExecutionController.prototype.updateAlertMessage = function () { if (this._debuggerStateAlertElement) { var textNode = this._debuggerStateAlertElement.firstChild; if (textNode) { this._debuggerStateAlertElement.removeChild(textNode); } this._debuggerStateAlertElement.innerText = this.isExecutionPaused ? Plugin.Resources.getString("PausedInDebuggerAlert") : ""; } }; ExecutionController.prototype.breakStateChanged = function () { for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].breakStateChanged(this._executionPaused, this._isDebuggingDisabled); } this.updateAlertMessage(); this.breakState = (!this._executionPaused && !this._isDebuggingDisabled) ? 1 /* Off */ : 2 /* Disabled */; }; ExecutionController.prototype.onProfilingStateChange = function (isProfiling) { var _this = this; var promise = Plugin.Promise.wrap(!isProfiling); if (Plugin.F12) { if (isProfiling) { this._debuggerManager.asyncStackProvider.stopSession(); this.continueExecution(); this._debuggerManager.breakpointController.unresolveAllBreakpoints(); Debugger.DebuggerShell.showErrorDisplay("ProfilingRunningMessage", undefined, 0, "http://go.microsoft.com/fwlink/?LinkId=290645"); } else { Debugger.DebuggerShell.closeErrorDisplay("ProfilingRunningMessage"); if (this._debuggerManager.isAttached) { this._debuggerManager.asyncStackProvider.startSession(); promise = this._debuggerManager.enableDynamicDebugging(); } } } promise.done(function (result) { _this.isDebuggingDisabled = (result !== 0 /* Succeeded */); }); }; ExecutionController.EXCEPTION_FILTER_KEY = "DebuggerExceptionFilter"; ExecutionController.ARIA_ALERT_ZONE_ID = "debuggerAriaAlertZone"; return ExecutionController; })(); Debugger.ExecutionController = ExecutionController; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // debuggerToolbar.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DebuggerToolbar = (function () { function DebuggerToolbar(controller) { var _this = this; this._controller = controller; this._exceptionMenu = new Common.Controls.MenuControl(); this._exceptionMenu.model = this._controller; this._exceptionMenu.menuItemsTemplateId = "Debugger.exceptionMenuDropDown"; this._exceptionMenu.dismissOnMenuItemClick = true; document.getElementById("toolbar").appendChild(this._exceptionMenu.rootElement); this._exceptionMenu.addClickHandlerToMenuItem("breakOnNoneMenuItem", function () { return _this.setExceptionFilter(0 /* None */); }); this._exceptionMenu.addClickHandlerToMenuItem("breakOnUnhandledExceptionsMenuItem", function () { return _this.setExceptionFilter(1 /* Unhandled */); }); this._exceptionMenu.addClickHandlerToMenuItem("breakOnAllExceptionsMenuItem", function () { return _this.setExceptionFilter(2 /* Handled */); }); this._toolbar = new Common.Controls.ToolbarControl("Common.toolbarTemplateWithSearchBox"); this._toolbar.title = Plugin.Resources.getString("DebuggerTitle"); this._toolbar.model = this._controller; this._toolbar.panelTemplateId = "Debugger.debuggerButtonsPanel"; document.getElementById("toolbar").appendChild(this._toolbar.rootElement); this._toolbar.addClickHandlerToButton("continueButton", function (e) { return _this._controller.continueExecution(); }); this._breakButton = this._toolbar.getNamedElement("breakButton").control; this._toolbar.addClickHandlerToButton("breakButton", function (e) { _this._breakButton.isChecked = true; _this._controller.breakAny(); }); this._toolbar.addClickHandlerToButton("stepIntoButton", function (e) { return _this._controller.stepInto(); }); this._toolbar.addClickHandlerToButton("stepOverButton", function (e) { return _this._controller.stepOver(); }); this._toolbar.addClickHandlerToButton("stepOutButton", function (e) { return _this._controller.stepOut(); }); this._breakWorkerButton = this._toolbar.getNamedElement("breakWorkerButton").control; this._breakOnExceptionButton = this._toolbar.getNamedElement("breakOnExceptionButton").control; this._exceptionMenu.targetButtonElement = this._breakOnExceptionButton.rootElement; this._prettyPrintButton = this._toolbar.getNamedElement("prettyPrintButton").control; this._wordWrapButton = this._toolbar.getNamedElement("wordWrapButton").control; this._jmcButton = this._toolbar.getNamedElement("jmcButton").control; this._breakOnExceptionButton.rootElement.addEventListener("keydown", function (e) { if (_this._breakOnExceptionButton.isEnabled && e.keyCode === 40 /* ArrowDown */ && e.ctrlKey) { _this._breakOnExceptionButton.click.invoke(e); return false; } return true; }); document.addEventListener("keydown", function (e) { return _this.onKeyDown(e); }); document.addEventListener("keyup", function (e) { return _this.onKeyUp(e); }); document.addEventListener("focusout", function (e) { return _this.onFocusOut(e); }); if (Plugin.F12) { Plugin.F12.addEventListener("browsershortcut", function (e) { return _this.onBrowserShortcut(e); }); Plugin.F12.addEventListener("keydown", function (e) { if (_this.onBrowserShortcut(e)) { _this.onKeyDown(e); } }); } } DebuggerToolbar.prototype.getActiveElement = function () { return this._toolbar.getActiveElement(); }; DebuggerToolbar.prototype.getButton = function (id) { id = id.toLowerCase(); switch (id) { case "break": return this._breakButton.rootElement; case "breakonexception": return this._breakOnExceptionButton.rootElement; case "breakworker": return this._breakWorkerButton.rootElement; case "prettyprint": return this._prettyPrintButton.rootElement; case "wordwrap": return this._wordWrapButton.rootElement; case "jmc": return this._jmcButton.rootElement; case "stepinto": return this._toolbar.getNamedElement("stepIntoButton"); case "stepover": return this._toolbar.getNamedElement("stepOverButton"); case "stepout": return this._toolbar.getNamedElement("stepOutButton"); case "continue": return this._toolbar.getNamedElement("continueButton"); case "sourcemap": return this._toolbar.getNamedElement("sourceMapButton"); default: return null; } }; DebuggerToolbar.prototype.setExceptionFilter = function (filter) { this._controller.setExceptionFilter(filter); }; DebuggerToolbar.prototype.waitThenBeginIgnoringBreaks = function () { var _this = this; this._timerIdF5Pressed = window.setTimeout(function () { _this._controller.shouldIgnoreBreaks = true; _this._controller.continueExecution(); }, DebuggerToolbar.F5_CONTINUE_TIMEOUT); }; DebuggerToolbar.prototype.stopIgnoringBreaks = function () { this._controller.shouldIgnoreBreaks = false; if (this._timerIdF5Pressed) { window.clearTimeout(this._timerIdF5Pressed); this._timerIdF5Pressed = 0; } }; DebuggerToolbar.prototype.onKeyUp = function (e) { if (e.keyCode === 116 /* F5 */ || e.keyCode === 119 /* F8 */) { this.stopIgnoringBreaks(); return false; } return true; }; DebuggerToolbar.prototype.onKeyDown = function (e) { var handled = false; if (!Common.HasAnyOfAltCtrlShiftKeyFlags(e)) { if (e.keyCode === 116 /* F5 */ || e.keyCode === 119 /* F8 */) { if (!this._timerIdF5Pressed) { this.waitThenBeginIgnoringBreaks(); this._controller.continueExecution(); } handled = true; } else if (e.keyCode === 121 /* F10 */) { this._controller.stepOver(); handled = true; } else if (e.keyCode === 122 /* F11 */) { this._controller.stepInto(); handled = true; } } else if (e.keyCode === 122 /* F11 */ && e.shiftKey && !e.ctrlKey && !e.altKey) { this._controller.stepOut(); handled = true; } else if (e.keyCode === 69 /* E */ && e.ctrlKey && e.shiftKey && !e.altKey) { if (this._breakOnExceptionButton.isEnabled) { this._exceptionMenu.show(); handled = true; } } else if (e.keyCode === 66 /* B */ && e.ctrlKey && e.shiftKey && !e.altKey) { this._controller.breakAny(); handled = true; } else if (e.keyCode === 87 /* W */ && e.ctrlKey && e.shiftKey && !e.altKey) { this._breakWorkerButton.isChecked = !this._breakWorkerButton.isChecked; handled = true; } else if (e.keyCode === 87 /* W */ && e.altKey && !e.ctrlKey && !e.shiftKey) { this._wordWrapButton.isChecked = !this._wordWrapButton.isChecked; handled = true; } else if (e.keyCode === 74 /* J */ && !e.altKey && e.ctrlKey && !e.shiftKey) { this._jmcButton.isChecked = !this._jmcButton.isChecked; handled = true; } else if (e.keyCode === 77 /* M */ && !e.altKey && e.ctrlKey && e.shiftKey) { this._controller.debuggerManager.documentController.toggleSourceMapsForCurrentDoc(); handled = true; } if (handled) { e.preventDefault(); e.stopImmediatePropagation(); return false; } return true; }; DebuggerToolbar.prototype.onFocusOut = function (e) { this.stopIgnoringBreaks(); }; DebuggerToolbar.prototype.onBrowserShortcut = function (e) { if (e.ctrlKey && e.shiftKey && !e.altKey && e.keyCode === 80 /* P */) { if (this._prettyPrintButton.isEnabled) { this._prettyPrintButton.isChecked = !this._prettyPrintButton.isChecked; return false; } } if (e.ctrlKey && !e.shiftKey && !e.altKey && e.keyCode === 76 /* L */) { if (!this._controller.debuggerManager.debuggerShell.filePicker.isOpen) { if (this._controller.debuggerManager.documentController.currentDoc) { this._controller.debuggerManager.documentController.currentDoc.setIsLibraryFile(!this._controller.debuggerManager.documentController.currentDoc.isLibraryFile); } return false; } } return true; }; DebuggerToolbar.F5_CONTINUE_TIMEOUT = Plugin.F12.getDoubleClickTime() * 1.5; return DebuggerToolbar; })(); Debugger.DebuggerToolbar = DebuggerToolbar; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // jmcController.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var JMCController = (function () { function JMCController(debuggerManager) { this.propertyChanged = new Common.EventSource(); this._debuggerManager = debuggerManager; this._persistenceManager = debuggerManager.persistenceManager; this._listeners = []; this._jmcUrlCache = {}; this._isJustMyCodeAvailable = true; this._isJustMyCodeEnabled = this._persistenceManager.getSettingAsBoolean(JMCController.JMC_SETTINGS_KEY, true); } Object.defineProperty(JMCController.prototype, "debuggerManager", { get: function () { return this._debuggerManager; }, enumerable: true, configurable: true }); Object.defineProperty(JMCController.prototype, "isJustMyCodeAvailable", { get: function () { return this._isJustMyCodeAvailable; }, enumerable: true, configurable: true }); Object.defineProperty(JMCController.prototype, "isJustMyCodeEnabled", { get: function () { return this._isJustMyCodeAvailable && this._isJustMyCodeEnabled; }, set: function (value) { if (value !== this._isJustMyCodeEnabled) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(349 /* Debugger_ToggleJMC_Start */); this._isJustMyCodeEnabled = value; this._persistenceManager.setSettingAsBoolean(JMCController.JMC_SETTINGS_KEY, this._isJustMyCodeEnabled); this._persistenceManager.saveState(); for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].justMyCodeStateChanged(value); } this._debuggerManager.jmcBreakController.justMyCodeStateChanged(value); this.propertyChanged.invoke("isJustMyCodeEnabled"); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(350 /* Debugger_ToggleJMC_Stop */); } }, enumerable: true, configurable: true }); JMCController.prototype.registerListener = function (listener) { this._listeners.push(listener); }; JMCController.prototype.initialize = function () { var _this = this; Plugin.F12.Communications.addEventListener("jmcAvailabilityChanged", function (e) { return _this.onJMCAvailabilityChanged(e); }); Plugin.F12.Communications.addEventListener("jmcRulesChanged", function (e) { return _this.onJMCRulesChanged(e); }); return this.checkAvailability(); }; JMCController.prototype.getJMCTypeForUrl = function (url) { var _this = this; var type = this._jmcUrlCache[url]; if (typeof type !== "undefined") { return type; } this._jmcUrlCache[url] = Plugin.F12.JMCType.UserCode; Plugin.F12.JMC.getJMCTypeForUrl(url).done(function (type) { _this.updateJMCCache(url, type); }); return this._jmcUrlCache[url]; }; JMCController.prototype.setJMCTypeForUrl = function (url, type) { var _this = this; var oldType = this._jmcUrlCache[url]; if (oldType !== type) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(353 /* Debugger_SpecifyUrlAsJMCType_Start */); if (type === Plugin.F12.JMCType.Unsure) { Tools.Utility.Assert.fail("F12 does not support setting a url to the 'Unsure' type"); return Plugin.Promise.wrap(false); } return Plugin.F12.JMC.setJMCTypeForUrl(url, type).then(function (newType) { _this.updateJMCCache(url, newType); if (_this._debuggerManager.executionController.breakState === 0 /* On */) { _this._debuggerManager.executionController.breakAny(); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(354 /* Debugger_SpecifyUrlAsJMCType_Stop */); return Plugin.Promise.wrap(newType !== oldType); }); } return Plugin.Promise.wrap(false); }; JMCController.prototype.documentAdded = function (doc) { }; JMCController.prototype.onJMCAvailabilityChanged = function (e) { this.checkAvailability(); }; JMCController.prototype.onJMCRulesChanged = function (e) { var data = e.customData; this.updateJMCCache(data.url, data.currentType); }; JMCController.prototype.checkAvailability = function () { var _this = this; return Plugin.F12.JMC.isJMCAvailable().then(function (isAvailable) { _this._isJustMyCodeAvailable = isAvailable; _this.propertyChanged.invoke("isJustMyCodeAvailable"); _this.propertyChanged.invoke("isJustMyCodeEnabled"); if (!isAvailable) { return Plugin.F12.JMC.getError(); } return Plugin.Promise.wrap(undefined); }).then(function (error) { if (typeof error !== "undefined") { var resourceId; var message; switch (error.name) { case "jmcLoadError": resourceId = "JMCLoadError"; message = error.message; break; case "jmcSaveError": resourceId = "JMCSaveError"; message = error.message; break; case "jmcParseError": resourceId = "JMCJsonParseError"; message = undefined; break; default: resourceId = "JMCLoadError"; break; } Debugger.DebuggerShell.showErrorDisplay(resourceId, [message]); } }); }; JMCController.prototype.updateJMCCache = function (url, type) { var oldType = this._jmcUrlCache[url]; this._jmcUrlCache[url] = type; var changed = (oldType !== type); if (changed) { var docs = this._debuggerManager.documentController.getDocs(); for (var i in docs) { var doc = docs[i]; var docUrl = (doc.rawDoc && doc.rawDoc.url || doc.url); if (docUrl === url) { this._debuggerManager.documentController.documentLibraryStateChanged(doc); } } } }; JMCController.JMC_SETTINGS_KEY = "isJMCEnabled"; return JMCController; })(); Debugger.JMCController = JMCController; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // jmcBreakController.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var JMCBreakController = (function () { function JMCBreakController(debuggerManager) { this._debuggerManager = debuggerManager; this._beginResumeAction = 1 /* Continue */; this._beginResumeFrames = []; this._latestResumeAction = 1 /* Continue */; this._latestResumeFrames = []; this._libraryCodeDocToAllowStepping = null; this._steppedIntoLibrary = false; this._currentlySteppingThroughDocument = false; this._asyncBreakRequested = false; this._previouslyHitEventType = null; } Object.defineProperty(JMCBreakController.prototype, "isJustMyCodeEnabled", { get: function () { return this._debuggerManager.jmcController.isJustMyCodeEnabled; }, enumerable: true, configurable: true }); JMCBreakController.prototype.justMyCodeStateChanged = function (isEnabled) { if (!isEnabled && this._asyncBreakRequested && this._latestResumeAction === 6 /* StepDocument */) { this._debuggerManager.causeBreak(0 /* BreakOnAny */); } }; JMCBreakController.prototype.setJMCResumeInfo = function (currentFrames, breakResumeAction, ignoringBreak) { if (!this.isJustMyCodeEnabled) { return; } if (ignoringBreak || breakResumeAction === 1 /* Continue */) { this._libraryCodeDocToAllowStepping = null; } else { this._beginResumeAction = breakResumeAction; this._beginResumeFrames = (breakResumeAction !== 1 /* Continue */ ? currentFrames : []); this._currentlySteppingThroughDocument = false; this._asyncBreakRequested = false; this._previouslyHitEventType = null; } this._latestResumeAction = breakResumeAction; this._latestResumeFrames = currentFrames; }; JMCBreakController.prototype.getJMCBreakAction = function (stackFrames, breakReason, breakEventType, isFirstChance, isUserUnhandled) { var breakAction = { ignoreBreak: false, ignoreBreakAction: 1 /* Continue */, activeFrameIndex: -1 }; if (this.isJustMyCodeEnabled && stackFrames.length > 0) { var isEventBreakpoint = (breakReason === 1 /* Breakpoint */ && !!breakEventType); if (breakReason === 0 /* Step */) { this.queryStepAction(stackFrames, breakAction, breakEventType); } if (!breakAction.ignoreBreak) { var doc = this.getDocFromStackFrame(stackFrames[0]); if (doc && doc.isLibraryFile) { switch (breakReason) { case 0 /* Step */: case 5 /* DebuggerHalt */: if (this._libraryCodeDocToAllowStepping !== doc) { breakAction.ignoreBreak = true; breakAction.ignoreBreakAction = 6 /* StepDocument */; this._libraryCodeDocToAllowStepping = null; } else { breakAction.ignoreBreak = false; } if (breakReason === 5 /* DebuggerHalt */) { this._asyncBreakRequested = true; } break; case 6 /* Error */: this.queryErrorAction(doc, stackFrames, isFirstChance, isUserUnhandled, breakAction); break; case 1 /* Breakpoint */: if (isEventBreakpoint) { this.setJMCResumeInfo(stackFrames, 2 /* StepInto */, false); breakAction.ignoreBreak = true; breakAction.ignoreBreakAction = 6 /* StepDocument */; this._currentlySteppingThroughDocument = true; this._previouslyHitEventType = breakEventType; break; } case 2 /* DebuggerBlock */: case 3 /* HostInitiated */: case 7 /* Jit */: case 4 /* LanguageInitiated */: breakAction.ignoreBreak = false; this._libraryCodeDocToAllowStepping = doc; break; default: Tools.Utility.Assert.fail("Unknown BreakReason"); break; } this._steppedIntoLibrary = true; } else { this._libraryCodeDocToAllowStepping = null; if (breakReason === 0 /* Step */ && this._steppedIntoLibrary && Debugger.ExecutionController.isStepAction(this._latestResumeAction)) { if (JMCBreakController.isIStackFrameContained(this._beginResumeFrames, stackFrames, this._previouslyHitEventType, breakEventType)) { if (this._beginResumeFrames.length === stackFrames.length) { breakAction.ignoreBreak = true; breakAction.ignoreBreakAction = this._beginResumeAction; } } else if (this._previouslyHitEventType) { breakAction.ignoreBreak = true; breakAction.ignoreBreakAction = 1 /* Continue */; } } this._steppedIntoLibrary = false; } } if (!breakAction.ignoreBreak) { this._currentlySteppingThroughDocument = false; } else { if (breakAction.ignoreBreakAction === 6 /* StepDocument */ && !this._asyncBreakRequested && !isEventBreakpoint) { var differentDocFound = false; for (var i = 0; i < stackFrames.length; i++) { if (stackFrames[i].location.docId !== stackFrames[0].location.docId) { differentDocFound = true; break; } } if (!differentDocFound) { breakAction.ignoreBreakAction = 1 /* Continue */; this._currentlySteppingThroughDocument = false; } } } } return breakAction; }; JMCBreakController.isIStackFrameContained = function (expectedStack, actualStack, expectedEvent, actualEvent) { var foundExpected = false; if (actualStack.length >= expectedStack.length && expectedStack.length > 0) { foundExpected = true; for (var i = 1; i <= expectedStack.length; i++) { var expectedFrame = expectedStack[expectedStack.length - i]; var actualFrame = actualStack[actualStack.length - i]; if (!Debugger.ExecutionController.areISourceLocationsEqual(expectedFrame.location, actualFrame.location)) { if (i === 1) { if (!expectedEvent || expectedEvent !== actualEvent || expectedFrame.location.docId !== actualFrame.location.docId || expectedFrame.functionName !== actualFrame.functionName) { foundExpected = false; break; } } else { foundExpected = false; break; } } } } return foundExpected; }; JMCBreakController.prototype.getDocFromStackFrame = function (stackFrame) { return this._debuggerManager.documentController.getDocFromRuntimeId(stackFrame.location.docId); }; JMCBreakController.prototype.queryStepAction = function (currentStack, breakAction, breakEventType) { if (this._currentlySteppingThroughDocument) { if (Debugger.ExecutionController.isStepAction(this._latestResumeAction) && Debugger.ExecutionController.isStepAction(this._beginResumeAction) && this._beginResumeAction !== 2 /* StepInto */) { var originalStack = this._beginResumeFrames; var endOfOriginalStack = originalStack[originalStack.length - 1].location.start + originalStack[originalStack.length - 1].location.length; var startOfCurrentStack = currentStack[currentStack.length - 1].location.start; if (JMCBreakController.isIStackFrameContained(originalStack, currentStack, this._previouslyHitEventType, breakEventType) || (originalStack.length === currentStack.length && endOfOriginalStack === startOfCurrentStack)) { breakAction.ignoreBreak = true; breakAction.ignoreBreakAction = 4 /* StepOut */; } else { breakAction.ignoreBreak = false; this._currentlySteppingThroughDocument = false; } } } }; JMCBreakController.prototype.queryErrorAction = function (currentDoc, stackFrames, isFirstChance, isUserUnhandled, breakAction) { var frameId = -1; for (var i = 0; i < stackFrames.length; i++) { var stackDoc = this.getDocFromStackFrame(stackFrames[i]); if (!stackDoc.isLibraryFile || stackFrames[i].isInTryBlock) { frameId = i; break; } } if (frameId === -1) { if (isFirstChance) { this._libraryCodeDocToAllowStepping = currentDoc; } } else if (this.getDocFromStackFrame(stackFrames[frameId]).isLibraryFile && !isUserUnhandled) { var action = (Debugger.ExecutionController.isStepAction(this._latestResumeAction) ? 6 /* StepDocument */ : 1 /* Continue */); breakAction.ignoreBreak = true; breakAction.ignoreBreakAction = action; this._currentlySteppingThroughDocument = true; } else { breakAction.ignoreBreak = false; breakAction.activeFrameIndex = frameId; } }; return JMCBreakController; })(); Debugger.JMCBreakController = JMCBreakController; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // DebuggerIntellisenseProvider.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DebuggerIntellisenseProvider = (function (_super) { __extends(DebuggerIntellisenseProvider, _super); function DebuggerIntellisenseProvider(debuggerManager) { _super.call(this); this._debuggerManager = debuggerManager; this._external = window.external; this._cachedLocalsInfo = null; this._callbackMap = {}; } DebuggerIntellisenseProvider.prototype.getIntellisenseChoices = function (searchExpression, completeCallback, cancelToken, etwKey) { var _this = this; this.fireGetIntellisenseItemsStartEvent(etwKey); if (Plugin.F12.Debugger.getIsAtBreakpointInWorker() || Plugin.F12.Debugger.getIsAtBreakpoint()) { this.getLocalsInfo().done(function (breakpointLocals) { if (!cancelToken.isCanceled) { var context = { searchExpression: searchExpression, searchContext: "window", locals: breakpointLocals.map(function (value) { return value.name; }) }; var expressionTerms = context.searchExpression.split("."); if (expressionTerms.length > 0 && context.locals.indexOf(expressionTerms[0]) >= 0) { context.searchContext = expressionTerms[0]; context.searchExpression = expressionTerms.slice(1).join("."); } var uid = DebuggerIntellisenseProvider.getNextId(); var callbackItem = { completeCallback: completeCallback, cancelToken: cancelToken, etwKey: etwKey }; _this._callbackMap[uid] = callbackItem; _this._debuggerManager.executeBreakModeCommand(DebuggerIntellisenseProvider.createInvoker(uid, context)); } else { _this.fireGetIntellisenseItemsEndEvent(etwKey); completeCallback([]); } }); } else { this.fireGetIntellisenseItemsEndEvent(etwKey); completeCallback([]); } }; DebuggerIntellisenseProvider.prototype.onIntellinsenseRequestComplete = function (uid, results) { if (this._callbackMap.hasOwnProperty(uid)) { var callbackItem = this._callbackMap[uid]; this.fireGetIntellisenseItemsEndEvent(callbackItem.etwKey); if (!callbackItem.cancelToken.isCanceled) { var choices = []; if (results && results.choices) { for (var i = 0; i < results.choices.length; ++i) { if (results.choices[i].name.match(Common.Intellisense.IntellisenseProviderBase.JAVASCRIPT_VALID_JS_VARIABLENAME_REGEX) && results.choices[i].name.indexOf(DebuggerIntellisenseProvider.BROWSERTOOLS_OBJECTS_PREFIX) !== 0) { choices.push(new Common.Intellisense.IntellisenseChoice(results.choices[i].name, results.choices[i].info)); } } } callbackItem.completeCallback(choices); } else { callbackItem.completeCallback([]); } delete this._callbackMap[uid]; } }; DebuggerIntellisenseProvider.prototype.activeFrameChanged = function (frame) { this._cachedLocalsInfo = null; }; DebuggerIntellisenseProvider.prototype.callstacksChanged = function () { }; DebuggerIntellisenseProvider.prototype.navigateTo = function (location) { return Plugin.Promise.wrap(null); }; DebuggerIntellisenseProvider.prototype.fireGetCurrentExpressionStartEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(380 /* Debugger_Intellisense_Provider_Get_Expression_Start */, etwKey); }; DebuggerIntellisenseProvider.prototype.fireGetCurrentExpressionEndEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(381 /* Debugger_Intellisense_Provider_Get_Expression_Stop */, etwKey); }; DebuggerIntellisenseProvider.prototype.fireUpdateIntellisenseStartEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(382 /* Debugger_Intellisense_Provider_Update_Start */, etwKey); }; DebuggerIntellisenseProvider.prototype.fireUpdateIntellisenseEndEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(383 /* Debugger_Intellisense_Provider_Update_Stop */, etwKey); }; DebuggerIntellisenseProvider.createInvoker = function (uid, searchContext) { var invoker = "__BROWSERTOOLS_DEBUGGER.performBreakmodeIntellisense(\"" + uid + "\", \"" + searchContext.searchExpression + "\", window, " + searchContext.searchContext + ", " + JSON.stringify(searchContext.locals) + ")"; return invoker; }; DebuggerIntellisenseProvider.getNextId = function () { return DebuggerIntellisenseProvider.INTELLISENSE_ID_PREFIX + DebuggerIntellisenseProvider.IdCounter++; }; DebuggerIntellisenseProvider.prototype.fireGetIntellisenseItemsStartEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(384 /* Debugger_Intellisense_Provider_Get_Items_Start */, etwKey); }; DebuggerIntellisenseProvider.prototype.fireGetIntellisenseItemsEndEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(385 /* Debugger_Intellisense_Provider_Get_Items_Stop */, etwKey); }; DebuggerIntellisenseProvider.prototype.getLocalsInfo = function () { var _this = this; if (this._cachedLocalsInfo) { return Plugin.Promise.wrap(this._cachedLocalsInfo); } else { return this._debuggerManager.watchController.getLocalsForCurrentStackFrame().then(function (localsInfo) { _this._cachedLocalsInfo = localsInfo; return localsInfo; }); } }; DebuggerIntellisenseProvider.INTELLISENSE_ID_PREFIX = "DebuggerIntellisense:"; DebuggerIntellisenseProvider.IdCounter = 0; DebuggerIntellisenseProvider.BROWSERTOOLS_OBJECTS_PREFIX = "__BROWSERTOOLS"; return DebuggerIntellisenseProvider; })(Common.Intellisense.IntellisenseProviderBase); Debugger.DebuggerIntellisenseProvider = DebuggerIntellisenseProvider; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // DebuggerIntellisenseControl.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DebuggerIntellisenseControl = (function () { function DebuggerIntellisenseControl(intellisenseContext) { var _this = this; this._intellisenseContext = intellisenseContext; this._htmlInputElement = document.createElement("input"); this._htmlInputElement.addEventListener("focusout", function (e) { if (_this._intellisenseContext.intellisenseMenu.isOpen) { e.stopImmediatePropagation(); } }); this._intellisenseContext.uninitialize(); this._intellisenseContext.initialize(this._htmlInputElement); } Object.defineProperty(DebuggerIntellisenseControl.prototype, "inputElement", { get: function () { return this._htmlInputElement; }, enumerable: true, configurable: true }); return DebuggerIntellisenseControl; })(); Debugger.DebuggerIntellisenseControl = DebuggerIntellisenseControl; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // watchController.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var WatchWindowController = (function () { function WatchWindowController(debuggerManager, isDataTip) { var _this = this; this._debuggerManager = debuggerManager; this._persistenceManager = this._debuggerManager.persistenceManager; this.isDataTip = isDataTip; this.view = null; this._watchStore = new Debugger.WatchStore(this); if (!this.isDataTip) { this.disableWatchesWindow(); } if (!this.isDataTip) { var templateName = document.getElementById("intellisenseListBox") ? "intellisenseListBox" : null; this.intellisenseContext = new Common.Intellisense.IntellisenseContext(new Common.Intellisense.InputElementTextEditorBridge(), new Common.Intellisense.IntellisenseMenu(templateName, null, null, null, null, this, this), this._debuggerManager.intellisenseProvider); this.intellisenseControl = new Debugger.DebuggerIntellisenseControl(this.intellisenseContext); this.intellisenseContext.intellisenseProvider.onIntellisenseResultsAvailable = function () { return _this._debuggerManager.testEventObject.fireEvent("onIntellisenseResultsAvailable"); }; } } WatchWindowController.prototype.getWatches = function () { if (this._watchStore) { return this._watchStore.getWatches(); } return []; }; WatchWindowController.prototype.getExpandStates = function () { if (this._watchStore) { return this._watchStore.getExpandStates(); } return []; }; WatchWindowController.prototype.refreshView = function (focus, scrollToBottom) { if (this.view) { this.view.refreshView(focus, scrollToBottom); } }; WatchWindowController.prototype.layout = function () { if (this.view) { this.view.layout(); } }; WatchWindowController.prototype.addWatch = function (newValue) { var watch = this._watchStore.addWatch(newValue); if (!this.isDataTip) { this._persistenceManager.saveState(); this._watchStore.storeExceptionWatchState(); this.refreshAllWatchItems(false, false, true); return Plugin.Promise.wrap(true); } else { return this.evaluateWatch(watch, true); } }; WatchWindowController.prototype.addWatchByCurrentEditorPosition = function () { var position = this._debuggerManager.debuggerShell.editorWindow.editorPosition; var text = ""; var selection = this._debuggerManager.debuggerShell.editorWindow.getEditorSelection(); if (selection && !selection.isEmpty() && selection.containsPosition(position)) { text = this._debuggerManager.debuggerShell.editorWindow.getEditorRangeContents(selection).trim(); } else { var expressionInfo = this._debuggerManager.debuggerShell.editorWindow.dataTips.parseExpression(position); text = expressionInfo.text; text = text.trim(); } if (text) { this._debuggerManager.executionController.debuggerManager.watchController.addWatch(text); return text; } else { this._debuggerManager.watchController.promptToAddWatch(); return null; } }; WatchWindowController.prototype.editWatch = function (uid, newExpression) { var scrollToBottom = this._watchStore.editWatch(uid, newExpression); if (!this.isDataTip) { this._persistenceManager.saveState(); } this._watchStore.storeExceptionWatchState(); this._debuggerManager.watchController.refreshAllWatchItems(true, false, scrollToBottom); }; WatchWindowController.prototype.deleteWatch = function (uid) { this._watchStore.deleteWatch(uid); if (!this.isDataTip) { this._persistenceManager.saveState(); } if (this._debuggerManager) { this._debuggerManager.testEventObject.fireEvent("deleteWatchCompleted"); } }; WatchWindowController.prototype.onValueEdit = function (uid, newValue) { var _this = this; var watch = this._watchStore.findWatchWithUid(uid); if (watch) { if (this._debuggerManager.executionController.isExecutionPaused) { if (watch.displayValue !== newValue) { var activeFrame = this._debuggerManager.callstackController.activeFrame; if (activeFrame) { var clearExceptionWatchStateOnReset = true; if (watch.fullName.indexOf(Debugger.WatchStore.EXCEPTION_WATCHITEM_PREFIX) === 0) { this._watchStore.storeExceptionWatchState(); this._watchStore.storeWatchStates(); clearExceptionWatchStateOnReset = false; } watch.reset(); this._debuggerManager.setPropertyValueAsString(watch.uid, newValue).then(function () { _this.refreshAllWatchItems(true, clearExceptionWatchStateOnReset); }); } } } } }; WatchWindowController.prototype.refreshAllWatchItems = function (focus, clearExceptionStateOnReset, scrollToBottom) { var _this = this; if (typeof clearExceptionStateOnReset === "undefined") { clearExceptionStateOnReset = true; } if (typeof scrollToBottom === "undefined") { scrollToBottom = false; } if (this._debuggerManager.executionController.isExecutionPaused) { var activeFrame = this._debuggerManager.callstackController.activeFrame; if (activeFrame) { this._watchStore.reset(clearExceptionStateOnReset); if (!this.isDataTip) { this.updateWatchesWindow(activeFrame.frameId, scrollToBottom, focus); } else { this.evaluateAllUserWatches().then(function () { _this.refreshView(true); _this._debuggerManager.watchController.refreshAllWatchItems(false); }); } } } else { this.refreshView(focus, scrollToBottom); } }; WatchWindowController.prototype.deleteAll = function () { if (this.view && this.view.isViewEnabled()) { this._watchStore.deleteAll(); } }; WatchWindowController.prototype.activeFrameChanged = function (frame) { if (frame !== this._displayedFrame) { if (this._displayedFrame) { this._watchStore.storeExceptionWatchState(); this._watchStore.storeWatchStates(); } this._displayedFrame = frame; if (frame && !frame.isLibraryMarkerFrame) { this._displayedFrame = frame; this.updateWatchesWindow(frame.frameId, false, false); } } }; WatchWindowController.prototype.callstacksChanged = function () { }; WatchWindowController.prototype.navigateTo = function (location) { return Plugin.Promise.wrap(null); }; WatchWindowController.prototype.getChildProperties = function (parentWatch, range) { var _this = this; Tools.Utility.Assert.isTrue(parentWatch.isExpandable, "Cannot request properties for non expandable watches"); var startIndex, endIndex; switch (range) { case 0 /* Minimal */: startIndex = 0; endIndex = WatchWindowController.MINIMAL_PROPERTIES_COUNT; break; case 1 /* Remaining */: startIndex = WatchWindowController.MINIMAL_PROPERTIES_COUNT; endIndex = 0; break; case 2 /* All */: startIndex = 0; endIndex = 0; break; } var childProperties = []; return this._debuggerManager.getChildProperties(parentWatch.uid, startIndex, endIndex).then(function (propInfosObject) { var propInfos = propInfosObject.propInfos; parentWatch.hasAdditionalChildren = propInfosObject.hasAdditionalChildren; var exceptionWatchPromise; for (var index = 0; index < propInfos.length; index++) { var watchItem = new Debugger.WatchItem(propInfos[index].propertyId, propInfos[index].name, _this._watchStore); var updated = _this._watchStore.updateWatchWithPropInfo(watchItem, propInfos[index]); if (updated) { watchItem.parentWatch = parentWatch; watchItem.rootIndex = parentWatch.rootIndex; if (parentWatch === _this._watchStore.localsExpando && _this._watchStore.isExceptionWatchItem(watchItem)) { _this._watchStore.insertWatchItemAtIndex(watchItem, Debugger.WatchStore.EXCEPTION_WATCHITEM_INDEX); exceptionWatchPromise = _this._watchStore.restoreWatch(watchItem); } else { childProperties = childProperties.concat([watchItem]); } } } var watchRestores = childProperties.map(function (childProperty) { return _this._watchStore.restoreWatch(childProperty); }); if (exceptionWatchPromise) { watchRestores.push(exceptionWatchPromise); } return Plugin.Promise.join(watchRestores).then(function () { _this._debuggerManager.testEventObject.fireEvent("getChildPropertiesCompleted"); return Plugin.Promise.wrap(childProperties); }); }); }; WatchWindowController.prototype.enableWatchesWindow = function () { this._watchStore.isWatchesEvaluationEnabled = true; }; WatchWindowController.prototype.disableWatchesWindow = function () { this._watchStore.isWatchesEvaluationEnabled = false; this._watchStore.reset(); this.refreshView(); }; WatchWindowController.prototype.hasUserWatches = function () { return this._watchStore.hasUserWatches(); }; WatchWindowController.prototype.promptToAddWatch = function () { if (this.view) { this.view.promptToAddWatch(); } }; WatchWindowController.prototype.evaluateAllUserWatches = function (focus) { var _this = this; if (this._debuggerManager.executionController.isExecutionPaused && this._debuggerManager.callstackController.activeFrame) { var watches = this._watchStore.getWatches(); if (this._watchStore.thisWatch) { watches.push(this._watchStore.thisWatch); } var watches = watches.filter(function (watch) { return !watch.local && watch.containsExpression && watch.evalStatus === 0 /* Stale */; }); if (watches.length > 0) { var watchEvals = watches.map(function (watch) { watch.evalStatus = 1 /* EvalSent */; return _this._debuggerManager.eval(_this._debuggerManager.callstackController.activeFrame.frameId, watch.watchName).then(function (propInfo) { var updated = _this._watchStore.updateWatchWithPropInfo(watch, propInfo); if (updated) { return _this._watchStore.restoreWatch(watch); } return Plugin.Promise.wrap(0); }); }); return Plugin.Promise.join(watchEvals).then(function () { return Plugin.Promise.wrap(true); }); } else { return Plugin.Promise.wrap(false); } } else { return Plugin.Promise.wrap(false); } }; WatchWindowController.prototype.getLocalsForCurrentStackFrame = function () { if (this._debuggerManager.executionController.isExecutionPaused && this._debuggerManager.callstackController.activeFrame) { return this._watchStore.localsExpando.getNonFakeChildren().then(function (items) { var localsInfo = []; for (var index = 0; index < items.length; index++) { localsInfo.push({ name: items[index].watchName, typeName: items[index].watchType }); } return localsInfo; }); } else { return Plugin.Promise.wrap([]); } }; WatchWindowController.prototype.setViewState = function (enabled) { if (this.view) { this.view.setViewState(enabled); this._debuggerManager.testEventObject.fireEventForFirstListener("watchesViewStateChanged"); } }; WatchWindowController.prototype.isViewEnabled = function () { return this.view.isViewEnabled(); }; WatchWindowController.prototype.fireBuildListBoxStartEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(372 /* Debugger_Intellisense_ListBox_Build_Start */, etwKey); }; WatchWindowController.prototype.fireBuildListBoxEndEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(373 /* Debugger_Intellisense_ListBox_Build_Stop */, etwKey); }; WatchWindowController.prototype.fireResetListBoxStartEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(374 /* Debugger_Intellisense_ListBox_Reset_Start */, etwKey); }; WatchWindowController.prototype.fireResetListBoxEndEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(375 /* Debugger_Intellisense_ListBox_Reset_Stop */, etwKey); }; WatchWindowController.prototype.fireSetFilterStartEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(376 /* Debugger_Intellisense_Menu_Filter_Start */, etwKey); }; WatchWindowController.prototype.fireSetFilterEndEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(377 /* Debugger_Intellisense_Menu_Filter_Stop */, etwKey); }; WatchWindowController.prototype.fireUpdateLayoutStartEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(378 /* Debugger_Intellisense_Menu_Layout_Start */, etwKey); }; WatchWindowController.prototype.fireUpdateLayoutEndEvent = function (etwKey) { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(379 /* Debugger_Intellisense_Menu_Layout_Stop */, etwKey); }; WatchWindowController.prototype.getLocals = function () { if (this._debuggerManager && this._debuggerManager.executionController.isExecutionPaused) { var activeFrame = this._debuggerManager.callstackController.activeFrame; if (activeFrame) { this._watchStore.deleteAnyExceptionWatch(); return this._debuggerManager.getLocals(activeFrame.frameId); } } return Plugin.Promise.wrap(null); }; WatchWindowController.prototype.updateWatchesWindow = function (frameIndex, scrollToBottom, focus) { var _this = this; this._watchStore.markAllWatchesStale(); this.setViewState(false); this.getLocals().done(function (propertyId) { if (propertyId) { _this.evaluateAllUserWatches(focus).then(function () { _this._watchStore.localsExpando.uid = propertyId; _this._watchStore.localsExpando.evalStatus = 2 /* EvalReceived */; _this._watchStore.restoreWatch(_this._watchStore.localsExpando, true).then(function () { _this._debuggerManager.testEventObject.fireEvent("evaluateWatchCompleted"); _this.refreshView(focus, scrollToBottom); _this.setViewState(true); }); }); } else { _this.setViewState(true); } }); }; WatchWindowController.prototype.evaluateWatch = function (watch, scrollToBottom) { var _this = this; if (this._debuggerManager && this._debuggerManager.executionController.isExecutionPaused) { var activeFrame = this._debuggerManager.callstackController.activeFrame; if (activeFrame) { return this._debuggerManager.eval(activeFrame.frameId, watch.watchName).then(function (propInfo) { var updated = _this._watchStore.updateWatchWithPropInfo(watch, propInfo); if (updated) { return _this._watchStore.restoreWatch(watch).then(function () { if (_this.isDataTip && _this.view) { _this.view.refreshView(true, scrollToBottom); } _this._debuggerManager.testEventObject.fireEvent("evaluateWatchCompleted"); if (propInfo.type === "Error" && propInfo.value.indexOf("is undefined") === -1) { return Plugin.Promise.wrap(false); } return Plugin.Promise.wrap(true); }); } return Plugin.Promise.wrap(false); }); } } return Plugin.Promise.wrap(true); }; WatchWindowController.MINIMAL_PROPERTIES_COUNT = 100; return WatchWindowController; })(); Debugger.WatchWindowController = WatchWindowController; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // watchWindowView.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var WatchWindowView = (function () { function WatchWindowView(controller, container, expandCountChangedCallback) { var _this = this; this._controller = controller; this._intellisenseControl = null; var nameColumnString = Plugin.Resources.getString("WatchWindowNameColumn"); var valueColumnString = Plugin.Resources.getString("WatchWindowValueColumn"); var iconColumnString = Plugin.Resources.getString("WatchWindowIconColumn"); var columnsAvailableWidth = container.clientWidth - WatchWindowView.DEFAULT_ICON_COLUMN_FIXED_WIDTH; var nameColumnSize = this._controller.isDataTip ? WatchWindowView.DEFAULT_COLUMN_SIZE : columnsAvailableWidth * WatchWindowView.DEFAULT_COLUMN_PERCENT_WIDTH; var nameColumn = new Debugger.Grid.ColumnInfo("watchName", nameColumnString, nameColumnString, nameColumnSize, false); nameColumn.getCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { return _this.getCellCSSClass(dataIndex, columnIndex, columnOrder, dataSource); }; nameColumn.getGlyphClass = function (dataIndex, columnIndex, columnOrder, dataSource) { return _this.getCellGlyphClass(dataIndex, columnIndex, columnOrder, dataSource); }; nameColumn.hasMixedContent = true; nameColumn.hasGlyph = true; nameColumn.indent = true; var valueColumnSize = this._controller.isDataTip ? WatchWindowView.EXPANDED_COLUMN_SIZE : columnsAvailableWidth * WatchWindowView.DEFAULT_COLUMN_PERCENT_WIDTH; var valueColumn = new Debugger.Grid.ColumnInfo("watchValue", valueColumnString, valueColumnString, valueColumnSize, false); valueColumn.getColumnValue = function (dataIndex, columnIndex, columnOrder, dataSource) { return _this.getColumnValue(dataIndex, columnIndex, columnOrder, dataSource); }; valueColumn.getCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { return _this.getCellCSSClass(dataIndex, columnIndex, columnOrder, dataSource); }; var iconColumn = new Debugger.Grid.ColumnInfo("watchIcon", iconColumnString, iconColumnString, WatchWindowView.DEFAULT_ICON_COLUMN_FIXED_WIDTH, false); iconColumn.getCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { return _this.getCellCSSClass(dataIndex, columnIndex, columnOrder, dataSource); }; iconColumn.hasHTMLContent = true; if (this._controller.isDataTip) { this._columnInfo = [nameColumn, valueColumn]; } else { this._intellisenseControl = this._controller.intellisenseControl; nameColumn.getEditBox = function () { return _this._intellisenseControl.inputElement; }; nameColumn.percentWidth = WatchWindowView.DEFAULT_COLUMN_PERCENT_WIDTH; valueColumn.percentWidth = WatchWindowView.DEFAULT_COLUMN_PERCENT_WIDTH; iconColumn.fixed = true; this._columnInfo = [nameColumn, valueColumn, iconColumn]; } this._container = container; this.createGrid(this._container, expandCountChangedCallback); this._container.addEventListener("click", function (e) { return _this.buttonsCallback(_this._controller.isDataTip, e); }); if (!this._controller.isDataTip) { this._deleteAllWatchesButton = document.getElementById("deleteAllWatchesButton"); this._addWatchButton = document.getElementById("addWatchButton"); Common.ButtonHelpers.setupButton(this._deleteAllWatchesButton, "WatchesDeleteAllTooltip", function (e) { _this._controller.deleteAll(); }, false); Common.ButtonHelpers.setupButton(this._addWatchButton, "WatchesAddWatchTooltip", function (e) { return _this.promptToAddWatch(); }); this._container.addEventListener("contextmenu", function (e) { _this.showContextMenu(e); }); } this.refreshView(); } WatchWindowView.prototype.dispose = function () { if (this._delayedRenderCookie) { window.clearTimeout(this._delayedRenderCookie); this._delayedRenderCookie = null; } }; WatchWindowView.prototype.setViewState = function (enabled) { this._grid.setViewState(enabled); if (this._addWatchButton) { Common.ButtonHelpers.changeButtonStatus(this._addWatchButton, enabled); } if (this._deleteAllWatchesButton && this._controller.hasUserWatches()) { Common.ButtonHelpers.changeButtonStatus(this._deleteAllWatchesButton, enabled); } }; WatchWindowView.prototype.getActualHeight = function () { return this.getObjectsCount() * WatchWindowView.GRID_LINE_HEIGHT; }; WatchWindowView.prototype.isViewEnabled = function () { return this._options.isGridEnabled; }; WatchWindowView.prototype.refreshView = function (focus, scrollToBottom) { var _this = this; if (this._delayedRenderCookie) { window.clearTimeout(this._delayedRenderCookie); } this._delayedRenderCookie = window.setTimeout(function () { if (Debugger.debuggerTraceWriter) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(346 /* Debugger_WatchWindowView_RefreshView_Start */); } if (!_this._controller.isDataTip && Common.ButtonHelpers.isEnabled(_this._deleteAllWatchesButton) && !_this._controller.hasUserWatches()) { Common.ButtonHelpers.changeButtonStatus(_this._deleteAllWatchesButton, false); } else if (!_this._controller.isDataTip && !Common.ButtonHelpers.isEnabled(_this._deleteAllWatchesButton) && _this._controller.hasUserWatches()) { Common.ButtonHelpers.changeButtonStatus(_this._deleteAllWatchesButton, true); } var rowIndex = _this._grid.getSelectedRowIndex(); var watchItems = _this._controller.getWatches(); if ((rowIndex === -1 && watchItems.length > 0) || rowIndex >= watchItems.length) { rowIndex = 0; } _this._grid.setDataSource(watchItems, _this._controller.getExpandStates(), _this._columnInfo, null, rowIndex, focus, scrollToBottom); if (Debugger.debuggerTraceWriter) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(347 /* Debugger_WatchWindowView_RefreshView_Stop */); } _this._delayedRenderCookie = null; }, WatchWindowView.DELAYED_RENDER_INTERVAL); }; WatchWindowView.prototype.layout = function () { this._grid.layoutOnResize(); }; WatchWindowView.prototype.getExpandStates = function () { return this._grid.getExpandStates(); }; WatchWindowView.prototype.getObjectsCount = function () { return this._grid.getExpandedCount(); }; WatchWindowView.prototype.promptToAddWatch = function () { var _this = this; this._grid.scrollToBottom(function () { return _this.createAddWatchTextBox(); }); this.selectDataIndex(this._grid.getDataSource().length - 1); }; WatchWindowView.prototype.selectDataIndex = function (dataIndex) { this._grid.setSelectedDataIndex(dataIndex); }; WatchWindowView.prototype.scrollToBottom = function (callback) { this._grid.scrollToBottom(function () { return callback(); }); }; WatchWindowView.prototype.containsValidExpression = function (watch) { return !watch.fake && watch.uid !== Debugger.WatchStore.LOCALS_EXPANDO_ID && watch.fullName.indexOf(Debugger.WatchStore.EXCEPTION_WATCHITEM_PREFIX) !== 0; }; WatchWindowView.prototype.getExpressionInputBoxAtIndex = function (index) { var _this = this; return new Plugin.Promise(function (completed, error) { var rowInfo = _this._grid.getRowInfo(index); var rowElement = rowInfo.row; var nameCell = rowElement.children[WatchWindowView.NAME_COLUMN]; var mutationObserverClass = MutationObserver; var mutationObserver = new mutationObserverClass(function (arr, observer) { if (nameCell.firstChild instanceof HTMLInputElement) { observer.disconnect(); window.setImmediate(function () { completed(nameCell.firstChild); }); } }); mutationObserver.observe(nameCell, { childList: true, subtree: true }); _this._grid.createEditBox(rowInfo.dataIndex, WatchWindowView.NAME_COLUMN, nameCell); }); }; WatchWindowView.prototype.createAddWatchTextBox = function () { var addWatchRowInfo = this._grid.getRowInfo(this._grid.getDataSource().length - 1); if (addWatchRowInfo) { var nameCell = addWatchRowInfo.row.children[WatchWindowView.NAME_COLUMN]; this._grid.createEditBox(addWatchRowInfo.dataIndex, WatchWindowView.NAME_COLUMN, nameCell); } }; WatchWindowView.prototype.buttonsCallback = function (isDataTip, e) { var targetElement = e.target; if (e.button === 0 /* LeftButton */ && this._options.isGridEnabled) { var dataSource = this._grid.getDataSource(); if (targetElement.classList.contains("deleteWatch") && !isDataTip) { var rowInfo = this._grid.getRowInfoFromEvent(e, ".grid-row"); if (rowInfo) { var watchItem = dataSource[rowInfo.dataIndex]; if (watchItem) { this._controller.deleteWatch(watchItem.uid); this.refreshView(); } } } else if (targetElement.classList.contains("showAll")) { var rowInfo = this._grid.getRowInfoFromEvent(e, ".grid-row"); if (rowInfo) { var watchItem = dataSource[rowInfo.dataIndex]; if (watchItem) { this.requestRemainingProperties(watchItem, rowInfo.dataIndex); } } } else if (targetElement.classList.contains("grid-cell") && !isDataTip) { var rowInfo = this._grid.getRowInfoFromEvent(e, ".grid-row"); if (rowInfo) { var watchItem = dataSource[rowInfo.dataIndex]; if (watchItem && watchItem.uid === Debugger.WatchStore.ADD_WATCH_PLACEHOLDER) { this._grid.onEditCell(e); } } } } }; WatchWindowView.prototype.requestRemainingProperties = function (watchItem, dataIndex) { var _this = this; watchItem.parentWatch.getChildren(1 /* Remaining */).done(function (childProperties) { var rowsAndExpandStates = _this.getRowsAndExpandState(childProperties); _this._grid.insertAdditionalDynamicData(rowsAndExpandStates, dataIndex); }); }; WatchWindowView.prototype.createGrid = function (rootElement, expandCountChangedCallback) { var _this = this; this._childDataCallback = function (parentTreeItem, complete) { parentTreeItem.getChildren(0 /* Minimal */).done(function (childProperties) { var rowsAndExpandStates = _this.getRowsAndExpandState(childProperties); complete(rowsAndExpandStates); }); }; this._preEditValueCallback = function (dataIndex, columnIndex) { if (columnIndex === WatchWindowView.NAME_COLUMN) { var watch = _this._grid.getDataSource()[dataIndex]; if (watch && watch.uid === Debugger.WatchStore.ADD_WATCH_PLACEHOLDER) { _this._options.commitOnTab = true; var addWatchRowInfo = _this._grid.getRowInfo(dataIndex); if (addWatchRowInfo) { var nameCell = addWatchRowInfo.row.children[WatchWindowView.NAME_COLUMN]; nameCell.innerText = ""; } } } }; this._commitEditValueCallback = function (newValue, dataIndex, columnIndex) { var watch = _this._grid.getDataSource()[dataIndex]; if (watch) { if (columnIndex === WatchWindowView.NAME_COLUMN) { if (newValue && newValue !== "") { _this._controller.editWatch(watch.uid, newValue); } else if (watch.uid !== Debugger.WatchStore.ADD_WATCH_PLACEHOLDER) { _this._controller.deleteWatch(watch.uid); } } else { _this._controller.onValueEdit(watch.uid, newValue); } } }; this._postEditValueCallback = function (dataIndex, columnIndex) { _this._options.commitOnTab = false; if (columnIndex === WatchWindowView.NAME_COLUMN) { var watch = _this._grid.getDataSource()[dataIndex]; if (watch && watch.uid === Debugger.WatchStore.ADD_WATCH_PLACEHOLDER) { var addWatchRowInfo = _this._grid.getRowInfo(dataIndex); if (addWatchRowInfo) { var nameCell = addWatchRowInfo.row.children[WatchWindowView.NAME_COLUMN]; nameCell.innerText = watch.watchName; } } _this._controller.intellisenseContext.intellisenseMenu.isOpen = false; } }; this._options = new Debugger.Grid.GridOptions(this._childDataCallback, this._columnInfo, null, this._preEditValueCallback, this._commitEditValueCallback, this._postEditValueCallback); if (!this._controller.isDataTip) { this._options.keyboardEventHandler = { keys: [Common.Keys.C, Common.Keys.DEL, Common.Keys.ENTER, Common.Keys.SPACEBAR, Common.Keys.F10], handler: function (e, dataSource, dataIndex) { return _this.keyboardEventHandler(e, dataSource, dataIndex); } }; this._options.disableRightClickSelection = false; this._options.keepSelection = true; } else { this._options.keyboardEventHandler = { keys: [Common.Keys.C, Common.Keys.ENTER, Common.Keys.SPACEBAR], handler: function (e, dataSource, dataIndex) { return _this.keyboardEventHandler(e, dataSource, dataIndex); } }; } this._options.drawRowSplitters = true; this._options.expandedCountChangedCallback = expandCountChangedCallback; this._options.extendViewportBy = 50; this._grid = new Debugger.Grid.GridControl(rootElement, this._options); this._options.onRowToggleCallback = function (dataSource, dataIndex, isExpanded) { var watch = dataSource[dataIndex]; if (isExpanded) { watch.watchState = Debugger.WatchItem.EXPANDED; return; } watch.watchState = Debugger.WatchItem.COLLAPSED; }; }; WatchWindowView.prototype.getColumnValue = function (dataIndex, columnIndex, columnOrder, dataSource) { var watch = dataSource[dataIndex]; return watch.displayValue; }; WatchWindowView.prototype.getCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { var watch = dataSource[dataIndex]; return watch.watchItemCSS[columnIndex]; }; WatchWindowView.prototype.getCellGlyphClass = function (dataIndex, columnIndex, columnOrder, dataSource) { var watch = dataSource[dataIndex]; if (watch.isReturnValue) { return Debugger.WatchItem.RETURN_VALUE_CLASS_NAME; } return watch.typeClass; }; WatchWindowView.prototype.getRowsAndExpandState = function (childProperties) { var itemsWithPlaceholders = []; for (var index = 0; index < childProperties.length; index++) { itemsWithPlaceholders = itemsWithPlaceholders.concat(childProperties[index].getDescendants()); } var expandStates = []; for (var index = 0; index < itemsWithPlaceholders.length; index++) { expandStates.push(itemsWithPlaceholders[index].getExpandState()); } return { itemsWithPlaceholders: itemsWithPlaceholders, expandStates: expandStates }; }; WatchWindowView.prototype.keyboardEventHandler = function (e, dataSource, dataIndex) { var watch = dataSource[dataIndex]; if (!watch) { return false; } switch (e.key) { case Common.Keys.C: if (!e.shiftKey && e.ctrlKey && !e.altKey) { this.copyWatchToClipboard(watch); return true; } return false; break; case Common.Keys.DEL: if (watch.isUserWatch) { this._controller.deleteWatch(watch.uid); } break; case Common.Keys.ENTER: if (watch.uid === Debugger.WatchStore.ADD_WATCH_PLACEHOLDER) { this.createAddWatchTextBox(); } else if (watch.uid.indexOf(Debugger.WatchItem.SHOWALL_WATCHITEM_SUFFIX) !== -1) { this.requestRemainingProperties(watch, dataIndex); } break; case Common.Keys.SPACEBAR: if (watch.uid.indexOf(Debugger.WatchItem.SHOWALL_WATCHITEM_SUFFIX) !== -1) { this.requestRemainingProperties(watch, dataIndex); } break; case Common.Keys.F10: if (e.shiftKey && !e.ctrlKey && !e.altKey) { this.showContextMenu(e); } break; } return true; }; WatchWindowView.prototype.createMenuItems = function () { var _this = this; var menuItems = []; menuItems.push({ id: "menuItemAddWatchWindowView", callback: function () { return _this._controller.addWatch(_this._contextMenuWatchItem.fullName); }, label: Plugin.Resources.getString("WatchesContextMenuAddWatch"), type: 1 /* command */, disabled: function () { return !_this.containsValidExpression(_this._contextMenuWatchItem); } }); menuItems.push({ id: "menuItemCopyWatchWindowView", callback: function (menuId, menuItem) { return _this.onCopy(menuId, menuItem); }, label: Plugin.Resources.getString("WatchesContextMenuCopy"), type: 1 /* command */, disabled: function () { return (_this._contextMenuWatchItem.uid === Debugger.WatchStore.ADD_WATCH_PLACEHOLDER || _this._contextMenuWatchItem.uid === Debugger.WatchStore.LOCALS_EXPANDO_ID); } }); menuItems.push({ id: "menuItemEditValueWatchWindowView", callback: function (menuId, menuItem) { return _this.onEditValue(menuId, menuItem); }, label: Plugin.Resources.getString("WatchesContextMenuEditValue"), type: 1 /* command */, disabled: function () { return (!_this._options.isGridEnabled || _this._contextMenuWatchItem.readOnly); } }); menuItems.push({ id: "menuItemSep1WatchWindowView", type: 3 /* separator */ }); menuItems.push({ id: "menuItemDeleteWatchWindowView", callback: function (menuId, menuItem) { return _this.onDelete(menuId, menuItem); }, label: Plugin.Resources.getString("WatchesContextMenuDelete"), type: 1 /* command */, disabled: function () { return (!_this._options.isGridEnabled || !_this._contextMenuWatchItem.isUserWatch); } }); menuItems.push({ id: "menuItemDeleteAllWatchWindowView", callback: function (menuId, menuItem) { return _this.onDeleteAll(menuId, menuItem); }, label: Plugin.Resources.getString("WatchesContextMenuDeleteAll"), type: 1 /* command */, disabled: function () { return (!_this._options.isGridEnabled || !_this._controller.hasUserWatches()); } }); return menuItems; }; WatchWindowView.prototype.showContextMenu = function (e) { if (this._grid) { if (this._contextMenu) { this._contextMenu.dispose(); this._contextMenu = null; } var rowInfo = this._grid.getRowInfoFromEvent(e, ".grid-row") || this._grid.getRowInfo(this._grid.getSelectedDataIndex()); if (rowInfo) { this._contextMenuSelection = rowInfo.dataIndex; this._contextMenuWatchItem = this._grid.getDataSource()[this._contextMenuSelection]; this._contextMenu = Plugin.ContextMenu.create(this.createMenuItems(), "watchesContextMenu"); var x = 0; var y = 0; if (e instanceof MouseEvent) { x = e.pageX; y = e.pageY; } if (x <= 0 && y <= 0) { var offset = rowInfo.row.getBoundingClientRect(); x = offset.left; y = offset.top; } this._contextMenu.show(x, y); } } e.preventDefault(); e.stopImmediatePropagation(); }; WatchWindowView.prototype.onCopy = function (menuId, menuItem) { this.copyWatchToClipboard(this._contextMenuWatchItem); }; WatchWindowView.prototype.onEditValue = function (menuId, menuItem) { var _this = this; window.setImmediate(function () { var rowInfo = _this._grid.getRowInfo(_this._contextMenuSelection); if (rowInfo) { var valueCell = rowInfo.row.children[WatchWindowView.VALUE_COLUMN]; _this._grid.createEditBox(rowInfo.dataIndex, WatchWindowView.VALUE_COLUMN, valueCell); } }); }; WatchWindowView.prototype.onDelete = function (menuId, menuItem) { this._controller.deleteWatch(this._contextMenuWatchItem.uid); }; WatchWindowView.prototype.onDeleteAll = function (menuId, menuItem) { this._controller.deleteAll(); }; WatchWindowView.prototype.copyWatchToClipboard = function (watch) { try { clipboardData.setData("text", watch.getCopyString()); } catch (ex) { } }; WatchWindowView.DEFAULT_COLUMN_PERCENT_WIDTH = 0.50; WatchWindowView.DEFAULT_ICON_COLUMN_FIXED_WIDTH = 20; WatchWindowView.DEFAULT_COLUMN_SIZE = 140; WatchWindowView.EXPANDED_COLUMN_SIZE = 240; WatchWindowView.DELAYED_RENDER_INTERVAL = 10; WatchWindowView.NAME_COLUMN = 0; WatchWindowView.VALUE_COLUMN = 1; WatchWindowView.GRID_LINE_HEIGHT = 20; WatchWindowView.TWO_COLUMN_WIDTH = WatchWindowView.DEFAULT_COLUMN_SIZE + WatchWindowView.EXPANDED_COLUMN_SIZE; return WatchWindowView; })(); Debugger.WatchWindowView = WatchWindowView; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // watchItem.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; (function (WatchEvalStatus) { WatchEvalStatus[WatchEvalStatus["Stale"] = 0] = "Stale"; WatchEvalStatus[WatchEvalStatus["EvalSent"] = 1] = "EvalSent"; WatchEvalStatus[WatchEvalStatus["EvalReceived"] = 2] = "EvalReceived"; WatchEvalStatus[WatchEvalStatus["EvalRestoreComplete"] = 3] = "EvalRestoreComplete"; })(Debugger.WatchEvalStatus || (Debugger.WatchEvalStatus = {})); var WatchEvalStatus = Debugger.WatchEvalStatus; (function (WatchPropertiesRange) { WatchPropertiesRange[WatchPropertiesRange["Minimal"] = 0] = "Minimal"; WatchPropertiesRange[WatchPropertiesRange["Remaining"] = 1] = "Remaining"; WatchPropertiesRange[WatchPropertiesRange["All"] = 2] = "All"; })(Debugger.WatchPropertiesRange || (Debugger.WatchPropertiesRange = {})); var WatchPropertiesRange = Debugger.WatchPropertiesRange; var WatchItemCSS = (function () { function WatchItemCSS() { this.watchIcon = ""; this.watchName = "watch-watchName"; this.watchValue = ""; } Object.defineProperty(WatchItemCSS.prototype, "nameEditable", { get: function () { return this.watchName.indexOf(WatchItemCSS.GRID_CELL_EDITABLE) >= 0; }, set: function (value) { this.setCSSClass(WatchItemCSS.WATCH_NAME_PROPERTY, value, WatchItemCSS.GRID_CELL_EDITABLE); }, enumerable: true, configurable: true }); Object.defineProperty(WatchItemCSS.prototype, "nameAsMixedCellHTML", { get: function () { return this.watchName.indexOf(WatchItemCSS.GRID_MIXED_CELL_HTML) >= 0; }, set: function (value) { this.setCSSClass(WatchItemCSS.WATCH_NAME_PROPERTY, value, WatchItemCSS.GRID_MIXED_CELL_HTML); }, enumerable: true, configurable: true }); Object.defineProperty(WatchItemCSS.prototype, "valueEditable", { get: function () { return this.watchValue.indexOf(WatchItemCSS.GRID_CELL_EDITABLE) >= 0; }, set: function (value) { this.setCSSClass(WatchItemCSS.WATCH_VALUE_PROPERTY, value, WatchItemCSS.GRID_CELL_EDITABLE); }, enumerable: true, configurable: true }); Object.defineProperty(WatchItemCSS.prototype, "valueChanged", { get: function () { return this.watchValue.indexOf(WatchItemCSS.WATCH_VALUE_CHANGED) >= 0; }, set: function (value) { if (value && !this.invalid) { this.setCSSClass(WatchItemCSS.WATCH_VALUE_PROPERTY, true, WatchItemCSS.WATCH_VALUE_CHANGED); } else if (!value) { this.setCSSClass(WatchItemCSS.WATCH_VALUE_PROPERTY, false, WatchItemCSS.WATCH_VALUE_CHANGED); } }, enumerable: true, configurable: true }); Object.defineProperty(WatchItemCSS.prototype, "invalid", { get: function () { return this.watchValue.indexOf(WatchItemCSS.WATCH_ERROR) >= 0; }, set: function (value) { this.setCSSClass(WatchItemCSS.WATCH_VALUE_PROPERTY, value, WatchItemCSS.WATCH_ERROR); if (value) { this.watchValue = this.watchValue.replace(WatchItemCSS.WATCH_VALUE_CHANGED, ""); } }, enumerable: true, configurable: true }); WatchItemCSS.prototype.setCSSClass = function (property, value, className) { if (value && this[property].indexOf(className) === -1) { this[property] += " " + className; } else if (!value) { this[property] = this[property].replace(className, ""); } }; WatchItemCSS.WATCH_NAME_PROPERTY = "watchName"; WatchItemCSS.WATCH_VALUE_PROPERTY = "watchValue"; WatchItemCSS.GRID_CELL_EDITABLE = "grid-cell-editable"; WatchItemCSS.GRID_MIXED_CELL_HTML = "grid-mixed-cell-html"; WatchItemCSS.WATCH_ERROR = "watch-Error"; WatchItemCSS.WATCH_VALUE_CHANGED = "watch-ValueChanged"; return WatchItemCSS; })(); Debugger.WatchItemCSS = WatchItemCSS; var WatchItem = (function () { function WatchItem(uid, name, store, parentWatch) { this._name = name; this._value = null; this._type = null; this._typeClass = ""; this._children = null; this._store = store; this._isExpandable = false; this.uid = uid; this.fullName = name; this.watchItemCSS = new WatchItemCSS(); this.hasAdditionalChildren = null; this.containsExpression = false; this.isPlaceholder = false; this.parentWatch = parentWatch; this.local = false; this.watchState = WatchItem.COLLAPSED; this.evalStatus = 0 /* Stale */; this.watchItemCSS.valueEditable = true; } Object.defineProperty(WatchItem.prototype, "watchName", { get: function () { return this._name; }, set: function (name) { this._name = name; }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "watchValue", { get: function () { return this._value; }, set: function (value) { if (this._type && this._type.toLowerCase() === "string" && value.length >= 2) { this._value = JSON.stringify(value.substring(1, value.length - 1)); } else { this._value = value.replace(/[\r\n\s]+/g, " ").trim(); } }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "watchType", { get: function () { return this._type; }, set: function (type) { this._type = type; if (type.toLowerCase().indexOf("function") !== -1) { this._typeClass = "functionItem"; } else { this._typeClass = "notAFunctionItem"; } }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "displayValue", { get: function () { return this.getDisplayValue(); }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "isExpandable", { get: function () { return this._isExpandable; }, set: function (value) { this._isExpandable = value; if (this._isExpandable) { this._children = []; var placeHolderChild = new WatchItem(this.uid + WatchItem.PLACEHOLDER_WATCHITEM_SUFFIX, "", this._store, this); placeHolderChild.isPlaceholder = true; placeHolderChild.rootIndex = this.rootIndex; this._children.push(placeHolderChild); } else { this._children = null; } }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "fake", { get: function () { return this._fake; }, set: function (value) { this._fake = value; }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "readOnly", { get: function () { return this._readOnly; }, set: function (value) { this._readOnly = value; this.watchItemCSS.valueEditable = !this._readOnly; }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "isInvalid", { get: function () { return this._invalid; }, set: function (value) { this._invalid = value; this.watchItemCSS.invalid = value; }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "watchIcon", { get: function () { if (this.isUserWatch) { return "
        "; } return ""; }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "typeClass", { get: function () { return this._type === "" ? "" : this._typeClass; }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "isUserWatch", { get: function () { return this.containsExpression && !(this.parentWatch && this.parentWatch.watchName === WatchItem.WATCH_LABEL && this.watchName === "this"); }, enumerable: true, configurable: true }); Object.defineProperty(WatchItem.prototype, "customProperty", { get: function () { return this._customProperty; }, set: function (property) { this._customProperty = property; this._customProperty.rootIndex = this.rootIndex; }, enumerable: true, configurable: true }); WatchItem.prototype.getExpandState = function () { return this.watchState * (this.getDescendantsCount() - 1); }; WatchItem.prototype.getChildren = function (range) { var _this = this; if (range === 0 /* Minimal */ && this._children && this._children[0].uid.indexOf(WatchItem.PLACEHOLDER_WATCHITEM_SUFFIX) === -1) { return Plugin.Promise.wrap(this._children); } if (range === 1 /* Remaining */ && !this.hasAdditionalChildren && this._children.length > Debugger.WatchWindowController.MINIMAL_PROPERTIES_COUNT) { return Plugin.Promise.wrap(this._children.splice(Debugger.WatchWindowController.MINIMAL_PROPERTIES_COUNT)); } if (range === 2 /* All */ && this._children && this._children.length > 1) { return Plugin.Promise.wrap(this._children); } return this._store.getChildProperties(this, range).then(function (childProperties) { if (_this.hasAdditionalChildren) { _this._children = childProperties; var showAllLinkTitle = Plugin.Resources.getString("WatchesShowAllItems"); var showAllButton = new WatchItem(_this.uid + WatchItem.SHOWALL_WATCHITEM_SUFFIX, "
        " + showAllLinkTitle + "
        ", _this._store, _this); showAllButton.watchItemCSS.nameAsMixedCellHTML = true; _this._children.push(showAllButton); } else if (range === 1 /* Remaining */) { _this._children.splice(_this._children.length - 1, 1); _this._children = _this._children.concat(childProperties); return Plugin.Promise.wrap(childProperties); } else { _this._children = childProperties; } if (_this._customProperty) { _this._children.unshift(_this._customProperty); } return Plugin.Promise.wrap(_this._children); }); }; WatchItem.prototype.getDescendantsCount = function () { var descendants = 0; if (this._children) { for (var index = 0; index < this._children.length; index++) { descendants += this._children[index].getDescendantsCount(); } } return 1 + descendants; }; WatchItem.prototype.getDescendants = function (descendants) { if (typeof descendants === "undefined") { descendants = []; } descendants.push(this); if (this._children) { for (var index = 0; index < this._children.length; index++) { this._children[index].getDescendants(descendants); } } return descendants; }; WatchItem.prototype.getNonFakeChildren = function () { var _this = this; var nonFakeChildren = []; var promises = []; if (this.hasAdditionalChildren) { var getAdditionalChildrenPromise = this.getChildren(1 /* Remaining */).then(function () { return _this.getNonFakeChildren(); }).then(function (items) { nonFakeChildren = nonFakeChildren.concat(items); return Plugin.Promise.wrap(nonFakeChildren); }); promises.push(getAdditionalChildrenPromise); } else if (this.isExpandable && this._children.length > 0 && this._children[0].uid.indexOf(WatchItem.PLACEHOLDER_WATCHITEM_SUFFIX) !== -1) { var getAllChildrenPromise = this.getChildren(2 /* All */).then(function () { return _this.getNonFakeChildren(); }).then(function (items) { nonFakeChildren = nonFakeChildren.concat(items); return Plugin.Promise.wrap(nonFakeChildren); }); promises.push(getAllChildrenPromise); } else { for (var index = 0; index < this._children.length; index++) { var child = this._children[index]; if (!child.fake) { nonFakeChildren.push(child); } else if (child.fake && child.isExpandable) { var getNonFakeChildrenPromise = child.getNonFakeChildren().then(function (items) { nonFakeChildren = nonFakeChildren.concat(items); return Plugin.Promise.wrap(nonFakeChildren); }); promises.push(getNonFakeChildrenPromise); } } } return Plugin.Promise.join(promises).then(function () { return Plugin.Promise.wrap(nonFakeChildren); }); }; WatchItem.prototype.getDisplayValue = function () { if (this._value === "{...}" || this._value === "[...]") { if (!this._type) { return ""; } else if (this._type.substr(0, 7) === "Object,") { return "[object" + this._type.substr(7) + "]"; } else if (this._type.substr(0, 8) === "[Object,") { return "[object" + this._type.substring(8, this._type.length - 1) + "]"; } else if (this._type === "Object") { return "[object]"; } return "[object " + this._type + "]"; } else { if (this._value === "Anonymous function") { return "[Anonymous function]"; } else { return this._value; } } }; WatchItem.prototype.getCopyString = function () { return this.watchName + "\t" + (this.displayValue || ""); }; WatchItem.prototype.reset = function () { this._value = null; this._type = null; this._children = null; this.isExpandable = false; this.watchState = WatchItem.COLLAPSED; this.evalStatus = 0 /* Stale */; this.hasAdditionalChildren = null; }; WatchItem.prototype.clearChildren = function () { this._children = null; this.isExpandable = false; this.hasAdditionalChildren = null; }; WatchItem.EXPANDED = 1; WatchItem.COLLAPSED = -1; WatchItem.SHOWALL_WATCHITEM_SUFFIX = "-showAll"; WatchItem.PLACEHOLDER_WATCHITEM_SUFFIX = "-placeholder"; WatchItem.RETURN_VALUE_CLASS_NAME = "returnValue"; WatchItem.WATCH_LABEL = "[Locals]"; return WatchItem; })(); Debugger.WatchItem = WatchItem; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // watchStore.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var WatchStateInfo = (function () { function WatchStateInfo(fullName, value, hasAdditionalChildren, watchState) { this.fullName = fullName; this.watchValue = value; if (hasAdditionalChildren || hasAdditionalChildren === null) { this.propertiesRange = 0 /* Minimal */; } else { this.propertiesRange = 2 /* All */; } this.watchState = watchState; } return WatchStateInfo; })(); Debugger.WatchStateInfo = WatchStateInfo; var WatchStore = (function () { function WatchStore(controller) { this._store = []; this._watchesStateInfo = []; this._watchController = controller; this._watchId = 0; if (!this._watchController.isDataTip) { this.localsExpando = new Debugger.WatchItem(WatchStore.LOCALS_EXPANDO_ID, Debugger.WatchItem.WATCH_LABEL, this); this.localsExpando.local = true; this.localsExpando.fake = true; this.localsExpando.readOnly = true; this.localsExpando.isExpandable = true; this.localsExpando.fullName = this.localsExpando.watchName; this.localsExpando.rootIndex = 0; this.localsExpando.evalStatus = 3 /* EvalRestoreComplete */; this.thisWatch = new Debugger.WatchItem(WatchStore.LOCALS_EXPANDO_ID + "-this", "this", this, this.localsExpando); this.thisWatch.containsExpression = true; this.localsExpando.customProperty = this.thisWatch; this._store.push(this.localsExpando); this.addWatchPlaceholder = new Debugger.WatchItem(WatchStore.ADD_WATCH_PLACEHOLDER, Plugin.Resources.getString("AddToWatchesWindowLink"), this); this.addWatchPlaceholder.watchItemCSS.nameEditable = true; this.addWatchPlaceholder.fake = true; this.addWatchPlaceholder.readOnly = true; this._store.push(this.addWatchPlaceholder); } } WatchStore.prototype.addWatch = function (expression) { var watch = new Debugger.WatchItem(this.getUid(), expression, this); watch.containsExpression = true; if (!this._watchController.isDataTip) { watch.watchItemCSS.nameEditable = true; } if (this._watchController.isDataTip) { watch.rootIndex = this._store.length; this._store.push(watch); } else { watch.rootIndex = this._store.length - 1; this._store.splice(this._store.length - 1, 0, watch); } return watch; }; WatchStore.prototype.editWatch = function (uid, expression) { var watch = this.findWatchWithUid(uid); if (!this._watchController.isDataTip && watch) { if (watch.uid === WatchStore.ADD_WATCH_PLACEHOLDER) { this.addWatch(expression); return true; } else { var editIndex = this.getIndexOfTopLevelWatch(watch.uid); if (editIndex > 0) { watch = this._store[editIndex]; if (watch.isUserWatch) { watch.reset(); watch.watchName = expression; watch.watchItemCSS.nameEditable = true; } } } if (!this.isWatchesEvaluationEnabled) { this._watchController.refreshView(); } } return false; }; WatchStore.prototype.deleteWatch = function (uid) { var watch = this.findWatchWithUid(uid); if (watch && watch.uid !== WatchStore.ADD_WATCH_PLACEHOLDER) { var deleteIndex = this.getIndexOfTopLevelWatch(watch.uid); if (deleteIndex >= 0) { this._store.splice(deleteIndex, 1); this._watchController.refreshView(); if (this.isWatchesEvaluationEnabled && watch.isUserWatch && this._watchesStateInfo && this._watchesStateInfo[deleteIndex] && this._watchesStateInfo[deleteIndex].hasOwnProperty(watch.fullName)) { this._watchesStateInfo.splice(deleteIndex, 1); } } } }; WatchStore.prototype.deleteAnyExceptionWatch = function () { var exceptionWatch = this._store[WatchStore.EXCEPTION_WATCHITEM_INDEX]; if (this.isExceptionWatchItem(exceptionWatch)) { this.deleteWatch(exceptionWatch.uid); } }; WatchStore.prototype.insertWatchItemAtIndex = function (watchItem, index) { if (this._store && index >= 0 && index < this._store.length) { watchItem.rootIndex = index; this._store.splice(index, 0, watchItem); } }; WatchStore.prototype.deleteAll = function () { this._store = this._store.filter(function (item) { return !item.isUserWatch; }); this._watchController.refreshView(); }; WatchStore.prototype.getExpandStates = function () { var expandStates = []; var watches = this.getWatches(); if (this.isWatchesEvaluationEnabled || this._watchController.isDataTip) { for (var index = 0; index < watches.length; index++) { expandStates.push(watches[index].getExpandState()); } } else { for (var index = 0; index < watches.length; index++) { expandStates.push(0); } } return expandStates; }; WatchStore.prototype.getWatches = function () { var watches = []; if (this.isWatchesEvaluationEnabled || this._watchController.isDataTip) { for (var index = 0; index < this._store.length; index++) { watches = watches.concat(this._store[index].getDescendants()); } } else { for (var index = 0; index < this._store.length; index++) { var originalWatch = this._store[index]; if (originalWatch.isUserWatch) { var watch = new Debugger.WatchItem(originalWatch.uid, originalWatch.watchName, this); watch.containsExpression = true; watch.watchValue = Plugin.Resources.getString("NotAvailableMessage"); watch.readOnly = true; watch.watchItemCSS.nameEditable = true; watches.push(watch); } else if (originalWatch.uid === WatchStore.ADD_WATCH_PLACEHOLDER) { watches.push(originalWatch); } } } return watches; }; WatchStore.prototype.findWatchWithUid = function (uid) { var watches = this.getWatches(); if (watches) { for (var index = 0; index < watches.length; index++) { var watch = watches[index]; if (watch.uid === uid) { return watch; } } } return null; }; WatchStore.prototype.getChildProperties = function (watch, range) { return this._watchController.getChildProperties(watch, range); }; WatchStore.prototype.updateWatchWithPropInfo = function (watch, propInfo) { watch.evalStatus = 2 /* EvalReceived */; if (propInfo.propertyId !== WatchStore.ERROR_PROPID) { watch.uid = propInfo.propertyId; watch.watchType = propInfo.type; watch.watchType = propInfo.type; watch.watchValue = propInfo.value; watch.fullName = propInfo.fullName; watch.isInvalid = propInfo.invalid; watch.isExpandable = propInfo.expandable; watch.fake = propInfo.fake; watch.readOnly = propInfo.readOnly; watch.isReturnValue = propInfo.returnValue; return true; } return false; }; WatchStore.prototype.storeExceptionWatchState = function () { if (!this._store[WatchStore.EXCEPTION_WATCHITEM_INDEX]) { return; } var exceptionWatchDescendants = this._store[WatchStore.EXCEPTION_WATCHITEM_INDEX].getDescendants(); this._exceptionWatchState = {}; for (var index = 0; index < exceptionWatchDescendants.length; index++) { var watch = exceptionWatchDescendants[index]; if (watch.fullName) { this._exceptionWatchState[watch.fullName] = new WatchStateInfo(watch.fullName, watch.watchValue, watch.hasAdditionalChildren, watch.watchState); } } }; WatchStore.prototype.storeWatchStates = function () { var previousWatchesStateInfo = this._watchesStateInfo; this._watchesStateInfo = []; for (var rootIndex = 0; rootIndex < this._store.length; rootIndex++) { if (this._store[rootIndex].evalStatus === 3 /* EvalRestoreComplete */) { var rootWatchDescendants = this._store[rootIndex].getDescendants(); this._store[rootIndex].rootIndex = rootIndex; var rootWatchStateMap = {}; for (var index = 0; index < rootWatchDescendants.length; index++) { var watch = rootWatchDescendants[index]; var key = this.getExpandStateInformationKey(watch); if (key) { rootWatchStateMap[key] = new WatchStateInfo(key, watch.watchValue, watch.hasAdditionalChildren, watch.watchState); } } this._watchesStateInfo[rootIndex] = rootWatchStateMap; } else { this._watchesStateInfo[rootIndex] = previousWatchesStateInfo[rootIndex]; } } }; WatchStore.prototype.restoreWatch = function (watch, forceGetChildren) { var key = this.getExpandStateInformationKey(watch); if (watch && key && watch.uid !== WatchStore.ERROR_PROPID) { var rootWatchState = this._watchesStateInfo[watch.rootIndex]; if (key.indexOf(WatchStore.EXCEPTION_WATCHITEM_PREFIX) === 0 && watch.rootIndex === WatchStore.EXCEPTION_WATCHITEM_INDEX) { rootWatchState = this._exceptionWatchState; } if (rootWatchState) { var previousWatchState = rootWatchState[key]; if (previousWatchState) { if (watch.watchValue !== previousWatchState.watchValue) { watch.watchItemCSS.valueChanged = true; } else { watch.watchItemCSS.valueChanged = false; } if ((previousWatchState.watchState === Debugger.WatchItem.EXPANDED && watch.isExpandable) || forceGetChildren) { if (forceGetChildren) { watch.clearChildren(); watch.isExpandable = true; } return watch.getChildren(previousWatchState.propertiesRange).then(function (childProperties) { watch.watchState = previousWatchState.watchState; watch.evalStatus = 3 /* EvalRestoreComplete */; return Plugin.Promise.wrap(childProperties.length); }); } } } } watch.evalStatus = 3 /* EvalRestoreComplete */; return Plugin.Promise.wrap(0); }; WatchStore.prototype.markAllWatchesStale = function () { for (var index = 0; index < this._store.length; index++) { this._store[index].evalStatus = 0 /* Stale */; } this.thisWatch.evalStatus = 0 /* Stale */; }; WatchStore.prototype.reset = function (clearExceptionState) { if (typeof clearExceptionState === "undefined") { clearExceptionState = true; } if (this._watchController.isDataTip) { this.storeWatchStates(); for (var index = 0; index < this._store.length; index++) { this._store[index].reset(); } } else { if (this._watchesStateInfo.length === 0) { this.localsExpando.watchState = Debugger.WatchItem.EXPANDED; } if (this._store.length >= WatchStore.EXCEPTION_WATCHITEM_INDEX + 1 && this.isExceptionWatchItem(this._store[WatchStore.EXCEPTION_WATCHITEM_INDEX])) { this._store.splice(WatchStore.EXCEPTION_WATCHITEM_INDEX, 1); if (clearExceptionState) { this._exceptionWatchState = null; } } this.storeWatchStates(); for (var index = 0; index < this._store.length; index++) { this._store[index].reset(); } this.thisWatch.reset(); this.localsExpando.isExpandable = true; } }; WatchStore.prototype.hasUserWatches = function () { if (this._watchController.isDataTip) { return this._store.length > 0; } for (var index = 0; index < this._store.length; index++) { if (this._store[index].isUserWatch) { return true; } } return false; }; WatchStore.prototype.isExceptionWatchItem = function (watchItem) { return watchItem && watchItem.parentWatch === this.localsExpando && watchItem.watchName.toLowerCase() === WatchStore.EXCEPTION_WATCHITEM_PREFIX; }; WatchStore.prototype.getUid = function () { return "" + this._watchId++; }; WatchStore.prototype.getIndexOfTopLevelWatch = function (uid) { for (var index = 0; index < this._store.length; index++) { if (this._store[index].uid === uid) { return index; } } return -1; }; WatchStore.prototype.getExpandStateInformationKey = function (watch) { var fullName = watch.fullName || ""; if (!fullName) { while (watch.parentWatch) { fullName = "." + watch.watchName + fullName; watch = watch.parentWatch; } fullName = watch.watchName + fullName; } return fullName; }; WatchStore.EXCEPTION_WATCHITEM_INDEX = 0; WatchStore.LOCALS_EXPANDO_ID = "locals"; WatchStore.ADD_WATCH_PLACEHOLDER = "addWatch"; WatchStore.EXCEPTION_WATCHITEM_PREFIX = "{exception}"; WatchStore.ERROR_PROPID = "ERROR"; return WatchStore; })(); Debugger.WatchStore = WatchStore; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // GoToLinePrompt.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var GoToLinePrompt = (function (_super) { __extends(GoToLinePrompt, _super); function GoToLinePrompt(parent, dataEnteredCallback) { var _this = this; var container = document.createElement("div"); container.className = "goToLinePromptContainer lightDismissPromptContainer"; parent.appendChild(container); this._inputBox = document.createElement("input"); var okButton = document.createElement("button"); var cancelButton = document.createElement("button"); _super.call(this, container, this._inputBox, cancelButton); this._dataEnteredCallback = dataEnteredCallback; var inputContainer = document.createElement("div"); inputContainer.className = "popupInputContainer"; var buttonContainer = document.createElement("div"); buttonContainer.className = "popupButtonContainer"; var label = document.createElement("div"); label.appendChild(document.createTextNode(Plugin.Resources.getString("GoToLinePromptMessage"))); this._inputBox.className = "promptInputBox"; this._inputBox.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("GoToLineInstructionsTooltip")); this._inputBox.addEventListener("keypress", function (e) { return _this.onKeyPress(e); }); okButton.addEventListener("click", function (e) { return _this.submit(); }); cancelButton.addEventListener("click", function (e) { return _this.hideControl(); }); okButton.innerText = Plugin.Resources.getString("OkButtonLabel"); cancelButton.innerText = Plugin.Resources.getString("CancelButtonLabel"); okButton.className = "okButton"; cancelButton.className = "cancelButton"; inputContainer.appendChild(label); inputContainer.appendChild(this._inputBox); this.subContainer.appendChild(inputContainer); buttonContainer.appendChild(okButton); buttonContainer.appendChild(cancelButton); this.subContainer.appendChild(buttonContainer); } GoToLinePrompt.prototype.activate = function () { this._inputBox.value = ""; this.showControl(); this._inputBox.focus(); }; GoToLinePrompt.prototype.submit = function () { this.hideControl(); this._dataEnteredCallback(this._inputBox.value); }; GoToLinePrompt.prototype.onKeyPress = function (e) { if (e.keyCode === 13 /* Enter */) { this.submit(); return false; } return true; }; return GoToLinePrompt; })(Debugger.LightDismissPopup); Debugger.GoToLinePrompt = GoToLinePrompt; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // EditorContextMenu.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var EditorContextMenu = (function () { function EditorContextMenu(window, executionController, breakpointController, callstackController) { this._editorWindow = window; this._executionController = executionController; this._breakpointController = breakpointController; this._callstackController = callstackController; } Object.defineProperty(EditorContextMenu.prototype, "isShowing", { get: function () { return this._isShowing; }, enumerable: true, configurable: true }); EditorContextMenu.prototype.show = function (x, y, canSetNextStatement, currentBreakpoint, position, isInMargin) { var _this = this; if (!this._editorWindow.displayedDoc) { return; } if (x === 0 && y === 0) { var cursor = document.querySelector(".monaco-editor .cursors-layer > .cursor"); if (cursor) { var cursorRect = cursor.getBoundingClientRect(); x = cursorRect.right - 1; y = cursorRect.bottom - 14; } } this._menuEditorPosition = position; if (this._contextMenu) { this._contextMenu.dispose(); this._contextMenu = null; } this._menuBreakpoints = null; if (isInMargin) { this._menuBreakpoints = this._breakpointController.getBreakpointsStartingAtLine(this._editorWindow.displayedDoc, this._menuEditorPosition.lineNumber); } else { if (currentBreakpoint) { this._menuBreakpoints = [currentBreakpoint]; } } this._editorWindow.dataTips.hideImmediately(false); this._contextMenu = Plugin.ContextMenu.create(this.createMenuItems(canSetNextStatement), "editorMenu"); this._isShowing = true; this._contextMenu.show(x, y); this._contextMenu.addEventListener("dismiss", function () { _this._isShowing = false; }); }; EditorContextMenu.prototype.hide = function () { if (this._contextMenu) { this._contextMenu.dismiss(); } }; EditorContextMenu.prototype.createMenuItems = function (canSetNextStatement) { var _this = this; var menuItems = []; var isRuntimeDoc = this._editorWindow.displayedDoc.isRuntimeDoc; menuItems.push({ id: "menuItemCopyEditorContextMenu", callback: function (menuId, menuItem) { return _this.onCopy(menuId, menuItem); }, label: Plugin.Resources.getString("BreakpointsContextMenuCopy"), type: 1 /* command */, disabled: function () { var selection = _this._editorWindow.getEditorSelection(); return (!selection || selection.isEmpty()); }, accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlC") }); menuItems.push({ id: "menuItemEditCommandsSeparatorEditorContextMenu", type: 3 /* separator */ }); if (this._menuBreakpoints && this._menuBreakpoints.length > 0 && isRuntimeDoc) { menuItems.push({ id: "menuItemRemoveBreakpointEditorContextMenu", callback: function (menuId, menuItem) { return _this.onRemoveBreakpoint(menuId, menuItem); }, label: Plugin.Resources.getString((this._menuBreakpoints.length <= 1 ? "EditorContextMenuRemoveBreakpoint" : "EditorContextMenuRemoveAllBreakpoints")), type: 1 /* command */, disabled: function () { return false; }, accessKey: (this._menuBreakpoints.length === 1 ? Plugin.Resources.getString("/Common/AccessKeyF9") : "") }); var anyEnabled = false; for (var i = 0; i < this._menuBreakpoints.length; i++) { if (this._menuBreakpoints[i].isEnabled) { anyEnabled = true; break; } } if (anyEnabled) { menuItems.push({ id: "menuItemDisableBreakpointEditorContextMenu", callback: function (menuId, menuItem) { return _this.onDisableBreakpoint(menuId, menuItem); }, label: Plugin.Resources.getString((this._menuBreakpoints.length <= 1 ? "EditorContextMenuDisableBreakpoint" : "EditorContextMenuDisableAllBreakpoints")), type: 1 /* command */, disabled: function () { return false; }, accessKey: (this._menuBreakpoints.length === 1 ? Plugin.Resources.getString("/Common/AccessKeyCtrlF9") : "") }); } else { menuItems.push({ id: "menuItemEnableBreakpointEditorContextMenu", callback: function (menuId, menuItem) { return _this.onEnableBreakpoint(menuId, menuItem); }, label: Plugin.Resources.getString((this._menuBreakpoints.length <= 1 ? "EditorContextMenuEnableBreakpoint" : "EditorContextMenuEnableAllBreakpoints")), type: 1 /* command */, disabled: function () { return false; }, accessKey: (this._menuBreakpoints.length === 1 ? Plugin.Resources.getString("/Common/AccessKeyCtrlF9") : "") }); } if (this._menuBreakpoints.length === 1) { var breakpoint = this._menuBreakpoints[0]; if (breakpoint.isTracepoint) { menuItems.push({ id: "menuItemAddTraceEditorContextMenu", callback: function (menuId, menuItem) { return _this.onEditBreakpoint(menuId, menuItem, breakpoint); }, label: Plugin.Resources.getString("BreakpointsContextMenuAddTraceMessage"), type: 1 /* command */, accessKey: Plugin.Resources.getString("/Common/AccessKeyAltF9") }); } else { menuItems.push({ id: "menuItemAddConditionEditorContextMenu", callback: function (menuId, menuItem) { return _this.onEditBreakpoint(menuId, menuItem, breakpoint); }, label: Plugin.Resources.getString("BreakpointsContextMenuAddCondition"), type: 1 /* command */, accessKey: Plugin.Resources.getString("/Common/AccessKeyAltF9") }); } } } else { menuItems.push({ id: "menuItemInsertBreakpointEditorContextMenu", callback: function (menuId, menuItem) { return _this.onInsertBreakpoint(menuId, menuItem, false); }, label: Plugin.Resources.getString("EditorContextMenuInsertBreakpoint"), type: 1 /* command */, disabled: function () { return !isRuntimeDoc; }, accessKey: Plugin.Resources.getString("/Common/AccessKeyF9") }); menuItems.push({ id: "menuItemInsertTracepointEditorContextMenu", callback: function (menuId, menuItem) { return _this.onInsertBreakpoint(menuId, menuItem, true); }, label: Plugin.Resources.getString("EditorContextMenuInsertTracepoint"), type: 1 /* command */, disabled: function () { return !isRuntimeDoc; } }); } menuItems.push({ id: "menuItemBreakpointControlSeparatorEditorContextMenu", type: 3 /* separator */ }); menuItems.push({ id: "menuItemShowNextStatementEditorContextMenu", callback: function (menuId, menuItem) { return _this.onShowNextStatement(menuId, menuItem); }, label: Plugin.Resources.getString("ShowNextStatement"), type: 1 /* command */, disabled: function () { return !_this._executionController.isExecutionPaused; }, accessKey: Plugin.Resources.getString("/Common/AccessKeyAltNumStar") }); menuItems.push({ id: "menuItemRunToCursorEditorContextMenu", callback: function (menuId, menuItem) { return _this.onRunToCursor(menuId, menuItem); }, label: Plugin.Resources.getString("EditorContextMenuRunToCursor"), type: 1 /* command */, disabled: function () { return _this._executionController.isDebuggingDisabled || !isRuntimeDoc; }, accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlF10") }); menuItems.push({ id: "menuItemSetNextStatementEditorContextMenu", callback: function (menuId, menuItem) { return _this.onSetNextStatement(menuId, menuItem); }, label: Plugin.Resources.getString("EditorContextMenuSetNextStatement"), type: 1 /* command */, disabled: function () { return !_this._executionController.isExecutionPaused || !isRuntimeDoc || !canSetNextStatement; }, accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlShiftF10") }); if (this._executionController.debuggerManager.isBreakCompleted) { menuItems.push({ id: "menuItemExecutionControlSeparatorEditorContextMenu", type: 3 /* separator */ }); menuItems.push({ id: "menuItemAddToWatchEditorContextMenu", callback: function (menuId, menuItem) { return _this.onAddToWatch(menuId, menuItem); }, label: Plugin.Resources.getString("EditorContextMenuAddToWatch"), type: 1 /* command */, disabled: function () { return !_this._executionController.isExecutionPaused || !isRuntimeDoc; }, accessKey: Plugin.Resources.getString("/Common/AccessKeyCtrlW") }); } return menuItems; }; EditorContextMenu.prototype.onCopy = function (menuId, menuItem) { var selection = this._editorWindow.getEditorSelection(); if (selection) { var text = this._editorWindow.getEditorRangeContents(selection); clipboardData.setData("text", text); } }; EditorContextMenu.prototype.onEditBreakpoint = function (menuId, menuItem, breakpoint) { this._breakpointController.promptToModifyConditionOrTracepoint(breakpoint); }; EditorContextMenu.prototype.onSetNextStatement = function (menuId, menuItem) { this._executionController.setNextStatement(new Debugger.DocumentLocation(this._editorWindow.displayedDoc, this._menuEditorPosition.lineNumber, this._menuEditorPosition.column)); }; EditorContextMenu.prototype.onShowNextStatement = function (menuId, menuItem) { this._callstackController.goToActiveFrame(); }; EditorContextMenu.prototype.onInsertBreakpoint = function (menuId, menuItem, isTracepoint) { var column = this._editorWindow.adjustInsertionColumn(this._menuEditorPosition.lineNumber, this._menuEditorPosition.column); this._breakpointController.addCodeBreakpoint(new Debugger.DocumentLocation(this._editorWindow.displayedDoc, this._menuEditorPosition.lineNumber, column), isTracepoint); }; EditorContextMenu.prototype.onRemoveBreakpoint = function (menuId, menuItem) { Tools.Utility.Assert.isTrue(this._menuBreakpoints !== null); for (var i = 0; i < this._menuBreakpoints.length; i++) { this._breakpointController.deleteBreakpoint(this._menuBreakpoints[i]); } this._menuBreakpoints = null; }; EditorContextMenu.prototype.onEnableBreakpoint = function (menuId, menuItem) { Tools.Utility.Assert.isTrue(this._menuBreakpoints !== null); for (var i = 0; i < this._menuBreakpoints.length; i++) { this._breakpointController.setEnabledState(this._menuBreakpoints[i], true); } this._menuBreakpoints = null; }; EditorContextMenu.prototype.onDisableBreakpoint = function (menuId, menuItem) { Tools.Utility.Assert.isTrue(this._menuBreakpoints !== null); for (var i = 0; i < this._menuBreakpoints.length; i++) { this._breakpointController.setEnabledState(this._menuBreakpoints[i], false); } this._menuBreakpoints = null; }; EditorContextMenu.prototype.onRunToCursor = function (menuId, menuItem) { this._executionController.runToCursor(this._editorWindow.displayedDoc, this._menuEditorPosition); }; EditorContextMenu.prototype.onAddToWatch = function (menuId, menuItem) { this._executionController.debuggerManager.watchController.addWatchByCurrentEditorPosition(); }; return EditorContextMenu; })(); Debugger.EditorContextMenu = EditorContextMenu; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // editorState.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var EditorState = (function () { function EditorState() { } Object.defineProperty(EditorState.prototype, "model", { get: function () { return this._model; }, set: function (value) { Tools.Utility.Assert.hasValue(value, "Model should not be set without a value"); this._model = value; }, enumerable: true, configurable: true }); EditorState.prototype.addBreakpointDecoration = function (breakpoint) { var _this = this; var info = { editorState: this, decorationId: "", glyphId: "" }; if (this.model) { this.model.changeDecorations(function (changeAccessor) { if (breakpoint.isEnabled && breakpoint.isBound) { info.decorationId = changeAccessor.addDecoration(_this.getTrimmedRange(breakpoint.location), { className: "breakpointDecoration" }); } info.glyphId = changeAccessor.addDecoration(EditorState.positionAsRange(breakpoint.location.startPosition), { className: "", showInOverviewRuler: Plugin.Theme.getValue("plugin-editor-scrollbar-marker-breakpoint-color"), glyphMarginClassName: breakpoint.getGlyphClassName() + " breakpointGlyph " + (!breakpoint.isBound ? " bpUnbound" : "") + (!breakpoint.isEnabled ? " bpDisabled" : "") }); }); } return info; }; EditorState.prototype.displayInstructionPointerDecoration = function (location) { var _this = this; var info = { editorState: this, decorationId: "", glyphId: "" }; if (this.model) { this.model.changeDecorations(function (changeAccessor) { info.decorationId = changeAccessor.addDecoration(_this.getTrimmedRange(location), { className: "instructionPointerDecoration" }); info.glyphId = changeAccessor.addDecoration(EditorState.positionAsRange(location.startPosition), { showInOverviewRuler: Plugin.Theme.getValue("plugin-editor-scrollbar-marker-instruction-pointer-color"), glyphMarginClassName: "instructionPointerGlyph" }); }); } return info; }; EditorState.prototype.addExceptionDecoration = function (range) { var info = { editorState: this, decorationId: "", glyphId: "" }; if (this.model) { this.model.changeDecorations(function (changeAccessor) { info.decorationId = changeAccessor.addDecoration(range, { className: "", showInOverviewRuler: Plugin.Theme.getValue("plugin-font-editor-erroradornment-background-color") }); }); } return info; }; EditorState.prototype.displayActiveFrameDecoration = function (location) { var _this = this; var info = { editorState: this, decorationId: "", glyphId: "" }; if (this.model) { this.model.changeDecorations(function (changeAccessor) { info.decorationId = changeAccessor.addDecoration(_this.getTrimmedRange(location), { className: "activeFrameDecoration" }); info.glyphId = changeAccessor.addDecoration(EditorState.positionAsRange(location.startPosition), { showInOverviewRuler: Plugin.Theme.getValue("plugin-editor-scrollbar-marker-active-frame-color"), glyphMarginClassName: "activeFrameGlyph" }); }); } return info; }; EditorState.prototype.removeDecorationInfo = function (info) { if (this.model && this.model.decorations) { this.model.changeDecorations(function (changeAccessor) { if (info.decorationId) { changeAccessor.removeDecoration(info.decorationId); info.decorationId = null; } if (info.glyphId) { changeAccessor.removeDecoration(info.glyphId); info.glyphId = null; } }); } }; EditorState.prototype.getTrimmedRange = function (range) { if (!this._model) { return { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 }; } var text = this._model.getValueInRange(range); var endColumn = range.endColumn; var endLine = range.endLineNumber; if (endLine > this._model.getLineCount()) { endLine = this._model.getLineCount(); endColumn = this._model.getLineContent(endLine).length; } var i = text.length - 1; while (text.charAt(i).match(/[\s]/)) { if (text.charAt(i) === "\n") { endLine--; endColumn = this._model.getLineContent(endLine).length + 1; if (text.charAt(i - 1) === "\r") { i--; } } else { endColumn--; } i--; } return { startLineNumber: range.startLineNumber, startColumn: range.startColumn, endLineNumber: endLine, endColumn: endColumn }; }; EditorState.positionAsRange = function (position) { return { startLineNumber: position.line, endLineNumber: position.line, startColumn: position.column, endColumn: position.column }; }; return EditorState; })(); Debugger.EditorState = EditorState; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // editorWindow.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var EditorWindow = (function () { function EditorWindow(debuggerManager, documentController, breakpointController, executionController, callstackController, rootElement, ready) { var _this = this; this._decorationInfos = {}; this._locationUpdateRegistrations = {}; this.propertyChanged = new Common.EventSource(); this.editorUpdated = new Common.EventSource(); this._documentController = documentController; this._breakpointController = breakpointController; this._executionController = executionController; this._callstackController = callstackController; this._persistenceManager = debuggerManager.persistenceManager; this._searchProvider = new Debugger.SearchProvider(debuggerManager); this._wordWrapEnabled = false; this._goToLinePrompt = new Debugger.GoToLinePrompt(document.getElementById("editor"), this.goToLine.bind(this)); this._editorContextMenu = new Debugger.EditorContextMenu(this, this._executionController, this._breakpointController, this._callstackController); this._editorElement = document.getElementById("editor"); Tools.Utility.Assert.isTrue(this._editorElement !== null); window.setImmediate(function () { require(["vs/editor/editor.main"], function () { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(326 /* Debugger_Editor_Create_Start */); _this._editor = Monaco.Editor.create(_this._editorElement, { value: "", mode: null, scrollbar: { vertical: "visible", horizontal: "visible", useShadows: false, verticalHasArrows: true, horizontalHasArrows: true, handleMouseWheel: true, verticalScrollbarSize: 17, horizontalScrollbarSize: 17, arrowSize: 30 }, readOnly: true, scrollBeyondLastLine: false, roundedSelection: true, insertSpaces: false, quickSuggestions: false, autoClosingBrackets: false, automaticLayout: false, glyphMargin: true, hover: false, nativeContextMenu: false, wrappingColumn: _this.wordWrapEnabled === 0 /* On */ ? 0 : EditorWindow.WRAPPING_COLUMN, tabFocusMode: true, selectOnLineNumbers: false, stopLineTokenizationAfter: 1e7 }); _this.propertyChanged.invoke("wordWrapEnabled"); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(327 /* Debugger_Editor_Create_Stop */); _this._dataTips = new Debugger.DataTips(_this._editor, _this, debuggerManager); window.addEventListener("resize", function () { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(328 /* Debugger_Editor_Layout_Start */); _this._editor.layout(); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(329 /* Debugger_Editor_Layout_Stop */); }); _this.setupControls(); ready(); }); }); } Object.defineProperty(EditorWindow.prototype, "previousSelectionLocation", { get: function () { return this._previousSelectionLocation; }, enumerable: true, configurable: true }); Object.defineProperty(EditorWindow.prototype, "displayedDoc", { get: function () { return this._displayedDoc; }, enumerable: true, configurable: true }); Object.defineProperty(EditorWindow.prototype, "exceptionViewZone", { get: function () { return this._exceptionViewZone; }, enumerable: true, configurable: true }); Object.defineProperty(EditorWindow.prototype, "searchProvider", { get: function () { return this._searchProvider; }, enumerable: true, configurable: true }); Object.defineProperty(EditorWindow.prototype, "dataTips", { get: function () { return this._dataTips; }, enumerable: true, configurable: true }); Object.defineProperty(EditorWindow.prototype, "contextMenu", { get: function () { return this._editorContextMenu; }, enumerable: true, configurable: true }); Object.defineProperty(EditorWindow.prototype, "wordWrapEnabled", { get: function () { if (this._editor) { if (this._editor.getConfiguration().isDominatedByLongLines) { return 2 /* Disabled */; } return this._wordWrapEnabled ? 0 /* On */ : 1 /* Off */; } return 1 /* Off */; }, set: function (value) { F12.Tools.Utility.Assert.areNotEqual(value, 2 /* Disabled */); var oldValue = this.wordWrapEnabled; this._wordWrapEnabled = (value === 0 /* On */); if (this._editor) { this._editor.updateOptions({ wrappingColumn: this._wordWrapEnabled ? 0 : EditorWindow.WRAPPING_COLUMN }); } if (this.wordWrapEnabled !== oldValue) { this.propertyChanged.invoke("wordWrapEnabled"); } }, enumerable: true, configurable: true }); Object.defineProperty(EditorWindow.prototype, "editorPosition", { get: function () { return (this._editor && this._editor.getPosition()) || { lineNumber: 1, column: 1 }; }, set: function (position) { if (this._editor) { this._editor.setPosition(position); } }, enumerable: true, configurable: true }); EditorWindow.prototype.getEditorSelection = function () { return this._editor && this._editor.getSelection(); }; EditorWindow.prototype.getEditorRangeContents = function (selection) { var model = this._editor && this._editor.getModel(); if (!model) { return ""; } return model.getValueInRange(selection); }; EditorWindow.prototype.documentAdded = function (doc) { }; EditorWindow.prototype.documentRemoved = function (doc) { }; EditorWindow.prototype.documentAsLibraryStateChanged = function (doc) { }; EditorWindow.prototype.documentUrlChanged = function (doc) { }; EditorWindow.prototype.documentUpdated = function (doc, hasMimeTypeChanged) { var _this = this; if (doc.isOpen) { doc.getText().then(function (text) { _this.updateDisplayedText(doc, text, true); }); } }; EditorWindow.prototype.documentClosed = function (doc) { if (this._displayedDoc === doc) { this._displayedDoc = null; var pendingSelection = this._pendingSelectionLocation; if (pendingSelection && pendingSelection.startPosition && pendingSelection.endPosition) { this._previousSelectionLocation = new Debugger.DocumentLocation(doc, pendingSelection.startPosition.line, pendingSelection.startPosition.column, doc, pendingSelection.endPosition.line, pendingSelection.endPosition.column, pendingSelection.rawLocation); this._pendingSelectionLocation = null; } else { var selection = this._editor.getSelection(); if (selection) { this._previousSelectionLocation = new Debugger.DocumentLocation(doc, selection.startLineNumber, selection.startColumn, doc, selection.endLineNumber, selection.endColumn); } } this.clearEditorState(); var editorState = doc.editorState; if (editorState) { if (editorState.model) { editorState.model.destroy(); } doc.editorState = null; } if (this._editor) { this.dataTips.dataTipsEnabled = false; this.setEditorModel(null); } } }; EditorWindow.prototype.documentOpened = function (doc, activation, location) { var _this = this; if (location && location.rawLocation) { this._persistenceManager.updateEditorPosition(location.rawLocation.offset); } if (doc === this._displayedDoc) { if (location && location.startPosition && !this._pendingSelectionLocation) { this.revealRange(location, activation === 2 /* SwitchWithFocus */); this.editorPosition = location; } return Plugin.Promise.wrap(null); } if (activation === 0 /* BackgroundOpen */) { if (this._persistenceManager.isPrettyPrintEnabled(doc)) { return doc.getText(); } this.editorUpdated.invoke(doc); return Plugin.Promise.wrap(null); } Tools.Utility.Assert.isTrue(doc.isOpen && doc === this._documentController.currentDoc, "documentOpened should only be called from documentController after setting the currentDoc"); this.dataTips.dataTipsEnabled = false; this.saveLoadedDoc(); this.clearEditorState(); this._previousSelectionLocation = null; this._displayedDoc = doc; var existingEditorState = doc.editorState; if (existingEditorState) { this.setEditorModel(existingEditorState.model); this.editorUpdated.invoke(doc); } else { doc.editorState = new Debugger.EditorState(); } return Plugin.Promise.wrap(null).then(function () { if (!existingEditorState) { _this._pendingSelectionLocation = null; return doc.getText().then(function (text) { if (!doc.hasText) { _this._pendingSelectionLocation = location; } _this.updateDisplayedText(doc, text, true); }, function (value) { }, function (text) { return _this.updateDisplayedText(doc, text, false); }); } else { return Plugin.Promise.wrap(null); } }).then(function () { _this.restoreEditorState(doc); if (location && location.startPosition && !_this._pendingSelectionLocation) { _this.revealRange(location, activation === 2 /* SwitchWithFocus */); _this.editorPosition = location; } }); }; EditorWindow.prototype.doLayout = function () { if (this._editor) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(328 /* Debugger_Editor_Layout_Start */); this._editor.layout(); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(329 /* Debugger_Editor_Layout_Stop */); } }; EditorWindow.prototype.breakStateChanged = function (isBroken) { this._editorContextMenu.hide(); if (!isBroken) { this.destroyExceptionDisplays(); } }; EditorWindow.prototype.exceptionFilterChanged = function (filter) { }; EditorWindow.prototype.breakCallComplete = function () { }; EditorWindow.prototype.justMyCodeStateChanged = function (newValue) { }; EditorWindow.prototype.createExceptionDisplays = function (location, errorMessage) { var editorState = location.startPosition.doc.editorState; if (location.startPosition && location.startPosition.doc.isOpen && editorState) { this._exceptionViewZone = new Debugger.ExceptionViewZone(location, errorMessage, editorState, this._editor); this._exceptionViewZone.addToEditor(this.displayedDoc); this._decorationInfos[EditorWindow.EXCEPTION_DECORATION_ID] = editorState.addExceptionDecoration({ startLineNumber: location.endLineNumber + 1, startColumn: 0, endLineNumber: location.endLineNumber + 1, endColumn: 1 }); } }; EditorWindow.prototype.destroyExceptionDisplays = function () { var info = this._decorationInfos[EditorWindow.EXCEPTION_DECORATION_ID]; if (info && info.editorState) { info.editorState.removeDecorationInfo(info); delete this._decorationInfos[EditorWindow.EXCEPTION_DECORATION_ID]; } if (this._exceptionViewZone) { this._exceptionViewZone.cleanUp(); this._exceptionViewZone = null; } }; EditorWindow.prototype.addSetNextStatementErrorViewZone = function (location) { var _this = this; if (location.startPosition.doc.editorState) { this.removeSetNextStatementErrorViewZone(location.startPosition.doc); var viewZoneElement = document.createElement("div"); var errorGlyph = document.createElement("div"); errorGlyph.className = "exceptionGlyph"; viewZoneElement.appendChild(errorGlyph); viewZoneElement.appendChild(document.createTextNode(Plugin.Resources.getString("SetNextStatementFailed"))); viewZoneElement.className = "setNextStatementErrorViewZone"; var viewZone = { afterLineNumber: location.endLineNumber, heightInLines: 1, domNode: viewZoneElement }; location.startPosition.doc.editorState.viewZoneSetNextStatement = viewZone; if (this._documentController.currentDoc === location.startPosition.doc) { this._editor.changeViewZones(function (changeAccessor) { _this._setNextStatementViewZoneId = changeAccessor.addZone(viewZone); }); } } }; EditorWindow.prototype.removeSetNextStatementErrorViewZone = function (doc) { var _this = this; if (doc.editorState && doc.editorState.viewZoneSetNextStatement) { if (this._documentController.currentDoc === doc && this._setNextStatementViewZoneId) { this._editor.changeViewZones(function (changeAccessor) { changeAccessor.removeZone(_this._setNextStatementViewZoneId); _this._setNextStatementViewZoneId = null; }); } doc.editorState.viewZoneSetNextStatement = null; } }; EditorWindow.prototype.activeFrameChanged = function (frame) { if (frame && frame.isLibraryMarkerFrame) { return; } if ((!frame || frame.isInstructionPointerFrame) && (this._instructionPointerFrame && this._instructionPointerFrame.location.startPosition && this._instructionPointerFrame.location.startPosition.doc.isOpen)) { var info = this._decorationInfos[EditorWindow.IP_DECORATION_ID]; if (info && info.editorState) { info.editorState.removeDecorationInfo(info); delete this._decorationInfos[EditorWindow.IP_DECORATION_ID]; } this.removeSetNextStatementErrorViewZone(this._instructionPointerFrame.location.startPosition.doc); } if (this._activeFrame && this._activeFrame.location.startPosition && this._activeFrame.location.startPosition.doc.isOpen) { var info = this._decorationInfos[EditorWindow.ACTIVE_FRAME_DECORATION_ID]; if (info && info.editorState) { info.editorState.removeDecorationInfo(info); delete this._decorationInfos[EditorWindow.ACTIVE_FRAME_DECORATION_ID]; } } if (!frame || frame.isInstructionPointerFrame) { this._instructionPointerFrame = null; this._activeFrame = null; } if (!frame || !frame.isInstructionPointerFrame) { this._activeFrame = null; } if (frame && frame.location) { var newLocation = frame.location; if (frame.isInstructionPointerFrame) { this._instructionPointerFrame = frame; } else { this._activeFrame = frame; } } this.updateExecutionDecorations(); }; EditorWindow.prototype.callstacksChanged = function () { }; EditorWindow.prototype.getLocalMatches = function (text) { var model = this._editor && this._editor.getModel(); if (model) { return model.findMatches(text, false, false, false, false); } return []; }; EditorWindow.prototype.addDecorations = function (ranges, className, color) { var decorationIds = []; var model = this._editor && this._editor.getModel(); if (ranges && model) { model.changeDecorations(function (changeAccessor) { for (var i = 0; i < ranges.length; i++) { decorationIds.push(changeAccessor.addDecoration(ranges[i], { className: className, showInOverviewRuler: color })); } }); } return decorationIds; }; EditorWindow.prototype.removeDecorations = function (decorationIds, doc) { var model = doc && doc.editorState && doc.editorState.model; if (decorationIds && model) { model.changeDecorations(function (changeAccessor) { for (var i = 0; i < decorationIds.length; i++) { changeAccessor.removeDecoration(decorationIds[i]); } }); } }; EditorWindow.prototype.selectRange = function (range, focus) { if (this._editor) { this.revealRange(range, focus); this._editor.setSelection(range); } }; EditorWindow.prototype.getLineCount = function () { var editorState = this._documentController.currentDoc && this._documentController.currentDoc.editorState; if (editorState) { return editorState.model.getLineCount(); } return 0; }; EditorWindow.prototype.getLineContents = function (lineNumber) { var model = this._editor && this._editor.getModel(); if (model && lineNumber > 0 && lineNumber <= model.getLineCount()) { return model.getLineContent(lineNumber); } return ""; }; EditorWindow.prototype.revealPosition = function (position) { this.revealRange({ startLineNumber: position.lineNumber, startColumn: position.column, endLineNumber: position.lineNumber, endColumn: position.column }); }; EditorWindow.prototype.revealRange = function (range, focus) { if (typeof focus === "undefined") { focus = true; } var model = this._editor && this._displayedDoc && this._displayedDoc.editorState && this._displayedDoc.editorState.model; if (!model) { return; } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(314 /* Debugger_RevealRange_Start */); var shouldRevealLineInCenterOfViewport = true; var shouldRevealColumn = true; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(332 /* Debugger_Editor_RevealPosition_Start */); this._editor.revealRange(range, shouldRevealLineInCenterOfViewport, shouldRevealColumn); var startPosition = { lineNumber: range.startLineNumber, column: range.startColumn }; var numLines = this._displayedDoc.editorState.model.getLineCount(); if (this._editor.getScrollTop() > this._editor.getTopForLineNumber(Math.min(range.startLineNumber, numLines))) { this._editor.revealPosition(startPosition, false, false); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(333 /* Debugger_Editor_RevealPosition_Stop */); this._editor.setPosition(startPosition); if (focus) { this._editor.focus(); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(315 /* Debugger_RevealRange_Stop */); }; EditorWindow.prototype.goToLine = function (lineCol) { var strings = lineCol.split(","); var line, column; line = parseInt(strings[0], 10); if (strings.length > 0) { column = parseInt(strings[1], 10); if (isNaN(line) && !isNaN(column)) { line = (this._editor && this._editor.getPosition().lineNumber) || 1; } } if (!isNaN(line) || !isNaN(column)) { if (!column) { column = 0; } this.revealRange({ startLineNumber: line, startColumn: column, endLineNumber: line, endColumn: column }); } }; EditorWindow.prototype.adjustInsertionColumn = function (lineNumber, column) { var model = this._editor && this._editor.getModel(); if (model) { var text = model.getLineContent(lineNumber); if (text) { var firstNonWhitespaceColumn = text.search(/\S/) + 1; return Math.max(column, firstNonWhitespaceColumn); } } return column; }; EditorWindow.prototype.breakpointChanged = function (breakpoint, previousId) { if (this._decorationInfos[breakpoint.breakpointId]) { this.breakpointRemoved(breakpoint, previousId); this.breakpointAdded(breakpoint); } }; EditorWindow.prototype.breakpointAdded = function (breakpoint) { var _this = this; if (breakpoint.location) { this._locationUpdateRegistrations[breakpoint.breakpointId] = breakpoint.location.changesCompleted.addHandler(function () { var info = _this._decorationInfos[breakpoint.breakpointId]; if (info && info.editorState) { info.editorState.removeDecorationInfo(info); delete _this._decorationInfos[breakpoint.breakpointId]; } var newEditorState = breakpoint.location.startPosition.doc.editorState; if (newEditorState) { _this._decorationInfos[breakpoint.breakpointId] = newEditorState.addBreakpointDecoration(breakpoint); } }); if (breakpoint.location.startPosition && breakpoint.location.startPosition.doc.isOpen) { var editorState = breakpoint.location.startPosition.doc.editorState; if (editorState && editorState.model) { this._decorationInfos[breakpoint.breakpointId] = editorState.addBreakpointDecoration(breakpoint); this.updateExecutionDecorations(); } } } }; EditorWindow.prototype.breakpointRemoved = function (breakpoint, previousId) { if (typeof previousId === "undefined") { previousId = breakpoint.breakpointId; } var info = this._decorationInfos[previousId]; if (info && info.editorState) { info.editorState.removeDecorationInfo(info); } delete this._decorationInfos[previousId]; var oldRegistration = this._locationUpdateRegistrations[previousId]; if (oldRegistration) { oldRegistration.unregister(); this._locationUpdateRegistrations[previousId] = null; } }; EditorWindow.prototype.conditionPromptInvoked = function (breakpoint) { }; EditorWindow.prototype.tracepointPromptInvoked = function (breakpoint) { }; EditorWindow.prototype.pendingBreakpointAdded = function (breakpoint) { this._decorationInfos[breakpoint.breakpointId] = {}; }; EditorWindow.prototype.updateDisplayedText = function (doc, text, isComplete) { if (doc.editorState) { var editorState = doc.editorState; if (editorState.model) { var oldText = editorState.model.getValue(); if (oldText === text) { return; } if (text.length > oldText.length && text.substr(0, oldText.length) === oldText) { this.appendTextToModel(doc, editorState.model, text.substr(oldText.length), isComplete); return; } else { editorState.model.destroy(); } } if (text) { var candidates = doc.getMimeTypeCandidates(); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(324 /* Debugger_Editor_CreateModel_Start */); var model = Monaco.Editor.createModel(text, candidates); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(325 /* Debugger_Editor_CreateModel_Stop */); editorState.model = model; if (doc === this._displayedDoc && this._documentController.currentDoc === doc) { this.setEditorModel(model); this.updateViewAfterDocumentTextUpdated(doc); } if (isComplete) { this.editorUpdated.invoke(doc); } } } }; EditorWindow.prototype.appendTextToModel = function (doc, model, additionalText, isComplete) { var _this = this; var oldWordWrapEnabled = this.wordWrapEnabled; model.change(function (changeAccessor) { var lastLineNumber = model.getLineCount(); var lastColumn = model.getLineMaxColumn(lastLineNumber); changeAccessor.insertText({ lineNumber: lastLineNumber, column: lastColumn }, additionalText); if (_this.wordWrapEnabled !== oldWordWrapEnabled) { _this.propertyChanged.invoke("wordWrapEnabled"); } if (isComplete) { _this.editorUpdated.invoke(doc); } }); }; EditorWindow.prototype.updateViewAfterDocumentTextUpdated = function (doc) { this.refreshDecorations(doc); this.updateSelectionAndViewport(doc); this._searchProvider.findAndHighlightMatches(); if (this._exceptionViewZone) { var callstack = this._callstackController.callstacks[0]; var newLocation = callstack && callstack.instructionPointerFrame && callstack.instructionPointerFrame.location; this._exceptionViewZone.moveLocation(doc, newLocation); } }; EditorWindow.prototype.updateSelectionAndViewport = function (doc) { if (this._currentSelectionLocation && this._documentController.currentDoc === doc) { var updatedSelection = doc.createDocumentLocation(this._currentSelectionLocation.rawLocation.offset, this._currentSelectionLocation.rawLocation.length); if (updatedSelection.startPosition) { if (this._displayedDoc && updatedSelection.startPosition.doc === this._displayedDoc) { this.selectRange(updatedSelection, false); } else { return; } } } else if (this._activeFrame && this._documentController.currentDoc === this._activeFrame.location.startPosition.doc) { this.revealRange(this._activeFrame.location); } else if (this._instructionPointerFrame && this._documentController.currentDoc === this._instructionPointerFrame.location.startPosition.doc) { this.revealRange(this._instructionPointerFrame.location); } else { var persistedOffset = this._persistenceManager.getOffsetForDoc(doc); if (persistedOffset > 0) { this.revealPosition(doc.createDocumentLocation(persistedOffset, 0)); } } }; EditorWindow.prototype.saveLoadedDoc = function () { if (this._displayedDoc && this._displayedDoc.editorState) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(334 /* Debugger_Editor_SaveViewState_Start */); this._displayedDoc.editorState.viewState = this._editor.saveViewState(); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(335 /* Debugger_Editor_SaveViewState_Stop */); } }; EditorWindow.prototype.setEditorModel = function (model) { var oldWordWrapValue = this.wordWrapEnabled; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(322 /* Debugger_Editor_SetModel_Start */); this._editor.setModel(model); if (this.wordWrapEnabled !== oldWordWrapValue) { this.propertyChanged.invoke("wordWrapEnabled"); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(323 /* Debugger_Editor_SetModel_Stop */); }; EditorWindow.prototype.clearEditorState = function () { var _this = this; if (this._exceptionViewZone) { this._exceptionViewZone.removeFromEditor(); } this._editor.changeViewZones(function (changeAccessor) { if (_this._setNextStatementViewZoneId) { changeAccessor.removeZone(_this._setNextStatementViewZoneId); } }); this._displayedDoc = null; this._currentSelectionLocation = null; }; EditorWindow.prototype.restoreEditorState = function (doc) { var _this = this; if (doc.editorState) { if (this._exceptionViewZone) { this._exceptionViewZone.addToEditor(doc); } this._editor.changeViewZones(function (changeAccessor) { if (doc.editorState.viewZoneSetNextStatement) { _this._setNextStatementViewZoneId = changeAccessor.addZone(doc.editorState.viewZoneSetNextStatement); } }); if (doc.editorState.model) { this._searchProvider.findAndHighlightMatches(); } var textContainer = this._editorElement.querySelector("textarea.inputarea"); if (textContainer) { textContainer.tabIndex = 1; } if (doc.editorState.viewState) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(336 /* Debugger_Editor_RestoreViewState_Start */); this._editor.restoreViewState(doc.editorState.viewState); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(337 /* Debugger_Editor_RestoreViewState_Stop */); } this._dataTips.dataTipsEnabled = doc.isRuntimeDoc; } }; EditorWindow.prototype.refreshDecorations = function (doc) { if (doc.isOpen) { var editorState = doc.editorState; if (editorState && editorState.model) { var bps = this._breakpointController.getBreakpoints(doc); for (var i = 0; i < bps.length; i++) { var oldInfo = this._decorationInfos[bps[i].breakpointId]; if (oldInfo && oldInfo.editorState) { oldInfo.editorState.removeDecorationInfo(oldInfo); delete this._decorationInfos[bps[i].breakpointId]; } this._decorationInfos[bps[i].breakpointId] = editorState.addBreakpointDecoration(bps[i]); } this.updateExecutionDecorations(); } } }; EditorWindow.prototype.addChangesCompletedHandler = function (location, id) { var _this = this; if (location) { this._locationUpdateRegistrations[id] = location.changesCompleted.addHandler(function () { var info = _this._decorationInfos[id]; if (info && info.editorState) { info.editorState.removeDecorationInfo(info); delete _this._decorationInfos[id]; } var newEditorState = location.startPosition.doc.editorState; if (newEditorState) { if (id === EditorWindow.IP_DECORATION_ID) { _this._decorationInfos[id] = newEditorState.displayInstructionPointerDecoration(location); } else if (id === EditorWindow.ACTIVE_FRAME_DECORATION_ID) { _this._decorationInfos[id] = newEditorState.displayActiveFrameDecoration(location); } } }); } }; EditorWindow.prototype.updateExecutionDecorations = function () { var _this = this; [EditorWindow.IP_DECORATION_ID, EditorWindow.ACTIVE_FRAME_DECORATION_ID].forEach(function (id) { var info = _this._decorationInfos[id]; if (info && info.editorState) { info.editorState.removeDecorationInfo(info); delete _this._decorationInfos[id]; } if (_this._locationUpdateRegistrations[id]) { _this._locationUpdateRegistrations[id].unregister(); delete _this._locationUpdateRegistrations[id]; } }); var ipFrameStateExists = this._instructionPointerFrame && this._instructionPointerFrame.location.startPosition && this._instructionPointerFrame.location.startPosition.doc.editorState; if (ipFrameStateExists) { var editorState = this._instructionPointerFrame.location.startPosition.doc.editorState; this._decorationInfos[EditorWindow.IP_DECORATION_ID] = editorState.displayInstructionPointerDecoration(this._instructionPointerFrame.location); this.addChangesCompletedHandler(this._instructionPointerFrame.location, EditorWindow.IP_DECORATION_ID); } var activeFrameDecorationRequired = (this._instructionPointerFrame && this._activeFrame) ? !Debugger.DocumentLocation.areEqual(this._activeFrame.location, this._instructionPointerFrame.location) : true; var activeFrameStateExists = this._activeFrame && this._activeFrame.location.startPosition && this._activeFrame.location.startPosition.doc.editorState; if (activeFrameDecorationRequired && activeFrameStateExists) { var editorState = this._activeFrame.location.startPosition.doc.editorState; this._decorationInfos[EditorWindow.ACTIVE_FRAME_DECORATION_ID] = editorState.displayActiveFrameDecoration(this._activeFrame.location); this.addChangesCompletedHandler(this._activeFrame.location, EditorWindow.ACTIVE_FRAME_DECORATION_ID); } }; EditorWindow.prototype.showContextMenu = function (eventArgs) { var _this = this; this._editorContextMenu.hide(); if (this._documentController.currentDoc) { var isInMargin = null; var posx = 0; var posy = 0; var position = null; if (eventArgs) { isInMargin = (eventArgs.target.type === MonacoDefinitions.MouseTargetType.GUTTER_GLYPH_MARGIN || eventArgs.target.type === MonacoDefinitions.MouseTargetType.GUTTER_LINE_NUMBERS); posx = eventArgs.event.posx; posy = eventArgs.event.posy; position = eventArgs.target.position; } if (!position) { position = this.editorPosition; } else { var selection = this.getEditorSelection(); if (!selection || !selection.containsPosition(position)) { this.editorPosition = position; } } var location = new Debugger.DocumentLocation(this._documentController.currentDoc, position.lineNumber, position.column); var retValCanSetNextStatement = true; var retValCurrentBreakpoint = null; var canSetNextStatementPromise = new Plugin.Promise(function (completed) { _this._executionController.canSetNextStatement(location).then(function (canSetNextStatement) { retValCanSetNextStatement = canSetNextStatement; completed(); }); }); var currentBreakpointPromise; if (isInMargin || !this._documentController.currentDoc.isRuntimeDoc) { currentBreakpointPromise = Plugin.Promise.wrap(null); } else { var currentBreakpointPromise = new Plugin.Promise(function (completed) { var column = _this.adjustInsertionColumn(location.lineNumber, location.column); var adjustedLocation = new Debugger.DocumentLocation(location.startPosition.doc, location.lineNumber, column); _this._breakpointController.getBreakpointAtLocation(adjustedLocation).then(function (currentBreakpoint) { retValCurrentBreakpoint = currentBreakpoint; completed(); }); }); } Plugin.Promise.timeout(EditorWindow.CONTEXTMENU_SHOW_TIMEOUT, Plugin.Promise.join([canSetNextStatementPromise, currentBreakpointPromise])).then(function () { }, function () { }).done(function () { _this._editorContextMenu.show(posx, posy, retValCanSetNextStatement, retValCurrentBreakpoint, position, isInMargin); }); } if (eventArgs) { eventArgs.event.preventDefault(); eventArgs.event.stopPropagation(); } }; EditorWindow.prototype.setupControls = function () { var _this = this; this._editor.addListener("mousedown", function (eventArgs) { if (eventArgs.event.leftButton) { _this._editorContextMenu.hide(); if (eventArgs.target.type === MonacoDefinitions.MouseTargetType.GUTTER_GLYPH_MARGIN || eventArgs.target.type === MonacoDefinitions.MouseTargetType.GUTTER_LINE_NUMBERS) { var line = eventArgs.target.position.lineNumber; var startCol = (eventArgs.target.range ? eventArgs.target.range.startColumn : eventArgs.target.position.column); var endCol = (eventArgs.target.range ? eventArgs.target.range.endColumn : undefined); if (startCol === 0) { var model = _this._editor.getModel(); if (model) { var lineContent = model.getLineContent(line); if (lineContent) { var spaces = lineContent.match(/^\s*/); if (spaces.length > 0) { startCol = spaces[0].length + 1; } } } } _this.toggleBreakpoint(line, startCol, endCol, true); } } }); this._editor.addListener("contextMenu", function (eventArgs) { _this.showContextMenu(eventArgs); }); this._editor.addListener("selectionChanged", function (eventArgs) { var selection = eventArgs.selection; _this._currentSelectionLocation = new Debugger.DocumentLocation(_this.displayedDoc, selection.startLineNumber, selection.startColumn, _this.displayedDoc, selection.endLineNumber, selection.endColumn); if (_this._documentController.currentDoc) { _this._persistenceManager.updateEditorPosition(_this.getCurrentOffset()); } }); document.addEventListener("keydown", function (e) { return _this.onKeyDown(e); }); if (Plugin.F12) { Plugin.F12.addEventListener("keydown", function (e) { return _this.onKeyDown(e); }); } this._editor.getHandlerService().bind({ key: "Shift-F10" }, function () { _this.showContextMenu(); return true; }); }; EditorWindow.prototype.onKeyDown = function (e) { if (this._documentController.currentDoc && this._editor.getModel()) { this._persistenceManager.updateEditorPosition(this.getCurrentOffset()); if (e.keyCode === 71 /* G */ && e.ctrlKey && !e.shiftKey && !e.altKey) { this._goToLinePrompt.activate(); return false; } else if ((e.keyCode === 120 /* F9 */ && !e.ctrlKey && !e.shiftKey && !e.altKey) || (e.keyCode === 66 /* B */ && e.ctrlKey && !e.shiftKey && !e.altKey)) { var editorLocation = this._editor.getPosition(); this.toggleBreakpoint(editorLocation.lineNumber, editorLocation.column); } else if (e.keyCode === 120 /* F9 */ && !e.ctrlKey && !e.shiftKey && e.altKey) { var editorLocation = this._editor.getPosition(); this.setBreakpointCondition(editorLocation.lineNumber, editorLocation.column); } else if (e.keyCode === 120 /* F9 */ && e.ctrlKey && !e.shiftKey && !e.altKey) { var editorLocation = this._editor.getPosition(); this.setBreakpointState(editorLocation.lineNumber, editorLocation.column); } else if (e.keyCode === 121 /* F10 */ && e.ctrlKey && e.shiftKey && !e.altKey) { if (this._executionController.isExecutionPaused) { var editorLocation = this._editor.getPosition(); this._executionController.setNextStatement(new Debugger.DocumentLocation(this._documentController.currentDoc, editorLocation.lineNumber, editorLocation.column)); } } else if (e.keyCode === 121 /* F10 */ && e.ctrlKey && !e.shiftKey && !e.altKey) { if (this._executionController.isExecutionPaused) { var editorLocation = this._editor.getPosition(); this._executionController.runToCursor(this._documentController.currentDoc, editorLocation); } } else if (e.keyCode === 69 /* E */ && e.ctrlKey && !e.altKey && !e.shiftKey) { var position = this.editorPosition; if (position) { this.revealPosition(position); } return false; } } return true; }; EditorWindow.prototype.getCurrentOffset = function () { if (!this._displayedDoc) { return 0; } var editorPosition = this._editor && this._editor.getPosition(); if (editorPosition) { var displayPosition = { doc: this._displayedDoc, line: editorPosition.lineNumber, column: editorPosition.column }; return this._displayedDoc.getRawLocation(displayPosition).offset; } return 0; }; EditorWindow.prototype.toggleBreakpoint = function (lineNumber, startColumn, endColumn, removeAll, isTracepoint) { if (this._documentController.currentDoc && this._documentController.currentDoc.isRuntimeDoc) { Tools.Utility.Assert.hasValue(this._documentController.currentDoc && this._documentController.currentDoc.editorState, "toggleBreakpoint for an invalid document"); var startColumn = this.adjustInsertionColumn(lineNumber, startColumn); var location = new Debugger.DocumentLocation(this._documentController.currentDoc, lineNumber, startColumn, this._documentController.currentDoc, lineNumber, endColumn || startColumn); if (removeAll) { this._breakpointController.addOrRemoveAllBreakpointsAtLocation(location); } else { this._breakpointController.addOrRemoveBreakpointAtLocation(location); } } }; EditorWindow.prototype.setBreakpointCondition = function (lineNumber, column, removeAll) { var _this = this; if (this._documentController.currentDoc && this._documentController.currentDoc.isRuntimeDoc) { Tools.Utility.Assert.hasValue(this._documentController.currentDoc && this._documentController.currentDoc.editorState, "setBreakpointCondition for an invalid document"); this._breakpointController.getBreakpointAtLocation(new Debugger.DocumentLocation(this._documentController.currentDoc, lineNumber, column)).done(function (breakpoint) { if (breakpoint) { _this._breakpointController.promptToModifyConditionOrTracepoint(breakpoint); } }); } }; EditorWindow.prototype.setBreakpointState = function (lineNumber, column, removeAll) { var _this = this; if (this._documentController.currentDoc && this._documentController.currentDoc.isRuntimeDoc) { Tools.Utility.Assert.hasValue(this._documentController.currentDoc && this._documentController.currentDoc.editorState, "setBreakpointState for an invalid document"); this._breakpointController.getBreakpointAtLocation(new Debugger.DocumentLocation(this._documentController.currentDoc, lineNumber, column)).done(function (breakpoint) { if (breakpoint) { _this._breakpointController.setEnabledState(breakpoint, !breakpoint.isEnabled); } }); } }; EditorWindow.WRAPPING_COLUMN = 300; EditorWindow.CONTEXTMENU_SHOW_TIMEOUT = 100; EditorWindow.IP_DECORATION_ID = "Decoration:InstructionPointer"; EditorWindow.EXCEPTION_DECORATION_ID = "Decoration:ExceptionOverlay"; EditorWindow.ACTIVE_FRAME_DECORATION_ID = "Decoration:ActiveFrame"; EditorWindow.BP_DECORATION_PREFIX = "Decoration:Breakpoint:"; return EditorWindow; })(); Debugger.EditorWindow = EditorWindow; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // exceptionViewZone.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var ExceptionViewZone = (function () { function ExceptionViewZone(location, errorMessage, editorState, editor) { var _this = this; this._editor = editor; var trimmedLocation = editorState.getTrimmedRange(location); this.exceptionViewZone = { afterLineNumber: trimmedLocation.endLineNumber, afterColumn: trimmedLocation.endColumn, heightInLines: 1, domNode: ExceptionViewZone.makeDomNode(errorMessage) }; this.id = ExceptionViewZone.NO_ZONE_ID; this.location = location.copy(); this.message = errorMessage; this._listenerRegistration = this.location.changesCompleted.addHandler(function () { _this.moveLocation(_this.location.startPosition.doc, _this.location); }); } ExceptionViewZone.prototype.cleanUp = function () { if (this.id !== ExceptionViewZone.NO_ZONE_ID) { this.removeFromEditor(); } if (this._listenerRegistration) { this._listenerRegistration.unregister(); } if (this.location) { this.location.cleanup(); } }; ExceptionViewZone.prototype.removeFromEditor = function () { var _this = this; if (this.id !== ExceptionViewZone.NO_ZONE_ID) { this._editor.changeViewZones(function (changeAccessor) { changeAccessor.removeZone(_this.id); _this.id = ExceptionViewZone.NO_ZONE_ID; }); } }; ExceptionViewZone.prototype.addToEditor = function (displayedDoc) { var _this = this; if (this.id === ExceptionViewZone.NO_ZONE_ID && this.location.startPosition && this.location.startPosition.doc === displayedDoc) { this._editor.changeViewZones(function (changeAccessor) { var exceptionViewZone = { afterLineNumber: _this.exceptionViewZone.afterLineNumber, afterColumn: _this.exceptionViewZone.afterColumn, heightInLines: 1, domNode: ExceptionViewZone.makeDomNode(_this.message) }; _this.exceptionViewZone = exceptionViewZone; _this.id = changeAccessor.addZone(_this.exceptionViewZone); }); } }; ExceptionViewZone.prototype.moveLocation = function (doc, newLocation) { if (this.location.startPosition && this.location.startPosition.doc === doc && doc.isOpen) { var newEditorState = doc.editorState; this.removeFromEditor(); if (newEditorState && newLocation) { var trimmedLocation = newEditorState.getTrimmedRange(newLocation); this.exceptionViewZone.afterLineNumber = trimmedLocation.endLineNumber; } this.addToEditor(doc); } }; ExceptionViewZone.makeDomNode = function (errorMessage) { var viewZoneElement = document.createElement("div"); var exceptionGlyph = document.createElement("div"); exceptionGlyph.className = "exceptionGlyph"; viewZoneElement.appendChild(exceptionGlyph); viewZoneElement.appendChild(document.createTextNode(errorMessage)); viewZoneElement.className = "exceptionViewZone"; viewZoneElement.id = "exceptionViewZone"; new Debugger.CutCopyPasteContextMenu(viewZoneElement); return viewZoneElement; }; ExceptionViewZone.NO_ZONE_ID = -1; return ExceptionViewZone; })(); Debugger.ExceptionViewZone = ExceptionViewZone; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // dataTips.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DataTips = (function () { function DataTips(editor, editorWindow, debuggerManager) { this._editor = editor; this._editorWindow = editorWindow; this._debuggerManager = debuggerManager; this.setupDataTipEvents(); } Object.defineProperty(DataTips.prototype, "dataTipsEnabled", { get: function () { return this._dataTipsEnabled; }, set: function (enabled) { this._dataTipsEnabled = enabled; if (!this._dataTipsEnabled) { this.hideImmediately(false); } }, enumerable: true, configurable: true }); Object.defineProperty(DataTips.prototype, "watchController", { get: function () { return this._watchWindowController; }, enumerable: true, configurable: true }); DataTips.couldHaveSideEffects = function (input) { var text = input.replace(/[\s]/, ""); if (text.indexOf("++") > 0 || text.indexOf("--") > 0) { return true; } if (text.match("[^=!<>]=[^=]")) { return true; } if (text.match(/[\]\)\$}\w\d]\(/)) { return true; } return false; }; DataTips.prototype.hideAfterDelay = function () { var _this = this; if (this._dataTipVisible && !this._hideDataTipTimeoutToken) { this._hideDataTipTimeoutToken = setTimeout(function () { return _this.hideImmediately(true); }, DataTips.DATATIP_DISMISS_TIME); } }; DataTips.prototype.hideImmediately = function (allowPending) { if (!allowPending) { this.cancelPendingDataTip(); } this.dismissElement(); this.cancelPendingHide(); }; DataTips.prototype.showAfterDelay = function (x, y, position) { var _this = this; this.cancelPendingDataTip(); var tokenInfo = this.getTokenInfo(position); if (tokenInfo) { if (this._dataTipVisible && this.areTokensEqual(tokenInfo, this._lastTokenInfo)) { this.cancelPendingHide(); } else { this._showDataTipDelay = Plugin.Promise.timeout(DataTips.DATATIP_SHOW_TIME); this._showDataTipDelay.then(function () { _this._positionLeft = x; _this._positionTop = y + 10; _this._showDataTipDelay = null; var isWhitespace = _this.isPositionInWhitespace(position); if (isWhitespace && position.column > 1) { position.column -= 1; isWhitespace = _this.isPositionInWhitespace(position); } if (isWhitespace) { _this._lastTokenInfo = null; } else { _this.showImmediately(position); _this._lastTokenInfo = tokenInfo; } }); } } }; DataTips.prototype.showImmediately = function (position) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(338 /* Debugger_EditorWindow_CreateDataTipFromPosition_Start */); document.body.addEventListener("click", this._handleGlobalClick); document.body.addEventListener("keypress", this._handleGlobalKeypress); var selection = this._editor.getSelection(); if (selection && !selection.isEmpty() && selection.containsPosition(position)) { var model = this._editor.getModel(); if (model) { var text = model.getValueInRange(selection).trim(); this.displayElement(text); } } else { var expressionInfo = this.parseExpression(position); this.displayElement(expressionInfo.text); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(339 /* Debugger_EditorWindow_CreateDataTipFromPosition_Stop */); }; DataTips.prototype.parseExpression = function (position) { var tokenInfo = this.getTokenInfo(position); if (!tokenInfo) { return DataTips.NO_RESULT; } var tokenType = tokenInfo.token.type; var model = this._editor.getModel(); if (!model) { return DataTips.NO_RESULT; } var tokenText = model.getLineContent(tokenInfo.lineNumber).substring(tokenInfo.startColumn - 1, tokenInfo.endColumn - 1); var text = ""; if (tokenType.lastIndexOf(".html") >= 0 || tokenType.lastIndexOf(".css") >= 0) { return DataTips.NO_RESULT; } if (tokenType.lastIndexOf(".js") >= 0) { tokenType = tokenType.substr(0, tokenType.length - 3); if (tokenType === "key" || tokenType.indexOf("comment") >= 0) { return DataTips.NO_RESULT; } if (tokenType === "delimiter" && tokenText !== ".") { return DataTips.NO_RESULT; } if (tokenType === "string" || tokenType === "number") { return DataTips.NO_RESULT; } if (tokenType.indexOf("keyword") >= 0 && (tokenText === "null" || tokenText === "true" || tokenText === "false" || tokenText === "debugger")) { return DataTips.NO_RESULT; } } if (!text) { return this.calculateEntireToken(model.getLineContent(position.lineNumber), tokenInfo, position); } return { text: text, range: new this._range(tokenInfo.lineNumber, tokenInfo.startColumn, tokenInfo.lineNumber, tokenInfo.endColumn) }; }; DataTips.prototype.setupDataTipEvents = function () { var _this = this; require([ "require", "vs/base/lib/winjs.base", "vs/editor/core/constants", "vs/editor/core/range", "vs/editor/editor" ], function (require) { var constants = require("vs/editor/core/constants"); _this._range = require("vs/editor/core/range").Range; var editor = require("vs/editor/editor"); _this._dataTipElement = document.getElementById("dataTipElement"); _this._dataTipElement.style.display = "none"; _this._dataTipElement.setAttribute("aria-hidden", "true"); _this._innerContainer = document.createElement("div"); _this._innerContainer.className = "popoverInnerContainer"; _this._dataTipElement.appendChild(_this._innerContainer); _this._watchWindowController = new Debugger.WatchWindowController(_this._debuggerManager, true); _this._watchWindowView = new Debugger.WatchWindowView(_this._watchWindowController, _this._innerContainer, function (count) { return _this.redrawCallback(); }); _this._watchWindowController.view = _this._watchWindowView; _this._addToWatchesLink = document.createElement("a"); _this._addToWatchesLink.setAttribute("href", ""); _this._addToWatchesLink.id = "addToWatchesLink"; _this._addToWatchesLink.innerText = Plugin.Resources.getString("AddToWatchesWindowLink"); _this._innerContainer.appendChild(_this._addToWatchesLink); _this._dataTipElement.addEventListener("mouseenter", function (e) { return _this.abortPendingActions(); }); _this._dataTipElement.addEventListener("mouseover", function (e) { return _this.abortPendingActions(); }); _this._dataTipElement.addEventListener("mouseleave", function (e) { return _this.hideImmediately(); }); _this._editor.addListener(constants.EventType.MouseMove, function (e) { return _this.handleMouseMove(e, editor); }); _this._editor.addListener(constants.EventType.KeyDown, function () { return _this.hideImmediately(); }); _this._editor.addListener(constants.EventType.ModelChanged, function () { return _this.hideImmediately(); }); _this._editor.addListener(constants.EventType.CursorSelectionChanged, function () { return _this.hideImmediately(); }); _this._editor.addListener("scroll", function () { return _this.hideImmediately(); }); _this._handleGlobalClick = function (event) { if (!_this._dataTipElement.contains(event.target)) { _this.hideImmediately(); } }; _this._handleGlobalKeypress = function (event) { if (event.key === "Esc") { _this.hideImmediately(); } }; }); }; DataTips.prototype.isPositionInWhitespace = function (position) { var lineText; var model = this._editor.getModel(); if (model) { lineText = model.getLineContent(position.lineNumber); return DataTips.WHITESPACE_REGEX.test(lineText.charAt(position.column - 1)); } return true; }; DataTips.prototype.areTokensEqual = function (token1, token2) { if (!token1 || !token2) { return false; } return token1.lineNumber === token2.lineNumber && token1.startColumn === token2.startColumn && token1.endColumn === token2.endColumn; }; DataTips.prototype.cancelPendingDataTip = function () { if (this._showDataTipDelay) { this._showDataTipDelay.cancel(); this._showDataTipDelay = null; } }; DataTips.prototype.cancelPendingHide = function () { if (this._hideDataTipTimeoutToken !== null) { clearTimeout(this._hideDataTipTimeoutToken); this._hideDataTipTimeoutToken = null; } }; DataTips.prototype.abortPendingActions = function () { this.cancelPendingHide(); this.cancelPendingDataTip(); return; }; DataTips.prototype.handleMouseMove = function (event, editor) { this.hideAfterDelay(); this.cancelPendingDataTip(); if (this._dataTipsEnabled && this._debuggerManager.executionController.isExecutionPaused && !this._editorWindow.contextMenu.isShowing) { var targetType = event.target.type; if (targetType === editor.MouseTargetType.CONTENT_TEXT) { this.showAfterDelay(event.event.posx, event.event.posy, event.target.position); } } }; DataTips.prototype.displayElement = function (text) { var _this = this; this.abortPendingActions(); if (text) { text = text.trim(); if (this._dataTipVisible) { this.hideImmediately(true); } if (text.length === 0) { return; } this._addToWatchesLink.onclick = function (e) { _this._debuggerManager.watchController.addWatch(text); return false; }; this._watchWindowController.setViewState(true); this._watchWindowController.addWatch(text).then(function (success) { if (!success) { _this.hideImmediately(); } }); this._dataTipElement.style.display = "block"; this._dataTipElement.setAttribute("aria-hidden", "false"); this._dataTipVisible = true; this.redrawCallback(); } }; DataTips.prototype.redrawCallback = function () { if (this._dataTipVisible) { var minTop = DataTips.MIN_TOP + DataTips.EDGE_PADDING; var maxBottom = Math.min(document.body.clientHeight, this._debuggerManager.debuggerShell.getConsoleTop()) - DataTips.EDGE_PADDING; var minLeft = DataTips.EDGE_PADDING; var maxRight = document.body.offsetWidth - DataTips.EDGE_PADDING; var desiredHeight = this._watchWindowView.getActualHeight() + DataTips.WINDOW_VERTICAL_PADDING; var availableHeight = maxBottom - minTop; var height = Math.min(desiredHeight, availableHeight, DataTips.MAX_HEIGHT); var width = DataTips.WINDOW_BASIC_WIDTH; if (height < desiredHeight) { width += DataTips.WINDOW_SCROLLBAR_WIDTH; } var top = this._positionTop; var left = this._positionLeft; if (top + height > maxBottom) { top = Math.max(minTop, maxBottom - height); } if (left + width > maxRight) { left = Math.max(minLeft, maxRight - width); } this._dataTipElement.style.height = height + "px"; this._dataTipElement.style.width = width + "px"; this._dataTipElement.style.top = top + "px"; this._dataTipElement.style.left = left + "px"; this._watchWindowController.layout(); } }; DataTips.prototype.dismissElement = function () { document.body.removeEventListener("click", this._handleGlobalClick); document.body.removeEventListener("keypress", this._handleGlobalKeypress); this._hideDataTipTimeoutToken = null; this._dataTipVisible = false; if (this._dataTipElement) { this._dataTipElement.style.display = "none"; this._dataTipElement.setAttribute("aria-hidden", "true"); } if (this._watchWindowController) { this._watchWindowController.deleteAll(); this._watchWindowController.setViewState(false); } }; DataTips.prototype.getTokenInfo = function (position) { var currentTokenInfo = null; var model = this._editor.getModel(); if (model) { model.tokenIterator(position, function (it) { currentTokenInfo = it.next(); }); } return currentTokenInfo; }; DataTips.prototype.calculateEntireToken = function (lineContent, tokenInfo, position) { var start = tokenInfo.startColumn; if (start > 0) { start = this.findEarlierStart(start, lineContent, position); } var text = lineContent.substr(start - 1, tokenInfo.endColumn - start).trim(); if (text.charAt(text.length - 1) === ".") { text = text.substring(0, text.length - 1); } var sideEffects = DataTips.couldHaveSideEffects(text); if (sideEffects) { text = ""; } return { text: text, range: new this._range(tokenInfo.lineNumber, tokenInfo.startColumn, tokenInfo.lineNumber, tokenInfo.endColumn) }; }; DataTips.prototype.findEarlierStart = function (start, line, position) { var model = this._editor.getModel(); if (model) { var actualStart = -1; model.tokenIterator(position, function (it) { var bracketCount = 0; if (it.hasPrev()) { var token = it.prev(); if (token.token.type === "delimiter.array.js" || token.token.type === "delimiter.parenthesis.js" || token.token.type === "delimiter.bracket.js") { bracketCount = token.token.bracket; } } while (it.hasPrev() && actualStart === -1) { var token = it.prev(); if (token.lineNumber !== position.lineNumber) { actualStart = 1; break; } var text = model.getValueInRange({ startColumn: token.startColumn, startLineNumber: token.lineNumber, endColumn: token.endColumn, endLineNumber: token.lineNumber }); if (token.token.type === "delimiter.array.js" || token.token.type === "delimiter.parenthesis.js" || token.token.type === "delimiter.bracket.js") { bracketCount += token.token.bracket; if (bracketCount > 0) { actualStart = token.endColumn; } continue; } if (bracketCount !== 0) { } else if (token.token.type === "delimiter.js" && text === ".") { } else if (token.token.type === "string.js") { } else if (token.token.type === "identifier.js" && text.trim().length > 0) { var originalLength = text.length; text = text.trim(); if (text.length !== originalLength) { actualStart = token.startColumn + (originalLength - text.length); } if (!text.match(/^[\w\d\$]+$/i)) { break; } } else if (token.token.type === "keyword.js" && text.trim() === "this") { actualStart = token.startColumn; break; } else { actualStart = token.endColumn; } } }); if (actualStart >= 0) { return actualStart; } } return start; }; DataTips.WHITESPACE_REGEX = new RegExp("\\s"); DataTips.NO_RESULT = { text: "", range: null }; DataTips.MIN_TOP = 30; DataTips.EDGE_PADDING = 10; DataTips.WINDOW_VERTICAL_PADDING = 38; DataTips.MAX_HEIGHT = 300 + DataTips.WINDOW_VERTICAL_PADDING; DataTips.WINDOW_SCROLLBAR_WIDTH = 24; DataTips.WINDOW_BASIC_WIDTH = 8 + Debugger.WatchWindowView.TWO_COLUMN_WIDTH + DataTips.WINDOW_SCROLLBAR_WIDTH; DataTips.DATATIP_SHOW_TIME = Plugin.F12.getDoubleClickTime() * 0.2; DataTips.DATATIP_DISMISS_TIME = Plugin.F12.getDoubleClickTime() * 1.5; return DataTips; })(); Debugger.DataTips = DataTips; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // FilePicker.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var FilePicker = (function () { function FilePicker(container, buttonElement, debuggerShell) { var _this = this; this._pendingResize = null; this._buttonElement = buttonElement; this._container = container; this._container.setAttribute("disabled", "true"); this._debuggerShell = debuggerShell; var docController = debuggerShell.debuggerManager && debuggerShell.debuggerManager.documentController; if (docController) { this._onSelectCallback = docController.openDocument.bind(docController); } buttonElement.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("FilePickerTooltip")); buttonElement.setAttribute("aria-label", Plugin.Resources.getString("FilePickerTooltip")); buttonElement.setAttribute("aria-expanded", "false"); buttonElement.setAttribute("aria-controls", "filePickerMenu"); this._fileItemsMap = []; this._rootNodesMap = []; this._filterDynamicFolders = []; this._filterMap = []; this._scalingFactor = screen.deviceXDPI / screen.logicalXDPI; this._filterRegex = ""; this._currentFilter = ""; this._copyStart = 0; this._copyEnd = 0; this._isFilterEnabled = false; this._filterBox = document.createElement("input"); this._filterBox.classList.add("filterBox"); this._filterBox.id = "filterBox"; this._filterBox.type = "search"; this._filterBox.tabIndex = 1; this._filterBox.placeholder = Plugin.Resources.getString("TypeToFilterWatermark"); this._filterBox.setAttribute("aria-label", Plugin.Resources.getString("TypeToFilterWatermark")); this._filterBox.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("TypeToFilterWatermark")); this._filterNoResults = document.createElement("div"); this._filterNoResults.innerText = Plugin.Resources.getString("/Common/DOMExplorerComputedStylesNoResultsMessage"); this._filterNoResults.classList.add("noResults"); this._filterNoResults.style.display = "none"; this._filterBox.addEventListener("mouseup", function (e) { window.setImmediate(function () { _this.filterList(); }); }); this._filterBox.addEventListener("keyup", function (e) { return _this.onKeyUp(e); }); this._contextMenu = new Debugger.CutCopyPasteContextMenu(this._filterBox, this.filterList.bind(this)); this._fileListContainer = document.createElement("div"); this._fileListContainer.classList.add("fileListContainer"); this._fileListContainer.id = "fileListContainer"; container.appendChild(this._filterBox); container.appendChild(this._fileListContainer); container.appendChild(this._filterNoResults); this._treeView = new Common.ObjectView.ObjectTreeView(this._fileListContainer, function (item) { return _this.onListViewToggle(item); }, null, null, function (item, row, cell, button) { if (button === 0 /* LeftButton */) { if (item.isDynamicFolder) { return; } item.additionalClass = Common.CssUtilities.addClasses(item.additionalClass, FilePicker.OPENED_DOCUMENT_CLASS); _this._onSelectCallback(item.doc); window.setImmediate(function () { _this.hidePicker(); }); } }); this._treeView.scrollPadding = 100; this._treeView.notifyToggleCallback = function () { _this.refreshViewWithCallback(); }; this._treeView.setFilter(this.returnAllItemsCallback); this._container.addEventListener("keydown", function (e) { return _this.onKeyDown(e); }); this._buttonElement.addEventListener("click", function (e) { if (_this._buttonElement.classList.contains("activated")) { _this.hidePicker(); } else { window.setImmediate(function () { return _this.showPicker(); }); } e.stopImmediatePropagation(); return true; }); this._buttonElement.addEventListener("keydown", function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */ || (e.keyCode === 40 /* ArrowDown */ && e.ctrlKey)) { window.setImmediate(function () { return _this.showPicker(); }); return false; } return true; }); this._buttonElement.addEventListener("DOMAttrModified", function (e) { if (!_this._ignoreReintrantExpand) { if (e.attrName === "aria-expanded") { if (e.newValue === "true") { _this.showPicker(); } else { _this.hidePicker(); } } } _this._ignoreReintrantExpand = false; }); this._focusOutListener = function (e) { if (e.target === document.activeElement && !_this._contextMenu.isActive) { _this.hidePicker(); } return false; }; this._documentClickListener = function (e) { if (e.target !== _this._container && !_this._container.contains(e.target) && e.target !== _this._buttonElement) { window.setImmediate(function () { _this.hidePicker(); }); } return false; }; this._documentKeydownListener = function (e) { if (e.keyCode === 27 /* Escape */) { _this.hidePicker(); e.stopImmediatePropagation(); e.preventDefault(); return false; } }; this._buttonElement.addEventListener("focusout", function (e) { e.stopPropagation(); return false; }); if (Plugin.F12) { Plugin.F12.addEventListener("browsershortcut", function (e) { return _this.onKeyDown(e); }); Plugin.F12.addEventListener("keydown", function (e) { return _this.onKeyDown(e); }); } window.addEventListener("resize", function () { _this.resizePicker(); }); } Object.defineProperty(FilePicker.prototype, "isOpen", { get: function () { return this._isOpen; }, enumerable: true, configurable: true }); Object.defineProperty(FilePicker.prototype, "scaledBottomPadding", { get: function () { return this._scalingFactor * FilePicker.BOTTOM_PADDING; }, enumerable: true, configurable: true }); Object.defineProperty(FilePicker.prototype, "scaledRightPadding", { get: function () { return this._scalingFactor * FilePicker.RIGHT_PADDING; }, enumerable: true, configurable: true }); Object.defineProperty(FilePicker.prototype, "scaledScrollbarPadding", { get: function () { return this._scalingFactor * FilePicker.SCROLLBAR_PADDING; }, enumerable: true, configurable: true }); Object.defineProperty(FilePicker.prototype, "scaledInnerPadding", { get: function () { return this._scalingFactor * FilePicker.INNER_PADDING; }, enumerable: true, configurable: true }); FilePicker.prototype.documentAdded = function (doc, couldHaveExistingChildren) { var _this = this; if (!doc.isRuntimeDoc) { return; } var fileItem = new Debugger.FilePickerItem(doc); if (doc.isOpen) { fileItem.additionalClass = Common.CssUtilities.addClasses(fileItem.additionalClass, FilePicker.OPENED_DOCUMENT_CLASS); } if (this._isFilterEnabled) { this._treeView.setFilter(this.returnAllItemsCallback); } if (doc.isDynamicCode) { var rootId = this.getRootId(doc); var rootNode = this._rootNodesMap[rootId]; if (rootNode) { if (!rootNode.dynamicDocumentsNode) { rootNode.dynamicDocumentsNode = new Debugger.FilePickerItem(new Debugger.Doc(new Debugger.Source(undefined, rootId, false, Plugin.Resources.getString("FilePickerDynamicNode"), Debugger.FilePickerItem.DYNAMIC_SCRIPTS, 0, true, [])), true); if (this._isOpen && this._treeView.getIndex(rootNode) >= 0 && (this._treeView.isItemExpanded(rootNode) || rootNode.childCount === 1)) { this._treeView.addItems([rootNode.dynamicDocumentsNode], rootNode, false, true); } } rootNode.dynamicDocumentsNode.addChild(fileItem); this.insertAtSortedPosition(fileItem, rootNode.dynamicDocumentsNode); } else { if (!this._dynamicDocumentsNode) { this._dynamicDocumentsNode = new Debugger.FilePickerItem(new Debugger.Doc(new Debugger.Source(undefined, rootId, false, Plugin.Resources.getString("FilePickerDynamicNode"), Debugger.FilePickerItem.DYNAMIC_SCRIPTS, 0, true, [])), true); this._rootNodesMap[rootId] = this._dynamicDocumentsNode; this._treeView.addItems([this._dynamicDocumentsNode], null, false, true); } this._dynamicDocumentsNode.addChild(fileItem); this.insertAtSortedPosition(fileItem, this._dynamicDocumentsNode); } } else { var parentItem = doc.parent && this._fileItemsMap[doc.parent.frontendId]; if (parentItem) { parentItem.addChild(fileItem); } else { this._rootNodesMap[doc.frontendId] = fileItem; } this.insertAtSortedPosition(fileItem, parentItem); } if (couldHaveExistingChildren) { for (var i in this._fileItemsMap) { var childDoc = this._fileItemsMap[i].doc; if (childDoc.parent === doc) { this.documentAdded(childDoc, true); } } } if (this._isFilterEnabled) { this._treeView.setFilter(function (item) { return _this.shouldIncludeItemCallback(item); }); this.refreshList(); this.scheduleResize(); } }; FilePicker.prototype.documentRemoved = function (doc) { if (this._fileItemsMap[doc.frontendId]) { var fileItem = this._fileItemsMap[doc.frontendId]; delete this._fileItemsMap[doc.frontendId]; if (this._rootNodesMap[doc.frontendId]) { delete this._rootNodesMap[doc.frontendId]; } if (fileItem.doc.isDynamicCode) { var rootId = this.getRootId(fileItem.doc); var dynamicNode = this._rootNodesMap[rootId] ? this._rootNodesMap[rootId].dynamicDocumentsNode : this._dynamicDocumentsNode; if (dynamicNode) { dynamicNode.removeChild(fileItem); if (!dynamicNode.hasChildren) { this._treeView.removeItem(dynamicNode); this._rootNodesMap[rootId] ? this._rootNodesMap[rootId].dynamicDocumentsNode = null : this._dynamicDocumentsNode = null; } } } else { var parentItem = fileItem.doc.parent && this._fileItemsMap[fileItem.doc.parent.frontendId]; if (parentItem) { parentItem.removeChild(fileItem); } } this._treeView.removeItem(fileItem); this.scheduleResize(); } }; FilePicker.prototype.documentOpened = function (doc, activation, location) { var fileItem = this._fileItemsMap[doc.frontendId]; if (fileItem) { fileItem.additionalClass = Common.CssUtilities.addClasses(fileItem.additionalClass, FilePicker.OPENED_DOCUMENT_CLASS); } return Plugin.Promise.wrap(null); }; FilePicker.prototype.documentClosed = function (doc) { var fileItem = this._fileItemsMap[doc.frontendId]; if (fileItem) { fileItem.additionalClass = Common.CssUtilities.removeClasses(fileItem.additionalClass, FilePicker.OPENED_DOCUMENT_CLASS); } this._treeView.refresh(); }; FilePicker.prototype.documentUpdated = function (doc, hasMimeTypeChanged) { if (hasMimeTypeChanged) { this.refreshItem(doc); } }; FilePicker.prototype.documentUrlChanged = function (doc) { this.refreshItem(doc); }; FilePicker.prototype.documentAsLibraryStateChanged = function (doc) { var fileItem = this._fileItemsMap[doc.frontendId]; if (fileItem) { var isChecked = doc.isLibraryFile; fileItem.setButtonCheckState(Debugger.FilePickerItem.JMC_BUTTON_INDEX, isChecked); this._treeView.setButtonState(fileItem, Debugger.FilePickerItem.JMC_BUTTON_INDEX, true, isChecked); this.refreshItem(doc); } }; FilePicker.prototype.doLayout = function () { this.resizePicker(); }; FilePicker.prototype.showPicker = function () { if (!this._isOpen) { this._container.removeAttribute("disabled"); this._container.style.display = "block"; this._container.style.zIndex = "1000"; this._buttonElement.classList.add("activated"); this._ignoreReintrantExpand = true; this._buttonElement.setAttribute("aria-expanded", "true"); this._isOpen = true; if (this._isFilterEnabled) { this.setFilter(this._filterBox.value); } else { for (var i in this._rootNodesMap) { this._treeView.setRowState(this._treeView.getIndex(this._rootNodesMap[i]), Common.ObjectView.ObjectTreeView.EXPAND_ROW); this.refreshVisibleChildren(this._rootNodesMap[i]); } this.refreshViewWithCallback(); this._filterBox.focus(); this._filterBox.setSelectionRange(0, this._filterBox.value.length); } var selectedItem = this._treeView.getSelectedItem() || this._treeView.getItemAt(0); if (selectedItem) { this._treeView.selectItem(selectedItem, false); } document.addEventListener("focusout", this._focusOutListener, true); document.addEventListener("mousedown", this._documentClickListener, true); document.addEventListener("keydown", this._documentKeydownListener, true); } else { this._filterBox.focus(); this._filterBox.setSelectionRange(0, this._filterBox.value.length); } }; FilePicker.prototype.hidePicker = function () { if (this._isOpen) { this.restoreList(); this._buttonElement.classList.remove("activated"); this._ignoreReintrantExpand = true; this._buttonElement.setAttribute("aria-expanded", "false"); this._container.style.display = "none"; this._container.style.zIndex = "-1000"; this._container.setAttribute("disabled", "true"); this._isOpen = false; document.removeEventListener("focusout", this._focusOutListener, true); document.removeEventListener("mousedown", this._documentClickListener, true); document.removeEventListener("keydown", this._documentKeydownListener, true); } }; FilePicker.prototype.resizePicker = function () { if (this._pendingResize !== null) { window.clearTimeout(this._pendingResize); this._pendingResize = null; } var editorDimensions = this._debuggerShell.getEditorDimensions(); var maxViewPortHeight = editorDimensions.height - FilePicker.BOTTOM_MARGIN; var maxViewPortWidth = editorDimensions.width - FilePicker.RIGHT_MARGIN; var totalRowsHeight = this.getRowHeight() * this._treeView.getItemCount(); var pickerHeight = Math.min(maxViewPortHeight, totalRowsHeight + this.scaledBottomPadding + FilePicker.FILTERBOX_HEIGHT); var pickerWidth = this.getMaxFileItemWidth() + this.scaledRightPadding + this.scaledInnerPadding; var widthPadding = pickerHeight < this.getRowHeight() * this._treeView.getItemCount() ? this.scaledScrollbarPadding : 0; var heightPadding = pickerWidth > maxViewPortWidth ? this.scaledScrollbarPadding : 0; var finalWidth = Math.max(FilePicker.MIN_WIDTH, Math.min(pickerWidth + widthPadding, maxViewPortWidth)); var finalHeight = Math.max(FilePicker.MIN_HEIGHT + FilePicker.FILTERBOX_HEIGHT, Math.min(pickerHeight + heightPadding, maxViewPortHeight)); this._fileListContainer.style.height = finalHeight - FilePicker.FILTERBOX_HEIGHT + "px"; this._fileListContainer.style.width = finalWidth - this.scaledInnerPadding + "px"; this._filterBox.style.width = finalWidth - FilePicker.FILTERBOX_WIDTH_PADDING + "px"; this._container.style.height = finalHeight + "px"; this._container.style.width = finalWidth + "px"; if (this._treeView.getItemCount() < 1) { this._filterNoResults.style.display = "block"; } else { this._filterNoResults.style.display = "none"; } }; FilePicker.prototype.getTotalDocuments = function () { var count = 0; for (var i in this._fileItemsMap) { count++; } return count; }; FilePicker.prototype.getAllItems = function () { var items = []; for (var i in this._fileItemsMap) { items.push(this._fileItemsMap[i]); } return items; }; FilePicker.prototype.getRootItems = function () { var rootItems = []; for (var i in this._fileItemsMap) { var item = this._fileItemsMap[i]; if (!item.doc.parent || !this._fileItemsMap[item.doc.parent.frontendId]) { rootItems.push(item); } } return rootItems; }; FilePicker.prototype.setFilter = function (text) { this._filterBox.value = text; this.filterList(); this._filterBox.focus(); this._filterBox.setSelectionRange(0, this._filterBox.value.length); }; FilePicker.prototype.clearFilter = function () { this._filterBox.value = ""; this.filterList(); this._filterBox.focus(); }; FilePicker.prototype.getFilterText = function () { return this._filterBox.value; }; FilePicker.prototype.getFilteredItems = function () { var itemsCount = this._treeView.getItemCount(); var items = []; for (var index = 0; index < itemsCount; index++) { items.push(this._treeView.getItemAt(index)); } return items; }; FilePicker.prototype.remeasureTreeView = function () { this._treeView.remeasure(); }; FilePicker.prototype.refreshTreeView = function () { this._treeView.refresh(); }; FilePicker.prototype.getSelectedItem = function () { return this._treeView.getSelectedItem(); }; FilePicker.prototype.setSelectedItem = function (doc) { var fileItem = this._fileItemsMap[doc.frontendId]; if (fileItem) { this._treeView.selectItem(fileItem, true); return true; } return false; }; FilePicker.prototype.isExpanded = function (doc) { var fileItem = this._fileItemsMap[doc.frontendId]; if (fileItem) { return (this._treeView.getIndex(fileItem) !== -1 && this._treeView.isItemExpanded(fileItem)); } return false; }; FilePicker.prototype.setExpandState = function (doc, expand) { if (typeof expand === "undefined") { expand = true; } var fileItem = this._fileItemsMap[doc.frontendId]; if (fileItem) { var index = this._treeView.getIndex(fileItem); if (index !== -1) { this._treeView.setRowState(index, expand ? Common.ObjectView.ObjectTreeView.EXPAND_ROW : Common.ObjectView.ObjectTreeView.COLLAPSE_ROW); } } }; FilePicker.prototype.refreshItem = function (doc) { var fileItem = this._fileItemsMap[doc.frontendId]; if (fileItem) { fileItem.refresh(); } this._treeView.refresh(); }; FilePicker.prototype.restoreList = function () { if (this._isFilterEnabled) { this._filterRegex = ""; this._currentFilter = ""; this._treeView.setFilter(this.returnAllItemsCallback); } }; FilePicker.prototype.onKeyUp = function (e) { this.filterList(); return true; }; FilePicker.prototype.onKeyDown = function (e) { var _this = this; var target = e.target; var handled = false; var frontendId = 0; var noKeys = !e.shiftKey && !e.ctrlKey && !e.altKey; if (e.ctrlKey && !e.altKey && !e.shiftKey && e.keyCode === 79 /* O */) { window.setImmediate(function () { return _this.showPicker(); }); return false; } else if (e.ctrlKey && !e.altKey && !e.shiftKey && e.keyCode === 76 /* L */) { if (this.isOpen) { var selectedItem = this._treeView.getSelectedItem() || this._treeView.getItemAt(0); if (selectedItem) { var frontendId = selectedItem.doc.frontendId; var item = this._fileItemsMap[frontendId]; if (item && !item.isDynamicFolder && !item.doc.isUnnamedDynamicDoc) { item.isLibraryFile = !item.isLibraryFile; } } return false; } } else if (target && target.classList.contains("listview-grid-row-selected")) { if ((e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) && noKeys) { var fileElement = target.querySelector(".fileItem[data-frontendId]"); if (fileElement) { frontendId = parseInt(fileElement.getAttribute("data-frontendId")); } handled = true; } else if (e.keyCode === 38 /* ArrowUp */ && noKeys) { var selectedItem = this._treeView.getSelectedItem(); var topItem = this._treeView.getItemAt(0); if (selectedItem === topItem) { this._filterBox.focus(); this._filterBox.setSelectionRange(0, this._filterBox.value.length); } handled = true; } } else if (target && target.classList.contains("filterBox")) { if (e.keyCode === 13 /* Enter */ && noKeys) { var selectedItem = this._treeView.getSelectedItem() || this._treeView.getItemAt(0); if (selectedItem) { frontendId = selectedItem.doc.frontendId; } handled = true; } else if (e.keyCode === 40 /* ArrowDown */ && noKeys) { var selectedItem = this._treeView.getSelectedItem() || this._treeView.getItemAt(0); if (selectedItem) { this._treeView.selectItem(selectedItem, true); } handled = true; } } if (handled) { if (frontendId) { var item = this._fileItemsMap[frontendId]; if (item && !item.isDynamicFolder) { this._treeView.selectItem(item, true); item.additionalClass = Common.CssUtilities.addClasses(item.additionalClass, FilePicker.OPENED_DOCUMENT_CLASS); this._onSelectCallback(item.doc); } this.hidePicker(); } e.stopImmediatePropagation(); e.preventDefault(); return false; } return true; }; FilePicker.prototype.onListViewToggle = function (item) { var _this = this; if (item.hasChildren) { item.getChildren(null, function (children) { _this._treeView.addItems(children, item); }); } }; FilePicker.prototype.getRootId = function (doc) { var parent = doc.parent; while (parent && this._fileItemsMap[parent.frontendId]) { doc = parent; parent = doc.parent; } return doc.frontendId; }; FilePicker.prototype.getMaxFileItemWidth = function () { var fileItems = this._container.querySelectorAll(".filePickerMenu .listview-grid-row"); var maxWidth = 0; for (var index = 0; index < fileItems.length; index++) { var rowItem = fileItems[index]; var childWidth = 0; for (var childIndex = 0; childIndex < rowItem.children.length; childIndex++) { childWidth += rowItem.children[childIndex].clientWidth; } maxWidth = Math.max(childWidth, maxWidth); } return maxWidth; }; FilePicker.prototype.getRowHeight = function () { var rowItem = this._container.querySelector(".filePickerMenu .listview-grid-row"); if (rowItem) { return rowItem.getBoundingClientRect().height; } return 0; }; FilePicker.prototype.refreshViewWithCallback = function () { var _this = this; this._fileListContainer.classList.add("refresh"); this._treeView.postRenderCallback = function () { _this.resizePicker(); _this._fileListContainer.classList.remove("refresh"); }; this._treeView.refresh(); }; FilePicker.prototype.shouldIncludeItemCallback = function (item) { return this._isFilterEnabled ? (item.displayName.match(new RegExp(this._filterRegex, "gi")) && !item.isDynamicFolder) : true; }; FilePicker.prototype.returnAllItemsCallback = function (item) { return true; }; FilePicker.prototype.filterList = function () { var _this = this; if (this._filterBox.value !== this._currentFilter) { if (this._filterBox.value.match(FilePicker.WHITE_SPACE_REGEX)) { this._treeView.setFilter(this.returnAllItemsCallback); if (this._isFilterEnabled) { this.restoreFilteredList(); } this._isFilterEnabled = false; this._fileListContainer.classList.remove("flatView"); this._treeView.hasIndent = true; this._filterBox.value = ""; this._currentFilter = ""; } else { if (!this._isFilterEnabled) { this.saveFilteredList(); } this._isFilterEnabled = true; this._fileListContainer.classList.add("flatView"); this._treeView.hasIndent = false; for (var i in this._rootNodesMap) { var rootNode = this._rootNodesMap[i]; this._treeView.expandAllItems(this._treeView.getIndex(rootNode), function (item) { return item.isDynamicFolder; }); } this._filterRegex = Common.EncodingUtilities.escapeRegExpWithWildCard(this._filterBox.value); var searchParts = this._filterRegex.split(FilePicker.SEARCH_PARTS_SPLIT_REGEX); if (searchParts.length > 0) { this._filterRegex = ""; for (var j = 0; j < searchParts.length; j++) { if (searchParts[j] !== "") { this._filterRegex += "(?=.*" + searchParts[j] + ")"; } } this._filterRegex += ".*"; } this._currentFilter = this._filterBox.value; this._treeView.setFilter(function (item) { return _this.shouldIncludeItemCallback(item); }); } this.refreshList(); } }; FilePicker.prototype.getSortString = function (item) { return item.displayName; }; FilePicker.prototype.refreshList = function () { if (this._isFilterEnabled) { this._treeView.sortFilteredList(this.getSortString); } this.refreshViewWithCallback(); var selectedItem = this._treeView.getItemAt(0); if (selectedItem) { this._treeView.selectItem(selectedItem, false); } }; FilePicker.prototype.insertAtSortedPosition = function (fileItem, parentItem) { var added = false; var frontEndId = fileItem.doc.frontendId; if (this._fileItemsMap[frontEndId]) { this._treeView.removeItem(this._fileItemsMap[frontEndId]); } this._fileItemsMap[frontEndId] = fileItem; if (!parentItem) { this._treeView.addItems([fileItem], null, false, true); } else if (this.isOpen && this._treeView.getIndex(parentItem) >= 0) { if (this._treeView.isItemExpanded(parentItem)) { var children = parentItem.children; var childrenLength = children.length; var index = childrenLength - 1; while (index >= 0) { if (children[index] === fileItem) { break; } index--; } F12.Tools.Utility.Assert.areNotEqual(-1, index, "Expected to find the current file picker item in the parent's list of children"); if (index >= 0) { index++; while (index < childrenLength) { if (this._treeView.getIndex(children[index]) >= 0) { break; } index++; } if (index < childrenLength) { this._treeView.addItems([fileItem], children[index], true, true, true); added = true; } } if (!added) { this._treeView.addItems([fileItem], parentItem, false, true); } } else if (parentItem.childCount === 1) { this._treeView.addItems([fileItem], parentItem, false, true); if (parentItem.isDynamicFolder) { this._treeView.setRowState(this._treeView.getIndex(parentItem), Common.ObjectView.ObjectTreeView.COLLAPSE_ROW); } } } this.scheduleResize(); }; FilePicker.prototype.scheduleResize = function () { var _this = this; if (this.isOpen) { if (this._pendingResize !== null) { window.clearTimeout(this._pendingResize); } var scheduledResizeCallback = function () { _this.resizePicker(); }; this._pendingResize = window.setTimeout(scheduledResizeCallback, FilePicker.PENDING_RESIZE_TIMEOUT); } }; FilePicker.prototype.refreshVisibleChildren = function (parentItem) { if (this._treeView.isItemExpanded(parentItem)) { var children = parentItem.children; for (var childIndex = 0; childIndex < children.length; childIndex++) { var childItem = children[childIndex]; if (this._treeView.getIndex(childItem) >= 0) { this.refreshVisibleChildren(childItem); } else { this.insertAtSortedPosition(childItem, parentItem); if (childItem.hasChildren) { this.insertAtSortedPosition(childItem.children[0], childItem); } } } } }; FilePicker.prototype.saveFilteredList = function () { this._filterMap = []; this._filterDynamicFolders = []; for (var i in this._rootNodesMap) { this.saveCollapsedState(this._rootNodesMap[i]); } }; FilePicker.prototype.saveCollapsedState = function (parentItem) { if (this._treeView.isItemExpanded(parentItem)) { if (parentItem.isDynamicFolder) { this._filterDynamicFolders.push(parentItem); } else { this._filterMap[parentItem.doc.frontendId] = true; } var children = parentItem.children; for (var childIndex = 0; childIndex < children.length; childIndex++) { this.saveCollapsedState(children[childIndex]); } } }; FilePicker.prototype.restoreFilteredList = function () { for (var i in this._rootNodesMap) { var rootIndex = this._treeView.getIndex(this._rootNodesMap[i]); this._treeView.collapseAllItems(rootIndex); this._treeView.setRowState(rootIndex, Common.ObjectView.ObjectTreeView.EXPAND_ROW); this.restoreCollapsedState(this._rootNodesMap[i]); } this._filterMap = []; this._filterDynamicFolders = []; }; FilePicker.prototype.restoreCollapsedState = function (parentItem) { var wasExpanded; if (parentItem.isDynamicFolder) { wasExpanded = this._filterDynamicFolders.indexOf(parentItem) !== -1; } else { wasExpanded = this._filterMap[parentItem.doc.frontendId]; } if (wasExpanded) { this._treeView.setRowState(this._treeView.getIndex(parentItem), Common.ObjectView.ObjectTreeView.EXPAND_ROW); var children = parentItem.children; for (var childIndex = 0; childIndex < children.length; childIndex++) { this.restoreCollapsedState(children[childIndex]); } } }; FilePicker.OPENED_DOCUMENT_CLASS = "openedDocument"; FilePicker.MIN_WIDTH = 250; FilePicker.MIN_HEIGHT = 30; FilePicker.BOTTOM_MARGIN = 10; FilePicker.RIGHT_MARGIN = 20; FilePicker.BOTTOM_PADDING = 10; FilePicker.RIGHT_PADDING = 10; FilePicker.INNER_PADDING = 2; FilePicker.SCROLLBAR_PADDING = 15; FilePicker.FILTERBOX_HEIGHT = 33; FilePicker.FILTERBOX_WIDTH_PADDING = 16; FilePicker.WHITE_SPACE_REGEX = /^[\s]*$/g; FilePicker.SEARCH_PARTS_SPLIT_REGEX = /[\s\"\']+/g; FilePicker.PENDING_RESIZE_TIMEOUT = 50; return FilePicker; })(); Debugger.FilePicker = FilePicker; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // searchProvider.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var SearchProvider = (function () { function SearchProvider(debuggerManager) { this._lastMatchIndex = -1; this._debuggerManager = debuggerManager; this._documentController = debuggerManager.documentController; this._matchRanges = []; this._matchRangeDoc = null; this._decorationIds = []; this._docForDecorations = null; this._searchString = null; this._escapedSearchString = null; } Object.defineProperty(SearchProvider.prototype, "escapedSearchText", { get: function () { if (this._escapedSearchString === null) { this._escapedSearchString = Common.EncodingUtilities.escapeRegExp(this.searchText); } return this._escapedSearchString; }, enumerable: true, configurable: true }); Object.defineProperty(SearchProvider.prototype, "searchText", { get: function () { if (this._searchString === null) { this._searchString = this._searchBox.value.toLocaleLowerCase(); this._escapedSearchString = null; } return this._searchString; }, set: function (value) { this._searchBox.value = value; this._searchString = null; this._escapedSearchString = null; }, enumerable: true, configurable: true }); Object.defineProperty(SearchProvider.prototype, "_editorWindow", { get: function () { return this._debuggerManager.debuggerShell.editorWindow; }, enumerable: true, configurable: true }); SearchProvider.prototype.initializeToolbarElements = function () { var _this = this; Tools.Utility.Assert.isUndefined(this._searchBoxBorder, "initializeToolbarElements may not be called multiple times."); this._searchBoxBorder = document.getElementById("searchBoxBorder"); this._searchBox = document.getElementById("searchbox"); this._searchBox.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("SearchBoxTooltip")); this._searchBox.setAttribute("placeholder", Plugin.Resources.getString("SearchBoxPlaceholder")); this._searchBox.setAttribute("aria-label", Plugin.Resources.getString("SearchBoxPlaceholder")); this._searchPreviousButton = document.getElementById("searchPreviousResult"); this._searchPreviousButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("/Common/SearchPrevText")); this._searchPreviousButton.setAttribute("aria-label", Plugin.Resources.getString("/Common/SearchPrevText")); this._searchPreviousButton.addEventListener("click", function (e) { _this.findNextMatch(false); }); this._searchPreviousButton.addEventListener("keydown", function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { _this.findNextMatch(false); return false; } return true; }); this._searchNextButton = document.getElementById("searchNextResult"); this._searchNextButton.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("/Common/SearchNextText")); this._searchNextButton.setAttribute("aria-label", Plugin.Resources.getString("/Common/SearchNextText")); this._searchNextButton.addEventListener("click", function (e) { _this.findNextMatch(true); }); this._searchNextButton.addEventListener("keydown", function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { _this.findNextMatch(true); return false; } return true; }); this.hideNextPreviousButtons(); this._searchBox.addEventListener("input", function (e) { return _this.onSearchTextChanged(); }); this._searchBox.addEventListener("keydown", function (e) { return _this.onKeyDownSearchBox(e); }); var contextMenu = new Debugger.CutCopyPasteContextMenu(this._searchBox, this.onSearchTextChanged.bind(this)); document.addEventListener("keydown", function (e) { return _this.onKeyDownGlobal(e); }); Plugin.F12.addEventListener("keydown", function (e) { return _this.onKeyDownGlobal(e); }); }; SearchProvider.prototype.onSearchTextChanged = function () { this._searchString = null; this._escapedSearchString = null; this._lastMatchIndex = -1; this.findAndHighlightMatches(); if (this.searchText === "") { this.hideNextPreviousButtons(); } }; SearchProvider.prototype.focusSearchBox = function () { this._searchBox.focus(); this._searchBox.setSelectionRange(0, this.searchText.length); }; SearchProvider.prototype.findAndHighlightMatches = function () { if (this._documentController.currentDoc) { this.cleanupOldSearchResults(); this._searchBoxBorder.classList.remove(SearchProvider.RESULT_NOT_FOUND_CLASS); if (this.searchText !== "") { this.showNextPreviousButtons(); } if (this.searchText) { this._matchRanges = this._editorWindow.getLocalMatches(this.searchText); this._matchRangeDoc = this._documentController.currentDoc; this._decorationIds = this._editorWindow.addDecorations(this._matchRanges, SearchProvider.SEARCH_TERM_DECORATION_CLASS, Plugin.Theme.getValue("plugin-editor-scrollbar-marker-search-result-color")); this._docForDecorations = this._documentController.currentDoc; } } }; SearchProvider.prototype.findNextMatch = function (forward) { var _this = this; if (this._isSearching) { return Plugin.Promise.wrap(null); } var isFocusInSearchBox = (document.activeElement === this._searchBox); var localMatch = this.findMatchInOpenFile(forward); if (localMatch) { this._editorWindow.selectRange(localMatch, false); if (isFocusInSearchBox) { this._searchBox.focus(); } this._debuggerManager.testEventObject.fireEvent("searchCompleted", localMatch); return Plugin.Promise.wrap(localMatch); } this._lastMatchIndex = -1; return this.findMatchInOtherFile(forward).then(function (match) { if (isFocusInSearchBox) { _this._searchBox.focus(); } _this._debuggerManager.testEventObject.fireEvent("searchCompleted", match); return match; }); }; SearchProvider.prototype.findMatchInOtherFile = function (forward) { var _this = this; return new Plugin.Promise(function (completed, error) { _this.getNextDocWithMatch(forward).then(function (doc) { if (doc) { _this._documentController.openDocument(doc, null, 1 /* SwitchWithoutFocus */).then(function () { _this._matchRanges = _this._editorWindow.getLocalMatches(_this.searchText); _this._matchRangeDoc = _this._documentController.currentDoc; _this._lastMatchIndex = forward ? 0 : _this._matchRanges.length - 1; var range = _this._matchRanges[_this._lastMatchIndex]; if (range) { _this._editorWindow.selectRange(range, false); } _this._searchBox.disabled = false; _this._isSearching = false; completed(range); }); } else { _this._isSearching = false; _this._searchBox.disabled = false; _this._searchBoxBorder.classList.add(SearchProvider.RESULT_NOT_FOUND_CLASS); _this.hideNextPreviousButtons(); completed(null); } }); }); }; SearchProvider.prototype.getNextDocWithMatch = function (forward) { if (!this._isSearching && this.searchText) { this._isSearching = true; this._searchBox.disabled = true; var remainingDocs = this.getOrderedDocsForSearch(forward); if (remainingDocs && remainingDocs.length > 0) { return this.iterateOnItem(remainingDocs[0], remainingDocs.slice(1)); } } return Plugin.Promise.wrap(null); }; SearchProvider.prototype.shouldKeepSearching = function (position, match, forward) { if (forward) { return (position.lineNumber > match.startLineNumber) || (position.lineNumber === match.startLineNumber && position.column > match.startColumn); } else { return (position.lineNumber < match.endLineNumber) || (position.lineNumber === match.endLineNumber && position.column < match.endColumn); } }; SearchProvider.prototype.iterateOnItem = function (doc, remainingDocs) { var _this = this; return this.doesDocHaveMatch(doc).then(function (success) { if (success) { return Plugin.Promise.wrap(doc); } else { if (doc.isAuthored && doc.sourceMapState !== 0 /* On */) { remainingDocs.splice(0, 0, doc.rawDoc); } if (remainingDocs && remainingDocs.length > 0) { return _this.iterateOnItem(remainingDocs[0], remainingDocs.slice(1)); } else { return Plugin.Promise.wrap(null); } } }); }; SearchProvider.prototype.doesDocHaveMatch = function (doc) { var _this = this; if (doc.isAuthored) { return doc.getText().then(function (text) { if (doc.sourceMapState !== 0 /* On */) { return false; } var regExp = new RegExp(_this.escapedSearchText, "gi"); return regExp.test(text); }); } else { return this._debuggerManager.getNextDocContainingMatch(this.escapedSearchText, [doc]).then(function (matchingDoc) { return Plugin.Promise.wrap(!!matchingDoc); }); } }; SearchProvider.prototype.findMatchInOpenFile = function (forward) { if (this._documentController.currentDoc && this._matchRangeDoc === this._documentController.currentDoc) { var possibleIndex = forward ? 0 : this._matchRanges.length - 1; var match = this._matchRanges[possibleIndex]; var editorRange = this._editorWindow.getEditorSelection(); if (editorRange) { var editorPosition = forward ? editorRange.getEndPosition() : editorRange.getStartPosition(); while (match && this.shouldKeepSearching(editorPosition, match, forward)) { possibleIndex += (forward ? 1 : -1); match = this._matchRanges[possibleIndex]; } this._lastMatchIndex = possibleIndex; return match; } } return null; }; SearchProvider.prototype.updateSearchTextFromSelection = function () { var selection = this._editorWindow.getEditorSelection(); if (selection) { var text = this._editorWindow.getEditorRangeContents(selection); if (text) { var trimIndex = text.search(/[\n\r]/g); if (trimIndex > -1) { text = text.substring(0, trimIndex); } if (!this.searchText || text.toLocaleLowerCase() !== this.searchText.toLocaleLowerCase()) { this.cleanupOldSearchResults(); this.searchText = text; this._lastMatchIndex = -1; this.findAndHighlightMatches(); return true; } } } return false; }; SearchProvider.prototype.onKeyDownSearchBox = function (e) { if (e.keyCode === 13 /* Enter */ && !e.altKey && !e.ctrlKey) { this.findNextMatch(!e.shiftKey); } else if (e.keyCode === 27 /* Escape */) { this.searchText = ""; this.findAndHighlightMatches(); this.hideNextPreviousButtons(); } return true; }; SearchProvider.prototype.onKeyDownGlobal = function (e) { var handled = false; if (e.keyCode === 114 /* F3 */ && !e.ctrlKey && !e.altKey) { this.findNextMatch(!e.shiftKey); handled = true; } else if (e.keyCode === 114 /* F3 */ && e.ctrlKey && !e.altKey) { this.updateSearchTextFromSelection(); this.findNextMatch(!e.shiftKey); handled = true; } else if (e.keyCode === 70 /* F */ && e.ctrlKey && !e.altKey) { this.updateSearchTextFromSelection(); this.focusSearchBox(); handled = true; } if (handled) { e.preventDefault(); e.stopImmediatePropagation(); return false; } return true; }; SearchProvider.prototype.showNextPreviousButtons = function () { this._searchPreviousButton.style.display = "block"; this._searchNextButton.style.display = "block"; }; SearchProvider.prototype.cleanupOldSearchResults = function () { this._matchRanges = []; this._matchRangeDoc = null; this._editorWindow.removeDecorations(this._decorationIds, this._docForDecorations); this._decorationIds = []; this._docForDecorations = null; }; SearchProvider.prototype.getOrderedDocsForSearch = function (forward) { var laterResults = []; var results = []; var currentDocPassed = false; var openDocs = this._documentController.getOpenDocs(); for (var i = 0; i < openDocs.length; i++) { var doc = openDocs[i]; if (doc === this._documentController.currentDoc) { currentDocPassed = true; } else { if (currentDocPassed) { results.push(doc); } else { laterResults.push(doc); } } } var availableDocs = this._documentController.getDocs(); for (var j in availableDocs) { var doc = availableDocs[j]; if (results.indexOf(doc) === -1 && laterResults.indexOf(doc) === -1) { if (doc === this._documentController.currentDoc) { currentDocPassed = true; } else { if (currentDocPassed) { results.push(doc); } else { laterResults.push(doc); } } } } if (forward) { results = results.concat(laterResults); } else { results = results.concat(laterResults).reverse(); } if (this._documentController.currentDoc) { results.push(this._documentController.currentDoc); } return results; }; SearchProvider.prototype.hideNextPreviousButtons = function () { this._searchPreviousButton.style.display = "none"; this._searchNextButton.style.display = "none"; }; SearchProvider.RESULT_NOT_FOUND_CLASS = "BPT-SearchBox-NoResult"; SearchProvider.SEARCH_TERM_DECORATION_CLASS = "searchTermDecoration"; return SearchProvider; })(); Debugger.SearchProvider = SearchProvider; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // DocTable.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DocTable = (function () { function DocTable() { this._docs = []; this._runtimeIdToFrontendIdMap = []; this._urlToFrontendIdMap = new Debugger.NumberMultiMap(); } DocTable.isFileProtocol = function (url) { return url.substring(0, DocTable.FILE_PROTOCOL_PREFIX.length).toLowerCase() === DocTable.FILE_PROTOCOL_PREFIX; }; DocTable.prototype.onDocAdded = function (doc) { if (this._docs[doc.frontendId] && doc.runtimeId) { this._runtimeIdToFrontendIdMap[doc.runtimeId] = doc.frontendId; } else { this._docs[doc.frontendId] = doc; if (doc.runtimeId) { this._runtimeIdToFrontendIdMap[doc.runtimeId] = doc.frontendId; } var url = doc.url; if (url) { if (DocTable.isFileProtocol(url)) { url = url.toLowerCase(); } this._urlToFrontendIdMap.add(url, doc.frontendId); } } }; DocTable.prototype.contains = function (doc) { return DocTable.isNumber(doc.frontendId) && typeof this._docs[doc.frontendId] !== "undefined"; }; DocTable.prototype.onDocUrlChanged = function (doc) { this._urlToFrontendIdMap.remove(doc.frontendId); this._urlToFrontendIdMap.add(doc.url, doc.frontendId); }; DocTable.prototype.getFrontendIdByUrl = function (url) { if (url) { if (DocTable.isFileProtocol(url)) { url = url.toLowerCase(); } return this._urlToFrontendIdMap.getFirstValue(url); } return null; }; DocTable.prototype.getAllFrontendsIdByUrl = function (url) { if (url) { if (DocTable.isFileProtocol(url)) { url = url.toLowerCase(); } return this._urlToFrontendIdMap.getValues(url); } return []; }; DocTable.prototype.getDocByFrontendId = function (id) { return this._docs[id]; }; DocTable.prototype.getDocByRuntimeId = function (id) { if (DocTable.isNumber(id)) { var frontendId = this._runtimeIdToFrontendIdMap[id]; return this._docs[frontendId]; } return null; }; DocTable.prototype.getDocs = function () { var docs = []; this._docs.forEach(function (value, index, array) { docs.push(value); }); return docs; }; DocTable.prototype.onDocRemoved = function (doc) { if (doc) { if (doc.url) { var url = doc.url; if (DocTable.isFileProtocol(url)) { url = url.toLowerCase(); } this._urlToFrontendIdMap.remove(doc.frontendId); delete this._runtimeIdToFrontendIdMap[doc.runtimeId]; } delete this._docs[doc.frontendId]; } }; DocTable.isNumber = function (value) { return typeof value === "number" && !isNaN(value); }; DocTable.FILE_PROTOCOL_PREFIX = "file://"; return DocTable; })(); Debugger.DocTable = DocTable; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // IFormatService.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; (function (SourceType) { SourceType[SourceType["Original"] = 0] = "Original"; SourceType[SourceType["Sourcemap"] = 1] = "Sourcemap"; SourceType[SourceType["PrettyPrint"] = 2] = "PrettyPrint"; })(FormatService.SourceType || (FormatService.SourceType = {})); var SourceType = FormatService.SourceType; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // Formatter.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var Formatter = (function () { function Formatter(workerBaseUrl, commonBaseUrl) { this._options = null; this._sourceText = null; this._sourceInfo = null; this._options = new FormatService.FormatterOptions(); this._canBePrettyPrinted = true; this._workerRoot = (workerBaseUrl !== undefined) ? workerBaseUrl : "formatter/"; this._commonUrl = (commonBaseUrl !== undefined) ? commonBaseUrl : "../../common/"; this._editorBaseUrl = (workerBaseUrl !== undefined) ? "editor" : "res://" + window.location.host + "/23/debugger/editor"; this._loaderUrl = (workerBaseUrl !== undefined) ? "editor/vs/" : "../editor/vs/"; this._typescriptServicesUrl = (workerBaseUrl !== undefined) ? "editor/vs/languages/typescript/lib/" : "../editor/vs/languages/typescript/lib/"; this._prettyPrintPromise = null; } Object.defineProperty(Formatter.prototype, "canFormat", { get: function () { return this._canBePrettyPrinted; }, enumerable: true, configurable: true }); Object.defineProperty(Formatter.prototype, "sourceText", { get: function () { return this._sourceText; }, enumerable: true, configurable: true }); Object.defineProperty(Formatter.prototype, "options", { get: function () { return this._options; }, enumerable: true, configurable: true }); Formatter.calculateLineOffsets = function (source) { var lineCount = 0; var offsets = []; offsets[lineCount] = 0; if (source) { for (var offset = 0; offset < source.length; offset++) { if (source.charAt(offset) === "\n") { offsets[++lineCount] = offset + 1; } } } return offsets; }; Formatter.prototype.updateOptions = function (newOptions) { this._options.updateAllOptions(newOptions); }; Formatter.prototype.setDocument = function (source, url, mimeType, headers, startPrettyPrint) { var _this = this; Tools.Utility.Assert.hasValue(source, "source does not have a value."); var promise = new Plugin.Promise(function (completed, error) { _this._sourceText = new FormatService.UnmappedTextMapping(source); _this._sourceInfo = { name: "", mimeType: mimeType, sourceType: 2 /* PrettyPrint */ }; _this._canBePrettyPrinted = source.length > 0 && !/^[\s;]+$/.test(source); if (_this._prettyPrintPromise) { _this._prettyPrintPromise.cancel(); _this._prettyPrintPromise = null; } if (startPrettyPrint && _this._canBePrettyPrinted) { _this.formatSource(); } completed(_this._sourceInfo); }); return promise; }; Formatter.prototype.getFormattedText = function (options) { Tools.Utility.Assert.isTrue(!!this.sourceText, "Must call setDocument first"); options = options || this._options; var sourceType = (options.prettyPrint && this._canBePrettyPrinted) ? 2 /* PrettyPrint */ : 0 /* Original */; if (sourceType === 2 /* PrettyPrint */) { if (!this._prettyPrintPromise) { this.formatSource(); } Tools.Utility.Assert.hasValue(this._prettyPrintPromise, "No pretty print promise."); return this._prettyPrintPromise; } else { return Plugin.Promise.wrap(this._sourceText); } }; Formatter.prototype.formatSource = function () { var _this = this; var worker = null; Tools.Utility.Assert.isTrue(this._canBePrettyPrinted, "Source cannot be pretty printed."); if (this._prettyPrintPromise) { return; } var disposeWorker = function () { if (worker) { worker.terminate(); } }; this._prettyPrintPromise = new Plugin.Promise(function (completed, error) { window.setImmediate(function () { worker = new Worker(_this._workerRoot + "formatWorker.js"); var errorMessage = null; worker.onerror = function (e) { _this._canBePrettyPrinted = false; errorMessage = Common.ToolWindowHelpers.loadString("FormatterInternalError"); disposeWorker(); completed(new FormatService.UnmappedTextMapping(_this._sourceText.text, errorMessage)); return; }; worker.onmessage = function (e) { var msg = e.data; var errorMessage = null; _this._canBePrettyPrinted = msg.canBePrettyPrinted; var result = null; if (_this._canBePrettyPrinted) { var generatedSourceSpanData = msg.generatedSourceSpanData; var generatedSourceSpans = []; for (var i = 0; i < generatedSourceSpanData.length; i++) { var sourceSpan = new FormatService.SourceSpan(generatedSourceSpanData[i]); generatedSourceSpans.push(sourceSpan); } if (msg.error) { errorMessage = Common.ToolWindowHelpers.loadString(generatedSourceSpans.length > 1 ? "FormatterEmbededJSInternalError" : "FormatterInternalError"); if (msg.errorMessage.length > 0) { errorMessage += "\n"; errorMessage += msg.errorMessage; } } result = new FormatService.FormattedTextMapping(2 /* PrettyPrint */, msg.formattedText, _this._sourceText, generatedSourceSpans, errorMessage); } disposeWorker(); completed(result || _this.sourceText); }; var msg = new FormatService.WorkerSendMessage(); msg.source = _this._sourceText.text; msg.mimeType = _this._sourceInfo.mimeType; msg.commonUrl = _this._commonUrl; msg.editorBaseUrl = _this._editorBaseUrl; msg.loader = _this._loaderUrl; msg.typescriptServices = _this._typescriptServicesUrl; worker.postMessage(msg); }); }, disposeWorker); }; return Formatter; })(); FormatService.Formatter = Formatter; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // FormattedTextMapping.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var FormattedTextMapping = (function () { function FormattedTextMapping(sourceType, formattedText, originalText, sourceSpans, errorMessage) { Tools.Utility.Assert.isTrue(sourceType === 2 /* PrettyPrint */ || sourceType === 1 /* Sourcemap */, "Invalid sourceType"); Tools.Utility.Assert.hasValue(sourceSpans && sourceSpans.length, "sourceSpans are required"); this.sourceType = sourceType; this.text = formattedText; this._originalText = originalText; this._sourceSpans = sourceSpans; this.errorMessage = errorMessage || originalText.errorMessage; this._formattedOffsets = FormatService.Formatter.calculateLineOffsets(formattedText); } FormattedTextMapping.prototype.getOriginalPosition = function (mappedPosition) { var offset = this.getOriginalOffset(mappedPosition); return this._originalText.getOriginalPosition(this._originalText.offsetToPosition(offset)); }; FormattedTextMapping.prototype.getMappedPosition = function (originalPosition) { originalPosition = this._originalText.getMappedPosition(originalPosition); var offset = this._originalText.positionToOffset(originalPosition); var originalLength = this._originalText.text.length; if (originalLength === 0) { return new FormatService.Position(0, 0); } if (offset < 0) { offset = 0; } if (offset >= originalLength) { offset = originalLength - 1; } var sourceSpan; var sourceSpanIndex; for (sourceSpanIndex = 0; sourceSpanIndex < this._sourceSpans.length; sourceSpanIndex++) { if (this._sourceSpans[sourceSpanIndex].start <= offset && this._sourceSpans[sourceSpanIndex].end >= offset) { sourceSpan = this._sourceSpans[sourceSpanIndex]; break; } } Tools.Utility.Assert.isTrue(sourceSpanIndex < this._sourceSpans.length, "Could not find source code for offset"); var pos = sourceSpan.getPosition(offset - sourceSpan.start); if (sourceSpan.sourcemap) { pos = sourceSpan.sourcemap.getGeneratedPosition(pos); } pos.line += sourceSpan.generatedLineOffset; return pos; }; FormattedTextMapping.prototype.positionToOffset = function (mappedPosition) { return this._formattedOffsets[mappedPosition.line] + mappedPosition.column; }; FormattedTextMapping.prototype.offsetToPosition = function (offset) { for (var lineNum = 0; lineNum < this._formattedOffsets.length; lineNum++) { if (this._formattedOffsets[lineNum] > offset) { break; } } lineNum--; return new FormatService.Position(lineNum, offset - this._formattedOffsets[lineNum], 0); }; FormattedTextMapping.prototype.getOriginalOffset = function (mappedPosition) { if (this._originalText.text.length === 0) { return 0; } var pos = new FormatService.Position(mappedPosition.line, mappedPosition.column, mappedPosition.file); for (var sourceSpanIndex = 0; sourceSpanIndex < this._sourceSpans.length - 1; sourceSpanIndex++) { if (pos.line < this._sourceSpans[sourceSpanIndex + 1].generatedLineOffset) { break; } } var sourceSpan = this._sourceSpans[sourceSpanIndex]; pos.line -= sourceSpan.generatedLineOffset; if (sourceSpan.sourcemap) { pos = sourceSpan.sourcemap.getOriginalPosition(pos); } var offset = sourceSpan.getOffset(pos); return offset; }; return FormattedTextMapping; })(); FormatService.FormattedTextMapping = FormattedTextMapping; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // UnmappedTextMapping.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var UnmappedTextMapping = (function () { function UnmappedTextMapping(text, errorMessage) { this.text = text; this.errorMessage = errorMessage; var sourceSpanBuilder = new FormatService.SourceSpanBuilder(0, text.length); sourceSpanBuilder.calculateLineOffsets(text); this._sourceSpan = new FormatService.SourceSpan(sourceSpanBuilder.data); } UnmappedTextMapping.prototype.getOriginalPosition = function (mappedPosition) { return mappedPosition; }; UnmappedTextMapping.prototype.getMappedPosition = function (originalPosition) { return originalPosition; }; UnmappedTextMapping.prototype.positionToOffset = function (mappedPosition) { if (this.text.length === 0) { return 0; } return this._sourceSpan.getOffset(mappedPosition); }; UnmappedTextMapping.prototype.offsetToPosition = function (offset) { if (this.text.length === 0) { return FormatService.Position.EMPTY_POSITION; } return this._sourceSpan.getPosition(Math.min(this.text.length, Math.max(0, offset))); }; return UnmappedTextMapping; })(); FormatService.UnmappedTextMapping = UnmappedTextMapping; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // FormatterOptions.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var FormatterOptions = (function () { function FormatterOptions() { this._prettyPrint = false; this._sourcemapSupport = false; } Object.defineProperty(FormatterOptions.prototype, "sourcemapSupport", { get: function () { return this._sourcemapSupport; }, set: function (isEnabled) { this._sourcemapSupport = isEnabled; }, enumerable: true, configurable: true }); Object.defineProperty(FormatterOptions.prototype, "prettyPrint", { get: function () { return this._prettyPrint; }, set: function (isEnabled) { this._prettyPrint = isEnabled; }, enumerable: true, configurable: true }); FormatterOptions.prototype.updateAllOptions = function (newOptions) { this.prettyPrint = newOptions.prettyPrint || false; this.sourcemapSupport = newOptions.sourcemapSupport || false; }; return FormatterOptions; })(); FormatService.FormatterOptions = FormatterOptions; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // position.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var Position = (function () { function Position(line, column, file) { if (line) { Tools.Utility.Assert.isTrue(line >= 0, "Invalid line number: " + line.toString()); this._line = line; } else { this._line = 0; } if (column) { Tools.Utility.Assert.isTrue(column >= 0, "Invalid column: " + column.toString()); this._column = column; } else { this._column = 0; } if (file) { Tools.Utility.Assert.isTrue(file >= 0, "Invalid file: " + file.toString()); this._file = file; } else { this._file = 0; } } Object.defineProperty(Position.prototype, "line", { get: function () { return this._line; }, set: function (value) { Tools.Utility.Assert.isTrue(value >= 0, "Invalid line number: " + value.toString()); this._line = value; }, enumerable: true, configurable: true }); Object.defineProperty(Position.prototype, "column", { get: function () { return this._column; }, set: function (value) { Tools.Utility.Assert.isTrue(value >= 0, "Invalid column: " + value.toString()); this._column = value; }, enumerable: true, configurable: true }); Object.defineProperty(Position.prototype, "file", { get: function () { return this._file; }, set: function (value) { Tools.Utility.Assert.isTrue(value >= 0, "Invalid file: " + value.toString()); this._file = value; }, enumerable: true, configurable: true }); Position.EMPTY_POSITION = new Position(); return Position; })(); FormatService.Position = Position; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // sourcemapMappings.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourcemapMappings = (function () { function SourcemapMappings(mappings, urls) { var _this = this; this.urls = urls; this._fileMappings = []; this._allMappings = []; if (mappings) { mappings.forEach(function (item) { if (!_this._fileMappings[item.file]) { _this._fileMappings[item.file] = []; } _this._fileMappings[item.file].push(item); _this._allMappings.push(item); }); } this._fileMappings.forEach(function (fileMappings) { fileMappings.sort(function (a, b) { if (a.sourceLine !== b.sourceLine) { return a.sourceLine - b.sourceLine; } else if (a.sourceColumn !== b.sourceColumn) { return a.sourceColumn - b.sourceColumn; } else if (a.generatedLine !== b.generatedLine) { return a.generatedLine - b.generatedLine; } else { return a.generatedColumn - b.generatedColumn; } }); }); } SourcemapMappings.binarySearch = function (mappings, position, compareFunction) { var max = mappings.length - 1; var min = 0; while (min <= max) { var mid = (min + max) >> 1; var comparison = compareFunction(mappings[mid], position.line, position.column); if (comparison > 0) { min = mid + 1; } else if (comparison < 0) { max = mid - 1; } else { max = mid; break; } } var result = Math.max(Math.min(mappings.length - 1, max), 0); while (result + 1 < mappings.length && compareFunction(mappings[result + 1], position.line, position.column) === 0) { result++; } return result; }; SourcemapMappings.binaryCompareSource = function (mapping, line, column) { if (mapping.sourceLine === line) { return column - mapping.sourceColumn; } else { return line - mapping.sourceLine; } }; SourcemapMappings.binaryCompareGenerated = function (mapping, line, column) { if (mapping.generatedLine === line) { return column - mapping.generatedColumn; } else { return line - mapping.generatedLine; } }; SourcemapMappings.prototype.isValid = function () { return this._fileMappings && this._fileMappings.length > 0; }; SourcemapMappings.prototype.getOriginalPosition = function (generatedPosition) { var pos = new FormatService.Position(generatedPosition.line, generatedPosition.column, generatedPosition.file); var mappings = this._allMappings; if (mappings.length > 0) { var index = SourcemapMappings.binarySearch(mappings, pos, SourcemapMappings.binaryCompareGenerated); pos.line = Math.max(mappings[index].sourceLine, 0); pos.column = Math.max(mappings[index].sourceColumn, 0); pos.file = Math.min(Math.max(mappings[index].file, 0), this._fileMappings.length - 1); } return pos; }; SourcemapMappings.prototype.getGeneratedPosition = function (originalPosition) { var pos = new FormatService.Position(originalPosition.line, originalPosition.column, originalPosition.file); var mappings = this._fileMappings[pos.file]; if (mappings && mappings.length > 0) { var index = SourcemapMappings.binarySearch(mappings, pos, SourcemapMappings.binaryCompareSource); pos.line = Math.max(mappings[index].generatedLine, 0); pos.column = Math.max(mappings[index].generatedColumn, 0); } return pos; }; return SourcemapMappings; })(); FormatService.SourcemapMappings = SourcemapMappings; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // sourceSpan.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourceSpan = (function () { function SourceSpan(sourceSpanData) { this._start = sourceSpanData.start; this._end = sourceSpanData.end; this._lineOffsets = sourceSpanData.lineOffsets; this._generatedLineOffset = sourceSpanData.generatedLineOffset; this._sourcemap = new FormatService.SourcemapMappings(sourceSpanData.mappings, []); this._length = sourceSpanData.length; } Object.defineProperty(SourceSpan.prototype, "start", { get: function () { return this._start; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpan.prototype, "end", { get: function () { return this._end; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpan.prototype, "generatedLineOffset", { get: function () { return this._generatedLineOffset; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpan.prototype, "sourcemap", { get: function () { return this._sourcemap; }, enumerable: true, configurable: true }); SourceSpan.prototype.getPosition = function (offset) { Tools.Utility.Assert.isTrue(offset >= 0, "Negative offset"); Tools.Utility.Assert.isTrue(this._lineOffsets.length >= 1, "Need to call calculateLineOffsets first"); offset = Math.min(offset, this._length - 1); var max = this._lineOffsets.length - 1; var line = 0; while (line < max) { var mid = (line + max) >> 1; if (this._lineOffsets[mid] < offset) { line = mid + 1; } else { max = mid; } } if (line > 0 && line < this._lineOffsets.length && this._lineOffsets[line] > offset) { line = line - 1; } var column = offset - this._lineOffsets[line]; Tools.Utility.Assert.isTrue(column >= 0, "Calculated negative column"); var pos = new FormatService.Position(line, column); return pos; }; SourceSpan.prototype.getOffset = function (pos) { Tools.Utility.Assert.isTrue(this._lineOffsets.length >= 1, "Need to call calculateLineOffsets first"); Tools.Utility.Assert.isTrue(pos.line >= 0, "Line outside of range"); Tools.Utility.Assert.isTrue(pos.column >= 0, "Column outside of range"); var offset; if (pos.line >= this._lineOffsets.length) { offset = Math.max(0, this._length - 1); } else { offset = this._lineOffsets[pos.line] + pos.column; if (pos.line < this._lineOffsets.length - 1 && offset >= this._lineOffsets[pos.line + 1]) { offset = this._lineOffsets[pos.line + 1] - 1; } if (offset >= this._length) { offset = Math.max(0, this._length - 1); } } return offset + this._start; }; return SourceSpan; })(); FormatService.SourceSpan = SourceSpan; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // sourceSpanBuilder.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourceSpanBuilder = (function () { function SourceSpanBuilder(start, end, isScript) { Tools.Utility.Assert.isTrue(start >= 0, "Invalid start offset: " + start.toString()); Tools.Utility.Assert.isTrue(end >= start, "Invalid end offset: " + end.toString()); this._data = new FormatService.SourceSpanData(); this._data.start = start; this._data.end = end; this._isScript = isScript; this._data.lineOffsets = []; this._data.generatedLineOffset = 0; this._data.length = 0; this._data.mappings = []; } Object.defineProperty(SourceSpanBuilder.prototype, "_mappings", { get: function () { return this._data.mappings; }, set: function (mappings) { this._data.mappings = mappings; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "data", { get: function () { return this._data; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "start", { get: function () { return this._data.start; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "end", { get: function () { return this._data.end; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "isScript", { get: function () { return this._isScript; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "generatedLineOffset", { get: function () { return this._data.generatedLineOffset; }, set: function (offset) { Tools.Utility.Assert.isTrue(offset >= 0, "offset is negative"); this._data.generatedLineOffset = offset; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "lineOffsets", { get: function () { return this._data.lineOffsets; }, enumerable: true, configurable: true }); SourceSpanBuilder.prototype.calculateLineOffsets = function (source) { var lineCount = 0; this._data.lineOffsets = []; this._data.lineOffsets[lineCount] = 0; this._data.length = source.length; for (var offset = 0; offset < source.length; offset++) { if (source.charAt(offset) === "\n") { this._data.lineOffsets[++lineCount] = offset + 1; } } return lineCount; }; return SourceSpanBuilder; })(); FormatService.SourceSpanBuilder = SourceSpanBuilder; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // workerMessaging.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourcemapMapping = (function () { function SourcemapMapping() { this.generatedColumn = 0; this.generatedLine = 0; this.sourceColumn = 0; this.sourceLine = 0; this.file = 0; } return SourcemapMapping; })(); FormatService.SourcemapMapping = SourcemapMapping; var SourceSpanData = (function () { function SourceSpanData() { } return SourceSpanData; })(); FormatService.SourceSpanData = SourceSpanData; var WorkerSendMessage = (function () { function WorkerSendMessage() { } return WorkerSendMessage; })(); FormatService.WorkerSendMessage = WorkerSendMessage; var WorkerResponseMessage = (function () { function WorkerResponseMessage() { } return WorkerResponseMessage; })(); FormatService.WorkerResponseMessage = WorkerResponseMessage; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // debuggerManager.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DebuggerManager = (function () { function DebuggerManager(rpc, shell) { this.debuggerShell = shell; this._rpcWrapper = rpc; this._firstPageLoaded = false; this._ignoreNextSetRootDocument = false; this._documentOrder = []; this._documentOrderCount = 0; this._testEventObject = new Common.EventHelperObject(); this.persistenceManager = new Debugger.PersistenceManager(this); this.asyncStackProvider = new Debugger.AsyncStackProvider(this); this.intellisenseProvider = new Debugger.DebuggerIntellisenseProvider(this); this.breakpointController = new Debugger.BreakpointController(this); this.callstackController = new Debugger.CallstackController(this); this.executionController = new Debugger.ExecutionController(this); this.jmcController = new Debugger.JMCController(this); this.jmcBreakController = new Debugger.JMCBreakController(this); this.documentController = new Debugger.DocumentController(this); this.watchController = new Debugger.WatchWindowController(this, false); this.callstackController.registerListener(this.watchController); this.callstackController.registerListener(this.intellisenseProvider); } Object.defineProperty(DebuggerManager.prototype, "isAttached", { get: function () { return this._rpcWrapper.isConnected; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerManager.prototype, "testEventObject", { get: function () { return this._testEventObject; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerManager.prototype, "isBreakCompleted", { get: function () { return this._breakCompleted && this.executionController.isExecutionPaused; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerManager.prototype, "isDebuggerReady", { get: function () { return this._debuggerLaunched || (Plugin.F12.Profiler.getIsProfiling() && this._isDebuggerSourceRundownComplete); }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerManager.prototype, "prettyPrintEnabledForActiveDocument", { get: function () { var doc = this.documentController.currentDoc; if (!doc) { return 2 /* Disabled */; } return doc.prettyPrintState; }, enumerable: true, configurable: true }); DebuggerManager.prototype.onDetached = function () { this._debuggerLaunched = false; this.executionController.isDebuggingDisabled = true; this.executionController.isExecutionPaused = false; this.executionController.uninitialize(); this.persistenceManager.saveState(false); this.breakpointController.deleteAll(true); this.watchController.deleteAll(); this.asyncStackProvider.stopSession(); var ordered = []; this._documentOrder.forEach(function (value, index) { ordered[value] = index; }); var docIds = []; for (var i in ordered) { docIds.push(ordered[i]); } docIds.reverse(); this.onRemoveDocuments(docIds); this._documentOrderCount = 0; this._breakCompleted = false; this.callstackController.clear(); this.watchController.disableWatchesWindow(); }; DebuggerManager.prototype.registerPluginMethodHandlers = function () { var _this = this; if (!this._havePreviouslyAttached && this._rpcWrapper.isConnected && this._rpcWrapper.isDiagOMConnected()) { Plugin.F12.Communications.registerMethodHandler("breakModeCommand", function (script) { return _this.executeBreakModeCommand(script); }); Plugin.F12.Communications.registerMethodHandler("addToWatch", function (name) { _this.watchController.addWatch(name); return true; }); Plugin.F12.Communications.registerMethodHandler("showDocument", function (documentPath, oneBasedLine, oneBasedColumn, mimeType) { if (typeof oneBasedLine === "undefined") { oneBasedLine = 1; } if (typeof oneBasedColumn === "undefined") { oneBasedColumn = 1; } if (typeof mimeType === "undefined") { mimeType = ""; } _this.showDocument(documentPath, oneBasedLine || 1, oneBasedColumn || 1, mimeType); return true; }); Plugin.F12.Communications.registerMethodHandler("getLocalsForCurrentStackFrame", function (response) { _this.watchController.getLocalsForCurrentStackFrame().then(function (locals) { response(locals); }); }, true); Plugin.F12.Communications.registerMethodHandler("abortScriptExecution", function () { if (_this.isBreakCompleted) { _this.executionController.abort(); } else if (_this.executionController.isExecutionPaused) { _this._abortBreak = true; } return true; }); this._havePreviouslyAttached = true; window.setImmediate(function () { Plugin.F12.notifyOnToolActivated(); }); } }; DebuggerManager.prototype.onConnect = function () { var _this = this; if (!Plugin.F12.Profiler.getIsProfiling()) { this.initializeDebugger(); } else { Debugger.DebuggerShell.showErrorDisplay("ProfilingRunningMessage", undefined, 0, "http://go.microsoft.com/fwlink/?LinkId=290645"); var initializeDebugger = function () { Plugin.F12.removeEventListener("profilingstopped", initializeDebugger); if (_this._rpcWrapper.isConnected) { _this.initializeDebugger(); } }; this._rpcWrapper.triggerSourceRundown().done(function (result) { switch (result) { case 0 /* Succeeded */: _this._isDebuggerSourceRundownComplete = true; _this.testEventObject.fireEvent("debuggerLaunched"); return; } }); Plugin.F12.addEventListener("profilingstopped", initializeDebugger); } this.registerPluginMethodHandlers(); }; DebuggerManager.prototype.initializeDebugger = function () { var _this = this; Tools.Utility.Assert.isTrue(this._rpcWrapper.isConnected, "Not attached"); this.jmcController.initialize().then(function () { return _this.enableDynamicDebugging(); }).done(function (result) { Tools.Utility.Assert.isTrue(!Plugin.F12.Profiler.getIsProfiling(), "Profiler still enabled"); switch (result) { case 0 /* Succeeded */: _this.executionController.isDebuggingDisabled = false; if (!_this._debuggerLaunched) { _this.persistenceManager.applyState(); _this.persistenceManager.isAttached = true; _this.executionController.initialize(); Plugin.F12.Communications.addEventListener("consoleOutput", function () { _this.watchController.refreshAllWatchItems(false); }); } else { _this.executionController.reinitialize(); } _this._debuggerLaunched = true; _this.testEventObject.fireEvent("debuggerLaunched"); Debugger.DebuggerShell.closeErrorDisplay("DebuggerFailedToConnect"); break; case 2 /* FailedAlreadyAttached */: case 1 /* Failed */: _this.executionController.isDebuggingDisabled = true; var errorReason = ""; if (result === 2 /* FailedAlreadyAttached */) { errorReason = "\n" + Plugin.Resources.getString("DebuggerFailedToConnectAnotherAttached"); } Debugger.DebuggerShell.showErrorDisplay("DebuggerFailedToConnect", [errorReason], 0, DebuggerManager.DEBUGGER_FAILED_CONNECT_FWLINK); break; default: Tools.Utility.Assert.fail("Unknown ConnectionResult. Has something been added to the enum?"); break; } }); }; DebuggerManager.prototype.executeOnTargetPage = function (expression) { return this._rpcWrapper.executeOnTargetPage(expression); }; DebuggerManager.prototype.enableDynamicDebugging = function () { if (this.isAttached) { return this._rpcWrapper.enableDynamicDebugging(); } return Plugin.Promise.wrap(1 /* Failed */); }; DebuggerManager.prototype.getBreakpointIdFromLocation = function (location) { var _this = this; return location.rawLocation.doc.getText().then(function (text) { return _this._rpcWrapper.getBreakpointIdFromSourceLocation(location.rawLocation.doc, _this.getRawOffset(location)); }); }; DebuggerManager.prototype.addCodeBreakpoint = function (location, isPseudoBreakpoint) { var _this = this; return location.rawLocation.doc.getText().then(function () { return _this._rpcWrapper.addCodeBreakpoint(location.rawLocation.doc, _this.getRawOffset(location), isPseudoBreakpoint); }).then(function (info) { if (info.failed) { return null; } return Plugin.Promise.wrap(_this.createOrResolveBreakpointFromInfo(info)); }); }; DebuggerManager.prototype.addEventBreakpoint = function (eventTypes, isEnabled, condition, isTracepoint) { var _this = this; return this._rpcWrapper.addEventBreakpoint(eventTypes, isEnabled, condition, isTracepoint).then(function (breakpointInfo) { return _this.createOrResolveBreakpointFromInfo(breakpointInfo); }); }; DebuggerManager.prototype.addPendingBreakpoint = function (url, start, condition, isEnabled, isTracepoint) { return this._rpcWrapper.addPendingBreakpoint(url, start, condition, isEnabled, isTracepoint); }; DebuggerManager.prototype.causeBreak = function (causeBreakAction, workerId) { return this._rpcWrapper.causeBreak(causeBreakAction, workerId); }; DebuggerManager.prototype.getSourceText = function (doc, start, length) { return this._rpcWrapper.getSourceText(doc, start, length); }; DebuggerManager.prototype.removeBreakpoint = function (breakpointId) { return this._rpcWrapper.removeBreakpoint(breakpointId); }; DebuggerManager.prototype.setBreakpointEnabledState = function (breakpointId, enabled) { return this._rpcWrapper.setBreakpointEnabledState(breakpointId, enabled); }; DebuggerManager.prototype.setBreakpointCondition = function (breakpointId, condition, isTracepoint) { return this._rpcWrapper.setBreakpointCondition(breakpointId, condition, isTracepoint); }; DebuggerManager.prototype.resume = function (breakResumeAction, ignoringBreak) { var _this = this; this._breakCompleted = false; if (!ignoringBreak) { var clearWatchesAndCallstacks = function () { _this.callstackController.clear(); _this.watchController.disableWatchesWindow(); }; if (breakResumeAction === 2 /* StepInto */ || breakResumeAction === 4 /* StepOut */ || breakResumeAction === 3 /* StepOver */) { this._clearWatchesAndCallstacksTimeout = setTimeout(clearWatchesAndCallstacks, 100); } else { clearWatchesAndCallstacks(); } } this.jmcBreakController.setJMCResumeInfo(this._latestStackFrames, breakResumeAction, ignoringBreak); this.asyncStackProvider.cancelPendingRetrievals(); return this._rpcWrapper.resume(breakResumeAction).then(function (result) { Plugin.F12.Debugger.notifyOnRun(); return result; }); }; DebuggerManager.prototype.setExceptionFilter = function (filter) { return this._rpcWrapper.setExceptionFilter(filter); }; DebuggerManager.prototype.getNextDocContainingMatch = function (query, docs) { if (!docs || docs.length === 0) { return Plugin.Promise.wrap(null); } return this.queueMatchQuery(query, docs, 0); }; DebuggerManager.prototype.getFrames = function (framesNeeded) { return this._rpcWrapper.getFrames(framesNeeded); }; DebuggerManager.prototype.getCurrentThreadDescription = function () { return this._rpcWrapper.getCurrentThreadDescription(); }; DebuggerManager.prototype.getThreads = function () { return this._rpcWrapper.getThreads(); }; DebuggerManager.prototype.eval = function (frameIndex, evalString) { return this._rpcWrapper.eval(frameIndex, evalString); }; DebuggerManager.prototype.getLocals = function (frameIndex) { return this._rpcWrapper.getLocals(frameIndex); }; DebuggerManager.prototype.getChildProperties = function (propertyId, start, length) { return this._rpcWrapper.getChildProperties(propertyId, start, length); }; DebuggerManager.prototype.setPropertyValueAsString = function (propertyId, value) { return this._rpcWrapper.setPropertyValueAsString(propertyId, value); }; DebuggerManager.prototype.triggerSourceRundown = function () { return this._rpcWrapper.triggerSourceRundown(); }; DebuggerManager.prototype.canSetNextStatement = function (location) { var _this = this; return location.rawLocation.doc.getText().then(function () { Tools.Utility.Assert.hasValue(document, "Can set next statement has been called for a document which does not have a formatter."); return _this._rpcWrapper.canSetNextStatement(location.rawLocation.doc, _this.getRawOffset(location)); }); }; DebuggerManager.prototype.setNextStatement = function (location) { var _this = this; Tools.Utility.Assert.hasValue(document, "Set next statement has been called for a document which does not have a formatter."); return location.rawLocation.doc.getText().then(function (text) { return _this._rpcWrapper.setNextStatement(location.rawLocation.doc, _this.getRawOffset(location)); }); }; DebuggerManager.prototype.togglePrettyPrintEnabledForActiveDocument = function () { var doc = this.documentController.currentDoc; doc.prettyPrintState = (doc.prettyPrintState === 0 /* On */) ? 1 /* Off */ : 0 /* On */; }; DebuggerManager.prototype.showDocument = function (documentPath, oneBasedLine, oneBasedColumn, mimeType) { var _this = this; Plugin.F12.bringPluginToForeground(); if (!this._firstPageLoaded) { this._ignoreNextSetRootDocument = true; } var doc = this.documentController.getDocFromUrl(documentPath); if (!doc && this._rpcWrapper.isDiagOMConnected()) { doc = this.createNonRuntimeDoc(documentPath, mimeType, length, false); this.documentController.documentAdded(doc); } if (doc) { doc.getText().then(function () { var rawOffset = doc.rawPositionToRawOffset(oneBasedLine, oneBasedColumn); var displayPosition = doc.getDisplayPosition(rawOffset) || { doc: doc, line: oneBasedLine, column: oneBasedColumn }; _this.documentController.openDocument(displayPosition.doc, new Debugger.DocumentLocation(displayPosition.doc, displayPosition.line, displayPosition.column)).done(function () { Plugin.F12.Communications.fireEvent("onNavigateToSourceComplete", Plugin.F12.PluginId.Header); }); }); } }; DebuggerManager.prototype.downloadUrl = function (url, mimeTypeOverride, isAsync) { var encodedContent = Common.ToolWindowHelpers.parseBase64DataUriContent(url); if (encodedContent) { var encodedMimeType = Common.ToolWindowHelpers.parseDataUriMimeType(url); return Plugin.Promise.wrap({ success: true, url: "", content: encodedContent, mimeType: encodedMimeType, errorMessage: "" }); } if (!Common.ToolWindowHelpers.isAbsoluteUrl(url)) { var rootDoc = this.documentController.getDocFromRuntimeId(this._rootDocId); if (rootDoc) { url = Common.ToolWindowHelpers.pathCombine(rootDoc.getPathFromUrl(rootDoc.url), url); } } if (typeof isAsync !== "boolean") { isAsync = !this.executionController.isExecutionPaused; } return this._rpcWrapper.downloadUrl(url, mimeTypeOverride, isAsync); }; DebuggerManager.prototype.executeBreakModeCommand = function (script) { if (this.isBreakCompleted && this.callstackController.activeFrame) { this.eval(this.callstackController.activeFrame.frameId, script); return true; } return false; }; DebuggerManager.prototype.onAddDocuments = function (sources) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(371 /* Debugger_OnAddDocuments_Info */); for (var i = 0; i < sources.length; ++i) { var source = sources[i]; this.onAddDocument(source); } }; DebuggerManager.prototype.onBreak = function (breakReason, description, errorId, firstChance, isUserUnhandled, isWorker, systemThreadId, breakEventType) { var _this = this; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(304 /* Debugger_OnBreak_Start */); if (this.executionController.shouldIgnoreBreaks) { this.ignoreBreak(1 /* Continue */); return; } var hasBreakStarted = false; if (!this.jmcController.isJustMyCodeEnabled) { this.startBreak(isWorker); hasBreakStarted = true; } this.getFrames(0).done(function (stackFrames) { _this._latestStackFrames = stackFrames; var rawFrames = []; var jmcBreakInfo = _this.jmcBreakController.getJMCBreakAction(stackFrames, breakReason, breakEventType, firstChance, isUserUnhandled); if (jmcBreakInfo.ignoreBreak) { _this.ignoreBreak(jmcBreakInfo.ignoreBreakAction); return; } if (_this._clearWatchesAndCallstacksTimeout) { window.clearTimeout(_this._clearWatchesAndCallstacksTimeout); _this._clearWatchesAndCallstacksTimeout = 0; } Plugin.F12.bringPluginToForeground(); if (!hasBreakStarted || _this.jmcController.isJustMyCodeEnabled) { _this.startBreak(isWorker); hasBreakStarted = true; } var promises = []; stackFrames.forEach(function (frame, frameIndex) { var doc = _this.documentController.getDocFromRuntimeId(frame.location.docId); if (doc && doc.isRuntimeDoc) { var documentPromise = doc.getText().then(function () { var location = doc.createDocumentLocation(frame.location.start, frame.location.length); var stackFrame = new Debugger.StackFrame(frame.callFrameId, frame.functionName, frame.location, location); rawFrames[frameIndex] = stackFrame; }); promises.push(documentPromise); } else { var dummyStackFrame = new Debugger.StackFrame(frame.callFrameId, frame.functionName, frame.location, (doc ? new Debugger.DocumentLocation(doc, 1, 1) : undefined)); rawFrames[frameIndex] = dummyStackFrame; } }); if (breakReason !== 6 /* Error */ && !!breakEventType) { var dummyStackFrame = new Debugger.StackFrame("eventBreakpoint", Plugin.Resources.getString("CallstackEventBreakpoint", breakEventType), null, undefined); dummyStackFrame.isLibraryMarkerFrame = true; rawFrames[stackFrames.length] = dummyStackFrame; } _this.getCurrentThreadDescription().done(function (threadDescription) { if (!threadDescription.isWorker) { threadDescription.displayName = Plugin.Resources.getString("DebuggerMainFrame"); } Plugin.Promise.join(promises).then(function () { if (!_this._firstPageLoaded) { _this._ignoreNextSetRootDocument = true; } var activeStackFrame = null; if (jmcBreakInfo.activeFrameIndex !== -1) { activeStackFrame = rawFrames[jmcBreakInfo.activeFrameIndex]; } _this.callstackController.onBreak(threadDescription, rawFrames, activeStackFrame).done(function () { var completeBreak = function (frames) { _this._breakCompleted = true; _this.callstackController.addAsyncFrames(frames, threadDescription.id); if (breakReason === 6 /* Error */) { if (_this.debuggerShell && _this.callstackController.activeFrame) { _this.debuggerShell.editorWindow.createExceptionDisplays(_this.callstackController.activeFrame.location, description); } } _this.executionController.updateAlertMessage(); _this.testEventObject.fireEvent("debuggerBroken"); if (_this._abortBreak) { _this.executionController.abort(); _this._abortBreak = false; } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(305 /* Debugger_OnBreak_Stop */); }; var progressCalled = false; _this.asyncStackProvider.getAsyncFrames(systemThreadId).done(function (frames) { if (!progressCalled) { completeBreak(frames); } _this.callstackController.addAsyncFrames(frames, threadDescription.id); _this.testEventObject.fireEvent("asyncFramesAvailable"); }, function (value) { if (!progressCalled) { completeBreak([]); } _this.testEventObject.fireEvent("asyncFramesAvailable"); }, function (frames) { progressCalled = true; completeBreak(frames); }); }); }); }); }); }; DebuggerManager.prototype.onUnhandledException = function (docId, description, errorId, start) { var doc = this.documentController.getDocFromRuntimeId(docId); var errorInfo = { messageId: "SCRIPT" + errorId, messageText: description }; if (doc) { doc.getText().done(function () { var oneBasedStart = doc.getDisplayPosition(start, false) || { line: 1, column: 1, doc: doc }; errorInfo.fileName = doc.url; errorInfo.lineNumber = oneBasedStart.line - 1; errorInfo.columnNumber = oneBasedStart.column - 1; Plugin.F12.Communications.fireEvent("onUnhandledException", Plugin.F12.PluginId.Console, errorInfo); }); } else { Plugin.F12.Communications.fireEvent("onUnhandledException", Plugin.F12.PluginId.Console, errorInfo); } }; DebuggerManager.prototype.onSetRootDocument = function (docId) { this._firstPageLoaded = true; this._rootDocId = docId; if (this._ignoreNextSetRootDocument) { this._ignoreNextSetRootDocument = false; return Plugin.Promise.wrap(null); } return this.documentController.openDocument(this.documentController.getDocFromRuntimeId(docId), null, 0 /* BackgroundOpen */).then(function () { if (Plugin.F12) { Plugin.F12.TraceWriter.markToolReady(); } }); }; DebuggerManager.prototype.onWebWorkerStarted = function (workerDescription) { this.callstackController.workerAdded(workerDescription); }; DebuggerManager.prototype.onWebWorkerFinished = function (workerId) { this.callstackController.workerRemoved(workerId); }; DebuggerManager.prototype.onRemoteScriptError = function (description, fileName, lineNumber, column) { window.reportError(description, fileName, lineNumber, "", column); }; DebuggerManager.prototype.onDebugOutput = function (output) { }; DebuggerManager.prototype.onAttachFailed = function () { }; DebuggerManager.prototype.onRemoveDocuments = function (docIds) { for (var i = 0, count = docIds.length; i < count; i++) { var doc = this.documentController.getDocFromRuntimeId(docIds[i]); Tools.Utility.Assert.hasValue(doc, "onRemoveDocuments received for document not in table."); delete this._documentOrder[doc.runtimeId]; this.executionController.removeAnyPseudoBreakpoint(doc); this.breakpointController.unresolveCodeBreakpoints(doc); this.documentController.documentRemoved(doc); } }; DebuggerManager.prototype.onResolveBreakpoint = function (breakpointId, info) { var breakpoint = this.createOrResolveBreakpointFromInfo(info, breakpointId); }; DebuggerManager.prototype.onUpdateDocuments = function (sources) { for (var i = 0; i < sources.length; ++i) { var source = sources[i]; var doc = this.documentController.getDocFromRuntimeId(source.id); Tools.Utility.Assert.hasValue(doc, "onUpdateDocuments received for docId not yet added."); if (doc.isRuntimeDoc) { if (doc.url !== source.url) { doc.url = source.url; } if (doc.mimeType !== source.mimeType) { this.documentController.documentTextOrMimeTypeUpdated(doc, "", true, source.mimeType); } doc.onMoreTextAvailable(source.length); } } }; DebuggerManager.prototype.onAddDocument = function (source) { var doc = this.documentController.getNonRuntimeDoc(source.url); var parent = this.documentController.getDocFromRuntimeId(source.parentId); if (doc) { doc.makeRuntimeDocument(source, parent); } else { doc = new Debugger.Doc(source, { parent: parent }, this); } this._documentOrder[doc.runtimeId] = this._documentOrderCount++; this.documentController.documentAdded(doc); return doc; }; DebuggerManager.prototype.onIntellinsenseRequestComplete = function (uid, result) { this.intellisenseProvider.onIntellinsenseRequestComplete(uid, result); }; DebuggerManager.prototype.getRawOffset = function (location) { if (typeof location.rawLocation.offset === "number") { return location.rawLocation.offset; } else { return location.rawLocation.doc.getRawLocation(location.startPosition).offset; } }; DebuggerManager.prototype.startBreak = function (isWorker) { this.executionController.isExecutionPaused = true; this.watchController.enableWatchesWindow(); this._rpcWrapper.onExecutionPaused(); Plugin.F12.Debugger.notifyOnBreak(isWorker); }; DebuggerManager.prototype.ignoreBreak = function (breakResumeAction) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(305 /* Debugger_OnBreak_Stop */); this.resume(breakResumeAction, true); }; DebuggerManager.prototype.createOrResolveBreakpointFromInfo = function (info, breakpointIdToResolve) { var _this = this; var location; var url; var doc; if (info.location) { if (info.location.docId !== 0) { doc = this.documentController.getDocFromRuntimeId(info.location.docId); location = doc.createDocumentLocation(info.location.start, info.location.length); url = doc.url; } else { var bp = this.breakpointController.getBreakpoint(info.breakpointId); if (bp) { bp.isBound = info.isBound; this.breakpointController.breakpointChanged(bp); return bp; } } } var breakpoint = new Debugger.Breakpoint(info.breakpointId, info.location, info.eventTypes, location, url, info.isBound); if (typeof info.isTracepoint === "boolean") { breakpoint.isTracepoint = info.isTracepoint; } if (typeof info.condition === "string") { breakpoint.condition = info.condition; } breakpoint.isEnabled = info.isEnabled; if (!info.isPseudoBreakpoint && doc) { doc.getText().done(function () { breakpoint.location = new Debugger.DynamicLocation({ doc: doc.rawDoc || doc, offset: info.location.start, length: info.location.length }); if (breakpointIdToResolve) { _this.breakpointController.resolveBreakpointById(breakpointIdToResolve, breakpoint); } else { _this.breakpointController.breakpointChanged(breakpoint); } }); } return breakpoint; }; DebuggerManager.prototype.queueMatchQuery = function (query, docs, index) { var _this = this; return this.isDocContainingMatch(query, docs[index]).then(function (matched) { if (matched) { return Plugin.Promise.wrap(docs[index]); } else { ++index; if (index < docs.length) { return _this.queueMatchQuery(query, docs, index); } return Plugin.Promise.wrap(""); } }); }; DebuggerManager.prototype.isDocContainingMatch = function (query, doc) { Tools.Utility.Assert.hasValue(doc, "Searching for matches on an undefined doc"); if (doc.hasText) { return doc.getText().then(function (sourceText) { var regExp = new RegExp(query, "gi"); return (sourceText && regExp.test(sourceText)); }); } else { if (doc.isRuntimeDoc) { return this._rpcWrapper.isDocContainingMatch(query, doc); } } return Plugin.Promise.wrap(false); }; DebuggerManager.prototype.createNonRuntimeDoc = function (url, mimeType, length, isDynamicCode) { return new Debugger.Doc(new Debugger.Source(undefined, undefined, false, url, mimeType, length, isDynamicCode, undefined), {}, this); }; DebuggerManager.DEBUGGER_FAILED_CONNECT_FWLINK = "http://go.microsoft.com/fwlink/?LinkID=313120"; return DebuggerManager; })(); Debugger.DebuggerManager = DebuggerManager; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // persistenceManager.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var PersistenceManager = (function () { function PersistenceManager(debuggerManager) { var _this = this; this._debuggerManager = debuggerManager; this.isAttached = false; this._debuggerSettings = {}; this._debuggerData = {}; this._propertyChangeRegistrations = []; this._activeDocumentDataItemsMap = {}; this._documentDisplayDataItems = {}; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(355 /* Debugger_Persistence_DataLoad_Start */); this.loadCollection(PersistenceManager.DEBUGGER_SETTINGS_KEY).done(function (debuggerSettings) { _this._debuggerSettings = debuggerSettings; _this.loadCollection(PersistenceManager.DEBUGGER_DATA_KEY).done(function (debuggerData) { _this._debuggerData = debuggerData; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(356 /* Debugger_Persistence_DataLoad_Stop */); }); }); } PersistenceManager.prototype.getSetting = function (key, defaultValue) { if (this._debuggerSettings.hasOwnProperty(key)) { return this._debuggerSettings[key]; } return defaultValue; }; PersistenceManager.prototype.getSettingAsBoolean = function (key, defaultValue) { if (this._debuggerSettings.hasOwnProperty(key)) { return this._debuggerSettings[key]; } return defaultValue; }; PersistenceManager.prototype.setSetting = function (key, value) { Tools.Utility.Assert.hasValue(value, "Value cannot be null or undefined"); this._debuggerSettings[key] = value; }; PersistenceManager.prototype.setSettingAsBoolean = function (key, value) { Tools.Utility.Assert.hasValue(value, "Value cannot be null or undefined"); this._debuggerSettings[key] = value; }; PersistenceManager.prototype.applyState = function () { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(359 /* Debugger_Persistence_AddWatches_Start */); var watchesData = this._debuggerData.watches; if (watchesData) { for (var index = 0; index < watchesData.length; index++) { this._debuggerManager.watchController.addWatch(watchesData[index].expression); } } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(360 /* Debugger_Persistence_AddWatches_Stop */); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(357 /* Debugger_Persistence_AddBreakpoints_Start */); var breakpoints = this._debuggerData.breakpoints; if (breakpoints) { this._debuggerManager.breakpointController.addPendingBreakpoints(breakpoints); } Debugger.debuggerTraceWriter.traceWriter.raiseEvent(358 /* Debugger_Persistence_AddBreakpoints_Stop */); }; PersistenceManager.prototype.saveState = function (isAttached) { if (typeof isAttached === "undefined") { isAttached = true; } if (this.isAttached) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(363 /* Debugger_Persistence_SaveState_Start */); this.isAttached = isAttached; Plugin.Settings.set(PersistenceManager.DEBUGGER_DATA_KEY, this.fetchDebuggerData()); Plugin.Settings.set(PersistenceManager.DEBUGGER_SETTINGS_KEY, this._debuggerSettings); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(364 /* Debugger_Persistence_SaveState_Stop */); } }; PersistenceManager.prototype.documentAdded = function (doc) { var _this = this; if (!doc.isDynamicCode) { this._debuggerData.documentDisplayData = this._debuggerData.documentDisplayData || []; for (var i in this._debuggerData.documentDisplayData) { var docDisplayData = this._debuggerData.documentDisplayData[i]; if (Debugger.Doc.hasSameUrl(docDisplayData.url, doc.url)) { this._documentDisplayDataItems[docDisplayData.url] = docDisplayData; } } this._propertyChangeRegistrations[doc.frontendId] = doc.propertyChanged.addHandler(function (propertyName) { if (propertyName === "prettyPrintState") { var docDisplayData = _this.getDocumentDisplayData(doc.url); docDisplayData.prettyPrintEnabled = doc.prettyPrintEnabled; } else if (propertyName === "sourceMapState") { var rawDoc = doc.rawDoc || doc; var docDisplayData = _this.getDocumentDisplayData(rawDoc.url); docDisplayData.sourceMapEnabled = rawDoc.sourceMapState !== 1 /* Off */; } }); if (this._debuggerData.openDocuments) { for (var index = 0; index < this._debuggerData.openDocuments.length; index++) { var documentStateItem = this._debuggerData.openDocuments[index]; if (Debugger.Doc.hasSameUrl(doc.url, documentStateItem.url) && !this.isAlreadyOpen(doc.url)) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(361 /* Debugger_Persistence_TabOpen_Start */); this._activeDocumentDataItemsMap[documentStateItem.url] = documentStateItem; doc.open(null, 0 /* BackgroundOpen */).done(function () { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(362 /* Debugger_Persistence_TabOpen_Stop */); }); break; } } } } }; PersistenceManager.prototype.documentClosed = function (doc, isRuntimeTriggered) { if (!doc.isDynamicCode && this._debuggerData.openDocuments) { for (var documentIndex = 0; documentIndex < this._debuggerData.openDocuments.length; documentIndex++) { var documentStateItem = this._debuggerData.openDocuments[documentIndex]; if (Debugger.Doc.hasSameUrl(doc.url, documentStateItem.url)) { if (this._activeDocumentDataItemsMap.hasOwnProperty(documentStateItem.url)) { delete this._activeDocumentDataItemsMap[documentStateItem.url]; } if (!isRuntimeTriggered) { this._debuggerData.openDocuments.splice(documentIndex, 1); } break; } } } }; PersistenceManager.prototype.documentOpened = function (doc, activation, location) { if (!doc.isDynamicCode) { var documentStates = this._debuggerData.openDocuments || []; var documentIndex; for (documentIndex = 0; documentIndex < documentStates.length; documentIndex++) { var documentStateItem = documentStates[documentIndex]; if (Debugger.Doc.hasSameUrl(doc.url, documentStateItem.url)) { if (location && location.startPosition) { documentStateItem.offset = location.rawLocation.offset; } if (activation !== 0 /* BackgroundOpen */) { this._activeDocumentDataItem = documentStateItem; } return Plugin.Promise.wrap(null); } } var documentStateItem = { url: doc.url.toLowerCase() }; if (documentStates.push(documentStateItem) > PersistenceManager.MAX_PERSISTED_DOCUMENTS) { documentStates.shift(); } this._activeDocumentDataItem = documentStateItem; this._debuggerData.openDocuments = documentStates; } else { this._activeDocumentDataItem = null; } return Plugin.Promise.wrap(null); }; PersistenceManager.prototype.documentRemoved = function (doc) { var registration = this._propertyChangeRegistrations[doc.frontendId]; if (registration) { delete this._propertyChangeRegistrations[doc.frontendId]; registration.unregister(); } }; PersistenceManager.prototype.updateEditorPosition = function (offset) { if (this._activeDocumentDataItem) { this._activeDocumentDataItem.offset = offset; } }; PersistenceManager.prototype.getOffsetForDoc = function (doc) { var url = doc.url.toLowerCase(); var offset = 0; if (this._activeDocumentDataItemsMap.hasOwnProperty(url)) { var documentStateItem = this._activeDocumentDataItemsMap[url]; offset = documentStateItem.offset; } return offset; }; PersistenceManager.prototype.isPrettyPrintEnabled = function (doc) { var docDisplayData = this.getDocumentDisplayData(doc.url, false); if (typeof docDisplayData.prettyPrintEnabled !== "boolean") { return false; } return docDisplayData.prettyPrintEnabled; }; PersistenceManager.prototype.isSourceMapEnabled = function (doc) { Tools.Utility.Assert.isTrue(!doc.rawDoc); var docDisplayData = this.getDocumentDisplayData(doc.url, false); if (typeof docDisplayData.sourceMapEnabled !== "boolean") { return true; } return docDisplayData.sourceMapEnabled; }; PersistenceManager.prototype.loadCollection = function (key) { return new Plugin.Promise(function (completed) { Plugin.Settings.get(key).done(function (result) { completed(result); }, function (error) { completed({}); }); }, null); }; PersistenceManager.prototype.isAlreadyOpen = function (url) { var openDocs = this._debuggerManager.documentController.getOpenDocs(); for (var i = 0; i < openDocs.length; i++) { if (Debugger.Doc.hasSameUrl(openDocs[i].url, url)) { return true; } } return false; }; PersistenceManager.prototype.fetchDebuggerData = function () { this._debuggerData = this._debuggerData || {}; this._debuggerData.watches = this.fetchWatchesData(); this._debuggerData.breakpoints = this.fetchBreakpointsData(); return this._debuggerData; }; PersistenceManager.prototype.fetchWatchesData = function () { var watches = this._debuggerManager.watchController.getWatches(); if (watches.length > 0) { var watchExpressions = []; for (var index = 0; index < watches.length; index++) { if (watches[index].isUserWatch) { watchExpressions.push({ expression: watches[index].watchName }); } } } return watchExpressions; }; PersistenceManager.prototype.fetchBreakpointsData = function () { var breakpoints = this._debuggerManager.breakpointController.getBreakpoints(); if (breakpoints.length > 0) { var breakPointsData = []; for (var index = 0; index < breakpoints.length; index++) { var breakpoint = breakpoints[index]; if (breakpoint.eventTypes) { breakPointsData.push({ url: null, displayUrl: null, condition: breakpoint.condition, oneBasedStartLine: null, oneBasedStartColumn: null, rawLocation: null, isEnabled: breakpoint.isEnabled, isTracepoint: breakpoint.isTracepoint, eventTypes: breakpoint.eventTypes }); } else { breakPointsData.push({ url: breakpoint.location.rawLocation.doc.url, displayUrl: breakpoint.location.startPosition.doc.url, condition: breakpoint.condition, oneBasedStartLine: breakpoint.location.startLineNumber, oneBasedStartColumn: breakpoint.location.startColumn, rawLocation: breakpoint.rawLocation, isEnabled: breakpoint.isEnabled, isTracepoint: breakpoint.isTracepoint, eventTypes: null }); } } } return breakPointsData; }; PersistenceManager.prototype.getDocumentDisplayData = function (url, addIfMissing) { if (typeof addIfMissing === "undefined") { addIfMissing = true; } url = url.toLowerCase(); var displayDataObject = this._documentDisplayDataItems[url]; if (!displayDataObject) { displayDataObject = { url: url }; if (addIfMissing) { this._documentDisplayDataItems[url] = displayDataObject; this._debuggerData.documentDisplayData.push(displayDataObject); if (this._debuggerData.documentDisplayData.length > PersistenceManager.MAX_PERSISTED_DOCUMENTS) { this._debuggerData.documentDisplayData.shift(); } } } return displayDataObject; }; PersistenceManager.DEBUGGER_DATA_KEY = "JavaScriptDebuggerData"; PersistenceManager.DEBUGGER_SETTINGS_KEY = "JavaScriptDebuggerSettings"; PersistenceManager.MAX_PERSISTED_DOCUMENTS = 100; return PersistenceManager; })(); Debugger.PersistenceManager = PersistenceManager; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // debuggerShell.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; (function (DataSplitterStates) { DataSplitterStates[DataSplitterStates["ShowBothContainers"] = 1] = "ShowBothContainers"; DataSplitterStates[DataSplitterStates["ShowTopContainer"] = 2] = "ShowTopContainer"; DataSplitterStates[DataSplitterStates["ShowBottomContainer"] = 3] = "ShowBottomContainer"; })(Debugger.DataSplitterStates || (Debugger.DataSplitterStates = {})); var DataSplitterStates = Debugger.DataSplitterStates; var DebuggerShell = (function () { function DebuggerShell() { var _this = this; this._vEditorSplitterRightPx = DebuggerShell.MIN_CONTROLS_WIDTH; this._hDataWindowsSplitterBottomPx = DebuggerShell.MIN_CONTROLS_HEIGHT; this._reportedToWatson = false; this._traceWriter = new Common.DefaultTraceWriter(); Plugin.addEventListener("pluginready", function () { Plugin.Tooltip.defaultTooltipContentToHTML = false; _this._traceWriter = new Common.TraceWriter(); }); Plugin.Promise.addEventListener("error", function (event) { if (isDebugBuild || !_this._reportedToWatson) { if (event && event.detail && event.detail.exception && (!event.detail.exception.ExceptionType || event.detail.exception.ExceptionType !== "UnexpectedResult")) { Common.ErrorHandling.reportErrorGivenStack(event.detail.exception); _this._reportedToWatson = true; } } }); Common.ToolWindowHelpers.registerErrorComponent("Debugger", this.onError.bind(this)); this._debuggerContent = document.getElementById("debuggerContent"); this._editorConsoleContainer = document.getElementById("editorConsoleContainer"); this._hEditorConsoleSplitter = document.getElementById("hEditorConsoleSplitter"); this._vEditorDataWindowsSplitter = document.getElementById("vEditorDataWindowsSplitter"); this._controlsSplitPane = document.getElementById("controlsSplitPane"); this._hDataWindowsSplitter = document.getElementById("hDataWindowsSplitter"); this._topDataWindowsParent = document.getElementById("topDataWindowsParent"); this._bottomDataWindowsParent = document.getElementById("bottomDataWindowsParent"); this._editor = document.getElementById("editor"); this._console = document.getElementById("console"); this._resizePane = document.getElementById("resizePane"); this._currentResizeClientRect = null; this._isShowingConsole = false; this.setupEditorDataWindowsSplitter(); this.setupEditorConsoleSplitter(); this.setupDataWindowsSplitter(); if (Plugin.F12) { Plugin.F12.addEventListener("consolestateshown", function () { return _this.onConsoleShowHideStateChanged(true); }); Plugin.F12.addEventListener("consolestatehidden", function () { return _this.onConsoleShowHideStateChanged(false); }); this._editorConsoleContainerMsGridRowsCSSUserSetting = Plugin.F12.getRegEntryForF12(DebuggerShell.H_EDITOR_CONSOLE_SPLITTER_REG_KEY); this.onConsoleShowHideStateChanged(Plugin.F12.getIsShowingConsole()); Plugin.F12.addEventListener("activated", this.setConsoleClientArea.bind(this)); } this._topContainer = new Container(this); this._topDataWindowsParent.appendChild(this._topContainer.containerElement); this._bottomContainer = new Container(this); this._bottomDataWindowsParent.appendChild(this._bottomContainer.containerElement); this._topContainer.addTab("Watches", "WatchesWindowTitle", "WatchesWindowTooltip"); this._bottomContainer.addTab("Callstack", "CallstackWindowTitle", "CallstackWindowTooltip"); this._bottomContainer.addTab("BreakpointWindow", "BreakpointsWindowTitle", "BreakpointsWindowTooltip", -1); document.querySelector("#root").setAttribute("aria-label", Plugin.Resources.getString("DebuggerTitle")); if (Plugin.F12) { Common.NavigationUtilities.registerNavigationFrames([ Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body, function () { return _this._debuggerToolbar.getActiveElement(); }), Common.NavigationUtilities.makeNavigationFrameFromCallback(this._topContainer.containerElement, function () { return _this._topContainer.tabs[_this._topContainer.activeIndex].titleElement; }), Common.NavigationUtilities.makeNavigationFrameFromCallback(this._bottomContainer.containerElement, function () { return _this._bottomContainer.tabs[_this._bottomContainer.activeIndex].titleElement; }) ]); Common.NavigationUtilities.registerFocusHandlers(Plugin.F12.PluginId.Debugger); } } Object.defineProperty(DebuggerShell.prototype, "editorWindow", { get: function () { return this._editorWindow; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerShell.prototype, "filePicker", { get: function () { return this._filePicker; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerShell.prototype, "tabControl", { get: function () { return this._tabControl; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerShell.prototype, "debuggerToolbar", { get: function () { return this._debuggerToolbar; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerShell.prototype, "callstackWindow", { get: function () { return this._callstackWindow; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerShell.prototype, "bottomContainer", { get: function () { return this._bottomContainer; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerShell.prototype, "debuggerManager", { get: function () { return this._debuggerManager; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerShell.prototype, "topContainer", { get: function () { return this._topContainer; }, enumerable: true, configurable: true }); Object.defineProperty(DebuggerShell.prototype, "traceWriter", { get: function () { return this._traceWriter; }, enumerable: true, configurable: true }); DebuggerShell.showErrorDisplay = function (resourceId, resourceParams, timeout, localizedHelpUrl) { if (typeof resourceParams === "undefined") { resourceParams = []; } if (typeof timeout === "undefined") { timeout = 0; } if (typeof localizedHelpUrl === "undefined") { localizedHelpUrl = ""; } DebuggerShell.LastErrorDisplayId = resourceId; var params = [resourceId].concat(resourceParams); var localizedMessage = Plugin.Resources.getString.apply(Plugin.Resources, params); var consoleAnchor = document.getElementById("hEditorConsoleSplitter"); Plugin.F12.ErrorDisplay.show(localizedMessage, timeout, localizedHelpUrl, consoleAnchor); }; DebuggerShell.closeErrorDisplay = function (resourceId) { if (resourceId === DebuggerShell.LastErrorDisplayId) { Plugin.F12.ErrorDisplay.close(); } }; DebuggerShell.prototype.initializeUI = function () { var _this = this; var rpcWrapper = new Debugger.RpcWrapper(); this._debuggerManager = new Debugger.DebuggerManager(rpcWrapper, this); this._editorWindow = new Debugger.EditorWindow(this._debuggerManager, this._debuggerManager.documentController, this._debuggerManager.breakpointController, this._debuggerManager.executionController, this._debuggerManager.callstackController, document.getElementById("editor"), function () { _this._debuggerManager.callstackController.registerListener(_this._editorWindow); _this._debuggerManager.breakpointController.registerListener(_this._editorWindow); _this._debuggerManager.executionController.registerListener(_this._editorWindow); _this._debuggerManager.documentController.registerListener(_this._editorWindow); rpcWrapper.onDebuggerLoadComplete(_this._debuggerManager); }); this._debuggerManager.documentController.editorWindow = this._editorWindow; this._debuggerToolbar = new Debugger.DebuggerToolbar(this._debuggerManager.executionController); this._editorWindow.searchProvider.initializeToolbarElements(); this._tabControl = new Debugger.TabControl(document.getElementById("tabControl"), this._debuggerManager.documentController); this._filePicker = new Debugger.FilePicker(document.getElementById("filePickerMenu"), document.getElementById("filePickerButton"), this); this._debuggerManager.documentController.registerListener(this._tabControl); this._debuggerManager.documentController.registerListener(this._filePicker); this._breakpointWindow = new Debugger.BreakpointWindow(this, this._debuggerManager.breakpointController, document.getElementById("BreakpointWindow")); this._debuggerManager.breakpointController.registerListener(this); this._debuggerManager.breakpointController.registerListener(this._breakpointWindow); this._callstackWindow = new Debugger.CallstackWindow(this._debuggerManager.callstackController, document.querySelector(".callstackwindow")); this._debuggerManager.callstackController.registerListener(this._callstackWindow); this._debuggerManager.documentController.registerListener(this._callstackWindow); this._debuggerManager.jmcController.registerListener(this._callstackWindow); this._watchWindowView = new Debugger.WatchWindowView(this._debuggerManager.watchController, document.querySelector(".gridWatchContainer")); this._debuggerManager.watchController.view = this._watchWindowView; this._debuggerManager.executionController.registerListener(this._callstackWindow); this._debuggerManager.executionController.registerListener(this); window.addEventListener("resize", this.setConsoleClientArea.bind(this)); document.addEventListener("keyup", this.onKeyUpOrDown.bind(this)); document.addEventListener("keydown", this.onKeyDown.bind(this)); if (Plugin.F12) { Plugin.F12.addEventListener("keydown", this.onKeyUpOrDown.bind(this)); } var isJMCEnabled = this.debuggerManager.jmcController.isJustMyCodeEnabled; this._callstackWindow.isJMCEnabled = isJMCEnabled; }; DebuggerShell.prototype.getConsoleTop = function () { if (this._isShowingConsole) { return this._console.getBoundingClientRect().top; } else { return document.body.offsetHeight; } }; DebuggerShell.prototype.getEditorDimensions = function () { var width = this._editorConsoleContainer.offsetWidth; var height = this._editorConsoleContainer.offsetHeight - this._console.offsetHeight; return { width: width, height: height }; }; DebuggerShell.prototype.breakpointChanged = function (breakpoint, previousId) { if (this._bottomContainer.contentVisible && !this._debuggerManager.executionController.isExecutionPaused) { this._bottomContainer.switchToTab(DebuggerShell.BREAKPOINTS_WINDOW_TAB_INDEX, true); } }; DebuggerShell.prototype.breakpointAdded = function (breakpoint) { this.breakpointChanged(breakpoint); }; DebuggerShell.prototype.breakpointRemoved = function (breakpoint) { this.breakpointChanged(breakpoint); }; DebuggerShell.prototype.conditionPromptInvoked = function (breakpoint) { }; DebuggerShell.prototype.tracepointPromptInvoked = function (breakpoint) { }; DebuggerShell.prototype.pendingBreakpointAdded = function (breakpoint) { }; DebuggerShell.prototype.breakStateChanged = function (isBroken, isDisabled) { if (isBroken) { if (!this._bottomContainer.contentVisible) { this.toggleDataSplitterOrientation(1 /* ShowBothContainers */); } this._bottomContainer.switchToTab(DebuggerShell.CALLSTACK_WINDOW_TAB_INDEX, true); } }; DebuggerShell.prototype.exceptionFilterChanged = function (filter) { }; DebuggerShell.prototype.breakCallComplete = function () { }; DebuggerShell.prototype.justMyCodeStateChanged = function (newValue) { }; DebuggerShell.prototype.toggleDataSplitterOrientation = function (targetDataSplitterState) { var rect = this._controlsSplitPane.getBoundingClientRect(); var state; if (targetDataSplitterState) { state = targetDataSplitterState; } else { if (this._topContainer.contentVisible && this._bottomContainer.contentVisible) { state = 2 /* ShowTopContainer */; } else if (this._topContainer.contentVisible && !this._bottomContainer.contentVisible) { state = 3 /* ShowBottomContainer */; } else if (!this._topContainer.contentVisible && this._bottomContainer.contentVisible) { state = 1 /* ShowBothContainers */; } else if (!this._topContainer.contentVisible && !this._bottomContainer.contentVisible) { Tools.Utility.Assert.fail("Invalid splitter state."); } } if (state === 2 /* ShowTopContainer */) { this._hDataWindowsSplitterBottomPx = DebuggerShell.MIN_CONTROLS_HEIGHT; this._controlsSplitPane.style.msGridRows = (rect.height - DebuggerShell.MIN_CONTROLS_HEIGHT) + "fr 5px " + this._hDataWindowsSplitterBottomPx + "fr"; this._topContainer.contentVisible = true; this._bottomContainer.contentVisible = false; } else if (state === 3 /* ShowBottomContainer */) { this._hDataWindowsSplitterBottomPx = rect.height - DebuggerShell.MIN_CONTROLS_HEIGHT; this._controlsSplitPane.style.msGridRows = DebuggerShell.MIN_CONTROLS_HEIGHT + "fr 5px " + this._hDataWindowsSplitterBottomPx + "fr"; this._topContainer.contentVisible = false; this._bottomContainer.contentVisible = true; } else if (state === 1 /* ShowBothContainers */) { var gridRowsValue = this._msGridRowsStyleBoth.split(" "); this._hDataWindowsSplitterBottomPx = parseInt(gridRowsValue[gridRowsValue.length - 1], 10); this._controlsSplitPane.style.msGridRows = this._msGridRowsStyleBoth; this._topContainer.contentVisible = true; this._bottomContainer.contentVisible = true; } Plugin.F12.setRegEntryForF12(DebuggerShell.H_DATA_WINDOWS_SPLITTER, "" + this._hDataWindowsSplitterBottomPx); this._debuggerManager.watchController.layout(); this._callstackWindow.layout(); }; DebuggerShell.prototype.layoutDocumentWindows = function () { this.editorWindow.doLayout(); this.filePicker.doLayout(); this.tabControl.doLayout(); if (Plugin.F12 && Plugin.F12.ErrorDisplay.isShown) { Plugin.F12.ErrorDisplay.resize(false); } }; DebuggerShell.prototype.onKeyDown = function (e) { if (e.ctrlKey && !e.altKey && !e.shiftKey) { if (e.keyCode === 9 /* Tab */) { this._tabControl.selectNextTab(); e.preventDefault(); return false; } } if (e.ctrlKey && !e.altKey && e.shiftKey) { if (e.keyCode === 9 /* Tab */) { this._tabControl.selectPreviousTab(); e.preventDefault(); return false; } var keyAsNumber = parseInt(e.key); if (!isNaN(keyAsNumber) && keyAsNumber >= 1 && keyAsNumber <= 9) { this._tabControl.trySelectTabByNumber(keyAsNumber); e.preventDefault(); return false; } } return true; }; DebuggerShell.prototype.onKeyUpOrDown = function (e) { if (e.ctrlKey && e.shiftKey && !e.altKey) { if (e.keyCode === 122 /* F11 */) { this._breakpointWindow.toggleAll(); return false; } else if (e.keyCode === 74 /* J */) { if (this._debuggerManager.jmcController.isJustMyCodeEnabled) { this._callstackWindow.showLibraryFrames = !this._callstackWindow.showLibraryFrames; } return false; } } if (e.ctrlKey && e.altKey && !e.shiftKey) { if (e.keyCode === 66 /* B */) { if (!this._bottomContainer.contentVisible) { this.toggleDataSplitterOrientation(1 /* ShowBothContainers */); } this._bottomContainer.switchToTab(DebuggerShell.BREAKPOINTS_WINDOW_TAB_INDEX); return false; } if (e.keyCode === 67 /* C */) { if (!this._bottomContainer.contentVisible) { this.toggleDataSplitterOrientation(1 /* ShowBothContainers */); } this._bottomContainer.switchToTab(DebuggerShell.CALLSTACK_WINDOW_TAB_INDEX); return false; } if (e.keyCode === 87 /* W */) { if (!this._topContainer.contentVisible) { this.toggleDataSplitterOrientation(1 /* ShowBothContainers */); } this._topContainer.switchToTab(DebuggerShell.WATCHES_WINDOW_TAB_INDEX); return false; } if (e.keyCode === 84 /* T */) { this.toggleDataSplitterOrientation(); return false; } } if (e.ctrlKey && !e.altKey && !e.shiftKey) { if (e.keyCode === 87 /* W */) { this._debuggerManager.watchController.addWatchByCurrentEditorPosition(); return false; } if (e.keyCode === 115 /* F4 */) { if (this._debuggerManager.documentController.currentDoc) { this._debuggerManager.documentController.closeDocument(this._debuggerManager.documentController.currentDoc, false); } return false; } } if (!e.ctrlKey && e.altKey && !e.shiftKey) { if (e.keyCode === 106 /* Multiply */) { if (this._debuggerManager.executionController.isExecutionPaused) { this._debuggerManager.callstackController.goToActiveFrame(); } return false; } } return true; }; DebuggerShell.prototype.setupDataWindowsSplitter = function () { var _this = this; this._msGridRowsStyleBoth = this._editorConsoleContainer.style.msGridRows; var eventsAreSetup = false; this._hDataWindowsSplitter.addEventListener("mousedown", function (ev) { if (!eventsAreSetup) { document.body.classList.add("splitterNS"); var mouseUpHandler = function (e) { _this._currentResizeClientRect = null; Plugin.F12.setRegEntryForF12(DebuggerShell.H_DATA_WINDOWS_SPLITTER, "" + _this._hDataWindowsSplitterBottomPx); document.body.classList.remove("splitterNS"); document.removeEventListener("mousemove", mouseMoveHandler, true); document.removeEventListener("mouseup", mouseUpHandler, true); _this._resizePane.classList.remove("showResizePane"); eventsAreSetup = false; }; var mouseMoveHandler = function (e) { if (!e.buttons) { mouseUpHandler(e); } else { if (_this._currentResizeClientRect === null) { _this._currentResizeClientRect = _this._controlsSplitPane.getBoundingClientRect(); } var rect = _this._currentResizeClientRect; var bottomPx = rect.height - e.clientY + rect.top; if ((e.clientY - rect.top) < DebuggerShell.MIN_CONTROLS_HEIGHT) { _this._hDataWindowsSplitterBottomPx = (rect.height - DebuggerShell.MIN_CONTROLS_HEIGHT); _this._controlsSplitPane.style.msGridRows = DebuggerShell.MIN_CONTROLS_HEIGHT + "fr 5px " + _this._hDataWindowsSplitterBottomPx + "fr"; _this._topContainer.contentVisible = false; _this._bottomContainer.contentVisible = true; } else if (bottomPx > DebuggerShell.MIN_CONTROLS_HEIGHT) { _this._hDataWindowsSplitterBottomPx = bottomPx; _this._controlsSplitPane.style.msGridRows = (e.clientY - rect.top) + "fr 5px " + _this._hDataWindowsSplitterBottomPx + "fr"; _this._msGridRowsStyleBoth = _this._controlsSplitPane.style.msGridRows; _this._topContainer.contentVisible = true; _this._bottomContainer.contentVisible = true; } else { _this._hDataWindowsSplitterBottomPx = DebuggerShell.MIN_CONTROLS_HEIGHT; _this._controlsSplitPane.style.msGridRows = (rect.height - DebuggerShell.MIN_CONTROLS_HEIGHT) + "fr 5px " + _this._hDataWindowsSplitterBottomPx + "fr"; _this._topContainer.contentVisible = true; _this._bottomContainer.contentVisible = false; } _this._debuggerManager.watchController.layout(); _this._callstackWindow.layout(); } }; document.addEventListener("mousemove", mouseMoveHandler, true); document.addEventListener("mouseup", mouseUpHandler, true); _this._resizePane.classList.add("showResizePane"); eventsAreSetup = true; } }); var splitterPosition = Plugin.F12.getRegEntryForF12(DebuggerShell.H_DATA_WINDOWS_SPLITTER); if (splitterPosition) { this._hDataWindowsSplitterBottomPx = parseInt(splitterPosition, 10); if (!isNaN(this._hDataWindowsSplitterBottomPx)) { this._controlsSplitPane.style.msGridRows = (this._debuggerContent.getBoundingClientRect().height - this._hDataWindowsSplitterBottomPx) + "fr 3px " + this._hDataWindowsSplitterBottomPx + "fr"; } } this._hDataWindowsSplitter.addEventListener("dblclick", this.toggleDataSplitterOrientation.bind(this)); }; DebuggerShell.prototype.setupEditorConsoleSplitter = function () { var _this = this; var eventsAreSetup = false; this._hEditorConsoleSplitter.addEventListener("mousedown", function (ev) { if (!eventsAreSetup) { document.body.classList.add("splitterNS"); var mouseUpHandler = function (e) { if (_this._isShowingConsole) { _this._editorConsoleContainerMsGridRowsCSSUserSetting = _this._editorConsoleContainer.style.msGridRows; Plugin.F12.setRegEntryForF12(DebuggerShell.H_EDITOR_CONSOLE_SPLITTER_REG_KEY, _this._editorConsoleContainerMsGridRowsCSSUserSetting); } _this._currentResizeClientRect = null; _this.layoutDocumentWindows(); _this.setConsoleClientArea(); document.body.classList.remove("splitterNS"); document.releaseCapture(); document.removeEventListener("mousemove", mouseMoveHandler, true); document.removeEventListener("mouseup", mouseUpHandler, true); _this._resizePane.classList.remove("showResizePane"); eventsAreSetup = false; }; var mouseMoveHandler = function (e) { if (!e.buttons) { mouseUpHandler(e); } else { if (_this._isShowingConsole) { if (_this._currentResizeClientRect === null) { _this._currentResizeClientRect = _this._editorConsoleContainer.getBoundingClientRect(); } var rect = _this._currentResizeClientRect; var bottomPx = rect.height - e.clientY + rect.top; if ((e.clientY - rect.top) < DebuggerShell.MIN_EDITOR_CONSOLE_HEIGHT) { _this._editorConsoleContainer.style.msGridRows = DebuggerShell.MIN_EDITOR_CONSOLE_HEIGHT + "fr 5px " + (rect.height - DebuggerShell.MIN_EDITOR_CONSOLE_HEIGHT) + "fr"; } else if (bottomPx > DebuggerShell.MIN_EDITOR_CONSOLE_HEIGHT) { _this._editorConsoleContainer.style.msGridRows = (e.clientY - rect.top) + "fr 5px " + bottomPx + "fr"; } else { _this._editorConsoleContainer.style.msGridRows = (rect.height - DebuggerShell.MIN_EDITOR_CONSOLE_HEIGHT) + "fr 5px " + DebuggerShell.MIN_EDITOR_CONSOLE_HEIGHT + "fr"; } _this.setConsoleClientArea(); _this.layoutDocumentWindows(); } } }; _this._hEditorConsoleSplitter.focus(); _this._hEditorConsoleSplitter.setCapture(false); document.addEventListener("mousemove", mouseMoveHandler, true); document.addEventListener("mouseup", mouseUpHandler, true); _this._resizePane.classList.add("showResizePane"); eventsAreSetup = true; } }); }; DebuggerShell.prototype.setupEditorDataWindowsSplitter = function () { var _this = this; var eventsAreSetup = false; this._vEditorDataWindowsSplitter.addEventListener("mousedown", function (ev) { if (!eventsAreSetup) { document.body.classList.add("splitterEW"); var mouseUpHandler = function (e) { _this._currentResizeClientRect = null; Plugin.F12.setRegEntryForF12(DebuggerShell.V_EDITOR_SPLITTER_REG_KEY, "" + _this._vEditorSplitterRightPx); _this.layoutDocumentWindows(); _this._debuggerManager.watchController.layout(); _this._callstackWindow.layout(); _this.setConsoleClientArea(); document.body.classList.remove("splitterEW"); document.releaseCapture(); document.removeEventListener("mousemove", mouseMoveHandler, true); document.removeEventListener("mouseup", mouseUpHandler, true); _this._resizePane.classList.remove("showResizePane"); eventsAreSetup = false; }; var mouseMoveHandler = function (e) { if (!e.buttons) { mouseUpHandler(e); } else { if (_this._currentResizeClientRect === null) { _this._currentResizeClientRect = _this._debuggerContent.getBoundingClientRect(); } var rect = _this._currentResizeClientRect; var rightPx = rect.width - e.clientX; if (rightPx > DebuggerShell.MIN_CONTROLS_WIDTH) { _this._debuggerContent.style.msGridColumns = e.clientX + "fr 3px " + rightPx + "fr"; _this._vEditorSplitterRightPx = rightPx; } else { _this._debuggerContent.style.msGridColumns = (rect.width - DebuggerShell.MIN_CONTROLS_WIDTH) + "fr 3px " + DebuggerShell.MIN_CONTROLS_WIDTH + "fr"; _this._vEditorSplitterRightPx = DebuggerShell.MIN_CONTROLS_WIDTH; } _this.setConsoleClientArea(); _this.layoutDocumentWindows(); _this._debuggerManager.watchController.layout(); _this._callstackWindow.layout(); } }; _this._vEditorDataWindowsSplitter.focus(); _this._vEditorDataWindowsSplitter.setCapture(false); document.addEventListener("mousemove", mouseMoveHandler, true); document.addEventListener("mouseup", mouseUpHandler, true); _this._resizePane.classList.add("showResizePane"); eventsAreSetup = true; } }); var splitterPosition = Plugin.F12.getRegEntryForF12(DebuggerShell.V_EDITOR_SPLITTER_REG_KEY); if (splitterPosition) { this._vEditorSplitterRightPx = parseInt(splitterPosition, 10); if (!isNaN(this._vEditorSplitterRightPx)) { this._debuggerContent.style.msGridColumns = (this._debuggerContent.getBoundingClientRect().width - this._vEditorSplitterRightPx) + "fr 3px " + this._vEditorSplitterRightPx + "fr"; } } }; DebuggerShell.prototype.onError = function (message, file, line, additionalInfo, column) { try { if (file) { var parts = file.split("/"); if (parts.length > 0) { file = parts[parts.length - 1]; } } var errorMessage = Common.ToolWindowHelpers.loadString("DebuggerScriptError") + "\r\n" + Common.ToolWindowHelpers.loadString("ScriptErrorMessage", [message]) + "\r\n" + Common.ToolWindowHelpers.loadString("ScriptErrorFile", [file]) + "\r\n" + Common.ToolWindowHelpers.loadString("ScriptErrorLine", [line]) + "," + column + "\r\n" + additionalInfo; alert(errorMessage); } catch (ex) { } }; DebuggerShell.prototype.onConsoleShowHideStateChanged = function (showing) { var _this = this; this._isShowingConsole = showing; if (this._isShowingConsole) { this._console.style.display = ""; this._hEditorConsoleSplitter.style.display = ""; if (this._editorConsoleContainerMsGridRowsCSSUserSetting) { this._editorConsoleContainer.style.msGridRows = this._editorConsoleContainerMsGridRowsCSSUserSetting; } else { this._editorConsoleContainer.style.msGridRows = DebuggerShell.EDITOR_CONSOLE_CONTAINER_MSGRIDROWS_CSS_DEFAULT; } window.setImmediate(function () { _this.setConsoleClientArea(); }); } else { this._editorConsoleContainer.style.msGridRows = DebuggerShell.EDITOR_CONSOLE_CONTAINER_MSGRIDROWS_CSS_HIDDEN; this._console.style.display = "none"; this._hEditorConsoleSplitter.style.display = "none"; if (this._debuggerManager && this._debuggerManager.watchController) { this._debuggerManager.watchController.intellisenseContext.intellisenseMenu.forbiddenBottomLeftRect = null; } } if (this._debuggerManager) { this.layoutDocumentWindows(); } }; DebuggerShell.prototype.setConsoleClientArea = function () { if (this._isShowingConsole && Plugin.F12) { var rect = this._console.getBoundingClientRect(); if (this._debuggerManager && this._debuggerManager.watchController) { this._debuggerManager.watchController.intellisenseContext.intellisenseMenu.forbiddenBottomLeftRect = rect; } Plugin.F12.setConsoleClientArea(rect.left, rect.top, rect.right, rect.bottom); } }; DebuggerShell.MIN_EDITOR_CONSOLE_HEIGHT = 120; DebuggerShell.EDITOR_CONSOLE_CONTAINER_MSGRIDROWS_CSS_DEFAULT = "3fr 5px 200px"; DebuggerShell.EDITOR_CONSOLE_CONTAINER_MSGRIDROWS_CSS_HIDDEN = "1fr 0fr 0fr"; DebuggerShell.MIN_CONTROLS_WIDTH = 260; DebuggerShell.MIN_CONTROLS_HEIGHT = 25; DebuggerShell.H_EDITOR_CONSOLE_SPLITTER_REG_KEY = "DebuggerHEditorConsoleSplitterPosition"; DebuggerShell.V_EDITOR_SPLITTER_REG_KEY = "DebuggerVEditorSplitterPosition"; DebuggerShell.H_DATA_WINDOWS_SPLITTER = "DebuggerHDataWindowsSplitterPosition"; DebuggerShell.WATCHES_WINDOW_TAB_INDEX = 0; DebuggerShell.CALLSTACK_WINDOW_TAB_INDEX = 0; DebuggerShell.BREAKPOINTS_WINDOW_TAB_INDEX = 1; return DebuggerShell; })(); Debugger.DebuggerShell = DebuggerShell; var Container = (function () { function Container(shell) { this.tabs = []; this.activeIndex = -1; this.containerElement = document.createElement("div"); this.tabStrip = document.createElement("div"); this.tabStrip.className = "tabStrip"; this.tabStrip.setAttribute("role", "tablist"); this.containerElement.className = "controlsContainer"; this.containerElement.appendChild(this.tabStrip); this.contentPane = document.createElement("div"); this.contentPane.className = "contentPane"; this.containerElement.appendChild(this.contentPane); this.contentVisible = true; this._shell = shell; } Container.prototype.addTab = function (id, titleResourceId, tooltipResourceId, tabIndex) { var _this = this; var title = Plugin.Resources.getString(titleResourceId); var tooltip = Plugin.Resources.getString(tooltipResourceId); var titleElement = document.createElement("span"); titleElement.id = "tab-" + id; titleElement.className = "tabTitle"; titleElement.innerText = title; titleElement.tabIndex = tabIndex ? tabIndex : 1; titleElement.setAttribute("data-plugin-vs-tooltip", tooltip); titleElement.setAttribute("aria-label", tooltip); titleElement.setAttribute("role", "tab"); var index = this.tabs.length; var selectHandler = function (e) { _this.switchToTab(index); if (!_this.contentVisible) { _this.contentVisible = true; _this._shell.toggleDataSplitterOrientation(1 /* ShowBothContainers */); } }; titleElement.addEventListener("click", selectHandler); titleElement.addEventListener("focus", selectHandler); titleElement.addEventListener("keydown", function (e) { if (e.keyCode === 32 /* Space */ || e.keyCode === 13 /* Enter */) { _this.switchToTab(index); if (!_this.contentVisible) { _this.contentVisible = true; _this._shell.toggleDataSplitterOrientation(1 /* ShowBothContainers */); } } else if (e.keyCode === 37 /* ArrowLeft */) { if (index > 0) { _this.switchToTab(index - 1); } else if (index === 0) { _this.switchToTab(_this.tabs.length - 1); } } else if (e.keyCode === 39 /* ArrowRight */) { if (index < _this.tabs.length - 1) { _this.switchToTab(index + 1); } else if (index === _this.tabs.length - 1) { _this.switchToTab(0); } } }); this.tabStrip.appendChild(titleElement); var controlContents = document.getElementById(id); controlContents.classList.add("controlContents"); this.contentPane.appendChild(controlContents); this.tabs.push({ titleElement: titleElement, contentElement: controlContents }); if (this.activeIndex === -1) { this.activeIndex = 0; this.tabs[this.activeIndex].contentElement.classList.add("controlVisible"); this.tabs[this.activeIndex].titleElement.classList.add("selected"); } }; Container.prototype.switchToTab = function (index, retainFocus) { if (this.tabs[index]) { if (this.activeIndex !== index) { this.tabs[this.activeIndex].contentElement.classList.remove("controlVisible"); this.tabs[this.activeIndex].titleElement.classList.remove("selected"); this.tabs[this.activeIndex].titleElement.tabIndex = -1; this.activeIndex = index; this.tabs[this.activeIndex].contentElement.classList.add("controlVisible"); this.tabs[this.activeIndex].titleElement.classList.add("selected"); this.tabs[this.activeIndex].titleElement.tabIndex = 1; Common.ToolWindowHelpers.fireCustomEvent(this.tabs[this.activeIndex].contentElement, "tabActivated"); } if (!retainFocus) { this.tabs[this.activeIndex].titleElement.focus(); } } }; return Container; })(); Debugger.Container = Container; Debugger.debuggerTraceWriter; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var debuggerShellForTestContractsOnly; // App.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DebuggerApp = (function (_super) { __extends(DebuggerApp, _super); function DebuggerApp() { _super.apply(this, arguments); } DebuggerApp.prototype.onStartup = function () { var debuggerShell = new Debugger.DebuggerShell(); debuggerShellForTestContractsOnly = debuggerShell; F12.Tools.Debugger.debuggerTraceWriter = debuggerShellForTestContractsOnly; debuggerShell.initializeUI(); }; return DebuggerApp; })(Common.App); Debugger.App = new DebuggerApp(); })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // FilePickerItem.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var FilePickerItem = (function (_super) { __extends(FilePickerItem, _super); function FilePickerItem(doc, isDynamicFolder) { var _this = this; _super.call(this, null, false, false, false, null, "listview-grid-cell-clicksection"); Tools.Utility.Assert.hasValue(doc, "FilePickerItem doc is required"); this._doc = doc; this._childCount = 0; this._displayName = Common.ToolWindowHelpers.createShortenedUrlText(this._doc.url); this._unsortedChildren = []; this.isDynamicFolder = !!isDynamicFolder; if (!this.isDynamicFolder && !this._doc.isUnnamedDynamicDoc) { var jmcButton = { buttonClass: "libraryIcon", checkedTooltip: "FilePickerMyCodeTooltip", uncheckedTooltip: "FilePickerLibraryCodeTooltip", clickHandler: function () { _this.isLibraryFile = !_this.isLibraryFile; }, isEnabled: true, isChecked: this.isLibraryFile }; this.buttonItems = [jmcButton]; } } Object.defineProperty(FilePickerItem.prototype, "isLibraryFile", { get: function () { return this._doc.isLibraryFile; }, set: function (value) { this._doc.setIsLibraryFile(value); }, enumerable: true, configurable: true }); Object.defineProperty(FilePickerItem.prototype, "doc", { get: function () { return this._doc; }, enumerable: true, configurable: true }); Object.defineProperty(FilePickerItem.prototype, "displayName", { get: function () { return this._displayName; }, enumerable: true, configurable: true }); Object.defineProperty(FilePickerItem.prototype, "hasChildren", { get: function () { return this._childCount > 0 || (this.dynamicDocumentsNode && this.dynamicDocumentsNode.hasChildren); }, enumerable: true, configurable: true }); Object.defineProperty(FilePickerItem.prototype, "htmlLines", { get: function () { if (!this._htmlLines) { this._htmlLines = this.generateHtmlLines(); } return this._htmlLines; }, enumerable: true, configurable: true }); Object.defineProperty(FilePickerItem.prototype, "children", { get: function () { this.ensureChildrenSorted(); if (this.dynamicDocumentsNode) { return this._sortedChildren.concat([this.dynamicDocumentsNode]); } return this._sortedChildren; }, enumerable: true, configurable: true }); Object.defineProperty(FilePickerItem.prototype, "childCount", { get: function () { if (this.dynamicDocumentsNode) { return this._childCount + 1; } return this._childCount; }, enumerable: true, configurable: true }); FilePickerItem.prototype.addChild = function (item) { if (FilePickerItem.isNumber(item.doc.frontendId)) { this._unsortedChildren[item.doc.frontendId] = item; ++this._childCount; this._sortedChildren = null; } }; FilePickerItem.prototype.removeChild = function (item) { if (FilePickerItem.isNumber(item.doc.frontendId)) { delete this._unsortedChildren[item.doc.frontendId]; --this._childCount; this._sortedChildren = null; } }; FilePickerItem.prototype.getChildren = function (proxy, onComplete) { onComplete(this.children); }; FilePickerItem.prototype.refresh = function () { this._displayName = Common.ToolWindowHelpers.createShortenedUrlText(this._doc.url); this._htmlLines = null; }; FilePickerItem.isNumber = function (value) { return typeof value === "number" && !isNaN(value); }; FilePickerItem.prototype.ensureChildrenSorted = function () { if (!this._sortedChildren) { this._sortedChildren = new Array(this._childCount); var i = 0; for (var j in this._unsortedChildren) { this._sortedChildren[i] = this._unsortedChildren[j]; i++; } this._sortedChildren.sort(function (a, b) { return Common.ToolWindowHelpers.naturalSort(a._displayName + a.doc.frontendId, b._displayName + b.doc.frontendId); }); } }; FilePickerItem.prototype.generateHtmlLines = function () { var cssClass = null; var mimeTypeCandidates = this._doc.getMimeTypeCandidates().split(","); for (var index = 0; index < mimeTypeCandidates.length && !cssClass; index++) { switch (mimeTypeCandidates[index]) { case "text/html": case "text/xml": cssClass = "htmlFile"; break; case "text/css": cssClass = "cssFile"; break; case "text/typescript": cssClass = "tsFile"; break; case FilePickerItem.DYNAMIC_SCRIPTS: cssClass = "filesNode"; break; case "text/javascript": cssClass = "scriptFile"; break; default: break; } ; } if (!cssClass) { cssClass = "scriptFile"; } return ["
        " + Common.EncodingUtilities.escapeHtml(this._displayName) + "
        " + (this._doc.isLibraryFile ? ", " + Plugin.Resources.getString("CallstackLibraryCode") + "" : "")]; }; FilePickerItem.DYNAMIC_SCRIPTS = "custom/dynamicScript"; FilePickerItem.JMC_BUTTON_INDEX = 0; return FilePickerItem; })(Common.ObjectView.TreeViewItem); Debugger.FilePickerItem = FilePickerItem; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // NumberMultiMap.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var NumberMultiMap = (function () { function NumberMultiMap() { this._internalMap = {}; this._valueToKey = []; } NumberMultiMap.prototype.getFirstValue = function (key) { var list = this._internalMap[key]; if (list && list.length > 0) { return list[0]; } return null; }; NumberMultiMap.prototype.getValues = function (key) { return this._internalMap[key] || []; }; NumberMultiMap.prototype.add = function (key, value) { this._internalMap[key] = this._internalMap[key] || []; if (this._internalMap[key].indexOf(value) === -1) { this._internalMap[key].push(value); } this._valueToKey[value] = key; }; NumberMultiMap.prototype.remove = function (value) { var key = this._valueToKey[value]; var list = this._internalMap[key]; if (list) { var index = list.indexOf(value); if (index >= 0) { list.splice(index, 1); delete this._valueToKey[value]; return true; } } return false; }; return NumberMultiMap; })(); Debugger.NumberMultiMap = NumberMultiMap; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // DynamicLocation.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DynamicLocation = (function () { function DynamicLocation(rawDocumentLocation, fallbackLocation) { var _this = this; this.propertyChanged = new Common.EventSource(); this.changesCompleted = new Common.EventSource(); this._rawLocation = rawDocumentLocation; this._fallbackLocation = fallbackLocation; this._displayDocPropertyChangeRegistrations = []; if (rawDocumentLocation.doc) { this._displayPositions = [ this._rawLocation.doc.getDisplayPosition(this._rawLocation.offset), this._rawLocation.doc.getDisplayPosition(this._rawLocation.offset + this._rawLocation.length)]; this._rawDocLocationsInvalidatedRegistration = this._rawLocation.doc.locationsInvalidated.addHandler(function () { return _this.onRawDocumentLocationsInvalidated(); }); } else { this._displayPositions = []; } if (fallbackLocation) { this._displayPositions[0] = this._displayPositions[0] || fallbackLocation.startPosition; this._displayPositions[1] = this._displayPositions[1] || fallbackLocation.endPosition; } } Object.defineProperty(DynamicLocation.prototype, "rawLocation", { get: function () { return this._rawLocation; }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "startPosition", { get: function () { return this._displayPositions[0]; }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "startDisplayText", { get: function () { return Debugger.DocumentLocation.getPositionDisplayText(this._displayPositions[0]); }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "endPosition", { get: function () { return this._displayPositions[1]; }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "endDisplayText", { get: function () { return Debugger.DocumentLocation.getPositionDisplayText(this._displayPositions[1]); }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "lineNumber", { get: function () { return this._displayPositions[0].line; }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "column", { get: function () { return this._displayPositions[0].column; }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "startLineNumber", { get: function () { return this.lineNumber; }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "startColumn", { get: function () { return this.column; }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "endLineNumber", { get: function () { return this._displayPositions[1].line; }, enumerable: true, configurable: true }); Object.defineProperty(DynamicLocation.prototype, "endColumn", { get: function () { return this._displayPositions[1].column; }, enumerable: true, configurable: true }); DynamicLocation.prototype.copy = function () { return new DynamicLocation(this._rawLocation, this._fallbackLocation); }; DynamicLocation.prototype.cleanup = function () { if (this._rawDocLocationsInvalidatedRegistration) { this._rawDocLocationsInvalidatedRegistration.unregister(); this._rawDocLocationsInvalidatedRegistration = null; } for (var i = 0; i < 2; i++) { if (this._displayDocPropertyChangeRegistrations[i]) { this._displayDocPropertyChangeRegistrations[i].unregister(); this._displayDocPropertyChangeRegistrations[i] = null; } this._displayPositions[i] = null; } this._rawLocation = null; }; DynamicLocation.prototype.onRawDocumentLocationsInvalidated = function () { var _this = this; this.updateDisplayPosition(0, this.rawLocation.offset, function (propertyName) { return _this.onDisplayDocumentPropertyChanged(propertyName, 0); }); this.updateDisplayPosition(1, this.rawLocation.offset + this.rawLocation.length, function (propertyName) { return _this.onDisplayDocumentPropertyChanged(propertyName, 1); }); this.changesCompleted.invoke(); }; DynamicLocation.prototype.updateDisplayPosition = function (index, rawOffset, displayDocPropertyChanged) { var oldDisplayPosition = this._displayPositions[index]; var newDisplayPosition = this.rawLocation.doc.getDisplayPosition(rawOffset); if (!this.arePositionsEqual(oldDisplayPosition, newDisplayPosition)) { if (this._displayDocPropertyChangeRegistrations[index]) { this._displayDocPropertyChangeRegistrations[index].unregister(); this._displayDocPropertyChangeRegistrations[index] = null; } this._displayPositions[index] = newDisplayPosition; if (newDisplayPosition && newDisplayPosition.doc) { this._displayDocPropertyChangeRegistrations[index] = newDisplayPosition.doc.propertyChanged.addHandler(displayDocPropertyChanged); } if (index === 0) { this.propertyChanged.invoke("startDisplayPosition"); this.propertyChanged.invoke("startDisplayText"); return; } else if (index === 1) { this.propertyChanged.invoke("endDisplayPosition"); this.propertyChanged.invoke("endDisplayText"); return; } else { Tools.Utility.Assert.fail("updateDisplayPosition propertyPrefix must be 'start' or 'end'."); } } }; DynamicLocation.prototype.onDisplayDocumentPropertyChanged = function (propertyName, index) { if (propertyName === "url") { if (index === 0) { this.propertyChanged.invoke("startDisplayText"); } else if (index === 1) { this.propertyChanged.invoke("endDisplayText"); } else { Tools.Utility.Assert.fail("onDisplayDocumentPropertyChanged prefix must be 'start' or 'end'."); } } }; DynamicLocation.prototype.arePositionsEqual = function (position1, position2) { if (!position1 && !position2) { return true; } else if (!position1 || !position2) { return false; } else { return position1.doc === position2.doc && position1.line === position2.line && position1.column === position2.column; } }; return DynamicLocation; })(); Debugger.DynamicLocation = DynamicLocation; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // IDocumentLocation.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // SourceMap.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourceMap = (function () { function SourceMap(urlRootOfSourcemapFile, rawDoc, debuggerManager) { this.propertyChanged = new Common.EventSource(); this._urlRootOfSourcemapFile = urlRootOfSourcemapFile; this._rawDoc = rawDoc; this._debuggerManager = debuggerManager; this._sourceMapEnabled = 1 /* Off */; if (!SourceMap.ParseWorker) { SourceMap.SourceMaps = []; SourceMap.ParseWorker = new Worker("formatter/SourceMapParserWorker.js"); SourceMap.ParseWorker.onmessage = function (e) { if (e.data && e.data.id) { var sourceMap = SourceMap.SourceMaps[e.data.id]; sourceMap.onWorkerMessage(e); } }; } } Object.defineProperty(SourceMap.prototype, "sourceMapState", { get: function () { if (!this.isValid) { return 2 /* Disabled */; } return this._sourceMapEnabled; }, set: function (value) { if (value !== this._sourceMapEnabled && this._sourceMapEnabled !== 2 /* Disabled */ && (value === 2 /* Disabled */ || !this._debuggerManager.documentController.isInSourceMapSwitch)) { this._sourceMapEnabled = value; this.propertyChanged.invoke("sourceMapState"); } }, enumerable: true, configurable: true }); Object.defineProperty(SourceMap.prototype, "isValid", { get: function () { return this._sourcemapMappings && this._sourcemapMappings.isValid && this._sourcemapMappings.isValid(); }, enumerable: true, configurable: true }); Object.defineProperty(SourceMap.prototype, "sources", { get: function () { return this._sources; }, enumerable: true, configurable: true }); Object.defineProperty(SourceMap.prototype, "sourceMapUrl", { get: function () { return this._sourceMapUrl; }, enumerable: true, configurable: true }); SourceMap.isErrorReportingEnabled = function () { if (typeof SourceMap.ErrorReportingEnabled === "boolean") { return SourceMap.ErrorReportingEnabled; } SourceMap.ErrorReportingEnabled = Plugin.F12.getRegEntryForF12(SourceMap.SHOW_ERRORS_REG_KEY).toLowerCase() === "true"; return SourceMap.ErrorReportingEnabled; }; SourceMap.prototype.getMimeType = function (doc) { var index = this._sources.indexOf(doc); Tools.Utility.Assert.isTrue(index >= 0 && index < this._sources.length); return this._sourcesLanguage && this._sourcesLanguage[index]; }; SourceMap.prototype.loadSourceMapContent = function (sourceMapContent) { var _this = this; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(367 /* Debugger_SourceMap_ParseSourceMapAsync_Start */); var sourceMapPromise; if (window.LiveUnit) { sourceMapPromise = this.loadSourceMapsLocally(sourceMapContent); } else { sourceMapPromise = this.loadSourceMapsOnWorkerThread(sourceMapContent); } return Plugin.Promise.join([sourceMapPromise, this._rawDoc.getText()]).then(function () { if (_this.isValid) { var prevSourceMapEnabled = _this._sourceMapEnabled; _this.sourceMapState = _this._debuggerManager.persistenceManager.isSourceMapEnabled(_this._rawDoc) ? 0 /* On */ : 1 /* Off */; if (prevSourceMapEnabled === _this.sourceMapState) { _this.propertyChanged.invoke("sourceMapState"); } } }); }; SourceMap.prototype.getOriginalSourceLocation = function (position) { return this._sourcemapMappings.getOriginalPosition(position); }; SourceMap.prototype.getGeneratedFileLocation = function (position) { return this._sourcemapMappings.getGeneratedPosition(new FormatService.Position(position.line, position.column, position.file)); }; SourceMap.prototype.loadFromUrl = function (sourceMapUrl) { var _this = this; if (sourceMapUrl) { this._sourceMapUrl = sourceMapUrl; return this._debuggerManager.downloadUrl(sourceMapUrl).then(function (result) { if (result.success) { return _this.loadSourceMapContent(result.content); } else if (SourceMap.isErrorReportingEnabled()) { Debugger.DebuggerShell.showErrorDisplay("SourceMapNoMapFile", [_this._rawDoc.url, sourceMapUrl]); } }); } return Plugin.Promise.wrap(false); }; SourceMap.prototype.onWorkerMessage = function (e) { delete SourceMap.SourceMaps[this._rawDoc.frontendId]; if (e.data) { var result = e.data; if (typeof result.version !== "number" || result.version !== 3) { if (SourceMap.isErrorReportingEnabled()) { if (typeof result.version !== "number") { Debugger.DebuggerShell.showErrorDisplay("SourceMapInvalidJSON", [this._sourceMapUrl]); } else { Debugger.DebuggerShell.showErrorDisplay("SourceMapInvalidVersion", [this._sourceMapUrl, result.version]); } } this._sourceMapProcessingCompleted(); this._sourceMapProcessingCompleted = null; return; } var sourcemapMappingArray = result.sourcemapMappings; var urls = result.urls; if (sourcemapMappingArray && sourcemapMappingArray.length > 0 && urls && urls.length > 0) { this._sourcesContent = result.sourcesContent; this.onSourceMapLoadComplete(new FormatService.SourcemapMappings(sourcemapMappingArray, urls), result.sourcesLanguage, result.sourceRoot); } else if (SourceMap.isErrorReportingEnabled()) { Debugger.DebuggerShell.showErrorDisplay("SourceMapInvalidJSON", [this._sourceMapUrl]); } } this._sourceMapProcessingCompleted(); this._sourceMapProcessingCompleted = null; }; SourceMap.prototype.onSourceMapLoadComplete = function (mappings, sourcesLanguage, sourceRoot) { this._sourcemapMappings = mappings; this._sourcesLanguage = sourcesLanguage; sourceRoot = this.getAbsoluteSourceRootPath(sourceRoot); var sources = []; for (var i = 0; i < mappings.urls.length; i++) { var url = mappings.urls[i]; var content = this._sourcesContent && this._sourcesContent[i]; if (!content && !Common.ToolWindowHelpers.isAbsoluteUrl(url) && sourceRoot) { url = Common.ToolWindowHelpers.pathCombine(sourceRoot, url); } var url = Debugger.UrlRewriter.rewriteAuthoredSourceUrl(url); sources.push(new Debugger.Doc({ id: undefined, parentId: undefined, isRootChild: this._rawDoc.isRootChild, url: url, mimeType: null, length: 0, isDynamicCode: false, headers: null }, { parent: this._rawDoc.parent, rawDoc: this._rawDoc, sourceIndex: i, sourceContent: content }, this._debuggerManager)); } this._sources = sources; Debugger.debuggerTraceWriter.traceWriter.raiseEvent(368 /* Debugger_SourceMap_ParseSourceMapAsync_Stop */); }; SourceMap.prototype.loadSourceMapsLocally = function (sourceMapContent) { var sourceMap, sourcemapMappings; sourceMap = FormatService.SourcemapParser.parseMapContent(sourceMapContent); if (sourceMap) { if (typeof (sourceMap.version) !== "number" || sourceMap.version !== 3) { return Plugin.Promise.wrap(null); } this._sourcesContent = sourceMap.sourcesContent; this.onSourceMapLoadComplete(new FormatService.SourcemapMappings(FormatService.SourcemapParser.calculateMappings(sourceMap), sourceMap.sources), sourceMap.x_sourcesLanguage, sourceMap.sourceRoot); } return Plugin.Promise.wrap(null); }; SourceMap.prototype.loadSourceMapsOnWorkerThread = function (sourceMapContent) { var _this = this; return new Plugin.Promise(function (completed, error) { _this._sourceMapProcessingCompleted = completed; SourceMap.SourceMaps[_this._rawDoc.frontendId] = _this; SourceMap.ParseWorker.postMessage({ content: sourceMapContent, id: _this._rawDoc.frontendId }); }); }; SourceMap.prototype.getAbsoluteSourceRootPath = function (sourceRoot) { sourceRoot = Common.ToolWindowHelpers.pathCombine(this._urlRootOfSourcemapFile, sourceRoot); return Common.ToolWindowHelpers.addFileProtocolIfNeeded(sourceRoot); }; SourceMap.SHOW_ERRORS_REG_KEY = "DebuggerShowSourceMapErrors"; return SourceMap; })(); FormatService.SourceMap = SourceMap; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // Doc.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var Doc = (function () { function Doc(source, info, debuggerManager) { var _this = this; this.propertyChanged = new Common.EventSource(); this.locationsInvalidated = new Common.EventSource(); info = info || {}; this._frontendId = Doc.NextFrontendId; Doc.NextFrontendId++; this._runtimeParent = info.parent; this._runtimeId = source.id; this._isRootChild = source.isRootChild; this._url = source.url || ""; this.mimeType = source.mimeType; this._isDynamicCode = (info.rawDoc && info.rawDoc.isDynamicCode) || source.isDynamicCode; this._headers = source.headers; this._length = source.length || 0; this._rawDoc = info.rawDoc; this._sourceIndex = info.sourceIndex; this._isRuntimeDocument = (typeof this._runtimeId === "number" && this._runtimeId >= 0); this.longDocumentId = source.longDocumentId; this._debuggerManager = debuggerManager; this._documentController = debuggerManager && debuggerManager.documentController; this._persistenceManager = debuggerManager && debuggerManager.persistenceManager; this._formatter = null; this._formattingPromise = null; this._timerId = null; this._timerPromise = Plugin.Promise.wrap(null); this._currentTextIsOutdated = true; this._isLibraryFile = false; this._prettyPrintEnabled = false; if (info.sourceContent) { this.setUnformattedText(info.sourceContent, false); } if (this._isDynamicCode && source.sourceUrlOverride) { this._originalDynamicName = this._url; this._url = source.sourceUrlOverride; } source.sourceMapUrl = Debugger.UrlRewriter.rewriteSourceMapUrl(source.sourceMapUrl); this.loadSourceMapFromUrl(source.sourceMapUrl); if (this.rawDoc) { this._isRuntimeDocument = this.rawDoc.isRuntimeDoc; this._sourceMapChangeRegistration = this.rawDoc.sourceMap && this.rawDoc.sourceMap.propertyChanged.addHandler(function (propertyName) { if (propertyName === "sourceMapState") { _this.fireSourceMapStateChanged(); } }); } } Object.defineProperty(Doc.prototype, "rawDoc", { get: function () { return this._rawDoc; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "sourceMap", { get: function () { return this._sourceMap; }, set: function (value) { var _this = this; if (this._sourceMap !== value) { var oldSourceMapState = this.sourceMapState; if (this._sourceMap) { this._sourceMapChangeRegistration.unregister(); } this._sourceMap = value; if (this._sourceMap) { this._sourceMapChangeRegistration = this._sourceMap.propertyChanged.addHandler(function (propertyName) { if (propertyName === "sourceMapState") { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(365 /* Debugger_SourceMap_ToggleSourceMap_Start */); _this.fireSourceMapStateChanged().then(function () { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(366 /* Debugger_SourceMap_ToggleSourceMap_Stop */); }); } }); } if (this.sourceMapState !== oldSourceMapState) { this.fireSourceMapStateChanged(); } } }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "isAuthored", { get: function () { return !!this._rawDoc; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "sourceMapState", { get: function () { if (this.rawDoc) { return this.rawDoc.sourceMap.sourceMapState; } else if (!this.sourceMap) { return 2 /* Disabled */; } else { return this.sourceMap.sourceMapState; } }, set: function (value) { if (this.rawDoc) { this.rawDoc.sourceMap.sourceMapState = value; } else if (this.sourceMap) { this.sourceMap.sourceMapState = value; } }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "runtimeId", { get: function () { return this._runtimeId; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "isRootChild", { get: function () { return this._isRootChild; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "url", { get: function () { return this._url; }, set: function (value) { if (this._url !== value) { this._url = value; this.propertyChanged.invoke("url"); } }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "isDynamicCode", { get: function () { return this._isDynamicCode; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "originalDynamicName", { get: function () { return this._originalDynamicName; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "isUnnamedDynamicDoc", { get: function () { return (this._isDynamicCode && !this._originalDynamicName); }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "editorState", { get: function () { return this._editorState; }, set: function (value) { this._editorState = value; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "isOpen", { get: function () { return this._isOpen; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "frontendId", { get: function () { return this._frontendId; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "parent", { get: function () { if (this._runtimeParent && this._runtimeParent.sourceMapState === 0 /* On */ && this._runtimeParent.sourceMap && this._runtimeParent.sourceMap.sources && this._runtimeParent.sourceMap.sources.length > 0) { return this._runtimeParent.sourceMap.sources[0]; } return this._runtimeParent; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "isLibraryFile", { get: function () { if (this._debuggerManager) { var doc = this.rawDoc || this; var type = this._debuggerManager.jmcController.getJMCTypeForUrl(doc.url); return (type !== Plugin.F12.JMCType.UserCode && type !== Plugin.F12.JMCType.Unsure); } else { return false; } }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "isRuntimeDoc", { get: function () { return this._isRuntimeDocument; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "canFormat", { get: function () { return this._formatter && this._formatter.canFormat && !this.isAuthored && this.isRuntimeDoc; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "prettyPrintState", { get: function () { if (!this.canFormat) { return 2 /* Disabled */; } return (this._prettyPrintEnabled ? 0 /* On */ : 1 /* Off */); }, set: function (value) { if (this.canFormat && value !== this.prettyPrintState) { if (value === 0 /* On */) { this._prettyPrintEnabled = true; this._formatter.options.prettyPrint = true; this.doFormatting(); } else { this._prettyPrintEnabled = false; this._formatter.options.prettyPrint = false; this.updateCurrentTextMapping(); } this.propertyChanged.invoke("prettyPrintState"); } }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "prettyPrintEnabled", { get: function () { return this._prettyPrintEnabled; }, enumerable: true, configurable: true }); Object.defineProperty(Doc.prototype, "hasText", { get: function () { return !!this._unformattedTextMapping; }, enumerable: true, configurable: true }); Doc.hasSameUrl = function (urlA, urlB) { return urlA.toLowerCase() === urlB.toLowerCase(); }; Doc.initialize = function () { Doc.SourceMapFileDialogOptions = { extensions: ["map"], extensionsIndex: 0, initialDirectory: "", name: "", title: "" }; Doc.SourceMapFileOptions = { access: 1 /* read */, encoding: "UTF-8", mode: 3 /* open */, share: 3 /* readWrite */, type: 1 /* text */ }; }; Doc.prototype.setIsLibraryFile = function (value) { var doc = this.rawDoc || this; if (!doc.isUnnamedDynamicDoc && doc.isRuntimeDoc) { if (this._debuggerManager) { var type = (value ? Plugin.F12.JMCType.Library : Plugin.F12.JMCType.UserCode); return this._debuggerManager.jmcController.setJMCTypeForUrl(doc.url, type); } } return Plugin.Promise.wrap(false); }; Doc.prototype.open = function (location, activation) { if (typeof activation === "undefined") { activation = 2 /* SwitchWithFocus */; } if (!this._isOpen) { this._isOpen = true; this.propertyChanged.invoke("isOpen"); } return this._documentController.onDocOpened(this, location, activation); }; Doc.prototype.close = function (isRuntimeTriggered) { if (this.isOpen) { this._isOpen = false; this.propertyChanged.invoke("isOpen"); } this.cancelPendingActions(); if (this.isRuntimeDoc && !this.isAuthored) { this._formatter = null; this._currentTextIsOutdated = true; this._fetchTextPromise = null; this._ignoreExistingText = true; this.propertyChanged.invoke("prettyPrintState"); } this._documentController.onDocClosed(this, isRuntimeTriggered); }; Doc.prototype.onMoreTextAvailable = function (newLength) { if (newLength > this._length) { this._currentTextIsOutdated = true; this._fetchTextPromise = null; this._ignoreExistingText = false; this._length = newLength; var start = (this._currentTextMapping && this._currentTextMapping.text && this._currentTextMapping.text.length) || 0; this.onDocumentContentUpdated(start); } }; Doc.prototype.rawPositionToRawOffset = function (line, column) { if (this._unformattedTextMapping) { return this._unformattedTextMapping.positionToOffset({ line: line - 1, column: column - 1 }); } else { return 0; } }; Doc.prototype.setUnformattedText = function (text, startPrettyPrinting) { var _this = this; var prevPrettyPrintState = this.prettyPrintState; var formatter = this._formatter = (this._formatter || new Debugger.FormatService.Formatter()); return formatter.setDocument(text, this.url, this.mimeType, this._headers, startPrettyPrinting && this.canFormat).then(function () { _this._length = text.length; _this._currentTextIsOutdated = false; _this._ignoreExistingText = false; _this._fetchTextPromise = null; _this._unformattedTextMapping = _this._formatter.sourceText; _this.updateCurrentTextMapping(); if (_this._formattingPromise) { _this._formattingPromise.cancel(); _this._formattingPromise = null; } if (_this._persistenceManager) { var persistentPrettyPrintState = _this._persistenceManager.isPrettyPrintEnabled(_this); if (typeof persistentPrettyPrintState === "boolean" && persistentPrettyPrintState) { _this.prettyPrintState = 0 /* On */; } } if (_this._prettyPrintEnabled) { formatter.options.prettyPrint = true; _this.doFormatting(); } if (_this.prettyPrintState !== prevPrettyPrintState) { _this.propertyChanged.invoke("prettyPrintState"); } return _this._unformattedTextMapping.text; }); }; Doc.prototype.appendUnformattedText = function (text) { this.setUnformattedText(this._unformattedTextMapping.text + text); }; Doc.prototype.makeRuntimeDocument = function (source, parent) { this._isRuntimeDocument = true; this._runtimeId = source.id; this.mimeType = source.mimeType; this._runtimeParent = parent; this._isRootChild = source.isRootChild; this._currentTextIsOutdated = true; this._fetchTextPromise = null; this._ignoreExistingText = true; this.loadSourceMapFromUrl(source.sourceMapUrl); if (this._prettyPrintEnabled) { this.getText(); } }; Doc.prototype.onDocumentContentUpdated = function (start, length) { var _this = this; Tools.Utility.Assert.isTrue(this._isRuntimeDocument, "The requested document is not loaded in the current page"); this._currentTextIsOutdated = true; this._fetchTextPromise = null; if (this.isOpen) { return this.queueCallback(function (completed, progress) { _this.getText().done(completed, null, progress); }); } else { return Plugin.Promise.wrap(null); } }; Doc.prototype.getText = function () { var _this = this; return new Plugin.Promise(function (completed, error, progress) { var callCompleted = function () { completed((_this._currentTextMapping && _this._currentTextMapping.text) || Plugin.Resources.getString("OpenFileFailed", _this.url)); }; if (_this._currentTextIsOutdated || !_this._currentTextMapping) { progress((_this._currentTextMapping && _this._currentTextMapping.text) || Plugin.Resources.getString("OpenFileProgress", _this.url)); _this.fetchText(_this._isRuntimeDocument && _this.isOpen).then(function (text) { if (!_this._currentTextMapping || _this._currentTextMapping === _this._unformattedTextMapping) { progress(text || Plugin.Resources.getString("OpenFileProgress", _this.url)); } return _this.doFormatting(); }).done(callCompleted, callCompleted); } else if (_this._formatter && _this._prettyPrintEnabled && _this._currentTextMapping !== _this._formattedTextMapping) { _this.doFormatting().done(callCompleted, callCompleted); } else { callCompleted(); } }).then(function (text) { return text; }); }; Doc.prototype.getDisplayPosition = function (rawOffset, useSourceMapIfAvailable) { if (typeof useSourceMapIfAvailable === "undefined") { useSourceMapIfAvailable = true; } var rawPosition; var displayPosition; if (this._unformattedTextMapping) { rawPosition = this._unformattedTextMapping.offsetToPosition(rawOffset); } if (useSourceMapIfAvailable && this.sourceMapState === 0 /* On */ && this.sourceMap && rawPosition) { displayPosition = this.sourceMap.getOriginalSourceLocation(rawPosition); return { doc: this.sourceMap.sources[displayPosition.file], line: displayPosition.line + 1, column: displayPosition.column + 1 }; } else if (this._currentTextMapping && rawPosition) { displayPosition = this._currentTextMapping.getMappedPosition(rawPosition); return { doc: this, line: displayPosition.line + 1, column: displayPosition.column + 1 }; } else { return null; } }; Doc.prototype.getRawLocation = function (displayPosition, isUnformattedPosition) { var zeroBasedDisplayPosition = { file: this._sourceIndex || 0, line: displayPosition.line - 1, column: displayPosition.column - 1 }; if (this.isAuthored) { var generatedPosition = this.rawDoc.sourceMap.getGeneratedFileLocation(zeroBasedDisplayPosition); return this.rawDoc.getRawLocation({ doc: this.rawDoc, line: generatedPosition.line + 1, column: generatedPosition.column + 1 }, true); } else if (this._unformattedTextMapping) { var sourcePosition; if (this._currentTextMapping && !isUnformattedPosition) { sourcePosition = this._currentTextMapping.getOriginalPosition(zeroBasedDisplayPosition); } else { sourcePosition = zeroBasedDisplayPosition; } return { doc: this, offset: this._unformattedTextMapping.positionToOffset(sourcePosition), length: 0 }; } else { return { doc: this, offset: null, length: 0 }; } }; Doc.prototype.createDocumentLocation = function (start, length) { var doc = this.rawDoc || this; var oneBasedStart = doc.getDisplayPosition(start); var oneBasedEnd = doc.getDisplayPosition(start + length); var rawLocation = { doc: doc, offset: start, length: length }; if (oneBasedStart && oneBasedEnd) { return new Debugger.DocumentLocation(oneBasedStart.doc, oneBasedStart.line, oneBasedStart.column, oneBasedEnd.doc, oneBasedEnd.line, oneBasedEnd.column, rawLocation); } else { return new Debugger.DocumentLocation(doc, 1, 1, doc, 1, 1, rawLocation); } }; Doc.prototype.getPathFromUrl = function (url) { var lastSlashIndex = Math.max(url.lastIndexOf("/"), url.lastIndexOf("\\")); if (lastSlashIndex >= 0) { return url.substr(0, lastSlashIndex + 1); } if (this.parent) { return this.parent.getPathFromUrl(this.parent.url); } return ""; }; Doc.prototype.getMimeTypeCandidates = function () { var mimeTypes = []; var sourceMap = this.rawDoc && this.rawDoc.sourceMap; if (sourceMap) { mimeTypes.push(sourceMap.getMimeType(this)); } mimeTypes.push(this.mimeType); mimeTypes.push(Common.ToolWindowHelpers.guessMimeTypeFromUrlExtension(this.url)); for (var i = mimeTypes.length - 1; i >= 0; i--) { if (!mimeTypes[i] || mimeTypes[i] === "text/plain") { mimeTypes.splice(i, 1); } } mimeTypes.push(this.isAuthored ? "text/javascript" : "text/plain"); var knownModes = ["text/coffeescript", "text/x-csharp", "text/html", "text/xml", "text/javascript", "text/css", "text/typescript"]; for (var i = 0; i < mimeTypes.length; i++) { for (var j = 0; j < knownModes.length; j++) { if (mimeTypes[i] === knownModes[j]) { return mimeTypes[i]; } } } return mimeTypes.join(","); }; Doc.prototype.loadSourceMapFromFileSystem = function () { var _this = this; Plugin.Storage.openFileDialog(Doc.SourceMapFileDialogOptions, Doc.SourceMapFileOptions).done(function (file) { if (file) { var filePath = Plugin.F12.getFilePathFromStreamId(file.streamId); _this.loadSourceMapFromUrl(filePath); file.close(); } }, function () { }); }; Doc.prototype.fireSourceMapStateChanged = function () { this.locationsInvalidated.invoke(false); return this.propertyChanged.invokeAsync("sourceMapState"); }; Doc.prototype.loadSourceMapFromUrl = function (url) { if (url && this._debuggerManager) { var dataUri; if (Common.ToolWindowHelpers.isDataURI(url)) { dataUri = url; url = this._url; } if (!Common.ToolWindowHelpers.isAbsoluteUrl(url)) { url = Common.ToolWindowHelpers.pathCombine(this.getPathFromUrl(this.url), Common.ToolWindowHelpers.truncateProtocolFromUrl(url)); } else { url = Common.ToolWindowHelpers.addFileProtocolIfNeeded(url); } var prefix = this.getPathFromUrl(url); this.sourceMap = new Debugger.FormatService.SourceMap(prefix, this, this._debuggerManager); this.sourceMap.loadFromUrl(dataUri || url).done(); } }; Doc.prototype.fetchText = function (startPrettyPrinting) { var _this = this; if (!this._fetchTextPromise) { if (this.isRuntimeDoc && !this.isAuthored && this._debuggerManager) { var prevPrettyPrintState = this.prettyPrintState; this._formatter = (this._formatter || new Debugger.FormatService.Formatter()); if (this._persistenceManager) { var persistentPrettyPrintState = this._persistenceManager.isPrettyPrintEnabled(this); if (typeof persistentPrettyPrintState === "boolean" && persistentPrettyPrintState) { this.prettyPrintState = 0 /* On */; } } if (this.prettyPrintState !== prevPrettyPrintState) { this.propertyChanged.invoke("prettyPrintState"); } var originalText = !this._ignoreExistingText && this._formatter.sourceText && this._formatter.sourceText.text; this._fetchTextPromise = this._debuggerManager.getSourceText(this, originalText && originalText.length).then(function (text) { if (originalText) { text = originalText + text; } return _this.setUnformattedText(text, startPrettyPrinting); }); } else if (this.url && this._debuggerManager) { this._fetchTextPromise = this._debuggerManager.downloadUrl(this.url, this.mimeType).then(function (result) { if (result.success) { _this.url = result.url; _this.mimeType = result.mimeType; _this.setUnformattedText(result.content); return result.content; } else if (_this.isAuthored && _this.sourceMapState !== 2 /* Disabled */) { Debugger.DebuggerShell.showErrorDisplay("SourceMapNoAuthoredFile", [_this.url, _this.rawDoc.sourceMap && _this.rawDoc.sourceMap.sourceMapUrl]); _this.sourceMapState = 2 /* Disabled */; } }); } else { this._fetchTextPromise = Plugin.Promise.wrap(this._unformattedTextMapping ? this._unformattedTextMapping.text : null); } } return this._fetchTextPromise; }; Doc.prototype.updateCurrentTextMapping = function () { var oldTextMapping = this._currentTextMapping; var newTextMapping; if (this._formattedTextMapping && this._formatter && this._formatter.options.prettyPrint) { newTextMapping = this._formattedTextMapping; } else { newTextMapping = this._unformattedTextMapping; } if (newTextMapping !== oldTextMapping) { this._currentTextMapping = newTextMapping; this.locationsInvalidated.invoke(!oldTextMapping || !newTextMapping || (oldTextMapping.text !== newTextMapping.text)); } }; Doc.prototype.doFormatting = function () { var _this = this; if (!this._formattingPromise) { if (this.canFormat && this._prettyPrintEnabled && this._formatter.sourceText) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(306 /* Debugger_PrettyPrint_Start */); this._formattingPromise = new Plugin.Promise(function (completed, error, progress) { _this._formatter.getFormattedText().then(function (textMapping) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(307 /* Debugger_PrettyPrint_Stop */); _this._formattedTextMapping = textMapping; completed(textMapping); }); }); } else { return Plugin.Promise.wrap(this._formattedTextMapping); } } return this._formattingPromise.then(function () { _this.updateCurrentTextMapping(); }); }; Doc.prototype.queueCallback = function (callback) { var _this = this; if (this._timerId !== null) { window.clearTimeout(this._timerId); } this._timerPromise = new Plugin.Promise(function (completed, error, progress) { _this._timerId = window.setTimeout(function () { _this._timerId = null; callback(completed, progress); }, 50); }); return this._timerPromise; }; Doc.prototype.cancelPendingActions = function () { if (this._timerId !== null) { window.clearTimeout(this._timerId); } if (this._timerPromise) { this._timerPromise.cancel(); this._timerPromise = null; } if (this._formattingPromise) { this._formattingPromise.cancel(); this._formattingPromise = null; } if (this._fetchTextPromise) { this._fetchTextPromise.cancel(); this._fetchTextPromise = null; } }; Doc.NextFrontendId = 1; return Doc; })(); Debugger.Doc = Doc; Doc.initialize(); })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // RPCWrapper.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var RpcWrapper = (function () { function RpcWrapper() { var _this = this; this._debuggerEngine = null; this._debuggerConnect = null; this._diagOMConnect = null; this._urlToCallbacksMap = {}; this._diagOMCallbacks = []; this._setDebuggerManagerReady = null; var external = window.external; external.addEventListener("attach", this.onAttach.bind(this)); external.addEventListener("detach", this.onDetach.bind(this)); this._debuggerManagerReady = new Plugin.Promise(function (completed) { _this._setDebuggerManagerReady = completed; }); } Object.defineProperty(RpcWrapper.prototype, "isConnected", { get: function () { return !!this._rpc; }, enumerable: true, configurable: true }); RpcWrapper.prototype.isDiagOMConnected = function () { return !!this._rpcForDiagOM; }; RpcWrapper.prototype.onDebuggerLoadComplete = function (manager) { var _this = this; if (!this._setDebuggerManagerReady) { window.setImmediate(function () { return _this.onDebuggerLoadComplete(manager); }); return; } this._setDebuggerManagerReady(manager); if (window.external.isAttached) { this.onAttach(); } }; RpcWrapper.prototype.onExecutionPaused = function () { for (var key in this._urlToCallbacksMap) { if (this._urlToCallbacksMap.hasOwnProperty(key)) { this.jsonDiagOMRpcMethodCall("downloadUrl", [key, null, false]); } } }; RpcWrapper.prototype.jsonDiagOMRpcMethodCall = function (method, params) { var _this = this; var promise = new Plugin.Promise(function (completed, error) { var makeCall = function () { _this._rpcForDiagOM.jsonRpcMethodCall(method, params, completed, error); }; if (_this._rpcForDiagOM) { makeCall(); } else if (_this._diagOMCallbacks) { _this._diagOMCallbacks.push(makeCall); } }); return promise; }; RpcWrapper.prototype.jsonRpcMethodCall = function (method, params) { var _this = this; var promise = new Plugin.Promise(function (completed, error) { var makeCall = function () { _this._rpc.jsonRpcMethodCall(method, params, completed, error); }; if (_this._rpc) { makeCall(); } else if (_this._rpcCallbacks) { _this._rpcCallbacks.push(makeCall); } }); return promise; }; RpcWrapper.prototype.executeOnTargetPage = function (expression) { return this.jsonDiagOMRpcMethodCall("executeOnTargetPage", [expression]); }; RpcWrapper.prototype.enableDynamicDebugging = function () { return this.jsonRpcMethodCall("enableDynamicDebugging", []); }; RpcWrapper.prototype.getBreakpointIdFromSourceLocation = function (doc, offset) { return this.jsonRpcMethodCall("getBreakpointIdFromSourceLocation", [doc.runtimeId, offset]); }; RpcWrapper.prototype.addCodeBreakpoint = function (doc, offset, isPseudoBreakpoint) { return this.jsonRpcMethodCall("addCodeBreakpoint", [doc.runtimeId, offset, null, false, isPseudoBreakpoint]); }; RpcWrapper.prototype.addEventBreakpoint = function (eventTypes, isEnabled, condition, isTracepoint) { return this.jsonRpcMethodCall("addEventBreakpoint", [eventTypes, isEnabled, condition, isTracepoint, false]); }; RpcWrapper.prototype.addPendingBreakpoint = function (url, start, condition, isEnabled, isTracepoint) { return this.jsonRpcMethodCall("addPendingBreakpoint", [url, start, condition, isEnabled, isTracepoint]); }; RpcWrapper.prototype.causeBreak = function (causeBreakAction, workerId) { return this.jsonRpcMethodCall("causeBreak", [causeBreakAction, workerId]); }; RpcWrapper.prototype.getSourceText = function (doc, start, length) { return this.jsonRpcMethodCall("getSourceText", [doc.runtimeId, start, length]); }; RpcWrapper.prototype.removeBreakpoint = function (breakpointId) { return this.jsonRpcMethodCall("removeBreakpoint", [breakpointId]); }; RpcWrapper.prototype.setBreakpointEnabledState = function (breakpointId, enabled) { return this.jsonRpcMethodCall("setBreakpointEnabledState", [breakpointId, enabled]); }; RpcWrapper.prototype.setBreakpointCondition = function (breakpointId, condition, isTracepoint) { return this.jsonRpcMethodCall("setBreakpointCondition", [breakpointId, condition, isTracepoint]); }; RpcWrapper.prototype.resume = function (breakResumeAction) { return this.jsonRpcMethodCall("resume", [breakResumeAction]); }; RpcWrapper.prototype.setExceptionFilter = function (filter) { return this.jsonRpcMethodCall("setExceptionFilter", [filter]); }; RpcWrapper.prototype.isDocContainingMatch = function (query, doc) { return this.jsonRpcMethodCall("isDocContainingMatch", [query, doc.runtimeId]); }; RpcWrapper.prototype.getFrames = function (framesNeeded) { return this.jsonRpcMethodCall("getFrames", [framesNeeded]); }; RpcWrapper.prototype.getCurrentThreadDescription = function () { return this.jsonRpcMethodCall("getCurrentThreadDescription", []); }; RpcWrapper.prototype.getThreads = function () { return this.jsonRpcMethodCall("getThreads", []); }; RpcWrapper.prototype.eval = function (frameIndex, evalString) { return this.jsonRpcMethodCall("eval", [frameIndex, evalString]); }; RpcWrapper.prototype.getLocals = function (frameIndex) { return this.jsonRpcMethodCall("getLocals", [frameIndex]); }; RpcWrapper.prototype.getChildProperties = function (propertyId, start, length) { return this.jsonRpcMethodCall("getChildProperties", [propertyId, start, length]); }; RpcWrapper.prototype.setPropertyValueAsString = function (propertyId, value) { return this.jsonRpcMethodCall("setPropertyValueAsString", [propertyId, value]); }; RpcWrapper.prototype.triggerSourceRundown = function () { return this.jsonRpcMethodCall("triggerSourceRundown", []); }; RpcWrapper.prototype.canSetNextStatement = function (doc, offset) { return this.jsonRpcMethodCall("canSetNextStatement", [doc.runtimeId, offset]); }; RpcWrapper.prototype.setNextStatement = function (doc, offset) { return this.jsonRpcMethodCall("setNextStatement", [doc.runtimeId, offset]); }; RpcWrapper.prototype.downloadUrl = function (url, mimeTypeOverride, isAsync) { var _this = this; Tools.Utility.Assert.isTrue(Common.ToolWindowHelpers.isAbsoluteUrl(url), "downloadUrl must be invoked with an absolute URL as the first param"); return new Plugin.Promise(function (completed, error, progress) { if (_this._urlToCallbacksMap[url]) { _this._urlToCallbacksMap[url].push(completed); } else { _this._urlToCallbacksMap[url] = [completed]; return _this.jsonDiagOMRpcMethodCall("downloadUrl", [url, mimeTypeOverride, isAsync]); } }); }; RpcWrapper.prototype.jsonRpcMethodReceive = function (method, params, response) { Tools.Utility.Assert.fail("Frontend received an unexpected RPC method call: '" + method + "'"); }; RpcWrapper.prototype.jsonRpcNotificationReceive = function (event, params) { switch (event) { case "onAddDocuments": Tools.Utility.Assert.isTrue(params && params.length !== 0); this._debuggerManagerReady.then(function (manager) { return manager.onAddDocuments(params); }).done(); break; case "onRemoveDocuments": Tools.Utility.Assert.isTrue(params && params.length !== 0); this._debuggerManagerReady.then(function (manager) { return manager.onRemoveDocuments(params); }).done(); break; case "onUpdateDocuments": Tools.Utility.Assert.isTrue(params && params.length !== 0); this._debuggerManagerReady.then(function (manager) { return manager.onUpdateDocuments(params); }).done(); break; case "onBreak": Tools.Utility.Assert.areEqual(8, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onBreak(params[0], params[1], params[2], params[3], params[4], params[5], params[6], params[7]); }).done(); break; case "onUnhandledException": Tools.Utility.Assert.areEqual(4, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onUnhandledException(params[0], params[1], params[2], params[3]); }).done(); break; case "onResolveBreakpoint": Tools.Utility.Assert.areEqual(2, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onResolveBreakpoint(params[0], params[1]); }).done(); break; case "onDebugOutput": Tools.Utility.Assert.areEqual(1, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onDebugOutput(params[0]); }).done(); break; case "onAttachFailed": Tools.Utility.Assert.areEqual(0, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onAttachFailed(); }).done(); break; case "onSetRootDocument": Tools.Utility.Assert.areEqual(1, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onSetRootDocument(params[0]); }).done(); break; case "onWebWorkerStarted": Tools.Utility.Assert.areEqual(1, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onWebWorkerStarted(params[0]); }).done(); break; case "onWebWorkerFinished": Tools.Utility.Assert.areEqual(1, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onWebWorkerFinished(params[0]); }).done(); break; case "onRemoteScriptError": Tools.Utility.Assert.areEqual(4, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onRemoteScriptError(params[0], params[1], params[2], params[3]); }).done(); break; default: Tools.Utility.Assert.fail("Unknown event '" + event + "'"); } }; RpcWrapper.prototype.jsonDiagOMRpcMethodReceive = function (method, params, response) { }; RpcWrapper.prototype.jsonDiagOMRpcNotificationReceive = function (event, params) { switch (event) { case "onDownloadUrlComplete": Tools.Utility.Assert.areEqual(5, params.length); this.onDownloadUrlComplete(params[0], params[1], params[2], params[3], params[4]); break; case "onIntellisenseRequestComplete": Tools.Utility.Assert.areEqual(2, params.length); this._debuggerManagerReady.then(function (manager) { return manager.onIntellinsenseRequestComplete(params[0], params[1]); }); break; default: Tools.Utility.Assert.fail("Unknown event '" + event + "'"); } }; RpcWrapper.prototype.onDownloadUrlComplete = function (success, url, content, mimeType, errorMessage) { if (this._urlToCallbacksMap[url]) { for (var i = 0; i < this._urlToCallbacksMap[url].length; i++) { var callback = this._urlToCallbacksMap[url][i]; callback({ success: success, url: url, content: content, mimeType: mimeType, errorMessage: errorMessage }); } delete this._urlToCallbacksMap[url]; } }; RpcWrapper.prototype.onAttach = function () { var _this = this; var external = window.external; this._debuggerEngine = window.external.createDebuggerEngine(); this._debuggerEngine.loadScriptInProc("../common/isDebugBuild.js"); this._debuggerEngine.loadScriptInProc("../common/assert.js"); this._debuggerEngine.loadScriptInProc("manager/commonStructs.js"); this._debuggerEngine.loadScriptInProc("../common/Remote/rpc.js"); this._debuggerEngine.loadScriptInProc("remote/DebugProvider.js"); if (external.isJitDebugging) { this._debuggerEngine.loadScriptInProc("remote/jitRemote.js"); } this._debuggerEngine.loadScriptInProc("remote/remote.js"); this._debuggerConnect = function (port) { _this._rpc = new Tools.RPC.JsonRPCEndpoint("CLIENT", function (method, params, response) { return _this.jsonRpcMethodReceive(method, params, response); }, function (method, params) { return _this.jsonRpcNotificationReceive(method, params); }, function (data) { port.postMessage(data); }, function (onMessage) { port.addEventListener("message", onMessage); }); _this._debuggerManagerReady.then(function (manager) { return manager.onConnect(); }); if (_this._rpcCallbacks) { for (var i = 0; i < _this._rpcCallbacks.length; i++) { _this._rpcCallbacks[i](); } _this._rpcCallbacks = null; } }; this._debuggerEngine.addEventListener("connect", this._debuggerConnect); external.loadScriptInProc("../common/isDebugBuild.js"); external.loadScriptInProc("../common/assert.js"); external.loadScriptInProc("../common/Remote/rpc.js"); external.loadScriptInProc("../Common/remoteHelpers.js"); external.loadScriptInProc("../Common/Intellisense/intellisenseRemoteHelpers.js"); external.loadScriptInProc("remote/DiagnosticsOMProvider.js"); this._diagOMConnect = function (port) { _this._rpcForDiagOM = new Tools.RPC.JsonRPCEndpoint("DIAGOMCLIENT", function (method, params, response) { return _this.jsonDiagOMRpcMethodReceive(method, params, response); }, function (method, params) { return _this.jsonDiagOMRpcNotificationReceive(method, params); }, function (data) { port.postMessage(data); }, function (onMessage) { port.addEventListener("message", onMessage); }); if (_this._diagOMCallbacks) { for (var i = 0; i < _this._diagOMCallbacks.length; i++) { _this._diagOMCallbacks[i](); } _this._diagOMCallbacks = null; } _this._debuggerManagerReady.then(function (manager) { return manager.registerPluginMethodHandlers(); }); _this._debuggerManagerReady.then(function (manager) { return manager.testEventObject.fireEvent("startDiagnosticsOMCompleted"); }); }; external.addEventListener("connect", this._diagOMConnect); }; RpcWrapper.prototype.onDetach = function () { if (this._debuggerEngine && this._debuggerConnect) { this._debuggerEngine.removeEventListener("connect", this._debuggerConnect); } this._rpc = null; this._debuggerConnect = null; this._debuggerEngine = null; var external = window.external; if (this._diagOMConnect) { external.removeEventListener("connect", this._diagOMConnect); } this._rpcForDiagOM = null; this._diagOMConnect = null; this._debuggerManagerReady.then(function (manager) { return manager.onDetached(); }).done(); this._rpcCallbacks = []; this._diagOMCallbacks = []; Plugin.F12.Debugger.notifyOnRun(); }; return RpcWrapper; })(); Debugger.RpcWrapper = RpcWrapper; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // DocumentController.ts var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; (function (Activation) { Activation[Activation["BackgroundOpen"] = 0] = "BackgroundOpen"; Activation[Activation["SwitchWithoutFocus"] = 1] = "SwitchWithoutFocus"; Activation[Activation["SwitchWithFocus"] = 2] = "SwitchWithFocus"; })(Debugger.Activation || (Debugger.Activation = {})); var Activation = Debugger.Activation; var DocumentController = (function () { function DocumentController(debuggerManager) { this.propertyChanged = new Common.EventSource(); this._debuggerManager = debuggerManager; this._persistenceManager = this._debuggerManager.persistenceManager; this._docTable = new Debugger.DocTable(); this._listeners = []; this._docEventRegistrations = []; this._docListUpdated = new Common.EventSource(); this._nextETWKey = 0; this._docOpenedTraceKeys = []; this._docSwitchTraceKeys = []; } Object.defineProperty(DocumentController.prototype, "isInSourceMapSwitch", { get: function () { return this._isInSourceMapSwitch; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentController.prototype, "currentDoc", { get: function () { return this._currentDoc; }, enumerable: true, configurable: true }); Object.defineProperty(DocumentController.prototype, "editorWindow", { get: function () { return this._editorWindow; }, set: function (value) { var _this = this; this._editorWindow = value; if (value) { value.editorUpdated.addHandler(function (doc) { _this.traceStopEvent(doc, 309 /* Debugger_OpenDocument_Stop */, _this._docOpenedTraceKeys); _this.traceStopEvent(doc, 313 /* Debugger_SwitchDocument_Stop */, _this._docSwitchTraceKeys); }); } }, enumerable: true, configurable: true }); DocumentController.prototype.registerListener = function (listener) { if (this._listeners.indexOf(listener) === -1) { this._listeners.push(listener); } }; DocumentController.prototype.closeDocument = function (doc, isRuntimeTriggered) { doc.close(isRuntimeTriggered); }; DocumentController.prototype.closeAllDocuments = function (isRuntimeTriggered, except) { var promise = Plugin.Promise.wrap(null); if (except && except.isOpen) { promise = this.openDocument(except); } var openDocs = this.getOpenDocs(); for (var i = 0; i < openDocs.length; i++) { var doc = openDocs[i]; if (doc !== except) { doc.close(isRuntimeTriggered); } } return promise; }; DocumentController.prototype.openDocument = function (doc, location, activation) { if (typeof activation === "undefined") { activation = 2 /* SwitchWithFocus */; } if (!doc || !this._docTable.contains(doc)) { return Plugin.Promise.wrap(false); } return doc.open(location, activation).then(function () { return doc.getText(); }); }; DocumentController.prototype.documentTextOrMimeTypeUpdated = function (doc, newContent, appendText, mimeType, previousPosition) { if (!doc) { return; } var hasMimeTypeChanged = (doc.mimeType !== mimeType); doc.mimeType = mimeType; if (doc.isOpen && newContent) { if (appendText) { doc.appendUnformattedText(newContent); } else { doc.setUnformattedText(newContent); } } for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].documentUpdated(doc, hasMimeTypeChanged); } }; DocumentController.prototype.documentContentAppended = function (doc, start) { return doc.onDocumentContentUpdated(start); }; DocumentController.prototype.documentAdded = function (doc, couldHaveExistingChildren) { var _this = this; this._docEventRegistrations[doc.frontendId] = [ doc.propertyChanged.addHandler(function (propertyName) { return _this.onDocPropertyChanged(doc, propertyName); }), doc.locationsInvalidated.addHandler(function (textChanged) { return _this.onDocLocationsInvalidated(doc, textChanged); }) ]; if (!this._docTable.contains(doc)) { this._docTable.onDocAdded(doc); for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].documentAdded(doc, couldHaveExistingChildren); } this._debuggerManager.jmcController.documentAdded(doc); this._debuggerManager.persistenceManager.documentAdded(doc); } else { if (!this._docTable.getDocByRuntimeId(doc.runtimeId)) { this._docTable.onDocAdded(doc); } for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].documentAdded(doc, couldHaveExistingChildren); } this._debuggerManager.persistenceManager.documentAdded(doc); } if (!this._isInSourceMapSwitch) { this.updateDocListAfterSourceMapStateChange(doc); } }; DocumentController.prototype.documentRemoved = function (doc, leaveInTable) { if (doc.isOpen) { this.closeDocument(doc, true); } for (var j in this._listeners) { this._listeners[j].documentRemoved(doc); } if (!leaveInTable) { this._debuggerManager.persistenceManager.documentRemoved(doc); this._docTable.onDocRemoved(doc); if (doc.sourceMap && doc.sourceMap.sources) { for (var i = 0; i < doc.sourceMap.sources.length; i++) { this.documentRemoved(doc.sourceMap.sources[i]); } } } var eventRegistrations = this._docEventRegistrations[doc.frontendId]; if (eventRegistrations) { for (var i = 0; i < eventRegistrations.length; i++) { eventRegistrations[i].unregister(); } delete this._docEventRegistrations[doc.frontendId]; } }; DocumentController.prototype.documentLibraryStateChanged = function (doc) { for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].documentAsLibraryStateChanged(doc); } }; DocumentController.prototype.getOpenDocs = function () { var openDocs = []; var allDocs = this.getDocs(); for (var i = 0; i < allDocs.length; i++) { if (allDocs[i].isOpen) { openDocs.push(allDocs[i]); } } return openDocs; }; DocumentController.prototype.getDocFromRuntimeId = function (id) { return this._docTable.getDocByRuntimeId(id); }; DocumentController.prototype.getDocFromFrontendId = function (id) { return this._docTable.getDocByFrontendId(id); }; DocumentController.prototype.getRuntimeIdFromLongId = function (docId) { var docs = this._docTable.getDocs(); for (var i = 0; i < docs.length; i++) { if (docs[i].longDocumentId === docId) { return docs[i].runtimeId; } } }; DocumentController.prototype.getDocs = function () { var allDocs = this._docTable.getDocs(); for (var i = allDocs.length - 1; i >= 0; i--) { if (!allDocs[i].isAuthored && allDocs[i].sourceMapState === 0 /* On */) { allDocs.splice(i, 1); } } return allDocs; }; DocumentController.prototype.getDocFromUrl = function (url) { return this._docTable.getDocByFrontendId(this._docTable.getFrontendIdByUrl(url)); }; DocumentController.prototype.getNonRuntimeDoc = function (url) { var doc = this.getDocFromUrl(url); if (doc && !doc.isRuntimeDoc) { return doc; } return null; }; DocumentController.prototype.toggleSourceMapsForCurrentDoc = function () { var _this = this; if (!this.currentDoc) { return Plugin.Promise.wrap(null); } var originalDoc = this.currentDoc; var doc = this.currentDoc.rawDoc || this.currentDoc; if (!doc.sourceMap || doc.sourceMap.sourceMapState === 2 /* Disabled */) { return Plugin.Promise.wrap(null); } return new Plugin.Promise(function (completed) { _this._docListUpdated.addOne(function (newDoc) { if (!_this._isAnotherUpdateDocListQueued && newDoc && newDoc !== originalDoc) { completed(); } }); if (doc.sourceMap.sourceMapState === 1 /* Off */) { doc.sourceMap.sourceMapState = 0 /* On */; } else if (doc.sourceMap.sourceMapState === 0 /* On */) { doc.sourceMap.sourceMapState = 1 /* Off */; } }); }; DocumentController.prototype.onDocOpened = function (doc, location, activation) { if (!this._currentDoc && activation === 0 /* BackgroundOpen */) { activation = 1 /* SwitchWithoutFocus */; } if (activation !== 0 /* BackgroundOpen */ && this._currentDoc !== doc) { this.onSwitchDocument(doc); } return this.fireOpened(doc, activation, location); }; DocumentController.prototype.onDocClosed = function (doc, isRuntimeTriggered) { Debugger.debuggerTraceWriter.traceWriter.raiseEvent(310 /* Debugger_CloseDocument_Start */); if (!doc.isRuntimeDoc) { this._docTable.onDocRemoved(doc); } if (this.currentDoc === doc) { var openDocs = this.getOpenDocs(); if (!this._isInSourceMapSwitch && openDocs.length > 0) { openDocs[openDocs.length - 1].open(null); } else { this._currentDoc = null; this.propertyChanged.invoke("currentDoc"); } } this.fireClosed(doc, isRuntimeTriggered); Debugger.debuggerTraceWriter.traceWriter.raiseEvent(311 /* Debugger_CloseDocument_Stop */); }; DocumentController.prototype.traceStopEvent = function (doc, event, keyMapping) { if (doc && typeof keyMapping[doc.frontendId] === "number") { Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(event, keyMapping[doc.frontendId]); delete keyMapping[doc.frontendId]; } }; DocumentController.prototype.updateDocListAfterSourceMapStateChange = function (doc) { var _this = this; if (this._isInSourceMapSwitch) { if (!this._isAnotherUpdateDocListQueued && doc.sourceMapState === 2 /* Disabled */) { this._isAnotherUpdateDocListQueued = true; this._docListUpdated.addOne(function () { _this.updateDocListAfterSourceMapStateChange(doc); _this._isAnotherUpdateDocListQueued = false; }); } return Plugin.Promise.wrap(null); } if (doc.rawDoc) { doc = doc.rawDoc; } var authoredDocs = doc.sourceMap && doc.sourceMap.sources; if (!authoredDocs) { return Plugin.Promise.wrap(null); } this._isInSourceMapSwitch = true; if (doc.sourceMapState === 0 /* On */) { if (this._docEventRegistrations[doc.frontendId]) { for (var i = 0; i < authoredDocs.length; i++) { this.documentAdded(authoredDocs[i], true); } this.documentRemoved(doc, true); } } else { if (!this._docEventRegistrations[doc.frontendId]) { this.documentAdded(doc, true); for (var i = 0; i < authoredDocs.length; i++) { this.documentRemoved(authoredDocs[i]); } } } var previousSelection = this._editorWindow && this._editorWindow.previousSelectionLocation; if (previousSelection) { var rawLocation = previousSelection.rawLocation; var isDocSwitched = (rawLocation.doc === doc || authoredDocs.indexOf(rawLocation.doc) >= 0); if (isDocSwitched) { var newSelection = doc.createDocumentLocation(rawLocation.offset, rawLocation.length); if (newSelection.startPosition && newSelection.startPosition.doc !== previousSelection.startPosition.doc) { return this.openDocument(newSelection.startPosition.doc, newSelection, 1 /* SwitchWithoutFocus */).then(function () { _this._isInSourceMapSwitch = false; _this._editorWindow.selectRange(newSelection, false); _this._docListUpdated.invoke(newSelection.startPosition.doc); }); } } } this._isInSourceMapSwitch = false; this._docListUpdated.invoke(null); return Plugin.Promise.wrap(null); }; DocumentController.prototype.onSwitchDocument = function (newDoc) { if (typeof this._docSwitchTraceKeys[newDoc.frontendId] === "undefined" && typeof this._docOpenedTraceKeys[newDoc.frontendId] === "undefined") { var key = this._nextETWKey++; this._docSwitchTraceKeys[newDoc.frontendId] = key; Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(312 /* Debugger_SwitchDocument_Start */, key); } this._currentDoc = newDoc; this.propertyChanged.invoke("currentDoc"); }; DocumentController.prototype.onDocPropertyChanged = function (doc, propertyName) { switch (propertyName) { case "url": this._docTable.onDocUrlChanged(doc); for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].documentUrlChanged(doc); } break; case "sourceMapState": return this.updateDocListAfterSourceMapStateChange(doc); case "isOpen": if (doc.isOpen && typeof this._docOpenedTraceKeys[doc.frontendId] === "undefined") { var key = this._nextETWKey++; this._docOpenedTraceKeys[doc.frontendId] = key; Debugger.debuggerTraceWriter.traceWriter.raiseEventWithKey(308 /* Debugger_OpenDocument_Start */, key); } break; } return Plugin.Promise.wrap(null); }; DocumentController.prototype.onDocLocationsInvalidated = function (doc, textChanged) { this._debuggerManager.breakpointController.updateBreakpointLocations(doc); if (textChanged) { this.fireUpdated(doc); } }; DocumentController.prototype.fireOpened = function (doc, activation, location) { this._debuggerManager.persistenceManager.documentOpened(doc, activation, location); var promises = []; for (var i = 0; i < this._listeners.length; i++) { promises.push(this._listeners[i].documentOpened(doc, activation, location)); } return Plugin.Promise.join(promises); }; DocumentController.prototype.fireUpdated = function (doc) { for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].documentUpdated(doc); } }; DocumentController.prototype.fireClosed = function (doc, isRuntimeTriggered) { for (var i = 0; i < this._listeners.length; i++) { this._listeners[i].documentClosed(doc, isRuntimeTriggered); } this._debuggerManager.persistenceManager.documentClosed(doc, isRuntimeTriggered); }; return DocumentController; })(); Debugger.DocumentController = DocumentController; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); Debugger
        body { margin: 0px; padding: 0px; color: rgb(0, 0, 0); /*[{plugin-color}]*/ overflow: hidden; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: 12px; /*[{plugin-font-size}]*/ background-color: rgb(252, 252, 252); /*[{vs-tool-window-background-color}]*/ } * { box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .add-icon { background: url("../Common/images/add_row.png") no-repeat 0 0 !important; /*[url({f12-debugger-image-grid-control-add-row}) no-repeat 0 0 !important]*/ } .icon-empty { background: url("../Common/images/common_icons.png") no-repeat -640px -16px !important; /*[url({f12-image-common-icons}) no-repeat -640px -16px !important]*/ } .icon-tip { background: url("../Common/images/misc_icons.png") no-repeat -3952px -16px !important; /*[url({f12-image-misc-icons}) no-repeat -3952px -16px !important]*/ } .icon-tools { background: url("../Common/images/common_icons.png") no-repeat -2258px -16px !important; /*[url({f12-image-common-icons}) no-repeat -2258px -16px !important]*/ } .icon-tree { background: url("../Common/images/misc_icons.png") no-repeat -3998px -16px !important; /*[url({f12-image-misc-icons}) no-repeat -3998px -16px !important]*/ } .icon-tree-add { background: url("../Common/images/misc_icons.png") no-repeat -4046px -16px !important; /*[url({f12-image-misc-icons}) no-repeat -4046px -16px !important]*/ } .icon-tree-collapse-all { background: url("../Common/images/tree_icons.png") no-repeat -16px -16px !important; /*[url({f12-image-tree-icons}) no-repeat -16px -16px !important]*/ } .icon-tree-collapsed { background-color: transparent; background-image: url("../Common/images/itemCollapsedIcon.png"); /*[url({plugin-image-icon-item-collapsed})]*/ background-repeat: no-repeat; background-size: 10px 10px; margin: 3px 2px 0px 3px; } .icon-tree-collapsed-2 { background: url("../Common/images/tree_icons.png") no-repeat -108px -16px !important; /*[url({f12-image-tree-icons}) no-repeat -108px -16px !important]*/ } .icon-tree-corner { background: url("../Common/images/misc_icons.png") no-repeat -4622px -16px !important; /*[url({f12-image-misc-icons}) no-repeat -4622px -16px !important]*/ } .icon-tree-empty { background: url("../Common/images/tree_icons.png") no-repeat -156px -16px !important; /*[url({f12-image-tree-icons}) no-repeat -156px -16px !important]*/ } .icon-tree-expand-all { background: url("../Common/images/tree_icons.png") no-repeat -204px -16px !important; /*[url({f12-image-tree-icons}) no-repeat -204px -16px !important]*/ } .icon-tree-expanded { background-color: transparent; background-image: url("../Common/images/itemExpandedIcon.png"); /*[url({plugin-image-icon-item-expanded})]*/ background-repeat: no-repeat; background-size: 10px 10px; margin: 3px 2px 0px 3px; } .icon-tree-expanded-2 { background: url("../Common/images/tree_icons.png") no-repeat -296px -16px !important; /*[url({f12-image-tree-icons}) no-repeat -296px -16px !important]*/ } .heading { text-transform: uppercase; line-height: 1.84em; font-size: 12pt; /*[{plugin-font-size}]*/ font-weight: bold; margin-right: 6px; } .hidden { display: none; } .icon { width: 16px; height: 16px; overflow: hidden; vertical-align: middle; display: inline-block; } .icon.action { cursor: pointer; } .menu-bar { position: relative; } .menu-popup { position: relative; } .menu-popup-static { position: relative; } .menu { margin: 0px; padding: 0px; list-style-type: none; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .menu-bar { margin: 0px; padding: 0px; list-style-type: none; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .menu-popup { margin: 0px; padding: 0px; list-style-type: none; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .menu-popup-static { margin: 0px; padding: 0px; list-style-type: none; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .sub-menu { -ms-overflow-y: auto; } .virtualizing-list-view { border: 1px solid rgb(204, 204, 204); /*[1px solid {vs-tree-view-selected-item-inactive-color}]*/ position: relative; background-color: rgb(252, 252, 252); /*[{vs-toolbox-background-color}]*/ } .virtualizing-list-view > .items { margin: 0px; padding: 0px; left: 0px; right: 0px; list-style-type: none; white-space: nowrap; position: absolute; } .scroll.virtualizing-list-view > .items { right: 18px; } .grid { border: 1px solid transparent; overflow: hidden; position: relative; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .grid-focus { top: 5px; width: 50%; height: 3px; position: absolute; outline: none; } .grid-canvas { left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: auto; position: absolute; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -moz-user-select: -moz-none; } .grid-canvas .grid-row-splitter { cursor: e-resize; width: 3px; position: absolute; z-index: 10; height: 100% } .grid-canvas .grid-row-splitter.active { border-left: 3px solid #E5E6ED; /*[3px solid {plugin-debugger-grid-active-splitter-color}]*/ } .grid-canvas .grid-row-splitter.fixed { cursor: default; } .has-header.grid .grid-canvas { top: 33px; } .grid-content-spacer { left: 0px; top: 0px; width: 1px; height: 1px; position: absolute; } .grid-header { left: 0px; top: 0px; height: 2.2em; right: 0px; overflow: hidden; position: absolute; z-index: 6; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .grid-header-canvas { left: 0px; top: 0px; width: 999999px; bottom: 0px; overflow: hidden; border-bottom-color: transparent; border-bottom-width: 1px; border-bottom-style: solid; position: absolute; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .grid-header-column { background-color: TRANSPARENT; /*[{vs-command-bar-options-background-color}]*/ width: 20px; height: 100%; overflow: visible; border-right-color: transparent; border-right-width: 1px; border-right-style: solid; float: left; position: relative; cursor: default; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .grid-header-column:hover { background-color: rgb(238, 238, 238); /*[{vs-command-bar-mouse-over-background-begin-color}]*/ } .grid-header-column > .separator { top: 0px; width: 12px; right: -6px; bottom: 0px; position: absolute; z-index: 6; cursor: e-resize; } .grid-header-column > .sort-handle { top: 2px; width: 7px; height: 7px; right: -5000px; overflow: hidden; position: absolute; z-index: 3; } .ascending.grid-header-column > .sort-handle { background: url("../Common/images/common_icons.png") no-repeat -2128px 50% !important; /*[url({f12-image-common-icons}) no-repeat -2128px 50% !important]*/ left: 49%; } .descending.grid-header-column > .sort-handle { background: url("../Common/images/common_icons.png") no-repeat -2171px 50% !important; /*[url({f12-image-common-icons}) no-repeat -2171px 50% !important]*/ left: 49%; } .grid-header-column > .title { padding: 4px; left: 0px; top: 3px; text-align: left; right: 0px; color: rgb(128, 128, 128); /*[{plugin-color}]*/ overflow: hidden; vertical-align: middle; white-space: nowrap; position: absolute; cursor: default; -ms-text-overflow: ellipsis; } .grid-header-column > .indented-title { text-indent: 16px; } .ascending.grid-header-column > .title { } .descending.grid-header-column > .title { } .grid-column-sizing { width: 0px; border-left-color: rgb(204, 204, 204); /*[{vs-tree-view-selected-item-inactive-color}]*/ border-left-width: 1px; border-left-style: solid; position: absolute; z-index: 5; opacity: 0.5; -moz-opacity: 0.5; } .grid-column-moving { padding: 7px 4px 4px; height: 100%; overflow: hidden; vertical-align: middle; white-space: nowrap; position: absolute; z-index: 5; cursor: pointer; -ms-text-overflow: ellipsis; opacity: 0.75; background-color: rgb(220, 230, 244) !important; /*[{vs-command-bar-mouse-down-background-begin-color} !important]*/ -moz-opacity: 0.75; } .grid-column-moving-placer { background: url("../Common/images/columnmove.png") -2px -4px; /*[url({f12-debugger-image-grid-control-column-move}) -2px -4px]*/ width: 7px; height: 4px; font-size: 1pt; position: absolute; z-index: 100; } .grid-gutter { left: 0px; top: 0px; width: 20px; height: 50px; overflow: hidden; position: absolute; z-index: 6; } .grid-gutter-canvas { left: 0px; top: 0px; width: 29px; height: 1px; position: absolute; z-index: 5; } .grid-gutter-header { left: 0px; top: 0px; width: 20px; bottom: 0px; position: absolute; z-index: 7; } .grid-gutter-row { width: 100%; height: 1em; overflow: hidden; position: absolute; } .grid-gutter-cell { border: currentColor; height: 100%; overflow: hidden; vertical-align: middle; float: left; display: table-cell; position: relative; cursor: default; } .grid-gutter-menu { margin: 0px 3px; width: 12px; } .grid-gutter-icon { width: 16px; height: 100%; } .grid-gutter-row-normal { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; border-color: rgb(252, 252, 252) currentColor rgb(252, 252, 252) rgb(252, 252, 252); /*[{vs-toolbox-background-color} currentColor {vs-toolbox-background-color} {vs-toolbox-background-color}]*/ background-color: rgb(252, 252, 252); /*[{vs-toolbox-background-color}]*/ } .grid-gutter-row-selected { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; border-color: rgb(252, 252, 252) currentColor rgb(252, 252, 252) rgb(252, 252, 252); /*[{vs-toolbox-background-color} currentColor {vs-toolbox-background-color} {vs-toolbox-background-color}]*/ background-color: rgb(252, 252, 252); /*[{vs-toolbox-background-color}]*/ } .grid-gutter-row-selected .grid-gutter-drop { background: url("../Common/images/common_icons.png") no-repeat -401px 50% !important; /*[url({f12-image-common-icons}) no-repeat -401px 50% !important]*/ } .grid-gutter-drop:hover { background: url("../Common/images/common_icons.png") no-repeat -401px 50% !important; /*[url({f12-image-common-icons}) no-repeat -401px 50% !important]*/ } .grid-gutter-row-selected-blur { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; border-color: rgb(252, 252, 252) currentColor rgb(252, 252, 252) rgb(252, 252, 252); /*[{vs-toolbox-background-color} currentColor {vs-toolbox-background-color} {vs-toolbox-background-color}]*/ background-color: rgb(252, 252, 252); /*[{vs-toolbox-background-color}]*/ } .grid-gutter-row-selected-blur .grid-gutter-drop { background: url("../Common/images/common_icons.png") no-repeat -401px 50% !important; /*[url({f12-image-common-icons}) no-repeat -401px 50% !important]*/ } .grid-gutter-row-current { border-width: 1px 0px 1px 1px; border-style: solid none solid solid; border-color: rgb(252, 252, 252) currentColor rgb(252, 252, 252) rgb(252, 252, 252); /*[{vs-toolbox-background-color} currentColor {vs-toolbox-background-color} {vs-toolbox-background-color}]*/ background-color: rgb(252, 252, 252); /*[{vs-toolbox-background-color}]*/ } .grid-row { margin: 0px; width: 100%; color: rgb(0, 0, 0); /*[{plugin-color}]*/ overflow: hidden; position: absolute; cursor: default; display: -ms-inline-flexbox; box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; } .grid-row:hover { color: rgb(0, 0, 0); /*[{plugin-treeview-content-mouseover-color}]*/ background-color: rgb(242, 247, 253); /*[{plugin-treeview-content-mouseover-background-color}]*/ } .grid-row-normal { border: 1px solid transparent; } .grid-row-selected, .grid-row-selected:hover { color: rgb(0, 0, 0); /*[{plugin-treeview-content-selected-color}]*/ background-color: rgb(220, 235, 252); /*[{plugin-treeview-content-selected-background-color}]*/ } .grid-row-selected a { text-decoration: none; } .grid-row-selected a:hover { text-decoration: underline; } .grid-row-selected a:visited { } .grid-row-selected a:active { } .grid-row-selected-blur { color: rgb(0, 0, 0); /*[{plugin-treeview-content-inactive-selected-color}]*/ background-color: rgb(230, 230, 230); /*[{plugin-treeview-content-inactive-selected-background-color}]*/ } .grid-row-drop-active { border-top-color: blue; border-top-width: 2px; border-top-style: solid; } .grid-row-dragging { background-color: rgb(230, 230, 230); } .grid-row-group { width: 100%; color: rgb(0, 0, 0); overflow: hidden; font-weight: bold; border-bottom-color: rgb(240, 240, 240); border-bottom-width: 1px; border-bottom-style: solid; position: absolute; cursor: default; background-color: rgb(255, 255, 255); } .grid-cell { padding: 0px 4px 0px 4px; border: currentColor; width: 100px; text-align: left; text-indent: 2px; overflow: hidden; vertical-align: middle; float: left; display: table-cell; white-space: nowrap; position: relative; cursor: default; -ms-text-overflow: ellipsis; min-height: 18px; } .grid-cell input[type='checkbox'] { margin: 0px; } .grid-cell-first { width: 100%; height: 100%; text-align: left; overflow: hidden; vertical-align: middle; cursor: default; -ms-text-overflow: ellipsis; } .grid-edit-box { border: none; width: 100%; height: 100%; } .grid-tree-icon { text-indent: 0px; position: absolute; cursor: pointer; } .grid-cell-glyph { margin-top: 3px; position: absolute; overflow: hidden; vertical-align: middle; display: inline-block; width: 10px; height: 10px; } .sample-containers { display: none; } .samples-main { left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; position: fixed; } .samples-main > .right { left: 200px; top: 0px; right: 0px; bottom: 0px; overflow: auto; position: absolute; } .samples-main > .right .demoview > div { height: 400px; overflow: auto; } html, body { height: 100%; width: 100%; line-height: 1.1em; background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ overflow: hidden; } #root { display: -ms-grid; -ms-grid-rows: auto 1fr; -ms-grid-columns: 100%; height: 100%; width: 100%; } .splitterNS { cursor: ns-resize; } .splitterEW { cursor: ew-resize; } .BPT-Toolbar .BPT-button.continueButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-continue})]*/ } .BPT-Toolbar .BPT-button.breakButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-break-all})]*/ } .BPT-Toolbar .BPT-button.stepIntoButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-step-into})]*/ } .BPT-Toolbar .BPT-button.stepOverButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-step-over})]*/ } .BPT-Toolbar .BPT-button.stepOutButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-step-out})]*/ } .BPT-Toolbar .BPT-button.breakWorkerButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-break-worker})]*/ } .BPT-Toolbar .BPT-button.prettyPrintButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-toggle-pretty-print})]*/ } .BPT-Toolbar .BPT-button.wordWrapButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-toggle-word-wrap})]*/ } .BPT-Toolbar .BPT-button.breakOnExceptionsButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-break-on-exceptions})]*/ } .BPT-Toolbar .BPT-button.jmcButton .buttonIcon { background-image: url(''); /*[url({f12-debugger-images-my-code-icon})]*/ } .BPT-Toolbar .BPT-button.sourceMapButton > .buttonIcon { background-image: url(''); /*[url({f12-debugger-toolbar-button-image-toggle-source-map})]*/ } .BPT-Toolbar .BPT-button:not(:hover):not(.disabled).breakOnExceptionsButton.breakNone .buttonIcon { background-position-y: 0px; } .BPT-Toolbar .BPT-button:not(:hover):not(.disabled).breakOnExceptionsButton.breakAll .buttonIcon { background-position-y: -54px; } .BPT-Toolbar .BPT-button:not(:hover):not(.disabled).breakOnExceptionsButton.breakUnhandled .buttonIcon { background-position-y: -36px; } .BPT-Toolbar .BPT-Search-Button .BPT-Search-Next { background-image: url(""); /*[url({f12-debugger-image-find-next})]*/ background-repeat: no-repeat; background-position: 0 0; background-size: 32px 16px; display: inline-block; width: 16px; height: 16px; } .BPT-Toolbar .BPT-Search-Button .BPT-Search-Previous { background-image: url(""); /*[url({f12-debugger-image-find-previous})]*/ background-repeat: no-repeat; background-position: 0 0; background-size: 32px 16px; display: inline-block; width: 16px; height: 16px; } /* Beginning section: the css for the legacy toolbar button states */ .toolbarButtonMouseHover { background-color: TRANSPARENT !important; /*[{f12-toolbar-button-hover-color} !important]*/ } .toolbarButtonMouseHover > .icon_14x14 { background-position-y: -16px; } .toolbarButtonMouseHover > .icon_16x16 { background-position-y: -18px; } .toolbarButtonMouseHover > .icon_27x16 { background-position-y: -18px; } .toolbarButtonMouseHover > .icon_25x16 { background-position-y: -18px; } .toolbarButtonStateDisabled { background-color: transparent; } .toolbarButtonStateDisabled > .icon_14x14 { background-position-y: -32px; } .toolbarButtonStateDisabled > .icon_16x16 { background-position-y: -36px; } .toolbarButtonStateDisabled > .icon_27x16 { background-position-y: -72px; } .toolbarButtonStateDisabled > .icon_25x16 { background-position-y: -72px; } .toolbarButtonMouseDown { background-color: TRANSPARENT !important; /*[{f12-toolbar-button-pressed-color} !important]*/ } /* Ending section: the css for the legacy toolbar button states */ .windowtoolbar { text-align: right; height: 20px; margin: 3px 20px 3px 20px; overflow: hidden; } #debuggerContent { -ms-grid-columns: 1fr 3px 430px; -ms-grid-row: 2; -ms-grid-rows: 100%; display: -ms-grid; width: 100%; height: 100%; } #leftBlock { position: relative; -ms-grid-column: 1; display: -ms-grid; -ms-grid-rows: 24px 1fr; -ms-grid-columns: 100%; } #tabStripContainer { -ms-grid-row: 1; overflow: hidden; height: 2em; } .editorConsoleContainer { -ms-grid-row: 2; -ms-grid-columns: 1fr; -ms-grid-rows: 1fr 3px 200px; display: -ms-grid; height: 100%; width: 100%; } .editorConsoleContainer > #editor { -ms-grid-column: 1; -ms-grid-row: 1; height: 100%; overflow: hidden; width: 100%; position: relative; } .editorConsoleContainer > #hEditorConsoleSplitter { -ms-grid-column: 1; -ms-grid-row: 2; background-color: TRANSPARENT; /*[{plugin-perftools-grid-column-sizer}]*/ cursor: ns-resize; height: 3px; width: 100%; } .editorConsoleContainer > #console { -ms-grid-column: 1; -ms-grid-row: 3; height: 100%; width: 100%; } #vEditorDataWindowsSplitter { -ms-grid-column: 2; width: 3px; cursor: ew-resize; background-color: TRANSPARENT; /*[{plugin-perftools-grid-column-sizer}]*/ } .controlsSplitPane { -ms-grid-column: 3; -ms-grid-columns: 1fr; -ms-grid-rows: 1fr 3px 1fr; display: -ms-grid; height: 100%; overflow: hidden; width: 100%; } .controlsSplitPane > #topDataWindowsParent { -ms-grid-column: 1; -ms-grid-row: 1; height: 100%; overflow: hidden; width: 100%; } .controlsSplitPane > #hDataWindowsSplitter { -ms-grid-column: 1; -ms-grid-row: 2; background-color: TRANSPARENT; /*[{plugin-perftools-grid-column-sizer}]*/ cursor: ns-resize; height: 5px; width: 100%; } .controlsSplitPane > #bottomDataWindowsParent { -ms-grid-column: 1; -ms-grid-row: 3; height: 100%; overflow: hidden; width: 100%; } .controlsContainer { display: -ms-grid; -ms-grid-rows: 25px 1fr; -ms-grid-columns: 100%; padding: 0; height: 100%; width: 100%; overflow: hidden; } .controlsContainer .tabStrip { -ms-grid-row: 1; background-color: TRANSPARENT; /*[{plugin-debugger-tab-area-background-color}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-size: 12pt; /*[{plugin-font-size}]*/ height: 25px; margin: 0; padding: 0; user-select: none; white-space: nowrap; width: 100%; } .controlsContainer .tabStrip > * { vertical-align: middle; } .controlsContainer .tabStrip .tabTitle { margin-right: 18px; margin-left: 10px; padding-top: 4px; color: TRANSPARENT; /*[{plugin-debugger-tab-color}]*/ cursor: default; } .controlsContainer .tabStrip .tabTitle:hover { color: TRANSPARENT; /*[{plugin-link-hover-color}]*/ } .controlsContainer .tabStrip .tabTitle.selected { color: TRANSPARENT; /*[{plugin-link-active-color}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ font-weight: 600; } .controlsContainer .contentPane { -ms-grid-row: 2; width: 100%; height: 100%; border: none; padding-left: 0px; } .controlsContainer .contentPane .controlContents { display: none; } .controlsContainer .contentPane .controlContents.controlVisible { display: block; } .controlsContainer .controlContents { height: 100%; width: 100%; display: inline-block; vertical-align: middle; padding-top: 0px; } .filePickerMenu { z-index: -1; /* Start with the file picker behind other UI components. This gets moved forward in script. */ position: relative; left: 0; top: 22px; height: 0; width: 0; border: 1px solid TRANSPARENT; /*[1px solid {f12-toolbar-button-selected-border-color}]*/ box-shadow: 2px 2px 2px TRANSPARENT; /*[2px 2px 2px {plugin-textbox-border-color rgba(0.5)}]*/ background-color: TRANSPARENT; /*[{plugin-debugger-filepicker-background-color}]*/ overflow: visible; } .filePickerMenu .fileListContainer { position: absolute; left: 0; top: 31px; } .filePickerMenu .filterBox { background-color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-background-color}]*/ color: TRANSPARENT; /*[{plugin-searchcontrol-mouseover-background-foreground-color}]*/ border-color: TRANSPARENT; /*[{plugin-searchcontrol-unfocused-border-color}]*/ height: 22px; position: absolute; top: 5px; left: 7px; } .filePickerMenu .filterBox::-ms-clear { display: block; } .filePickerMenu .filterBox::-ms-clear:hover { color: TRANSPARENT; /*[{plugin-searchcontrol-clear-hover-color}]*/ } .filePickerMenu .filterBox:-ms-input-placeholder { background: transparent url("") 98% 50% no-repeat; /*[transparent url({f12-debugger-image-search}) 98% 50% no-repeat]*/ background-size: 14px; color: TRANSPARENT; /*[{plugin-searchcontrol-unfocused-watermark-text-color}]*/ } .filePickerMenu .noResults { position: absolute; top: 31px; left: 7px; } .filePickerMenu .scriptFile, .filePickerMenu .htmlFile, .filePickerMenu .cssFile, .filePickerMenu .tsFile, .filePickerMenu .filesNode { float: left; width: 14px; height: 14px; background-repeat: no-repeat; background-size: 14px 14px; background-color: transparent; } .filePickerMenu .scriptFile { background-image: url(""); /*[url({f12-debugger-image-script-file})]*/ } .filePickerMenu .htmlFile { background-image: url(""); /*[url({f12-debugger-image-html-file})]*/ } .filePickerMenu .cssFile { background-image: url(""); /*[url({f12-debugger-image-css-file})]*/ } .filePickerMenu .tsFile { background-image: url(""); /*[url({f12-debugger-image-ts-file})]*/ } .filePickerMenu .filesNode { background-image: url(""); /*[url({f12-debugger-image-files-node})]*/ } .filePickerMenu .fileName { float: right; } .filePickerMenu .fileItem { cursor: default; } .filePickerMenu .libraryIcon { float: right; margin-top: -1px !important; padding-top: 0 !important; padding-bottom: 0 !important; } .filePickerMenu .libraryIcon .buttonIcon.icon_16x16 { margin-top: 0px !important; width: 19px; height: 19px; } .filePickerMenu .listview-grid-row:hover .libraryIcon > .buttonIcon, .filePickerMenu .libraryIcon .checked { background-image: url(''); /*[url({f12-debugger-images-library-code-icon})]*/ } .filePickerMenu .listview-grid-row:hover .libraryIcon:hover > .buttonIcon { background-image: url(''); /*[url({f12-debugger-images-library-code-icon})]*/ background-position: 0px -18px; } .filePickerMenu .listview-grid-row-selected, .filePickerMenu .listview-grid-row:hover { color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/ background-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-background-color}]*/ } .filePickerMenu .openedDocument .fileItem { font-weight: bold; } .filePickerMenu .flatView .listview-grid-groupline { display: none !important; } .filePickerMenu .refresh { overflow: hidden; } .filePickerMenu .refresh .listview { overflow: visible; } .filePickerMenu .flatView .listview-grid-cell { margin-left: 0; } #filePickerButton { border: 1px solid transparent; position: absolute; float: left; left: 5px; overflow: hidden; width: 32px; height: 22px; background: url("") no-repeat center center; /*[url({f12-debugger-image-file-picker}) no-repeat center center]*/ background-position: 0px 0px; background-size: 27px 54px; } #filePickerButton:hover { background-position-y: -18px; border: 1px solid TRANSPARENT; /*[1px solid {f12-toolbar-button-hover-color}]*/ background-color: TRANSPARENT; /*[{f12-toolbar-button-hover-color}]*/ } #filePickerButton.activated { background-color: TRANSPARENT; /*[{f12-toolbar-button-selected-color}]*/ background-position-y: -18px; height: 23px; border-top: 1px solid TRANSPARENT; /*[1px solid {f12-toolbar-button-selected-border-color}]*/ border-left: 1px solid TRANSPARENT; /*[1px solid {f12-toolbar-button-selected-border-color}]*/ border-right: 1px solid TRANSPARENT; /*[1px solid {f12-toolbar-button-selected-border-color}]*/ border-bottom: 1px solid TRANSPARENT; /*[1px solid {f12-toolbar-button-selected-color}]*/ z-index: 1001; } .filePickerMenu .listview-icon-tree-collapsed { background-image: url(""); /*[url({f12-debugger-images-item-collapsed})]*/ background-repeat: no-repeat; background-size: 10px 10px; } .filePickerMenu .listview-icon-tree-expanded { background-image: url(""); /*[url({f12-debugger-images-item-expanded})]*/ background-repeat: no-repeat; background-size: 10px 10px; } .filePickerMenu .flatView .listview-icon-tree-expanded, .filePickerMenu .flatView .listview-icon-tree-collapsed { background-image: none; } .filePickerMenu .listview-grid-separator { display: none; } .filePickerMenu .listview-grid-row-selected:focus { color: TRANSPARENT; /*[{plugin-treeview-content-selected-color}]*/ background-color: TRANSPARENT; /*[{plugin-treeview-content-selected-background-color}]*/ } .filePickerMenu .listview-grid-row { -ms-user-select: none; } .plugin-contextmenu .menuitem .shortcut { min-width: 20px; } .windowtoolbar > .toggledOn:not(.toolbarButtonStateDisabled) { background-color: TRANSPARENT; /*[{f12-toolbar-button-selected-color}]*/ border-color: TRANSPARENT; /*[{f12-toolbar-button-selected-border-color}]*/ } #debuggerAriaAlertZone { font-size: 0px; z-index: -1000; } #resizePane { position: absolute; height: 100%; width: 100%; background-color: transparent; /* Should act like a transparent pane */ z-index: -1000; } #resizePane.showResizePane { z-index: 100; }{ "start_url": "debugger.html", "domain": "http://microsoft.com", "name": "Debugger", "version": "1.0", "f12": { "localized_tab_resource": "DebuggerTitle", "localized_tooltip_id": 201, "resource_aliases" : { "Debugger": { "is_default" : true }, "Common": { } }, "themed_images": { "f12-debugger-image-search": { "bitmap_source": "images\\search.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-host-error-alert": { "bitmap_source": "..\\pluginhost\\theme\\i_alerterror.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-host-error-close": { "bitmap_source": "..\\pluginhost\\theme\\closeErrorBox.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-host-error-help": { "bitmap_source": "..\\pluginhost\\theme\\helpErrorBox.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-continue": { "bitmap_source": "images\\continue.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-break-all": { "bitmap_source": "images\\breakAll.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-step-into": { "bitmap_source": "images\\stepInto.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-step-over": { "bitmap_source": "images\\stepOver.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-step-out": { "bitmap_source": "images\\stepOut.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-break-worker": { "bitmap_source": "images\\breakWorker.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-toggle-pretty-print": { "bitmap_source": "images\\togglePrettyPrint.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-toggle-word-wrap": { "bitmap_source": "images\\toggleWordWrap.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-toggle-source-map": { "bitmap_source": "images\\toggleSourceMap.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-toolbar-button-image-break-on-exceptions": { "bitmap_source": "images\\breakOnExceptions.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-script-file": { "bitmap_source": "images\\scriptfileicon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-html-file": { "bitmap_source": "images\\htmlfileicon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-ts-file": { "bitmap_source": "images\\tsfileicon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint": { "bitmap_source": "Breakpoints\\images\\breakpointGlyph.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-conditional": { "bitmap_source": "Breakpoints\\images\\conditionalBreakpoint.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-delete-all": { "bitmap_source": "Breakpoints\\images\\deleteAllBreakpoints.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-disabled": { "bitmap_source": "Breakpoints\\images\\breakpointDisabled.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-edit-current": { "bitmap_source": "Breakpoints\\images\\editCurrentBreakpoint.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-select-all": { "bitmap_source": "Breakpoints\\images\\selectAllBreakpoints.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-tracepoint": { "bitmap_source": "Breakpoints\\images\\tracepointBreakpoint.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-unbound": { "bitmap_source": "Breakpoints\\images\\breakpointUnbound.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-add-event-tracepoint": { "bitmap_source": "Breakpoints\\images\\addEventTracepoint.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-breakpoint-add-event-breakpoint": { "bitmap_source": "Breakpoints\\images\\addEventBreakpoint.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-event-breakpoint": { "bitmap_source": "Breakpoints\\images\\eventBreakpoint.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-event-breakpoint-conditional": { "bitmap_source": "Breakpoints\\images\\eventBreakpointConditional.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-event-breakpoint-disabled": { "bitmap_source": "Breakpoints\\images\\eventBreakpointDisabled.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-event-breakpoint-unbound": { "bitmap_source": "Breakpoints\\images\\eventBreakpointUnbound.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-event-tracepoint": { "bitmap_source": "Breakpoints\\images\\eventTracepoint.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-event-tracepoint-disabled": { "bitmap_source": "Breakpoints\\images\\eventTracepointDisabled.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-event-tracepoint-unbound": { "bitmap_source": "Breakpoints\\images\\eventTracepointUnbound.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-callstack-active-frame": { "bitmap_source": "Callstack\\images\\activeFrameGlyph.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-callstack-instruction-pointer": { "bitmap_source": "Callstack\\images\\instructionPointerGlyph.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-callstack-pause-worker": { "bitmap_source": "Callstack\\images\\pauseWorker.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-callstack-toggle-async-frames": { "bitmap_source": "Callstack\\images\\toggleAsyncFrames.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-callstack-toggle-jmc-frames": { "bitmap_source": "Callstack\\images\\toggleJMCFrames.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-css-file": { "bitmap_source": "images\\cssfileicon.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-common-icons": { "bitmap_source": "..\\Common\\images\\common_icons.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-file-picker": { "bitmap_source": "images\\filepicker.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-files-node": { "bitmap_source": "images\\filesnodeicon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-find-next": { "bitmap_source": "..\\Common\\images\\i_next.png", "background_color": "plugin-searchcontrol-mouseover-background-background-color" }, "f12-debugger-image-find-previous": { "bitmap_source": "..\\Common\\images\\i_previous.png", "background_color": "plugin-searchcontrol-mouseover-background-background-color" }, "f12-debugger-image-grid-control-add-row": { "bitmap_source": "..\\Common\\images\\add_row.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-grid-control-column-move": { "bitmap_source": "..\\Common\\images\\columnmove.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-images-item-collapsed": { "bitmap_source": "..\\Common\\images\\itemCollapsedIcon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-images-item-expanded": { "bitmap_source": "..\\Common\\images\\itemExpandedIcon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-images-library-code-icon": { "bitmap_source": "images\\libraryCodeIcon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-images-my-code-icon": { "bitmap_source": "images\\myCodeIcon.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-misc-icons": { "bitmap_source": "..\\Common\\images\\misc_icons.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-tab-control-close": { "bitmap_source": "..\\Common\\images\\tabclose.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-tab-control-next": { "bitmap_source": "images\\nextTab.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-tab-control-previous": { "bitmap_source": "images\\prevTab.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-tree-icons": { "bitmap_source": "..\\Common\\images\\tree_icons.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-watches-add-watch": { "bitmap_source": "Watches\\images\\addWatch.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-watches-delete-watch": { "bitmap_source": "..\\Common\\images\\i_delete.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-watches-delete-all": { "bitmap_source": "Watches\\images\\deleteAll.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-watches-function": { "bitmap_source": "images\\functionIcon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-watches-not-a-function": { "bitmap_source": "images\\notAFunctionIcon.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-watches-return-value": { "bitmap_source": "images\\returnValue.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-editor-scroll-arrow-up": { "bitmap_source": "editor\\vs\\base\\ui\\scrollbar\\impl\\arrow-up.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-editor-scroll-arrow-down": { "bitmap_source": "editor\\vs\\base\\ui\\scrollbar\\impl\\arrow-down.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-editor-scroll-arrow-left": { "bitmap_source": "editor\\vs\\base\\ui\\scrollbar\\impl\\arrow-left.png", "background_color": "plugin-font-editor-background-color" }, "f12-debugger-image-editor-scroll-arrow-right": { "bitmap_source": "editor\\vs\\base\\ui\\scrollbar\\impl\\arrow-right.png", "background_color": "plugin-font-editor-background-color" }, "plugin-menu-item-checkmark": { "bitmap_source": "..\\Common\\images\\checkmark.png", "background_color": "plugin-font-editor-background-color" } } }, "file_aliases": { "PerformanceTraceExtension": { "path": "PerformanceTrace.dll", "optional": true } } } { "collectionsTitle": "Typical Events", "collectionsTitleLocId": "EventListTypicalEvents", "collections": [ { "title": "Mouse Events", "titleLocId": "EventListMouseEvents", "tooltipLocId": "EventListMouseEvents", "eventKeys": [ "click", "dblclick", "mousedown", "mouseup", "contextmenu" ] }, { "title": "Keyboard Events", "titleLocId": "EventListKeyboardEvents", "tooltipLocId": "EventListKeyboardEvents", "eventKeys": [ "keydown", "keyup", "keypress" ] }, { "title": "Pointer Events", "titleLocId": "EventListPointerEvents", "tooltipLocId": "EventListPointerEvents", "eventKeys": [ "pointerup", "pointerdown", "contextmenu", "click", "dblclick" ] } ], "categories": [ { "title": "Timer", "titleLocId": "EventListTimer", "tooltipLocId": "EventListTimer", "events": [ { "eventKey": "requestanimationframe" }, { "eventKey": "setimmediate" }, { "eventKey": "setinterval" }, { "eventKey": "settimeout" } ] }, { "title": "Mouse", "titleLocId": "EventListMouse", "events": [ { "eventKey": "click" }, { "eventKey": "dblclick" }, { "eventKey": "mousedown" }, { "eventKey": "mouseup" }, { "eventKey": "mouseover" }, { "eventKey": "mousemove" }, { "eventKey": "mouseout" }, { "eventKey": "mousewheel" }, { "eventKey": "mouseenter" }, { "eventKey": "mouseleave" }, { "eventKey": "contextmenu" } ] }, { "title": "Keyboard", "titleLocId": "EventListKeyboard", "events": [ { "eventKey": "keydown" }, { "eventKey": "keyup" }, { "eventKey": "keypress" }, { "eventKey": "input" } ] }, { "title": "Pointer", "titleLocId": "EventListPointer", "events": [ { "eventKey": "click" }, { "eventKey": "dblclick" }, { "eventKey": "contextmenu" }, { "eventKey": "pointercancel" }, { "eventKey": "pointerdown" }, { "eventKey": "pointerenter" }, { "eventKey": "pointerleave" }, { "eventKey": "pointermove" }, { "eventKey": "pointerout" }, { "eventKey": "pointerover" }, { "eventKey": "pointerup" }, { "eventKey": "gotpointercapture" }, { "eventKey": "lostpointercapture" }, { "eventKey": "MSPointerCancel" }, { "eventKey": "MSPointerDown" }, { "eventKey": "MSPointerEnter" }, { "eventKey": "MSPointerLeave" }, { "eventKey": "MSPointerMove" }, { "eventKey": "MSPointerOut" }, { "eventKey": "MSPointerOver" }, { "eventKey": "MSPointerOut" }, { "eventKey": "MSGotPointerCapture" }, { "eventKey": "MSLostPointerCapture" } ] }, { "title": "Focus", "titleLocId": "EventListFocus", "events": [ { "eventKey": "focus" }, { "eventKey": "focusin" }, { "eventKey": "focusout" }, { "eventKey": "blur" } ] }, { "title": "Misc", "titleLocId": "EventListMisc", "events": [ { "eventKey": "help" }, { "eventKey": "abort" }, { "eventKey": "afterprint" }, { "eventKey": "beforeprint" }, { "eventKey": "emptied" }, { "eventKey": "ended" }, { "eventKey": "canplaythrough" }, { "eventKey": "durationchange" }, { "eventKey": "loadeddata" }, { "eventKey": "loadedmetadata" }, { "eventKey": "loadstart" }, { "eventKey": "readystatechange" } ] }, { "title": "Window", "titleLocId": "EventListWindow", "events": [ { "eventKey": "beforeunload" }, { "eventKey": "error" }, { "eventKey": "hashchange" }, { "eventKey": "load" }, { "eventKey": "message" }, { "eventKey": "pagehide" }, { "eventKey": "pageshow" }, { "eventKey": "popstate" }, { "eventKey": "unload" } ] }, { "title": "Control", "titleLocId": "EventListControl", "events": [ { "eventKey": "change" }, { "eventKey": "contextmenu" }, { "eventKey": "drag" }, { "eventKey": "dragend" }, { "eventKey": "dragenter" }, { "eventKey": "dragleave" }, { "eventKey": "dragover" }, { "eventKey": "dragstart" }, { "eventKey": "drop" }, { "eventKey": "input" }, { "eventKey": "reset" }, { "eventKey": "resize" }, { "eventKey": "scroll" }, { "eventKey": "select" }, { "eventKey": "submit" } ] }, { "title": "Device", "titleLocId": "EventListDevice", "events": [ { "eventKey": "devicemotion" }, { "eventKey": "deviceorientation" }, { "eventKey": "MSGestureChange" }, { "eventKey": "MSGestureTap" }, { "eventKey": "MSGestureEnd" }, { "eventKey": "MSGestureHold" }, { "eventKey": "MSGestureStart" }, { "eventKey": "MSInertiaStart" } ] }, { "title": "Media", "titleLocId": "EventListMedia", "events": [ { "eventKey": "canplay" }, { "eventKey": "canplaythrough" }, { "eventKey": "durationchange" }, { "eventKey": "offline" }, { "eventKey": "online" }, { "eventKey": "pause" }, { "eventKey": "play" }, { "eventKey": "playing" }, { "eventKey": "progress" }, { "eventKey": "ratechange" }, { "eventKey": "seeked" }, { "eventKey": "seeking" }, { "eventKey": "stalled" }, { "eventKey": "storage" }, { "eventKey": "suspend" }, { "eventKey": "timeupdate" }, { "eventKey": "volumechange" }, { "eventKey": "waiting" } ] } ] } #BreakpointWindow { width: 100%; height: 100%; } #BreakpointWindow > .windowtoolbar { -ms-grid-columns: 1fr auto auto auto auto; display: -ms-grid; } #BreakpointWindow > .windowtoolbar > #addEventTracepointButton { -ms-grid-column: 2; } #BreakpointWindow > .windowtoolbar > #addEventTracepointButton > .buttonIcon { background-image: url('Breakpoints/images/addEventTracepoint.png'); /*[url({f12-debugger-image-breakpoint-add-event-tracepoint})]*/ } #BreakpointWindow > .windowtoolbar > #addEventBreakpointButton { -ms-grid-column: 3; } #BreakpointWindow > .windowtoolbar > #addEventBreakpointButton > .buttonIcon { background-image: url('Breakpoints/images/addEventBreakpoint.png'); /*[url({f12-debugger-image-breakpoint-add-event-breakpoint})]*/ } #BreakpointWindow > .windowtoolbar > #toggleAllBreakpointsButton { -ms-grid-column: 4; } #BreakpointWindow > .windowtoolbar > #toggleAllBreakpointsButton > .buttonIcon { background-image: url('Breakpoints/images/selectAllBreakpoints.png'); /*[url({f12-debugger-image-breakpoint-select-all})]*/ } #BreakpointWindow > .windowtoolbar > #deleteAllBreakpointsButton { -ms-grid-column: 5; } #BreakpointWindow > .windowtoolbar > #deleteAllBreakpointsButton > .buttonIcon { background-image: url('Breakpoints/images/deleteAllBreakpoints.png'); /*[url({f12-debugger-image-breakpoint-delete-all})]*/ } #BreakpointWindow > .breakpointgrid { overflow: auto; height: calc(100% - 20px); width: 100%; } #BreakpointWindow .bpRow { display: -ms-grid; -ms-grid-columns: 13px 8px 20px 8px 1fr 42px; -ms-grid-rows: auto; padding: 0px 5px 2px 7px; } #BreakpointWindow .bpRow.selected { background-color: TRANSPARENT; /*[{plugin-debugger-grid-row-selected-background-color rgba(0.2)}]*/ } #BreakpointWindow .bpRow:hover { background-color: TRANSPARENT; /*[{plugin-debugger-grid-row-hover-background-color}]*/ } #BreakpointWindow .bpRow.selected:hover { background-color: TRANSPARENT; /*[{plugin-debugger-grid-row-selected-background-color rgba(0.2)}]*/ } #BreakpointWindow .bpRow.contextTarget { background-color: TRANSPARENT; /*[{plugin-debugger-grid-row-hover-background-color}]*/ } #BreakpointWindow .bpRow .bpCheckbox { display: inline-block; padding: 0; margin: 0px; -ms-grid-column: 1; padding: 1px 0px 0px 2px; background-color: transparent; } #BreakpointWindow .bpRow .bpIcon { display: inline-block; -ms-grid-column: 3; width: 16px; height: 20px; background-repeat: no-repeat; background-position-y: 4px; } #BreakpointWindow .bpRow .bpText { display: inline-block; -ms-grid-column: 5; padding-top: 4px; overflow: hidden; } #BreakpointWindow .bpRow .bpText .bpLink:hover { cursor: pointer; } #BreakpointWindow .bpRow > .bpItemControls { -ms-grid-column: 6; -ms-grid-columns: 2; text-align: right; overflow: hidden; display: -ms-grid; white-space: nowrap; } #BreakpointWindow .bpRow > .bpItemControls > .bpEditButton { -ms-grid-column: 1; visibility: hidden; margin: 2px; } #BreakpointWindow .bpRow > .bpItemControls > .bpEditButton > .buttonIcon { background-image: url('Breakpoints/images/editCurrentBreakpoint.png'); /*[url({f12-debugger-image-breakpoint-edit-current})]*/ } #BreakpointWindow .bpRow > .bpItemControls > .bpDeleteButton { -ms-grid-column: 2; visibility: hidden; margin: 2px; } #BreakpointWindow .bpRow > .bpItemControls > .bpDeleteButton > .buttonIcon { background-image: url('../common/images/i_delete.png'); /*[url({f12-debugger-image-breakpoint-delete-current})]*/ } #BreakpointWindow .bpRow:hover > .bpItemControls > .bpEditButton, #BreakpointWindow .bpRow:hover > .bpItemControls > .bpDeleteButton { visibility: visible; } #BreakpointWindow .bpRow > .bpItemControls > button { margin: 1px; margin-left: 7px; margin-top: 2px; height: 16px; width: 16px; padding: 0; border: 1px solid transparent; background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ position: relative; vertical-align: top; } #BreakpointWindow .bpRow > .bpItemControls > button:hover { background-color: TRANSPARENT; /*[{vs-command-bar-mouse-over-background-middle1-color}]*/ border: 1px solid TRANSPARENT; /*[1px solid {vs-command-bar-selected-border-color}]*/ color: TRANSPARENT; /*[{vs-command-bar-text-selected-color}]*/ background-position-y: -16px; cursor: pointer; } #BreakpointWindow .breakpointGlyph { background-position: 0px 0px; background-repeat: no-repeat; background-size: 14px 14px; } #BreakpointWindow .breakpointimg { background-image: url('Breakpoints/images/breakpointGlyph.png'); /*[url({f12-debugger-image-breakpoint})]*/ } #BreakpointWindow .tracepointimg { background-image: url('Breakpoints/images/tracepointBreakpoint.png'); /*[url({f12-debugger-image-breakpoint-tracepoint})]*/ } #BreakpointWindow .conditionalimg { background-image: url('Breakpoints/images/conditionalBreakpoint.png'); /*[url({f12-debugger-image-breakpoint-conditional})]*/ } #BreakpointWindow .bpUnbound { background-image: url('Breakpoints/images/breakpointUnbound.png'); /*[url({f12-debugger-image-breakpoint-unbound})]*/ } #BreakpointWindow .bpDisabled { background-image: url('Breakpoints/images/breakpointDisabled.png'); /*[url({f12-debugger-image-breakpoint-disabled})]*/ } #BreakpointWindow .eventBreakpointImg { background-image: url('Breakpoints/images/eventBreakpoint.png'); /*[url({f12-debugger-image-event-breakpoint})]*/ } #BreakpointWindow .eventBreakpointConditionalImg { background-image: url('Breakpoints/images/eventBreakpointConditional.png'); /*[url({f12-debugger-image-event-breakpoint-conditional})]*/ } #BreakpointWindow .eventBreakpointImg.bpUnbound, #BreakpointWindow .eventBreakpointConditionalImg.bpUnbound { background-image: url('Breakpoints/images/eventBreakpointUnbound.png'); /*[url({f12-debugger-image-event-breakpoint-unbound})]*/ } #BreakpointWindow .eventBreakpointImg.bpDisabled, #BreakpointWindow .eventBreakpointConditionalImg.bpDisabled { background-image: url('Breakpoints/images/eventBreakpointDisabled.png'); /*[url({f12-debugger-image-event-breakpoint-disabled})]*/ } #BreakpointWindow .eventTracepointImg { background-image: url('Breakpoints/images/eventTracepoint.png'); /*[url({f12-debugger-image-event-tracepoint})]*/ } #BreakpointWindow .eventTracepointImg.bpUnbound { background-image: url('Breakpoints/images/eventTracepointUnbound.png'); /*[url({f12-debugger-image-event-tracepoint-unbound})]*/ } #BreakpointWindow .eventTracepointImg.bpDisabled { background-image: url('Breakpoints/images/eventTracepointDisabled.png'); /*[url({f12-debugger-image-event-tracepoint-disabled})]*/ } .lightDismissPromptContainer { display: block; padding: 12px; border: 1px solid TRANSPARENT; /*[1px solid {plugin-contextmenu-active-border-color}]*/ background: TRANSPARENT; /*[{plugin-contextmenu-background-color}]*/ box-shadow: 2px 2px 2px TRANSPARENT; /*[2px 2px 2px {plugin-textbox-border-color rgba(0.5)}]*/ color: TRANSPARENT; /*[{plugin-color}]*/ font-size: 12px; position: absolute; z-index: 1010; } .lightDismissPromptContainer .popupInnerContainer div { color: TRANSPARENT; /*[{plugin-textbox-color}]*/ } .lightDismissPromptContainer .popupInnerContainer > div:first-child { font-size: 13px; font-weight: bold; margin-bottom: 12px; } .lightDismissPromptContainer .popupInnerContainer { height: auto; width: 100%; } .lightDismissPromptContainer .popupInputContainer { display: -ms-grid; -ms-grid-columns: auto 6px 1fr; margin-top: 18px; } .lightDismissPromptContainer .popupInputContainer.withHelp { -ms-grid-columns: auto 6px 1fr 6px 20px; } .lightDismissPromptContainer .popupInputContainer .promptInputLabel { width: auto; display: inline; } .lightDismissPromptContainer .popupInputContainer .promptInputBox { -ms-grid-column: 3; width: 100%; } /* The group labels in the event breakpoint prompt need an explicit color assigned to render properly in High Contrast mode */ .lightDismissPromptContainer .popupInputContainer .promptInputBox > optgroup { color: TRANSPARENT; /*[{plugin-color}]*/ } .lightDismissPromptContainer .popupInputContainer .promptHelpButton { -ms-grid-column: 5; width: 100%; min-width: 0; margin: 0; padding: 0; background-image: none; border: 1px solid TRANSPARENT; /*[1px solid {plugin-contextmenu-border-color}]*/ color: TRANSPARENT; /*[{plugin-color}]*/ } .lightDismissPromptContainer .popupButtonContainer { float: right; } .lightDismissPromptContainer .popupButtonContainer button { margin-top: 18px; margin-bottom: 0; padding: 2px 6px; min-width: 65px; background-image: none; border: 1px solid TRANSPARENT; /*[1px solid {plugin-contextmenu-border-color}]*/ color: TRANSPARENT; /*[{plugin-color}]*/ } .lightDismissPromptContainer .popupButtonContainer button:first-child { margin-right: 9px; } .lightDismissPromptContainer .popupButtonContainer .okButton:hover, .lightDismissPromptContainer .popupButtonContainer .cancelButton:hover { border: 1px solid TRANSPARENT; /*[1px solid {plugin-contextmenu-active-border-color}]*/ } .setTracepointContainer, .setConditionContainer { min-height: 100px; width: 350px; top: calc(50% - 80px); left: calc(50% - 175px); } .addEventBreakpointContainer, .addEventTracepointContainer { min-height: 100px; width: 350px; top: calc(50% - 80px); left: calc(50% - 175px); } PNG  IHDRr ߔ pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx 0E]AD%Pt@: $B P 'np \&(,!@ĿzyŞoaL,)0-;@|t{E(6wyV]`s`JCrWwagU@q4֤ѢIi5~`j:q԰LkjZFw6DK+?0昸~caEYhexjikeRki 0;IF7e"W `UL -J w*Y(IENDB`PNG  IHDRr ߔ pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FcIDATxܖMR@F_<{",O @8prYSq覡" ,OU *¨{`>Yɚ4ta4'mMB=g_0k#ؔvTsT`؅ogؔmMy!\a]s:Dӽ&*G"b%ėn0E} IYX(V@R2}J[2hkJ Q:&ۥjw5iG֦ښѭE1j;&iRl96wG3_6}YFRQ T0tIENDB`PNG  IHDRr ߔ pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxֻ 0 ;fHr0YX.;@!!,J(S@Ee'ZbC({0Kzwb`B)5ĚP cU 'J%R{E=P`7F؅N0.'u4.m.ex'1CyLwt}piuIENDB`PNG  IHDRr ߔ pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FuIDATxĖm0xTʛ_`6N@lLnlPY/{@&)Rdߌt9hßj P g=b%Rx`mA^#$-|,oQ mEǁXO$;u+Xېc$g3<[}΀Z7rPn2L;1+P1}2:H͵2AB뎩Ԅ FϞ p37 遣 czՈS#F!gkT),듨Lt!i*ؘR}$VUynJ oCV.Qcgmid.]1V@VP#߹IENDB`PNG  IHDRr ߔ pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxڬ1P瞈4DbDJi`o7H7V^)E AIpBziH /E1<0?1M0`9 `rYk1 @ Phc\R\1>>q,GXz[ p^THDG4.5P`;`| ]4.s#%H0 @ :FwƑf$Gh(K.L LTGgmDpa{7,kҸt-mp&Er|{I]+̔[VˤxXkӀ2.e(M,R(i.]3BM/"q[v>,}T d_nk3oq{2e9;v:&V*6ͣs ,@ezRiй 'A4 +rY:OhZK9p;AS>!3U~e^[|݃ ΃]G ".I~k+mh5*Z/U IENDB`PNG  IHDR `|"p1IDATx^ZKF9&'@kEe7w H9\ {kMmf(p5~d>{9n@oߙI߿,|ܦ]09_fx+83@%[9]6Q#9m}`tfAzPP|| >WK"ʄ5drȪ,DkEcRǍ81ܶx6QZ:KsvT^y6E0~9A" R*s*exUuHQ3B'JC:#6'򌚑P $@Ln?D}AɩH07'Y7%{ [}g=_}g42BIu}g8Q;pc3oSq=^0bbII:b mP=/xA &ssI txz]YCU̻ S1xPn`Myd[`l? J誠v$D sp=0Y7 Xi7yȥ H pc7.6s9,O-h?lDiNI7>RwmCqKQ^`@v>>X{@~R@b/P@sIENDB`PNG  IHDR `|"p pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx1r0v|! 7-B;{ʺ G#p!?!ș$z,zDuBRཿelF@)b pXţ- ˲Ue) /ƫ!>ߴ,Ͷae6IY[jߓ'@RJkDRBngGc'x[Oƻ:fQTo*@k*[@Blm=+WuИd8qin׶s-깋yrE..pPS 6t %_D"r%hz ,clw} nùcݽHz`;?+H~ Ug@S@ML> П"ٳu8?5"I^~ZW~ 4E&yM(t`smU~:hL2~ǽp-BpE.K |RBx?pK=ۖ ~  x?">R":@Ry~`/:!TUur? Y b8?RD$: RH(t`XI"a)A!%tzžBm߆_H PGIENDB`PNG  IHDR `|"p pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxM0P'# ;AΝ "F`rI#8QKHTB|llva%\PU/UJj}JGp_[@9kۏZ^)}G`k'T};!,!2$D&O& —$>oA$^Q"Izmkr½%N];p5p@ _# ׮a{$X!OK |6$\rf;>0t~p޾IֶwXiw8C̦bNf4J ( @D(~ pz i}>tMZ 䆯 / ;Jg#b} Rl} (prI}}`gx>1SRn15 w7}1r6vB0ç4TBdGILp—$h} F[@Np)eZ 䆯 / ;Jg#b} Rl} (prI}}@Jg-α,IENDB`PNG  IHDR `|"p pHYs  9iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-04-09T16:47:29-07:00 2014-04-09T16:49:21-07:00 2014-04-09T16:49:21-07:00 xmp.iid:450a78cf-5285-f94a-acb6-23a2cfdb6a24 xmp.did:35CE0DDBBEA711E3AB579E0DF83F0131 xmp.iid:35CE0DD8BEA711E3AB579E0DF83F0131 xmp.did:35CE0DD9BEA711E3AB579E0DF83F0131 xmp.did:35CE0DDBBEA711E3AB579E0DF83F0131 saved xmp.iid:450a78cf-5285-f94a-acb6-23a2cfdb6a24 2014-04-09T16:49:21-07:00 Adobe Photoshop CC (Windows) / image/png 3 1 720000/10000 720000/10000 2 65535 32 96 ˙ cHRMz%u0`:o_FIDATxZOhW&&!: 4bH1VB݃I A ƋHs1b[# /_d.Ff4`"H$000 |F`R/ok.\xDh-4 :WVVY41N#0^ZZ,gϞ>B#p VƎ;2ҥKfe&V 05ee«W n5=۷#ʕ+1_mws^CN诱 95l ³5 :by!gkZL xm&zM[lL5}N?]EGzb[| X_>_r Q%Ƭtx= /z6iB#0Bk_wgNAր{[՝kVp;Phi`k>ӏnxF CnUYj08rջHBjڅag.U&Y]8ϲԓ 70h\) 6[f1x>oblQyk698pa&psAN`y \ j05:,6`ӽ.sTO2úlӹ Ў[`^i4MnEȩlr壴Zp'p0c8rDտ{7E|@e]7}γѬ-P:\hllt $2|8e󁠾0XH@E>ﴂL63,+~i׫4(*1IENDB`PNG  IHDR `|"p pHYs  9iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-04-09T16:47:29-07:00 2014-04-09T16:49:39-07:00 2014-04-09T16:49:39-07:00 xmp.iid:d4a41c0b-f4d6-7d4f-8986-22f5963e899a xmp.did:DB893060BEA611E3BE35FBF8F9055BB5 xmp.iid:DB89305DBEA611E3BE35FBF8F9055BB5 xmp.did:DB89305EBEA611E3BE35FBF8F9055BB5 xmp.did:DB893060BEA611E3BE35FBF8F9055BB5 saved xmp.iid:d4a41c0b-f4d6-7d4f-8986-22f5963e899a 2014-04-09T16:49:39-07:00 Adobe Photoshop CC (Windows) / image/png 3 1 720000/10000 720000/10000 2 65535 32 96 R? cHRMz%u0`:o_FIDATxZkG~Jm"C>)P+؇'C&=uCО䣭wu+X @\4^]8ADegݝ}iЁ#~̼[XBڊmtUK^eʇ-+& XAW@=!$uHxtt;;;z)d^FQr+EB(`\ tZܘP^pt|ݛ|ooz@+0>g=ݟ{6^޿ PH5&YәcE}^S f&L_>OJJqt<">ܨD@T@g}V؄d\8s,T}z .&i>PVx:Xp;J_~Ӿ Uc?a\h+m Q(!]L@<}J@0U0JuaH#v*j t O!KX/(ah|I7f9 m{(FV.e5s5k1H;R^T`qqqh@R#\Iz].ౌrK< 1JՐk1 1$7ց<\p̕LKB : 68$SN: $u Xpؐ$gkHY.и8W:/s]|{kIENDB`PNG  IHDRr ߔIDATx^JPOR?JKin"!lG]7fI"V=->@2:O`}>@ATqNҒB~9'~X|La\Xd* 0X 1aF!3^(eTQ0J'd?l32Sb|fPH02iK sY>y0uD!:R=AbE|%ݻEu]'!8e ἥ>hP>IZ({۠CsBhP(eh_:QK1)%4IMhJ HQvMuLHo"0$}D:u8BW6kLdf%T99҅u?$LdC!S^biDTF0)KQ#4Up+-L0cL*_j<IENDB`PNG  IHDRr ߔtEXtSoftwareAdobe ImageReadyqe<!iTXtXML:com.adobe.xmp ?IDATxڴKPoREbK"\Zl]ЩNIPK B@B'+t+VK+X 6~$$w}qN<͑@@{<@VE5 $I[M e'"p=Հs 8c@F})}@taF5!3\ӺэPk٥~5}5CZe1{a13Cw"lS03)jVð9i,a` 4pCtýgti6&\.NVV0$lVM*:Tɲ4$In+wnWp "i1mKiF}?6:JK 5Cf.)-L7ŻZz4^^QSv~isxc+,Oêى~khfzO.c{#nQ0;w{LDK`85f@R[]7sg }:33XL84]$!Lf f]5߉s3ԯ0 IENDB`PNG  IHDRr ߔIDATx^Ŗm@ зtl #$L1 ٠lоR3BG~qrR,YwpXKh+Y|zy{p@"6w9pj wWk4Wk SU;ڋb :faV@8R(^ނ&Fm rM#!Bb6 #*VoZ6w{#QV? =(`v% Ck=W2QM2%w{sm2Z- Ŕ'GR<[c':aakNI <˪P”%.㑷Q$3ZsZf,a hí6Z؀D; ]n\qCߟ?h>xIENDB`PNG  IHDRr ߔ(IDATx^V@ \/gsׁ:ԁKHQSAu` p*!C{ T<`>q%>e`&PbgN_gGb -h\VP̕p:xs\ 땠)vBQaheTb-fcZdy(ǨĖ (V (ڽ/iDi|KwQapʘW{I+?j{Z+f'̙sn1<Ŝ$펞 '|~ nh|gY?N10w'FRc+cV]#g0+NwQ;WғnܲęϪnw޷o` K_aJ.s-+;w;Y9wp]%&R{ G%4dg(%7IENDB`PNG  IHDRr ߔ[IDATx^ֽJQى?Pl)rh%m,-|7#h"QXqnvf8;s.!yZ<L\eTFP1 GpbjiM6kSs0jׁazFCv~̜)ۘ ^kubok؋Tܲ0e7BG7L@1m]FiaԺ9Sl6S? LA/tzQLAPLAv Ik_~_A&Vj*jh70F qi;OaIENDB`PNG  IHDRr ߔIDATx^˭@ P P%@'P% h@,d!ؾ ,y9? @{ie{J#(NAVwJ#(#BPF1-ILw'a8K!L?L=k7gdM9iu m$v1hibnKDSnٺEʮ XO &y#NڔtbhboV`-s<{KHڃ!l:Y0jjA&LN/%1A J/Ф#8IENDB`PNG  IHDRr ߔuIDATx^M@ E'޸n)!:@4@` 'nHli֌kndOe:RS qK@![(a5'}Q#PX (, 6lhg*)`bM} Vg g3Spn߂=vlAi$S[`ncخ3e Kf /LLitl mmgGٕ% v@ɹZ&.d[dK-S< Y0L^~/g.*5tR=Ѐ'+*7eg[ $ޏ w&+ WRjӲx5_tCwi{cq?.®IENDB`.callstackwindow { width: 100%; height: 100%; } .callstackwindow > .windowtoolbar { -ms-grid-columns: 1fr auto auto auto auto auto; display: -ms-grid; } .callstackwindow > .windowtoolbar > #toggleJMCFramesButton { -ms-grid-column: 2; } .callstackwindow > .windowtoolbar > #toggleJMCFramesButton > .buttonIcon { background-image: url(''); /*[url({f12-debugger-image-callstack-toggle-jmc-frames})]*/ } .callstackwindow > .windowtoolbar > #toggleAsyncFramesButton { -ms-grid-column: 4; } .callstackwindow > .windowtoolbar > #toggleAsyncFramesButton > .buttonIcon { background-image: url(''); /*[url({f12-debugger-image-callstack-toggle-async-frames})]*/ } .callstackwindow > .gridcontainer { height: calc(100% - 20px); width: 100%; } .callstackwindow .gridcontainer .grid .grid-canvas { overflow-x: hidden; } .callstackwindow .activeFrameGlyph { background-color: transparent; background-image: url("Callstack/images/activeFrameGlyph.png"); /*[url({f12-debugger-image-callstack-active-frame})]*/ background-repeat: no-repeat; background-position: 11px 2px; background-size: 14px 14px; } .callstackwindow .instructionPointerGlyph { background-color: transparent; background-image: url("Callstack/images/instructionPointerGlyph.png"); /*[url({f12-debugger-image-callstack-instruction-pointer})]*/ background-repeat: no-repeat; background-position: 11px 2px; background-size: 14px 14px; }PNG  IHDRr ߔ pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FZIDATxĖ1N0.l1'ž@W'>pr8 ^۞ pF68RXɲ}~{)18 $D@@J;7Jl,9, X`2Ы1~.!x n9".8i3iq/9 :#NbIHk-?^K.ҵSFj/B':i9AY1v'CXXF꬝}~y H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx=NAw& ;p*;BWV cGb=Px;`H\HOdOfwfw?gGZ՝~uk|tvNw 0t!":hlåf)j[ vvNiF i LТ_hq-^pKox.1*T b"&uo>݅9}\@%"OƟ&FXП&,``(`%Kn̼HIENDB`PNG  IHDR `|"p pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxZMr0 =@ B> e 'HXMMYBNg-!'(=@inPYylɖdϐ`cK:aIqа|N!0 O/ 0 Sqyi@2pG5D8)+`UB9h2'! k7:#m_DǑomiDL5*8Pne19B[4c-8L``@=9NGDvbVʖZQxxJw9`=!D 51 kH~zZ#D(`Y%͝mӊA,iNsKH&%9B(KżW5{?5tpaOq:/ fU0l>s݂l=pEMp7 U@&IЛ+pk| *T4g6zu|+ԓ%‡zU)}ҡںП_?~}L؁l=`#G쒮0>`3E6 |Cf}`i@`fg iuoveʗ@ LKHy Fx_r_(1_9n> '& f3Iь(cEoXJٕR#9 t|c,09Lp@LR*`I(\˜4B_@$HpW{@DvOOO1?оkxz.w1X2=RJ+`Rk*R,U1МF(?Sޮ(a$o kĀIENDB`PNG  IHDR `|"psRGBgAMA a pHYsodtEXtSoftwarePaint.NET v3.5.11GB7+IDAThCMN0s IP{z;pڮX8RBlEqk{ƋZ$,|K17JXCwl x8YwXEX$am$(@ Kp7`n *j2`^{&3מm 5&x|:gb%3h=MX1Kb  r7A҉}f2 /uPj2b D|` sk19 1%Y(b  BEMfVWkπ6Td&u3 5&T$\Nӫp8|:فqq c@FDN2VN%G\ Mj D3u 7P _{Dd7 GD|` sk19 1%Y(b  BEMfVWkπ6Td&u3 Uo}IENDB`PNG  IHDR$l tEXtSoftwareAdobe ImageReadyqe<qiTXtXML:com.adobe.xmp -WIDATxZOHQ6\ Vs܃hIAz蒗]ühqρ[ Ь :! tD(;cy5Cu&K;a/2NBY1ZP(vͪsP\_eO; &#pܕN^]VS'G-2ܞ}FFFrˡpd2YY{Cɩ-CJ!!1>N$JȠP^}>ɗ$ CX)7pDhP[q\eRLjBǩv^(& 14BUkNί7KhoiWrwƸO>x-c#5FmA//EG?,PG;7Zܷߦ``Ϟƫ+<ğۛ4c7#5FVMfJ/2>T4FrXc6>X7Tce,60p{^_W|)-K…Gf}PJ m+9`xWǚƘ[&DNuMTœLjIQXu>IPmA#TP(P.-H===VQcVMYCqee̴ 6|q{{GǢD1ͥ2qccЇ19=WW;Vx ~_8K3Fq3B\cdomm5 CőNct5F Ѽr4FVA\Ώ^]L5FЁprQZ:.-K…J6KtxhqqpmeCBb*}ieBjlK@ Hj"'чV^9IENDB`#dataTipElement { padding-left: 1em; padding-right: 1em; border: 1px solid TRANSPARENT; /*[1px solid {plugin-contextmenu-active-border-color}]*/ background: TRANSPARENT; /*[{plugin-contextmenu-background-color}]*/ box-shadow: 2px 2px 2px TRANSPARENT; /*[2px 2px 2px {plugin-textbox-border-color rgba(0.5)}]*/ display: none; position: absolute; z-index: 501; top: 30px; } #dataTipElement .popoverInnerContainer { margin-top: 9px; height: calc(100% - 30px); width: 100%; color: TRANSPARENT; /*[{plugin-color}]*/ } #dataTipElement .popoverInnerContainer a { margin-left: 4px; } #dataTipElement .grid > .grid-canvas { overflow-x: hidden; } .glyph-margin > div { background-repeat: no-repeat; } .monaco-editor.vs { line-height: 18px; } .monaco-editor.vs .breakpointDecoration { background-color: TRANSPARENT; /*[{plugin-font-editor-breakpoint-background-color rgba(0.2)}]*/ } .monaco-editor.vs .breakpointGlyph { background-image: url("Breakpoints/images/breakpointGlyph.png"); /*[url({f12-debugger-image-breakpoint})]*/ background-position-y: 2px; background-size: 14px 14px; margin-left: 2px; } .monaco-editor.vs .breakpointGlyph.bpUnbound { background-image: url("Breakpoints/images/breakpointUnbound.png"); /*[url({f12-debugger-image-breakpoint-unbound})]*/ } .monaco-editor.vs .breakpointGlyph.bpDisabled { background-image: url("Breakpoints/images/breakpointDisabled.png"); /*[url({f12-debugger-image-breakpoint-disabled})]*/ } .monaco-editor.vs .tracepointimg { background-image: url('Breakpoints/images/tracepointBreakpoint.png'); /*[url({f12-debugger-image-breakpoint-tracepoint})]*/ background-position-y: 2px; background-size: 14px 14px; margin-left: 2px; } .monaco-editor.vs .conditionalimg { background-image: url('Breakpoints/images/conditionalBreakpoint.png'); /*[url({f12-debugger-image-breakpoint-conditional})]*/ background-position-y: 2px; background-size: 14px 14px; margin-left: 2px; } .monaco-editor.vs .activeFrameDecoration { background-color: TRANSPARENT; /*[{plugin-font-editor-comment-color rgba(0.4)}]*/ } .monaco-editor.vs .activeFrameGlyph { background-image: url("Callstack/images/activeFrameGlyph.png"); /*[url({f12-debugger-image-callstack-active-frame})]*/ background-position-y: 2px; background-size: 14px 14px; margin-left: 2px; } .monaco-editor.vs .activeFrameGlyph.breakpointGlyph { background-image: url("Callstack/images/activeFrameGlyph.png"), url("Breakpoints/images/breakpointGlyph.png"); /*[url({f12-debugger-image-callstack-active-frame}), url({f12-debugger-image-breakpoint})]*/ } .monaco-editor.vs .activeFrameGlyph.breakpointGlyph.bpUnbound { background-image: url("Callstack/images/activeFrameGlyph.png"), url("Breakpoints/images/breakpointUnbound.png"); /*[url({f12-debugger-image-callstack-active-frame}), url({f12-debugger-image-breakpoint-unbound})]*/ } .monaco-editor.vs .activeFrameGlyph.breakpointGlyph.bpDisabled { background-image: url("Callstack/images/activeFrameGlyph.png"), url("Breakpoints/images/breakpointDisabled.png"); /*[url({f12-debugger-image-callstack-active-frame}), url({f12-debugger-image-breakpoint-disabled})]*/ } .monaco-editor.vs .activeFrameGlyph.tracepointimg { background-image: url("Callstack/images/activeFrameGlyph.png"), url("Breakpoints/images/tracepointBreakpoint.png"); /*[url({f12-debugger-image-callstack-active-frame}), url({f12-debugger-image-breakpoint-tracepoint})]*/ } .monaco-editor.vs .activeFrameGlyph.conditionalimg { background-image: url("Callstack/images/activeFrameGlyph.png"), url("Breakpoints/images/conditionalBreakpoint.png"); /*[url({f12-debugger-image-callstack-active-frame}), url({f12-debugger-image-breakpoint-conditional})]*/ } .monaco-editor.vs .instructionPointerDecoration { background-color: TRANSPARENT; /*[{plugin-font-editor-instruction-pointer-background-color rgba(0.6)}]*/ } .monaco-editor.vs .instructionPointerGlyph { background-image: url("Callstack/images/instructionPointerGlyph.png"); /*[url({f12-debugger-image-callstack-instruction-pointer})]*/ background-position-y: 2px; background-size: 14px 14px; margin-left: 2px; } .monaco-editor.vs .instructionPointerGlyph.breakpointGlyph { background-image: url("Callstack/images/instructionPointerGlyph.png"), url("Breakpoints/images/breakpointGlyph.png"); /*[url({f12-debugger-image-callstack-instruction-pointer}), url({f12-debugger-image-breakpoint})]*/ } .monaco-editor.vs .instructionPointerGlyph.breakpointGlyph.bpUnbound { background-image: url("Callstack/images/instructionPointerGlyph.png"), url("Breakpoints/images/breakpointUnbound.png"); /*[url({f12-debugger-image-callstack-instruction-pointer}), url({f12-debugger-image-breakpoint-unbound})]*/ } .monaco-editor.vs .instructionPointerGlyph.breakpointGlyph.bpDisabled { background-image: url("Callstack/images/instructionPointerGlyph.png"), url("Breakpoints/images/breakpointDisabled.png"); /*[url({f12-debugger-image-callstack-instruction-pointer}), url({f12-debugger-image-breakpoint-disabled})]*/ } .monaco-editor.vs .instructionPointerGlyph.tracepointimg { background-image: url("Callstack/images/instructionPointerGlyph.png"), url("Breakpoints/images/tracepointBreakpoint.png"); /*[url({f12-debugger-image-callstack-instruction-pointer}), url({f12-debugger-image-breakpoint-tracepoint})]*/ } .monaco-editor.vs .instructionPointerGlyph.conditionalimg { background-image: url("Callstack/images/instructionPointerGlyph.png"), url("Breakpoints/images/conditionalBreakpoint.png"); /*[url({f12-debugger-image-callstack-instruction-pointer}), url({f12-debugger-image-breakpoint-conditional})]*/ } .monaco-editor.vs .searchTermDecoration { background-color: TRANSPARENT; /*[{plugin-font-editor-search-result-background-color rgba(0.5)}]*/ border: solid 1px TRANSPARENT; /*[solid 1px {plugin-font-editor-search-result-background-color}]*/ } .monaco-editor.vs .exceptionViewZone { color: TRANSPARENT; /*[{plugin-font-editor-erroradornment-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-editor-erroradornment-background-color}]*/ border: solid 1px TRANSPARENT; /*[solid 1px {plugin-font-editor-erroradornment-background-color}]*/ -ms-user-select: text; z-index: 2; padding-left: 2px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } .monaco-editor.vs .exceptionViewZone .exceptionGlyph { background: url("../Common/images/common_icons.png") no-repeat -688px -16px; /*[url({f12-image-common-icons}) no-repeat -688px -16px]*/ padding-top: 1px; float: left; width: 20px; height: 16px; } .monaco-editor.vs .setNextStatementErrorViewZone { color: TRANSPARENT; /*[{plugin-font-editor-erroradornment-color}]*/ background-color: TRANSPARENT; /*[{plugin-font-editor-erroradornment-background-color}]*/ border: solid 1px TRANSPARENT; /*[solid 1px {plugin-font-editor-erroradornment-background-color}]*/ -ms-user-select: none; padding-left: 2px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } .monaco-editor.vs .setNextStatementErrorViewZone .exceptionGlyph { background: url("../Common/images/common_icons.png") no-repeat -688px -16px; /*[url({f12-image-common-icons}) no-repeat -688px -16px]*/ padding-top: 1px; float: left; width: 20px; height: 16px; } .goToLinePromptContainer { text-align: left; width: 280px; height: 90px; margin-top: 20px; margin-left: 20px; padding-top: 0px; } /* Monaco editor overrides */ .monaco-editor.vs, .monaco-editor.vs .zone-widget .monaco-editor.vs { font-family: 'Comic Sans MS'; /*[{plugin-font-editor}, Nimsum, Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace]*/ font-size: 9pt; /*[{plugin-font-editor-size}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ background: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ } .monaco-editor.vs .monaco-editor-background { background: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ } .monaco-editor.vs .focus-mode { background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ opacity: 0.333; } .monaco-editor.vs .cursor { background: TRANSPARENT; /*[{plugin-color}]*/ } .monaco-editor.vs .current-line { background: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ border: 2px solid TRANSPARENT; /*[2px solid {plugin-table-border-color}]*/ box-sizing: border-box; } .monaco-editor.vs .lineHighlight { background-color: TRANSPARENT; /*[{plugin-highlight-color rgba(0.2)}]*/ } .monaco-editor.vs .dynamic.focused > .selections-layer > .selected-text { background: TRANSPARENT !important; /*[{plugin-highlight-background-color rgba(0.45)} !important]*/ } .monaco-editor.vs .dynamic > .selections-layer > .selected-text { background: TRANSPARENT !important; /*[{plugin-highlight-background-color rgba(0.45)} !important]*/ } .monaco-editor.vs .glyph-margin { background: TRANSPARENT; /*[{plugin-font-editor-margin-background-color}]*/ } .monaco-editor.vs .lines-decorations { background: TRANSPARENT; /*[{plugin-background-color}]*/ } .monaco-editor.vs .line-numbers { background: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ color: TRANSPARENT; /*[{plugin-font-editor-margin-color}]*/ } .monaco-editor-hover { box-sizing: content-box; } .debuggerEditor .monaco-diff-editor .diffOverview { background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ } .debuggerEditor .monaco-scrollable-element.modified-in-monaco-diff-editor .scrollbar { background: TRANSPARENT; /*[{plugin-scrollbar-background-color rgba(0.1)}]*/ } .debuggerEditor .monaco-scrollable-element .visible { background: TRANSPARENT; /*[{plugin-scrollbar-background-color}]*/ } .debuggerEditor .monaco-scrollable-element .scrollbar { background: TRANSPARENT; /*[{plugin-scrollbar-face-color rgba(0.1)}]*/ } .debuggerEditor .monaco-scrollable-element .slider { background: TRANSPARENT; /*[{plugin-scrollbar-face-color rgba(0.6)}]*/ } .debuggerEditor .monaco-scrollable-element .slider:hover { background: TRANSPARENT; /*[{plugin-scrollbar-face-color rgba(0.7)}]*/ } .debuggerEditor .monaco-scrollable-element .slider.active { background: TRANSPARENT; /*[{plugin-scrollbar-face-color rgba(0.9)}]*/ } .debuggerEditor .monaco-scrollable-element > .scrollbar > .up-arrow { background-image: url("editor/vs/base/ui/scrollbar/impl/arrow-up.png"); /*[url({f12-debugger-image-editor-scroll-arrow-up})]*/ } .debuggerEditor .monaco-scrollable-element > .scrollbar > .down-arrow { background-image: url("editor/vs/base/ui/scrollbar/impl/arrow-down.png"); /*[url({f12-debugger-image-editor-scroll-arrow-down})]*/ } .debuggerEditor .monaco-scrollable-element > .scrollbar > .left-arrow { background-image: url("editor/vs/base/ui/scrollbar/impl/arrow-left.png"); /*[url({f12-debugger-image-editor-scroll-arrow-left})]*/ } .debuggerEditor .monaco-scrollable-element > .scrollbar > .right-arrow { background-image: url("editor/vs/base/ui/scrollbar/impl/arrow-right.png"); /*[url({f12-debugger-image-editor-scroll-arrow-right})]*/ } .monaco-editor.vs .wordHighlight { background-color: TRANSPARENT; /*[{plugin-highlight-color rgba(0.35)}]*/ -webkit-animation-duration: 0.2s; -webkit-animation-name: darkWordHighlight; -moz-animation-duration: 0.2s; -moz-animation-name: darkWordHighlight; -ms-animation-duration: 0.2s; -ms-animation-name: darkWordHighlight; animation-duration: 0.2s; animation-name: darkWordHighlight; } @-ms-keyframes darkWordHighlight { from { background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ } to { background-color: TRANSPARENT; /*[{plugin-highlight-color rgba(0.35)}]*/ } } @keyframes darkWordHighlight { from { background-color: TRANSPARENT; /*[{plugin-font-editor-background-color}]*/ } to { background-color: TRANSPARENT; /*[{plugin-highlight-color rgba(0.35)}]*/ } } .monaco-editor.vs .bracket-match { box-shadow: inset 0 0 0 1px TRANSPARENT; /*[inset 0 0 0 1px {vs-drop-shadow-background-color rgba(0.5)}]*/ } .monaco-editor.vs .monaco-tree.focused .selected > .content { background-color: TRANSPARENT; /*[{plugin-treeview-content-background-color}]*/ } .monaco-editor.vs .monaco-tree.focused .focused > .content { background-color: TRANSPARENT; /*[{plugin-treeview-content-selected-background-color}]*/ } .monaco-editor.vs .monaco-tree .selected > .content { background-color: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-background-color}]*/ } .monaco-editor.vs .monaco-tree .focused > .content { background-color: TRANSPARENT; /*[{plugin-treeview-content-background-color}]*/ } .monaco-editor.vs .monaco-tree .content:hover { background-color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-background-color}]*/ } .monaco-editor.vs .linked-editing { box-shadow: inset 0 0 0 1px TRANSPARENT; /*[inset 0 0 0 1px {vs-drop-shadow-background-color rgba(0.5)}]*/ } .monaco-editor.vs .new-snippet { background-color: TRANSPARENT; /*[{plugin-color rgba(0.1)}]*/ } .monaco-editor.vs .snippet-placeholder { background-color: TRANSPARENT; /*[{plugin-color rgba(0.1)}]*/ } .monaco-editor.vs .finish-snippet-placeholder { outline: TRANSPARENT solid 1px; /*[{plugin-background-color} solid 1px]*/ } .monaco-editor.vs .detected-link { border-color: TRANSPARENT; /*[{plugin-link-color}]*/ } .monaco-editor.vs .token { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .monaco-editor.vs .token.comment { color: TRANSPARENT; /*[{plugin-font-editor-comment-color}]*/ } .monaco-editor.vs .token.number { color: TRANSPARENT; /*[{plugin-font-editor-number-color}]*/ } .monaco-editor.vs .token.regexp, .monaco-editor.vs .token.regexp.js { color: TRANSPARENT; /*[{plugin-font-editor-number-color}]*/ } .monaco-editor.vs .token.string { color: TRANSPARENT; /*[{plugin-font-editor-string-color}]*/ } .monaco-editor.vs .token.string.escape { color: TRANSPARENT; /*[{plugin-font-editor-string-color}]*/ } .monaco-editor.vs .token.delimiter { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .monaco-editor.vs .token.keyword { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ } .monaco-editor.vs .token.keyword.flow { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ } .monaco-editor.vs .token.info-token { color: TRANSPARENT; /*[{plugin-font-console-info-color}]*/ } .monaco-editor.vs .token.warn-token { color: TRANSPARENT; /*[{plugin-font-console-warning-color}]*/ } .monaco-editor.vs .token.error-token { color: TRANSPARENT; /*[{plugin-font-console-error-color}]*/ } .monaco-editor.vs .token.debug-token { color: TRANSPARENT; /*[{plugin-font-console-input-color}]*/ } .monaco-editor.vs .token.meta { color: TRANSPARENT; /*[{plugin-font-editor-comment-color}]*/ } .monaco-editor.vs .token.key { color: TRANSPARENT; /*[{plugin-font-editor-literal-color}]*/ } .monaco-editor.vs .token.variable { color: TRANSPARENT; /*[{plugin-font-editor-identifier-color}]*/ } .monaco-editor.vs .token.attribute.name, .monaco-editor.vs .token.attribute.name.html { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-name-color}]*/ } .monaco-editor.vs .token.attribute.value, .monaco-editor.vs .token.attribute.value.html { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-value-color}]*/ } .monaco-editor.vs .token.tag.html { color: TRANSPARENT; /*[{plugin-font-editor-html-element-color}]*/ } .monaco-editor.vs .token.delimiter.html { color: TRANSPARENT; /*[{plugin-font-editor-html-tag-color}]*/ } .monaco-editor.vs .token.meta.content.html { color: TRANSPARENT; /*[{plugin-font-editor-comment-color}]*/ } .monaco-editor.vs .token.meta.html { color: TRANSPARENT; /*[{plugin-font-editor-comment-color}]*/ } .monaco-editor.vs .token.tag.xml { color: TRANSPARENT; /*[{plugin-font-editor-html-element-color}]*/ } .monaco-editor.vs .token.delimiter.xml { color: TRANSPARENT; /*[{plugin-font-editor-html-tag-color}]*/ } .monaco-editor.vs .token.meta.content.xml { color: TRANSPARENT; /*[{plugin-font-editor-comment-color}]*/ } .monaco-editor.vs .token.meta.xml { color: TRANSPARENT; /*[{plugin-font-editor-comment-color}]*/ } .monaco-editor.vs .token.attribute.name.css { color: TRANSPARENT; /*[{plugin-font-editor-css-name-color}]*/ } .monaco-editor.vs .token.attribute.value.css { color: TRANSPARENT; /*[{plugin-font-editor-css-value-color}]*/ } .monaco-editor.vs .token.tag.css { color: TRANSPARENT; /*[{plugin-font-editor-css-selector-color}]*/ } .monaco-editor.vs .token.delimiter.css { color: TRANSPARENT; /*[{plugin-font-editor-html-tag-color}]*/ } .monaco-editor.vs .token.vs { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .monaco-editor.vs .token.tag.vs { color: TRANSPARENT; /*[{plugin-font-editor-html-element-color}]*/ } .monaco-editor.vs .token.delimiter.js { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .monaco-editor.vs .token.attribute.name.vs { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-name-color}]*/ } .monaco-editor.vs .token.attribute.value.vs { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-value-color}]*/ } .monaco-editor.vs .token.meta.java { color: TRANSPARENT; /*[{plugin-font-editor-comment-color}]*/ } .monaco-editor.vs .token.tag.jade { color: TRANSPARENT; /*[{plugin-font-editor-html-element-color}]*/ } .monaco-editor.vs .token.tag.id.jade, .monaco-editor.vs .token.tag.class.jade { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ } .monaco-editor.vs .token.interpolation.jade { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ } .monaco-editor.vs .token.interpolation.delimiter.jade { color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .monaco-editor.vs .typeInfo { color: TRANSPARENT; /*[{plugin-font-editor-keyword-color}]*/ } "use strict";var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n},_cssPluginGlobal=this,CSSLoaderPlugin;!function(e){var t=_cssPluginGlobal,n=function(){function e(){this._pendingLoads=0}return e.prototype.attachListeners=function(e,t,n,r){var o=function(){t.removeEventListener("load",s),t.removeEventListener("error",i)},s=function(){o(),n()},i=function(e){o(),r(e)};t.addEventListener("load",s),t.addEventListener("error",i)},e.prototype._onLoad=function(e,t){this._pendingLoads--,t()},e.prototype._onLoadError=function(e,t,n){this._pendingLoads--,t(n)},e.prototype._insertLinkNode=function(e){this._pendingLoads++;var t=document.head||document.getElementsByTagName("head")[0],n=t.getElementsByTagName("link")||document.head.getElementsByTagName("script");n.length>0?t.insertBefore(e,n[n.length-1]):t.appendChild(e)},e.prototype.createLinkTag=function(e,t,n,r){var o=this,s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("data-name",e);var i=function(){return o._onLoad(e,n)},a=function(t){return o._onLoadError(e,r,t)};return this.attachListeners(e,s,i,a),s.setAttribute("href",t),s},e.prototype._linkTagExists=function(e,t){var n,r,o,s,i=document.getElementsByTagName("link");for(n=0,r=i.length;r>n;n++)if(o=i[n].getAttribute("data-name"),s=i[n].getAttribute("href"),o===e||s===t)return!0;return!1},e.prototype.load=function(e,t,n,r){if(this._linkTagExists(e,t))return n(),void 0;var o=this.createLinkTag(e,t,n,r);this._insertLinkNode(o)},e}(),r=function(e){function t(){e.call(this),this._blockedLoads=[],this._mergeStyleSheetsTimeout=-1}return __extends(t,e),t.prototype.load=function(e,t,n,r){if(this._linkTagExists(e,t))return n(),void 0;var o=this.createLinkTag(e,t,n,r);this._styleSheetCount()<31?this._insertLinkNode(o):(this._blockedLoads.push(o),this._handleBlocked())},t.prototype._styleSheetCount=function(){var e=document.getElementsByTagName("link").length,t=document.getElementsByTagName("style").length;return e+t},t.prototype._onLoad=function(t,n){e.prototype._onLoad.call(this,t,n),this._handleBlocked()},t.prototype._onLoadError=function(t,n,r){e.prototype._onLoadError.call(this,t,n,r),this._handleBlocked()},t.prototype._handleBlocked=function(){var e=this,t=this._blockedLoads.length;t>0&&-1===this._mergeStyleSheetsTimeout&&(this._mergeStyleSheetsTimeout=window.setTimeout(function(){return e._mergeStyleSheets()},0))},t.prototype._mergeStyleSheet=function(e,t,n,r){for(var o=r.rules.length-1;o>=0;o--)t.insertRule(a.rewriteUrls(n,e,r.rules[o].cssText),0)},t.prototype._mergeStyleSheets=function(){this._mergeStyleSheetsTimeout=-1;var e,t=this._blockedLoads.length,n=document.getElementsByTagName("link"),r=n.length,o=[];for(e=0;r>e;e++)("loaded"===n[e].readyState||"complete"===n[e].readyState)&&o.push({linkNode:n[e],rulesLength:n[e].styleSheet.rules.length});var s=o.length,i=Math.min(Math.floor(s/2),t);o.sort(function(e,t){return t.rulesLength-e.rulesLength});var a,l;for(e=0;i>e;e++)a=o.length-1-e,l=e%(o.length-i),this._mergeStyleSheet(o[l].linkNode.href,o[l].linkNode.styleSheet,o[a].linkNode.href,o[a].linkNode.styleSheet),o[a].linkNode.parentNode.removeChild(o[a].linkNode),r--;for(var u=this._styleSheetCount();31>u&&this._blockedLoads.length>0;)this._insertLinkNode(this._blockedLoads.shift()),u++},t}(n),o=function(e){function t(){e.call(this)}return __extends(t,e),t.prototype.attachListeners=function(e,t,n){t.onload=function(){t.onload=null,n()}},t}(r),s=function(){function e(){this.fs=require.nodeRequire("fs")}return e.prototype.load=function(t,n,r){var o=this.fs.readFileSync(n,"utf8");o.charCodeAt(0)===e.BOM_CHAR_CODE&&(o=o.substring(1)),r(o)},e.BOM_CHAR_CODE=65279,e}(),i=function(){function e(e){this.cssLoader=e}return e.prototype.load=function(t,n,r,o){o=o||{};var s=n.toUrl(t+".css");this.cssLoader.load(t,s,function(n){o.isBuild&&(e.BUILD_MAP[t]=n),r({})},function(){"function"==typeof r.error&&r.error("Could not find "+s+" or it was empty")})},e.prototype.write=function(n,r,o){var s=o.getEntryPoint();t.entryPoints=t.entryPoints||{},t.entryPoints[s]=t.entryPoints[s]||[],t.entryPoints[s].push({moduleName:r,contents:e.BUILD_MAP[r]}),o.asModule(n+"!"+r,"define(['vs/css!"+s+"'], {});")},e.prototype.writeFile=function(e,n,r,o){if(t.entryPoints&&t.entryPoints.hasOwnProperty(n)){for(var s=r.toUrl(n+".css"),i=["/*---------------------------------------------------------"," * Copyright (C) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],l=t.entryPoints[n],u=0;u=t.length&&e.substr(0,t.length)===t},e.pathOf=function(e){var t=e.lastIndexOf("/");return-1!==t?e.substr(0,t+1):""},e.joinPaths=function(t,n){function r(t,n){return e.startsWith(t,n)?Math.max(n.length,t.indexOf("/",n.length)):0}function o(e,t){if("./"!==t){if("../"===t){var n=e.length>0?e[e.length-1]:null;if(n&&"/"===n)return;if(n&&"../"!==n)return e.pop(),void 0}e.push(t)}}function s(e,t){for(;t.length>0;){var n=t.indexOf("/"),r=n>=0?t.substring(0,n+1):t;t=n>=0?t.substring(n+1):"",o(e,r)}}var i=0;i=i||r(t,"//"),i=i||r(t,"http://"),i=i||r(t,"https://");var a=[];return s(a,t.substr(i)),n.length>0&&"/"===n.charAt(0)&&(a=[]),s(a,n),t.substring(0,i)+a.join("")},e.commonPrefix=function(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r&&e.charCodeAt(r)===t.charCodeAt(r);r++);return e.substring(0,r)},e.commonFolderPrefix=function(t,n){var r=e.commonPrefix(t,n),o=r.lastIndexOf("/");return-1===o?"":r.substring(0,o+1)},e.relativePath=function(t,n){if(e.startsWith(n,"/")||e.startsWith(n,"http://")||e.startsWith(n,"https://"))return n;var r=e.commonFolderPrefix(t,n);t=t.substr(r.length),n=n.substr(r.length);for(var o=t.split("/").length,s="",i=1;o>i;i++)s+="../";return s+n},e.rewriteUrls=function(t,n,r){return r.replace(/url\(\s*([^\)]+)\s*\)?/g,function(){for(var r=[],o=0;o0&&(" "===s.charAt(s.length-1)||" "===s.charAt(s.length-1));)s=s.substring(0,s.length-1);if(('"'===s.charAt(s.length-1)||"'"===s.charAt(s.length-1))&&(s=s.substring(0,s.length-1)),!e.startsWith(s,"data:")&&!e.startsWith(s,"http://")&&!e.startsWith(s,"https://")){var i=e.joinPaths(e.pathOf(t),s);s=e.relativePath(n,i)}return"url("+s+")"})},e}();e.Utilities=a,function(){var e=null;e="undefined"!=typeof process&&process.versions&&process.versions.node?new s:navigator.userAgent.indexOf("MSIE 9")>=0?new r:navigator.userAgent.indexOf("MSIE 8")>=0?new o:new n,define("vs/css",new i(e))}()}(CSSLoaderPlugin||(CSSLoaderPlugin={}));var MonacoDefinitions; (function (MonacoDefinitions) { "use strict"; var MouseTargetType = (function () { function MouseTargetType() { } MouseTargetType.UNKNOWN = 0; MouseTargetType.TEXTAREA = 1; MouseTargetType.GUTTER_GLYPH_MARGIN = 2; MouseTargetType.GUTTER_LINE_NUMBERS = 3; MouseTargetType.GUTTER_LINE_DECORATIONS = 4; MouseTargetType.GUTTER_VIEW_ZONE = 5; MouseTargetType.CONTENT_TEXT = 6; MouseTargetType.CONTENT_EMPTY = 7; MouseTargetType.CONTENT_VIEW_ZONE = 8; MouseTargetType.CONTENT_WIDGET = 9; MouseTargetType.OVERVIEW_RULER = 10; MouseTargetType.SCROLLBAR = 11; MouseTargetType.OVERLAY_WIDGET = 12; return MouseTargetType; })(); MonacoDefinitions.MouseTargetType = MouseTargetType; })(MonacoDefinitions || (MonacoDefinitions = {})); /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var _amdLoaderGlobal=this,AMDLoader;!function(e){var t=_amdLoaderGlobal,n="function"==typeof t.importScripts;if("function"!=typeof t.define||!t.define.amd){!function(){t.console||(t.console={}),t.console.log||(t.console.log=function(){}),t.console.warn||(t.console.warn=t.console.log),t.console.error||(t.console.error=t.console.log)}();var r=function(){function e(){}return e.startsWith=function(e,t){return e.length>=t.length&&e.substr(0,t.length)===t},e.endsWith=function(e,t){return e.length>=t.length&&e.substr(e.length-t.length)===t},e.isAbsolutePath=function(t){return e.startsWith(t,"http://")||e.startsWith(t,"https://")||e.startsWith(t,"/")},e.forEachProperty=function(e,t){if(e){var n;for(n in e)e.hasOwnProperty(n)&&t(n,e[n])}},e.isEmpty=function(t){var n=!0;return e.forEachProperty(t,function(){n=!1}),n},e.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},e.recursiveClone=function(t){if(!t||"object"!=typeof t)return t;var n=e.isArray(t)?[]:{};return e.forEachProperty(t,function(t,r){n[t]=r&&"object"==typeof r?e.recursiveClone(r):r}),n},e.generateAnonymousModule=function(){return"===anonymous"+e.NEXT_ANONYMOUS_ID++ +"==="},e.isAnonymousModule=function(e){return 0===e.indexOf("===anonymous")},e.NEXT_ANONYMOUS_ID=1,e}(),i=function(){function e(){}return e.validateConfigurationOptions=function(e){function t(e){return"load"===e.errorCode?(console.error('Loading "'+e.moduleId+'" failed'),console.error("Detail: ",e.detail),console.error("Here are the modules that depend on it:"),console.error(e.neededBy),void 0):"factory"===e.errorCode?(console.error('The factory method of "'+e.moduleId+'" has thrown an exception'),console.error(e.detail),void 0):void 0}return e=e||{},"string"!=typeof e.baseUrl&&(e.baseUrl=""),"object"!=typeof e.paths&&(e.paths={}),"object"!=typeof e.bundles&&(e.bundles=[]),"object"!=typeof e.shim&&(e.shim={}),"undefined"==typeof e.catchError&&(e.catchError=n),"string"!=typeof e.urlArgs&&(e.urlArgs=""),"function"!=typeof e.onError&&(e.onError=t),"object"==typeof e.ignoreDuplicateModules&&r.isArray(e.ignoreDuplicateModules)||(e.ignoreDuplicateModules=[]),e.baseUrl.length>0&&(r.endsWith(e.baseUrl,"/")||(e.baseUrl+="/")),e},e.mergeConfigurationOptions=function(t,n){"undefined"==typeof t&&(t=null),"undefined"==typeof n&&(n=null);var i=r.recursiveClone(n||{});return r.forEachProperty(t,function(e,t){"bundles"===e&&"undefined"!=typeof i.bundles?r.isArray(t)?i.bundles=i.bundles.concat(t):r.forEachProperty(t,function(e,t){var n={location:e,modules:t};i.bundles.push(n)}):"ignoreDuplicateModules"===e&&"undefined"!=typeof i.ignoreDuplicateModules?i.ignoreDuplicateModules=i.ignoreDuplicateModules.concat(t):"paths"===e&&"undefined"!=typeof i.paths?r.forEachProperty(t,function(e,t){return i.paths[e]=t}):"shim"===e&&"undefined"!=typeof i.shim?r.forEachProperty(t,function(e,t){return i.shim[e]=t}):i[e]=r.recursiveClone(t)}),e.validateConfigurationOptions(i)},e}();e.ConfigurationOptionsUtil=i;var s=function(){function e(e){this.options=i.mergeConfigurationOptions(e),this._createIgnoreDuplicateModulesMap(),this._createSortedPathsRules(),this._createShimModules(),this._createOverwriteModuleIdToPath()}return e.prototype._createOverwriteModuleIdToPath=function(){this.overwriteModuleIdToPath={};for(var e=0;en;n++)if(t=this.sortedPathsRules[n],r.startsWith(e,t.from))return t.to+e.substr(t.from.length);return e},e.prototype.addUrlArgsIfNecessary=function(e){if(this.options.urlArgs){var t=e.indexOf("?")>=0;return t?e+"&"+this.options.urlArgs:e+"?"+this.options.urlArgs}return e},e.prototype.moduleIdToPath=function(e){var t=e;return this.overwriteModuleIdToPath.hasOwnProperty(t)?(t=this.overwriteModuleIdToPath[t],r.isAbsolutePath(t)||(t=this.options.baseUrl+t)):r.endsWith(t,".js")||r.isAbsolutePath(t)||(t=this._applyPaths(t),r.isAbsolutePath(t)||(t=this.options.baseUrl+t),r.endsWith(t,".js")||(t+=".js")),this.addUrlArgsIfNecessary(t)},e.prototype.requireToUrl=function(e){var t=e;return r.isAbsolutePath(t)||(t=this._applyPaths(t),r.isAbsolutePath(t)||(t=this.options.baseUrl+t)),this.addUrlArgsIfNecessary(t)},e.prototype.isShimmed=function(e){return this.shimModules.hasOwnProperty(e)},e.prototype.getShimmedModuleDefine=function(e){return this.shimModules[e]},e.prototype.isDuplicateMessageIgnoredFor=function(e){return this.ignoreDuplicateModulesMap.hasOwnProperty(e)},e.prototype.shouldCatchError=function(){return this.options.catchError},e.prototype.onError=function(e){this.options.onError(e)},e}();e.Configuration=s;var o=function(){function e(e,t){this._config=e;var n=t.lastIndexOf("/");this.fromModulePath=-1!==n?t.substr(0,n+1):""}return e.prototype._normalizeModuleId=function(e){for(var t=e.split("/"),n=0;n0&&".."===t[n]&&".."!==t[n-1]&&(t.splice(n-1,2),n-=2);return t.join("/")},e.prototype.resolveModule=function(e){var t=e;return r.isAbsolutePath(t)||(r.startsWith(t,"./")||r.startsWith(t,"../"))&&(t=this._normalizeModuleId(this.fromModulePath+t)),t},e.prototype.moduleIdToPath=function(e){return this._config.moduleIdToPath(e)},e.prototype.requireToUrl=function(e){return this._config.requireToUrl(e)},e.prototype.shouldCatchError=function(){return this._config.shouldCatchError()},e.prototype.onError=function(e){this._config.onError(e)},e}();e.ModuleIdResolver=o;var a=function(){function e(e,t,n,r,i){this._id=e,this._dependencies=t,this._dependenciesValues=[],this._callback=n,this._errorback=r,this._moduleIdResolver=i,this._exports={},this._exportsPassedIn=!1,this._digestDependencies(),0===this._unresolvedDependenciesCount&&this._complete()}return e.prototype._digestDependencies=function(){this._unresolvedDependenciesCount=this._dependencies.length,this._managerDependencies=[],this._managerDependenciesMap={};var e,t,n;for(e=0,t=this._dependencies.length;t>e;e++)if(n=this._dependencies[e])if("exports"===n)this._exportsPassedIn=!0,this._dependenciesValues[e]=this._exports,this._unresolvedDependenciesCount--;else if("module"===n)this._dependenciesValues[e]={id:this._id},this._unresolvedDependenciesCount--;else if("require"===n)this.addManagerDependency(n,e);else{var r=n.indexOf("!");if(r>=0){var i=n.substring(0,r),s=n.substring(r+1,n.length);n=this._moduleIdResolver.resolveModule(i)+"!"+s}else n=this._moduleIdResolver.resolveModule(n);this.addManagerDependency(n,e)}else console.warn("Please check module "+this._id+", the dependency list looks broken"),this._dependenciesValues[e]=null,this._unresolvedDependenciesCount--},e.prototype.addManagerDependency=function(e,t){if(this._managerDependenciesMap.hasOwnProperty(e))throw new Error("Module "+this._id+" contains multiple times a dependency to "+e);this._managerDependencies.push(e),this._managerDependenciesMap[e]=t},e.prototype.renameDependency=function(e,t){if(!this._managerDependenciesMap.hasOwnProperty(e))throw new Error("Loader: Cannot rename an unknown dependency!");var n=this._managerDependenciesMap[e];delete this._managerDependenciesMap[e],this._managerDependenciesMap[t]=n},e.prototype.getId=function(){return this._id},e.prototype.getModuleIdResolver=function(){return this._moduleIdResolver},e.prototype.isExportsPassedIn=function(){return this._exportsPassedIn},e.prototype.getExports=function(){return this._exports},e.prototype.getDependencies=function(){return this._managerDependencies},e.prototype._invokeFactory=function(){var e=null,n=null;if(this._moduleIdResolver.shouldCatchError())try{n=this._callback.apply(t,this._dependenciesValues)}catch(r){e=r}else n=this._callback.apply(t,this._dependenciesValues);return{returnedValue:n,producedError:e}},e.prototype._complete=function(){var e=null;if(this._callback)if("function"==typeof this._callback){var t=this._invokeFactory();e=t.producedError,e||"undefined"==typeof t.returnedValue||this._exportsPassedIn&&!r.isEmpty(this._exports)||(this._exports=t.returnedValue)}else this._exports=this._callback;e&&this.getModuleIdResolver().onError({errorCode:"factory",moduleId:this._id,detail:e})},e.prototype.cleanUp=function(){this._dependencies=null,this._dependenciesValues=null,this._callback=null,this._moduleIdResolver=null,this._managerDependencies=null,this._managerDependenciesMap=null},e.prototype.onDependencyError=function(e){return this._errorback?(this._errorback(e),!0):!1},e.prototype.resolveDependency=function(e,t){if(!this._managerDependenciesMap.hasOwnProperty(e))throw new Error("Cannot resolve a dependency I do not have!");this._dependenciesValues[this._managerDependenciesMap[e]]=t,delete this._managerDependenciesMap[e],this._unresolvedDependenciesCount--,0===this._unresolvedDependenciesCount&&this._complete()},e.prototype.isComplete=function(){return 0===this._unresolvedDependenciesCount},e}();e.Module=a;var l=function(){function e(e){this._config=new s,this._scriptLoader=e,this._modules={},this._knownModules={},this._inverseDependencies={},this._dependencies={},this._inversePluginDependencies={},this._queuedDefineCalls=[],this._loadingScriptsCount=0}return e.prototype.enqueueDefineModule=function(e,t,n){0===this._loadingScriptsCount?this.defineModule(e,t,n,null):this._queuedDefineCalls.push({id:e,dependencies:t,callback:n})},e.prototype.enqueueDefineAnonymousModule=function(e,t){this._queuedDefineCalls.push({id:null,dependencies:e,callback:t})},e.prototype.defineModule=function(e,t,n,r,i){if("undefined"==typeof i&&(i=new o(this._config,e)),this._modules.hasOwnProperty(e))return this._config.isDuplicateMessageIgnoredFor(e)||console.warn("Duplicate definition of module '"+e+"'"),void 0;var s=new a(e,t,n,r,i);this._modules[e]=s,this._resolve(s)},e.prototype._relativeRequire=function(e,t,n,i){return"string"==typeof t?this.synchronousRequire(t,e):(this.defineModule(r.generateAnonymousModule(),t,n,i,e),void 0)},e.prototype.synchronousRequire=function(e,t){"undefined"==typeof t&&(t=new o(this._config,e));var n=t.resolveModule(e);if(!this._modules.hasOwnProperty(n))throw new Error("Check dependency list! Synchronous require cannot resolve module '"+n+"'. This is the first mention of this module!");var r=this._modules[n];if(!r.isComplete())throw new Error("Check dependency list! Synchronous require cannot resolve module '"+n+"'. This module has not been resolved completely yet.");return r.getExports()},e.prototype.configure=function(e,t){this._config=t?new s(e):this._config.cloneAndMerge(e)},e.prototype.getConfigurationOptions=function(){return this._config.getOptionsLiteral()},e.prototype._onLoad=function(e){var t;if(this._loadingScriptsCount--,this._config.isShimmed(e))t=this._config.getShimmedModuleDefine(e),this.defineModule(e,t.dependencies,t.callback,null);else if(0===this._queuedDefineCalls.length)console.warn("No define call received from module "+e+". This might be a problem.");else for(;this._queuedDefineCalls.length>0;){if(t=this._queuedDefineCalls.shift(),t.id===e||null===t.id){t.id=e,this.defineModule(t.id,t.dependencies,t.callback,null);break}this.defineModule(t.id,t.dependencies,t.callback,null)}if(0===this._loadingScriptsCount)for(;this._queuedDefineCalls.length>0;)t=this._queuedDefineCalls.shift(),null===t.id?console.warn("Found an unmatched anonymous define call in the define queue. Ignoring it!"):this.defineModule(t.id,t.dependencies,t.callback,null)},e.prototype._onLoadError=function(e,t){this._loadingScriptsCount--;var n,r={errorCode:"load",moduleId:e,neededBy:this._inverseDependencies[e]?this._inverseDependencies[e].slice(0):[],detail:t},i={},s=!1,o=[];for(o.push(e),i[e]=!0;o.length>0;)if(n=o.shift(),this._modules[n]&&(s=this._modules[n].onDependencyError(r)||s),this._inverseDependencies[n])for(var a=0,l=this._inverseDependencies[n].length;l>a;a++)i.hasOwnProperty(this._inverseDependencies[n][a])||(o.push(this._inverseDependencies[n][a]),i[this._inverseDependencies[n][a]]=!0);s||this._config.onError(r)},e.prototype._onModuleComplete=function(e,t){var n,i,s,o;if(this._inverseDependencies.hasOwnProperty(e)){var a=this._inverseDependencies[e];for(delete this._inverseDependencies[e],n=0,i=a.length;i>n;n++)s=a[n],o=this._modules[s],o.resolveDependency(e,t),o.isComplete()&&this._onModuleComplete(s,o.getExports())}if(this._inversePluginDependencies.hasOwnProperty(e)){var l=this._inversePluginDependencies[e];for(delete this._inversePluginDependencies[e],n=0,i=l.length;i>n;n++)this._resolvePluginDependencySync(l[n].moduleId,l[n].dependencyId,t)}r.isAnonymousModule(e)?(delete this._modules[e],delete this._dependencies[e]):this._modules[e].cleanUp()},e.prototype._hasDependencyPath=function(e,t){var n,r,i,s,o,a={},l=[];for(l.push(e),a[e]=!0;l.length>0;)if(i=l.shift(),this._dependencies.hasOwnProperty(i))for(s=this._dependencies[i],n=0,r=s.length;r>n;n++){if(o=s[n],o===t)return!0;a.hasOwnProperty(o)||(a[o]=!0,l.push(o))}return!1},e.prototype._findCyclePath=function(e,t,n){if(e===t||50===n)return[e];if(!this._dependencies.hasOwnProperty(e))return null;for(var r,i=this._dependencies[e],s=0,o=i.length;o>s;s++)if(r=this._findCyclePath(i[s],t,n+1),null!==r)return r.push(e),r;return null},e.prototype._createRequire=function(e){var t=this,n=function(n,r,i){return t._relativeRequire(e,n,r,i)};return n.toUrl=function(t){return e.requireToUrl(e.resolveModule(t))},n},e.prototype._resolvePluginDependencySync=function(e,t,n){var r=this,i=this._modules[e],s=i.getModuleIdResolver(),o=t.indexOf("!"),a=t.substring(0,o),l=t.substring(o+1,t.length),c=function(e){return s.resolveModule(e)};if(l="function"==typeof n.normalize?n.normalize(l,c):c(l),n.dynamic){var u=function(n){i.resolveDependency(t,n),i.isComplete()&&r._onModuleComplete(e,i.getExports())};u.error=function(n){r._config.onError({errorCode:"load",moduleId:t,neededBy:[e],detail:n})},n.load(l,this._createRequire(s),u,this._config.getOptionsLiteral())}else{var p=t;t=a+"!"+l,i.renameDependency(p,t),this._resolveDependency(e,t,function(){var e=function(e){r.defineModule(t,[],e,null)};e.error=function(e){r._config.onError({errorCode:"load",moduleId:t,neededBy:r._inverseDependencies[t]?r._inverseDependencies[t].slice(0):[],detail:e})},n.load(l,r._createRequire(s),e,r._config.getOptionsLiteral())})}},e.prototype._resolvePluginDependencyAsync=function(e,t){var n=this._modules[e],r=t.indexOf("!"),i=t.substring(0,r);this._inversePluginDependencies[i]=this._inversePluginDependencies[i]||[],this._inversePluginDependencies[i].push({moduleId:e,dependencyId:t}),this._modules.hasOwnProperty(i)||this._knownModules.hasOwnProperty(i)||(this._knownModules[i]=!0,this._loadModule(n.getModuleIdResolver(),i))},e.prototype._resolvePluginDependency=function(e,t){var n=t.indexOf("!"),r=t.substring(0,n);this._modules.hasOwnProperty(r)&&this._modules[r].isComplete()?this._resolvePluginDependencySync(e,t,this._modules[r].getExports()):this._resolvePluginDependencyAsync(e,t)},e.prototype._resolveShimmedDependency=function(e,t,n){var i=this._config.getShimmedModuleDefine(t);i.dependencies.length>0?this.defineModule(r.generateAnonymousModule(),i.dependencies,function(){return n(t)},null,new o(this._config,t)):n(t)},e.prototype._resolveDependency=function(e,t,n){var r=this._modules[e];if(this._modules.hasOwnProperty(t)&&this._modules[t].isComplete())r.resolveDependency(t,this._modules[t].getExports());else if(this._dependencies[e].push(t),this._hasDependencyPath(t,e)){console.warn("There is a dependency cycle between '"+t+"' and '"+e+"'. The cyclic path follows:");var i=this._findCyclePath(t,e,0);i.reverse(),i.push(t),console.warn(i.join(" => \n"));var s,o=this._modules.hasOwnProperty(t)?this._modules[t]:null;o&&o.isExportsPassedIn()&&(s=o.getExports()),r.resolveDependency(t,s)}else this._inverseDependencies[t]=this._inverseDependencies[t]||[],this._inverseDependencies[t].push(e),this._modules.hasOwnProperty(t)||this._knownModules.hasOwnProperty(t)||(this._knownModules[t]=!0,this._config.isShimmed(t)?this._resolveShimmedDependency(e,t,n):n(t))},e.prototype._loadModule=function(e,t){var n=this;this._loadingScriptsCount++,this._scriptLoader.load(e.moduleIdToPath(t),function(){return n._onLoad(t)},function(e){return n._onLoadError(t,e)})},e.prototype._resolve=function(e){var t,n,r,i,s,o,a=this;r=e.getId(),i=e.getDependencies(),o=e.getModuleIdResolver(),this._dependencies[r]=[];var l=function(e){return a._loadModule(o,e)};for(t=0,n=i.length;n>t;t++)s=i[t],"require"!==s?s.indexOf("!")>=0?this._resolvePluginDependency(r,s):this._resolveDependency(r,s,l):e.resolveDependency(s,this._createRequire(o));e.isComplete()&&this._onModuleComplete(r,e.getExports())},e}();e.ModuleManager=l;var c=function(){function e(e){this.actualScriptLoader=e,this.callbackMap={}}return e.prototype.load=function(e,t,n){var r=this,i={callback:t,errorback:n};return this.callbackMap.hasOwnProperty(e)?(this.callbackMap[e].push(i),void 0):(this.callbackMap[e]=[i],this.actualScriptLoader.load(e,function(){return r.triggerCallback(e)},function(t){return r.triggerErrorback(e,t)}),void 0)},e.prototype.triggerCallback=function(e){var t=this.callbackMap[e];delete this.callbackMap[e];for(var n=0;n=0?this._load():-1===this.loadTimeout&&(this.loadTimeout=setTimeout(function(){r.loadTimeout=-1,r._load()},0))},e.prototype._load=function(){var e=this.loadCalls;this.loadCalls=[];var t,n=e.length,r=[];for(t=0;n>t;t++)r.push(e[t].scriptSrc);var i=!1;try{importScripts.apply(null,r)}catch(s){for(i=!0,t=0;n>t;t++)e[t].errorback(s)}if(!i)for(t=0;n>t;t++)e[t].callback()},e}(),h=null;h=n?new c(new p):new c(new u);var d=new l(h),m=function(){function e(e,t,n){"string"!=typeof e&&(n=t,t=e,e=null),"object"==typeof t&&r.isArray(t)||(n=t,t=null),t||(t=["require","exports","module"]),e?d.enqueueDefineModule(e,t,n):d.enqueueDefineAnonymousModule(t,n)}return e.amd={jQuery:!0},e}(),f=function(){function e(){if(1===arguments.length){if(arguments[0]instanceof Object&&!r.isArray(arguments[0]))return e.config(arguments[0]),void 0;if("string"==typeof arguments[0])return d.synchronousRequire(arguments[0])}if((2===arguments.length||3===arguments.length)&&r.isArray(arguments[0]))return d.defineModule(r.generateAnonymousModule(),arguments[0],arguments[1],arguments[2]),void 0;throw new Error("Unrecognized require call")}return e.config=function(e,t){"undefined"==typeof t&&(t=!1),d.configure(e,t)},e.getConfig=function(){return d.getConfigurationOptions()},e.reset=function(){d=new l(h)},e}();n||(window.onload=function(){var e,t,n,i=document.getElementsByTagName("script");for(e=0,t=i.length;t>e&&!(n=i[e].getAttribute("data-main"));e++);n&&d.defineModule(r.generateAnonymousModule(),[n],null,null,new o(new s,""))}),"undefined"!=typeof t.require&&"function"!=typeof t.require&&f.config(t.require),t.define=m,t.require=f}}(AMDLoader||(AMDLoader={})),function(e){function t(e,t){var n=e.replace(/\{(\d+)\}/g,function(e,n){var r=n[0];return"undefined"!=typeof t[r]?t[r]:e});return self&&self.document&&self.document.URL.match(/[^\?]*\?[^\#]*pseudo=true/)&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function n(e,t){var n=e[t];return n?n:(n=e["*"],n?n:null)}function r(e,n){for(var r=[],i=0;i=r.length)return"NLS error unknow index "+n;var s=r[n],o=[];o[0]=t+"_"+s;for(var a=0;a=o.length?"NLS error unknow index "+r:t(o[r],i)}})})}}},localize:r})}(this);var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n},_cssPluginGlobal=this,CSSLoaderPlugin;!function(e){var t=_cssPluginGlobal,n=function(){function e(){this._pendingLoads=0}return e.prototype.attachListeners=function(e,t,n,r){var i=function(){t.removeEventListener("load",s),t.removeEventListener("error",o)},s=function(){i(),n()},o=function(e){i(),r(e)};t.addEventListener("load",s),t.addEventListener("error",o)},e.prototype._onLoad=function(e,t){this._pendingLoads--,t()},e.prototype._onLoadError=function(e,t,n){this._pendingLoads--,t(n)},e.prototype._insertLinkNode=function(e){this._pendingLoads++;var t=document.head||document.getElementsByTagName("head")[0],n=t.getElementsByTagName("link")||document.head.getElementsByTagName("script");n.length>0?t.insertBefore(e,n[n.length-1]):t.appendChild(e)},e.prototype.createLinkTag=function(e,t,n,r){var i=this,s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("data-name",e);var o=function(){return i._onLoad(e,n)},a=function(t){return i._onLoadError(e,r,t)};return this.attachListeners(e,s,o,a),s.setAttribute("href",t),s},e.prototype._linkTagExists=function(e,t){var n,r,i,s,o=document.getElementsByTagName("link");for(n=0,r=o.length;r>n;n++)if(i=o[n].getAttribute("data-name"),s=o[n].getAttribute("href"),i===e||s===t)return!0;return!1},e.prototype.load=function(e,t,n,r){if(this._linkTagExists(e,t))return n(),void 0;var i=this.createLinkTag(e,t,n,r);this._insertLinkNode(i)},e}(),r=function(e){function t(){e.call(this),this._blockedLoads=[],this._mergeStyleSheetsTimeout=-1}return __extends(t,e),t.prototype.load=function(e,t,n,r){if(this._linkTagExists(e,t))return n(),void 0;var i=this.createLinkTag(e,t,n,r);this._styleSheetCount()<31?this._insertLinkNode(i):(this._blockedLoads.push(i),this._handleBlocked())},t.prototype._styleSheetCount=function(){var e=document.getElementsByTagName("link").length,t=document.getElementsByTagName("style").length;return e+t},t.prototype._onLoad=function(t,n){e.prototype._onLoad.call(this,t,n),this._handleBlocked()},t.prototype._onLoadError=function(t,n,r){e.prototype._onLoadError.call(this,t,n,r),this._handleBlocked()},t.prototype._handleBlocked=function(){var e=this,t=this._blockedLoads.length;t>0&&-1===this._mergeStyleSheetsTimeout&&(this._mergeStyleSheetsTimeout=window.setTimeout(function(){return e._mergeStyleSheets()},0))},t.prototype._mergeStyleSheet=function(e,t,n,r){for(var i=r.rules.length-1;i>=0;i--)t.insertRule(a.rewriteUrls(n,e,r.rules[i].cssText),0)},t.prototype._mergeStyleSheets=function(){this._mergeStyleSheetsTimeout=-1;var e,t=this._blockedLoads.length,n=document.getElementsByTagName("link"),r=n.length,i=[];for(e=0;r>e;e++)("loaded"===n[e].readyState||"complete"===n[e].readyState)&&i.push({linkNode:n[e],rulesLength:n[e].styleSheet.rules.length});var s=i.length,o=Math.min(Math.floor(s/2),t);i.sort(function(e,t){return t.rulesLength-e.rulesLength});var a,l;for(e=0;o>e;e++)a=i.length-1-e,l=e%(i.length-o),this._mergeStyleSheet(i[l].linkNode.href,i[l].linkNode.styleSheet,i[a].linkNode.href,i[a].linkNode.styleSheet),i[a].linkNode.parentNode.removeChild(i[a].linkNode),r--;for(var c=this._styleSheetCount();31>c&&this._blockedLoads.length>0;)this._insertLinkNode(this._blockedLoads.shift()),c++},t}(n),i=function(e){function t(){e.call(this)}return __extends(t,e),t.prototype.attachListeners=function(e,t,n){t.onload=function(){t.onload=null,n()}},t}(r),s=function(){function e(){this.fs=require.nodeRequire("fs")}return e.prototype.load=function(t,n,r){var i=this.fs.readFileSync(n,"utf8");i.charCodeAt(0)===e.BOM_CHAR_CODE&&(i=i.substring(1)),r(i)},e.BOM_CHAR_CODE=65279,e}(),o=function(){function e(e){this.cssLoader=e}return e.prototype.load=function(t,n,r,i){i=i||{};var s=n.toUrl(t+".css");this.cssLoader.load(t,s,function(n){i.isBuild&&(e.BUILD_MAP[t]=n),r({})},function(){"function"==typeof r.error&&r.error("Could not find "+s+" or it was empty")})},e.prototype.write=function(n,r,i){var s=i.getEntryPoint();t.entryPoints=t.entryPoints||{},t.entryPoints[s]=t.entryPoints[s]||[],t.entryPoints[s].push({moduleName:r,contents:e.BUILD_MAP[r]}),i.asModule(n+"!"+r,"define(['vs/css!"+s+"'], {});")},e.prototype.writeFile=function(e,n,r,i){if(t.entryPoints&&t.entryPoints.hasOwnProperty(n)){for(var s=r.toUrl(n+".css"),o=["/*---------------------------------------------------------"," * Copyright (C) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],l=t.entryPoints[n],c=0;c=t.length&&e.substr(0,t.length)===t},e.pathOf=function(e){var t=e.lastIndexOf("/");return-1!==t?e.substr(0,t+1):""},e.joinPaths=function(t,n){function r(t,n){return e.startsWith(t,n)?Math.max(n.length,t.indexOf("/",n.length)):0}function i(e,t){if("./"!==t){if("../"===t){var n=e.length>0?e[e.length-1]:null;if(n&&"/"===n)return;if(n&&"../"!==n)return e.pop(),void 0}e.push(t)}}function s(e,t){for(;t.length>0;){var n=t.indexOf("/"),r=n>=0?t.substring(0,n+1):t;t=n>=0?t.substring(n+1):"",i(e,r)}}var o=0;o=o||r(t,"//"),o=o||r(t,"http://"),o=o||r(t,"https://");var a=[];return s(a,t.substr(o)),n.length>0&&"/"===n.charAt(0)&&(a=[]),s(a,n),t.substring(0,o)+a.join("")},e.commonPrefix=function(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r&&e.charCodeAt(r)===t.charCodeAt(r);r++);return e.substring(0,r)},e.commonFolderPrefix=function(t,n){var r=e.commonPrefix(t,n),i=r.lastIndexOf("/");return-1===i?"":r.substring(0,i+1)},e.relativePath=function(t,n){if(e.startsWith(n,"/")||e.startsWith(n,"http://")||e.startsWith(n,"https://"))return n;var r=e.commonFolderPrefix(t,n);t=t.substr(r.length),n=n.substr(r.length);for(var i=t.split("/").length,s="",o=1;i>o;o++)s+="../";return s+n},e.rewriteUrls=function(t,n,r){return r.replace(/url\(\s*([^\)]+)\s*\)?/g,function(){for(var r=[],i=0;i0&&(" "===s.charAt(s.length-1)||" "===s.charAt(s.length-1));)s=s.substring(0,s.length-1);if(('"'===s.charAt(s.length-1)||"'"===s.charAt(s.length-1))&&(s=s.substring(0,s.length-1)),!e.startsWith(s,"data:")&&!e.startsWith(s,"http://")&&!e.startsWith(s,"https://")){var o=e.joinPaths(e.pathOf(t),s);s=e.relativePath(n,o)}return"url("+s+")"})},e}();e.Utilities=a,function(){var e=null;e="undefined"!=typeof process&&process.versions&&process.versions.node?new s:navigator.userAgent.indexOf("MSIE 9")>=0?new r:navigator.userAgent.indexOf("MSIE 8")>=0?new i:new n,define("vs/css",new o(e))}()}(CSSLoaderPlugin||(CSSLoaderPlugin={}));var TextLoaderPlugin;!function(e){var t=function(){function e(){}return e.prototype.load=function(e,t,n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){4===i.readyState&&(i.status>=200&&i.status<300||1223===i.status?n(i.responseText):r(i),i.onreadystatechange=null)},i.open("GET",t,!0),i.responseType="",i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(null)},e}(),n=function(){function e(){this.fs=require.nodeRequire("fs")}return e.prototype.load=function(t,n,r){var i=this.fs.readFileSync(n,"utf8");i.charCodeAt(0)===e.BOM_CHAR_CODE&&(i=i.substring(1)),r(i)},e.BOM_CHAR_CODE=65279,e}(),r=function(){function e(e){this.textLoader=e}return e.prototype.load=function(t,n,r,i){i=i||{};var s=n.toUrl(t);this.textLoader.load(t,s,function(n){i.isBuild&&(e.BUILD_MAP[t]=n),r(n)},function(){"function"==typeof r.error&&r.error("Could not find "+s)})},e.prototype.write=function(t,n,r){if(e.BUILD_MAP.hasOwnProperty(n)){var s=i.escapeText(e.BUILD_MAP[n]);r('define("'+t+"!"+n+'", function () { return "'+s+'"; });')}},e.BUILD_MAP={},e}();e.TextPlugin=r;var i=function(){function e(){}return e.escapeText=function(e){for(var t,n="\b".charCodeAt(0),r="\f".charCodeAt(0),i="\n".charCodeAt(0),s=0,o="\r".charCodeAt(0),a=" ".charCodeAt(0),l=" ".charCodeAt(0),c="\\".charCodeAt(0),u='"'.charCodeAt(0),p=0,h=null,d=[],m=0,f=e.length;f>m;m++){switch(t=e.charCodeAt(m)){case n:h="\\b";break;case r:h="\\f";break;case i:h="\\n";break;case s:h="\\0";break;case o:h="\\r";break;case a:h="\\t";break;case l:h="\\v";break;case c:h="\\\\";break;case u:h='\\"'}null!==h&&(d.push(e.substring(p,m)),d.push(h),p=m+1,h=null)}return d.push(e.substring(p,f)),d.join("")},e}();e.Utilities=i,function(){var e=null;e="undefined"!=typeof process&&process.versions&&process.versions.node?new n:new t,define("vs/text",new r(e))}()}(TextLoaderPlugin||(TextLoaderPlugin={}));!function(e){"use strict";function t(e,t){var n=e.replace(/\{(\d+)\}/g,function(e,n){var r=n[0];return"undefined"!=typeof t[r]?t[r]:e});return self&&self.document&&self.document.URL.match(/[^\?]*\?[^\#]*pseudo=true/)&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function n(e,t){var n=e[t];return n?n:(n=e["*"],n?n:null)}function r(e,n){for(var r=[],i=0;i=r.length)return"NLS error unknow index "+n;var s=r[n],o=[];o[0]=t+"_"+s;for(var a=0;a=o.length?"NLS error unknow index "+r:t(o[r],i)}})})}}},localize:r})}(this);"use strict";!function(){var e=self.MonacoEnvironment,r=e&&e.baseUrl?e.baseUrl:"../../../";importScripts(r+"vs/loader.js"),require.config({baseUrl:r,catchError:!0});var s=[];self.onmessage=function(e){s.push(e)},require(["vs/base/worker/workerServer"],function(e){var r=new e.WorkerServer(function(e){self.postMessage(JSON.stringify(e))});for(self.onmessage=function(e){r.onmessage(JSON.parse(e.data))};s.length>0;)self.onmessage(s.shift())})}();
        compatibility worker iframe
        /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";define("vs/base/worker/workerProtocol",["require","exports"],function(e,r){r.MessageType={INITIALIZE:"$initialize",REPLY:"$reply",PRINT:"$print"},r.ReplyType={COMPLETE:"complete",ERROR:"error",PROGRESS:"progress"},r.PrintType={LOG:"log",DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"}}),define("vs/base/worker/workerServer",["require","exports","vs/base/worker/workerProtocol"],function(e,r,t){function s(e){var r={};return e.stacktrace?r.stack=e.stacktrace.split("\n"):e.stack&&(r.stack=e.stack.split("\n")),r.message=e.toString(),r}var n=function(){function r(e){this._postMessage=e,this._workerId=0,this._requestHandler=null,this._bindConsole()}return r.prototype._bindConsole=function(){self.console={log:this._sendPrintMessage.bind(this,t.PrintType.LOG),debug:this._sendPrintMessage.bind(this,t.PrintType.DEBUG),info:this._sendPrintMessage.bind(this,t.PrintType.INFO),warn:this._sendPrintMessage.bind(this,t.PrintType.WARN),error:this._sendPrintMessage.bind(this,t.PrintType.ERROR)}},r.prototype._sendPrintMessage=function(e){for(var r=[],n=0;nנ9qi9i)#+D׀ȶDq&HI=M QtiMd&"?j8r&IENDB`PNG  IHDR w&gAMA a pHYsktEXtSoftwarePaint.NET v3.5.100r2IDAT(Sc`Y; p5 AnZ{K[a& B < [?jUAIENDB`PNG  IHDR w&gAMA a pHYsktEXtSoftwarePaint.NET v3.5.100r-IDAT(Sc` @- 385܃^TH0 '?jHIENDB`PNG  IHDR w&gAMA a pHYsktEXtSoftwarePaint.NET v3.5.100rOIDAT(Sc`Y=w@?hLƮM<@yX5@V1k@1m$?jEIENDB`PNG  IHDRaqIDATx^œK@4n8 X$S"".ſ@\\qAPA"(P]tpl Rr~(>~%qN']Qو8hEba4Is]w@@ԗYk>@C@ +ƗTkywZd iUjyS {Cn_5:̈́d' Ex@QXA$67Q L {jnoI"i_)49Ux"Yf0uxxUԡh!$Y:DL3næyen㗉@S_4:Ikh/Dy z77^CŤ0IENDB`PNG  IHDR~gAMA asRGB pHYsod9IDATc7133 1bE A@l _7?b^"'^vvIENDB`PNG  IHDRaIDATx^=K3AwvWFQ`eko %B@be#?~ lmz;D#@D 0sf0pE=a !Й^p%G; J.u,Y܁ s0 =O*xx숧=#[w^s퓝C\'JvχSATX,{Poۖ^k{3ːo-ȐU[( __.d=Muއ1(Ф޳A;q,cg;P44a\W7D#~ʹgϱ69|Jߋ pL-o!^t_8E)dgoPAm\kť&l >}D젂l sOoe U1l9T-<,27 a NTIENDB`/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .zone-widget { position: absolute; z-index: 10; } .monaco-editor .zone-widget-arrow { width: 0; height: 0; border-color: transparent; border-style: solid; position: absolute; } .monaco-editor .zone-widget-arrow.below { border-bottom-color: yellowGreen; } .monaco-editor .zone-widget .container { border-top-style: solid; border-bottom-style: solid; border-top-width: 0; border-bottom-width: 0; border-top-color: yellowGreen; border-bottom-color: yellowGreen; position: relative; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .inline-color-decoration:before { margin: 0.1em 0.2em 0 0.2em; content:" "; display:inline-block; height:0.8em; width:0.8em; line-height:1em; border:0.1em solid #000; } .monaco-editor.vs-dark .inline-color-decoration:before { border-color: #eee; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .selector { color: gray; font-size: 12px; } .monaco-editor .selector ul { list-style-type: none; padding: 0; margin: 0; margin-left: 1.5em; } .monaco-editor .selector > ul { margin-left: 0; } .monaco-editor .selector .name { color: black; font-weight: bold; } .monaco-editor .selector .key { color: red; } .monaco-editor .selector .value { color: blue; } .monaco-editor.vs-dark .selector .name { color: #569CD6; } .monaco-editor.vs-dark .selector .key { color: #9CDCFE; } .monaco-editor.vs-dark .selector .value { color: #CE9178; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-typescript-status .worker { display: inline-block; width: 1em; height: 1em; } .monaco-typescript-status .worker[status=unknown]:before { content: '?'; } .monaco-typescript-status .worker[status=ok]:before { content: '\25CA'; color: rgb(130, 194, 130); } .monaco-typescript-status .worker[status=updating]:before { content: '\2666'; } .monaco-typescript-status .worker[status=fetching]:before { content: '\2666'; color: blue; } .monaco-typescript-status .worker[status=error]:before { content: '!'; color: red; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .cursors-layer { position: absolute; top: 0; } .monaco-editor .cursors-layer > .cursor { position: absolute; width: 2px; cursor: text; } .monaco-editor .cursors-layer > .cursor.secondary { width: 1px; opacity: 0.6; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .contentWidgets { position: absolute; top: 0; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .overlayWidgets { position: absolute; top: 0; left:0; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-scrollable-element > .scrollbar > .up-arrow { background: url(../base/ui/scrollbar/impl/arrow-up.png); cursor: pointer; } .monaco-scrollable-element > .scrollbar > .down-arrow { background: url(../base/ui/scrollbar/impl/arrow-down.png); cursor: pointer; } .monaco-scrollable-element > .scrollbar > .left-arrow { background: url(../base/ui/scrollbar/impl/arrow-left.png); cursor: pointer; } .monaco-scrollable-element > .scrollbar > .right-arrow { background: url(../base/ui/scrollbar/impl/arrow-right.png); cursor: pointer; } .monaco-scrollable-element > .visible { opacity: 1; background:rgba(0,0,0,0); -webkit-transition: opacity 100ms linear; -o-transition: opacity 100ms linear; -moz-transition: opacity 100ms linear; -ms-transition: opacity 100ms linear; } .monaco-scrollable-element > .invisible { opacity: 0; -webkit-transition: opacity 800ms linear; -o-transition: opacity 800ms linear; -moz-transition: opacity 800ms linear; -ms-transition: opacity 800ms linear; } .monaco-scrollable-element > .shadow { position: absolute; display: none; } .monaco-scrollable-element > .shadow.top { display: block; top: 0; left: 3px; height: 3px; width: 100%; box-shadow: #DDD 0 6px 6px -6px inset; } .monaco-scrollable-element > .shadow.left { display: block; top: 3px; left: 0; height: 100%; width: 3px; box-shadow: #DDD 6px 0 6px -6px inset; } .monaco-scrollable-element > .shadow.top-left-corner { display: block; top: 0; left: 0; height: 3px; width: 3px; } .monaco-scrollable-element > .shadow.top.left { box-shadow: #DDD 6px 6px 6px -6px inset; } .monaco-scrollable-element > .scrollbar > .slider { background: rgba(100, 100, 100, .4); } .monaco-scrollable-element > .scrollbar > .slider:hover { background: rgba(100, 100, 100, .7); } .monaco-scrollable-element > .scrollbar > .slider.active { background: rgba(0, 0, 0, .6); } .hc-black .monaco-scrollable-element > .scrollbar > .slider { background: none; border: 20px solid #6FC3DF; opacity: .3; } .hc-black .monaco-scrollable-element > .scrollbar > .slider:hover { opacity: .35; } .hc-black .monaco-scrollable-element > .scrollbar > .slider.active { opacity: .4; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .current-line { position: absolute; left: 0; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .selections-layer { position: absolute; top: 0; overflow: hidden; } .monaco-editor .selections-layer .cslr { position: absolute; } .monaco-editor .top-left-radius { border-top-left-radius: 3px; } .monaco-editor .bottom-left-radius { border-bottom-left-radius: 3px; } .monaco-editor .top-right-radius { border-top-right-radius: 3px; } .monaco-editor .bottom-right-radius { border-bottom-right-radius: 3px; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .decorations-layer { position: absolute; top: 0; overflow: hidden; } .monaco-editor .decorations-layer .cdr { position: absolute; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .glyph-margin { position: absolute; top: 0; background: #E6E7E8; -webkit-box-sizing: border-box; -o-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } .monaco-editor .glyph-margin .cgmr { position: absolute; width: 100%; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .lines-decorations { position: absolute; top: 0; background: white; } .monaco-editor .lines-decorations .cldr { position: absolute; width: 100%; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .line-numbers { position: absolute; top: 0; text-align: right; cursor: default; } .monaco-editor .line-numbers .clnr { position: absolute; width: 100%; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor .scroll-decoration { position: absolute; top: 0; left: 0; height: 6px; box-shadow: #DDD 0 6px 6px -6px inset; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ ::-ms-clear { display: none; } .monaco-editor { position: relative; overflow: visible; -webkit-text-size-adjust: 100%; } .monaco-editor .overflow-guard { position: relative; overflow: hidden; } .monaco-editor .view-overlays > .dynamic { position: absolute; top: 0; } .monaco-editor .view-overlays > .static { position: absolute; top: 0; } .monaco-editor .inputarea { width: 1px; min-width: 0; height: 1px; min-height: 0; margin: 0; padding: 0; position: absolute; outline: none; resize: none; border: none; overflow: hidden; } .monaco-editor.ie .inputarea, .monaco-editor.ff .inputarea { width: 0; height: 0; } .monaco-editor.ime-input .inputarea, .monaco-editor.ie.ime-input .inputarea, .monaco-editor.ff.ime-input .inputarea、 { width: 500px; z-index: 10; background: rgba(255, 255, 255, 0.85); } .monaco-editor .accessibility-output { position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: hidden; } .monaco-editor .lines-content { position: absolute; top: 0; -webkit-user-select: text; -ms-user-select: text; -khtml-user-select: text; -moz-user-select: text; -o-user-select: text; user-select: text; } .monaco-editor.ie .lines-content { -ms-user-select: none; user-select: none; } .monaco-editor .view-lines { cursor: text; white-space: pre-wrap; word-wrap: break-word; } .monaco-editor .view-line { position: relative; overflow: visible; width: 100%; } .monaco-editor .view-layer-line { position: relative; overflow: visible; width: 100%; } .monaco-editor .redsquiggly { background: url(css/red-squiggly.png) repeat-x bottom left; } .monaco-editor .glyph-warning { background: url(css/warning-glyph.png) no-repeat center; } .monaco-editor .glyph-error { background: url(css/error-glyph.png) no-repeat center; } .monaco-editor .greensquiggly { background: url(css/green-squiggly.png) repeat-x bottom left; } .monaco-editor .linked-editing { box-shadow: inset 0 0 0 1px #B9B9B9; } .monaco-editor .bracket-match { box-shadow: inset 0 0 0 1px #B9B9B9; background-color: rgba(0, 100, 0, 0.1); } .monaco-editor .editor-widget input { color: inherit; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor, .monaco-editor .inputarea { font-family: Monaco, Menlo, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace; font-size: 14px; line-height: 19px; color: #333; background: white; } .monaco-editor.mac { font-size: 12px; line-height: 18px; } .monaco-editor-background { background: white; } .monaco-editor .cursor { background: black; } .monaco-editor .current-line { background: #eaeaf2; -moz-box-sizing: border-box; box-sizing: border-box; } .monaco-editor .typeInfo { font-size: 12px; } .monaco-editor .typeInfo .documentation { font-family: "Segoe UI", "HelveticaNeue", sans-serif; } .monaco-editor .line-numbers { background: #fff; color: #2B91AF; } .monaco-editor .lineHighlight { background-color: rgba(253, 255, 0, 0.2); } .monaco-editor .dynamic.focused > .selections-layer > .selected-text { background: #ADD6FF !important; } .monaco-editor .dynamic > .selections-layer > .selected-text { background: #E5EBF1 !important; } .monaco-diff-editor .diffOverview { background-color: #f9f7f7; } .monaco-editor .wordHighlight { background-color: rgba(253, 255, 0, 0.28); } .monaco-editor .wordHighlightStrong { background-color: rgba(249, 206, 130, 0.7); } .monaco-editor .valueSetReplacement { outline: solid 2px #888; } .monaco-editor .focus-mode { background-color: #FFFFFF; opacity: 0.333; } .monaco-editor .token { color: #000000; } .monaco-editor .token.meta { color: #e00000; } .monaco-editor .token.meta.code1 { font-weight: bold; } .monaco-editor .token.keyword { color: #0000FF; } .monaco-editor .token.keyword.flow { color: #AF00DB; } .monaco-editor .token.variable { color: #001188; } .monaco-editor .token.variable.predefined { color: #4864AA; } .monaco-editor .token.constant { color: #dd0000; } .monaco-editor .token.string { color: #A31515; } .monaco-editor .token.string.escape { color: #A31515; } .monaco-editor .token.comment { color: #008000; font-style: italic; } .monaco-editor .token.literal { color: #e00000; } .monaco-editor .token.literal.hex { color: #e07000; } .monaco-editor .token.number { color: #09885A; } .monaco-editor .token.number.hex { color: #3030c0; } .monaco-editor .token.number.octal { color: #204070; } .monaco-editor .token.number.binary { color: #e07070; } .monaco-editor .token.regexp { color: #811f3f; } .monaco-editor .token.delimiter { color: #008080; } .monaco-editor .token.tag { color: #800000; } .monaco-editor .token.key { color: #863B00; } .monaco-editor .token.attribute.name { color: red; } .monaco-editor .token.attribute.value { color: #0451A5; } .monaco-editor .token.info-token { color: #316bcd; } .monaco-editor .token.warn-token { color: #cd9731; } .monaco-editor .token.error-token { color: #cd3131; } .monaco-editor .token.debug-token { color: purple; } .monaco-editor .token.meta.php { font-weight: bold; } .monaco-editor .token.comment.vs { font-style: italic; } .monaco-editor .token.attribute.vs { font-style: italic; } .monaco-editor .token.vs { font-style: italic; } .monaco-editor .token.delimiter.vs { font-style: italic; } .monaco-editor .token.string.vs { font-style: italic; } .monaco-editor .token.predefined.ruby { color: #0000FF; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";define("vs/editor/core/constants",["require","exports"],function(e,t){t.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor",ITerminal:"vs.editor.ITerminal"},t.ClassName={EditorWarningDecoration:"greensquiggly",EditorErrorDecoration:"redsquiggly"},t.EventType={Disposed:"disposed",ConfigurationChanged:"configurationChanged",ModelDispose:"modelDispose",ModelChanged:"modelChanged",ModelTokensChanged:"modelTokensChanged",ModelModeChanged:"modelsModeChanged",ModelContentChanged:"contentChanged",ModelContentChangedFlush:"flush",ModelContentChangedLinesDeleted:"linesDeleted",ModelContentChangedLinesInserted:"linesInserted",ModelContentChangedLineChanged:"lineChanged",OnBeforeModelContentChangedFlush:"onBeforeFlush",OnBeforeModelContentChangedLinesDeleted:"onBeforeLinesDeleted",OnBeforeModelContentChangedLinesInserted:"onBeforeLinesInserted",OnBeforeModelContentChangedLineChanged:"onBeforeLineChanged",ModelPropertiesChanged:"propertiesChanged",ModelDecorationsChanged:"decorationsChanged",CursorPositionChanged:"positionChanged",CursorSelectionChanged:"selectionChanged",CursorRevealRange:"revealRange",ViewFocusGained:"focusGained",ViewFocusLost:"focusLost",ViewFocusChanged:"focusChanged",ViewScrollWidthChanged:"scrollWidthChanged",ViewScrollHeightChanged:"scrollHeightChanged",ViewScrollChanged:"scrollChanged",ViewZonesChanged:"zonesChanged",ViewLayoutChanged:"viewLayoutChanged",ContextMenu:"contextMenu",MouseDown:"mousedown",MouseUp:"mouseup",MouseMove:"mousemove",MouseLeave:"mouseleave",KeyDown:"keydown",KeyUp:"keyup",EditorLayout:"editorLayout",DiffUpdated:"diffUpdated"}}),define("vs/editor/core/position",["require","exports"],function(e,t){function n(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}t.isIPosition=n,function(e){function t(e){return{startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column}}function n(e){return{lineNumber:e.startLineNumber,column:e.startColumn}}function i(e){return{lineNumber:e.endLineNumber,column:e.endColumn}}e.asEmptyRange=t,e.startPosition=n,e.endPosition=i}(t.PositionUtils||(t.PositionUtils={}));var i=(t.PositionUtils,function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.equals=function(e){return!!e&&this.lineNumber===e.lineNumber&&this.column===e.column},e.prototype.isBefore=function(e){return this.lineNumbere.endLineNumber?!1:t.lineNumber===e.startLineNumber&&t.columne.endColumn?!1:!0}function s(e,t){return t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber?!1:t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn?!1:!0}function a(e,t){var n=e.startLineNumber,i=e.startColumn,r=e.endLineNumber,o=e.endColumn,s=t.startLineNumber,a=t.startColumn,u=t.endLineNumber,l=t.endColumn;return s>n?(n=s,i=a):n===s&&(i=Math.max(i,a)),r>u?(r=u,o=l):r===u&&(o=Math.min(o,l)),n>r?null:n===r&&i>o?null:new g(n,i,r,o)}function u(e,t){var n,i,r,o;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,o=e.endColumn),new g(n,i,r,o)}function l(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}function c(e,t){return e.startLineNumber===t.startLineNumber?e.startColumn===t.startColumn?e.endLineNumber===t.endLineNumber?e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber:e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber}function d(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}function h(e){return e.endLineNumber>e.startLineNumber}function p(e){return 17*e.startLineNumber+23*e.startColumn+29*e.endLineNumber+37*e.endColumn}function f(e){return new g(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)}t.isIRange=i,t.isEmpty=r,t.containsPosition=o,t.containsRange=s,t.intersectRanges=a,t.plusRange=u,t.equalsRange=l,t.compareRangesUsingStarts=c,t.compareRangesUsingEnds=d,t.spansMultipleLines=h,t.hashCode=p;var g=function(){function e(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return t.isEmpty(this)},e.prototype.containsPosition=function(e){return t.containsPosition(this,e)},e.prototype.containsRange=function(e){return t.containsRange(this,e)},e.prototype.plusRange=function(e){return t.plusRange(this,e)},e.prototype.intersectRanges=function(e){return t.intersectRanges(this,e)},e.prototype.equalsRange=function(e){return t.equalsRange(this,e)},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.cloneRange=function(){return new e(this.startLineNumber,this.startColumn,this.endLineNumber,this.endColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return new e(this.startLineNumber,this.startColumn,this.startLineNumber,this.startColumn)},e}();t.Range=g,t.create=f}),/*! © Microsoft. All rights reserved. This library is supported for use in Windows Store apps only. Build: 1.0.9200.20602.win8_ldr.130108-1504 Version: Microsoft.WinJS.1.0 */ "undefined"==typeof WinJS&&(!function(e){e.setImmediate||(e.setImmediate=function(t){return e.setTimeout(t,0)})}(this),function(e,t){function n(e,n){var i,r,o,s=Object.keys(n);for(r=0,o=s.length;o>r;r++){var a=s[r],u=95!==a.charCodeAt(0),l=n[a];!l||"object"!=typeof l||l.value===t&&"function"!=typeof l.get&&"function"!=typeof l.set?u?e[a]=l:(i=i||{},i[a]={value:l,enumerable:u,configurable:!0,writable:!0}):(l.enumerable===t&&(l.enumerable=u),i=i||{},i[a]=l)}i&&Object.defineProperties(e,i)}!function(t){function i(e,t,i){for(var r=e,o=t.split("."),s=0,a=o.length;a>s;s++){var u=o[s];r[u]||Object.defineProperty(r,u,{value:{},writable:!1,enumerable:!0,configurable:!0}),r=r[u]}return i&&n(r,i),r}function r(t,n){return i(e,t,n)}e[t]||(e[t]=Object.create(Object.prototype));var o=e[t];o.Namespace||(o.Namespace=Object.create(Object.prototype)),Object.defineProperties(o.Namespace,{defineWithParent:{value:i,writable:!0,enumerable:!0,configurable:!0},define:{value:r,writable:!0,enumerable:!0,configurable:!0}})}("WinJS"),function(e){function t(t,i,r){return t=t||function(){},e.Utilities.markSupportedForProcessing(t),i&&n(t.prototype,i),r&&n(t,r),t}function i(i,r,o,s){if(i){r=r||function(){};var a=i.prototype;return r.prototype=Object.create(a),e.Utilities.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),o&&n(r.prototype,o),s&&n(r,s),r}return t(r,o,s)}function r(e){e=e||function(){};var t,i;for(t=1,i=arguments.length;i>t;t++)n(e.prototype,arguments[t]);return e}e.Namespace.define("WinJS.Class",{define:t,derive:i,mix:r})}(WinJS)}(this),function(e,t){function n(e){return e}function i(e,t,n){return e.split(".").reduce(function(e,t){return e?n(e[t]):null},t)}var r=!!e.Windows,o={notSupportedForProcessing:"Value is not supported within a declarative processing context, if you want it to be supported mark it using WinJS.Utilities.markSupportedForProcessing. The value was: '{0}'"};t.Namespace.define("WinJS.Utilities",{_setHasWinRT:{value:function(e){r=e},configurable:!1,writable:!1,enumerable:!1},hasWinRT:{get:function(){return r},configurable:!1,enumerable:!0},_getMemberFiltered:i,getMember:function(t,r){return t?i(t,r||e,n):null},ready:function(n,i){return new t.Promise(function(r,o){function s(){if(n)try{n(),r()}catch(e){o(e)}else r()}var a=t.Utilities.testReadyState;a||(a=e.document?document.readyState:"complete"),"complete"===a||e.document&&null!==document.body?i?e.setImmediate(s):s():e.addEventListener("DOMContentLoaded",s,!1)})},strictProcessing:{get:function(){return!0},configurable:!1,enumerable:!0},markSupportedForProcessing:{value:function(e){return e.supportedForProcessing=!0,e},configurable:!1,writable:!1,enumerable:!0},requireSupportedForProcessing:{value:function(n){var i=!0;switch(i=i&&!(n===e),i=i&&!(n===e.location),i=i&&!(n instanceof HTMLIFrameElement),i=i&&!("function"==typeof n&&!n.supportedForProcessing),e.frames.length){case 0:break;case 1:i=i&&!(n===e.frames[0]);break;default:for(var r=0,s=e.frames.length;i&&s>r;r++)i=i&&!(n===e.frames[r])}if(i)return n;throw new t.ErrorFromName("WinJS.Utilities.requireSupportedForProcessing",t.Resources._formatString(o.notSupportedForProcessing,n))},configurable:!1,writable:!1,enumerable:!0}}),t.Namespace.define("WinJS",{validation:!1,strictProcessing:{value:function(){},configurable:!1,writable:!1,enumerable:!1}})}(this,WinJS),function(){function e(e,t,n){var o=e;return"function"==typeof o&&(o=o()),(n&&r.test(n)?"":n?n+": ":"")+(t?t.replace(i,":")+": ":"")+o}function t(e,t,n){var i=WinJS.Utilities.formatLog(e,t,n);console[n&&r.test(n)?n:"log"](i)}function n(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var i=/\s+/g,r=/^(error|warn|info|log)$/;WinJS.Namespace.define("WinJS.Utilities",{startLog:function(e){e=e||{},"string"==typeof e&&(e={tags:e});var r=e.type&&new RegExp("^("+n(e.type).replace(i," ").split(" ").join("|")+")$"),o=e.excludeTags&&new RegExp("(^|\\s)("+n(e.excludeTags).replace(i," ").split(" ").join("|")+")(\\s|$)","i"),s=e.tags&&new RegExp("(^|\\s)("+n(e.tags).replace(i," ").split(" ").join("|")+")(\\s|$)","i"),a=e.action||t;if(!(r||o||s||WinJS.log))return WinJS.log=a,void 0;var u=function(e,t,n){r&&!r.test(n)||o&&o.test(t)||s&&!s.test(t)||a(e,t,n),u.next&&u.next(e,t,n)};u.next=WinJS.log,WinJS.log=u},stopLog:function(){delete WinJS.log},formatLog:e})}(),function(e){function t(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var i=this[t];n?(i||(i={wrapper:function(e){return i.userHandler(e)},userHandler:n},Object.defineProperty(this,t,{value:i,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,i.wrapper,!1)),i.userHandler=n):i&&(this.removeEventListener(e,i.wrapper,!1),this[t]=null)},enumerable:!0}}function n(){for(var e={},n=0,i=arguments.length;i>n;n++){var r=arguments[n];e["on"+r]=t(r)}return e}var i=e.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),r={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var i=this._listeners[e]=this._listeners[e]||[],r=0,o=i.length;o>r;r++){var s=i[r];if(s.useCapture===n&&s.listener===t)return}i.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){var r=new i(e,t,this);n=n.slice(0,n.length);for(var o=0,s=n.length;s>o&&!r._stopImmediatePropagationCalled;o++)n[o].listener(r);return r.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var i=this._listeners&&this._listeners[e];if(i)for(var r=0,o=i.length;o>r;r++){var s=i[r];if(s.listener===t&&s.useCapture===n){i.splice(r,1),0===i.length&&delete this._listeners[e];break}}}};e.Namespace.define("WinJS.Utilities",{_createEventProperty:t,createEventProperties:n,eventMixin:r})}(WinJS),function(e,t,n){var i,r=!1,o="contextchanged",s=t.Class.mix(t.Class.define(null,{},{supportedForProcessing:!1}),t.Utilities.eventMixin),a=new s,u={malformedFormatStringInput:"Malformed, did you mean to escape your '{0}'?"};t.Namespace.define("WinJS.Resources",{addEventListener:function(e,n,i){if(t.Utilities.hasWinRT&&!r&&e===o)try{Windows.ApplicationModel.Resources.Core.ResourceManager.current.defaultContext.qualifierValues.addEventListener("mapchanged",function(e){t.Resources.dispatchEvent(o,{qualifier:e.key,changed:e.target[e.key]})},!1),r=!0}catch(s){}a.addEventListener(e,n,i)},removeEventListener:a.removeEventListener.bind(a),dispatchEvent:a.dispatchEvent.bind(a),_formatString:function(e){var n=arguments;return n.length>1&&(e=e.replace(/({{)|(}})|{(\d+)}|({)|(})/g,function(e,i,r,o,s,a){if(s||a)throw t.Resources._formatString(u.malformedFormatStringInput,s||a);return i&&"{"||r&&"}"||n[(0|o)+1]})),e},_getStringWinRT:function(e){if(!i){var t=Windows.ApplicationModel.Resources.Core.ResourceManager.current.mainResourceMap;try{i=t.getSubtree("Resources")}catch(r){}i||(i=t)}var o,s,a;try{a=i.getValue(e),a&&(o=a.valueAsString,o===n&&(o=a.toString()))}catch(r){}if(!o)return{value:e,empty:!0};try{s=a.getQualifierValue("Language")}catch(r){return{value:o}}return{value:o,lang:s}},_getStringJS:function(t){var n=e.strings&&e.strings[t];return"string"==typeof n&&(n={value:n}),n||{value:t,empty:!0}}}),Object.defineProperties(t.Resources,t.Utilities.createEventProperties(o));var l;t.Resources.getString=function(e){return(l=l||(t.Utilities.hasWinRT?t.Resources._getStringWinRT:t.Resources._getStringJS))(e)}}(this,WinJS),function(e,t){function n(){}function i(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?R:O,e._value=t,e._setState(n)}function r(e,t,n,i,r,o){return{exception:e,error:t,promise:n,handler:o,id:i,parent:r}}function o(e,t,n,i){var o=n._isException,s=n._errorId;return r(o?t:null,o?null:t,e,s,n,i)}function s(e,t,n){var i=n._isException,o=n._errorId;return m(e,o,i),r(i?t:null,i?null:t,e,o,n)}function a(e,t){var n=++H;return m(e,n),r(null,t,e,n)}function u(e,t){var n=++H;return m(e,n,!0),r(t,null,e,n)}function l(e,t,n,i){g(e,{c:t,e:n,p:i})}function c(e,t,n,i){e._value=t,p(e,t,n,i),e._setState(A)}function d(e,t){var n=e._value,i=e._listeners;if(i){e._listeners=null;var r,o;for(r=0,o=Array.isArray(i)?i.length:1;o>r;r++){var s=1===o?i:i[r],a=s.c,u=s.promise;if(u){try{u._setCompleteValue(a?a(n):n)}catch(l){u._setExceptionValue(l)}u._state!==R&&u._listeners&&t.push(u)}else j.prototype.done.call(e,a)}}}function h(e,t){var n=e._value,i=e._listeners;if(i){e._listeners=null;var r,s;for(r=0,s=Array.isArray(i)?i.length:1;s>r;r++){var a=1===s?i:i[r],u=a.e,l=a.promise;if(l){try{u?(u.handlesOnError||p(l,n,o,e,u),l._setCompleteValue(u(n))):l._setChainedErrorValue(n,e)}catch(c){l._setExceptionValue(c)}l._state!==R&&l._listeners&&t.push(l)}else B.prototype.done.call(e,null,u)}}}function p(e,t,n,i,r){if(S._listeners[L]){if(t instanceof Error&&t.message===E)return;S.dispatchEvent(L,n(e,t,i,r))}}function f(e,t){var n=e._listeners;if(n){var i,r;for(i=0,r=Array.isArray(n)?n.length:1;r>i;i++){var o=1===r?n:n[i],s=o.p;if(s)try{s(t)}catch(a){}o.c||o.e||!o.promise||o.promise._progress(t)}}}function g(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n],n.push(t)):n=t,e._listeners=n}function m(e,t,n){e._isException=n||!1,e._errorId=t}function v(e,t,n,i){e._value=t,p(e,t,n,i),e._setState(W)}function y(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?R:D,e._value=t,e._setState(n)}function _(e,t,n,i){var r=new z(e);return g(e,{promise:r,c:t,e:n,p:i}),r}function b(e){var t;return new WinJS.Promise(function(n){e?t=setTimeout(n,e):setImmediate(n)},function(){t&&clearTimeout(t)})}function C(e,t){var n=function(){t.cancel()},i=function(){e.cancel()};return e.then(n),t.then(i,i),t}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var w=WinJS.Class.mix(WinJS.Class.define(null,{},{supportedForProcessing:!1}),WinJS.Utilities.eventMixin),S=new w;S._listeners={};var L="error",E="Canceled",T=!1,N={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};N.all=N.promise|N.thenPromise|N.errorPromise|N.exceptionPromise|N.completePromise;var M,x,R,I,k,P,O,D,A,W,H=1;M={name:"created",enter:function(e){e._setState(x)},cancel:n,done:n,then:n,_completed:n,_error:n,_notify:n,_progress:n,_setCompleteValue:n,_setErrorValue:n},x={name:"working",enter:n,cancel:function(e){e._setState(k)},done:l,then:_,_completed:i,_error:c,_notify:n,_progress:f,_setCompleteValue:y,_setErrorValue:v},R={name:"waiting",enter:function(e){var t=e._value,n=function(i){t._errorId?e._chainedError(i,t):(p(e,i,o,t,n),e._error(i))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))},cancel:function(e){e._setState(I)},done:l,then:_,_completed:i,_error:c,_notify:n,_progress:f,_setCompleteValue:y,_setErrorValue:v},I={name:"waiting_canceled",enter:function(e){e._setState(P);var t=e._value;t.cancel&&t.cancel()},cancel:n,done:l,then:_,_completed:i,_error:c,_notify:n,_progress:f,_setCompleteValue:y,_setErrorValue:v},k={name:"canceled",enter:function(e){e._setState(P),e._cancelAction()},cancel:n,done:l,then:_,_completed:i,_error:c,_notify:n,_progress:f,_setCompleteValue:y,_setErrorValue:v},P={name:"canceling",enter:function(e){var t=new Error(E);t.name=t.message,e._value=t,e._setState(A)},cancel:n,done:n,then:n,_completed:n,_error:n,_notify:n,_progress:n,_setCompleteValue:n,_setErrorValue:n},O={name:"complete_notify",enter:function(e){if(e.done=j.prototype.done,e.then=j.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.pop(),t._state._notify(t,n);e._setState(D)},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:d,_progress:n,_setCompleteValue:n,_setErrorValue:n},D={name:"success",enter:function(e){e.done=j.prototype.done,e.then=j.prototype.then,e._cleanupAction()},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:d,_progress:n,_setCompleteValue:n,_setErrorValue:n},A={name:"error_notify",enter:function(e){if(e.done=B.prototype.done,e.then=B.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.pop(),t._state._notify(t,n);e._setState(W)},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:h,_progress:n,_setCompleteValue:n,_setErrorValue:n},W={name:"error",enter:function(e){e.done=B.prototype.done,e.then=B.prototype.then,e._cleanupAction()},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:h,_progress:n,_setCompleteValue:n,_setErrorValue:n};var V,F=WinJS.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,n){this._state.done(this,e,t,n)},then:function(e,t,n){return this._state.then(this,e,t,n)},_chainedError:function(e,t){var n=this._state._error(this,e,s,t);return this._run(),n},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,a);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,s,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,u);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),z=WinJS.Class.derive(F,function(e){T&&(T===!0||T&N.thenPromise)&&(this._stack=WinJS.Promise._getStack()),this._creator=e,this._setState(M),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),B=WinJS.Class.define(function(e){T&&(T===!0||T&N.errorPromise)&&(this._stack=WinJS.Promise._getStack()),this._value=e,p(this,e,a)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||p(null,n,o,this,t);var i=t(n);return i&&"object"==typeof i&&"function"==typeof i.done&&i.done(),void 0}catch(r){n=r}n instanceof Error&&n.message===E||setImmediate(function(){throw n})},then:function(e,t){if(!t)return this;var n,i=this._value;try{t.handlesOnError||p(null,i,o,this,t),n=new j(t(i))}catch(r){n=r===i?this:new U(r)}return n}},{supportedForProcessing:!1}),U=WinJS.Class.derive(B,function(e){T&&(T===!0||T&N.exceptionPromise)&&(this._stack=WinJS.Promise._getStack()),this._value=e,p(this,e,u)},{},{supportedForProcessing:!1}),j=WinJS.Class.define(function(e){if(T&&(T===!0||T&N.completePromise)&&(this._stack=WinJS.Promise._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new z(null);return t._setCompleteValue(e),t}this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(n){setImmediate(function(){throw n})}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new j(t)}catch(n){return new U(n)}}},{supportedForProcessing:!1}),q=WinJS.Class.derive(F,function(e,t){T&&(T===!0||T&N.promise)&&(this._stack=WinJS.Promise._getStack()),this._oncancel=t,this._setState(M),this._run();try{var n=this._completed.bind(this),i=this._error.bind(this),r=this._progress.bind(this);e(n,i,r)}catch(o){this._setExceptionValue(o)}},{_oncancel:null,_cancelAction:function(){if(!this._oncancel)throw new Error("Promise did not implement oncancel");try{this._oncancel()}catch(e){{e.message,e.stack}S.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){S.addEventListener(e,t,n)},any:function(e){return new q(function(t,n){{var i=Object.keys(e);Array.isArray(e)?[]:{}}0===i.length&&t();var r=0;i.forEach(function(o){q.as(e[o]).then(function(){t({key:o,value:e[o]})},function(s){return s instanceof Error&&s.name===E?(++r===i.length&&t(WinJS.Promise.cancel),void 0):(n({key:o,value:e[o]}),void 0)})})},function(){var t=Object.keys(e);t.forEach(function(t){var n=q.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new j(e)},cancel:{get:function(){return V=V||new B(new WinJS.ErrorFromName(E))}},dispatchEvent:function(e,t){return S.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new q(function(n,i,r){var o=Object.keys(e),s=Array.isArray(e)?[]:{},a=Array.isArray(e)?[]:{},u=0,l=o.length,c=function(e){if(0===--l){var t=Object.keys(s).length;if(0===t)n(a);else{var u=0;o.forEach(function(e){var t=s[e];t instanceof Error&&t.name===E&&u++}),u===t?n(WinJS.Promise.cancel):i(s)}}else r({Key:e,Done:!0})};return o.forEach(function(n){var i=e[n];i===t?u++:q.then(i,function(e){a[n]=e,c(n)},function(e){s[n]=e,c(n)})}),l-=u,0===l?(n(a),void 0):void 0},function(){Object.keys(e).forEach(function(t){var n=q.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){S.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,i){return q.as(e).then(t,n,i)},thenEach:function(e,t,n,i){var r=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){r[o]=q.as(e[o]).then(t,n,i)}),q.join(r)},timeout:function(e,t){var n=b(e);return t?C(n,t):n},wrap:function(e){return new j(e)},wrapError:function(e){return new B(e)},_veryExpensiveTagWithStack:{get:function(){return T},set:function(e){T=e}},_veryExpensiveTagWithStack_tag:N,_getStack:function(){if(Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}}});Object.defineProperties(q,WinJS.Utilities.createEventProperties(L));var G=WinJS.Class.derive(F,function(e){this._oncancel=e,this._setState(M),this._run()},{_cancelAction:function(){this._oncancel&&this._oncancel()},_cleanupAction:function(){this._oncancel=null}},{supportedForProcessing:!1}),K=WinJS.Class.define(function(e){this._promise=new G(e)},{promise:{get:function(){return this._promise}},cancel:function(){this._promise.cancel()},complete:function(e){this._promise._completed(e)},error:function(e){this._promise._error(e)},progress:function(e){this._promise._progress(e)}},{supportedForProcessing:!1});WinJS.Namespace.define("WinJS",{Promise:q,_Signal:K})}(this),function(e,t){t.Namespace.define("WinJS",{ErrorFromName:t.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1})})}(this,WinJS),function(){WinJS.Namespace.define("WinJS",{xhr:function(e){var t;return new WinJS.Promise(function(n,i,r){t=new XMLHttpRequest,t.onreadystatechange=function(){t._canceled||(4===t.readyState?(t.status>=200&&t.status<300||1223===t.status?n(t):i(t),t.onreadystatechange=function(){}):r(t))},t.open(e.type||"GET",e.url,!0,e.user,e.password),t.responseType=e.responseType||"",Object.keys(e.headers||{}).forEach(function(n){t.setRequestHeader(n,e.headers[n])}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.customRequestInitializer&&e.customRequestInitializer(t),t.send(e.data)},function(){t._canceled=!0,t.abort()})}})}(),function(e){var t,n,i,r,o,s,a={nonStaticHTML:"Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property or the document.write method to add a script element will generate this exception. If the content is safe and from a trusted source, use a method to explicitly manipulate elements and attributes, such as createElement, or use setInnerHTMLUnsafe (or other unsafe method)."};t=n=function(e,t){e.innerHTML=t},i=r=function(e,t){e.outerHTML=t},o=s=function(e,t,n){e.insertAdjacentHTML(t,n)};var u=e.MSApp;if(u)n=function(e,t){u.execUnsafeLocalFunction(function(){e.innerHTML=t})},r=function(e,t){u.execUnsafeLocalFunction(function(){e.outerHTML=t})},s=function(e,t,n){u.execUnsafeLocalFunction(function(){e.insertAdjacentHTML(t,n)})};else if(e.msIsStaticHTML){var l=function(t){if(!e.msIsStaticHTML(t))throw new WinJS.ErrorFromName("WinJS.Utitilies.NonStaticHTML",a.nonStaticHTML)};t=function(e,t){l(t),e.innerHTML=t},i=function(e,t){l(t),e.outerHTML=t},o=function(e,t,n){l(n),e.insertAdjacentHTML(t,n)}}WinJS.Namespace.define("WinJS.Utilities",{setInnerHTML:t,setInnerHTMLUnsafe:n,setOuterHTML:i,setOuterHTMLUnsafe:r,insertAdjacentHTML:o,insertAdjacentHTMLUnsafe:s})}(this)),define("vs/base/lib/raw.winjs.base",[],{}),define("vs/base/types",["require","exports"],function(e,t){function n(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array?!0:!1}function i(e){return"string"==typeof e||e instanceof String?!0:!1}function r(e){return"undefined"==typeof e||null===e?!1:"[object Object]"===Object.prototype.toString.call(e)}function o(e){return("number"==typeof e||e instanceof Number)&&!isNaN(e)?!0:!1}function s(e){return e===!0||e===!1}function a(e){return"undefined"==typeof e}function u(e){return t.isUndefined(e)||null===e}function l(e){if(!t.isObject(e))return!1;for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}function c(e){return"[object Function]"===Object.prototype.toString.call(e)}function d(){for(var e=[],n=0;n0&&e.every(function(e){return t.isFunction(e)})}function h(e){for(var t=[],n=0;n=0&&d.indexOf("MSIE")<0,m=d.indexOf("MSIE 10")>=0,v=d.indexOf("MSIE 9")>=0,y=!1;t.browser={isWindows:d.indexOf("Windows")>=0,isMacintosh:d.indexOf("Macintosh")>=0,isOpera:d.indexOf("Opera")>=0,isIE11orEarlier:g||m||v,isIE11:g,isIE10orEarlier:m||v,isIE10orLater:g||m,isIE10:m,isIE9:v,isFirefox:d.indexOf("Firefox")>=0,isWebKit:d.indexOf("AppleWebKit")>=0,isChrome:d.indexOf("Chrome")>=0,isSafari:-1===d.indexOf("Chrome")&&d.indexOf("Safari")>=0,isIPad:d.indexOf("iPad")>=0,canPushState:function(){return!y&&self&&self.history&&self.history.pushState},disablePushState:function(){y=!0},hasWorkers:f,hasCSSAnimationSupport:function(){if(this._hasCSSAnimationSupport===!0||this._hasCSSAnimationSupport===!1)return this._hasCSSAnimationSupport;for(var e=!1,t=document.createElement("div"),i=["animationName","webkitAnimationName","msAnimationName","MozAnimationName","OAnimationName"],r=0;r0&&null!==e.statusText?t&&null!==e.responseText&&e.responseText.length>0?n.localize("vs_base_errors",3,e.statusText,e.status,e.responseText):n.localize("vs_base_errors",4,e.statusText,e.status):t&&null!==e.responseText&&e.responseText.length>0?n.localize("vs_base_errors",5,e.responseText):n.localize("vs_base_errors",6)}function c(e,t){return l(new C(e),t)}function d(e,t){return t&&e.message&&(e.stack||e.stacktrace)?n.localize("vs_base_errors",7,e.message,e.stack||e.stacktrace):e.message?e.message:n.localize("vs_base_errors",8)}function h(e,t){if("undefined"==typeof t&&(t=!1),!e)return n.localize("vs_base_errors",9);if(o.isString(e))return e;if(e instanceof C)return l(e,t);if(!o.isUndefinedOrNull(e.status))return c(e,t);if(e.detail){var i=e.detail;if(i.error){if(i.error&&!o.isUndefinedOrNull(i.error.status))return c(i.error,t);if(!o.isArray(i.error))return d(i.error,t);for(var r=0;ro;o++)r.push(new i(e[o].getType(),e[o].getData(),t))}0===n._deferredCnt?n._emitEvents(r):n._collectedEvents.push.apply(n._collectedEvents,r)})},e.prototype.addEmitter2=function(e,t){var n=this.addEmitter(e,t);return{dispose:n}},e.prototype.addEmitterTypeListener=function(e,t,n){if(t){if("*"===e)throw new Error("Bulk listeners cannot specify an emitter type");return this.addListener(e+"/"+t,n)}return this.addListener(e,n)},e.prototype._removeListener=function(e,t){if(this._listeners.hasOwnProperty(e))for(var n=this._listeners[e],i=0,r=n.length;r>i;i++)if(n[i]===t){n.splice(i,1);break}},e.prototype._removeBulkListener=function(e){for(var t=0,n=this._bulkListeners.length;n>t;t++)if(this._bulkListeners[t]===e){this._bulkListeners.splice(t,1);break}},e.prototype._emitToSpecificTypeListeners=function(e,t){if(this._listeners.hasOwnProperty(e))for(var i=this._listeners[e].slice(0),r=0,o=i.length;o>r;r++)try{i[r](t)}catch(s){n.onUnexpectedError(s)}},e.prototype._emitToBulkListeners=function(e){for(var t=this._bulkListeners.slice(0),i=0,r=t.length;r>i;i++)try{t[i](e)}catch(o){n.onUnexpectedError(o)}},e.prototype._emitEvents=function(e){this._bulkListeners.length>0&&this._emitToBulkListeners(e);for(var t=0,n=e.length;n>t;t++){var i=e[t];this._emitToSpecificTypeListeners(i.getType(),i.getData()),i.getEmitterType()&&this._emitToSpecificTypeListeners(i.getType()+"/"+i.getEmitterType(),i.getData())}},e.prototype.emit=function(e,t){if("undefined"==typeof t&&(t={}),this._allowedEventTypes&&!this._allowedEventTypes.hasOwnProperty(e))throw new Error("Cannot emit this event type because it wasn't white-listed!");if(this._listeners.hasOwnProperty(e)||0!==this._bulkListeners.length){var n=new i(e,t);0===this._deferredCnt?this._emitEvents([n]):this._collectedEvents.push(n)}},e.prototype.deferredEmit=function(e){this._deferredCnt=this._deferredCnt+1;var t=e();return this._deferredCnt=this._deferredCnt-1,0===this._deferredCnt&&this._emitCollected(),t},e.prototype._emitCollected=function(){var e=this._collectedEvents;this._collectedEvents=[],e.length>0&&this._emitEvents(e)},e}();t.EventEmitter=r});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/ui/events",["require","exports"],function(e,t){var n=function(){function e(e){this.time=(new Date).getTime(),this.originalEvent=e,this.source=null}return e}();t.Event=n;var i=function(e){function t(t,n){e.call(this,n),this.message=t}return __extends(t,e),t}(n);t.MessageEvent=i;var r=function(e){function t(t,n,i,r){e.call(this,r),this.key=t,this.oldValue=n,this.newValue=i}return __extends(t,e),t}(n);t.PropertyChangeEvent=r;var o=function(e){function t(t,n){e.call(this,n),this.element=t}return __extends(t,e),t}(n);t.ViewerEvent=o,t.EventType={PROPERTY_CHANGED:"propertyChanged",SELECTION:"selection",FOCUS:"focus",BLUR:"blur",HIGHLIGHT:"highlight",EXPAND:"expand",COLLAPSE:"collapse",TOGGLE:"toggle",CONTENTS_CHANGED:"contentsChanged",BEFORE_RUN:"beforeRun",RUN:"run",EDIT:"edit",SAVE:"save",CANCEL:"cancel",INFO:"info",WARNING:"warning",ERROR:"error",CHANGE:"change",DISPOSE:"dispose"}});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/ui/actions",["require","exports","vs/base/lib/winjs.base","vs/base/eventEmitter","vs/base/ui/events"],function(e,t,n,i,r){function o(e){return e?e instanceof a?!0:"string"!=typeof e.id?!1:"string"!=typeof e.label?!1:"string"!=typeof e.class?!1:"boolean"!=typeof e.enabled?!1:"boolean"!=typeof e.checked?!1:"function"!=typeof e.run?!1:!0:!1}function s(e){function t(t){return function(){e.forEach(function(e){e.checked=e===t})}}return e.map(function(e){return new u(e,t(e))})}t.isAction=o;var a=function(e){function t(t,n,i,r,o){"undefined"==typeof n&&(n=""),"undefined"==typeof i&&(i=""),"undefined"==typeof r&&(r=!0),"undefined"==typeof o&&(o=null),e.call(this),this._id=t,this._label=n,this._cssClass=i,this._enabled=r,this._actionCallback=o}return __extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),t.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this.emit(t.LABEL,{source:this}))},Object.defineProperty(t.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),t.prototype._setClass=function(e){this._cssClass!==e&&(this._cssClass=e,this.emit(t.CLASS,{source:this}))},Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),t.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this.emit(t.ENABLED,{source:this}))},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),t.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this.emit(t.CHECKED,{source:this}))},Object.defineProperty(t.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionCallback",{get:function(){return this._actionCallback},set:function(e){this._actionCallback=e},enumerable:!0,configurable:!0}),t.prototype.run=function(e){return null!==this._actionCallback?this._actionCallback(e):n.Promise.as(!0)},t.LABEL="label",t.CLASS="class",t.ENABLED="enabled",t.CHECKED="checked",t}(i.EventEmitter);t.Action=a;var u=function(e){function t(t,n){e.call(this,t.id,t.label,t.class,t.enabled,null),this.delegate=t,this.runHandler=n}return __extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.delegate.id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this.delegate.label},set:function(e){this.delegate.label=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"class",{get:function(){return this.delegate.class},set:function(e){this.delegate.class=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.delegate.enabled},set:function(e){this.delegate.enabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.delegate.checked},set:function(e){this.delegate.checked=e},enumerable:!0,configurable:!0}),t.prototype.run=function(e){return this.runHandler(e),this.delegate.run(e)},t.prototype.addListener=function(e,t){return this.delegate.addListener(e,t)},t.prototype.addBulkListener=function(e){return this.delegate.addBulkListener(e)},t.prototype.addEmitter=function(e,t){return this.delegate.addEmitter(e,t)},t.prototype.addEmitterTypeListener=function(e,t,n){return this.delegate.addEmitterTypeListener(e,t,n)},t.prototype.emit=function(e,t){this.delegate.emit(e,t)},t}(a);t.radioGroup=s;var l=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.run=function(e,t){var i=this;if(e.enabled)return this.emit(r.EventType.BEFORE_RUN,{action:e}),n.Promise.as(e.run(t)).then(function(t){i.emit(r.EventType.RUN,{action:e,result:t})},function(t){i.emit(r.EventType.RUN,{action:e,error:t})})},t}(i.EventEmitter);t.ActionRunner=l}),define("vs/base/lifecycle",["require","exports"],function(e,t){function n(e){for(var t=0,n=e.length;n>t;t++)e[t]&&e[t].dispose();return[]}function i(){for(var e=[],n=0;n0;)e.pop()();return e}t.disposeAll=n,t.combinedDispose=i,t.cAll=r}),define("vs/base/assert",["require","exports"],function(e,t){function n(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}function i(e,t,n){if(e!==t||!e||!t)throw new Error(n?"Assertion failed ("+n+")":"Assertion Failed")}t.ok=n,t.equals=i});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/platform/platform",["require","exports","vs/base/errors","vs/base/lib/winjs.base","vs/base/types","vs/base/assert"],function(e,t,n,i,r,o){var s=function(){function e(e){this.ctor=e}return e.prototype.createNew=function(){for(var e=[],t=0;to;o++)r.push(n);return r.reverse().join("")}function o(e){for(var t=[],n=0;no;o++)i=i.replace(new RegExp("\\{"+o+"\\}","g"),t[o]);return i}function s(e){return e||(e=new Date),n.localize("vs_base_strings",0,t.pad(e.getMonth()+1,2),t.pad(e.getDate(),2),t.pad(e.getFullYear(),4),t.pad(e.getHours(),2),t.pad(e.getMinutes(),2),t.pad(e.getSeconds(),2))}function a(e){return e||(e=new Date),n.localize("vs_base_strings",1,t.pad(e.getHours(),2),t.pad(e.getMinutes(),2),t.pad(e.getSeconds(),2))}function u(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function l(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function c(e,n,i){return e.replace(new RegExp(t.escapeRegExpCharacters(n.toString()),"g"),i)}function d(e){var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}function h(e,n){"undefined"==typeof n&&(n=" ");var i=t.ltrim(e,n);return t.rtrim(i,n)}function p(e,t){var n=t.length;if(0===n||0===e.length)return e;for(var i=0,r=-1;(r=e.indexOf(t,i))===i;)i+=n;return e.substring(i)}function f(e,t){var n=t.length,i=e.length;if(0===n||0===i)return e;for(var r=i,o=-1;;){if(o=e.lastIndexOf(t,r-1),-1===o||o+n!==r)break;if(0===o)return"";r=o}return e.substring(0,r)}function g(e){return e.replace(/(^\s+|\s+$)/g,"")}function m(e){return e.replace(/\s+/g," ")}function v(e){var t=(new Date).getTime(),i=(t-e)/1e3;if(60>i)return n.localize("vs_base_strings",2,Math.floor(i));var r=i/60;if(60>r)return n.localize("vs_base_strings",3,Math.floor(r));var o=r/60;if(24>o)return n.localize("vs_base_strings",4,Math.floor(o));var s=o/24;return n.localize("vs_base_strings",5,Math.floor(s))}function y(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function _(e,t){for(var n=0,i=t.length;i>n;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return!1;return!0}function b(e,t){if(t.length>e.length)return!1;for(var n=0,i=e.length-t.length;ni;i++)n[i]=encodeURIComponent(n[i]);return n.join("/")}return encodeURIComponent(e)}function E(e){return/^\w[\w.]*$/.test(e)}function T(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function N(e,t,n){return t&&(e="^"+e),n&&(e+="$"),e}function M(e,n){if(t.regExpLeadsToEndlessLoop(new RegExp(e,n)))throw new Error("Regular expression /"+e+"/g results in infinitive matches")}function x(e){return e?(0===e.indexOf("/")&&(e=e.substring(1)),t.encodeURIPart(e,!0)):""}function R(e,t){return"["+e+"m"+t+""}function I(e){for(var t=0,n=e.length;n>t;t++)if(" "!==e.charAt(t)&&" "!==e.charAt(t))return t;return-1}function k(e){for(var t=0,n=e.length;n>t;t++)if(" "!==e.charAt(t)&&" "!==e.charAt(t))return e.substring(0,t);return e}function P(e){for(var t=e.length-1;t>=0;t--)if(" "!==e.charAt(t)&&" "!==e.charAt(t))return t;return-1}function O(e,t){if(!B&&(B=!0,window.Intl&&i.isFunction(window.Intl.Collator))){var n=new window.Intl.Collator;i.isFunction(n.compare)&&(z=n.compare)}return z?z.call(this,e,t):e.localeCompare(t)}function D(e){return e>=97&&122>=e||e>=65&&90>=e}function A(e,t){var n=e.length,i=t.length;if(n!==i)return!1;for(var r=0;n>r;r++){var o=e.charCodeAt(r),s=t.charCodeAt(r);if(o!==s)if(D(o)&&D(s)){var a=Math.abs(o-s);if(0!==a&&32!==a)return!1}else if(String.fromCharCode(o).toLocaleLowerCase()!==String.fromCharCode(s).toLocaleLowerCase())return!1}return!0}function W(e,t,n){"undefined"==typeof n&&(n=4);var i=Math.abs(e.length-t.length);if(i>n)return 0;var r,o,s=[],a=[];for(r=0;rn;n++)for(var r=t,o=e[n],s=0,a=o.length;a>s;s++)r=F(r,o.charCodeAt(s));return function(e){for(var n=t,i=0,r=e.length;n.children&&r>i;i++)if(n=V(n,e.charCodeAt(i)),!n)return!1;return!n.children}}function V(e,t){if(!e.children)return null;for(var n=0,i=e.children.length;i>n;n++)if(e.children[n].ch===t)return e.children[n];return null}function F(e,t){if(e.children){for(var n=e.children.length,i=0;n>i;i++)if(e.children[i].ch===t)return e.children[i];return e.children.push({ch:t,children:null}),e.children[n]}return e.children=[{ch:t,children:null}],e.children[0]}t.empty="",t.pad=r,t.format=o,t.formatDate=s,t.formatTime=a,t.escape=u,t.escapeRegExpCharacters=l,t.replaceAll=c,t.stripHtml=d,t.trim=h,t.ltrim=p,t.rtrim=f,t.trimWhitespace=g,t.normalize=m;t.conciseformatDiff=v,t.convertSimple2RegExpPattern=y,t.startsWith=_,t.endsWith=b,t.splice=C,t.createRegExp=w,t.regExpLeadsToEndlessLoop=S,t.encodeURIPart=L,t.isCamelCasePattern=E,t.toRegExpPattern=T,t.anchorPattern=N,t.assertRegExp=M,t.normalizePath=x,t.colorize=R,t.firstNonWhitespaceIndex=I,t.getLeadingWhitespace=k,t.lastNonWhitespaceIndex=P;var z,B=!1;t.localeCompare=O,t.equalsIgnoreCase=A,t.difference=W,t.prefixMatcher=H}),define("vs/base/hash",["require","exports"],function(e,t){function n(e){for(var t=1540483477,n=24,i=0,r=e.length,o=r,s=0^o,a=i;o>=2;){var u=e.charCodeAt(a),l=e.charCodeAt(a+1),c=u|l<<16;c*=t,c^=c>>n,c*=t,s*=t,s^=c,a+=2,o-=2}return 1===o&&(s^=e.charCodeAt(a),s*=t),s^=s>>13,s*=t,s^=s>>15}function i(e,t){return(t<<5)+t+e&2147483647}t.computeMurmur2StringHashCode=n,t.combine=i}),define("vs/base/network",["require","exports","./assert","./hash","./strings","./types"],function(e,t,n,i,r,o){function s(e){var t=window.location.search;if(t){t=t.substring(1);for(var n=t.split("&"),i=0;i=0){var o=r.split("=");if(decodeURIComponent(o[0])===e&&o.length>1)return decodeURIComponent(o[1])}else if(decodeURIComponent(r)===e)return"true"}}return null}function a(e,t){return function(n){return n?n.replace(e,t):n}}function u(e,t,n){for(var i=0;i=0&&u>=0){var l=o.substring(s,u+n.length),c=t+"//"+n;if(l!==c){var d=new RegExp(r.escapeRegExpCharacters(l),"gi");return a(d,c)}}}return function(e){return e}}var l=function(){function e(e){n.ok(!!e,"spec must not be null"),this._spec=e}return e.fromEncoded=function(t){return new e(decodeURIComponent(t))},e.fromValue=function(t){return new e(t)},e.prototype.equals=function(t){return t instanceof e&&t._spec===this._spec},e.prototype.hashCode=function(){return i.computeMurmur2StringHashCode(this._spec)},e.prototype.toJSON=function(){return{$url:this._spec}},e.prototype.toExternal=function(){return this._spec},e.prototype.toString=function(){return this._spec},e.prototype.getScheme=function(){return"undefined"==typeof this._scheme&&(this._scheme=this._doGetScheme()),this._scheme},e.prototype._doGetScheme=function(){var e=this._spec.indexOf(":");return-1===e?null:this._spec.substring(0,e)},e.prototype.getPath=function(){return"undefined"==typeof this._path&&(this._path=this._doGetPath()),this._path},e.prototype._doGetPath=function(){for(var e=0,t=-1,n=0,i=this._spec.length;i>n;n++){var r=this._spec.charAt(n);switch(r){case"/":3===++e&&(t=n);break;case"?":case"#":return-1===t?null:this._spec.substring(t,n)}}return-1===t?null:t===this._spec.length-1?"":this._spec.substring(t)},e}();t.URL=l,t.getQueryValue=s,t._createBasicAuthRemover=u,t.getBasicAuthRemover=o.runOnce(function(){var e=null;try{throw new Error}catch(n){e=n.stack}return e?t._createBasicAuthRemover(e.split("\n"),self.location.protocol,self.location.hostname):function(e){return e}}),function(e){e.inMemory="inMemory"}(t.schemas||(t.schemas={}));t.schemas});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/performance/timer",["require","exports","vs/base/env","vs/base/eventEmitter","vs/nls!vs/editor/editor.main"],function(e,t,n,i,r){function o(e,t){return d.start(e,t)}function s(){return d}var a=!!self.msWriteProfilerMark;!function(e){e[e.EDITOR=0]="EDITOR",e[e.LANGUAGES=1]="LANGUAGES",e[e.WORKER=2]="WORKER",e[e.WORKBENCH=3]="WORKBENCH"}(t.Topic||(t.Topic={}));var u=(t.Topic,function(){function e(){}return e.prototype.start=function(){return this},e.prototype.stop=function(){},e.prototype.timeTaken=function(){return-1},e}());t.NullTimerEvent=u;var l=function(){function e(e,t,n,i){if(this.timeKeeper=e,this.name=t,this.topic=n,this.stopTime=null,i)return this.startTime=i,void 0;if(this.startTime=new Date,a){var r=["Monaco",this.topic,this.name,"start"];self.msWriteProfilerMark(r.join("|"))}}return e.prototype.start=function(e){if(this.stopTime)throw new Error(r.localize("vs_base_performance_timer",0));return this.timeKeeper.start(this.topic,this.name+"."+e)},e.prototype.stop=function(e){if(null===this.stopTime){if(e)return this.stopTime=e,void 0;if(this.stopTime=new Date,this.timeKeeper.emit("eventStop",this),a){var t=["Monaco",this.topic,this.name,"stop"];self.msWriteProfilerMark(t.join("|"))}}},e.prototype.timeTaken=function(){return this.stopTime?this.stopTime.getTime()-this.startTime.getTime():-1},e}();t.TimerEvent=l;var c=function(e){function i(){e.call(this),this.timeoutId=null,this.collectedEvents=[],this.eventCacheLimit=1e3,this.maxTimerLength=6e4,this.cleanupInterval=12e4}return __extends(i,e),i.prototype.isEnabled=function(){return n.enablePerformanceEvents},i.prototype.start=function(e,n){if(!this.isEnabled())return t.nullEvent;0===e?e="Editor":1===e?e="Languages":2===e?e="Worker":3===e&&(e="Workbench");var i=new l(this,n,e);return this.addEvent(i),this.cleanupTimers(),i},i.prototype.addEvent=function(e){e.id=i.EVENT_ID,i.EVENT_ID++,this.collectedEvents.push(e),this.emit("eventStart",e),this.collectedEvents.length>this.eventCacheLimit&&this.collectedEvents.shift()},i.prototype.cleanupTimers=function(){var e=this;null===this.timeoutId&&(this.timeoutId=setTimeout(function(){var t=Date.now();e.collectedEvents.forEach(function(n){!n.stopTime&&t-n.startTime.getTime()>=e.maxTimerLength&&n.stop()})},this.cleanupInterval))},i.prototype.dispose=function(){clearTimeout(this.timeoutId),e.prototype.dispose.call(this)},i.prototype.getCollectedEvents=function(){return this.collectedEvents.slice(0)},i.prototype.clearCollectedEvents=function(){this.collectedEvents=[]},i.prototype.setInitialCollectedEvents=function(e,t){var n=this;this.isEnabled()&&(t&&(i.PARSE_TIME=t),e.forEach(function(e){var t=new l(n,e.name,e.topic,e.startTime);t.stop(e.stopTime),n.addEvent(t)}))},i.EVENT_ID=1,i.PARSE_TIME=new Date,i}(i.EventEmitter);t.TimeKeeper=c;var d=new c;t.nullEvent=new u,t.start=o,t.getTimeKeeper=s});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/platform/services",["require","exports","vs/base/lib/winjs.base","vs/base/async","vs/base/strings","vs/base/network","vs/base/eventEmitter","vs/base/performance/timer","vs/base/objects","vs/base/hash","vs/base/errors"],function(e,t,n,i,r,o,s,a,u,l,c){var d=function(){function e(e){this._staticArguments=e}return e.prototype.appendStaticArguments=function(e){this._staticArguments.push.apply(this._staticArguments,e)},e.prototype.staticArguments=function(e){return isNaN(e)?this._staticArguments.slice(0):this._staticArguments[e]},e.prototype._validate=function(e){if(!e)throw c.illegalArgument("can not be falsy")},e}();t.AbstractDescriptor=d;var h=function(e){function t(t){for(var n=[],i=0;i0&&(this.origin=this.origin.substring(0,this.origin.length-t.length+1)),r.endsWith(this.origin,"/")||(this.origin+="/")}else this.origin="/"},e.prototype.getRequestUrl=function(e,t,n){var i=this.contextService.getWorkspace();if(i[e]){var o=i[e]+r.normalizePath(t);return n?this.origin+r.ltrim(o,"/"):o}return null},e.prototype.getPath=function(e,t){var n=this.getRequestUrl(e,"/",!0);if(!n)return null;var i=t.toExternal().indexOf(n);return 0===i?t.toExternal().substr(n.length-1):null},e.prototype.getAdditionalHeaders=function(){return this.contextService.getConfiguration().additionalHeaders||{}},e.prototype.supportsPrivateChannel=function(){return!1},e.prototype.establishPrivateChannel=function(){return n.Promise.wrapError("Not Implemented")},e.prototype.supportsRemoteEvents=function(){return!1},e.prototype.addRemoteListener=function(){throw new Error("Not Implemented")},e.prototype.makeRequest=function(e){var t=a.nullEvent,r=this.getAdditionalHeaders();return this._telemetryService&&(r["X-TelemetrySession"]=this._telemetryService.sessionID),e.headers=u.mixin(e.headers,r),this._telemetryService&&(t=this._telemetryService.start("WorkbenchXHR",{url:e.url},!1)),i.always(n.xhr(e),function(e){t.data&&(t.data.status=e.status),t.stop()})},e.prototype.makeChunkedRequest=function(e){function t(e){for(var t,n,i=0,r={};;){if(t=e.indexOf(":",i),n=e.indexOf("\n",t+1),0>t||0>n)break;r[e.substring(i,t).trim()]=e.substring(t+1,n).trim(),i=n+1}return r}function i(e){if(c)return o("canceled"),void 0;var n=e.indexOf("\r\n\r\n",u);if(-1!==n){for(var i=[];-1!==n;){var r=t(e.substring(u,n)),a=Number(r["Content-Length"]);if(n+4+a>e.length)break;var d={header:r,body:e.substr(n+4,a)};l.push(d),i.push(d),u=n+4+a,n=e.indexOf("\r\n\r\n",u)}s(i)}}var r,o,s,a=this,u=0,l=[],c=!1;return new n.Promise(function(t,n,u){r=t,o=n,s=u,a.makeRequest(e).done(function(e){i(e.responseText),r(l)},function(e){o(e)},function(e){3===e.readyState&&i(e.responseText)})},function(){c=!0})},e}();t.BaseRequestService=g,function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(t.StorageScope||(t.StorageScope={}));t.StorageScope;!function(e){e[e.LEFT=0]="LEFT",e[e.CENTER=1]="CENTER",e[e.RIGHT=2]="RIGHT"}(t.Position||(t.Position={}));t.Position;t.POSITIONS=[0,1,2];var m=function(){function e(e){this._selection=e||[]}return Object.defineProperty(e.prototype,"selection",{get:function(){return this._selection},enumerable:!0,configurable:!0}),e.prototype.isEmpty=function(){return 0===this._selection.length},e.EMPTY=new e([]),e}();t.Selection=m;var v=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.toArray=function(){return this.selection},t}(m);t.StructuredSelection=v,function(e){e[e.Info=0]="Info",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(t.Severity||(t.Severity={}));var y=(t.Severity,function(){function e(){}return e.SERVICE_CHANGED="service-changed",e.SET_CHANGED="set-changed",e.SET_ADDED="set-added",e.SET_REMOVED="set-removed",e}());t.MarkerServiceConstants=y;var _=function(){function e(){}return e.UPDATED="update",e}();t.ExperimentServiceEventTypes=_;var b=function(e){function t(t,n,i){e.call(this),this._id=t,this._name=n,this._description=i,this._enabled=!1}return __extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this.emit("enabled",this))},enumerable:!0,configurable:!0}),t}(s.EventEmitter);t.Experiment=b;var C=function(){function e(){}return e.UPDATED="update",e}();t.ConfigurationServiceEventTypes=C,t.ResourceEvents={ADDED:"resource.added",REMOVED:"resource.removed",CHANGED:"resource.changed"},function(e){!function(e){e[e.File=1]="File",e[e.Text=2]="Text"}(e.QueryType||(e.QueryType={}));var t=(e.QueryType,function(){function e(){}return e.prototype.search=function(){return n.TPromise.as({fileMatches:[]})},e.Instance=new e,e}());e.NullSearchService=t}(t.search||(t.search={}));t.search});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/editorExtensions",["require","exports","vs/base/ui/actions","vs/base/lifecycle","vs/base/types","vs/editor/core/constants","vs/base/lib/winjs.base","vs/platform/platform","vs/platform/services"],function(e,t,n,i,r,o,s,a,u){function l(e){a.Registry.as(t.Extensions.EditorContributions).registerEditorContribution2(e)}function c(e,n,i){for(var r=[],o=0;o0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(window.clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){var t=this;if("explicit"!==e.reason)return this._stopAll(),void 0;if(!this.model.getMode().occurrencesSupport)return this._stopAll(),void 0;var n=this.editor.getSelection();if(n.startLineNumber!==n.endLineNumber)return this._stopAll(),void 0;var r=n.startLineNumber,o=n.startColumn,s=n.endColumn,a=this.model.getWordAtPosition({lineNumber:r,column:o},!0,!0);if(!a||a.startColumn>o||a.endColumnc;c++){var h=this.model.getDecorationRange(this._decorationIds[c]);h&&h.startLineNumber===r&&h.startColumn<=o&&h.endColumn>=s&&(l=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),l)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(window.clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var p=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=this.model.getMode().occurrencesSupport.findOccurrences(this.model.getAssociatedResource(),this.editor.getPosition()),this.workerRequest.then(function(e){p===t.workerRequestTokenId&&(t.workerRequestCompleted=!0,t.workerRequestValue=e,t._beginRenderDecorations())}).done()}this._lastWordRange=u},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),n=this.lastCursorPositionChangeTime+250;t>=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=window.setTimeout(function(){e.renderDecorations()},n-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var e=[],t=0,n=this.workerRequestValue.length;n>t;t++){var i=this.workerRequestValue[t],r="wordHighlight",o="rgba(246, 185, 77, 0.7)";i.kind&&"write"===i.kind&&(r+="Strong",o="rgba(249, 206, 130, 0.7)"),e.push({range:i.range,options:{stickiness:1,isOverlay:!1,className:r,overviewRuler:{color:o,position:2}}})}this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e)},e.prototype.destroy=function(){for(this._stopAll();this.toUnhook.length>0;)this.toUnhook.pop()()},e}(),s=function(){function e(e,t){this.wordHighligher=new o(t)}return e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.wordHighligher.destroy()},e.ID="editor.contrib.wordHighlighter",e}();r.registerEditorContribution(s)}),define("vs/base/dom/iframe",["require","exports"],function(e,t){function n(e){if(!e.parent||e.parent===e)return null;try{var t=e.location,n=e.parent.location;if(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port)return a=!0,null}catch(i){return a=!0,null}return e.parent}function i(e,t){for(var n,i=e.document.getElementsByTagName("iframe"),r=0,o=i.length;o>r;r++)if(n=i[r],n.contentWindow===t)return n;return null}function r(){if(!u){u=[];var e,t=window;do e=n(t),e?u.push({window:t,iframeElement:i(e,t)}):u.push({window:t,iframeElement:null}),t=e;while(t)}return u.slice(0)}function o(){return u||t.getSameOriginWindowChain(),a}function s(e,n){if(!n||e===n)return{top:0,left:0};for(var i=0,r=0,o=t.getSameOriginWindowChain(),s=0;s=o?c():l||(l=!0,t.scheduleAtNextAnimationFrame(d,Number.MAX_VALUE))}},h=t.addListener(e,n,function(e){s=r(s,e),l||(l=!0,t.scheduleAtNextAnimationFrame(d,Number.MAX_VALUE))});return function(){u=!0,h()}}function y(e,n,i,r,o){"undefined"==typeof r&&(r=B),"undefined"==typeof o&&(o=z);var s=null,a=0,u=-1,l=function(){u=-1,a=(new Date).getTime(),i(s),s=null},c=t.addListener(e,n,function(e){s=r(s,e);var t=(new Date).getTime()-a;t>=o?(-1!==u&&window.clearTimeout(u),l()):-1===u&&(u=window.setTimeout(l,o-t))});return function(){-1!==u&&window.clearTimeout(u),c()}}function _(e,t,n,i,r){return F.isNative?v(e,t,n,i,r):y(e,t,n,i,r)}function b(e,n,i,r,o){var s=t.addThrottledListener(e,n,i,r,o);return{dispose:s}}function C(e){return document.defaultView&&i.isFunction(document.defaultView.getComputedStyle)?document.defaultView.getComputedStyle(e,null):e.currentStyle}function w(e,n,i){var r=t.getComputedStyle(e),o="0";return o=r.getPropertyValue?r.getPropertyValue(n):r.getAttribute(i),U(e,o)}function S(e){for(var n=e.offsetParent,i=e.offsetTop,r=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;var o=t.getComputedStyle(e);o&&(r-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===n&&(r+=j.getBorderLeftWidth(e),i+=j.getBorderTopWidth(e),i+=e.offsetTop,r+=e.offsetLeft,n=e.offsetParent)}return{left:r,top:i}}function L(e){var n=t.getTopLeftOffset(e);return{left:n.left,top:n.top,width:e.clientWidth,height:e.clientHeight}}function E(e){var t=j.getBorderLeftWidth(e)+j.getBorderRightWidth(e),n=j.getPaddingLeft(e)+j.getPaddingRight(e);return e.offsetWidth-t-n}function T(e){var t=j.getMarginLeft(e)+j.getMarginRight(e);return e.offsetWidth+t}function N(e){var t=j.getBorderTopWidth(e)+j.getBorderBottomWidth(e),n=j.getPaddingTop(e)+j.getPaddingBottom(e);return e.offsetHeight-t-n}function M(e){var t=j.getMarginTop(e)+j.getMarginBottom(e);return e.offsetHeight+t}function x(e,t){if(null===e)return 0;for(var n=e.offsetLeft,i=e.parentNode;null!==i&&(n-=i.offsetLeft,i!==t);)i=i.parentNode;return n}function R(e,t){if(null===e)return 0;for(var n=e.offsetTop,i=e.parentNode;null!==i&&(n-=i.offsetTop,i!==t);)i=i.parentNode;return n}function I(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function k(){q=document.createElement("style"),q.type="text/css",q.media="screen",document.getElementsByTagName("head")[0].appendChild(q)}function P(){return q&&q.sheet&&q.sheet.rules?q.sheet.rules:q&&q.sheet&&q.sheet.cssRules?q.sheet.cssRules:[]}function O(e,t){t&&(q||k(),q.sheet.insertRule(e+"{"+t+"}",0))}function D(e){if(!q)return null;for(var t=P(),n=0;n=0;i--)q.sheet.deleteRule(n[i])}}function W(e){return u.getService().isHTMLElement(e)}function H(e){try{e.select(),e.setSelectionRange&&e.setSelectionRange(0,9999)}catch(t){}}function V(e){var i=!1,o=!1,s=new r.EventEmitter,a=[],u=null;u={addFocusListener:function(e){var t=s.addListener("focus",e);return a.push(t),t},addBlurListener:function(e){var t=s.addListener("blur",e);return a.push(t),t},dispose:function(){for(;a.length>0;)a.pop()()}};var l=function(){o=!1,i||(i=!0,s.emit("focus",{}))},c=function(){i&&(o=!0,n.isTesting()?o&&(o=!1,i=!1,s.emit("blur",{})):window.setTimeout(function(){o&&(o=!1,i=!1,s.emit("blur",{}))},0))};return a.push(t.addListener(e,t.EventType.FOCUS,l,!0)),a.push(t.addListener(e,t.EventType.BLUR,c,!0)),u}t.clearNode=l,t.isInDOM=c,t.hasClass,t.addClass,t.removeClass,t.toggleClass,function(){function e(e,t){var o=e.className;if(!o)return n=-1,void 0;t=t.trim();var s=o.length,a=t.length;if(0===a)return n=-1,void 0;if(a>s)return n=-1,void 0;if(o===t)return n=0,i=s,void 0;for(var u,l=-1;(l=o.indexOf(t,l+1))>=0;){if(u=l+a,(0===l||o.charCodeAt(l-1)===r)&&o.charCodeAt(u)===r)return n=l,i=u+1,void 0;if(l>0&&o.charCodeAt(l-1)===r&&u===s)return n=l-1,i=u,void 0;if(0===l&&u===s)return n=0,i=u,void 0}n=-1}var n,i,r=" ".charCodeAt(0);t.hasClass=function(t,i){return e(t,i),-1!==n},t.addClass=function(t,i){t.className?(e(t,i),-1===n&&(t.className=t.className+" "+i)):t.className=i},t.removeClass=function(t,r){e(t,r),-1!==n&&(t.className=t.className.substring(0,n)+t.className.substring(i))},t.toggleClass=function(i,r,o){e(i,r),-1===n||o||t.removeClass(i,r),-1===n&&o&&t.addClass(i,r)}}(),t.addListener=d,t.addDisposableListener=h,t.addStandardDisposableListener=function(e,t,n,i){var r=n;return"click"===t?r=p(n):("keydown"===t||"keypress"===t||"keyup"===t)&&(r=f(n)),e.addEventListener(t,r,i||!1),{dispose:function(){r&&(e.removeEventListener(t,r,i||!1),r=null,e=null,n=null)}}},t.addNonBubblingMouseOutListener=g,t.addDisposableNonBubblingMouseOutListener=m;var F=function(){var e=function(e){return e((new Date).getTime()),0},t=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame,n=self.cancelAnimationFrame||self.cancelRequestAnimationFrame||self.msCancelAnimationFrame||self.msCancelRequestAnimationFrame||self.webkitCancelAnimationFrame||self.webkitCancelRequestAnimationFrame||self.mozCancelAnimationFrame||self.mozCancelRequestAnimationFrame||self.oCancelAnimationFrame||self.oCancelRequestAnimationFrame,i=!!t,r=t||e,o=n||n;return{isNative:i,request:function(e){return r(e)},cancel:function(e){return o(e)}}}();t.runAtThisOrScheduleAtNextAnimationFrame,t.scheduleAtNextAnimationFrame,t.cancelAtNextAnimationFrame,function(){function e(){r=!1,i.sort(function(e,t){return t.priority-e.priority });var e=i;n+=i.length,i=[];try{o=!0;for(var t=0;tt||t>=i.length||(i[t].cancelled=!0)}}}();var z=16,B=function(e,t){return t};t.addThrottledListener=_,t.addDisposableThrottledListener=b,t.getComputedStyle=C;var U=function(){var e=/^-?\d+(\.\d+)?(px)?$/i,t=/^-?\d+(\.\d+)?/i;return function(n,i){if(!e.test(i)&&t.test(i)){var r=n.style.left;n.style.left=i;var o=n.style.pixelLeft;return n.style.left=r,o}return parseFloat(i)||0}}(),j={getBorderLeftWidth:function(e){return w(e,"border-left-width","borderLeftWidth")},getBorderTopWidth:function(e){return w(e,"border-top-width","borderTopWidth")},getBorderRightWidth:function(e){return w(e,"border-right-width","borderRightWidth")},getBorderBottomWidth:function(e){return w(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return w(e,"padding-left","paddingLeft")},getPaddingTop:function(e){return w(e,"padding-top","paddingTop")},getPaddingRight:function(e){return w(e,"padding-right","paddingRight")},getPaddingBottom:function(e){return w(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return w(e,"margin-left","marginLeft")},getMarginTop:function(e){return w(e,"margin-top","marginTop")},getMarginRight:function(e){return w(e,"margin-right","marginRight")},getMarginBottom:function(e){return w(e,"margin-bottom","marginBottom")},__commaSentinel:!1};t.getTopLeftOffset=S,t.getDomNodePosition=L,t.getContentWidth=E,t.getTotalWidth=T,t.getContentHeight=N,t.getTotalHeight=M,t.getRelativeLeft=x,t.getRelativeTop=R,t.isAncestor=I;var q=null;t.createCSSRule=O,t.getCSSRule=D,t.removeCSSRulesWithPrefix=A,t.isHTMLElement=W,t.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",CONTEXT_MENU:"contextmenu",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.browser.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:n.browser.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.browser.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.selectTextInInputElement=H,t.trackFocus=V,t.UnitConverter={_emInPx:-1,emToPixel:function(e){if(this._emInPx<0){var n=document.createElement("div");n.style.position="absolute",n.style.top="10000px",n.style.left="10000px",n.style.fontSize="1em",n.innerHTML="AbcDef",document.body.appendChild(n);var i=t.getTotalHeight(n);document.body.removeChild(n),this._emInPx=i}var r=e*this._emInPx,o=Math.round(r);return o}}}),define("vs/css!vs/editor/contrib/zoneWidget/zoneWidget",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/contrib/zoneWidget/zoneWidget",["require","exports","vs/base/dom/dom","vs/base/types","vs/base/objects","vs/base/eventEmitter","vs/editor/core/constants","vs/css!./zoneWidget"],function(e,t,n,i,r,o,s){var a={showArrow:!0,showFrame:!0,frameColor:"",className:""},u="vs.editor.contrib.zoneWidget",l=function(){function e(e,t,n,i,r){this.domNode=e,this.afterLineNumber=t,this.heightInLines=n,this._onDomNodeTop=i,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}(),c=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}(),d=function(e){function t(t,n){"undefined"==typeof n&&(n={});var i=this;e.call(this),this.editor=t,this.options=r.mixin(r.clone(a),n),this.zoneId=-1,this.overlayWidget=null,this.lastView=null,this.domNode=document.createElement("div"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation"),this.container=null,this.listenersToRemove=[],this.listenersToRemove.push(this.editor.addListener(s.EventType.EditorLayout,function(e){var t=i.getWidth(e);i.domNode.style.width=t+"px",i.onWidth(t)}))}return __extends(t,e),t.prototype.create=function(){n.addClass(this.domNode,"zone-widget"),n.addClass(this.domNode,this.options.className),this.container=document.createElement("div"),n.addClass(this.container,"container"),this.domNode.appendChild(this.container),this.fillContainer(this.container)},t.prototype.getWidth=function(e){return"undefined"==typeof e&&(e=this.editor.getLayoutInfo()),e.width-e.verticalScrollbarWidth},t.prototype.onViewZoneTop=function(e){this.domNode.style.top=e+"px"},t.prototype.onViewZoneHeight=function(e){this.domNode.style.height=e+"px"},t.prototype.show=function(e,t){i.isUndefinedOrNull(e.startLineNumber)?this.showImpl({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},t):this.showImpl(e,t)},t.prototype.showImpl=function(e,t){var n=this,i={lineNumber:e.startLineNumber,column:e.startColumn};this.domNode.style.width=this.getWidth()+"px",this.editor.revealPosition(i,!1,!1);var r=document.createElement("div"),o=document.createElement("div"),s=this.editor.getConfiguration().lineHeight,a=t*s,d=0,h=0;this.options.showArrow&&(d=Math.round(s/3),a-=2*d,o=document.createElement("div"),o.className="zone-widget-arrow below",o.style.top=-d+"px",o.style.borderWidth=d+"px",o.style.left=this.editor.getOffsetForColumn(i.lineNumber,i.column)+"px",o.style.borderBottomColor=this.options.frameColor,r.appendChild(o)),this.options.showFrame&&(h=Math.round(s/9),a-=2*h),this.editor.changeViewZones(function(e){-1!==n.zoneId&&e.removeZone(n.zoneId),n.overlayWidget&&(n.editor.removeOverlayWidget(n.overlayWidget),n.overlayWidget=null);var o=new l(r,i.lineNumber,t,function(e){return n.onViewZoneTop(e)},function(e){return n.onViewZoneHeight(e)});n.zoneId=e.addZone(o),n.overlayWidget=new c(u+n.zoneId,n.domNode),n.editor.addOverlayWidget(n.overlayWidget)}),this.options.showFrame&&(this.container.style.borderTopColor=this.options.frameColor,this.container.style.borderBottomColor=this.options.frameColor,this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"),this.container.style.top=d+"px",this.container.style.height=a+"px",this.container.style.overflow="hidden",this.doLayout(a),this.editor.setSelection(e);var p={lineNumber:Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1)),column:1};this.editor.revealPosition(p,!1,!1),this.position=i},t.prototype.dispose=function(){var e=this;this.listenersToRemove.forEach(function(e){e()}),this.listenersToRemove=[],this.overlayWidget&&(this.editor.removeOverlayWidget(this.overlayWidget),this.overlayWidget=null),-1!==this.zoneId&&this.editor.changeViewZones(function(t){t.removeZone(e.zoneId),e.zoneId=-1})},t.prototype.fillContainer=function(){},t.prototype.onWidth=function(){},t.prototype.doLayout=function(){},t}(o.EventEmitter);t.ZoneWidget=d}),define("vs/base/time/schedulers",["require","exports"],function(e,t){var n=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){-1!==this.timeoutToken&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.setRunner=function(e){this.runner=e},e.prototype.setTimeout=function(e){this.timeout=e},e.prototype.schedule=function(){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,this.timeout)},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.runner()},e}();t.RunOnceScheduler=n}),define("vs/css!vs/editor/contrib/color/color",["vs/css!vs/editor/editor.main"],{}),define("vs/editor/contrib/color/color",["require","exports","vs/base/lifecycle","vs/base/time/schedulers","vs/base/dom/dom","vs/base/errors","vs/base/strings","vs/editor/core/constants","vs/editor/editorExtensions","vs/css!./color"],function(e,t,n,i,r,o,s,a,u){var l=function(){function e(e,t,n){this.renderingDecorationId=e.addDecoration({startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.startLineNumber,endColumn:t.startColumn+1},{inlineClassName:"inline-color-decoration "+n}),this.trackingDecorationId=e.addDecoration(t,{})}return e.prototype.dispose=function(e){e.removeDecoration(this.trackingDecorationId),e.removeDecoration(this.renderingDecorationId)},e.prototype.getColorValue=function(e){var t=e.getDecorationRange(this.trackingDecorationId);return t?e.getValueInRange(t):""},e}(),c=function(){function e(t,n){var r=this;this._instanceCount=++e.INSTANCE_COUNT,this._editor=n,this._callOnDispose=[],this._callOnModelChange=[],this._currentDecorations=[],this._currentDynamicColors=[],this._scheduler=new i.RunOnceScheduler(null,250),this._currentFindColorDeclarationsPromise=null,this._callOnDispose.push(this._scheduler),this._callOnDispose.push(this._editor.addListener2(a.EventType.ModelChanged,function(){return r.onModelChange()})),this._callOnDispose.push(this._editor.addListener2(a.EventType.ModelModeChanged,function(){return r.onModelChange()})),this.onModelChange()}return e.prototype.dispose=function(){var e=this;this._editor.changeDecorations(function(t){for(var n=0;nt;t++)i._currentDecorations[t].dispose(r);for(i._currentDecorations=[],t=0,n=e.length;n>t;t++)i._currentDecorations.push(new l(r,e[t].range,i.getCSSRuleName(t)))}),this.onDecorationsChanged()},e.prototype.onDecorationsChanged=function(){var e,t,n,i,r,o,s=this,a=this._editor.getModel(),u=[];this._editor.changeDecorations(function(l){for(e=0,t=s._currentDecorations.length;t>e;e++)o=s._currentDecorations[e],n=a.getDecorationRange(o.trackingDecorationId),n&&!n.isEmpty()?(u[e]=a.getValueInRange(n).replace(/[^%#a-z0-9.,()]/gi,""),i=a.getDecorationRange(o.renderingDecorationId),r=a.validateRange({startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.startLineNumber,endColumn:n.startColumn+1}),i&&i.equalsRange(r)||l.changeDecoration(o.renderingDecorationId,r)):u[e]="";s.ensureColors(u)})},e.prototype.getCSSRuleName=function(e){return 0>e?".monaco-css-dynamic-"+this._instanceCount+"-":".monaco-css-dynamic-"+this._instanceCount+"-"+e+":before"},e.prototype.ensureColors=function(e){for(var t;this._currentDynamicColors.length>e.length;)r.removeCSSRulesWithPrefix(this.getCSSRuleName(this._currentDynamicColors.length-1)),this._currentDynamicColors.pop();for(t=this._currentDynamicColors.length;t=0;t--){if(this._currentDynamicColors[t]!==e[t]){var n=r.getCSSRule(this.getCSSRuleName(t));n&&(n.style.backgroundColor=e[t])}this._currentDynamicColors[t]=e[t]}},e.prototype.getCSSText=function(e){return s.format("background-color:{0};",e)},e.ID="css.editor.colorContribution",e.INSTANCE_COUNT=0,e}();t.ColorContribution=c,u.registerEditorContribution(c)}),define("vs/base/filters",["require","exports","vs/base/strings"],function(e,t,n){function i(){for(var e=[],t=0;ti;i++){var o=e[i](t,n);if(o)return o}return null}}function r(){for(var e=[],t=0;tr;r++){var s=e[r](t,n);if(!s)return null;i=i.concat(s)}return i}}function o(e,t,n){if(0===n.length||n.length0?[{start:0,end:t.length}]:[]}function s(e,t){var n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function a(e,t){return u(e.toLowerCase(),t.toLowerCase(),0,0)}function u(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]===t[i]){var r=null;if(r=u(e,t,n+1,i+1))return h({start:i,end:i+1},r)}return u(e,t,n,i+1)}function l(e,t){if(0===t.length)return null;for(var n=null,i=0;i=65&&90>=t}function d(e){var t=e.charCodeAt(0);return t>=48&&57>=t}function h(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function p(e,t){for(var n=t;nn;n++)i[n]=!1;for(n=0;n=this.sourceLength},e.prototype.peek=function(){if(this._pos>=this.sourceLength)throw new Error("Stream is at the end");return this._source[this._pos]},e.prototype.next=function(){if(this._pos>=this.sourceLength)throw new Error("Stream is at the end");return this.tokenStart=-1,this.tokenEnd=-1,this._source[this._pos++]},e.prototype.advance=function(e){var t=this._pos;return this._pos+=e,this.resetPeekedToken(),this._source.substring(t,this._pos)},e.prototype.advanceToEOS=function(){var e=this._pos;return this._pos=this.sourceLength,this.resetPeekedToken(),this._source.substring(e,this._pos)},e.prototype.goBack=function(e){this._pos-=e,this.resetPeekedToken()},e.prototype.createPeeker=function(e){var t=this;if(e instanceof RegExp)return function(){var n=e.exec(t._source.substr(t._pos));if(null===n)return 0;if(0!==n.index)throw new Error('Regular expression must begin with the character "^"');return n[0].length};if((e instanceof String||"string"==typeof e)&&e)return function(){for(var n=e.length,i=t._pos+n<=t.sourceLength,r=0;i&&n>r;r++)i=t._source.charCodeAt(t._pos+r)===e.charCodeAt(r);return i?n:0};throw new Error("Condition must be either a regular expression, function or a non-empty string")},e.prototype.advanceIfStringCaseInsensitive=function(e){var t,n=this._pos,i=this._source,r=e.length;if(1>r||n+r>this.sourceLength)return"";for(t=0;r>t;t++)if(i.charAt(n+t).toLowerCase()!==e.charAt(t).toLowerCase())return"";return this.advance(r)},e.prototype.advanceIfString=function(e){var t,n=this._pos,i=this._source,r=e.length;if(1>r||n+r>this.sourceLength)return"";for(t=0;r>t;t++)if(i.charCodeAt(n+t)!==e.charCodeAt(t))return"";return this.advance(r)},e.prototype.advanceIfCharCode=function(e){return this._pos=this.sourceLength)return"";var t=e.exec(this._source.substr(this._pos));if(t){if(0===t.index)return this.advance(t[0].length);throw new Error('Regular expression must begin with the character "^"')}return""},e.prototype.advanceLoop=function(e,t,n){if(this.eos())return"";var i=this.createPeeker(e),r=this._pos,o=0,s=null;for(s=t?function(e){return e>0}:function(e){return 0===e};!this.eos()&&s(o=i());)o>0?this.advance(o):this.next();return n&&!this.eos()&&this.advance(o),this._source.substring(r,this._pos)},e.prototype.advanceWhile=function(e){return this.advanceLoop(e,!0,!1)},e.prototype.advanceUntil=function(e,t){return this.advanceLoop(e,!1,t)},e.prototype.resetPeekedToken=function(){this.tokenStart=-1,this.tokenEnd=-1},e.prototype.setTokenRules=function(e,t){(this.separators!==e||this.whitespace!==t)&&(this.separators=e,this.separatorsArr=this.stringToArray(this.separators),this.whitespace=t,this.whitespaceArr=this.stringToArray(this.whitespace),this.resetPeekedToken())},e.prototype.peekToken=function(){if(-1!==this.tokenStart)return this._source.substring(this.tokenStart,this.tokenEnd);var e=this._source,t=this.sourceLength,n=this.whitespaceArr,i=this.separatorsArr,r=this._pos;if(r>=t)throw new Error("Stream is at the end");for(;n[e.charCodeAt(r)]&&t>r;)r++;var o=r;if(i[e.charCodeAt(o)]&&t>o)o++;else for(;!i[e.charCodeAt(o)]&&!n[e.charCodeAt(o)]&&t>o;)o++;return this.tokenStart=r,this.tokenEnd=o,e.substring(r,o)},e.prototype.nextToken=function(){if(this._pos>=this.sourceLength)throw new Error("Stream is at the end");var e;return e=-1===this.tokenStart?this.peekToken():this._source.substring(this.tokenStart,this.tokenEnd),this._pos=this.tokenEnd,this.tokenStart=-1,this.tokenEnd=-1,e},e.prototype.peekWhitespace=function(){for(var e=this._source,t=this.sourceLength,n=this.whitespaceArr,i=this._pos;n[e.charCodeAt(i)]&&t>i;)i++;return e.substring(this._pos,i)},e.prototype.skipWhitespace=function(){for(var e=this._source,t=this.sourceLength,n=this.whitespaceArr,i=this._pos,r=this._pos;n[e.charCodeAt(r)]&&t>r;)r++;return i!==r?(this._pos=r,this.tokenStart=-1,this.tokenEnd=-1,e.substring(i,r)):""},e.STRING_TO_ARRAY_CACHE={},e}();t.LineStream=n}),define("vs/editor/modes/modes",["require","exports","vs/base/types"],function(e,t,n){function i(e){return null===e||"object"!=typeof e?!1:"string"!=typeof e.label||"string"!=typeof e.codeSnippet||"string"!=typeof e.type?!1:n.isUndefinedOrNull(e.highlights)||n.isArray(e.highlights)?n.isUndefinedOrNull(e.typeLabel)||"string"==typeof e.typeLabel?n.isUndefinedOrNull(e.documentationLabel)||"string"==typeof e.documentationLabel?!0:!1:!1:!1}!function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Close=-1]="Close"}(t.Bracket||(t.Bracket={}));t.Bracket;t.isISuggestion=i,function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent"}(t.IndentAction||(t.IndentAction={}));t.IndentAction}),define("vs/editor/modes/nullMode",["require","exports","vs/editor/modes/modes"],function(e,t){function n(e,t,n,i){"undefined"==typeof i&&(i=0);var r=[{startIndex:i,type:"",bracket:0}],o=[{startIndex:i,mode:e}];return{tokens:r,actualStopOffset:i+t.length,endState:n,modeTransitions:o}}var i=function(){function e(e,t){this.mode=e,this.stateData=t}return e.prototype.clone=function(){var t=this.stateData?this.stateData.clone():null;return new e(this.mode,t)},e.prototype.equals=function(e){if(this.mode!==e.getMode())return!1;var t=e.getStateData();return this.stateData||t?this.stateData&&t?this.stateData.equals(t):!1:!0},e.prototype.getMode=function(){return this.mode},e.prototype.tokenize=function(e){return e.advanceToEOS(),{type:""}},e.prototype.getStateData=function(){return this.stateData},e.prototype.setStateData=function(e){this.stateData=e},e}();t.NullState=i;var r=function(){function e(){this.tokenTypeClassificationSupport=this}return e.prototype.getId=function(){return"vs.editor.modes.nullMode"},e.prototype.bindModel=function(){},e.prototype.unbindModel=function(){},e.prototype.getNonWordTokenTypes=function(){return[]},e.prototype.getWordDefinition=function(){return e.DEFAULT_WORD_REGEXP},e.DEFAULT_WORD_REGEXP=/(-?\d*\.\d\w*)|(\w+)/g,e}();t.NullMode=r,t.nullTokenize=n}),define("vs/base/worker/workerProtocol",["require","exports"],function(e,t){t.MessageType={INITIALIZE:"$initialize",REPLY:"$reply",PRINT:"$print"},t.ReplyType={COMPLETE:"complete",ERROR:"error",PROGRESS:"progress"},t.PrintType={LOG:"log",DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"}}),define("vs/base/worker/workerClient",["require","exports","vs/base/lib/winjs.base","vs/base/dom/dom","vs/base/performance/timer","vs/base/errors","vs/base/worker/workerProtocol","vs/base/env"],function(e,t,n,i,r,o,s,a){function u(t,n){return e.toUrl("./"+t+"?"+encodeURIComponent(n))}t.WorkerMain="workerMain.js";var l=a.getCrossOriginWorkerScriptUrl||u,c=function(){function e(e,n,i){this.id=e,this.worker=new Worker(l(t.WorkerMain,n)),this.worker.onmessage=function(e){i(JSON.parse(e.data))}}return e.prototype.getId=function(){return this.id},e.prototype.postMessage=function(e){this.worker.postMessage(JSON.stringify(e))},e.prototype.terminate=function(){this.worker.terminate()},e}(),d=function(){function t(t,n){var r=this;this.id=t,this.loaded=!1,this.beforeLoadMessages=[],this.iframe=document.createElement("iframe"),this.iframe.id=this.iframeId(),this.iframe.src=e.toUrl("./workerMainCompatibility.html"),this.iframe.frameborder=this.iframe.height=this.iframe.width="0",this.iframe.style.display="none",i.addListener(this.iframe,"load",function(){return r.onLoaded()}),this.onMessage=function(e){var t=null;try{t=JSON.parse(e.data)}catch(i){}t&&n(t)},i.addListener(window,"message",this.onMessage),document.body.appendChild(this.iframe)}return t.prototype.iframeId=function(){return"worker_iframe_"+this.id},t.prototype.onLoaded=function(){for(this.loaded=!0;this.beforeLoadMessages.length>0;)this.postMessage(this.beforeLoadMessages.shift())},t.prototype.getId=function(){return this.id},t.prototype.postMessage=function(e){this.loaded===!0?window.frames[this.iframeId()].postMessage(JSON.stringify(e),"*"):this.beforeLoadMessages.push(e)},t.prototype.terminate=function(){window.removeEventListener("message",this.onMessage),window.frames[this.iframeId()].close()},t}(),h=function(){function e(e){this.label=e}return e.prototype.create=function(e,t){var n=null;try{n=new c(e,this.label,t)}catch(i){n=new d(e,t)}return n},e}();t.DefaultWorkerFactory=h;var p=function(){function e(t,n){var i=this;this._lastMessageId=0,this._promises={},this._messageHandlers={},this._messagesQueue=[],this._processQueueTimeout=-1,this._waitingForWorkerReply=!1,this._lastTimerEvent=null,this._worker=t.create(++e.LAST_WORKER_ID,function(e){return i._onmessage(e)});var r=null,o=window.require;"function"==typeof o.getConfig?r=o.getConfig():"undefined"!=typeof window.requirejs&&(r=window.requirejs.s.contexts._.config);var a=window.MonacoEnvironment||null;this.onModuleLoaded=this._sendMessage(s.MessageType.INITIALIZE,{id:this._worker.getId(),moduleId:n,loaderConfiguration:r,MonacoEnvironment:a}),this.onModuleLoaded.then(null,function(){return i._onError("Worker failed to load "+n)})}return e.prototype.request=function(e,t,i){var r=this;if("$"===e.charAt(0))throw new Error("Illegal requestName: "+e);var o,s=!1;return new n.Promise(function(n,a,u){r.onModuleLoaded.then(function(){s||(o=r._sendMessage(e,t,i).then(n,a,u))},a,u)},function(){o?o.cancel():s=!0})},e.prototype.destroy=function(){this.dispose()},e.prototype.dispose=function(){var e=Object.keys(this._promises);if(e.length>0){console.warn("Terminating a worker with "+e.length+" pending promises:"),console.warn(this._promises);for(var t in this._promises)e.hasOwnProperty(t)&&this._promises[t].error("Worker forcefully terminated")}this._worker.terminate()},e.prototype.addMessageHandler=function(e,t){this._messageHandlers[e]=t},e.prototype.removeMessageHandler=function(e){delete this._messageHandlers[e]},e.prototype._sendMessage=function(e,t,i){"undefined"==typeof i&&(i=(new Date).getTime());var r,o,s,a=this,u={id:++this._lastMessageId,type:e,timestamp:i,payload:t},l=new n.Promise(function(e,t,n){r=e,o=t,s=n},function(){a._removeMessage(u.id)});return this._promises[u.id]={complete:r,error:o,progress:s,type:e,payload:t},this._enqueueMessage(u),l},e.prototype._enqueueMessage=function(e){var t,n=-1;for(t=this._messagesQueue.length-1;t>=0;t--)if(this._messagesQueue[t].timestamp<=e.timestamp){n=t;break}this._messagesQueue.splice(n+1,0,e),this._processMessagesQueue()},e.prototype._removeMessage=function(e){for(var t=0,n=this._messagesQueue.length;n>t;t++)if(this._messagesQueue[t].id===e)return this._promises.hasOwnProperty(String(e))&&delete this._promises[String(e)],this._messagesQueue.splice(t,1),this._processMessagesQueue(),void 0},e.prototype._processMessagesQueue=function(){var e=this;if(-1!==this._processQueueTimeout&&(clearTimeout(this._processQueueTimeout),this._processQueueTimeout=-1),0!==this._messagesQueue.length&&!this._waitingForWorkerReply){var t=this._messagesQueue[0].timestamp-(new Date).getTime();t=Math.max(0,t),this._processQueueTimeout=setTimeout(function(){if(e._processQueueTimeout=-1,0!==e._messagesQueue.length){e._waitingForWorkerReply=!0;var t=e._messagesQueue.shift();e._lastTimerEvent=r.start(2,e._decodeMessageName(t)),e._worker.postMessage(t)}},t)}},e.prototype._onmessage=function(e){if(e.monacoWorker&&(!e.from||e.from===this._worker.getId())){switch(e.type){case s.MessageType.REPLY:var t=e;if(this._waitingForWorkerReply=!1,this._lastTimerEvent&&this._lastTimerEvent.stop(),!this._promises.hasOwnProperty(String(t.id)))return this._onError("Received unexpected message from Worker:",e),void 0;switch(t.action){case s.ReplyType.COMPLETE:this._promises[t.id].complete(t.payload),delete this._promises[t.id];break;case s.ReplyType.ERROR:this._onError("Main Thread sent to worker the following message:",{type:this._promises[t.id].type,payload:this._promises[t.id].payload}),this._onError("And the worker replied with an error:",t.payload),o.onUnexpectedError(t.payload),this._promises[t.id].error(t.payload),delete this._promises[t.id];break;case s.ReplyType.PROGRESS:this._promises[t.id].progress(t.payload)}break;case s.MessageType.PRINT:var n=e;this._consoleLog(n.level,n.payload);break;default:if(e.type in this&&"function"==typeof this[e.type])this[e.type](e.payload);else{var i=this._messageHandlers[e.type];i&&"function"==typeof i?i(e.payload):this._onError("Received unexpected message from Worker:",e)}}this._processMessagesQueue()}},e.prototype._decodeMessageName=function(e){return e.type},e.prototype._consoleLog=function(e,t){switch(e){case s.PrintType.LOG:console.log(t);break;case s.PrintType.DEBUG:console.info(t);break;case s.PrintType.INFO:console.info(t);break;case s.PrintType.WARN:console.warn(t);break;case s.PrintType.ERROR:console.error(t);break;default:this._onError("Received unexpected message from Worker:",t)}},e.prototype._onError=function(e,t){console.error(e),console.info(t)},e.LAST_WORKER_ID=1,e}();t.WorkerClient=p}),define("vs/platform/thread/attribute",["require","exports","vs/platform/services"],function(e,t){function n(e,t){for(var n in e)if(e[n]===t)return n;throw new Error("Member not found in prototype")}function i(e){var n=e[t.THREAD_SERVICE_PROPERTY_NAME];if(!n)throw new Error("Objects that use thread attributes must be instantiated with the thread service");return n}function r(e,t){var r=n(e.prototype,t);e.prototype[r]=function(){for(var e=[],n=0;ni;i++)if(!e[i].every(t))return!1;return!0}}}function h(e){return{every:function(t){return t(e)}}}function p(e){if(Array.isArray(e))return e;var t=[];return e.every(function(e){return t.push(e),!0}),t}t.lookup=i,t.lookupOrInsert=r,t.contains=o,t.keys=s,t.values=a,t.forEach=u,t.groupBy=l,t.fromArray=c,t.EmptyIterable={every:function(){return!0}},t.combine=d,t.singleton=h,t.toArray=p;var f=function(){function e(){}return e.prototype.toArray=function(e,t){return"undefined"==typeof e&&(e=new Array),"undefined"==typeof t&&(t=0),this.every(function(n){e[t]=n,t+=1}),e},Object.defineProperty(e.prototype,"length",{get:function(){var e=0;return this.every(function(){e+=1}),e},enumerable:!0,configurable:!0}),e.prototype.every=function(){throw n.notImplemented()},e}();t.AbstractCollection=f;var g=function(e){function t(t){e.call(this),this.data=t}return __extends(t,e),t.prototype.every=function(e){for(var t=0;tn;n++)t[n-1]=arguments[n];return e instanceof s.SyncDescriptor?this._servicesMap.createInstance(e,t):e instanceof s.AsyncDescriptor?this._createInstanceAsync(e,t):this._servicesMap.createInstance(new s.SyncDescriptor(e),t)},t.prototype._createInstanceAsync=function(t,r){var o,a=this;return new n.TPromise(function(n,u){e([t.moduleName],function(e){if(o&&u(o),!e)return u(i.illegalArgument("module not found: "+t.moduleName));if("function"!=typeof e[t.ctorName])return u(i.illegalArgument("not a function: "+t.ctorName));try{r.unshift.apply(r,t.staticArguments()),n(a._servicesMap.createInstance(new s.SyncDescriptor(e[t.ctorName]),r))}catch(l){return u(l)}},u)},function(){o=i.canceled()})},t}()});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/platform/thread/threadService",["require","exports","vs/base/lib/winjs.base","vs/base/env","vs/base/worker/workerClient","vs/platform/services","vs/platform/thread/attribute","vs/base/errors","vs/base/performance/timer","vs/platform/instantiation/instantiationService"],function(e,t,n,i,r,o,s,a,u,l){var c=function(){function e(e,t){"undefined"==typeof e&&(e=null),"undefined"==typeof t&&(t=null),this.isInMainThread=!i.isInWebWorker()&&!i.isInEmulatedWebWorker(),this._impl=t,this._impl&&this._impl.setParent(this),this._mainThreadData=e}return e.prototype.injectInstantiationService=function(e){this._instantiationService=e},e.prototype.injectDispatcherService=function(e){this._dispatcherService=e},e.prototype.injectPublisherService=function(e){this._publisher=e},e.prototype.injectContextService=function(e){this._contextService=e},e.prototype.injectionDone=function(){this._impl||(this._impl=this.isInMainThread?new p(this._instantiationService,this._contextService):new f(this._mainThreadData,this._instantiationService,this._dispatcherService,this._publisher),this._mainThreadData=null)},e.prototype.createInstance=function(){for(var e=[],t=0;tn;n++)t(e[n],function(){e.splice(n,1),n--,i--})}function r(e,t){"undefined"==typeof t&&(t=null);for(var n=new Array(e);e-->0;)n.push(t);return n}function o(e,t,n){for(var i=0,r=e.length-1;r>=i;){var o=Math.floor((i+r)/2),s=n(e[o],t);if(0>s)i=o+1;else{if(!(s>0))return o;r=o-1}}return-1}function s(e){for(var t=new Array,n=0,i=e.length;i>n;n++)t.push.apply(t,e[n]);return t}function a(e,t){for(var n,i=0,r=e.length-1;r>i;)n=i+Math.ceil((r-i)/2),e[n].startIndex>t?r=n-1:i=n;return i}function u(e){for(var t=[],n=0;n=0}function c(e,t,n){var i=e[t],r=e[n];e[t]=r,e[n]=i}function d(e,t,n){e.splice(n,0,e.splice(t,1)[0])}t.tail=n,t.forEach=i,t.fill=r,t.binarySearch=o,t.merge=s,t.findIndexInSegmentsArray=a,t.coalesce=u,t.contains=l,t.swap=c,t.move=d}),define("vs/editor/modes/modesRegistry",["require","exports","vs/platform/services","vs/base/lib/winjs.base","vs/base/objects","vs/platform/thread/attribute","vs/base/errors"],function(e,t,n,i,r,o,s){var a=function(){function e(){this.mimetypeToModeId={},this.workerParticipantsRegistry={},this.modesDescriptorsRegistry={},this.modeOptions={}}return e}();t.ModesRegistryDataSource=a;var u=function(e){return n.AsyncDescriptor.fromJSON(e)},l=function(e){return n.AsyncDescriptor.fromJSON(e)},c=function(){function e(e){this._modeInstances={},this._modeCreationRequests={},this._data=new a,this._threadService=e.threadService}return e.prototype.getId=function(){return"modesRegistry"},e.prototype.getSerializableState=function(){var e=this,t=[];t=t.concat(Object.keys(this._modeInstances)),t=t.concat(Object.keys(this._modeCreationRequests));var n=function(e){return e.toJSON()},i={};Object.keys(this._data.workerParticipantsRegistry).forEach(function(t){i[t]=e._data.workerParticipantsRegistry[t].map(n)});var r={};return Object.keys(this._data.modesDescriptorsRegistry).forEach(function(t){r[t]=n(e._data.modesDescriptorsRegistry[t])}),{mimetypeToModeId:this._data.mimetypeToModeId,workerParticipantsRegistry:i,modesDescriptorsRegistry:r,modeOptions:this._data.modeOptions,instantiatedModes:t}},e.prototype.setData=function(e){var t=this;this._data.mimetypeToModeId=e.mimetypeToModeId;var n={};Object.keys(e.workerParticipantsRegistry).forEach(function(t){n[t]=e.workerParticipantsRegistry[t].map(u)});var i={};Object.keys(e.modesDescriptorsRegistry).forEach(function(t){i[t]=l(e.modesDescriptorsRegistry[t])}),this._data.workerParticipantsRegistry=n,this._data.modesDescriptorsRegistry=i,this._data.modeOptions=e.modeOptions,e.instantiatedModes.forEach(function(e){t._getOrCreateOneModeAsync(e).done(null,s.onUnexpectedError)})},e.prototype.cloneFrom=function(e){this._importEverywhere(e.getSerializableState())},e.prototype._importEverywhere=function(e){this.setData(e)},e.prototype.registerWorkerParticipant=function(e,t){this._doRegisterWorkerParticipant(e,t),this._registerWorkerParticipantInWorkers(e,t)},e.prototype._registerWorkerParticipantInWorkers=function(e,t){this._doRegisterWorkerParticipant(e,u(t))},e.prototype._doRegisterWorkerParticipant=function(e,t){this._data.workerParticipantsRegistry.hasOwnProperty(e)||(this._data.workerParticipantsRegistry[e]=[]),this._data.workerParticipantsRegistry[e].push(t)},e.prototype.getWorkerParticipants=function(e){return this._data.workerParticipantsRegistry.hasOwnProperty(e)?this._data.workerParticipantsRegistry[e]:[]},e.prototype.isRegisteredMode=function(e){var t=this._data.mimetypeToModeId[e]||e;return this._data.modesDescriptorsRegistry.hasOwnProperty(t)},e.prototype.getRegisteredModes=function(){return Object.keys(this._data.modesDescriptorsRegistry)},e.prototype.getRegisteredMimetypes=function(){return Object.keys(this._data.mimetypeToModeId)},e.prototype.registerMode=function(e,t,n){this._doRegisterMode(e,t,n),this._registerModeInWorkers(e,t,n)},e.prototype._registerModeInWorkers=function(e,t,n){this._doRegisterMode(e,t,l(n))},e.prototype._doRegisterMode=function(e,t,n){var i=this;t.forEach(function(t){i._data.mimetypeToModeId[t]=e}),this._data.modesDescriptorsRegistry[e]=n},e.prototype.configureMode=function(e,t){if(!this._data.mimetypeToModeId.hasOwnProperty(e))throw new Error("Mimetype "+e+" was not found in the registry");this.configureModeById(this._data.mimetypeToModeId[e],t)},e.prototype.configureModeById=function(e,t){var n=this._data.modeOptions[e]||{},i=r.mixin(r.clone(n),t);if(!r.equals(n,i)&&(this._data.modeOptions[e]=i,this._modeInstances.hasOwnProperty(e))){var o=this._modeInstances[e];o&&o.configSupport&&o.configSupport.configure(i)}},e.prototype.getMode=function(e){for(var t=this._extractModeIds(e),n=0;nt;t++)this.prefixSum[t]=0;this.prefixSumValidIndex=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValue=function(e,t){this.values.splice(e,0,t),this.prefixSum.splice(e,0,0),e-1e)return 0;if(e<=this.prefixSumValidIndex)return this.prefixSum[e];var t=this.prefixSumValidIndex+1;0===t&&(this.prefixSum[0]=this.values[0],t++);for(var n=t;e>=n;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex=Math.max(this.prefixSumValidIndex,e),this.prefixSum[e]},e.prototype.getIndexOf=function(e,t){for(var n,i,r,o=0,s=this.values.length-1;s>=o;)if(n=o+(s-o)/2|0,r=this.getAccumulatedValue(n),i=r-this.values[n],i>e)s=n-1;else{if(!(e>=r))break;o=n+1}t.index=n,t.remainder=e-i},e}();t.PrefixSumComputer=n}),define("vs/editor/core/model/modelLine",["require","exports","vs/editor/modes/modes","vs/base/arrays"],function(e,t,n,i){var r=function(){function e(e,t){this.lineNumber=e,this.text=t,this.state=null,this.modeTransitions=null,this.isInvalid=!1,this.markers=[],this._recreateLineTokens(null)}return e.prototype._recreateLineTokens=function(t){0===this.text.length?t=e.DEFAULT_TOKENS_EMPTY_TEXT:t&&0!==t.length||(t=e.DEFAULT_TOKENS_NON_EMPTY_TEXT),this.lineTokens=new o(t,this.text.length)},e.prototype.insertText=function(t,n,i,r){var o=this.text,s=o.length+1,a=this.lineTokens.getTokens(),u=i.text.length;n=Math.max(1,n),n=Math.min(n,s);var l,c;if(u>0){var d=o.substring(0,n-1)+i.text+o.substring(n-1,o.length);if(a!==e.DEFAULT_TOKENS_NON_EMPTY_TEXT&&a!==e.DEFAULT_TOKENS_EMPTY_TEXT){var h;for(l=0,c=a.length;c>l;l++)h=a[l],h.startIndex>=n-1&&h.startIndex>0&&(h.startIndex+=u)}var p;for(l=0,c=this.markers.length;c>l;l++)p=this.markers[l],(p.column>n||p.column===n&&(r||!p.stickToPreviousCharacter))&&(t[p.id]=!0,p.oldLineNumber=p.oldLineNumber||this.lineNumber,p.oldColumn=p.oldColumn||p.column,p.column+=u);this.text=d,this._recreateLineTokens(a)}if(i.markers)for(l=0,c=i.markers.length;c>l;l++)p=i.markers[l],t[p.id]=!0,p.oldLineNumber=p.oldLineNumber||this.lineNumber,p.oldColumn=p.oldColumn||p.column,p.line=this,p.column+=n-1,this.markers.push(p)},e.prototype.removeText=function(t,n,i,r,o){var s=i,a="",u=[],l=this.text,c=l.length+1,d=this.lineTokens.getTokens();n=Math.max(1,n),i=Math.max(1,i),n=Math.min(n,c),i=Math.min(i,c);var h;if(i>n&&i>1&&c>n){a=l.substring(n-1,i-1);var p=l.substring(0,n-1)+l.substring(i-1,l.length);if(d!==e.DEFAULT_TOKENS_NON_EMPTY_TEXT&&d!==e.DEFAULT_TOKENS_EMPTY_TEXT){var f,g;for(h=0;h=i-1?g=f-a.length:f>=n-1&&(g=n-1),g>=p.length?(d.splice(h,1),h--):(d[h].startIndex=g,h>0&&d[h-1].startIndex>=g&&(d.splice(h-1,1),h--))}}this.text=p,this._recreateLineTokens(d)}var m;for(h=0;hs||m.column===s&&(o||!m.stickToPreviousCharacter)?(t[m.id]=!0,m.oldLineNumber=m.oldLineNumber||this.lineNumber,m.oldColumn=m.oldColumn||m.column,m.column-=a.length):(m.column>n||m.column===n&&(o||!m.stickToPreviousCharacter))&&(t[m.id]=!0,m.oldLineNumber=m.oldLineNumber||this.lineNumber,m.oldColumn=m.oldColumn||m.column,r?(m.line=null,m.column-=n-1,this.markers.splice(h,1),h--,u.push(m)):m.column=n);return{text:a,markers:u}},e.prototype.addMarker=function(e){e.line=this,this.markers.push(e)},e.prototype.addMarkers=function(e){var t,n;for(t=0,n=e.length;n>t;t++)e[t].line=this;this.markers=this.markers.concat(e)},e.prototype.removeMarker=function(e){var t=this._indexOfMarkerId(e.id);t>=0&&this.markers.splice(t,1),e.line=null},e.prototype._indexOfMarkerId=function(e){var t,n,i=this.markers;for(t=0,n=i.length;n>t;t++)if(i[t].id===e)return t;return-1},e.prototype.setTokens=function(e){this._recreateLineTokens(e)},e.DEFAULT_TOKENS_NON_EMPTY_TEXT=[{startIndex:0,type:"",bracket:0}],e.DEFAULT_TOKENS_EMPTY_TEXT=[],e}();t.ModelLine=r;var o=function(){function e(e,t){this.tokens=e,this.textLength=t}return e.prototype.getTokens=function(){return this.tokens},e.prototype.getTextLength=function(){return this.textLength},e.prototype.equals=function(e){return this===e},e.prototype.findIndexOfOffset=function(e){return i.findIndexInSegmentsArray(this.tokens,e)},e}();t.LineTokens=o});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/textModel",["require","exports","vs/base/eventEmitter","vs/editor/editor","vs/editor/core/model/modelLine","vs/base/strings","vs/editor/core/position","vs/editor/core/range","vs/editor/core/constants"],function(e,t,n,i,r,o,s,a,u){var l=65279,c=("\r".charCodeAt(0),"\n".charCodeAt(0)," ".charCodeAt(0)),d=" ".charCodeAt(0),h=function(e){function t(t,n){t.push(u.EventType.ModelContentChanged),e.call(this,t),this._constructLines(n),this._versionId=1}return __extends(t,e),t.prototype.getVersionId=function(){return this._versionId},t.prototype._increaseVersionId=function(){this._versionId++},t.prototype._setVersionId=function(e){this._versionId=e},t.prototype.dispose=function(){this._lines=null,this._EOL=null,this._BOM=null,e.prototype.dispose.call(this)},t.prototype._createContentChangedFlushEvent=function(){return{changeType:u.EventType.ModelContentChangedFlush,detail:"",versionId:-1,isUndoing:!1,isRedoing:!1}},t.prototype._resetValue=function(e,t){this._constructLines(t),this._versionId++,e.detail=this.getValue(1),e.versionId=this._versionId},t.prototype.setValue=function(e){if(null!==e){var t=this._createContentChangedFlushEvent();this._resetValue(t,e),this._emitModelContentChangedFlushEvent(t)}},t.prototype.getValue=function(e,t){"undefined"==typeof t&&(t=!1);var n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._BOM+i:i},t.prototype.getValueInRange=function(e,t){"undefined"==typeof t&&(t=0);var n=this.validateRange(e);if(n.isEmpty())return"";if(n.startLineNumber===n.endLineNumber)return this._lines[n.startLineNumber-1].text.substring(n.startColumn-1,n.endColumn-1);var i=this._getEndOfLine(t),r=n.startLineNumber-1,o=n.endLineNumber-1,s=[];s.push(this._lines[r].text.substring(n.startColumn-1));for(var a=r+1;o>a;a++)s.push(this._lines[a].text);return s.push(this._lines[o].text.substring(0,n.endColumn-1)),s.join(i)},t.prototype.isDominatedByLongLines=function(e){var t,n,i,r=0,o=0,s=this._lines;for(t=0,n=this._lines.length;n>t;t++)i=s[t].text.length,i>=e?o+=i:r+=i;return o>r},t.prototype._extractIndentationFactors=function(){var e,t,n,i,r,o,s,a,u,l,h,p=this._lines,f=0,g="",m=0,v=[],y=0,_=[];for(e=0,t=p.length;t>e;e++){for(s=p[e].text,a=!1,u=0,h=0,l=0,n=0,i=s.length;i>n;n++)if(r=s.charCodeAt(n),r===d)l++;else{if(r!==c){a=!0,u=n;break}h++}if(1===h&&(h=0),(l>0||h>0)&&(f++,l>0&&y++,h>0&&(_[h]=(_[h]||0)+1)),a){h=0;var b=!0;for(n=0;m>n&&u>n;n++)o=g.charCodeAt(n),r=s.charCodeAt(n),b&&o!==r&&(b=!1),b||(o===c&&h++,r===c&&h++);for(;m>n;n++)o=g.charCodeAt(n),o===c&&h++;for(;u>n;n++)r=s.charCodeAt(n),r===c&&h++;1===h&&(h=0),h>0&&(v[h]=(v[h]||0)+1),m=u,g=s}}return{linesWithIndentationCount:f,linesIndentedWithTabs:y,relativeSpaceCounts:v,absoluteSpaceCounts:_}},t.prototype.guessIndentation=function(e){var t,n,i=this._extractIndentationFactors(),r=i.linesWithIndentationCount,o=i.linesIndentedWithTabs,s=i.absoluteSpaceCounts,a=i.relativeSpaceCounts,u=0;for(t=1,n=s.length;n>t;t++)u+=s[t]||0;if(o>=u)return{insertSpaces:!1,tabSize:e};if(6>r&&o>0)return{insertSpaces:!1,tabSize:e};var l,c,d,h,p=[];for(l=2,n=s.length;n>l;l++)if(s[l]){for(c=0,d=0,h=l;n>h;h+=l)s[h]?c+=s[h]:d+=l/h;p[l]=c/(1+d)}var f=1,g=0;for(l=Math.max(a.length,p.length);l>=2;l--)c=(p[l]||0)+(a[l]||0),c>g&&(f=l,g=c);return{insertSpaces:!0,tabSize:f}},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1].text},t.prototype.getEOL=function(){return this._EOL},t.prototype.getLineMaxColumn=function(e){return this._lines[e-1].text.length+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=o.firstNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+1},t.prototype.getLineLastNonWhitespaceColumn=function(e){var t=o.lastNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+2},t.prototype.validateLineNumber=function(e){return 1>e&&(e=1),e>this._lines.length&&(e=this._lines.length),e},t.prototype.validatePosition=function(e){var t=e.lineNumber?e.lineNumber:1,n=e.column?e.column:1;1>t&&(t=1),t>this._lines.length&&(t=this._lines.length),1>n&&(n=1);var i=this.getLineMaxColumn(t);return n>i&&(n=i),new s.Position(t,n)},t.prototype.validateRange=function(e){var t=this.validatePosition(new s.Position(e.startLineNumber,e.startColumn)),n=this.validatePosition(new s.Position(e.endLineNumber,e.endColumn)); return new a.Range(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.getFullModelRange=function(){var e=this.getLineCount();return new a.Range(1,1,e,this.getLineMaxColumn(e))},t.prototype._emitModelContentChangedFlushEvent=function(e){this.emit(u.EventType.ModelContentChanged,e)},t._splitText=function(e){for(var t=0,n=-1;-1!==(n=e.indexOf("\r\n",n+1));)t++;var i=e.split(/\r?\n/),o="";i[0].length>0&&i[0].charCodeAt(0)===l&&(o=String.fromCharCode(l),i[0]=i[0].substr(1));var s,a,u=[];for(s=0,a=i.length;a>s;s++)u.push(new r.ModelLine(s+1,i[s]));var c=u.length-1,d="";d=0===c||t>c/2?"\r\n":"\n";var h=u[u.length-1];return"\r"===h.text.charAt(h.text.length-1)&&(h.text=h.text.substring(0,h.text.length-1)),{BOM:o,EOL:d,lines:u}},t.prototype._constructLines=function(e){var n=t._splitText(e);this._BOM=n.BOM,this._EOL=n.EOL,this._lines=n.lines},t.prototype._getEndOfLine=function(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL()}throw new Error("Unknown EOL preference")},t}(n.EventEmitter);t.TextModel=h});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/mirrorModel",["require","exports","vs/editor/core/constants","vs/editor/core/view/model/prefixSumComputer","vs/editor/core/model/textModel","vs/editor/core/model/modelLine"],function(e,t,n,i,r,o){var s=function(e){function t(t,n,i,r,o,s){e.call(this,t,i),this.wordsRegexp=null,this._modeId=r,s||(s={}),this._setVersionId(n),this._associatedResource=o,this._extraProperties=s}return __extends(t,e),t.prototype.getModeId=function(){return this._modeId},t.prototype._constructLines=function(t){e.prototype._constructLines.call(this,t),this._EOL="\n"},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getAssociatedResource=function(){return this._associatedResource},t.prototype.getProperty=function(e){return this._extraProperties.hasOwnProperty(e)?this._extraProperties[e]:null},t.prototype._ensurePrefixSum=function(){if(!this._lineStarts){for(var e=[],t=this.getEOL().length,n=0,r=this._lines.length;r>n;n++)e.push(this._lines[n].text.length+t);this._lineStarts=new i.PrefixSumComputer(e)}},t.prototype.getRangeFromOffsetAndLength=function(e,t){var n=this.getPositionFromOffset(e),i=this.getPositionFromOffset(e+t);return{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:i.lineNumber,endColumn:i.column}},t.prototype.getOffsetAndLengthFromRange=function(e){var t=this.getOffsetFromPosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this.getOffsetFromPosition({lineNumber:e.endLineNumber,column:e.endColumn});return{offset:t,length:n-t}},t.prototype.getPositionFromOffset=function(e){this._ensurePrefixSum();var t={index:0,remainder:0};return this._lineStarts.getIndexOf(e,t),{lineNumber:t.index+1,column:this.getEOL().length+t.remainder}},t.prototype.getOffsetFromPosition=function(e){return this.getLineStart(e.lineNumber)+e.column-1},t.prototype.getLineStart=function(e){this._ensurePrefixSum();var t=Math.min(e,this._lines.length)-1;return this._lineStarts.getAccumulatedValue(t-1)},t.prototype.getRawLines=function(){return this._lines.map(function(e){return e.text})},t.prototype.getAllWordsWithRange=function(){var e,t=[];for(e=0;e=i[r].start;r++)if(t<=i[r].end)return n(e,i[r].start,i[r].end);return n(e,-1,-1)},t}(r.TextModel);t.AbstractMirrorModel=s;var a=function(e){function t(t,i,r,o,s){e.call(this,[n.EventType.OnBeforeModelContentChangedFlush,n.EventType.OnBeforeModelContentChangedLinesDeleted,n.EventType.OnBeforeModelContentChangedLinesInserted,n.EventType.OnBeforeModelContentChangedLineChanged,"changed"],t,i,r,o,s)}return __extends(t,e),t.prototype.onEvents=function(e){for(var t=!1,i=0,r=e.length;r>i;i++){var o=e[i];switch(o.type){case n.EventType.ModelContentChanged:var s=o;switch(this._lineStarts=null,this._setVersionId(s.versionId),s.changeType){case n.EventType.ModelContentChangedFlush:this.emit(n.EventType.OnBeforeModelContentChangedFlush,o),this._onLinesFlushed(s),t=!0;break;case n.EventType.ModelContentChangedLinesDeleted:this.emit(n.EventType.OnBeforeModelContentChangedLinesDeleted,o),this._onLinesDeleted(s),t=!0;break;case n.EventType.ModelContentChangedLinesInserted:this.emit(n.EventType.OnBeforeModelContentChangedLinesInserted,o),this._onLinesInserted(s),t=!0;break;case n.EventType.ModelContentChangedLineChanged:this.emit(n.EventType.OnBeforeModelContentChangedLineChanged,o),this._onLineChanged(s),t=!0}break;case n.EventType.ModelPropertiesChanged:this._extraProperties=o.properties;break;default:console.warn("Unknown model event: "+o.type)}}t&&this.emit("changed",{})},t.prototype._onLinesFlushed=function(e){this._lineStarts=null,this._constructLines(e.detail)},t.prototype._onLineChanged=function(e){if(this._lineStarts){var t=this.getEOL().length,n=e.detail.length+t;this._lineStarts.changeValue(e.lineNumber-1,n)}this._lines[e.lineNumber-1].text=e.detail},t.prototype._onLinesDeleted=function(e){var t=e.fromLineNumber-1,n=e.toLineNumber-1;this._lineStarts&&this._lineStarts.removeValues(t,n-t+1),this._lines.splice(t,n-t+1)},t.prototype._onLinesInserted=function(e){var t,n,i=this.getEOL().length,r=e.detail.split("\n");for(t=e.fromLineNumber-1,n=0;t=0&&(t.validateTimeout=setTimeout(function(){t.validateTimeout=-1,n.validate(t.model.getAssociatedResource())},n.autoValidateDelay))},e.prototype._onModelEvents=function(e,t){var n,i,r=[],s=!1;for(n=0,i=t.length;i>n;n++){var a=t[n],u=a.getData();switch(a.getType()){case o.EventType.ModelContentChanged:switch(u.changeType){case o.EventType.ModelContentChangedFlush:r.push(this._mixinProperties({type:a.getType()},u,["changeType","detail","versionId"]));break;case o.EventType.ModelContentChangedLinesDeleted:r.push(this._mixinProperties({type:a.getType()},u,["changeType","fromLineNumber","toLineNumber","versionId"]));break;case o.EventType.ModelContentChangedLinesInserted:r.push(this._mixinProperties({type:a.getType()},u,["changeType","fromLineNumber","toLineNumber","detail","versionId"]));break;case o.EventType.ModelContentChangedLineChanged:r.push(this._mixinProperties({type:a.getType()},u,["changeType","lineNumber","detail","versionId"]))}s=!0;break;case o.EventType.ModelPropertiesChanged:r.push(this._mixinProperties({type:a.getType()},u,["properties"]))}}r.length>0&&this._modelEvents(this._models[e].model.getAssociatedResource(),r),s&&this._setupValidation(e)},e.prototype._mixinProperties=function(e,t,n){for(var i=0;ia;a++)if(i.endsWith(s.type,n[a]))return!0;return!1}function m(e,n,i){var o=r.Registry.as(t.Extensions.EditorModes);o.registerMode(e,n,i)}function v(e,n,i,r){t.registerModeAsyncDescriptor(e,n,new l.AsyncDescriptor(i,r))}function y(e,n){var i=r.Registry.as(t.Extensions.EditorModes);i.configureModeById(e,n)}function _(e){var n=r.Registry.as(t.Extensions.EditorModes);return n.getOrCreateMode(e)}function b(e,n,i){var o=r.Registry.as(t.Extensions.EditorModes);o.registerWorkerParticipant(e,new l.AsyncDescriptor(n,i))}t.isDigit=function(){var e="0".charCodeAt(0),t="1".charCodeAt(0),n="2".charCodeAt(0),i="3".charCodeAt(0),r="4".charCodeAt(0),o="5".charCodeAt(0),s="6".charCodeAt(0),a="7".charCodeAt(0),u="8".charCodeAt(0),l="9".charCodeAt(0),c="a".charCodeAt(0),d="b".charCodeAt(0),h="c".charCodeAt(0),p="d".charCodeAt(0),f="e".charCodeAt(0),g="f".charCodeAt(0),m="A".charCodeAt(0),v="B".charCodeAt(0),y="C".charCodeAt(0),_="D".charCodeAt(0),b="E".charCodeAt(0),C="F".charCodeAt(0);return function(w,S){var L=w.charCodeAt(0);switch(S){case 1:return L===e;case 2:return L>=e&&t>=L;case 3:return L>=e&&n>=L;case 4:return L>=e&&i>=L;case 5:return L>=e&&r>=L;case 6:return L>=e&&o>=L;case 7:return L>=e&&s>=L;case 8:return L>=e&&a>=L;case 9:return L>=e&&u>=L;case 10:return L>=e&&l>=L;case 11:return L>=e&&l>=L||L===c||L===m;case 12:return L>=e&&l>=L||L>=c&&d>=L||L>=m&&v>=L;case 13:return L>=e&&l>=L||L>=c&&h>=L||L>=m&&y>=L;case 14:return L>=e&&l>=L||L>=c&&p>=L||L>=m&&_>=L;case 15:return L>=e&&l>=L||L>=c&&f>=L||L>=m&&b>=L;default:return L>=e&&l>=L||L>=c&&g>=L||L>=m&&C>=L}}}(),t.isLineToken=g;var C=function(){function e(e,t,n){this.startIndex=e,this.type=t,this.bracket=n}return e}(),w=function(){function e(e,t,n,i){"undefined"==typeof n&&(n=null),"undefined"==typeof i&&(i=!1),this._instantiationService=e.instantiationService,this._contextService=e.contextService,this._threadService=e.threadService,this._descriptor=t,this._workerDescriptor=n||l.AsyncDescriptor.create("vs/languages/nullWorker","NullWorker"),this.supportsNestedMode=i,this.models={},this._options=null,this.validationSupport=this,this.autoValidateDelay=500,this.tokenizationSupport=this,this.occurrencesSupport=this,this.suggestSupport=this,this.inplaceReplaceSupport=this,this.diffSupport=this,this.dirtyDiffSupport=this,this.linkSupport=this,this.configSupport=this,this.electricCharacterSupport=this,this.commentsSupport=this,this.characterPairSupport=this,this.tokenTypeClassificationSupport=this,this._workerPiecePromise=null}return e.prototype._getWorkerPieceWithParticipants=function(){var e=this;if(!this._workerPiecePromise){var t=this._descriptor.workerParticipants;this._workerPiecePromise=t&&0!==t.length?n.TPromise.join(t.map(function(t){return e._instantiationService.createInstance(t)})).then(function(t){return e._getWorkerPiece(t)}):this._getWorkerPiece([])}return this._workerPiecePromise},e.prototype._getWorkerPiece=function(e){return this._instantiationService.createInstance(this._workerDescriptor,this.getId(),e)},e.prototype._worker=function(e){return this._getWorkerPieceWithParticipants().then(e)},e.prototype.getId=function(){return this._descriptor.id},e.prototype.bindModel=function(e){this._threadService&&f.BoundModels.getInstance(this._threadService).bindModel(e),this.models[e.id]=e},e.prototype.unbindModel=function(e){this._threadService&&f.BoundModels.getInstance(this._threadService).unbindModel(e),delete this.models[e.id]},e.prototype.validate=function(e){return this._worker(function(t){return t.validate(e)})},e.prototype._validateAll=function(e){return this._worker(function(t){return t.validateAll(e)})},e.prototype.getFilter=function(){return o.DefaultFilter},e.prototype.suggest=function(e,t){return this._worker(function(n){return n.suggest(e,t)})},e.prototype.getTriggerCharacters=function(){return[]},e.prototype.shouldAutotriggerSuggest=function(t,n,i){return this._handleEvent(t,n,i,function(t,n,i,r){return t instanceof e?t.shouldAutotriggerSuggestImpl(n,i.tokens,r):t.suggestSupport?t.suggestSupport.shouldAutotriggerSuggest(n,i,r):void 0})},e.prototype.shouldAutotriggerSuggestImpl=function(){return!1},e.prototype.shouldShowEmptySuggestionList=function(){return!0},e.prototype.shouldTriggerParameterHints=function(){return!0},e.prototype.findOccurrences=function(e,t,n){return"undefined"==typeof n&&(n=!1),this._worker(function(i){return i.findOccurrences(e,t,n)})},e.prototype.navigateValueSet=function(e,t,n){return this._worker(function(i){return i.navigateValueSet(e,t,n)})},e.prototype.computeDiff=function(e,t){return this._worker(function(n){return n.computeDiff(e,t)})},e.prototype.computeDirtyDiff=function(e){return this._worker(function(t){return t.computeDirtyDiff(e)})},e.prototype.computeLinks=function(e){return this._worker(function(t){return t.computeLinks(e)})},e.prototype.configure=function(e){var t=this;return this._options=e,this._threadService.isInMainThread?this._configureWorkers(e).then(function(){var e=Object.keys(t.models).map(function(e){return t.models[e].getAssociatedResource()});return t._validateAll(e)}):this._worker(function(t){return t.configure(e)})},e.prototype._configureWorkers=function(e){return this._worker(function(t){return t.configure(e)})},e.prototype.onEnter=function(t,n,i){return this._handleEvent(t,n,i,function(t,n,i,r){return t instanceof e?t.onEnterImpl(n,i.tokens,r):t.electricCharacterSupport?t.electricCharacterSupport.onEnter(n,i,r):void 0})},e.prototype.onEnterImpl=function(){return null},e.prototype.onElectricCharacter=function(t,n,i){return this._handleEvent(t,n,i,function(t,n,i,r){return t instanceof e?t.onElectricCharacterImpl(n,i.tokens,r):t.electricCharacterSupport?t.electricCharacterSupport.onElectricCharacter(n,i,r):void 0})},e.prototype.onElectricCharacterImpl=function(){return null},e.prototype.getElectricCharacters=function(){return[]},e.prototype.getInitialState=function(){throw new Error("Abstract Method")},e.prototype.getNonWordTokenTypes=function(){return[]},e.prototype.getWordDefinition=function(){return u.NullMode.DEFAULT_WORD_REGEXP},e.prototype.getAutoClosingPairs=function(){return[]},e.prototype.shouldAutoClosePair=function(t,n,i,r){return this._handleEvent(n,i,r,function(n,i,r,o){return n instanceof e?n.shouldAutoClosePairImpl(t,i,r.tokens,o):n.characterPairSupport?n.characterPairSupport.shouldAutoClosePair(t,i,r,o):void 0})},e.prototype.shouldAutoClosePairImpl=function(){return!0},e.prototype.getSurroundingPairs=function(){return this.getAutoClosingPairs()},e.prototype.getCommentsConfiguration=function(){return null},e.prototype._handleEvent=function(e,t,n,i){if(0===t.tokens.length||!this.supportsNestedMode)return i(this,e,t,n);var r=t.modeTransitions,o=t.tokens,s=d.findIndexInSegmentsArray(r,n),a=r[s].mode,u=r[s].startIndex,l=d.findIndexInSegmentsArray(o,u),c=-1,h=-1;s+1m;m++)p=o[m],f.push(new C(p.startIndex-g,p.type,p.bracket));var v=e.substring(g,c),y=n-g,_={tokens:f,modeTransitions:[{startIndex:0,mode:a}],actualStopOffset:0,endState:null};return i(a,v,_,y)},e.prototype._getEmbeddedLevel=function(e){for(var t=-1;e;)t++,e=e.getStateData();return t},e.prototype._nestedTokenize=function(e,t,n,i,r,o){for(var s=t.getStateData(),a=this.getLeavingNestedModeData(e,s),l=t;l.getStateData()&&l.getStateData().getMode()!==this;)l=l.getStateData();var c=l.getMode();if(!a){var d;return d=c.tokenizationSupport?c.tokenizationSupport.tokenize(e,t,n,i):u.nullTokenize(c,e,t,n),d.tokens=r.concat(d.tokens),d.modeTransitions=o.concat(d.modeTransitions),d}var h=a.nestedModeBuffer;if(h.length>0){var p;p=c.tokenizationSupport?c.tokenizationSupport.tokenize(h,t,n,i):u.nullTokenize(c,h,t,n),t=p.endState,r=r.concat(p.tokens),o=o.concat(p.modeTransitions)}var f=a.bufferAfterNestedMode,g=a.stateAfterNestedMode;return g.setStateData(s.getStateData()),this.onReturningFromNestedMode(g,t),this._myTokenize(f,g,n+h.length,i,r,o)},e.prototype._myTokenize=function(t,n,i,r,o,a){var u,l,c=new s.LineStream(t),d=null;n=n.clone(),(a.length<=0||a[a.length-1].mode!==this)&&a.push({startIndex:i,mode:this});for(var h=Math.min(r-i,t.length),p=0;c.pos()r?n.Severity.Error:2094===r&&0!==i.lookup(this._severities,r)&&/The property '[\w\d_]+' does not exist on value of type '(any|{})'\./.test(e.text())?0:i.lookup(this._severities,r,0)},e}();t.JavaScriptDiagnosticsClassifier=r,t.defaultLintSettings={curlyBracketsMustNotBeOmitted:"ignore",emptyBlocksWithoutComment:"ignore",comparisonOperatorsNotStrict:"ignore",missingSemicolon:"ignore",reservedKeywords:"warning",typeScriptSpecifics:"warning",unknownTypeOfResults:"warning",semicolonsInsteadOfBlocks:"ignore",functionsInsideLoops:"ignore",tripleSlashReferenceAlike:"warning",unusedVariables:"ignore",unusedFunctions:"ignore",newOnLowercaseFunctions:"warning",newOnReturningFunctions:"warning",redeclaredVariables:"warning",undeclaredVariables:"error",unknownProperty:"ignore",primitivesInInstanceOf:"error",mixedTypesArithmetics:"warning",forcedTypeConversion:"warning"},t._internalDefaultValidationSettings={scope:"/",baseUrl:"",noImplicitAny:!1,noLib:!1,extraLibs:["vs/text!vs/languages/typescript/lib/lib.d.ts"],semanticValidation:!0,syntaxValidation:!0,target:"ES5",module:"",lint:t.defaultLintSettings},t.defaultValidationSettings={target:"ES5",module:"",baseUrl:"",lint:t.defaultLintSettings},t.defaultSuggestSettions={alwaysAllWords:!1,useCodeSnippetsOnMethodSuggest:!1}}),define("vs/languages/javascript/javascript.contribution",["require","exports","vs/nls!vs/editor/editor.main","vs/platform/platform","vs/platform/configuration/configurationRegistry","vs/editor/modes/modesExtensions","./javascript.configuration"],function(e,t,n,i,r,o,s){o.registerMode("vs.languages.javascript",["text/javascript"],"vs/languages/javascript/javascript","JSMode"),o.registerWorkerParticipant("vs.languages.javascript","vs/languages/typescript/participants/filenameSuggestions","FilenameSuggestions");var a=i.Registry.as(r.Extensions.Configuration);a.registerConfiguration({id:o.LANGUAGE_CONFIGURATION+"/vs.languages.javascript",type:"object",title:n.localize("vs_languages_javascript_javascript.contribution",0),description:n.localize("vs_languages_javascript_javascript.contribution",1),properties:{suggestSettings:{type:"object",description:n.localize("vs_languages_javascript_javascript.contribution",2),default:s.defaultSuggestSettions,properties:{alwaysAllWords:{type:"boolean",default:!1,description:n.localize("vs_languages_javascript_javascript.contribution",3)},useCodeSnippetsOnMethodSuggest:{type:"boolean",default:!1,description:n.localize("vs_languages_javascript_javascript.contribution",4)}}},validationSettings:{description:n.localize("vs_languages_javascript_javascript.contribution",5),default:s.defaultValidationSettings,type:["object","array"],properties:{scope:{type:"string",default:"/",description:n.localize("vs_languages_javascript_javascript.contribution",6)},baseUrl:{type:"string",default:"",description:n.localize("vs_languages_javascript_javascript.contribution",7)},target:{enum:["ES5","ES3"],default:"ES5",description:n.localize("vs_languages_javascript_javascript.contribution",8)},module:{enum:["commonjs","amd",""],default:"",description:n.localize("vs_languages_javascript_javascript.contribution",9)},noLib:{type:"boolean",default:!1,description:n.localize("vs_languages_javascript_javascript.contribution",10)},lint:{type:"object",description:n.localize("vs_languages_javascript_javascript.contribution",11),properties:{curlyBracketsMustNotBeOmitted:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",12)},emptyBlocksWithoutComment:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",13)},comparisonOperatorsNotStrict:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",14)},missingSemicolon:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",15)},reservedKeywords:{enum:["ignore","warning","error"],default:"error",description:n.localize("vs_languages_javascript_javascript.contribution",16)},typeScriptSpecifics:{enum:["ignore","warning","error"],default:"error",description:n.localize("vs_languages_javascript_javascript.contribution",17)},unknownTypeOfResults:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",18)},semicolonsInsteadOfBlocks:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",19)},functionsInsideLoops:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",20)},newOnLowercaseFunctions:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",21)},tripleSlashReferenceAlike:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",22)},unusedVariables:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",23)},unusedFunctions:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",24)},newOnReturningFunctions:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",25)},redeclaredVariables:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",26)},undeclaredVariables:{enum:["ignore","warning","error"],default:"error",description:n.localize("vs_languages_javascript_javascript.contribution",27)},unknownProperty:{enum:["ignore","warning","error"],default:"ignore",description:n.localize("vs_languages_javascript_javascript.contribution",28)},primitivesInInstanceOf:{enum:["ignore","warning","error"],default:"error",description:n.localize("vs_languages_javascript_javascript.contribution",29)},mixedTypesArithmetics:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",30)},forcedTypeConversion:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_javascript_javascript.contribution",31)}}}}}}})});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/plaintext/plaintext",["require","exports","vs/editor/modes/modesExtensions"],function(e,t,n){var i=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){return e.advanceToEOS(),{type:""}},t}(n.AbstractState),r=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),t.prototype.getInitialState=function(){return new i(this)},t}(n.AbstractMode);t.Mode=r}),define("vs/languages/plaintext/plaintext.contribution",["require","exports","vs/editor/modes/modesExtensions","vs/languages/plaintext/plaintext"],function(e,t,n){n.registerMode("vs.languages.plainText",["text/plain"],"vs/languages/plaintext/plaintext","Mode")}),define("vs/css!vs/languages/typescript/editor/workerStatusReporter",["vs/css!vs/editor/editor.main"],{}),define("vs/languages/typescript/editor/workerStatusReporter",["require","exports","vs/base/dom/dom","vs/editor/editor","vs/editor/core/constants","vs/editor/modes/modesExtensions","vs/css!./workerStatusReporter"],function(e,t,n,i,r,o){function s(e,t,n){e.setAttribute(t,n)}var a;!function(e){e[e.Unknown=0]="Unknown",e[e.Updating=1]="Updating",e[e.Fetching=2]="Fetching",e[e.Error=3]="Error",e[e.Ok=4]="Ok"}(a||(a={}));var u=function(){function e(e,t){var n=this;this.editor=t,this.callOnDispose=[],this.created=!1,this.domNode=document.createElement("div"),this.domNode.className="monaco-typescript-status",this.editor.addOverlayWidget(this),this.onModelChange(),this.callOnDispose.push(this.editor.addListener(r.EventType.ModelChanged,function(){return n.onModelChange()}))}return e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onModelChange=function(){var e=this.editor.getModel();if(e){var t=e.getMode();"vs.languages.typescript"===t.getId()&&t instanceof o.AbstractMode?(n.toggleClass(this.domNode,"hidden",!1),this.created||(this.created=!0)):n.toggleClass(this.domNode,"hidden",!0)}},e.prototype.updateWidget=function(e,t){t&&0!==t?4===t?s(e,"status","ok"):1===t?s(e,"status","updating"):2===t?s(e,"status","fetching"):3===t&&s(e,"status","error"):s(e,"status","unkown")},e.prototype.getDomNode=function(){return this.domNode},e.prototype.getPosition=function(){return{preference:0}},e.ID="typescript.status.reporter",e}();t.StatusPresenter=u}),define("vs/base/paths",["require","exports"],function(e,t){function n(e,n){e=t.normalize(e),n=t.normalize(n);for(var i=e.split(t.sep),r=n.split(t.sep);i.length>0&&r.length>0&&i[0]===r[0];)i.shift(),r.shift();for(var o=0,s=i.length;s>o;o++)r.unshift("..");return r.join(t.sep)}function i(e){for(var n=e.split(/[\\\/]/),i=0,r=n.length;r>i;i++)"."===n[i]&&n[i+1]&&(n.splice(i,1),i--);return n.join(t.sep)}function r(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t||0===~t?".":e.substring(0,~t)}function o(e){var n=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===n?e:~n===e.length-1?t.basename(e.substring(0,e.length-1)):e.substr(~n+1)}function s(e){var t=~e.lastIndexOf(".");return t?e.substring(~t):""}function a(){for(var e=[],t=0;t=7005&&7015>=n?i.Severity.Warning:i.Severity.Error},t.defaultLintSettings={emptyBlocksWithoutComment:"ignore",curlyBracketsMustNotBeOmitted:"ignore",comparisonOperatorsNotStrict:"ignore",missingSemicolon:"ignore",unknownTypeOfResults:"warning",semicolonsInsteadOfBlocks:"ignore",functionsInsideLoops:"ignore",functionsWithoutReturnType:"warning",tripleSlashReferenceAlike:"warning",unusedImports:"ignore",unusedVariables:"ignore",unusedFunctions:"ignore",unusedMembers:"ignore"},t.defaultValidationSettings={target:"ES5",baseUrl:"",module:"",lint:t.defaultLintSettings},t._internalDefaultValidationSettings={scope:"/",baseUrl:"",noImplicitAny:!1,noLib:!1,extraLibs:["vs/text!vs/languages/typescript/lib/lib.d.ts"],semanticValidation:!0,syntaxValidation:!0,target:"ES5",module:"",lint:t.defaultLintSettings,diagnosticClassifier:t.impilictAnyClassifier},t.defaultSuggestSettions={alwaysAllWords:!1,useCodeSnippetsOnMethodSuggest:!1};var a=function(){function e(e,t,i){if(this._raw=e,this._raw){if(this._raw.validationSettings){Array.isArray(this._raw.validationSettings)||(this._raw.validationSettings=[this._raw.validationSettings]);var o=this._raw.validationSettings;if(0===o.length)this._raw.validationSettings=[t];else{for(var s=!1,a=t,u=0,l=o.length;l>u;u++){var c=this._raw.validationSettings[u];c.module=c.module||c.moduleGenTarget||a.module,c.target=c.target||c.codeGenTarget||a.target,c=n.withDefaults(c,a),c.scope=r.normalize(c.scope),s=s||c.scope===r.sep,r.isAbsolute(c.scope)||(c.scope=r.sep+c.scope),c.baseUrl=r.normalize(c.baseUrl),r.isAbsolute(c.baseUrl)||(c.baseUrl=r.sep+c.baseUrl),-1===c.extraLibs.indexOf("vs/text!vs/languages/typescript/lib/lib.d.ts")&&c.extraLibs.unshift("vs/text!vs/languages/typescript/lib/lib.d.ts"),this._raw.validationSettings[u]=c,a=c}s||this._raw.validationSettings.unshift(t)}}else this._raw.validationSettings=[t];this._raw.suggestSettings=this._raw.suggestSettings?n.withDefaults(this._raw.suggestSettings,i):i}else this._raw={validationSettings:[t],suggestSettings:i}}return Object.defineProperty(e.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationSettings",{get:function(){return this._raw.validationSettings.slice(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"suggestSettings",{get:function(){return n.clone(this._raw.suggestSettings)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allowMultipleWorkers",{get:function(){return this._raw.allowMultipleWorkers},enumerable:!0,configurable:!0}),e}();t.sanitize=o,t.equal=s}),define("vs/languages/typescript/typescript.contribution",["require","exports","vs/nls!vs/editor/editor.main","vs/base/env","vs/platform/platform","vs/editor/modes/modesExtensions","vs/editor/editorExtensions","./editor/workerStatusReporter","vs/platform/configuration/configurationRegistry","./typescript.configuration"],function(e,t,n,i,r,o,s,a,u,l){o.registerMode("vs.languages.typescript",["text/typescript"],"vs/languages/typescript/typescript","TypeScriptMode"),i.enableNLSWarnings&&o.registerWorkerParticipant("vs.languages.typescript","vs/languages/typescript/participants/nlsParticipant","WorkerParticipant"),o.registerWorkerParticipant("vs.languages.typescript","vs/languages/typescript/participants/filenameSuggestions","FilenameSuggestions"),i.enableEditorLanguageServiceIndicator&&s.registerEditorContribution(a.StatusPresenter);var c=r.Registry.as(u.Extensions.Configuration);c.registerConfiguration({id:o.LANGUAGE_CONFIGURATION+"/vs.languages.typescript",type:"object",title:n.localize("vs_languages_typescript_typescript.contribution",0),description:n.localize("vs_languages_typescript_typescript.contribution",1),properties:{suggestSettings:{type:"object",description:n.localize("vs_languages_typescript_typescript.contribution",2),default:l.defaultSuggestSettions,properties:{alwaysAllWords:{type:"boolean",default:!1,description:n.localize("vs_languages_typescript_typescript.contribution",3)},useCodeSnippetsOnMethodSuggest:{type:"boolean",default:!1,description:n.localize("vs_languages_typescript_typescript.contribution",4)}}},allowMultipleWorkers:{type:"boolean",description:n.localize("vs_languages_typescript_typescript.contribution",5),default:!1},validationSettings:{description:n.localize("vs_languages_typescript_typescript.contribution",6),default:l.defaultValidationSettings,type:["object","array"],properties:{scope:{type:"string",default:"/",description:n.localize("vs_languages_typescript_typescript.contribution",7)},baseUrl:{type:"string",default:"",description:n.localize("vs_languages_typescript_typescript.contribution",8)},target:{enum:["ES5","ES3"],default:"ES5",description:n.localize("vs_languages_typescript_typescript.contribution",9)},module:{enum:["commonjs","amd",""],default:"",description:n.localize("vs_languages_typescript_typescript.contribution",10)},noImplicitAny:{type:"boolean",default:!1,description:n.localize("vs_languages_typescript_typescript.contribution",11)},noLib:{type:"boolean",default:!1,description:n.localize("vs_languages_typescript_typescript.contribution",12)},lint:{type:"object",description:n.localize("vs_languages_typescript_typescript.contribution",13),properties:{curlyBracketsMustNotBeOmitted:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",14)},emptyBlocksWithoutComment:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",15)},comparisonOperatorsNotStrict:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",16)},missingSemicolon:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",17)},reservedKeywords:{enum:["ignore","warning","error"],default:"error",description:n.localize("vs_languages_typescript_typescript.contribution",18)},typeScriptSpecifics:{enum:["ignore","warning","error"],default:"error",description:n.localize("vs_languages_typescript_typescript.contribution",19)},unknownTypeOfResults:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",20)},semicolonsInsteadOfBlocks:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",21)},functionsInsideLoops:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",22)},newOnLowercaseFunctions:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",23)},tripleSlashReferenceAlike:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",24)},unusedVariables:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",25)},unusedFunctions:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",26)},unusedMembers:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",27)},functionsWithoutReturnType:{enum:["ignore","warning","error"],default:"warning",description:n.localize("vs_languages_typescript_typescript.contribution",28)}}}}}}})}),define("vs/languages/xml/xml.contribution",["require","exports","vs/editor/modes/modesExtensions"],function(e,t,n){n.registerMode("vs.languages.xml",["text/xml","application/xml","application/xaml+xml"],"vs/languages/xml/xml","XMLMode")}),define("vs/editor/modes/autoIndentation/autoIndentation",["require","exports","vs/editor/modes/modes"],function(e,t){var n=function(){function e(e){this.brackets=e}return e.prototype.getElectricBrackets=function(){for(var e,t=[],n=0;n0&&""===r.type;)i--,r=t[i-1];if(i>0&&this.tokenTypeIsBracket(r.type)&&1===r.bracket){for(var o=t[i];ii;i++)if(" "!==e[i]&&" "!==e[i])return null;return{matchBracketType:this.tokenTypeFromChar(e[n])}},e.prototype.tokenTypeFromChar=function(e){for(var t,n=0;ni;i++)n[t[i]]=o.clone(this._editor[t[i]]);this._mergeOptionsIn(e);for(var s=[],i=0,r=t.length;r>i;i++){var a=n[t[i]],u=this._editor[t[i]];o.equals(a,u)||s.push(t[i])}return s},e}(),y=function(){function e(){}return e.readConfiguration=function(t){return e.CACHE.hasOwnProperty(t)||(e.CACHE[t]=this._actualReadConfiguration(t)),e.CACHE[t]},e._testElementId=function(e){return"editorSizeProvider"+e},e._createTestElement=function(t,n){var i=document.createElement("span");i.id=e._testElementId(t);for(var r=" "===n?" ":n,o=0;8>o;o++)r+=r;return i.textContent=r,i},e._createTestElements=function(t){var n=document.createElement("div");n.className=t,n.style.position="absolute",n.style.top="-50000px",n.style.width="50000px";for(var i=0,r=e._USUAL_CHARS.length;r>i;i++)n.appendChild(document.createElement("br")),n.appendChild(e._createTestElement(i,e._USUAL_CHARS[i]));var o=e._testElementId(e._USUAL_CHARS.length),s=document.createElement("div");return s.id=o,s.appendChild(document.createTextNode("heightTestContent")),n.appendChild(document.createElement("br")),n.appendChild(s),n},e._readTestElementWidth=function(t){return document.getElementById(e._testElementId(t)).offsetWidth/256},e._readFromTestElements=function(){for(var t=[],n=0,i=e._USUAL_CHARS.length;i>n;n++)t.push(e._readTestElementWidth(n));return t},e._actualReadConfiguration=function(t){var n=e._createTestElements(t);document.body.appendChild(n);var i=e._readFromTestElements(),r=document.getElementById(e._testElementId(0)),o=p.getComputedStyle(r),s=e._getFontFromComputedStyle(o),a=parseInt(o.fontSize,10),u=document.getElementById(e._testElementId(e._USUAL_CHARS.length)),l=u.clientHeight;document.body.removeChild(n);for(var c=0,d=0,h=0,f=e._USUAL_CHARS.length;f>h;h++){var g=e._USUAL_CHARS.charAt(h);g>="0"&&"9">=g?c=Math.max(c,i[h]):"|"===g&&(d=i[h])}return{thinnestCharacterWidth:d,maxDigitWidth:c,lineHeight:l,font:s,fontSize:a}},e._getFontFromComputedStyle=function(e){return e.font?e.font:e.fontFamily+" "+e.fontSize+" "+e.fontSizeAdjust+" "+e.fontStretch+" "+e.fontStyle+" "+e.fontVariant+" "+e.fontWeight+" "},e._USUAL_CHARS="0123456789|",e.CACHE={},e}(),_=function(e){function t(t,n,i){"undefined"==typeof n&&(n=null),"undefined"==typeof i&&(i=null);var r=this;e.call(this,[d.EventType.ConfigurationChanged]),this._configWithDefaults=new v(t),this._indentationGuesser=i,this._computedIndentationOptions=null,this._isDominatedByLongLines=!1,this.handlerDispatcher=new l.HandlerDispatcher,this._elementSizeObserver=new f.ElementSizeObserver(n,function(){var e=r.editor;r.editor=r._computeInternalOptions();var t=r._createConfigurationChangedEvent([]);t.observedOuterWidth=r.editor.observedOuterWidth!==e.observedOuterWidth,t.observedOuterHeight=r.editor.observedOuterHeight!==e.observedOuterHeight,r.emit(d.EventType.ConfigurationChanged,t)}),this._configWithDefaults.getEditorOptions().automaticLayout&&this._elementSizeObserver.startObserving(),this.editor=this._computeInternalOptions()}return __extends(t,e),t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){this._elementSizeObserver.dispose(),e.prototype.dispose.call(this)},t.prototype.getRawOptions=function(){return this._configWithDefaults.getEditorOptions()},t.prototype._computeInternalOptions=function(){var e,t=this._configWithDefaults.getEditorOptions(),n=m(t.wrappingColumn,-1);e="undefined"!=typeof t.stopLineTokenizationAfter?m(t.stopLineTokenizationAfter,-1):n>=0?-1:1e4;var i;i="undefined"!=typeof t.stopRenderingLineAfter?m(t.stopRenderingLineAfter,-1):n>=0?-1:1e4;var r=this._getEditorClassName(t.theme),o=y.readConfiguration(r),s=this._elementSizeObserver.getWidth(),a=this._elementSizeObserver.getHeight();return{observedOuterWidth:s,observedOuterHeight:a,lineNumbers:t.lineNumbers,selectOnLineNumbers:g(t.selectOnLineNumbers),lineNumbersMinChars:m(t.lineNumbersMinChars,1),glyphMargin:g(t.glyphMargin),lineDecorationsWidth:m(t.lineDecorationsWidth,0),revealHorizontalRightPadding:m(t.revealHorizontalRightPadding,0),roundedSelection:g(t.roundedSelection),theme:t.theme,readOnly:g(t.readOnly),scrollbar:t.scrollbar,overviewRulerLanes:m(t.overviewRulerLanes,0,3),hideCursorInOverviewRuler:g(t.hideCursorInOverviewRuler),scrollBeyondLastLine:g(t.scrollBeyondLastLine),automaticLayout:g(t.automaticLayout),wrappingColumn:n,wordWrapBreakBeforeCharacters:t.wordWrapBreakBeforeCharacters,wordWrapBreakAfterCharacters:t.wordWrapBreakAfterCharacters,wordWrapBreakObtrusiveCharacters:t.wordWrapBreakObtrusiveCharacters,tabFocusMode:g(t.tabFocusMode),stopLineTokenizationAfter:e,stopRenderingLineAfter:i,longLineBoundary:m(t.longLineBoundary),hover:g(t.hover),contextmenu:g(t.contextmenu),quickSuggestions:g(t.quickSuggestions),quickSuggestionsDelay:m(t.quickSuggestionsDelay),iconsInSuggestions:g(t.iconsInSuggestions),autoClosingBrackets:g(t.autoClosingBrackets),formatOnType:g(t.formatOnType),suggestOnTriggerCharacters:g(t.suggestOnTriggerCharacters),lineHeight:o.lineHeight,pageSize:0,thinnestCharacterWidth:o.thinnestCharacterWidth,maxDigitWidth:o.maxDigitWidth,font:o.font,fontSize:o.fontSize,isDominatedByLongLines:this._isDominatedByLongLines}},t.prototype.bindKeys=function(e){var t=this,n=this._configWithDefaults.getKeyBindings(),i=e.bindGroup(function(e){for(var i in n)if(n.hasOwnProperty(i))for(var r=t.handlerDispatcher.trigger.bind(t.handlerDispatcher,"keyboard",i),o=n[i],s=0;s0)for(var n=0;n0&&this.emit(d.EventType.ConfigurationChanged,this._createConfigurationChangedEvent(t))},t.prototype._getEditorClassName=function(e){var t="";return i.browser.isIE11orEarlier?t+="ie ":i.browser.isFirefox&&(t+="ff "),i.browser.isIE9&&(t+="ie9 "),i.browser.isMacintosh&&(t+="mac "),"monaco-editor "+t+e},t.prototype.getEditorClassName=function(){return this._getEditorClassName(this.editor.theme)},t.prototype.setIsDominatedByLongLines=function(e){this._isDominatedByLongLines=e,this.editor.isDominatedByLongLines=e},t.prototype.resetIndentationOptions=function(){this._computedIndentationOptions=null},t.prototype._computeIndentationOptions=function(){var e=this._configWithDefaults.getEditorOptions();if("auto"!==e.tabSize&&"auto"!==e.insertSpaces)return{insertSpaces:e.insertSpaces,tabSize:e.tabSize};var t=null;this._indentationGuesser&&(t="auto"!==e.tabSize?this._indentationGuesser(e.tabSize):this._indentationGuesser(4));var n=!1,i=4;return"auto"===e.tabSize&&"auto"===e.insertSpaces?t&&(n=t.insertSpaces,i=t.tabSize):"auto"===e.tabSize?(n=e.insertSpaces,t&&(i=t.tabSize)):(i=e.tabSize,t&&(n=t.insertSpaces)),{insertSpaces:n,tabSize:i}},t.prototype.getIndentationOptions=function(){return this._computedIndentationOptions||(this._computedIndentationOptions=this._computeIndentationOptions()),this._computedIndentationOptions},t.prototype.getWrappingColumn=function(){return this.editor.isDominatedByLongLines&&this.editor.wrappingColumn>0?0:this.editor.wrappingColumn},t.prototype._normalizeIndentationFromWhitespace=function(e){var t,n=this.getIndentationOptions(),i=0;for(t=0;tt;t++)r+=" "}for(t=0;i>t;t++)r+=" ";return r},t.prototype.normalizeIndentation=function(e){var t=h.firstNonWhitespaceIndex(e);return-1===t&&(t=e.length),this._normalizeIndentationFromWhitespace(e.substring(0,t))+e.substring(t)},t.prototype.getOneIndent=function(){var e=this.getIndentationOptions();if(e.insertSpaces){for(var t="",n=0;n=o;o++){var a,u=e.getLineContent(o);if(" "===u.charAt(0))a=1;else for(a=0;aa;a++){if(" "===u.charAt(a)){a++;break}if(" "!==u.charAt(a))break}0!==a&&t.addEditOperation(new n.Range(o,1,o,a+1),null)}}else{var l=this._configuration.getOneIndent();for(o=i;r>=o;o++)t.addEditOperation(new n.Range(o,1,o,1),l)}this._selectionId=t.trackSelection(this._selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},e}();t.ShiftCommand=i});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/command/replaceCommand",["require","exports","vs/editor/core/selection"],function(e,t,n){var i=function(){function e(e,t){this._range=e,this._text=t}return e.prototype.getText=function(){return this._text},e.prototype.getRange=function(){return this._range},e.prototype.setRange=function(e){this._range=e},e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations(),r=i[0].range;return new n.Selection(r.endLineNumber,r.endColumn,r.endLineNumber,r.endColumn)},e}();t.ReplaceCommand=i;var r=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),t.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations(),r=i[0].range;return new n.Selection(r.startLineNumber,r.startColumn,r.startLineNumber,r.startColumn)},t}(i);t.ReplaceCommandWithoutChangingPosition=r;var o=function(e){function t(t,n,i,r){e.call(this,t,n),this._columnDeltaOffset=r,this._lineNumberDeltaOffset=i}return __extends(t,e),t.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations(),r=i[0].range;return new n.Selection(r.endLineNumber+this._lineNumberDeltaOffset,r.endColumn+this._columnDeltaOffset,r.endLineNumber+this._lineNumberDeltaOffset,r.endColumn+this._columnDeltaOffset)},t}(i);t.ReplaceCommandWithOffsetCursorState=o;var s=function(e){function t(t,n,i){e.call(this,t,n),this._initialSelection=i}return __extends(t,e),t.prototype.getEditOperations=function(t,n){e.prototype.getEditOperations.call(this,t,n),this._selectionId=n.trackSelection(this._initialSelection)},t.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},t}(i);t.ReplaceCommandThatPreservesSelection=s}),define("vs/editor/core/command/surroundSelectionCommand",["require","exports","vs/editor/core/range","vs/editor/core/selection"],function(e,t,n,i){var r=function(){function e(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}return e.prototype.getEditOperations=function(e,t){t.addEditOperation(new n.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addEditOperation(new n.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),r=n[0].range,o=n[1].range;return new i.Selection(r.endLineNumber,r.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)},e}();t.SurroundSelectionCommand=r}),define("vs/editor/core/controller/cursorMoveHelper",["require","exports"],function(e,t){var n=function(){function e(e){this.configuration=e}return e.prototype.getLeftOfPosition=function(e,t,n){return n>1?n-=1:t>1&&(t-=1,n=e.getLineMaxColumn(t)),{lineNumber:t,column:n}},e.prototype.getRightOfPosition=function(e,t,n){return nt&&(t=1),n=this.columnFromVisibleColumn(e,t,o),i=o-this.visibleColumnFromColumn(e,t,n),{lineNumber:t,column:n,leftoverVisibleColumns:i}},e.prototype.getPositionDown=function(e,t,n,i,r){var o=this.visibleColumnFromColumn(e,t,n)+i;t+=r;var s=e.getLineCount();return t>s&&(t=s),n=this.columnFromVisibleColumn(e,t,o),i=o-this.visibleColumnFromColumn(e,t,n),{lineNumber:t,column:n,leftoverVisibleColumns:i}},e.prototype.getColumnAtBeginningOfLine=function(e,t,n){var i=e.getLineFirstNonWhitespaceColumn(t)||1;return n=1!==n&&i>=n?1:i},e.prototype.getColumnAtEndOfLine=function(e,t,n){var i=e.getLineMaxColumn(t),r=e.getLineLastNonWhitespaceColumn(t)||i;return n=n!==i&&n>=r?i:r},e.prototype.visibleColumnFromColumn=function(e,t,n){for(var i=e.getLineContent(t),r=0,o=0;n-1>o;o++)r=" "===i.charAt(o)?this.nextTabColumn(r):r+1;return r},e.prototype.columnFromVisibleColumn=function(e,t,n){for(var i=e.getLineContent(t),r=-1,o=0,s=0;s=o;s++)r=o,o=" "===i.charAt(s)?this.nextTabColumn(o):o+1;return o=Math.abs(n-o),r=Math.abs(n-r),r>o?s+1:s},e.prototype.nextTabColumn=function(e){return e+this.configuration.getIndentationOptions().tabSize-e%this.configuration.getIndentationOptions().tabSize},e}();t.ModelCursorMoveHelper=n}),define("vs/editor/core/controller/oneCursor",["require","exports","vs/editor/editor","vs/base/strings","vs/editor/modes/modes","vs/editor/core/position","vs/editor/core/range","vs/editor/core/command/shiftCommand","vs/editor/core/command/replaceCommand","vs/editor/core/command/surroundSelectionCommand","vs/editor/core/selection","vs/base/errors","vs/editor/core/controller/cursorMoveHelper"],function(e,t,n,i,r,o,s,a,u,l,c,d,h){var p=function(){function e(e,t,n,i,r){this.editorId=e,this.model=t,this.configuration=n,this.modeConfiguration=i,this.viewModelHelper=r,this.helper=new f(this.model,this.configuration),this.position=new o.Position(1,1),this.viewPosition=new o.Position(1,1),this.positionMarkerId=null,this.inSelectionMode=!1,this.selectionStart=null,this.viewSelectionStart=null,this.selStartMarkerId=null,this.selEndMarkerId=null,this.leftoverVisibleColumns=0,this.selectionStartLeftoverVisibleColumns=0,this.bracketDecorations=[],this._cachedSelection=null,this._cachedViewSelection=null,this._stopSelectionMode(),this._setPosition(1,1,1,1,0)}return e.prototype.updateModeConfiguration=function(e){this.modeConfiguration=e},e.prototype.duplicate=function(){var t=new e(this.editorId,this.model,this.configuration,this.modeConfiguration,this.viewModelHelper);return t.setSelection(this.getSelection()),t.leftoverVisibleColumns=this.leftoverVisibleColumns,t.selectionStartLeftoverVisibleColumns=this.selectionStartLeftoverVisibleColumns,t},e.prototype.dispose=function(){this.positionMarkerId&&(this.model._removeMarker(this.positionMarkerId),this.positionMarkerId=null),this.selStartMarkerId&&(this.model._removeMarker(this.selStartMarkerId),this.selStartMarkerId=null),this.selEndMarkerId&&(this.model._removeMarker(this.selEndMarkerId),this.selEndMarkerId=null),this.bracketDecorations=this.model.deltaDecorations(this.bracketDecorations,[],this.editorId)},e.prototype.adjustBracketDecorations=function(){var e=null,t=this.getSelection();t.isEmpty()&&!this.configuration.editor.readOnly&&(e=this.model.matchBracket(this.position,!0));var n=[];if(e&&e.brackets){var i={stickiness:1,isOverlay:!1,className:"bracket-match"};n.push({range:e.brackets[0],options:i}),n.push({range:e.brackets[1],options:i})}this.bracketDecorations=this.model.deltaDecorations(this.bracketDecorations,n,this.editorId)},e.computeSelection=function(e,t,n){var i,r,o,s;return e?t.isEmpty()?(i=t.startLineNumber,r=t.startColumn,o=n.lineNumber,s=n.column):n.isBeforeOrEqual(t.getStartPosition())?(i=t.endLineNumber,r=t.endColumn,o=n.lineNumber,s=n.column):(i=t.startLineNumber,r=t.startColumn,o=n.lineNumber,s=n.column):(i=n.lineNumber,r=n.column,o=n.lineNumber,s=n.column),new c.Selection(i,r,o,s)},e.prototype.getSelection=function(){return this._cachedSelection||(this._cachedSelection=e.computeSelection(this.inSelectionMode,this.selectionStart,this.position)),this._cachedSelection},e.prototype.getViewSelection=function(){return this._cachedViewSelection||(this._cachedViewSelection=e.computeSelection(this.inSelectionMode,this.viewSelectionStart,this.viewPosition)),this._cachedViewSelection},e.prototype.setSelection=function(e){var t=this.model.validatePosition({lineNumber:e.selectionStartLineNumber,column:e.selectionStartColumn}),n=this.model.validatePosition({lineNumber:e.positionLineNumber,column:e.positionColumn});t.equals(n)?this._stopSelectionMode():this._startSelectionModeFromPosition(t,this.viewModelHelper.convertModelPositionToViewPosition(t.lineNumber,t.column));var i=this.viewModelHelper.convertModelPositionToViewPosition(n.lineNumber,n.column);this._setPosition(n.lineNumber,n.column,i.lineNumber,i.column)},e.prototype.getPosition=function(){return this.position},e.prototype.getViewPosition=function(){return this.viewPosition},e.prototype._getValidViewPosition=function(){return this.viewModelHelper.validateViewPosition(this.viewPosition.lineNumber,this.viewPosition.column,this.position)},e.prototype._setPosition=function(e,t,n,i,r){"undefined"==typeof r&&(r=0),this.inSelectionMode&&this.viewSelectionStart.isEmpty()&&this.viewSelectionStart.startLineNumber===n&&this.viewSelectionStart.startColumn===i&&this._stopSelectionMode(),this.position=new o.Position(e,t),this.viewPosition=new o.Position(n,i),this.leftoverVisibleColumns=r,this.selectionStartLeftoverVisibleColumns=0,this._cachedSelection=null,this._cachedViewSelection=null,this.positionMarkerId?this.model._changeMarker(this.positionMarkerId,this.position.lineNumber,this.position.column):this.positionMarkerId=this.model._addMarker(this.position.lineNumber,this.position.column,!0) },e.prototype._startSelectionModeFromPosition=function(e,t){this.inSelectionMode=!0,this.selectionStart=new s.Range(e.lineNumber,e.column,e.lineNumber,e.column),this.viewSelectionStart=new s.Range(t.lineNumber,t.column,t.lineNumber,t.column),this._cachedSelection=null,this._cachedViewSelection=null,this._ensureSelectionMarkers()},e.prototype._startSelectionModeFromRange=function(e,t){this.inSelectionMode=!0,this.selectionStart=e,this.viewSelectionStart=t,this._cachedSelection=null,this._cachedViewSelection=null,this._ensureSelectionMarkers()},e.prototype._stopSelectionMode=function(){this.inSelectionMode=!1,this.selectionStart=null,this.viewSelectionStart=null,this._cachedSelection=null,this._cachedViewSelection=null,this._ensureSelectionMarkers()},e.prototype._ensureSelectionMarkers=function(){this.inSelectionMode?(this.selStartMarkerId?this.model._changeMarker(this.selStartMarkerId,this.selectionStart.startLineNumber,this.selectionStart.startColumn):this.selStartMarkerId=this.model._addMarker(this.selectionStart.startLineNumber,this.selectionStart.startColumn,!0),this.selEndMarkerId?this.model._changeMarker(this.selEndMarkerId,this.selectionStart.endLineNumber,this.selectionStart.endColumn):this.selEndMarkerId=this.model._addMarker(this.selectionStart.endLineNumber,this.selectionStart.endColumn,!0)):(this.selStartMarkerId&&(this.model._removeMarker(this.selStartMarkerId),this.selStartMarkerId=null),this.selEndMarkerId&&(this.model._removeMarker(this.selEndMarkerId),this.selEndMarkerId=null))},e.prototype._moveModelPosition=function(e,t,n,i,r,o,s){var a=this.viewModelHelper.convertModelPositionToViewPosition(i,r);this._actualMove(e,t,n,i,r,a.lineNumber,a.column,o,s)},e.prototype._moveViewPosition=function(e,t,n,i,r,o,s){var a=this.viewModelHelper.convertViewToModelPosition(i,r);this._actualMove(e,t,n,a.lineNumber,a.column,i,r,o,s)},e.prototype._actualMove=function(e,t,n,i,r,o,s,a,u){if(t&&(e.cursorPositionChangeReason=t),n&&!this.inSelectionMode?this._startSelectionModeFromPosition(this.position,this.viewPosition):!n&&this.inSelectionMode&&this._stopSelectionMode(),u){var l=this.model.getEditableRange();il.endLineNumber||i===l.endLineNumber&&r>l.endColumn)&&(i=l.endLineNumber,r=l.endColumn)}this._setPosition(i,r,o,s,a)},e.prototype.recoverSelectionFromMarkers=function(e){e.cursorPositionChangeReason="recoverFromMarkers",e.shouldPushStackElementBefore=!0,e.shouldPushStackElementAfter=!0,e.shouldReveal=!1,e.shouldRevealHorizontal=!1;var t=this.model._getMarker(this.positionMarkerId),n=new o.Position(t.lineNumber,t.column),i=null,r=null,a=null,u=null;if(this.selStartMarkerId&&this.selEndMarkerId){var l=this.model._getMarker(this.selStartMarkerId),c=this.model._getMarker(this.selEndMarkerId);if(i=new s.Range(l.lineNumber,l.column,c.lineNumber,c.column),i.isEmpty())a=new o.Position(i.startLineNumber,i.startColumn),i=null,a.equals(n)?a=null:u=this.viewModelHelper.convertModelPositionToViewPosition(a.lineNumber,a.column);else{var d=this.viewModelHelper.convertModelPositionToViewPosition(i.startLineNumber,i.startColumn),h=this.viewModelHelper.convertModelPositionToViewPosition(i.endLineNumber,i.endColumn);r=new s.Range(d.lineNumber,d.column,h.lineNumber,h.column)}}i?this._startSelectionModeFromRange(i,r):a?this._startSelectionModeFromPosition(a,u):this._stopSelectionMode();var p=this.viewModelHelper.convertModelPositionToViewPosition(n.lineNumber,n.column);return this._setPosition(n.lineNumber,n.column,p.lineNumber,p.column),!0},e.prototype.jumpToBracket=function(e){var t=this.bracketDecorations.length;if(2!==t)return!1;for(var n=0;2>n;n++){var i=this.model.getDecorationRange(this.bracketDecorations[n]),r=this.model.getDecorationRange(this.bracketDecorations[1-n]);if(g.isPositionAtRangeEdges(this.position,i)||g.isPositionInsideRange(this.position,i))return this._moveModelPosition(e,null,!1,r.startLineNumber,r.startColumn,0,!1),!0}return!1},e.prototype.moveTo=function(e,t,n,i,r){var o,s=this.model.validatePosition(t);o=n?this.viewModelHelper.validateViewPosition(n.lineNumber,n.column,s):this.viewModelHelper.convertModelPositionToViewPosition(s.lineNumber,s.column);var a="mouse"===i?"explicit":null;return"api"===i&&(r.shouldRevealVerticalInCenter=!0),this._moveViewPosition(r,a,e,o.lineNumber,o.column,0,!1),!0},e.prototype.moveLeft=function(e,t){var n,i;if(this.inSelectionMode&&!e){var r=this.getViewSelection(),o=this.viewModelHelper.validateViewPosition(r.startLineNumber,r.startColumn,this.getSelection().getStartPosition());n=o.lineNumber,i=o.column}else{var s=this._getValidViewPosition(),a=this.helper.getLeftOfPosition(this.viewModelHelper.viewModel,s.lineNumber,s.column);n=a.lineNumber,i=a.column}return this._moveViewPosition(t,"explicit",e,n,i,0,!0),!0},e.prototype.moveWordLeft=function(e,t){var n=this.position.lineNumber,i=this.position.column,r=!1;1===i&&n>1&&(r=!0,n-=1,i=this.model.getLineMaxColumn(n));var s=this.helper.findWord(new o.Position(n,i),"left",!0);return i=s?r||i>s.end+1?s.end+1:s.start+1:1,this._moveModelPosition(t,"explicit",e,n,i,0,!0),!0},e.prototype.moveRight=function(e,t){var n,i;if(this.inSelectionMode&&!e){var r=this.getViewSelection(),o=this.viewModelHelper.validateViewPosition(r.endLineNumber,r.endColumn,this.getSelection().getEndPosition());n=o.lineNumber,i=o.column}else{var s=this._getValidViewPosition(),a=this.helper.getRightOfPosition(this.viewModelHelper.viewModel,s.lineNumber,s.column);n=a.lineNumber,i=a.column}return this._moveViewPosition(t,"explicit",e,n,i,0,!0),!0},e.prototype.moveWordRight=function(e,t){var n=this.position.lineNumber,i=this.position.column,r=!1;i===this.model.getLineMaxColumn(n)&&n=r&&(r=1),o>=d&&(o=d)}var h=new s.Range(l.lineNumber,r,l.lineNumber,o),p=this.viewModelHelper.convertModelPositionToViewPosition(l.lineNumber,r),f=this.viewModelHelper.convertModelPositionToViewPosition(l.lineNumber,o);this._startSelectionModeFromRange(h,new s.Range(p.lineNumber,p.column,f.lineNumber,f.column)),a=h.endLineNumber,u=h.endColumn}i.cursorPositionChangeReason="explicit";var g=this.viewModelHelper.convertModelPositionToViewPosition(a,u);return this._setPosition(a,u,g.lineNumber,g.column,0),!0},e.prototype.cancelSelection=function(){return this.inSelectionMode?(this._stopSelectionMode(),!0):!1},e.prototype._typeInterceptorEnter=function(e,t){return"\n"!==e?!1:this._enter(!1,t)},e.prototype.lineInsertBefore=function(e){var t=this.position.lineNumber,n=0;return t>1&&(t--,n=this.model.getLineMaxColumn(t)),this._enter(!1,e,new o.Position(t,n),new s.Range(t,n,t,n))},e.prototype.lineInsertAfter=function(e){var t=this.model.getLineMaxColumn(this.position.lineNumber);return this._enter(!1,e,new o.Position(this.position.lineNumber,t),new s.Range(this.position.lineNumber,t,this.position.lineNumber,t))},e.prototype.lineBreakInsert=function(e){return this._enter(!0,e)},e.prototype._enter=function(e,t,n,r){"undefined"==typeof n&&(n=this.position),"undefined"==typeof r&&(r=this.getSelection()),t.shouldPushStackElementBefore=!0;var o,s=this.model.getLineContent(n.lineNumber),a=this.model.getRawLineTokens(n.lineNumber);if(this.model.getMode().electricCharacterSupport)try{o=this.model.getMode().electricCharacterSupport.onEnter(s,a,n.column-1)}catch(l){d.onUnexpectedError(l)}var c=i.getLeadingWhitespace(s);if(c.length>n.column-1&&(c=c.substring(0,n.column-1)),o?(o.appendText?-1===i.firstNonWhitespaceIndex(o.appendText)&&(o.appendText=o.appendText):o.appendText=0===o.indentAction?"":" ",o.indentOutdentAppendText||(o.indentOutdentAppendText="")):o={indentAction:0,appendText:"",indentOutdentAppendText:""},0===o.indentAction)this.actualType("\n"+this.helper.normalizeIndentation(c+o.appendText),e,t,r);else if(1===o.indentAction)this.actualType("\n"+this.helper.normalizeIndentation(c+o.appendText),e,t,r);else if(2===o.indentAction){var h=this.helper.normalizeIndentation(c),p=this.helper.normalizeIndentation(c+o.appendText),f="\n"+p+"\n"+h+o.indentOutdentAppendText;t.executeCommand=e?new u.ReplaceCommandWithoutChangingPosition(r,f):new u.ReplaceCommandWithOffsetCursorState(r,f,-1,p.length-h.length)}return!0},e.prototype._typeInterceptorAutoClosingCloseChar=function(e,t){if(!this.configuration.editor.autoClosingBrackets)return!1;var n=this.getSelection();if(!n.isEmpty()||!this.modeConfiguration.autoClosingPairsClose.hasOwnProperty(e))return!1;var i=this.model.getLineContent(this.position.lineNumber),r=i[this.position.column-1];if(r!==e)return!1;var o=new s.Range(this.position.lineNumber,this.position.column,this.position.lineNumber,this.position.column+1);return t.executeCommand=new u.ReplaceCommand(o,e),!0},e.prototype._typeInterceptorAutoClosingOpenChar=function(e,t){if(!this.configuration.editor.autoClosingBrackets)return!1;var n=this.getSelection();if(!n.isEmpty()||!this.modeConfiguration.autoClosingPairsOpen.hasOwnProperty(e))return!1;if(!this.model.getMode().characterPairSupport)return!1;var i=this.model.getLineContent(this.position.lineNumber),r=i[this.position.column-1],o=this.modeConfiguration.autoClosingPairsOpen[e];if(r&&r!==o&&!/\s/.test(r))return!1;var s=this.model.getRawLineTokens(this.position.lineNumber),a=!1;try{a=this.model.getMode().characterPairSupport.shouldAutoClosePair(e,i,s,this.position.column-1)}catch(l){d.onUnexpectedError(l)}return a?(t.shouldPushStackElementBefore=!0,t.executeCommand=new u.ReplaceCommandWithOffsetCursorState(n,e+o,0,-o.length),!0):!1},e.prototype._typeInterceptorSurroundSelection=function(e,t){if(!this.configuration.editor.autoClosingBrackets)return!1;var n=this.getSelection();if(n.isEmpty()||!this.modeConfiguration.surroundingPairs.hasOwnProperty(e))return!1;var i,r,o,s,a,u,c=!0,d=" ".charCodeAt(0),h=" ".charCodeAt(0);for(i=n.startLineNumber;i<=n.endLineNumber;i++)for(u=this.model.getLineContent(i),r=i===n.startLineNumber?n.startColumn-1:0,o=i===n.endLineNumber?n.endColumn-1:u.length,s=r;o>s;s++)a=u.charCodeAt(s),a!==d&&a!==h&&(c=!1,i=n.endLineNumber+1,s=o);if(c)return!1;var p=this.modeConfiguration.surroundingPairs[e];return t.shouldPushStackElementBefore=!0,t.shouldPushStackElementAfter=!0,t.executeCommand=new l.SurroundSelectionCommand(n,e,p),!0},e.prototype._typeInterceptorElectricChar=function(e,t){var n=this;return this.modeConfiguration.electricChars.hasOwnProperty(e)?(t.postOperationRunnable=function(e){return n._typeInterceptorElectricCharRunnable(e)},this.actualType(e,!1,t)):!1},e.prototype._typeInterceptorElectricCharRunnable=function(e){var t,n=this.model.getLineContent(this.position.lineNumber),r=this.model.getRawLineTokens(this.position.lineNumber);if(this.model.getMode().electricCharacterSupport)try{t=this.model.getMode().electricCharacterSupport.onElectricCharacter(n,r,this.position.column-2)}catch(o){d.onUnexpectedError(o)}if(t){var a=t.matchBracketType,l=t.appendText;if(a){var c=null;if(a&&(c=this.model.findMatchingBracketUp(a,this.position)),c){var h=c.startLineNumber,p=this.model.getLineContent(h),f=i.getLeadingWhitespace(p),g=this.helper.normalizeIndentation(f),m=this.model.getLineFirstNonWhitespaceColumn(this.position.lineNumber)||this.position.column,v=n.substring(0,m-1);if(v!==g){var y=n.substring(m-1,this.position.column-1),_=g+y,b=new s.Range(this.position.lineNumber,1,this.position.lineNumber,this.position.column);e.shouldPushStackElementAfter=!0,e.executeCommand=new u.ReplaceCommand(b,_)}}}else if(l){var C=-l.length;t.advanceCount&&(C+=t.advanceCount),e.shouldPushStackElementAfter=!0,e.executeCommand=new u.ReplaceCommandWithOffsetCursorState(this.getSelection(),l,0,C)}}},e.prototype.actualType=function(e,t,n,i){return"undefined"==typeof i&&(i=this.getSelection()),n.executeCommand=t?new u.ReplaceCommandWithoutChangingPosition(i,e):new u.ReplaceCommand(i,e),!0},e.prototype.type=function(e,t){return this._typeInterceptorEnter(e,t)?!0:this._typeInterceptorAutoClosingCloseChar(e,t)?!0:this._typeInterceptorAutoClosingOpenChar(e,t)?!0:this._typeInterceptorSurroundSelection(e,t)?!0:this._typeInterceptorElectricChar(e,t)?!0:this.actualType(e,!1,t)},e.prototype.tab=function(e){if(this.configuration.editor.tabFocusMode)return!1;var t=this.getSelection();if(t.isEmpty()){var n="";if(this.configuration.getIndentationOptions().insertSpaces)for(var i=this.helper.nextTabColumn(this.position.column-1),r=this.position.column;i>=r;r++)n+=" ";else n=" ";e.executeCommand=new u.ReplaceCommand(t,n)}else e.shouldPushStackElementBefore=!0,e.shouldPushStackElementAfter=!0,this.indent(e);return!0},e.prototype.indent=function(e){var t=this.getSelection();return e.executeCommand=new a.ShiftCommand(this.configuration,!1,t),e.shouldRevealHorizontal=!1,!0},e.prototype.outdent=function(e){if(this.configuration.editor.tabFocusMode)return!1;var t=this.getSelection();return e.executeCommand=new a.ShiftCommand(this.configuration,!0,t),e.shouldRevealHorizontal=!1,!0},e.prototype.paste=function(e,t,n){if(t&&"\n"===e.charAt(e.length-1)&&e.indexOf("\n")===e.length-1){var i=new s.Range(this.position.lineNumber,1,this.position.lineNumber,1);return n.executeCommand=new u.ReplaceCommand(i,e),!0}return n.executeCommand=new u.ReplaceCommand(this.getSelection(),e),!0},e.prototype._autoClosingPairDelete=function(e){if(!this.configuration.editor.autoClosingBrackets)return!1;var t=this.model.getLineContent(this.position.lineNumber),n=t[this.position.column-2];if(!this.modeConfiguration.autoClosingPairsOpen.hasOwnProperty(n))return!1;var i=t[this.position.column-1],r=this.modeConfiguration.autoClosingPairsOpen[n];if(i!==r)return!1;var o=new s.Range(this.position.lineNumber,this.position.column-1,this.position.lineNumber,this.position.column+1);return e.executeCommand=new u.ReplaceCommand(o,""),!0},e.prototype.deleteLeft=function(e){if(this._autoClosingPairDelete(e))return!0;var t=this.getSelection();if(t.isEmpty()){var n=this.helper.getLeftOfPosition(this.model,this.position.lineNumber,this.position.column);t=new s.Range(n.lineNumber,n.column,this.position.lineNumber,this.position.column)}return t.isEmpty()?!0:(t.startLineNumber!==t.endLineNumber&&(e.shouldPushStackElementBefore=!0),e.executeCommand=new u.ReplaceCommand(t,""),!0)},e.prototype.deleteWordLeft=function(e){if(this._autoClosingPairDelete(e))return!0;var t=this.getSelection();if(t.isEmpty()){var n=this.position.lineNumber,i=this.position.column;if(1===n&&1===i)return!0;var r=this.helper.findWord(this.position,"left",!0);i=r?r.end+1i?l.start+1:l.end+1:a;var c=new s.Range(n,i,n,this.position.column);if(!c.isEmpty())return e.executeCommand=new u.ReplaceCommand(c,""),!0}return this.deleteRight(e)},e.prototype.deleteAllLeft=function(e){if(this._autoClosingPairDelete(e))return!0;var t=this.getSelection();if(t.isEmpty()){var n=this.position.lineNumber,i=this.position.column;if(1===i)return!0;var r=new s.Range(n,1,n,i);if(!r.isEmpty())return e.executeCommand=new u.ReplaceCommand(r,""),!0}return this.deleteLeft(e)},e.prototype.deleteAllRight=function(e){var t=this.getSelection();if(t.isEmpty()){var n=this.position.lineNumber,i=this.position.column,r=this.model.getLineMaxColumn(n);if(i===r)return!0;var o=new s.Range(n,i,n,r);if(!o.isEmpty())return e.executeCommand=new u.ReplaceCommand(o,""),!0}return this.deleteRight(e)},e.prototype.cut=function(e){var t=this.getSelection();return t.isEmpty()?!1:(this.deleteLeft(e),!0)},e}();t.OneCursor=p;var f=function(){function e(e,t){this.model=e,this.configuration=t,this.moveHelper=new h.ModelCursorMoveHelper(this.configuration)}return e.prototype.getLeftOfPosition=function(e,t,n){return this.moveHelper.getLeftOfPosition(e,t,n)},e.prototype.getRightOfPosition=function(e,t,n){return this.moveHelper.getRightOfPosition(e,t,n)},e.prototype.getPositionUp=function(e,t,n,i,r){return this.moveHelper.getPositionUp(e,t,n,i,r)},e.prototype.getPositionDown=function(e,t,n,i,r){return this.moveHelper.getPositionDown(e,t,n,i,r)},e.prototype.getColumnAtBeginningOfLine=function(e,t,n){return this.moveHelper.getColumnAtBeginningOfLine(e,t,n)},e.prototype.getColumnAtEndOfLine=function(e,t,n){return this.moveHelper.getColumnAtEndOfLine(e,t,n)},e.prototype.normalizeIndentation=function(e){return this.configuration.normalizeIndentation(e)},e.prototype.nextTabColumn=function(e){return e+this.configuration.getIndentationOptions().tabSize-e%this.configuration.getIndentationOptions().tabSize},e.prototype.findWord=function(e,t,n){"undefined"==typeof n&&(n=!1);var i,r,o,s=this.model.getWords(e.lineNumber,n,!0);if(n){if(i=e.column-1,"left"===t){for(r=s.length-1;r>=0;r--)if(!(s[r].start>=i))return s[r]}else for(r=0,o=s.length;o>r;r++)if(!(s[r].end<=i))return s[r]}else for(i=e.column,"left"===t?1!==i&&(i-=.1):i!==this.model.getLineMaxColumn(e.lineNumber)&&(i+=.1),i-=1,r=0,o=s.length;o>r;r++)if(s[r].start<=i&&i<=s[r].end)return s[r];return null},e}(),g=function(){function e(){}return e.rangeContainsPosition=function(e,t){return t.lineNumbere.endLineNumber?!1:t.lineNumber===e.startLineNumber&&t.columne.endColumn?!1:!0},e.isPositionInsideRange=function(e,t){return e.lineNumbert.endLineNumber?!1:e.lineNumber===t.startLineNumber&&e.columnt.endColumn?!1:!0},e.isPositionAtRangeEdges=function(e,t){return e.lineNumber===t.startLineNumber&&e.column===t.startColumn?!0:e.lineNumber===t.endLineNumber&&e.column===t.endColumn?!0:!1},e}()}),define("vs/editor/core/controller/cursorCollection",["require","exports","vs/editor/core/controller/oneCursor","vs/editor/core/selection","vs/base/errors"],function(e,t,n,i,r){var o=function(){function e(e,t,i,r){this.editorId=e,this.model=t,this.configuration=i,this.viewModelHelper=r,this.modeConfiguration=this.getModeConfiguration(),this.primaryCursor=new n.OneCursor(this.editorId,this.model,this.configuration,this.modeConfiguration,this.viewModelHelper),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(),this.killSecondaryCursors()},e.prototype.updateMode=function(){var e=this;this.modeConfiguration=this.getModeConfiguration(),this.getAll().forEach(function(t){t.updateModeConfiguration(e.modeConfiguration)})},e.prototype.getAll=function(){var e=[];return e.push(this.primaryCursor),e=e.concat(this.secondaryCursors)},e.prototype.getPosition=function(e){return 0===e?this.primaryCursor.getPosition():this.secondaryCursors[e-1].getPosition()},e.prototype.getViewPosition=function(e){return 0===e?this.primaryCursor.getViewPosition():this.secondaryCursors[e-1].getViewPosition()},e.prototype.getPositions=function(){var e=[];e.push(this.primaryCursor.getPosition());for(var t=0,n=this.secondaryCursors.length;n>t;t++)e.push(this.secondaryCursors[t].getPosition());return e},e.prototype.getViewPositions=function(){var e=[];e.push(this.primaryCursor.getViewPosition());for(var t=0,n=this.secondaryCursors.length;n>t;t++)e.push(this.secondaryCursors[t].getViewPosition());return e},e.prototype.getSelection=function(e){return 0===e?this.primaryCursor.getSelection():this.secondaryCursors[e-1].getSelection()},e.prototype.getSelections=function(){var e=[];e.push(this.primaryCursor.getSelection());for(var t=0,n=this.secondaryCursors.length;n>t;t++)e.push(this.secondaryCursors[t].getSelection());return e},e.prototype.getViewSelections=function(){var e=[];e.push(this.primaryCursor.getViewSelection());for(var t=0,n=this.secondaryCursors.length;n>t;t++)e.push(this.secondaryCursors[t].getViewSelection());return e},e.prototype.setSelections=function(e){this.primaryCursor.setSelection(e[0]),this._setSecondarySelections(e.slice(1))},e.prototype.killSecondaryCursors=function(){return this._setSecondarySelections([])>0},e.prototype.normalize=function(){this._mergeCursorsIfNecessary(),this.primaryCursor.adjustBracketDecorations();for(var e=0,t=this.secondaryCursors.length;t>e;e++)this.secondaryCursors[e].adjustBracketDecorations()},e.prototype.addSecondaryCursor=function(e){var t=new n.OneCursor(this.editorId,this.model,this.configuration,this.modeConfiguration,this.viewModelHelper);e&&t.setSelection(e),this.secondaryCursors.push(t),this.lastAddedCursorIndex=this.secondaryCursors.length},e.prototype.duplicateCursors=function(){var e=[];e.push(this.primaryCursor.duplicate());for(var t=0,n=this.secondaryCursors.length;n>t;t++)e.push(this.secondaryCursors[t].duplicate());this.secondaryCursors=this.secondaryCursors.concat(e),this.lastAddedCursorIndex=this.secondaryCursors.length},e.prototype.getLastAddedCursor=function(){return 0===this.secondaryCursors.length||0===this.lastAddedCursorIndex?this.primaryCursor:this.secondaryCursors[this.lastAddedCursorIndex-1]},e.prototype._setSecondarySelections=function(e){var t=this.secondaryCursors.length,n=e.length,i=n-t;if(n>t)for(var r=n-t,o=0;r>o;o++)this.addSecondaryCursor(null);else if(t>n)for(var s=t-n,o=0;s>o;o++)this._removeSecondaryCursor(this.secondaryCursors.length-1);for(var o=0;n>o;o++)e[o]&&this.secondaryCursors[o].setSelection(e[o]);return i},e.prototype._removeSecondaryCursor=function(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(),this.secondaryCursors.splice(e,1)},e.prototype._mergeCursorsIfNecessary=function(){if(0!==this.secondaryCursors.length){for(var e=this.getAll(),t=[],n=0;nd&&t[b].index--;e.splice(d,1),t.splice(c,1),this._removeSecondaryCursor(d-1),r--}}}},e.prototype.getModeConfiguration=function(){var e,t,n={electricChars:{},autoClosingPairsOpen:{},autoClosingPairsClose:{},surroundingPairs:{}};if(this.model.getMode().electricCharacterSupport)try{t=this.model.getMode().electricCharacterSupport.getElectricCharacters()}catch(i){r.onUnexpectedError(i),t=null}if(t)for(e=0;ef;f++)p[f]()}var m=i.cursors.getSelections(),v=i.cursors.getViewSelections(),y=!1;if(u.length!==m.length)y=!0;else{for(var d=0,_=u.length;!y&&_>d;d++)u[d].equalsSelection(m[d])||(y=!0);for(var d=0,_=l.length;!y&&_>d;d++)l[d].equalsSelection(v[d])||(y=!0)}y&&(i.emitCursorPositionChanged(c,e),o&&i.emitCursorRevealRange(s,a),i.emitCursorSelectionChanged(c,e))})}catch(o){d.onUnexpectedError(o)}return this._isHandling=!1,r},t.prototype._interpretHandlerContext=function(e){e.shouldPushStackElementBefore&&(this.model.pushStackElement(),e.shouldPushStackElementBefore=!1),this._internalExecuteCommands(e.executeCommands,e.postOperationRunnables),e.executeCommands=[],e.shouldPushStackElementAfter&&(this.model.pushStackElement(),e.shouldPushStackElementAfter=!1);for(var t=!1,n=0,i=e.postOperationRunnables.length;i>n;n++)if(e.postOperationRunnables[n]){t=!0;break}if(t){var r=e.postOperationRunnables.slice(0);e.postOperationRunnables=[],this._invokeForAll(e,function(e,t,n){return r[e]&&r[e](n),!1}),this._interpretHandlerContext(e)}},t.prototype._interpretCommandResult=function(e){return e?(this.cursors.setSelections(e),!0):!1},t.prototype._getEditOperationsFromCommand=function(e,t,i){var r=this,o=[],s=0,a=function(e,n){o.push({identifier:{major:t,minor:s++},range:e,text:n})},u=!1,l=function(t){var n,i;if(t.isEmpty()){var o=r.model.getLineMaxColumn(t.startLineNumber);t.startColumn===o?(n=!0,i=!0):(n=!1,i=!1)}else 0===t.getDirection()?(n=!1,i=!0):(n=!0,i=!1);var s=e.selectionStartMarkers.length;return e.selectionStartMarkers[s]=r.model._addMarker(t.selectionStartLineNumber,t.selectionStartColumn,n),e.positionMarkers[s]=r.model._addMarker(t.positionLineNumber,t.positionColumn,i),s.toString()},c={addEditOperation:a,trackSelection:l};try{i.getEditOperations(this.model,c)}catch(h){return d.onUnexpectedError(h,n.localize("vs_editor_core_controller_cursor",0)),{operations:[],hadTrackedRange:!1}}return{operations:o,hadTrackedRange:u}},t.prototype._getEditOperations=function(e,t){for(var n,i,r=[],o=[],s=0;sn.identifier.major?t.identifier.major:n.identifier.major,r[i.toString()]=!0;for(var a=0;aa&&s--,a--);s>0&&s--}return r},t.prototype._collapseDeleteCommands=function(e,t){if(1!==e.length){var n=e.every(function(e){if(!(e instanceof f.ReplaceCommand))return!1;var t=e;return t.getText().length>0?!1:!0});if(n){var i=e,r=i.map(function(e,n){return{range:i[n].getRange(),postOperationRunnable:t[n],order:n}});r.sort(function(e,t){return o.compareRangesUsingStarts(e.range,t.range)});for(var s=r[0],a=1;at;t++)if(e[t])return!1;return!0},t.prototype._innerExecuteCommands=function(e,t,n){var i=this;if(this.configuration.editor.readOnly)return!1;if(this._arrayIsEmpty(t))return!1;var r=this.cursors.getSelections(),o=this._getEditOperations(e,t);if(0===o.operations.length&&!o.anyoneHadTrackedRange)return!1;for(var a=o.operations,u=this.model.getEditableRange(),l=u.getStartPosition(),c=u.getEndPosition(),d=0;d0||o.hadTrackedRanges[u]?(a[u].sort(c),d[u]=t[u].computeCursorState(i.model,{getInverseEditOperations:function(){return a[u]},getTrackedSelection:function(t){var n=parseInt(t,10),r=i.model._getMarker(e.selectionStartMarkers[n]),o=i.model._getMarker(e.positionMarkers[n]);return new s.Selection(r.lineNumber,r.column,o.lineNumber,o.column)}})):d[u]=r[u];return d}),v=[];for(g in p)p.hasOwnProperty(g)&&v.push(parseInt(g,10));v.sort(function(e,t){return t-e});for(var d=0;d=t?n.translateUp(i):!1})},t.prototype._addCursorDown=function(e){if(this.configuration.editor.readOnly)return!1;var t=this.cursors.getSelections().length;return this.cursors.duplicateCursors(),this._invokeForAll(e,function(e,n,i){return e>=t?n.translateDown(i):!1})},t.prototype._moveLeft=function(e,t){return this._invokeForAll(t,function(t,n,i){return n.moveLeft(e,i)})},t.prototype._moveWordLeft=function(e,t){return this._invokeForAll(t,function(t,n,i){return n.moveWordLeft(e,i)})},t.prototype._moveRight=function(e,t){return this._invokeForAll(t,function(t,n,i){return n.moveRight(e,i)})},t.prototype._moveWordRight=function(e,t){return this._invokeForAll(t,function(t,n,i){return n.moveWordRight(e,i)})},t.prototype._moveDown=function(e,t,n){return this._invokeForAll(n,function(n,i,r){return i.moveDown(e,t,r)})},t.prototype._moveUp=function(e,t,n){return this._invokeForAll(n,function(n,i,r){return i.moveUp(e,t,r)})},t.prototype._moveToBeginningOfLine=function(e,t){return this._invokeForAll(t,function(t,n,i){return n.moveToBeginningOfLine(e,i)})},t.prototype._moveToEndOfLine=function(e,t){return this._invokeForAll(t,function(t,n,i){return n.moveToEndOfLine(e,i)})},t.prototype._moveToBeginningOfBuffer=function(e,t){return this._invokeForAll(t,function(t,n,i){return n.moveToBeginningOfBuffer(e,i)})},t.prototype._moveToEndOfBuffer=function(e,t){return this._invokeForAll(t,function(t,n,i){return n.moveToEndOfBuffer(e,i)})},t.prototype._selectAll=function(e){return this.cursors.killSecondaryCursors(),this._invokeForAll(e,function(e,t,n){return t.selectAll(n)})},t.prototype._line=function(e,t){return this.cursors.killSecondaryCursors(),this._invokeForAll(t,function(n,i,r){return i.line(e,t.eventData.position,t.eventData.viewPosition,r)})},t.prototype._lastCursorLine=function(e,t){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;var n=this.cursors.getLastAddedCursor();return this._invokeForAll(t,function(i,r,o){return r===n?r.line(e,t.eventData.position,t.eventData.viewPosition,o):!1}),t.shouldReveal=!1,t.shouldRevealHorizontal=!1,!0},t.prototype._lineInsertBefore=function(e){return this._invokeForAll(e,function(e,t,n){return t.lineInsertBefore(n)})},t.prototype._lineInsertAfter=function(e){return this._invokeForAll(e,function(e,t,n){return t.lineInsertAfter(n)})},t.prototype._lineBreakInsert=function(e){return this._invokeForAll(e,function(e,t,n){return t.lineBreakInsert(n)})},t.prototype._word=function(e,t){return this.cursors.killSecondaryCursors(),this._invokeForAll(t,function(n,i,r){return i.word(e,t.eventData.position,t.eventData.preference||"none",r)})},t.prototype._lastCursorWord=function(e){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;var t=this.cursors.getLastAddedCursor();return this._invokeForAll(e,function(n,i,r){return i===t?i.word(!0,e.eventData.position,e.eventData.preference||"none",r):!1}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._cancelSelection=function(e){return this.cursors.killSecondaryCursors()?!0:this._invokeForAll(e,function(e,t,n){return t.cancelSelection(n)})},t.prototype._type=function(e){var t=this,n=e.eventData.text;if("keyboard"===e.eventSource){var i,r,o;for(i=0,r=n.length;r>i;i++)o=n.charAt(i),this.charactersTyped+=o,this._createAndInterpretHandlerCtx(e.eventSource,e.eventData,function(n){t._invokeForAll(n,function(e,t,n){return t.type(o,n)},!1,!1),e.cursorPositionChangeReason=n.cursorPositionChangeReason,e.shouldReveal=n.shouldReveal,e.shouldRevealVerticalInCenter=n.shouldRevealVerticalInCenter,e.shouldRevealHorizontal=n.shouldRevealHorizontal})}else this._invokeForAll(e,function(e,t,i){return t.actualType(n,!1,i)});return!0},t.prototype._tab=function(e){return this._invokeForAll(e,function(e,t,n){return t.tab(n)},!1,!1)},t.prototype._indent=function(e){return this._invokeForAll(e,function(e,t,n){return t.indent(n)})},t.prototype._outdent=function(e){return this._invokeForAll(e,function(e,t,n){return t.outdent(n)})},t.prototype._paste=function(e){return this._invokeForAll(e,function(t,n,i){return n.paste(e.eventData.text,e.eventData.pasteOnNewLine,i)})},t.prototype._deleteLeft=function(e){return this._invokeForAll(e,function(e,t,n){return t.deleteLeft(n)},!1,!1)},t.prototype._deleteWordLeft=function(e){return this._invokeForAll(e,function(e,t,n){return t.deleteWordLeft(n)},!1,!1)},t.prototype._deleteRight=function(e){return this._invokeForAll(e,function(e,t,n){return t.deleteRight(n)},!1,!1)},t.prototype._deleteWordRight=function(e){return this._invokeForAll(e,function(e,t,n){return t.deleteWordRight(n)},!1,!1)},t.prototype._deleteAllLeft=function(e){return this._invokeForAll(e,function(e,t,n){return t.deleteAllLeft(n)},!1,!1)},t.prototype._deleteAllRight=function(e){return this._invokeForAll(e,function(e,t,n){return t.deleteAllRight(n)},!1,!1)},t.prototype._cut=function(e){return this._invokeForAll(e,function(e,t,n){return t.cut(n)})},t.prototype._undo=function(e){return e.cursorPositionChangeReason="undo",this._interpretCommandResult(this.model.undo()),!0},t.prototype._redo=function(e){return e.cursorPositionChangeReason="redo",this._interpretCommandResult(this.model.redo()),!0},t.prototype._externalExecuteCommand=function(e){return this.cursors.killSecondaryCursors(),this._invokeForAll(e,function(t,n,i){return i.shouldPushStackElementBefore=!0,i.shouldPushStackElementAfter=!0,i.executeCommand=e.eventData,!1})},t.prototype._externalExecuteCommands=function(e){return this._invokeForAll(e,function(t,n,i){return i.shouldPushStackElementBefore=!0,i.shouldPushStackElementAfter=!0,i.executeCommand=e.eventData[t],!1})},t}(a.EventEmitter);t.Cursor=g}),define("vs/editor/core/view/viewContext",["require","exports"],function(e,t){t.ClassNames={TEXTAREA_COVER:"textAreaCover",TEXTAREA:"inputarea",LINES_CONTENT:"lines-content",OVERFLOW_GUARD:"overflow-guard",VIEW_LINES:"view-lines",VIEW_LINE:"view-line",SCROLLABLE_ELEMENT:"editor-scrollable",CONTENT_WIDGETS:"contentWidgets",OVERLAY_WIDGETS:"overlayWidgets",LINES_DECORATIONS:"lines-decorations",LINE_NUMBERS:"line-numbers",GLYPH_MARGIN:"glyph-margin",SCROLL_DECORATION:"scroll-decoration"},t.EventNames={ModelFlushedEvent:"modelFlushedEvent",LinesDeletedEvent:"linesDeletedEvent",LinesInsertedEvent:"linesInsertedEvent",LineChangedEvent:"lineChangedEvent",TokensChangedEvent:"tokensChangedEvent",DecorationsChangedEvent:"decorationsChangedEvent",CursorPositionChangedEvent:"cursorPositionChangedEvent",CursorSelectionChangedEvent:"cursorSelectionChangedEvent",RevealRangeEvent:"revealRangeEvent",LineMappingChangedEvent:"lineMappingChangedEvent"};var n=function(){function e(e,t,n,i,r,o){this.editorId=e,this.configuration=t,this.model=n,this.privateViewEventBus=i,this.addEventHandler=r,this.removeEventHandler=o}return e}();t.ViewContext=n}),define("vs/base/dom/keyboardController",["require","exports","vs/base/dom/dom","vs/base/lifecycle"],function(e,t,n,i){var r=function(){function e(e){var t=this;this._listeners={},this._previousKeyDown=null,this._previousEventType=null,this._toDispose=[],this._toDispose.push(n.addStandardDisposableListener(e,"keydown",function(e){return t._onKeyDown(e)})),this._toDispose.push(n.addStandardDisposableListener(e,"keypress",function(e){return t._onKeyPress(e)})),this._toDispose.push(n.addStandardDisposableListener(e,"keyup",function(e){return t._onKeyUp(e)}))}return e.prototype.dispose=function(){this._toDispose=i.disposeAll(this._toDispose),this._listeners=null,this._previousKeyDown=null,this._previousEventType=null},e.prototype.addListener=function(e,t){var n=this;return this._listeners[e]=t,function(){n._listeners[e]=null}},e.prototype._fire=function(e,t){this._listeners.hasOwnProperty(e)&&this._listeners[e](t)},e.prototype._onKeyDown=function(e){this._previousKeyDown=e.clone(),this._previousEventType="keydown",this._fire("keydown",e)},e.prototype._onKeyPress=function(e){this._previousKeyDown&&(e.shiftKey&&this._previousKeyDown.asString()!==e.asString()&&(e.shiftKey=!1),"keypress"===this._previousEventType&&this._fire("keydown",this._previousKeyDown)),this._previousEventType="keypress",this._fire("keypress",e)},e.prototype._onKeyUp=function(e){this._fire("keyup",e)},e}();t.KeyboardController=r}),define("vs/editor/core/view/viewEventHandler",["require","exports","vs/editor/core/constants","vs/editor/core/view/viewContext"],function(e,t,n,i){var r=function(){function e(){this.shouldRender=!0}return e.prototype.onLineMappingChanged=function(){return!1},e.prototype.onModelFlushed=function(){return!1},e.prototype.onModelDecorationsChanged=function(){return!1},e.prototype.onModelLinesDeleted=function(){return!1},e.prototype.onModelLineChanged=function(){return!1},e.prototype.onModelLinesInserted=function(){return!1},e.prototype.onModelTokensChanged=function(){return!1},e.prototype.onCursorPositionChanged=function(){return!1},e.prototype.onCursorSelectionChanged=function(){return!1},e.prototype.onCursorRevealRange=function(){return!1},e.prototype.onConfigurationChanged=function(){return!1},e.prototype.onLayoutChanged=function(){return!1},e.prototype.onScrollChanged=function(){return!1},e.prototype.onZonesChanged=function(){return!1},e.prototype.onScrollWidthChanged=function(){return!1},e.prototype.onScrollHeightChanged=function(){return!1},e.prototype.onViewFocusChanged=function(){return!1},e.prototype.handleEvents=function(e){var t,r,o,s;for(t=0,r=e.length;r>t;t++)switch(o=e[t],s=o.getData(),o.getType()){case i.EventNames.LineMappingChangedEvent:this.shouldRender=this.onLineMappingChanged()||this.shouldRender;break;case i.EventNames.ModelFlushedEvent:this.shouldRender=this.onModelFlushed()||this.shouldRender;break;case i.EventNames.LinesDeletedEvent:this.shouldRender=this.onModelLinesDeleted(s)||this.shouldRender;break;case i.EventNames.LinesInsertedEvent:this.shouldRender=this.onModelLinesInserted(s)||this.shouldRender;break;case i.EventNames.LineChangedEvent:this.shouldRender=this.onModelLineChanged(s)||this.shouldRender;break;case i.EventNames.TokensChangedEvent:this.shouldRender=this.onModelTokensChanged(s)||this.shouldRender;break;case i.EventNames.DecorationsChangedEvent:this.shouldRender=this.onModelDecorationsChanged(s)||this.shouldRender;break;case i.EventNames.CursorPositionChangedEvent:this.shouldRender=this.onCursorPositionChanged(s)||this.shouldRender;break;case i.EventNames.CursorSelectionChangedEvent:this.shouldRender=this.onCursorSelectionChanged(s)||this.shouldRender;break;case i.EventNames.RevealRangeEvent:this.shouldRender=this.onCursorRevealRange(s)||this.shouldRender;break;case n.EventType.ConfigurationChanged:this.shouldRender=this.onConfigurationChanged(s)||this.shouldRender;break;case n.EventType.ViewLayoutChanged:this.shouldRender=this.onLayoutChanged(s)||this.shouldRender;break;case n.EventType.ViewScrollChanged:this.shouldRender=this.onScrollChanged(s)||this.shouldRender;break;case n.EventType.ViewZonesChanged:this.shouldRender=this.onZonesChanged()||this.shouldRender;break;case n.EventType.ViewScrollWidthChanged:this.shouldRender=this.onScrollWidthChanged()||this.shouldRender;break;case n.EventType.ViewScrollHeightChanged:this.shouldRender=this.onScrollHeightChanged(s)||this.shouldRender;break;case n.EventType.ViewFocusChanged:this.shouldRender=this.onViewFocusChanged(s)||this.shouldRender;break;default:console.info("View received unkown event: "),console.info(o)}},e}();t.ViewEventHandler=r});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/controller/keyboardHandler",["require","exports","vs/editor/core/range","vs/editor/core/position","vs/base/dom/keyboardController","vs/base/dom/dom","vs/base/env","vs/editor/core/view/viewContext","vs/editor/editor","vs/editor/core/view/viewEventHandler","vs/base/time/schedulers"],function(e,t,n,i,r,o,s,a,u,l,c){var d;!function(e){e[e.Type=0]="Type",e[e.Paste=1]="Paste"}(d||(d={}));var h=function(){function e(e,t,n,i){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionToken=i}return e.fromTextArea=function(t,n){return new e(t.value,t.selectionStart,t.selectionEnd,n)},e.fromEditorSelectionAndPreviousState=function(t,i,r){if(s.browser.isIPad)return new e("",0,0,u);var o=100,a=0,u=i.startLineNumber,l=i.startColumn,c=i.endLineNumber,d=i.endColumn,h=t.getLineMaxColumn(c);i.isEmpty()&&r!==u&&(l=1,d=h);var p="",f=Math.max(1,u-a);u>f&&(p=t.getValueInRange(new n.Range(f,1,u,1),1)),p+=t.getValueInRange(new n.Range(u,1,u,l),1),p.length>o&&(p=p.substring(p.length-o,p.length));var g="",m=Math.min(c+a,t.getLineCount());g+=t.getValueInRange(new n.Range(c,d,c,h),1),m>c&&(g="\n"+t.getValueInRange(new n.Range(c+1,1,m,t.getLineMaxColumn(m)),1)),g.length>o&&(g=g.substring(0,o));var v=t.getValueInRange(new n.Range(u,l,c,d),1);return v.length>2*o&&(v=v.substring(0,o)+String.fromCharCode(8230)+v.substring(v.length-o,v.length)),new e(p+v+g,p.length,p.length+v.length,u)},e.prototype.getSelectionStart=function(){return this.selectionStart},e.prototype.resetSelection=function(){this.selectionStart=this.value.length,this.selectionEnd=this.value.length},e.prototype.getValue=function(){return this.value},e.prototype.getSelectionToken=function(){return this.selectionToken},e.prototype.applyToTextArea=function(e,t){if(e.value!==this.value&&(e.value=this.value),t)try{e.focus(),e.setSelectionRange(this.selectionStart,this.selectionEnd)}catch(n){}},e.prototype.extractNewText=function(e){if(this.selectionStart!==this.selectionEnd)return"";if(!e)return this.value;var t=e.value.substring(0,e.selectionStart),n=e.value.substring(e.selectionEnd,e.value.length);s.browser.isIE11orEarlier&&document.queryCommandValue("OverWrite")&&(n=n.substr(1));var i=this.value;return i.substring(0,t.length)===t&&(i=i.substring(t.length)),i.substring(i.length-n.length,i.length)===n&&(i=i.substring(0,i.length-n.length)),i},e}(),p=function(e){function t(t,a,u){var l=this;e.call(this),this.context=t,this.viewController=a,this.textArea=u.textArea,this.viewHelper=u,this.selection=new n.Range(1,1,1,1),this.cursorPosition=new i.Position(1,1),this.contentLeft=0,this.contentWidth=0,this.scrollLeft=0,this.asyncReadFromTextArea=new c.RunOnceScheduler(null,0),this.asyncSetSelectionToTextArea=new c.RunOnceScheduler(function(){return l._writePlaceholderAndSelectTextArea()},0),this.asyncTriggerCut=new c.RunOnceScheduler(function(){return l._triggerCut()},0),this.previousSetTextAreaState=null,this.hasFocus=!1,this.justHadAPaste=!1,this.justHadACut=!1,this.lastKeyPressTime=0,this.lastCompositionEndTime=0,this.lastValueWrittenToTheTextArea="",this.kbController=new r.KeyboardController(this.textArea),this.listenersToRemove=[],this.listenersToRemove.push(this.kbController.addListener("keydown",function(e){return l._onKeyDown(e)})),this.listenersToRemove.push(this.kbController.addListener("keyup",function(e){return l._onKeyUp(e)})),this.listenersToRemove.push(this.kbController.addListener("keypress",function(e){return l._onKeyPress(e)})),this.compositionCount=0,this.listenersToRemove.push(o.addListener(this.textArea,"compositionstart",function(){0===l.compositionCount&&l.showTextAreaAtCursor(),l.compositionCount++,l.asyncReadFromTextArea.cancel()})),this.listenersToRemove.push(o.addListener(this.textArea,"compositionend",function(){l.compositionCount--,0===l.compositionCount&&l.hideTextArea(),l.lastCompositionEndTime=(new Date).getTime(),l._scheduleReadFromTextArea(0)})),s.browser.isIPad&&this.listenersToRemove.push(o.addListener(this.textArea,"input",function(){var e=(new Date).getTime(),t=e-l.lastKeyPressTime;500>=t&&(l._scheduleReadFromTextArea(0),l.lastKeyPressTime=0)})),s.browser.isMacintosh&&this.listenersToRemove.push(o.addListener(this.textArea,"input",function(){if(l.justHadAPaste)return l.justHadAPaste=!1,void 0;if(l.justHadACut)return l.justHadACut=!1,void 0;var e=(new Date).getTime(),t=e-l.lastKeyPressTime;if(!(500>=t)){var n=e-l.lastCompositionEndTime;if(!(500>=n||l.compositionCount>0||l.textArea.selectionStart!==l.textArea.selectionEnd)){var i,r=l.textArea.value;if(s.browser.isChrome){var o=l.lastValueWrittenToTheTextArea.substring(1);if(r.length<=o.length)return;if(r.substring(r.length-o.length)!==o)return;i=r.substring(0,r.length-o.length)}else i=r;console.log("DEDUCED input: <<<"+i+">>>")}}})),this.listenersToRemove.push(o.addListener(this.textArea,"cut",function(e){return l._onCut(e)})),this.listenersToRemove.push(o.addListener(this.textArea,"copy",function(e){return l._onCopy(e)})),this.listenersToRemove.push(o.addListener(this.textArea,"paste",function(e){return l._onPaste(e)})),this.listenersToRemove.push(o.addListener(this.textArea,"contextmenu",function(){o.selectTextInInputElement(l.textArea),l.asyncSetSelectionToTextArea.cancel() })),this._writePlaceholderAndSelectTextArea(),this.context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this.context.removeEventHandler(this),this.listenersToRemove.forEach(function(e){e()}),this.listenersToRemove=[],this.kbController.dispose(),this.asyncReadFromTextArea.dispose(),this.asyncSetSelectionToTextArea.dispose(),this.asyncTriggerCut.dispose()},t.prototype.showTextAreaAtCursor=function(){var e,t,i;s.browser.isIE11orEarlier?(e=this.selection.startLineNumber,t=this.selection.startColumn,i=this.previousSetTextAreaState.getSelectionStart()+1):(e=this.cursorPosition.lineNumber,t=this.cursorPosition.column,i=t);var r={range:new n.Range(e,t,e,t),revealVerticalInCenter:!1,revealHorizontal:!0};this.context.privateViewEventBus.emit(a.EventNames.RevealRangeEvent,r);var u=this.viewHelper.visibleRangeForPositionRelativeToEditor(e,t),l=this.viewHelper.visibleRangeForPositionRelativeToEditor(e,i);s.browser.isIE11orEarlier?u&&l&&(this.textArea.style.top=u.top+"px",this.textArea.style.left=this.contentLeft+u.left-l.left-this.scrollLeft+"px",this.textArea.style.width=this.contentWidth+"px"):(u&&(this.textArea.style.left=this.contentLeft+u.left-this.scrollLeft+"px",this.textArea.style.top=u.top+"px"),this.setTextAreaState(new h("",0,0,0),!1)),this.textArea.style.height=this.context.configuration.editor.lineHeight+"px",o.addClass(this.viewHelper.viewDomNode,"ime-input")},t.prototype.hideTextArea=function(){this.textArea.style.height="",this.textArea.style.width="",this.textArea.style.left="0px",this.textArea.style.top="0px",o.removeClass(this.viewHelper.viewDomNode,"ime-input")},t.prototype.onScrollChanged=function(e){return this.scrollLeft=e.scrollLeft,!1},t.prototype.onViewFocusChanged=function(e){return this.hasFocus=e,this.hasFocus&&this.asyncSetSelectionToTextArea.schedule(),!1},t.prototype.onCursorSelectionChanged=function(e){return this.selection=e.selection,this.asyncSetSelectionToTextArea.schedule(),!1},t.prototype.onCursorPositionChanged=function(e){return this.cursorPosition=e.position,!1},t.prototype.onLayoutChanged=function(e){return this.contentLeft=e.contentLeft,this.contentWidth=e.contentWidth,!1},t.prototype.setTextAreaState=function(e,t){var n=t&&this.hasFocus&&!s.isTesting();n||e.resetSelection(),this.lastValueWrittenToTheTextArea=e.getValue(),e.applyToTextArea(this.textArea,n),this.previousSetTextAreaState=e},t.prototype._onKeyDown=function(e){this.viewController.emitKeyDown(e)},t.prototype._onKeyUp=function(e){this.viewController.emitKeyUp(e)},t.prototype._onKeyPress=function(e){if(this.hasFocus){if(s.browser.isOpera&&s.browser.isWindows){if("Ctrl-X"===e.asString())return this._onCut(null),void 0;if("Ctrl-V"===e.asString())return this._onPaste(null),void 0;if("Ctrl-C"===e.asString())return this._onCopy(null),void 0}this.lastKeyPressTime=(new Date).getTime(),s.browser.isIPad||this._scheduleReadFromTextArea(0)}},t.prototype._scheduleReadFromTextArea=function(e){var t=this;this.asyncSetSelectionToTextArea.cancel(),this.asyncReadFromTextArea.setRunner(function(){return t._readFromTextArea(e)}),this.asyncReadFromTextArea.schedule()},t.prototype._readFromTextArea=function(e){var t=this.previousSetTextAreaState?this.previousSetTextAreaState.getSelectionToken():0,n=h.fromTextArea(this.textArea,t),i=n.extractNewText(this.previousSetTextAreaState);""!==i&&(0===e?this.executeType(i):this.executePaste(i)),this.previousSetTextAreaState=n,this.asyncSetSelectionToTextArea.schedule()},t.prototype.executePaste=function(e){""!==e&&this.viewController.paste("keyboard",e,!1)},t.prototype.executeType=function(e){""!==e&&this.viewController.type("keyboard",e)},t.prototype._writePlaceholderAndSelectTextArea=function(){if(this.compositionCount<=0){var e=this.previousSetTextAreaState?this.previousSetTextAreaState.getSelectionToken():0,t=h.fromEditorSelectionAndPreviousState(this.context.model,this.selection,e);this.setTextAreaState(t,!0)}},t.prototype._onPaste=function(e){e&&e.clipboardData?(e.preventDefault(),this.executePaste(e.clipboardData.getData("text/plain"))):e&&window.clipboardData?(e.preventDefault(),this.executePaste(window.clipboardData.getData("Text"))):(this.textArea.selectionStart!==this.textArea.selectionEnd&&this.setTextAreaState(new h("",0,0,0),!1),this._scheduleReadFromTextArea(1)),this.justHadAPaste=!0},t.prototype._onCopy=function(e){this._ensureClipboardGetsEditorSelection(e)},t.prototype._triggerCut=function(){this.viewController.cut("keyboard")},t.prototype._onCut=function(e){this._ensureClipboardGetsEditorSelection(e),this.asyncTriggerCut.schedule(),this.justHadACut=!0},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._getPlainTextToCopy();e&&e.clipboardData?(e.clipboardData.setData("text/plain",t),e.preventDefault()):e&&window.clipboardData?(window.clipboardData.setData("Text",t),e.preventDefault()):this.setTextAreaState(new h(t,0,t.length,0),!0)},t.prototype._getPlainTextToCopy=function(){var e=s.browser.isWindows?"\r\n":"\n",t=s.browser.isWindows?2:1,i=this.context.model.getSelections();if(1===i.length){var r=this.selection;return r.isEmpty()?"":this.context.model.getValueInRange(r,t)}i=i.slice(0).sort(n.compareRangesUsingStarts);for(var o=[],a=0;an;n++){var s=t.targetTouches.item(n);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:t.timeStamp,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[t.timeStamp],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};var a=e.newGestureEvent(o.Start);a.pageX=s.pageX,a.pageY=s.pageY,this.targetElement.dispatchEvent(a)}},e.prototype.onTouchEnd=function(t){t.preventDefault(),t.stopPropagation();for(var i=Object.keys(this.activeTouches).length,r=0,s=t.changedTouches.length;s>r;r++){var a=t.changedTouches.item(r);if(this.activeTouches.hasOwnProperty(String(a.identifier))){var u=this.activeTouches[a.identifier],l=Date.now()-u.initialTimeStamp;if(l0?1:-1,d,Math.abs(g)/p,g>0?1:-1,h)}delete this.activeTouches[a.identifier]}else console.warn("move of an UNKNOWN touch",a)}},e.prototype.inertia=function(t,n,i,s,a,u,l){var c=this;this.handle=r.scheduleAtNextAnimationFrame(function(){var r=Date.now(),d=r-t,h=0,p=0,f=!0;n+=e.SCROLL_FRICTION*d,a+=e.SCROLL_FRICTION*d,n>0&&(f=!1,h=i*n*d),a>0&&(f=!1,p=u*a*d);var g=e.newGestureEvent(o.Change);g.translationX=h,g.translationY=p,c.targetElement.dispatchEvent(g),f||c.inertia(r,n,i,s+h,a,u,l+p)})},e.prototype.onTouchMove=function(t){t.preventDefault(),t.stopPropagation();for(var i=0,r=t.changedTouches.length;r>i;i++){var s=t.changedTouches.item(i);if(this.activeTouches.hasOwnProperty(String(s.identifier))){var a=this.activeTouches[s.identifier],u=e.newGestureEvent(o.Change);u.translationX=s.pageX-n.tail(a.rollingPageX),u.translationY=s.pageY-n.tail(a.rollingPageY),u.pageX=s.pageX,u.pageY=s.pageY,this.targetElement.dispatchEvent(u),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(s.pageX),a.rollingPageY.push(s.pageY),a.rollingTimestamps.push(t.timeStamp)}else console.warn("end of an UNKNOWN touch",s)}},e.HOLD_DELAY=2e3,e.SCROLL_FRICTION=-.005,e}();t.Gesture=s}),define("vs/editor/core/controller/mouseTarget",["require","exports","vs/editor/core/position","vs/editor/core/range","vs/editor/core/view/viewContext","vs/editor/editor"],function(e,t,n,i,r){var o=function(){function e(e,t,n,r,o){"undefined"==typeof n&&(n=null),"undefined"==typeof r&&(r=null),"undefined"==typeof o&&(o=null),this.element=e,this.type=t,this.position=n,!r&&n&&(r=new i.Range(n.lineNumber,n.column,n.lineNumber,n.column)),this.range=r,this.detail=o}return e.prototype._typeToString=function(){return 1===this.type?"TEXTAREA":2===this.type?"GUTTER_GLYPH_MARGIN":3===this.type?"GUTTER_LINE_NUMBERS":4===this.type?"GUTTER_LINE_DECORATIONS":5===this.type?"GUTTER_VIEW_ZONE":6===this.type?"CONTENT_TEXT":7===this.type?"CONTENT_EMPTY":8===this.type?"CONTENT_VIEW_ZONE":9===this.type?"CONTENT_WIDGET":10===this.type?"OVERVIEW_RULER":11===this.type?"SCROLLBAR":12===this.type?"OVERLAY_WIDGET":"UNKNOWN"},e.prototype.toString=function(){return this._typeToString()+": "+this.position+" - "+this.range+" - "+this.detail},e}(),s=function(){function e(e){return"[^/]*"+e+"[^/]*"}function t(){return"[^/]+"}function n(){for(var e=[],t=0;te&&t.afterLineNumber>0?(i=t.afterLineNumber,r=this.context.model.getLineMaxColumn(i)):(i=t.afterLineNumber+1,r=1);var a=new n.Position(i,r);return{viewZoneId:t.id,position:a}}return null},e.prototype._getFullLineRangeAtCoord=function(e){var t=this.viewHelper.getLineNumberAtVerticalOffset(e),n=this.context.model.getLineMaxColumn(t);return new i.Range(t,1,t,n)},e.prototype.createMouseTargetFromViewCursor=function(e,t,i){return new o(e,6,new n.Position(t,i))},e.prototype.createMouseTargetFromViewLines=function(e,t){var i=this._getZoneAtCoord(t);if(i)return new o(e,8,i.position,null,i.viewZoneId);var r=this.context.model.getLineCount(),s=this.context.model.getLineMaxColumn(r);return new o(e,7,new n.Position(r,s))},e.prototype.createMouseTargetFromHitTestPosition=function(e,t,r,s){var a=new n.Position(t,r),u=this.viewHelper.getLineWidth(t);if(s>u)return new o(e,7,a);var l=this.viewHelper.visibleRangeForPosition2(t,r).left;if(s===l)return new o(e,6,a);var c;if(r>1){var d=this.viewHelper.visibleRangeForPosition2(t,r).left;if(c=!1,c=c||s>d&&l>s,c=c||s>l&&d>s){var h=new i.Range(t,r,t,r-1);return new o(e,6,a,h)}}var p=this.context.model.getLineMaxColumn(t);if(p>r){var f=this.viewHelper.visibleRangeForPosition2(t,r+1);if(f){var g=this.viewHelper.visibleRangeForPosition2(t,r+1).left;if(c=!1,c=c||s>l&&g>s,c=c||s>g&&l>s){var h=new i.Range(t,r,t,r+1);return new o(e,6,a,h)}}}return new o(e,6,a)},e.prototype.createMouseTargetFromContentWidgetsChild=function(e){var t=this._findAttribute(e,"widgetId",this.viewHelper.viewDomNode);return t?new o(e,9,null,null,t):new o(e,0)},e.prototype.createMouseTargetFromOverlayWidgetsChild=function(e){var t=this._findAttribute(e,"widgetId",this.viewHelper.viewDomNode);return t?new o(e,12,null,null,t):new o(e,0)},e.prototype.createMouseTargetFromLinesDecorationsChild=function(e,t){var i=this._getZoneAtCoord(t);if(i)return new o(e,5,i.position,null,i.viewZoneId);var r=this._getFullLineRangeAtCoord(t);return new o(e,4,new n.Position(r.startLineNumber,1),r)},e.prototype.createMouseTargetFromLineNumbers=function(e,t){var i=this._getZoneAtCoord(t);if(i)return new o(e,5,i.position,null,i.viewZoneId);var r=this._getFullLineRangeAtCoord(t);return new o(e,3,new n.Position(r.startLineNumber,1),r)},e.prototype.createMouseTargetFromGlyphMargin=function(e,t){var i=this._getZoneAtCoord(t);if(i)return new o(e,5,i.position,null,i.viewZoneId);var r=this._getFullLineRangeAtCoord(t);return new o(e,2,new n.Position(r.startLineNumber,1),r)},e.prototype.createMouseTargetFromScrollbar=function(e){return new o(e,11)},e.prototype.createMouseTargetFromUnknownTarget=function(e){var t=this._isChild(e,this.viewHelper.viewDomNode,this.viewHelper.viewDomNode),n=null;return t&&(n=this._findAttribute(e,"widgetId",this.viewHelper.viewDomNode)),n?new o(e,12,null,null,n):new o(e,0)},e}();t.MouseTargetFactory=a}),define("vs/base/dom/globalMouseMoveMonitor",["require","exports","vs/base/lifecycle","vs/base/dom/dom","vs/base/dom/mouseEvent","vs/base/dom/iframe"],function(e,t,n,i,r,o){function s(e,t){var n=new r.StandardMouseEvent(t);return n.preventDefault(),{leftButton:n.leftButton,posx:n.posx,posy:n.posy}}t.standardMouseMoveMerger=s;var a=function(){function e(){this.hooks=[],this.mouseMoveEventMerger=null,this.mouseMoveCallback=null,this.onStopCallback=null}return e.prototype.dispose=function(){this.stopMonitoring(!1)},e.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=n.disposeAll(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t()}},e.prototype.isMonitoring=function(){return this.hooks.length>0},e.prototype.startMonitoring=function(e,t,n){var s=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var a=o.getSameOriginWindowChain(),u=0;ue.top+e.height?(n=this.viewHelper.getLineNumberAtVerticalOffset(this.viewHelper.getScrollTop()+(t.posy-e.top)),{lineNumber:n,column:this.context.model.getLineMaxColumn(n)}):(n=this.viewHelper.getLineNumberAtVerticalOffset(this.viewHelper.getScrollTop()+(t.posy-e.top)),t.posxe.left+e.width?{lineNumber:n,column:this.context.model.getLineMaxColumn(n)}:null)},t.prototype._updateMouse=function(e,n,r,s){"undefined"==typeof s&&(s=0),n=n||this.lastMouseEvent,this.lastMouseEvent=n;var a,u,l=o.getDomNodePosition(this.viewHelper.viewDomNode),c=this._getPositionOutsideEditor(l,n);if(c)a=c.lineNumber,u=c.column;else{var d=this.mouseTargetFactory.createMouseTarget(l,n,!0),h=d.position;if(!h)return;a=h.lineNumber,u=h.column}if(s){var p=(new Date).getTime();p-this.lastSetMouseDownCountTime>t.CLEAR_MOUSE_DOWN_COUNT_TIME&&(s=1),this.lastSetMouseDownCountTime=p,s>this.lastMouseDownCount+1&&(s=this.lastMouseDownCount+1);var f=new i.Position(a,u);this.lastMouseDownPosition&&this.lastMouseDownPosition.equals(f)?this.lastMouseDownPositionEqualCount++:this.lastMouseDownPositionEqualCount=1,this.lastMouseDownPosition=f,this.lastMouseDownCount=Math.min(s,this.lastMouseDownPositionEqualCount),n.detail=this.lastMouseDownCount}if(3===e)n.altKey?r?this.viewController.lastCursorLineSelect("mouse",a,u):this.viewController.createCursor("mouse",a,u,!0):r?this.viewController.lineSelectDrag("mouse",a,u):this.viewController.lineSelect("mouse",a,u);else if(this.lastMouseDownCount>=4)this.viewController.selectAll("mouse");else if(3===this.lastMouseDownCount)n.altKey?r?this.viewController.lastCursorLineSelectDrag("mouse",a,u):this.viewController.lastCursorLineSelect("mouse",a,u):r?this.viewController.lineSelectDrag("mouse",a,u):this.viewController.lineSelect("mouse",a,u);else if(2===this.lastMouseDownCount){var g="none",m=this.viewHelper.visibleRangeForPosition2(a,u);if(m){var v=l.left+m.left;n.posx>v?g="right":n.posx0){for(var e=0;e0){for(var e=0;et;t++)s[r[t].id.toString()]=r[t],a=!0;var u,l;for(u in i._zones)i._zones.hasOwnProperty(u)&&(l=i._zones[u],s.hasOwnProperty(u)?(l.delegate.domNode.style.top=e.getScrolledTopFromAbsoluteTop(s[u].verticalOffset)+"px",l.delegate.domNode.style.height=s[u].height+"px",l.isVisible||(l.delegate.domNode.style.display="block",l.isVisible=!0),n.isFunction(l.delegate.onDomNodeTop)&&l.delegate.onDomNodeTop(e.getScrolledTopFromAbsoluteTop(s[u].verticalOffset))):(l.isVisible&&(l.delegate.domNode.style.display="none",l.isVisible=!1),n.isFunction(l.delegate.onDomNodeTop)&&l.delegate.onDomNodeTop(e.getScrolledTopFromAbsoluteTop(-1e6))));a&&(i.domNode.style.width=e.scrollWidth+"px")})},t}(i.ViewPart);t.ViewZones=r}),define("vs/editor/core/view/lines/viewLineParts",["require","exports","vs/base/arrays"],function(e,t,n){function i(e,t,n){return n.length>0?new o(e,t,n):new r(t)}t.createLineParts=i;var r=function(){function e(e){this.lineTokens=e}return e.prototype.getParts=function(){return this.lineTokens.getTokens()},e.prototype.equals=function(t){if(t instanceof e){var n=t;return this.lineTokens.equals(n.lineTokens)}return!1},e.prototype.findIndexOfOffset=function(e){return this.lineTokens.findIndexOfOffset(e)},e}();t.FastViewLineParts=r;var o=function(){function e(e,t,n){for(var i,r,o,a=l.normalize(e,n),u=0,c=a.length,d=t.getTokens(),h=[],p=0,f=d.length;f>p;p++){for(i=d[p].startIndex,r=f>p+1?d[p+1].startIndex:t.getTextLength(),o=d[p].type;c>u&&a[u].startOffseti&&(h.push(new s(i,o)),i=a[u].startOffset),h.push(new s(i,o+" "+a[u].className)),a[u].endOffset>=r){i=r;break}i=a[u].endOffset+1,u++}r>i&&h.push(new s(i,o))}this.parts=h,this.lastPartIndex=h.length-1,this.lastEndOffset=r}return e.prototype.getParts=function(){return this.parts},e.prototype.equals=function(t){if(t instanceof e){var n=t;if(this.lastPartIndex!==n.lastPartIndex)return!1;if(this.lastEndOffset!==n.lastEndOffset)return!1;for(var i=0,r=this.parts.length;r>i;i++){if(this.parts[i].startIndex!==n.parts[i].startIndex)return!1;if(this.parts[i].type!==n.parts[i].type)return!1}return!0}return!1},e.prototype.findIndexOfOffset=function(e){return n.findIndexInSegmentsArray(this.parts,e)},e}();t.ViewLineParts=o;var s=function(){function e(e,t){this.startIndex=e,this.type=t}return e}(),a=function(){function e(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n}return e}();t.DecorationSegment=a;var u=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]0&&e>t&&(n.push(new a(t,e-1,this.classNames.join(" "))),t=e),t},e.prototype.insert=function(e,t){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t);else for(var n=0;n=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),l=function(){function e(){}return e.normalize=function(t,n){var i=[];if(0===n.length)return i;var r,o,s,a,l,c=new u,d=0;for(a=0,l=n.length;l>a;a++)r=n[a],r.range.endLineNumbert||(o=r.range.startLineNumber===t?r.range.startColumn-1:0,s=r.range.endLineNumber===t?r.range.endColumn-2:e.MAX_LINE_LENGTH-1,0>s||(d=c.consumeLowerThan(o,d,i),0===c.count&&(d=o),c.insert(s,r.options.inlineClassName)));return c.consumeLowerThan(e.MAX_LINE_LENGTH,d,i),i},e.MAX_LINE_LENGTH=1e7,e}();t.LineDecorationsNormalizer=l});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/lines/viewLine",["require","exports","vs/base/env","vs/editor/core/view/viewContext","vs/editor/core/view/lines/viewLineParts"],function(e,t,n,i,r){function o(e,t){return e.top===t.top?e.left-t.left:e.top-t.top}function s(e,t,n){var i=e.findIndexOfOffset(t);return n>=i?i:n}function a(e){return window.screen&&window.screen.deviceXDPI&&(navigator.userAgent.indexOf("Trident/6.0")>=0||navigator.userAgent.indexOf("Trident/5.0")>=0)?new d(e):n.browser.isWebKit?new h(e):new c(e)}function u(e){var t=e.lineContent,n={charOffsetInPart:[],hasOverflowed:!1,lastRenderedPartIndex:0,partsCount:0,output:[]},i=0;if(n.output.push(""),t.length>0){var r,o,s,a,u=t.length,l=-1,c=0,d=0,h=0,p="",b=e.tabSize,C=e.stopRenderingLineAfter,w=e.parts;for(-1!==C&&u>C-1&&(p=t.substr(C-1,1),u=C-1,n.hasOverflowed=!0),o=0;u>o;o++){switch(o===c&&(l++,c=l+10&&n.output.push(""),i++,n.output.push(''),h=0),n.charOffsetInPart[o]=h,r=t.charCodeAt(o)){case g:for(a=b-(o+d)%b,d+=a-1,h+=a-1;a>0;)n.output.push(" "),a--;break;case f:n.output.push(" ");break;case m:n.output.push("<");break;case v:n.output.push(">");break;case y:n.output.push("&");break;case 0:n.output.push("�");break;case _:n.output.push("​");break;default:n.output.push(t.charAt(o))}h++}n.output.push(""),n.charOffsetInPart[u]=h,n.lastRenderedPartIndex=l,p.length>0&&(n.output.push(''),n.output.push(p),n.output.push("…"))}else n.output.push(" ");return n.output.push("
        "),n.partsCount=i,n}var l=function(){function e(e,t,n,i){this.top=e,this.left=t,this.width=n,this.height=i}return e}(),c=function(){function e(e){this._context=e,this._domNode=document.createElement("div"),this._domNode.className=i.ClassNames.VIEW_LINE,this._domNode.style.height=this._context.configuration.editor.lineHeight+"px",this._isInvalid=!0,this._isMaybeInvalid=!1,this._lineParts=null,this._cachedInnerHTML=null,this._charOffsetInPart=[],this._hasOverflowed=!1,this._lastRenderedPartIndex=0}return e.prototype.getDomNode=function(){return this._domNode},e.prototype.setDomNode=function(e){this._domNode=e},e.prototype.onContentChanged=function(){this._isInvalid=!0},e.prototype.onLinesInsertedAbove=function(){this._isMaybeInvalid=!0},e.prototype.onLinesDeletedAbove=function(){this._isMaybeInvalid=!0},e.prototype.onLineChangedAbove=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onModelDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onConfigurationChanged=function(){this._isInvalid=!0},e.prototype.shouldUpdateHTML=function(e){var t=null;return(this._isMaybeInvalid||this._isInvalid)&&(t=this._computeLineParts(e)),this._isMaybeInvalid&&(this._isInvalid||this._lineParts&&this._lineParts.equals(t)||(this._isInvalid=!0),this._isMaybeInvalid=!1),this._isInvalid&&(this._lineParts=t),this._isInvalid},e.prototype.getLineOuterHTML=function(e,t){var n=[];return n.push('
        '),n=n.concat(this._getLineInnerHTML(e)),n.push("
        "),n},e.prototype.getLineStatistics=function(){return{partsCount:this._partsCount,charactersCount:this._charOffsetInPart.length}},e.prototype._getLineInnerHTML=function(e){return this._isInvalid&&(this._cachedInnerHTML=this._renderMyLine(e,this._lineParts),this._isInvalid=!1),this._cachedInnerHTML},e.prototype.layoutLine=function(e,t){var n=this._domNode.getAttribute("lineNumber");n!==e.toString()&&this._domNode.setAttribute("lineNumber",e.toString());var i=this._domNode.style.top;i!==t+"px"&&(this._domNode.style.top=t+"px");var r=this._domNode.style.height;r!==this._context.configuration.editor.lineHeight+"px"&&(this._domNode.style.height=this._context.configuration.editor.lineHeight+"px")},e.prototype._computeLineParts=function(e){return r.createLineParts(e,this._context.model.getLineTokens(e),this._context.model.getInlineDecorations(e))},e.prototype._renderMyLine=function(e,n){this._bustReadingCache();var i=t.renderLine({lineContent:this._context.model.getLineContent(e),tabSize:this._context.configuration.getIndentationOptions().tabSize,stopRenderingLineAfter:this._context.configuration.editor.stopRenderingLineAfter,parts:n.getParts()});return this._charOffsetInPart=i.charOffsetInPart,this._hasOverflowed=i.hasOverflowed,this._lastRenderedPartIndex=i.lastRenderedPartIndex,this._partsCount=i.partsCount,i.output},e.prototype._getReadingTarget=function(){return this._domNode.firstChild},e.prototype._bustReadingCache=function(){this._cachedWidth=-1},e.prototype.getHeight=function(){return this._domNode.offsetHeight},e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n,i,r,o){var s=this._context.configuration.editor.stopRenderingLineAfter;return-1!==s&&t>s&&n>s?null:(-1!==s&&t>s&&(t=s),-1!==s&&n>s&&(n=s),this._readVisibleRangesForRange(e,t,n,i,r,o))},e.prototype._readVisibleRangesForRange=function(e,t,n,i,r,s){var a;if(a=t===n?this._readRawVisibleRangesForPosition(e,t,i,r,s):this._readRawVisibleRangesForRange(e,t,n,i,r,s),!a||a.length<=1)return a;a.sort(o);for(var u,l=[],c=a[0],d=1,h=a.length;h>d;d++)u=a[d],c.left+c.width+.001>=u.left?c.width=Math.max(c.width,u.left+u.width-c.left):(l.push(c),c=u);return l.push(c),l},e.prototype._readRawVisibleRangesForPosition=function(e,t,n,i,r){if(0===this._charOffsetInPart.length){var o=this._readRawVisibleRangesForEntireLine(n,i);return o[0].width=0,o}var a=s(this._lineParts,t-1,this._lastRenderedPartIndex),u=this._charOffsetInPart[t-1];return this._readRawVisibleRangesFrom(this._getReadingTarget(),a,u,a,u,n,i,r)},e.prototype._readRawVisibleRangesForRange=function(e,t,n,i,r,o){if(1===t&&n===this._charOffsetInPart.length)return this._readRawVisibleRangesForEntireLine(i,r);var a=s(this._lineParts,t-1,this._lastRenderedPartIndex),u=this._charOffsetInPart[t-1],l=s(this._lineParts,n-1,this._lastRenderedPartIndex),c=this._charOffsetInPart[n-1];return this._readRawVisibleRangesFrom(this._getReadingTarget(),a,u,l,c,i,r,o)},e.prototype._readRawVisibleRangesForEntireLine=function(e){var t=this._domNode.getBoundingClientRect();return[new l(t.top-e,0,this._getReadingTarget().offsetWidth,t.height)]},e.prototype._readRawVisibleRangesFrom=function(e,t,n,i,r,o,s,a){var u=p.createRange();u.setStart(e.children[t].firstChild,n),u.setEnd(e.children[i].firstChild,r);var l=u.getClientRects(),c=null;return l.length>0&&(c=this._createRawVisibleRangesFromClientRects(l,o,s)),p.detachRange(u,a),c},e.prototype._createRawVisibleRangesFromClientRects=function(e,t,n){var i,r,o=e.length,s=[];for(r=0;o>r;r++)i=e[r],s.push(new l(i.top-t,Math.max(0,i.left-n),i.width,i.height));return s},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=-1;t;)t=t.previousSibling,i++;var r=this._lineParts.getParts();if(i>=r.length)return this._context.configuration.editor.stopRenderingLineAfter;if(0===n)return r[i].startIndex+1;var o,s,a=r[i].startIndex;i+1l;){if(u=Math.floor((l+c)/2),d=this._charOffsetInPart[u],h=u===o?Number.MAX_VALUE:u+1===o?s:this._charOffsetInPart[u+1],p=u===a?Number.MIN_VALUE:this._charOffsetInPart[u-1],f=(p+d)/2,g=(d+h)/2,n>f&&g>=n)return u+1;f>=n?c=u-1:l=u+1}return l+1},e}(),d=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype._createRawVisibleRangesFromClientRects=function(e,t,n){var i,r,o=e.length,s=[],a=screen.logicalYDPI/screen.deviceYDPI,u=screen.logicalXDPI/screen.deviceXDPI;for(s=new Array(o),r=0;o>r;r++)i=e[r],s[r]=new l(i.top*a-t,Math.max(0,i.left*u-n),i.width*u,i.height*a);return s},t}(c),h=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i,r,o,s){var a=e.prototype._readVisibleRangesForRange.call(this,t,n,i,r,o,s);if(!a||0===a.length||n===i||1===n&&i===this._charOffsetInPart.length)return a;var u=this._readRawVisibleRangesForPosition(t,i-1,r,o,s),l=this._readRawVisibleRangesForPosition(t,i,r,o,s);if(u&&u.length>0&&l&&l.length>0){var c=u[0],d=l[0],h=!0;c.top===d.top&&(h=c.left<=d.left);var p=a[a.length-1];h&&p.top===d.top&&p.leftd.top&&a.splice(a.length-1,1)}return a},t}(c),p=function(){function e(){}return e.createRange=function(){return e._handyReadyRange||(e._handyReadyRange=document.createRange()),e._handyReadyRange},e.detachRange=function(e,t){e.selectNodeContents(t)},e}();t.createLine=a;var f=" ".charCodeAt(0),g=" ".charCodeAt(0),m="<".charCodeAt(0),v=">".charCodeAt(0),y="&".charCodeAt(0),_="\r".charCodeAt(0);t.renderLine=u});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/lines/viewLayer",["require","exports","vs/base/dom/dom","vs/editor/core/view/viewEventHandler"],function(e,t,n,i){var r=function(e){function t(t,n){var i=this;e.call(this),this._context=t,this._layoutProvider=n,this.domNode=this._createDomNode(),this._guardElement=this._createGuard(),this.domNode.appendChild(this._guardElement),this._lines=[],this._rendLineNumberStart=1,this._renderer=new o(function(){return i._createLine()})}return __extends(t,e),t.prototype.dispose=function(){this._context=null,this._layoutProvider=null,this._lines=null},t.prototype.onConfigurationChanged=function(e){for(var t=0;t=n){for(t=n;i>=t;t++)this.domNode.removeChild(this._lines[t].getDomNode());this._lines.splice(n,i-n+1)}for(t=n;t=0&&t=this._rendLineNumberStart+this._lines.length)return!1;var n=Math.min(e.fromLineNumber-this._rendLineNumberStart,this._lines.length-1),i=Math.min(e.toLineNumber-this._rendLineNumberStart,this._lines.length-1);if(i>=n){var r=this._lines[n].getDomNode();for(t=n;i>=t;t++){var o=this._createLine();this.domNode.insertBefore(o.getDomNode(),r),this._lines.splice(t,0,o)}for(var s=i-n+1,t=this._lines.length-s;tn||t>=this._lines.length)return!1;for(var i=Math.min(Math.max(t,0),this._lines.length-1),r=Math.min(Math.max(n,0),this._lines.length-1),o=!1,s=i;r>=s;s++)o=!0,this._lines[s].onTokensChanged();return o},t.prototype._renderLines=function(e,t){var n={domNode:this.domNode,guardElement:this._guardElement,rendLineNumberStart:this._rendLineNumberStart,lines:this._lines,linesLength:this._lines.length,frameData:t},i=this._renderer.renderWithManyUpdates(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._guardElement=i.guardElement,this._rendLineNumberStart=i.rendLineNumberStart,this._lines=i.lines},t.prototype._createDomNode=function(){var e=document.createElement("div");return e.className="view-layer",e.style.position="absolute",e.style.width="1000000px",e.style.height="1000000px",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),e},t.prototype._createGuard=function(){return document.createElement("div")},t.prototype._createLine=function(){throw new Error("Implement me!")},t}(i.ViewEventHandler);t.ViewLayer=r;var o=function(){function e(e){this._createLine=e}return e.prototype.renderWithManyUpdates=function(e,t,n,i){return this._render(e,t,n,i)},e.prototype._render=function(e,t,n,i){var r={domNode:e.domNode,guardElement:e.guardElement,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength,frameData:e.frameData};this._renderUntouchedLines(r,Math.max(t-r.rendLineNumberStart,0),Math.min(n-r.rendLineNumberStart,r.linesLength-1),i,t);var o,s,a;return r.rendLineNumberStart>t?(o=t,s=Math.min(n,r.rendLineNumberStart-1),s>=o&&(this._insertLinesBefore(r,o,s,i,t),r.linesLength+=s-o+1)):r.rendLineNumberStart0&&(this._removeLinesBefore(r,a),r.linesLength-=a)),r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1=o&&(this._insertLinesAfter(r,o,s,i,t),r.linesLength+=s-o+1)):r.rendLineNumberStart+r.linesLength-1>n&&(o=Math.max(0,n-r.rendLineNumberStart+1),s=r.linesLength-1,a=s-o+1,a>0&&(this._removeLinesAfter(r,a),r.linesLength-=a)),this._finishRendering(r,i),r},e.prototype._renderUntouchedLines=function(e,t,n,i,r){var o,s;for(o=t;n>=o;o++)s=e.rendLineNumberStart+o,e.lines[o].layoutLine(s,i[s-r])},e.prototype._insertLinesBefore=function(e,t,n){var i,r,o=e.linesLength>0?e.lines[0].getDomNode():e.guardElement,s=[];for(r=t;n>=r;r++)i=this._createLine(),s.push(i),e.domNode.insertBefore(i.getDomNode(),o);e.lines=s.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){var n;for(n=0;t>n;n++)e.domNode.removeChild(e.lines[n].getDomNode());e.lines.splice(0,t)},e.prototype._insertLinesAfter=function(e,t,n){var i,r,o=e.guardElement,s=[];for(r=t;n>=r;r++)i=this._createLine(),s.push(i),e.domNode.insertBefore(i.getDomNode(),o);e.lines=e.lines.concat(s)},e.prototype._removeLinesAfter=function(e,t){var n,i=e.linesLength-t;for(n=0;t>n;n++)e.domNode.removeChild(e.lines[i+n].getDomNode());e.lines.splice(i,t)},e.prototype._finishRendering=function(e,t){var n,i,r,o=!1,s=[],a=[],u=0,l=0,c=0,d=0,h=0,p=0;for(n=0;ni||i>=this._lines.length)return null;var r=this._lines[i].getColumnOfNodeOffset(n,e,t);return{lineNumber:n,column:r}},t.prototype._getLineNumberFromDOMInfo=function(e){for(;e&&1===e.nodeType;){if(e.className===r.ClassNames.VIEW_LINE)return parseInt(e.getAttribute("lineNumber"),10);e=e.parentElement}return-1},t.prototype.getLineWidth=function(e){var t=e-this._rendLineNumberStart;return 0>t||t>=this._lines.length?-1:this._lines[t].getWidth()},t.prototype.visibleRangesForRange2=function(e,n,i){if(this.shouldRender)return null;var r=e.endLineNumber;if(e=o.intersectRanges(e,this._currentVisibleRange),!e)return null;var s,a,u,l,c,d,h,p=[],f=this._context.configuration.editor.lineHeight,g=this.domNode.getBoundingClientRect(),m=g.top,v=g.left;for(i&&(h=this._context.model.convertViewPositionToModelPosition(e.startLineNumber,1).lineNumber),a=e.startLineNumber;a<=e.endLineNumber;a++)if(u=a-this._rendLineNumberStart,!(0>u||u>=this._lines.length)&&(l=a===e.startLineNumber?e.startColumn:1,c=a===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(a),s=this._lines[u].getVisibleRangesForRange(a,l,c,m,v,this._guardElement),s&&s.length>0)){for(var y=0,_=s.length;_>y;y++)s[y].top=(s[y].top/f+.5|0)*f+n,s[y].height=f;i&&r>a&&(d=h,h=this._context.model.convertViewPositionToModelPosition(a+1,1).lineNumber,d!==h&&(s[s.length-1].width+=t.LINE_FEED_WIDTH)),p=p.concat(s)}return 0===p.length?null:p},t.prototype._createLine=function(){return n.createLine(this._context)},t.prototype._renderAndUpdateLineHeights=function(t,n){e.prototype._renderLines.call(this,t,n),this._currentVisibleRange=new o.Range(0+this._rendLineNumberStart,1,this._lines.length-1+this._rendLineNumberStart,this._context.model.getLineMaxColumn(this._lines.length-1+this._rendLineNumberStart));var i=t.visibleRangesDeltaTop+"px";if(this.domNode.style.top!==i&&(this.domNode.style.top=i),this._lastCursorRevealRangeHorizontallyEvent){var r=this._computeScrollLeftToRevealRange(this._lastCursorRevealRangeHorizontallyEvent.range);this._lastCursorRevealRangeHorizontallyEvent=null;var s=this._context.configuration.getWrappingColumn(),a=0===s;a||this._ensureMaxLineWidth(r.maxHorizontalOffset),this._layoutProvider.setScrollLeft(r.scrollLeft)}},t.prototype._updateLineWidths=function(){var e,t,n=1;for(e=0;eu&&(u=c.left+c.width);n=u,a=Math.max(0,a-t.HORIZONTAL_EXTRA_PX),u+=this._context.configuration.editor.revealHorizontalRightPadding;var d=this._computeMinimumScrolling(r,o,a,u);return{scrollLeft:d,maxHorizontalOffset:n}},t.prototype._computeMinimumScrolling=function(e,t,n,i){var r=t-e,o=i-n;return r>o?e>n?n:i>t?Math.max(0,i-r):e:n},t.LINE_FEED_WIDTH=10,t.HORIZONTAL_EXTRA_PX=30,t}(i.ViewLayer);t.ViewLines=a}),define("vs/editor/core/view/parts/overviewRuler/overviewRulerImpl",["require","exports","vs/editor/editor"],function(e,t){t.hasCanvas=-1===window.navigator.userAgent.indexOf("MSIE 8");var n=function(){function e(e,t,n,i,r,o,s){this._canvasLeftOffset=e,this._minimumHeight=r,this._maximumHeight=o,this._getVerticalOffsetForLine=s,this._zones=[],this._domNode=document.createElement("canvas"),this._domNode.className=t,this._domNode.style.position="absolute",this._width=0,this._height=0,this._outerHeight=n,this._lineHeight=i,this._lanesCount=3}return e.prototype.dispose=function(){this._zones=[]},e.prototype.setLayout=function(e,t){this._domNode.style.top=e.top+"px",this._domNode.style.right=e.right+"px",(this._width!==e.width||this._height!==e.height)&&(this._width=e.width,this._height=e.height,this._domNode.width=this._width,this._domNode.height=this._height,t&&this.render())},e.prototype.getLanesCount=function(){return this._lanesCount},e.prototype.setLanesCount=function(e,t){this._lanesCount=e,t&&this.render() },e.prototype.getDomNode=function(){return this._domNode},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.setScrollHeight=function(e,t){this._outerHeight=e,t&&this.render()},e.prototype.setLineHeight=function(e,t){this._lineHeight=e,t&&this.render()},e.prototype.setZones=function(e,t){this._zones=e,t&&this.render()},e.prototype._insertZone=function(e,t,n,i,r,o){var s=Math.floor((t+n)/2),a=n-s;a>r/2&&(a=r/2),i/2>a&&(a=i/2),0>s-a&&(s=a),s+a>this._height&&(s=this._height-a),e[o]=e[o]||[],e[o].push({from:s-a,to:s+a})},e.prototype._renderVerticalPatch=function(e,t,n,i,r){var o,s,a,u,l,c,d,h={};for(o=0,s=this._zones.length;s>o;o++)if(a=this._zones[o],a.position&n)if(u=this._getVerticalOffsetForLine(a.startLineNumber),l=this._getVerticalOffsetForLine(a.endLineNumber)+this._lineHeight,u*=t,l*=t,a.forceHeight)l=u+a.forceHeight,this._insertZone(h,u,l,a.forceHeight,a.forceHeight,a.color);else if(c=a.endLineNumber-a.startLineNumber+1,d=c*this._maximumHeight,l-u>d)for(var p=a.startLineNumber;p<=a.endLineNumber;p++)u=this._getVerticalOffsetForLine(p),l=u+this._lineHeight,u*=t,l*=t,this._insertZone(h,u,l,this._minimumHeight,this._maximumHeight,a.color);else this._insertZone(h,u,l,this._minimumHeight,d,a.color);var f,g,m,v,y=function(e,t){return e.from-t.from};for(f in h)if(h.hasOwnProperty(f)){for(g=h[f],g.sort(y),m=g[0].from,v=g[0].to,e.fillStyle=f,o=1,s=g.length;s>o;o++)v>=g[o].from?v=Math.max(v,g[o].to):(e.fillRect(i,m,r,v-m),m=g[o].from,v=g[o].to);e.fillRect(i,m,r,v-m)}},e.prototype.render=function(){if(0!==this._outerHeight&&t.hasCanvas){var e=this._height/this._outerHeight,n=this._domNode.getContext("2d");n.clearRect(0,0,this._width,this._height);var i=this._width-this._canvasLeftOffset-1;this._lanesCount>=3?this._renderThreeLanes(n,e,i):2===this._lanesCount?this._renderTwoLanes(n,e,i):1===this._lanesCount&&this._renderOneLane(n,e,i)}},e.prototype._renderOneLane=function(e,t,n){this._renderVerticalPatch(e,t,7,this._canvasLeftOffset,n)},e.prototype._renderTwoLanes=function(e,t,n){var i=Math.floor(n/2),r=n-i,o=this._canvasLeftOffset,s=this._canvasLeftOffset+i;this._renderVerticalPatch(e,t,3,o,i),this._renderVerticalPatch(e,t,4,s,r)},e.prototype._renderThreeLanes=function(e,t,n){var i=Math.floor(n/3),r=Math.floor(n/3),o=n-i-r,s=this._canvasLeftOffset,a=this._canvasLeftOffset+i,u=this._canvasLeftOffset+i+o;this._renderVerticalPatch(e,t,1,s,i),this._renderVerticalPatch(e,t,2,a,o),this._renderVerticalPatch(e,t,4,u,r)},e}();t.OverviewRulerImpl=n});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/parts/overviewRuler/overviewRuler",["require","exports","vs/editor/core/view/parts/overviewRuler/overviewRulerImpl","vs/editor/core/view/viewEventHandler"],function(e,t,n,i){var r=function(e){function t(t,i,r,o,s,a){e.call(this),this._context=t,this._overviewRuler=new n.OverviewRulerImpl(0,i,r,this._context.configuration.editor.lineHeight,o,s,a),this._context.addEventHandler(this)}return __extends(t,e),t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._overviewRuler.dispose()},t.prototype.onConfigurationChanged=function(e){return e.lineHeight?(this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight,!0),!0):!1},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelFlushed=function(){return!0},t.prototype.onScrollHeightChanged=function(e){return this._overviewRuler.setScrollHeight(e,!0),!0},t.prototype.getDomNode=function(){return this._overviewRuler.getDomNode()},t.prototype.setLayout=function(e){this._overviewRuler.setLayout(e,!0)},t.prototype.setZones=function(e){this._overviewRuler.setZones(e,!0)},t}(i.ViewEventHandler);t.OverviewRuler=r});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/parts/overviewRuler/decorationsOverviewRuler",["require","exports","vs/editor/core/view/parts/overviewRuler/overviewRulerImpl","vs/editor/editor","vs/editor/core/view/viewPart"],function(e,t,n,i,r){var o=function(e){function t(i,r,o){e.call(this,i),this._overviewRuler=new n.OverviewRulerImpl(1,"decorationsOverviewRuler",r,this._context.configuration.editor.lineHeight,t.DECORATION_HEIGHT,t.DECORATION_HEIGHT,o),this._overviewRuler.setLanesCount(this._context.configuration.editor.overviewRulerLanes,!1),this._shouldUpdateDecorations=!0,this._zonesFromDecorations=[],this._shouldUpdateCursorPosition=!0,this._hideCursor=this._context.configuration.editor.hideCursorInOverviewRuler,this._zonesFromCursors=[],this._cursorPositions=[]}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._overviewRuler.dispose()},t.prototype.onCursorPositionChanged=function(e){return this._shouldUpdateCursorPosition=!0,this._cursorPositions=[e.position],this._cursorPositions=this._cursorPositions.concat(e.secondaryPositions),!0},t.prototype.onConfigurationChanged=function(e){var t=this._overviewRuler.getLanesCount(),n=this._context.configuration.editor.overviewRulerLanes,i=!1;return e.lineHeight&&(this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight,!1),i=!0),t!==n&&(this._overviewRuler.setLanesCount(n,!1),i=!0),e.hideCursorInOverviewRuler&&(this._hideCursor=this._context.configuration.editor.hideCursorInOverviewRuler,this._shouldUpdateCursorPosition=!0,i=!0),i},t.prototype.onLayoutChanged=function(e){var t=this;return this._requestModificationFrame(function(){t._overviewRuler.setLayout(e.overviewRuler,!1)}),!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(){return this._shouldUpdateDecorations=!0,!0},t.prototype.onScrollHeightChanged=function(e){return this._overviewRuler.setScrollHeight(e,!1),!0},t.prototype.getDomNode=function(){return this._overviewRuler.getDomNode()},t.prototype._createZonesFromDecorations=function(){var e,t,n,i=this._context.model.getAllDecorations(),r=[];for(e=0,t=i.length;t>e;e++)n=i[e],n.options.overviewRuler.color&&r.push({startLineNumber:n.range.startLineNumber,endLineNumber:n.range.endLineNumber,color:n.options.overviewRuler.color,position:n.options.overviewRuler.position});return r},t.prototype._createZonesFromCursors=function(){var e,t,n,r=[];for(e=0,t=this._cursorPositions.length;t>e;e++)n=this._cursorPositions[e],r.push({forceHeight:2,startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,color:"rgba(0, 0, 102, 0.8)",position:i.OverviewRulerLane.Full});return r},t.prototype._render=function(){var e=this;if(this._shouldUpdateDecorations||this._shouldUpdateCursorPosition){this._shouldUpdateDecorations&&(this._shouldUpdateDecorations=!1,this._zonesFromDecorations=this._createZonesFromDecorations()),this._shouldUpdateCursorPosition&&(this._shouldUpdateCursorPosition=!1,this._zonesFromCursors=this._hideCursor?[]:this._createZonesFromCursors());var t=[];t=t.concat(this._zonesFromDecorations),t=t.concat(this._zonesFromCursors),this._overviewRuler.setZones(t,!1),this._requestModificationFrame(function(){if(e._overviewRuler.render(),n.hasCanvas&&e._overviewRuler.getLanesCount()>0&&(e._zonesFromDecorations.length>0||e._zonesFromCursors.length>0)){var t=e._overviewRuler.getDomNode().getContext("2d");t.beginPath(),t.lineWidth=1,t.strokeStyle="rgba(197,197,197,0.4)",t.rect(0,0,e._overviewRuler.getWidth(),e._overviewRuler.getHeight()),t.stroke()}})}},t.DECORATION_HEIGHT=6,t}(r.ViewPart);t.DecorationsOverviewRuler=o}),define("vs/editor/core/view/parts/viewCursors/viewCursor",["require","exports"],function(e,t){var n=function(){function e(e,t){this._context=e,this._isInEditableRange=!0,this._domNode=this._createCursorDomNode(t),this._isVisible=!0,this.updatePosition({lineNumber:1,column:1})}return e.prototype._createCursorDomNode=function(e){var t=document.createElement("div");return t.className="cursor",e&&(t.className+=" secondary"),t.style.height=this._context.configuration.editor.lineHeight+"px",t.style.top="0px",t.style.left="0px",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getIsInEditableRange=function(){return this._isInEditableRange},e.prototype.getPositionTop=function(){return this._positionTop},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.style.display="block",this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.style.display="none",this._isVisible=!1)},e.prototype.onModelFlushed=function(){return this.updatePosition({lineNumber:1,column:1}),this._isInEditableRange=!0,!0},e.prototype.onCursorPositionChanged=function(e,t){return this.updatePosition(e),this._isInEditableRange=t,!0},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._domNode.style.height=this._context.configuration.editor.lineHeight+"px"),!0},e.prototype.prepareRender=function(e){var t=e.visibleRangeForPosition(this._position);t?(this._positionTop=t.top,this._positionLeft=t.left):this._positionTop=-1e3},e.prototype.render=function(){this._domNode.style.left=this._positionLeft+"px",this._domNode.style.top=this._positionTop+"px"},e.prototype.updatePosition=function(e){this._position=e,this._domNode.setAttribute("lineNumber",this._position.lineNumber.toString()),this._domNode.setAttribute("column",this._position.column.toString()),this._positionTop=-1e3,this._positionLeft=-1e3},e}();t.ViewCursor=n}),define("vs/css!vs/editor/core/view/parts/viewCursors/viewCursors",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/parts/viewCursors/viewCursors",["require","exports","vs/editor/core/view/parts/viewCursors/viewCursor","vs/editor/core/view/viewPart","vs/css!./viewCursors"],function(e,t,n,i){var r;!function(e){e[e.Hidden=0]="Hidden",e[e.Visible=1]="Visible",e[e.Blink=2]="Blink"}(r||(r={}));var o=function(e){function t(t){e.call(this,t),this._primaryCursor=new n.ViewCursor(this._context,!1),this._secondaryCursors=[],this._domNode=document.createElement("div"),this._domNode.className="cursors-layer",this._domNode.appendChild(this._primaryCursor.getDomNode()),this._blinkTimer=-1,this._editorHasFocus=!1,this._updateBlinking()}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),-1!==this._blinkTimer&&(window.clearInterval(this._blinkTimer),this._blinkTimer=-1)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onModelFlushed=function(){this._primaryCursor.onModelFlushed();for(var e=0,t=this._secondaryCursors.length;t>e;e++){var n=this._secondaryCursors[e].getDomNode();n.parentNode.removeChild(n)}return this._secondaryCursors=[],!0},t.prototype.onModelDecorationsChanged=function(){return!0},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLineChanged=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype.onModelTokensChanged=function(e){var t=function(t){return e.fromLineNumber<=t.lineNumber&&t.lineNumber<=e.toLineNumber};if(t(this._primaryCursor.getPosition()))return!0;for(var n=0;ni;i++){var r=new n.ViewCursor(this._context,!0);this._primaryCursor.getDomNode().parentNode.insertBefore(r.getDomNode(),this._primaryCursor.getDomNode().nextSibling),this._secondaryCursors.push(r)}else if(this._secondaryCursors.length>e.secondaryPositions.length)for(var o=this._secondaryCursors.length-e.secondaryPositions.length,i=0;o>i;i++)this._secondaryCursors[0].getDomNode().parentNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1);for(var i=0;it;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0},t.prototype.onLayoutChanged=function(){return!0},t.prototype.onScrollChanged=function(){return!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!0},t.prototype.onScrollHeightChanged=function(){return!1},t.prototype.onViewFocusChanged=function(e){return this._editorHasFocus=e,this._updateBlinking(),!1},t.prototype.getPosition=function(){return this._primaryCursor.getPosition()},t.prototype._getRenderType=function(){return this._editorHasFocus?this._primaryCursor.getIsInEditableRange()&&!this._context.configuration.editor.readOnly?2:1:0},t.prototype._updateBlinking=function(){var e=this;-1!==this._blinkTimer&&(window.clearInterval(this._blinkTimer),this._blinkTimer=-1);var n=this._getRenderType();1===n||2===n?this._show():this._hide(),2===n&&(this._blinkTimer=window.setInterval(function(){return e._blink()},t.BLINK_INTERVAL))},t.prototype._blink=function(){this._isVisible?this._hide():this._show()},t.prototype._show=function(){this._primaryCursor.show();for(var e=0,t=this._secondaryCursors.length;t>e;e++)this._secondaryCursors[e].show();this._isVisible=!0},t.prototype._hide=function(){this._primaryCursor.hide();for(var e=0,t=this._secondaryCursors.length;t>e;e++)this._secondaryCursors[e].hide();this._isVisible=!1},t.prototype._render=function(e){var t=this;this._primaryCursor.prepareRender(e);for(var n=0,i=this._secondaryCursors.length;i>n;n++)this._secondaryCursors[n].prepareRender(e);this._requestModificationFrame(function(){t._primaryCursor.render(e);for(var n=0,i=t._secondaryCursors.length;i>n;n++)t._secondaryCursors[n].render(e)})},t.BLINK_INTERVAL=500,t}(i.ViewPart);t.ViewCursors=o}),define("vs/css!vs/editor/core/view/parts/contentWidgets/contentWidgets",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/parts/contentWidgets/contentWidgets",["require","exports","vs/editor/core/view/viewContext","vs/editor/editor","vs/editor/core/view/viewPart","vs/css!./contentWidgets"],function(e,t,n,i,r){var o=function(e){function t(t){e.call(this,t),this._widgets={},this._contentWidth=0,this.domNode=document.createElement("div"),this.domNode.className=n.ClassNames.CONTENT_WIDGETS}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null,this.domNode=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(){return!0},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLineChanged=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype.onCursorPositionChanged=function(){return!1},t.prototype.onCursorSelectionChanged=function(){return!1},t.prototype.onCursorRevealRange=function(){return!1},t.prototype.onConfigurationChanged=function(){return!0},t.prototype.onLayoutChanged=function(e){var t=this;return this._contentWidth=e.contentWidth,this._requestModificationFrameBeforeRendering(function(){var e;for(e in t._widgets)t._widgets.hasOwnProperty(e)&&(t._widgets[e].widget.getDomNode().style.maxWidth=t._contentWidth+"px")}),!0},t.prototype.onScrollChanged=function(e){return e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!1},t.prototype.onScrollHeightChanged=function(){return!1},t.prototype.addWidget=function(e){this._widgets[e.getId()]={widget:e,position:null,preference:null,isVisible:!1};var t=e.getDomNode();t.style.position="absolute",t.style.maxWidth=this._contentWidth+"px",t.style.top="-1000px",t.setAttribute("widgetId",e.getId()),this.domNode.appendChild(t),this.shouldRender=!0},t.prototype.setWidgetPosition=function(e,t,n){var i=this._widgets[e.getId()];i.position=t,i.preference=n,this.shouldRender=!0},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t];delete this._widgets[t];var i=n.widget.getDomNode();i.parentNode.removeChild(i),this.shouldRender=!0}},t.prototype._layoutBoxInViewport=function(e,t,n){var i=n.visibleRangeForPosition(e);if(!i)return null;var r=t.clientWidth,o=t.clientHeight,s=i.top,a=s,u=i.top+i.height,l=n.viewportHeight-u,c=s-o,d=a>=o,h=u,p=l>=o,f=i.left;return f+r>n.viewportLeft+n.viewportWidth&&(f=n.viewportLeft+n.viewportWidth-r),f=r;r++)for(o=0;oi;)n=Math.floor((i+r)/2),t=t&&(this.whitespaceId2Index[r]=o+1));this.whitespaceId2Index[e.toString()]=t,this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t){var n=e.toString();if(this.whitespaceId2Index.hasOwnProperty(n)){var i=this.whitespaceId2Index[n];if(this.heights[i]!==t)return this.heights[i]=t,this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,i-1),!0}return!1},e.prototype.changeAfterLineNumberForWhitespace=function(t,n){var i=t.toString();if(this.whitespaceId2Index.hasOwnProperty(i)){var r=this.whitespaceId2Index[i];if(this.afterLineNumbers[r]!==n){var o=this.heights[r];this.removeWhitespace(t);var s=e.findInsertionIndex(this.afterLineNumbers,n);return this.insertWhitespaceAtIndex(t,s,n,o),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=e.toString();if(this.whitespaceId2Index.hasOwnProperty(t)){var n=this.whitespaceId2Index[t];return delete this.whitespaceId2Index[t],this.removeWhitespaceAtIndex(n),!0}return!1},e.prototype.removeWhitespaceAtIndex=function(e){this.heights.splice(e,1),this.ids.splice(e,1),this.afterLineNumbers.splice(e,1),this.prefixSum.splice(e,1),this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,e-1);var t,n;for(t in this.whitespaceId2Index)this.whitespaceId2Index.hasOwnProperty(t)&&(n=this.whitespaceId2Index[t],n>=e&&(this.whitespaceId2Index[t]=n-1))},e.prototype.onModelLinesDeleted=function(e,t){var n,i,r;for(i=0,r=this.afterLineNumbers.length;r>i;i++)n=this.afterLineNumbers[i],n>=e&&t>=n?this.afterLineNumbers[i]=e-1:n>t&&(this.afterLineNumbers[i]-=t-e+1)},e.prototype.onModelLinesInserted=function(e,t){var n,i,r;for(i=0,r=this.afterLineNumbers.length;r>i;i++)n=this.afterLineNumbers[i],n>=e&&(this.afterLineNumbers[i]+=t-e+1)},e.prototype.getTotalHeight=function(){return 0===this.heights.length?0:this.getAccumulatedHeight(this.heights.length-1)},e.prototype.getAccumulatedHeight=function(e){var t=Math.max(0,this.prefixSumValidIndex+1);0===t&&(this.prefixSum[0]=this.heights[0],t++);for(var n=t;e>=n;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.heights[n];return this.prefixSumValidIndex=Math.max(this.prefixSumValidIndex,e),this.prefixSum[e]},e.prototype.getAccumulatedHeightBeforeLineNumber=function(e){var t=this.findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getAccumulatedHeight(t)},e.prototype.findLastWhitespaceBeforeLineNumber=function(e){for(var t,n=this.afterLineNumbers,i=0,r=n.length-1;r>=i;)if(t=Math.floor((i+r)/2),n[t]=n.length||n[t+1]>=e)return t;i=t+1}else r=t-1;return-1},e.prototype.findFirstWhitespaceAfterLineNumber=function(e){var t=this.findLastWhitespaceBeforeLineNumber(e),n=t+1;return n1?t*(e-1):0;var i=this.whitespaces.getAccumulatedHeightBeforeLineNumber(e);return n+i},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e,t){if(0>e)return 1;for(var n,i,r,o=1,s=this.linesCount;s>o;)if(n=Math.floor((o+s)/2),i=this.getVerticalOffsetForLineNumber(n,t),r=t,e>=i+r)o=n+1;else{if(e>=i)return n;s=n}return o>this.linesCount?this.linesCount:o},e.prototype.getCenteredLineInViewport=function(e,t,n){for(var i,r,o=this.getLinesViewportData(e,t,n),s=(t-e)/2,a=o.visibleRangesDeltaTop,u=o.startLineNumber;u<=o.endLineNumber;u++)if(i=a+o.relativeVerticalOffset[u-o.startLineNumber],r=i+n,a+=n,s>=i&&r>s||i>s)return u;return o.endLineNumber},e.prototype.getLinesViewportData=function(e,t,n){var i,r,o=this.getLineNumberAtOrAfterVerticalOffset(e,n),s=this.linesCount,a=this.getVerticalOffsetForLineNumber(o,n),u=this.whitespaces.getFirstWhitespaceIndexAfterLineNumber(o),l=this.whitespaces.getCount();-1===u?(u=l,r=s+1):(r=this.whitespaces.getAfterLineNumberForWhitespaceIndex(u),i=this.whitespaces.getHeightForWhitespaceIndex(u));for(var c=a,d=0,h=[],p=o;s>=p;p++){for(c+=n,h.push(d),d=0;r===p;)d+=i,c+=i,u++,u>=l?r=s+1:(r=this.whitespaces.getAfterLineNumberForWhitespaceIndex(u),i=this.whitespaces.getHeightForWhitespaceIndex(u));if(c>t){s=p;break}}for(var f=1;f=1?t*i:0;var r;return r=e>0?this.whitespaces.getAccumulatedHeight(e-1):0,n+r},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e,t){var n,i,r,o=0,s=this.whitespaces.getCount()-1;if(0>s)return-1;var a=this.getVerticalOffsetForWhitespaceIndex(s,t),u=this.whitespaces.getHeightForWhitespaceIndex(s);if(e>=a+u)return-1;for(;s>o;)if(n=Math.floor((o+s)/2),i=this.getVerticalOffsetForWhitespaceIndex(n,t),r=this.whitespaces.getHeightForWhitespaceIndex(n),e>=i+r)o=n+1;else{if(e>=i)return n;s=n}return o},e.prototype.getWhitespaceAtVerticalOffset=function(e,t){var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e,t);if(0>n)return null;if(n>=this.whitespaces.getCount())return null;var i=this.getVerticalOffsetForWhitespaceIndex(n,t);if(i>e)return null;var r=this.whitespaces.getHeightForWhitespaceIndex(n),o=this.whitespaces.getIdForWhitespaceIndex(n),s=this.whitespaces.getAfterLineNumberForWhitespaceIndex(n);return{id:o,afterLineNumber:s,verticalOffset:i,height:r}},e.prototype.getWhitespaceViewportData=function(e,t,n){var i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e,n),r=this.whitespaces.getCount()-1;if(0>i)return[];var o,s,a,u=[];for(o=i;r>=o&&(s=this.getVerticalOffsetForWhitespaceIndex(o,n),a=this.whitespaces.getHeightForWhitespaceIndex(o),!(s>=t));o++)u.push({id:this.whitespaces.getIdForWhitespaceIndex(o),afterLineNumber:this.whitespaces.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:s,height:a});return u},e}();t.VerticalObjects=i}),define("vs/editor/core/view/layout/lines/linesLayout",["require","exports","vs/editor/core/view/layout/lines/verticalObjects"],function(e,t,n){var i=function(){function e(e,t){this.configuration=e,this.model=t,this.verticalObjects=new n.VerticalObjects,this.verticalObjects.replaceLines(t.getLineCount())}return e.prototype.insertWhitespace=function(e,t){return this.verticalObjects.insertWhitespace(e,t)},e.prototype.changeWhitespace=function(e,t){return this.verticalObjects.changeWhitespace(e,t)},e.prototype.changeAfterLineNumberForWhitespace=function(e,t){return this.verticalObjects.changeAfterLineNumberForWhitespace(e,t)},e.prototype.removeWhitespace=function(e){return this.verticalObjects.removeWhitespace(e)},e.prototype.onModelFlushed=function(){this.verticalObjects.replaceLines(this.model.getLineCount())},e.prototype.onModelLinesDeleted=function(e){this.verticalObjects.onModelLinesDeleted(e.fromLineNumber,e.toLineNumber)},e.prototype.onModelLinesInserted=function(e){this.verticalObjects.onModelLinesInserted(e.fromLineNumber,e.toLineNumber)},e.prototype.getVerticalOffsetForLineNumber=function(e){return this.verticalObjects.getVerticalOffsetForLineNumber(e,this.configuration.editor.lineHeight)},e.prototype.getLinesTotalHeight=function(){return this.verticalObjects.getTotalHeight(this.configuration.editor.lineHeight)},e.prototype.getTotalHeight=function(e,t){var n=this.getLinesTotalHeight();return n+=this.configuration.editor.scrollBeyondLastLine?e.height-this.configuration.editor.lineHeight:t,Math.max(e.height,n)},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){return this.verticalObjects.getLineNumberAtOrAfterVerticalOffset(e,this.configuration.editor.lineHeight)},e.prototype.getHeightForLineNumber=function(){return this.configuration.editor.lineHeight},e.prototype.getWhitespaceViewportData=function(e){return this.verticalObjects.getWhitespaceViewportData(e.top,e.top+e.height,this.configuration.editor.lineHeight)},e.prototype.getWhitespaceAtVerticalOffset=function(e){return this.verticalObjects.getWhitespaceAtVerticalOffset(e,this.configuration.editor.lineHeight)},e.prototype.getLinesViewportData=function(e){return this.verticalObjects.getLinesViewportData(e.top,e.top+e.height,this.configuration.editor.lineHeight)},e.prototype.getCenteredLineInViewport=function(e){return this.verticalObjects.getCenteredLineInViewport(e.top,e.top+e.height,this.configuration.editor.lineHeight) },e}();t.LinesLayout=i}),define("vs/editor/core/view/layout/editorLayoutProvider",["require","exports"],function(e,t){var n=function(){function e(e,t,n,i,r,o,s,a){this.verticalScrollbarWidth=10,this.horizontalScrollbarHeight=10,this.outerWidth=e,this.outerHeight=t,this.lineHeight=n,this.showGlyphMargin=i,this.glyphMarginWidth=this.computeGlyphMarginWidth(),this.showLineNumbers=r,this.lineNumbersMinChars=o,this.lineDecorationsWidth=s,this.lineCount=0,this.maxDigitWidth=a,this.lineNumbersWidth=this.computeLineNumbersWidth(),this.layoutInfo=this.layout()}return e.prototype.setDimensions=function(e,t){return this.outerWidth!==e||this.outerHeight!==t?(this.outerWidth=e,this.outerHeight=t,this.layoutInfo=this.layout(),!0):!1},e.prototype.setScrollbarSize=function(e,t){return this.verticalScrollbarWidth!==e||this.horizontalScrollbarHeight!==t?(this.verticalScrollbarWidth=e,this.horizontalScrollbarHeight=t,this.layoutInfo=this.layout(),!0):!1},e.prototype.setGlyphMargin=function(e){return this.showGlyphMargin=e,this.setGlyphMarginWidth(this.computeGlyphMarginWidth())},e.prototype.setLineHeight=function(e){return this.lineHeight=e,this.setGlyphMarginWidth(this.computeGlyphMarginWidth())},e.prototype.computeGlyphMarginWidth=function(){return this.showGlyphMargin?this.lineHeight:0},e.prototype.setGlyphMarginWidth=function(e){return this.glyphMarginWidth!==e?(this.glyphMarginWidth=e,this.layoutInfo=this.layout(),!0):!1},e.prototype.setLineDecorationsWidth=function(e){return this.lineDecorationsWidth!==e?(this.lineDecorationsWidth=e,this.layoutInfo=this.layout(),!0):!1},e.prototype.setShowLineNumbers=function(e){return this.showLineNumbers=e,this.setLineNumbersWidth(this.computeLineNumbersWidth())},e.prototype.setLineNumbersMinChars=function(e){return this.lineNumbersMinChars=e,this.setLineNumbersWidth(this.computeLineNumbersWidth())},e.prototype.setLineCount=function(e){return this.lineCount=e,this.setLineNumbersWidth(this.computeLineNumbersWidth())},e.prototype.setMaxDigitWidth=function(e){return this.maxDigitWidth=e,this.setLineNumbersWidth(this.computeLineNumbersWidth())},e.prototype.setLineNumbersWidth=function(e){return this.lineNumbersWidth!==e?(this.lineNumbersWidth=e,this.layoutInfo=this.layout(),!0):!1},e.prototype.getLayoutInfo=function(){return this.layoutInfo},e.prototype.layout=function(){var e=this.outerWidth,t=this.outerHeight,n=this.lineNumbersWidth,i=this.glyphMarginWidth,r=t,o=t,s=this.lineDecorationsWidth,a=t,u=e-i-n-s,l=t,c=this.verticalScrollbarWidth,d=this.horizontalScrollbarHeight,h=0,p=h+i,f=p+n,g=f+s;return{width:e,height:t,glyphMarginLeft:h,glyphMarginWidth:i,glyphMarginHeight:o,lineNumbersLeft:p,lineNumbersWidth:n,lineNumbersHeight:r,decorationsLeft:f,decorationsWidth:s,decorationsHeight:a,contentLeft:g,contentWidth:u,contentHeight:l,verticalScrollbarWidth:c,horizontalScrollbarHeight:d}},e.prototype.digitCount=function(e){for(var t=0;e;)e=Math.floor(e/10),t++;return t?t:1},e.prototype.computeLineNumbersWidth=function(){if(this.showLineNumbers){var e=Math.max(this.digitCount(this.lineCount),this.lineNumbersMinChars);return e*this.maxDigitWidth}return 0},e}();t.EditorLayoutProvider=n}),define("vs/base/ui/scrollbar/impl/common",["require","exports"],function(e,t){function n(e){switch(e){case"hidden":return 1;case"visible":return 2;default:return 0}}!function(e){e[e.Auto=0]="Auto",e[e.Hidden=1]="Hidden",e[e.Visible=2]="Visible"}(t.Visibility||(t.Visibility={}));t.Visibility;t.visibilityFromString=n}),define("vs/base/ui/scrollbar/impl/domNodeScrollable",["require","exports","vs/base/dom/dom","vs/base/dom/touch","vs/base/eventEmitter"],function(e,t,n,i,r){var o=function(){function e(e){this.eventEmitterHelper=new r.EventEmitter,this.domNode=e,this.gestureHandler=new i.Gesture(this.domNode)}return e.prototype.getScrollHeight=function(){return this.domNode.scrollHeight},e.prototype.getScrollWidth=function(){return this.domNode.scrollWidth},e.prototype.getScrollLeft=function(){return this.domNode.scrollLeft},e.prototype.setScrollLeft=function(e){this.domNode.scrollLeft=e},e.prototype.getScrollTop=function(){return this.domNode.scrollTop},e.prototype.setScrollTop=function(e){this.domNode.scrollTop=e},e.prototype.addScrollListener=function(e){var t=this,i=this.eventEmitterHelper.addListener2("scroll",e),r=n.addDisposableListener(this.domNode,"scroll",function(e){t.eventEmitterHelper.emit("scroll",{browserEvent:e})});return{dispose:function(){r.dispose(),i.dispose()}}},e.prototype.dispose=function(){this.domNode=null,this.eventEmitterHelper.dispose(),this.gestureHandler&&(this.gestureHandler.dispose(),this.gestureHandler=null)},e}();t.DomNodeScrollable=o}),define("vs/base/ui/scrollbar/impl/abstractScrollbar",["require","exports","vs/base/dom/dom","vs/base/dom/mouseEvent","vs/base/ui/scrollbar/impl/common","vs/base/lifecycle","vs/base/dom/globalMouseMoveMonitor"],function(e,t,n,i,r,o,s){function a(e){return e+"px"}function u(e,t,n,i,r){null!==t&&(e.style.top=a(t)),null!==n&&(e.style.left=a(n)),null!==i&&(e.style.bottom=a(i)),null!==r&&(e.style.right=a(r))}function l(e,t,n){null!==t&&(e.style.width=a(t)),null!==n&&(e.style.height=a(n))}var c=function(){function e(e,t,n){this.visibleSize=0,this.scrollSize=0,this.scrollPosition=0,this.scrollbarSize=t,this.oppositeScrollbarSize=n,this.arrowSize=e,this.refreshComputedValues()}return e.prototype.setVisibleSize=function(e){return this.visibleSize!==e?(this.visibleSize=e,this.refreshComputedValues(),!0):!1},e.prototype.setScrollSize=function(e){return this.scrollSize!==e?(this.scrollSize=e,this.refreshComputedValues(),!0):!1},e.prototype.setScrollPosition=function(e){return this.scrollPosition!==e?(this.scrollPosition=e,this.refreshComputedValues(),!0):!1},e.prototype.refreshComputedValues=function(){if(this.computedAvailableSize=Math.max(0,this.visibleSize-this.oppositeScrollbarSize),this.computedRepresentableSize=Math.max(0,this.computedAvailableSize-2*this.arrowSize),this.computedRatio=this.scrollSize>0?this.computedRepresentableSize/this.scrollSize:0,this.computedIsNeeded=this.scrollSize>this.visibleSize,this.computedIsNeeded){if(this.computedSliderSize=Math.floor(this.visibleSize*this.computedRatio),this.computedSliderPosition=Math.floor(this.scrollPosition*this.computedRatio),this.computedSliderSizethis.computedRepresentableSize&&(this.computedSliderPosition=this.computedRepresentableSize-this.computedSliderSize),this.computedSliderPosition<0&&(this.computedSliderPosition=0)}}else this.computedSliderSize=this.computedRepresentableSize,this.computedSliderPosition=0},e.prototype.getArrowSize=function(){return this.arrowSize},e.prototype.getRectangleLargeSize=function(){return this.computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this.scrollbarSize},e.prototype.isNeeded=function(){return this.computedIsNeeded},e.prototype.getSliderSize=function(){return this.computedSliderSize},e.prototype.getSliderPosition=function(){return this.computedSliderPosition},e.prototype.convertSliderPositionToScrollPosition=function(e){return e/this.computedRatio},e.prototype.validateScrollPosition=function(e){return e=Math.round(e),e=Math.max(e,0),e=Math.min(e,this.scrollSize-this.visibleSize)},e.MINIMUM_SLIDER_SIZE=20,e}();t.ScrollbarState=c;var d=function(){function e(e,t,i,r,o,a,c,d,h){var f=this;this.parent=h,this.mouseWheelEventFactory=d,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",l(this.bgDomNode,a,c),u(this.bgDomNode,null!==t?0:null,null!==i?0:null,null!==r?0:null,null!==o?0:null),this.domNode=document.createElement("div"),this.domNode.className=e,this.domNode.style.position="absolute",l(this.domNode,p.ARROW_IMG_SIZE,p.ARROW_IMG_SIZE),u(this.domNode,t,i,r,o),this.mouseMoveMonitor=new s.GlobalMouseMoveMonitor,this.toDispose=[],this.toDispose.push(n.addDisposableListener(this.bgDomNode,"mousedown",function(e){return f._arrowMouseDown(e)})),this.toDispose.push(n.addDisposableListener(this.domNode,"mousedown",function(e){return f._arrowMouseDown(e)})),this.toDispose.push(this.mouseMoveMonitor),this.interval=-1,this.timeout=-1}return e.prototype.dispose=function(){this.toDispose=o.disposeAll(this.toDispose),this._clearArrowTimers()},e.prototype._arrowMouseDown=function(e){var t=this,n=function(){t.parent.onMouseWheel(t.mouseWheelEventFactory())},r=function(){t.interval=window.setInterval(n,1e3/24)};n(),this._clearArrowTimers(),this.timeout=window.setTimeout(r,200),this.mouseMoveMonitor.startMonitoring(s.standardMouseMoveMerger,function(){},function(){t._clearArrowTimers()});var o=new i.StandardMouseEvent(e);o.preventDefault()},e.prototype._clearArrowTimers=function(){-1!==this.interval&&(window.clearInterval(this.interval),this.interval=-1),-1!==this.timeout&&(window.clearTimeout(this.timeout),this.timeout=-1)},e}(),h=function(){function e(e,t,n){this.visibility=e,this.visibleClassName=t,this.invisibleClassName=n,this.domNode=null,this.isVisible=!1,this.isNeeded=!1,this.shouldBeVisible=!1,this.fadeAwayTimeout=-1}return e.prototype.dispose=function(){-1!==this.fadeAwayTimeout&&(window.clearTimeout(this.fadeAwayTimeout),this.fadeAwayTimeout=-1)},e.prototype.applyVisibilitySetting=function(e){return 1===this.visibility?!1:2===this.visibility?!0:e},e.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this.shouldBeVisible!==t&&(this.shouldBeVisible=t,this.ensureVisibility())},e.prototype.setIsNeeded=function(e){this.isNeeded!==e&&(this.isNeeded=e,this.ensureVisibility())},e.prototype.setDomNode=function(e){this.domNode=e,this.domNode.className=this.invisibleClassName,this.domNode.style.display="none",this.setShouldBeVisible(!1)},e.prototype.ensureVisibility=function(){return this.isNeeded?(this.shouldBeVisible?this._reveal():this._hide(!0),void 0):(this._hide(!1),void 0)},e.prototype._reveal=function(){var e=this;this.isVisible||(this.isVisible=!0,window.setTimeout(function(){e.domNode.className=e.visibleClassName},0),this.domNode.style.display="block",-1!==this.fadeAwayTimeout&&(window.clearTimeout(this.fadeAwayTimeout),this.fadeAwayTimeout=-1))},e.prototype._hide=function(e){var t=this;this.isVisible&&(this.isVisible=!1,this.domNode.className=this.invisibleClassName,e?-1===this.fadeAwayTimeout&&(this.fadeAwayTimeout=window.setTimeout(function(){t.fadeAwayTimeout=-1,t.domNode.style.display="none"},800)):this.domNode.style.display="none")},e}(),p=function(){function e(e,t,n,i){this.parent=e,this.scrollbarState=t,this.visibilityController=new h(n,"visible scrollbar "+i,"invisible scrollbar "+i),this.mouseMoveMonitor=new s.GlobalMouseMoveMonitor,this.toDispose=[],this.toDispose.push(this.visibilityController),this.toDispose.push(this.mouseMoveMonitor)}return e.prototype._createDomNode=function(){var e=this;this.domNode=document.createElement("div"),this.visibilityController.setDomNode(this.domNode),this.domNode.style.position="absolute",this.toDispose.push(n.addDisposableListener(this.domNode,"mousedown",function(t){return e._domNodeMouseDown(t)}))},e.prototype._createArrow=function(e,t,n,i,r,o,s,a){var u=new d(e,t,n,i,r,o,s,a,this.parent);this.domNode.appendChild(u.bgDomNode),this.domNode.appendChild(u.domNode),this.toDispose.push(u)},e.prototype._createSlider=function(e,t,i,r){var o=this;this.slider=document.createElement("div"),this.slider.className="slider",this.slider.style.position="absolute",u(this.slider,e,t,null,null),l(this.slider,i,r),this.domNode.appendChild(this.slider),this.toDispose.push(n.addDisposableListener(this.slider,"mousedown",function(e){return o._sliderMouseDown(e)}))},e.prototype.destroy=function(){this.toDispose=o.disposeAll(this.toDispose)},e.prototype.onElementSize=function(e){this.scrollbarState.setVisibleSize(e)&&(this._renderDomNode(this.scrollbarState.getRectangleLargeSize(),this.scrollbarState.getRectangleSmallSize()),this._renderSlider(),this.visibilityController.setIsNeeded(this.scrollbarState.isNeeded()))},e.prototype.onElementScrollSize=function(e){this.scrollbarState.setScrollSize(e)&&(this._renderSlider(),this.visibilityController.setIsNeeded(this.scrollbarState.isNeeded()))},e.prototype.onElementScrollPosition=function(e){this.scrollbarState.setScrollPosition(e)&&(this._renderSlider(),this.visibilityController.setIsNeeded(this.scrollbarState.isNeeded()))},e.prototype.beginReveal=function(){this.visibilityController.setShouldBeVisible(!0)},e.prototype.beginHide=function(){this.visibilityController.setShouldBeVisible(!1)},e.prototype._renderSlider=function(){this._updateSlider(this.scrollbarState.getSliderSize(),this.scrollbarState.getArrowSize()+this.scrollbarState.getSliderPosition())},e.prototype._domNodeMouseDown=function(e){var t=new i.StandardMouseEvent(e);t.target===this.domNode&&this.onMouseDown(e)},e.prototype.onMouseDown=function(e){var t=new i.StandardMouseEvent(e),r=n.getDomNodePosition(this.domNode),o=this._mouseDownRelativePosition(t,r)-this.scrollbarState.getArrowSize()-this.scrollbarState.getSliderSize()/2;this.setDesiredScrollPosition(this.scrollbarState.convertSliderPositionToScrollPosition(o)),this._sliderMouseDown(e)},e.prototype._sliderMouseDown=function(e){var t=this,r=new i.StandardMouseEvent(e);if(r.leftButton){var o=this._sliderMousePosition(r)-this.scrollbarState.getSliderPosition();n.toggleClass(this.slider,"active",!0),this.mouseMoveMonitor.startMonitoring(s.standardMouseMoveMerger,function(e){var n=t._sliderMousePosition(e)-o;t.setDesiredScrollPosition(t.scrollbarState.convertSliderPositionToScrollPosition(n))},function(){n.toggleClass(t.slider,"active",!1),t.parent.onDragEnd()}),r.preventDefault(),this.parent.onDragStart()}},e.prototype.validateScrollPosition=function(e){return this.scrollbarState.validateScrollPosition(e)},e.prototype.setDesiredScrollPosition=function(e){e=this.validateScrollPosition(e),this._setScrollPosition(e),this.onElementScrollPosition(e),this._renderSlider()},e.prototype._renderDomNode=function(){},e.prototype._updateSlider=function(){},e.prototype._mouseDownRelativePosition=function(){return 0},e.prototype._sliderMousePosition=function(){return 0},e.prototype._setScrollPosition=function(){},e.ARROW_IMG_SIZE=11,e}();t.AbstractScrollbar=p});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/ui/scrollbar/impl/horizontalScrollbar",["require","exports","vs/base/ui/scrollbar/impl/abstractScrollbar","vs/base/dom/mouseEvent"],function(e,t,n,i){function r(e,t,n){e.style[t]!==n&&(e.style[t]=n)}var o=function(e){function t(t,i,r){var o=this,s=new n.ScrollbarState(r.horizontalHasArrows?r.arrowSize:0,r.horizontalScrollbarSize,r.verticalScrollbarSize);if(e.call(this,i,s,r.horizontal,"horizontal"),this.scrollable=t,this._createDomNode(),r.horizontalHasArrows){var a=(r.arrowSize-n.AbstractScrollbar.ARROW_IMG_SIZE)/2,u=(r.horizontalScrollbarSize-n.AbstractScrollbar.ARROW_IMG_SIZE)/2;this._createArrow("left-arrow",u,a,null,null,r.arrowSize,r.horizontalScrollbarSize,function(){return o._createMouseWheelEvent(1)}),this._createArrow("right-arrow",u,null,null,a,r.arrowSize,r.horizontalScrollbarSize,function(){return o._createMouseWheelEvent(-1)})}this._createSlider(Math.floor((r.horizontalScrollbarSize-r.horizontalSliderSize)/2),0,null,r.horizontalSliderSize)}return __extends(t,e),t.prototype._createMouseWheelEvent=function(e){return new i.StandardMouseWheelEvent(null,e,0)},t.prototype._updateSlider=function(e,t){r(this.slider,"width",e+"px"),r(this.slider,"left",t+"px")},t.prototype._renderDomNode=function(e,t){r(this.domNode,"width",e+"px"),r(this.domNode,"height",t+"px"),r(this.domNode,"left","0"),r(this.domNode,"bottom","0")},t.prototype._mouseDownRelativePosition=function(e,t){return e.posx-t.left},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._setScrollPosition=function(e){this.scrollable.setScrollLeft(e)},t}(n.AbstractScrollbar);t.HorizontalScrollbar=o});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/ui/scrollbar/impl/verticalScrollbar",["require","exports","vs/base/ui/scrollbar/impl/abstractScrollbar","vs/base/dom/mouseEvent"],function(e,t,n,i){function r(e,t,n){e.style[t]!==n&&(e.style[t]=n)}var o=function(e){function t(t,i,r){var o=this,s=new n.ScrollbarState(r.verticalHasArrows?r.arrowSize:0,r.verticalScrollbarSize,r.horizontalScrollbarSize);if(e.call(this,i,s,r.vertical,"vertical"),this.scrollable=t,this._createDomNode(),r.verticalHasArrows){var a=(r.arrowSize-n.AbstractScrollbar.ARROW_IMG_SIZE)/2,u=(r.verticalScrollbarSize-n.AbstractScrollbar.ARROW_IMG_SIZE)/2;this._createArrow("up-arrow",a,u,null,null,r.verticalScrollbarSize,r.arrowSize,function(){return o._createMouseWheelEvent(1)}),this._createArrow("down-arrow",null,u,a,null,r.verticalScrollbarSize,r.arrowSize,function(){return o._createMouseWheelEvent(-1)})}this._createSlider(0,Math.floor((r.verticalScrollbarSize-r.verticalSliderSize)/2),r.verticalSliderSize,null)}return __extends(t,e),t.prototype._createMouseWheelEvent=function(e){return new i.StandardMouseWheelEvent(null,0,e)},t.prototype._updateSlider=function(e,t){r(this.slider,"height",e+"px"),r(this.slider,"top",t+"px")},t.prototype._renderDomNode=function(e,t){r(this.domNode,"width",t+"px"),r(this.domNode,"height",e+"px"),r(this.domNode,"right","0"),r(this.domNode,"top","0")},t.prototype._mouseDownRelativePosition=function(e,t){return e.posy-t.top},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._setScrollPosition=function(e){this.scrollable.setScrollTop(e)},t}(n.AbstractScrollbar);t.VerticalScrollbar=o}),define("vs/css!vs/base/ui/scrollbar/impl/scrollbars",["vs/css!vs/editor/editor.main"],{}),define("vs/base/ui/scrollbar/impl/scrollableElement",["require","exports","vs/base/dom/dom","vs/base/dom/mouseEvent","vs/base/env","vs/base/ui/scrollbar/impl/common","vs/base/ui/scrollbar/impl/domNodeScrollable","vs/base/ui/scrollbar/impl/horizontalScrollbar","vs/base/ui/scrollbar/impl/verticalScrollbar","vs/base/lifecycle","vs/css!./scrollbars"],function(e,t,n,i,r,o,s,a,u,l){var c=500,d=50,h=function(){function e(e,t){var i=this;this.originalElement=e,this.originalElement.style.overflow="hidden",this.options=this._createOptions(t),this.scrollable=this.options.scrollable?this.options.scrollable:new s.DomNodeScrollable(this.originalElement),this.verticalScrollbarWidth=this.options.verticalScrollbarSize,this.horizontalScrollbarHeight=this.options.horizontalScrollbarSize,this.verticalScrollbar=new u.VerticalScrollbar(this.scrollable,this,this.options),this.horizontalScrollbar=new a.HorizontalScrollbar(this.scrollable,this,this.options),this.domNode=document.createElement("div"),this.domNode.className="monaco-scrollable-element "+this.options.className,this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation"),this.domNode.style.position="relative",this.domNode.style.overflow="hidden",this.domNode.appendChild(this.originalElement),this.domNode.appendChild(this.horizontalScrollbar.domNode),this.domNode.appendChild(this.verticalScrollbar.domNode),this.options.useShadows&&(this.leftShadowDomNode=document.createElement("div"),this.leftShadowDomNode.className="shadow",this.domNode.appendChild(this.leftShadowDomNode)),this.options.useShadows&&(this.topShadowDomNode=document.createElement("div"),this.topShadowDomNode.className="shadow",this.domNode.appendChild(this.topShadowDomNode),this.topLeftShadowDomNode=document.createElement("div"),this.topLeftShadowDomNode.className="shadow top-left-corner",this.domNode.appendChild(this.topLeftShadowDomNode)),this.listenOnDomNode=this.options.listenOnDomNode||this.domNode,this.toDispose=[],this.toDispose.push(this.scrollable.addScrollListener(function(){return i._onScroll()})),this.options.handleMouseWheel&&this.handleMouseWheel(),this.toDispose.push(n.addDisposableListener(this.listenOnDomNode,"mouseover",function(e){return i._onMouseOver(e)})),this.toDispose.push(n.addDisposableNonBubblingMouseOutListener(this.listenOnDomNode,function(e){return i._onMouseOut(e)})),this.onElementDimensionsTimeout=-1,this.onElementInternalDimensionsTimeout=-1,this.hideTimeout=-1,this.isDragging=!1,this.mouseIsOver=!1,this.onElementDimensions(!0),this.onElementInternalDimensions(!0)}return e.prototype.dispose=function(){this.toDispose=l.disposeAll(this.toDispose),this.verticalScrollbar.destroy(),this.horizontalScrollbar.destroy(),-1!==this.onElementDimensionsTimeout&&(window.clearTimeout(this.onElementDimensionsTimeout),this.onElementDimensionsTimeout=-1),-1!==this.onElementInternalDimensionsTimeout&&(window.clearTimeout(this.onElementInternalDimensionsTimeout),this.onElementInternalDimensionsTimeout=-1)},e.prototype.destroy=function(){this.dispose()},e.prototype.getDomNode=function(){return this.domNode},e.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this.domNode,insertBefore:this.verticalScrollbar.domNode,top:this.options.verticalHasArrows?this.options.arrowSize:0,bottom:(this.options.verticalHasArrows?this.options.arrowSize:0)+this.options.horizontalScrollbarSize,width:this.options.verticalScrollbarSize}},e.prototype.getVerticalSliderDomNode=function(){return this.verticalScrollbar.slider},e.prototype.delegateVerticalScrollbarMouseDown=function(e){return this.verticalScrollbar.onMouseDown(e)},e.prototype.onElementDimensions=function(e){"undefined"==typeof e&&(e=!1);var t=this;e?this.actualElementDimensions():-1===this.onElementDimensionsTimeout&&(this.onElementDimensionsTimeout=window.setTimeout(function(){return t.actualElementDimensions()},0))},e.prototype.actualElementDimensions=function(){this.onElementDimensionsTimeout=-1,this.dimensions=this._computeDimensions(),this.verticalScrollbar.onElementSize(this.dimensions.height),this.horizontalScrollbar.onElementSize(this.dimensions.width)},e.prototype.onElementInternalDimensions=function(e){"undefined"==typeof e&&(e=!1);var t=this;e?this.actualElementInternalDimensions():-1===this.onElementInternalDimensionsTimeout&&(this.onElementInternalDimensionsTimeout=window.setTimeout(function(){return t.actualElementInternalDimensions()},0))},e.prototype.actualElementInternalDimensions=function(){this.onElementInternalDimensionsTimeout=-1,this.horizontalScrollbar.onElementScrollSize(this.scrollable.getScrollWidth()),this.verticalScrollbar.onElementScrollSize(this.scrollable.getScrollHeight())},e.prototype.updateClassName=function(e){this.options.className=e,r.browser.isMacintosh&&(this.options.className+=" mac"),this.domNode.className="monaco-scrollable-element "+this.options.className},e.prototype.handleMouseWheel=function(){var e=this,t=function(t){var n=new i.StandardMouseWheelEvent(t);e.onMouseWheel(n)};this.toDispose.push(n.addDisposableListener(this.listenOnDomNode,"mousewheel",t)),this.toDispose.push(n.addDisposableListener(this.listenOnDomNode,"DOMMouseScroll",t))},e.prototype.onMouseWheel=function(e){if(this.options.handleMouseWheel){var t=-1,n=-1;if(e.deltaY||e.deltaX){var i=e.deltaY,r=e.deltaX;if(this.options.flipAxes&&(i=e.deltaX,r=e.deltaY),i){var o=this.scrollable.getScrollTop();t=this.verticalScrollbar.validateScrollPosition((-1!==t?t:o)-d*i),t===o&&(t=-1)}if(r){var s=this.scrollable.getScrollLeft();n=this.horizontalScrollbar.validateScrollPosition((-1!==n?n:s)-d*r),n===s&&(n=-1)}(-1!==t||-1!==n)&&(e.preventDefault(),e.stopPropagation(),-1!==t&&(this.verticalScrollbar.setDesiredScrollPosition(t),t=-1),-1!==n&&(this.horizontalScrollbar.setDesiredScrollPosition(n),n=-1))}}},e.prototype._onScroll=function(){var e=this.scrollable.getScrollHeight(),t=this.scrollable.getScrollTop(),i=this.scrollable.getScrollWidth(),r=this.scrollable.getScrollLeft();if(this.verticalScrollbar.onElementScrollPosition(t),this.horizontalScrollbar.onElementScrollPosition(r),this.options.useShadows){var o=e>0&&t>0,s=this.options.useShadows&&i>0&&r>0;this.topShadowDomNode&&n.toggleClass(this.topShadowDomNode,"top",o),this.topLeftShadowDomNode&&n.toggleClass(this.topLeftShadowDomNode,"top",o),this.leftShadowDomNode&&n.toggleClass(this.leftShadowDomNode,"left",s),this.topLeftShadowDomNode&&n.toggleClass(this.topLeftShadowDomNode,"left",s)}this._reveal()},e.prototype.onDragStart=function(){this.isDragging=!0,this._reveal()},e.prototype.onDragEnd=function(){this.isDragging=!1,this._hide()},e.prototype._onMouseOut=function(){this.mouseIsOver=!1,this._hide()},e.prototype._onMouseOver=function(){this.mouseIsOver=!0,this._reveal()},e.prototype._reveal=function(){this.verticalScrollbar.beginReveal(),this.horizontalScrollbar.beginReveal(),this._scheduleHide()},e.prototype._hide=function(){this.mouseIsOver||this.isDragging||(this.verticalScrollbar.beginHide(),this.horizontalScrollbar.beginHide())},e.prototype._scheduleHide=function(){-1!==this.hideTimeout&&window.clearTimeout(this.hideTimeout),this.hideTimeout=window.setTimeout(this._hide.bind(this),c)},e.prototype._computeDimensions=function(){var e=this.domNode.clientWidth,t=this.domNode.clientHeight,n=t-(this.options.verticalHasArrows?2*this.options.arrowSize:0)-this.options.horizontalScrollbarSize,i=e-(this.options.horizontalHasArrows?2*this.options.arrowSize:0)-this.options.verticalScrollbarSize;return{width:e,height:t,representableHeight:n,representableWidth:i}},e.prototype._createOptions=function(e){function t(e,t,n){return e.hasOwnProperty(t)?e[t]:n}var n={className:t(e,"className",""),useShadows:t(e,"useShadows",!0),handleMouseWheel:t(e,"handleMouseWheel",!0),flipAxes:t(e,"flipAxes",!1),arrowSize:t(e,"arrowSize",11),scrollable:t(e,"scrollable",null),listenOnDomNode:t(e,"listenOnDomNode",null),horizontal:o.visibilityFromString(t(e,"horizontal","auto")),horizontalScrollbarSize:t(e,"horizontalScrollbarSize",10),horizontalSliderSize:0,horizontalHasArrows:t(e,"horizontalHasArrows",!1),vertical:o.visibilityFromString(t(e,"vertical","auto")),verticalScrollbarSize:t(e,"verticalScrollbarSize",10),verticalHasArrows:t(e,"verticalHasArrows",!1),verticalSliderSize:0};return n.horizontalSliderSize=t(e,"horizontalSliderSize",n.horizontalScrollbarSize),n.verticalSliderSize=t(e,"verticalSliderSize",n.verticalScrollbarSize),r.browser.isMacintosh&&(n.className+=" mac"),n},e}();t.ScrollableElement=h});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/layout/scroll/editorScrollable",["require","exports","vs/base/eventEmitter"],function(e,t,n){var i=function(e){function t(n){e.call(this,[t._SCROLL_EVENT,t._INTERNAL_SIZE_CHANGED_EVENT]),this.linesContent=n,this.scrollTop=0,this.scrollLeft=0,this.scrollWidth=0,this.scrollHeight=0,this.width=0,this.height=0}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getWidth=function(){return this.width},t.prototype.setWidth=function(e){0>e&&(e=0),this.width!==e&&(this.width=e,this.setScrollWidth(this.scrollWidth),this.setScrollLeft(this.scrollLeft))},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.setScrollWidth=function(e){ee&&(e=0),e+this.width>this.scrollWidth&&(e=this.scrollWidth-this.width),this.scrollLeft!==e&&(this.scrollLeft=e,this.linesContent.scrollLeft=e,this._emitScrollEvent(!1,!0))},t.prototype.getHeight=function(){return this.height},t.prototype.setHeight=function(e){0>e&&(e=0),this.height!==e&&(this.height=e,this.setScrollHeight(this.scrollHeight),this.setScrollTop(this.scrollTop))},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.setScrollHeight=function(e){ee&&(e=0),e+this.height>this.scrollHeight&&(e=this.scrollHeight-this.height),this.scrollTop!==e&&(this.scrollTop=e,this._emitScrollEvent(!0,!1))},t.prototype._emitScrollEvent=function(e,n){var i={vertical:e,horizontal:n,scrollTop:this.scrollTop,scrollLeft:this.scrollLeft};this.emit(t._SCROLL_EVENT,i)},t.prototype.addScrollListener=function(e){return this.addListener2(t._SCROLL_EVENT,e)},t.prototype._emitInternalSizeEvent=function(){this.emit(t._INTERNAL_SIZE_CHANGED_EVENT)},t.prototype.addInternalSizeChangeListener=function(e){return this.addListener2(t._INTERNAL_SIZE_CHANGED_EVENT,e)},t._SCROLL_EVENT="scroll",t._INTERNAL_SIZE_CHANGED_EVENT="internalSizeChanged",t}(n.EventEmitter);t.EditorScrollable=i}),define("vs/editor/core/view/layout/scroll/scrollManager",["require","exports","vs/base/ui/scrollbar/impl/scrollableElement","vs/editor/core/constants","vs/editor/core/view/viewContext","vs/editor/core/view/layout/scroll/editorScrollable","vs/base/dom/dom","vs/base/lifecycle"],function(e,t,n,i,r,o,s,a){function u(e,t,n){e.hasOwnProperty(n)&&(t[n]=e[n])}var l=function(){function e(e,t,a,l){var c=this;this.toDispose=[],this.configuration=e,this.privateViewEventBus=t,this.linesContent=a,this.scrollable=new o.EditorScrollable(a),this.toDispose.push(this.scrollable),this.toDispose.push(this.scrollable.addScrollListener(function(e){c.privateViewEventBus.emit(i.EventType.ViewScrollChanged,e)}));var d={scrollable:this.scrollable,listenOnDomNode:l,vertical:this.configuration.editor.scrollbar.vertical,horizontal:this.configuration.editor.scrollbar.horizontal,className:r.ClassNames.SCROLLABLE_ELEMENT+" "+this.configuration.editor.theme,useShadows:!1};u(this.configuration.editor.scrollbar,d,"verticalHasArrows"),u(this.configuration.editor.scrollbar,d,"horizontalHasArrows"),u(this.configuration.editor.scrollbar,d,"verticalScrollbarSize"),u(this.configuration.editor.scrollbar,d,"verticalSliderSize"),u(this.configuration.editor.scrollbar,d,"horizontalScrollbarSize"),u(this.configuration.editor.scrollbar,d,"horizontalSliderSize"),u(this.configuration.editor.scrollbar,d,"handleMouseWheel"),u(this.configuration.editor.scrollbar,d,"arrowSize"),this.scrollbar=new n.ScrollableElement(a,d),this.toDispose.push(this.scrollbar),this.toDispose.push(this.scrollable.addInternalSizeChangeListener(function(){c.scrollbar.onElementInternalDimensions()})),this.toDispose.push(this.configuration.addListener2(i.EventType.ConfigurationChanged,function(){c.scrollbar.updateClassName(c.configuration.editor.theme)}));var h=function(e,t,n){if(t){var i=e.scrollTop;i&&(c.scrollable.setScrollTop(c.getScrollTop()+i),e.scrollTop=0)}if(n){var r=e.scrollLeft;r&&(c.scrollable.setScrollLeft(c.getScrollLeft()+r),e.scrollLeft=0)}};this.toDispose.push(s.addDisposableListener(l,"scroll",function(){return h(l,!0,!0)})),this.toDispose.push(s.addDisposableListener(a,"scroll",function(){return h(a,!0,!1)}))}return e.prototype.dispose=function(){this.toDispose=a.disposeAll(this.toDispose)},e.prototype.getVerticalScrollbarWidth=function(){return this.scrollbar.verticalScrollbarWidth},e.prototype.getHorizontalScrollbarHeight=function(){return this.scrollbar.horizontalScrollbarHeight},e.prototype.onSizeProviderLayoutChanged=function(){this.scrollbar&&this.scrollbar.onElementDimensions()},e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollable.getScrollTop()},e.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar?this.scrollbar.getOverviewRulerLayoutInfo():null},e.prototype.getScrollbarContainerDomNode=function(){return this.scrollbar?this.scrollbar.getDomNode():this.linesContent},e.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar&&this.scrollbar.delegateVerticalScrollbarMouseDown(e) },e.prototype.getWidth=function(){return this.scrollable.getWidth()},e.prototype.setWidth=function(e){this.scrollable.setWidth(e)},e.prototype.getHeight=function(){return this.scrollable.getHeight()},e.prototype.setHeight=function(e){this.scrollable.setHeight(e)},e.prototype.getScrollHeight=function(){return this.scrollable.getScrollHeight()},e.prototype.setScrollHeight=function(e){this.scrollable.setScrollHeight(e)},e.prototype.getScrollWidth=function(){return this.scrollable.getScrollWidth()},e.prototype.setScrollWidth=function(e){this.scrollable.setScrollWidth(e)},e.prototype.getScrollLeft=function(){return this.scrollable.getScrollLeft()},e.prototype.setScrollLeft=function(e){this.scrollable.setScrollLeft(e)},e.prototype.getScrollTop=function(){return this.scrollable.getScrollTop()},e.prototype.setScrollTop=function(e){this.scrollable.setScrollTop(e)},e.prototype.addScrollListener=function(e){return this.scrollable.addScrollListener(e)},e}();t.ScrollManager=l});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/layout/layoutProvider",["require","exports","vs/editor/core/constants","vs/editor/core/view/layout/lines/linesLayout","vs/editor/core/view/viewEventHandler","vs/editor/core/view/layout/editorLayoutProvider","vs/editor/core/view/layout/scroll/scrollManager"],function(e,t,n,i,r,o,s){var a=function(e){function t(t,n,r,a,u){e.call(this),this.configuration=t,this.privateViewEventBus=r,this.model=n,this.scrollManager=new s.ScrollManager(t,r,a,u),this.editorLayoutProvider=new o.EditorLayoutProvider(this.configuration.editor.observedOuterWidth,this.configuration.editor.observedOuterHeight,this.configuration.editor.lineHeight,this.configuration.editor.glyphMargin,this.configuration.editor.lineNumbers,this.configuration.editor.lineNumbersMinChars,this.configuration.editor.lineDecorationsWidth,this.configuration.editor.maxDigitWidth),this.editorLayoutProvider.setLineCount(this.model.getLineCount()),this.editorLayoutProvider.setScrollbarSize(this.scrollManager.getVerticalScrollbarWidth(),this.scrollManager.getHorizontalScrollbarHeight()),this._updateWrappingColumn(this.getLayoutInfo(),0),this.linesLayout=new i.LinesLayout(t,n),this._updatePageSize(),this._updateHeight()}return __extends(t,e),t.prototype.dispose=function(){this.scrollManager.dispose()},t.prototype.updateLineCount=function(){var e=this.editorLayoutProvider.setLineCount(this.model.getLineCount());e&&this._emitLayoutChangedEvent()},t.prototype.onZonesChanged=function(){return this._updateHeight(),!1},t.prototype.onModelFlushed=function(){return this.linesLayout.onModelFlushed(),this.updateLineCount(),this._updateHeight(),!1},t.prototype.onModelLinesDeleted=function(e){return this.linesLayout.onModelLinesDeleted(e),this.updateLineCount(),this._updateHeight(),!1},t.prototype.onModelLineChanged=function(){return!1},t.prototype.onModelLinesInserted=function(e){return this.linesLayout.onModelLinesInserted(e),this.updateLineCount(),this._updateHeight(),!1},t.prototype.onConfigurationChanged=function(){var e=this.linesLayout.getCenteredLineInViewport(this.getCurrentViewport());this._updatePageSize();var t=this.editorLayoutProvider.setDimensions(this.configuration.editor.observedOuterWidth,this.configuration.editor.observedOuterHeight);return t=this.editorLayoutProvider.setShowLineNumbers(this.configuration.editor.lineNumbers)||t,t=this.editorLayoutProvider.setLineNumbersMinChars(this.configuration.editor.lineNumbersMinChars)||t,t=this.editorLayoutProvider.setGlyphMargin(this.configuration.editor.glyphMargin)||t,t=this.editorLayoutProvider.setLineDecorationsWidth(this.configuration.editor.lineDecorationsWidth)||t,t=this.editorLayoutProvider.setLineHeight(this.configuration.editor.lineHeight)||t,t=this.editorLayoutProvider.setMaxDigitWidth(this.configuration.editor.maxDigitWidth)||t,this._updateWrappingColumn(this.getLayoutInfo(),e),t&&this._emitLayoutChangedEvent(),this._updateHeight(),!1},t.prototype._updateHeight=function(){var e=this.scrollManager.getScrollHeight();this.scrollManager.setScrollHeight(this.getTotalHeight());var t=this.scrollManager.getScrollHeight();e!==t&&this.privateViewEventBus.emit(n.EventType.ViewScrollHeightChanged,t)},t.prototype._updateWrappingColumn=function(e,t){var n=this.configuration.getWrappingColumn(),i=-1;0===n?i=Math.max(1,Math.floor((e.contentWidth-e.verticalScrollbarWidth)/this.configuration.editor.thinnestCharacterWidth)):n>0&&(i=n),this.model.setWrappingColumn(i,t)},t.prototype._updatePageSize=function(){var e=this.editorLayoutProvider.getLayoutInfo();this.configuration.editor.pageSize=Math.floor(e.height/this.configuration.editor.lineHeight)-2},t.prototype.getLayoutInfo=function(){var e=this.editorLayoutProvider.getLayoutInfo(),t=this.scrollManager.getOverviewRulerLayoutInfo();return e.overviewRuler={top:t.top,width:t.width,height:e.height-t.top-t.bottom,right:0},e},t.prototype.getCurrentViewport=function(){var e=this.editorLayoutProvider.getLayoutInfo();return{top:this.scrollManager.getScrollTop(),left:this.scrollManager.getScrollLeft(),width:e.contentWidth,height:e.contentHeight}},t.prototype._emitLayoutChangedEvent=function(e){"undefined"==typeof e&&(e=0),this.scrollManager.onSizeProviderLayoutChanged();var t=this.getLayoutInfo();this.scrollManager.setWidth(t.contentWidth),this.scrollManager.setHeight(t.contentHeight),this._updateWrappingColumn(t,e),this.privateViewEventBus.emit(n.EventType.ViewLayoutChanged,t)},t.prototype.emitLayoutChangedEvent=function(){this._emitLayoutChangedEvent()},t.prototype._computeScrollWidth=function(e,n){var i=this.configuration.getWrappingColumn(),r=0===i;return r?Math.max(e,n):Math.max(e+t.LINES_HORIZONTAL_EXTRA_PX,n)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width),i=this.scrollManager.getScrollWidth();this.scrollManager.setScrollWidth(t);var t=this.scrollManager.getScrollWidth();t!==i&&(this.privateViewEventBus.emit(n.EventType.ViewScrollWidthChanged),this._updateHeight())},t.prototype.saveState=function(){return{scrollTop:this.scrollManager.getScrollTop(),scrollLeft:this.scrollManager.getScrollLeft(),linesDomNodeWidth:this.scrollManager.getScrollWidth()}},t.prototype.restoreState=function(e){this.scrollManager.setScrollTop(e.scrollTop),this.scrollManager.setScrollLeft(e.scrollLeft)},t.prototype.addWhitespace=function(e,t){return this.linesLayout.insertWhitespace(e,t)},t.prototype.changeWhitespace=function(e,t){return this.linesLayout.changeWhitespace(e,t)},t.prototype.changeAfterLineNumberForWhitespace=function(e,t){return this.linesLayout.changeAfterLineNumberForWhitespace(e,t)},t.prototype.removeWhitespace=function(e){return this.linesLayout.removeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this.linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.heightInPxForLine=function(e){return this.linesLayout.getHeightForLineNumber(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this.linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getTotalHeight=function(){var e=0;return this.scrollManager.getScrollWidth()>this.scrollManager.getWidth()&&(e=this.scrollManager.getHorizontalScrollbarHeight()),this.linesLayout.getTotalHeight(this.getCurrentViewport(),e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this.linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){return this.linesLayout.getLinesViewportData(this.getCurrentViewport())},t.prototype.getWhitespaceViewportData=function(){return this.linesLayout.getWhitespaceViewportData(this.getCurrentViewport())},t.prototype.getOverviewRulerInsertData=function(){var e=this.scrollManager.getOverviewRulerLayoutInfo();return{parent:e.parent,insertBefore:e.insertBefore}},t.prototype.getScrollbarContainerDomNode=function(){return this.scrollManager.getScrollbarContainerDomNode()},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollManager.delegateVerticalScrollbarMouseDown(e)},t.prototype.getScrollHeight=function(){return this.scrollManager.getScrollHeight()},t.prototype.getScrollWidth=function(){return this.scrollManager.getScrollWidth()},t.prototype.getScrollLeft=function(){return this.scrollManager.getScrollLeft()},t.prototype.setScrollLeft=function(e){this.scrollManager.setScrollLeft(e)},t.prototype.getScrollTop=function(){return this.scrollManager.getScrollTop()},t.prototype.setScrollTop=function(e){this.scrollManager.setScrollTop(e)},t.prototype.getScrolledTopFromAbsoluteTop=function(e){return this.scrollManager.getScrolledTopFromAbsoluteTop(e)},t.LINES_HORIZONTAL_EXTRA_PX=30,t}(r.ViewEventHandler);t.LayoutProvider=a}),define("vs/editor/core/view/viewEventDispatcher",["require","exports","vs/base/eventEmitter"],function(e,t,n){var i=function(){function e(e){this.eventHandlerGateKeeper=e,this.eventHandlers=[],this.eventQueue=[],this.isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){this.eventHandlers.push(e)},e.prototype.removeEventHandler=function(e){for(var t=0;t0;)for(r=e.eventQueue,e.eventQueue=[],i=e.eventHandlers.slice(0),t=0,n=i.length;n>t;t++)i[t].handleEvents(r)}finally{e.isConsumingQueue=!1}})},e}();t.ViewEventDispatcher=i}),define("vs/editor/core/view/viewController",["require","exports","vs/editor/core/internalConstants","vs/editor/core/constants","vs/editor/core/position"],function(e,t,n,i,r){var o=function(){function e(e,t,n){this.viewModel=e,this.configuration=t,this.outgoingEventBus=n}return e.prototype.paste=function(e,t,i){this.configuration.handlerDispatcher.trigger(e,n.Handler.Paste,{text:t,pasteOnNewLine:i})},e.prototype.type=function(e,t){this.configuration.handlerDispatcher.trigger(e,n.Handler.Type,{text:t})},e.prototype.cut=function(e){this.configuration.handlerDispatcher.trigger(e,n.Handler.Cut,null)},e.prototype.moveTo=function(e,t,i){this.configuration.handlerDispatcher.trigger(e,n.Handler.MoveTo,{position:this.convertViewToModelPosition(t,i),viewPosition:new r.Position(t,i)})},e.prototype.moveToSelect=function(e,t,i){this.configuration.handlerDispatcher.trigger(e,n.Handler.MoveToSelect,{position:this.convertViewToModelPosition(t,i),viewPosition:new r.Position(t,i)})},e.prototype.createCursor=function(e,t,i,o){this.configuration.handlerDispatcher.trigger(e,n.Handler.CreateCursor,{position:this.convertViewToModelPosition(t,i),viewPosition:new r.Position(t,i),wholeLine:o})},e.prototype.lastCursorMoveToSelect=function(e,t,i){this.configuration.handlerDispatcher.trigger(e,n.Handler.LastCursorMoveToSelect,{position:this.convertViewToModelPosition(t,i),viewPosition:new r.Position(t,i)})},e.prototype.wordSelect=function(e,t,i,r){this.configuration.handlerDispatcher.trigger(e,n.Handler.WordSelect,{position:this.convertViewToModelPosition(t,i),preference:r})},e.prototype.wordSelectDrag=function(e,t,i,r){this.configuration.handlerDispatcher.trigger(e,n.Handler.WordSelectDrag,{position:this.convertViewToModelPosition(t,i),preference:r})},e.prototype.lastCursorWordSelect=function(e,t,i,r){this.configuration.handlerDispatcher.trigger(e,n.Handler.LastCursorWordSelect,{position:this.convertViewToModelPosition(t,i),preference:r})},e.prototype.lineSelect=function(e,t,i){this.configuration.handlerDispatcher.trigger(e,n.Handler.LineSelect,{position:this.convertViewToModelPosition(t,i),viewPosition:new r.Position(t,i)})},e.prototype.lineSelectDrag=function(e,t,i){this.configuration.handlerDispatcher.trigger(e,n.Handler.LineSelectDrag,{position:this.convertViewToModelPosition(t,i),viewPosition:new r.Position(t,i)})},e.prototype.lastCursorLineSelect=function(e,t,i){this.configuration.handlerDispatcher.trigger(e,n.Handler.LastCursorLineSelect,{position:this.convertViewToModelPosition(t,i),viewPosition:new r.Position(t,i)})},e.prototype.lastCursorLineSelectDrag=function(e,t,i){this.configuration.handlerDispatcher.trigger(e,n.Handler.LastCursorLineSelectDrag,{position:this.convertViewToModelPosition(t,i),viewPosition:new r.Position(t,i)})},e.prototype.selectAll=function(e){this.configuration.handlerDispatcher.trigger(e,n.Handler.SelectAll,null)},e.prototype.convertViewToModelPosition=function(e,t){return this.viewModel.convertViewPositionToModelPosition(e,t)},e.prototype.convertViewToModelRange=function(e){return this.viewModel.convertViewRangeToModelRange(e)},e.prototype.convertViewToModelMouseEvent=function(e){e.target&&(e.target.position&&(e.target.position=this.convertViewToModelPosition(e.target.position.lineNumber,e.target.position.column)),e.target.range&&(e.target.range=this.convertViewToModelRange(e.target.range)))},e.prototype.emitKeyDown=function(e){this.outgoingEventBus.emit(i.EventType.KeyDown,e)},e.prototype.emitKeyUp=function(e){this.outgoingEventBus.emit(i.EventType.KeyUp,e)},e.prototype.emitContextMenu=function(e){this.convertViewToModelMouseEvent(e),this.outgoingEventBus.emit(i.EventType.ContextMenu,e)},e.prototype.emitMouseMove=function(e){this.convertViewToModelMouseEvent(e),this.outgoingEventBus.emit(i.EventType.MouseMove,e)},e.prototype.emitMouseLeave=function(e){this.convertViewToModelMouseEvent(e),this.outgoingEventBus.emit(i.EventType.MouseLeave,e)},e.prototype.emitMouseUp=function(e){this.convertViewToModelMouseEvent(e),this.outgoingEventBus.emit(i.EventType.MouseUp,e)},e.prototype.emitMouseDown=function(e){this.convertViewToModelMouseEvent(e),this.outgoingEventBus.emit(i.EventType.MouseDown,e)},e}();t.ViewController=o});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/viewOverlays",["require","exports","vs/base/dom/dom","vs/editor/core/view/viewPart"],function(e,t,n,i){var r=function(e){function t(t){e.call(this,t),this._dynamicOverlays=[],this._overlays=[],this.domNode=document.createElement("div"),this.domNode.className="view-overlays",this.domNode.style.position="absolute",this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._backgroundDomNode=document.createElement("div"),this._backgroundDomNode.className="background",this.domNode.appendChild(this._backgroundDomNode),this._staticDomNode=document.createElement("div"),this._staticDomNode.className="static",this.domNode.appendChild(this._staticDomNode),this._dynamicDomNode=document.createElement("div"),this._dynamicDomNode.className="dynamic",this.domNode.appendChild(this._dynamicDomNode),this._scrollHeight=0}return __extends(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);for(var t=0;ti;i++){if(n=e[i].top,n===t)return!0;t=n}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e){var t,n,i,r,o,s,a,u,l,c,d;for(c=0,d=e.length;d>c;c++)t=e[c],n=t.left,i=t.left+t.width,u={top:0,bottom:0},l={top:0,bottom:0},c>0&&(r=e[c-1].left,o=e[c-1].left+e[c-1].width,n===r?u.top=2:n>r&&(u.top=1),i===o?l.top=2:i>r&&o>i&&(l.top=1)),d>c+1&&(s=e[c+1].left,a=e[c+1].left+e[c+1].width,n===s?u.bottom=2:n>s&&a>n&&(u.bottom=1),i===a?l.bottom=2:a>i&&(l.bottom=1)),t.startStyle=u,t.endStyle=l},t.prototype._getVisibleRangesWithStyle=function(e,t){var n=t.visibleRangesForRange(e,!0)||[],i=this._visibleRangesHaveGaps(n),r=navigator.userAgent.indexOf("Trident/7.0")>=0;return r||i||!this._context.configuration.editor.roundedSelection||this._enrichVisibleRangesWithStyle(n),n},t.prototype._createSelectionPiece=function(e,t,n,i,r,o,s,a,u){s.push('
        ')},t.prototype._actualRenderOneSelection=function(e,n,i,r,o){var s,a,u,l=e.length>0&&e[0].startStyle,c=this._context.configuration.editor.lineHeight.toString(),d=0;for(a=0;a'),i=0;i"),{html:r,lefts:o,leftsIndices:s,piecesCount:a}},t.prototype.shouldCallRender=function(){return this.shouldRender||this._horizontalScrollChanged},t.prototype.render=function(e,t){if(this.shouldRender)this._previousRender=this._actualRender(e),this.shouldRender=!1,this._horizontalScrollChanged=!1;else if(this._horizontalScrollChanged){var n,i,r=this._previousRender.html,o=this._previousRender.lefts,s=this._previousRender.leftsIndices;for(n=0,i=o.length;i>n;n++)r[s[n]]=(o[n]-e.viewportLeft).toString();this._horizontalScrollChanged=!1}return t&&(t.renderedSelectionPieces+=this._previousRender.piecesCount),this._previousRender.html},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(n.ViewEventHandler);t.SelectionsOverlay=r}),define("vs/css!vs/editor/core/view/overlays/decorations/decorations",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/overlays/decorations/decorations",["require","exports","vs/editor/core/view/viewEventHandler","vs/css!./decorations"],function(e,t,n){var i=function(e){function t(t){e.call(this),this._context=t,this._contentLeft=0,this._previousRender=null,this._horizontalScrollChanged=!1,this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._previousRender=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(){return!0},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLineChanged=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype.onCursorPositionChanged=function(){return!1},t.prototype.onCursorSelectionChanged=function(){return!1},t.prototype.onCursorRevealRange=function(){return!1},t.prototype.onConfigurationChanged=function(){return!0},t.prototype.onLayoutChanged=function(e){return this._contentLeft=e.contentLeft,!0},t.prototype.onScrollChanged=function(e){return e.horizontal&&(this._horizontalScrollChanged=!0),e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!0},t.prototype.onScrollHeightChanged=function(){return!1},t.prototype._actualRender=function(e){var t,n,i,r,o,s,a,u,l,c,d=[],h=[],p=[],f=this._context.model.getDecorationsInRange(e.visibleRange),g=this._context.configuration.editor.lineHeight.toString(),m=0;for(d.push('
        '),a=0,u=f.length;u>a;a++)if(t=f[a],n=t.range,t.options.className)if(t.options.isWholeLine)for(l=n.startLineNumber;l<=n.endLineNumber;l++)e.lineIsVisible(l)&&(o=e.heightInPxForLine(l),s=e.getViewportVerticalOffsetForLineNumber(l),m++,d.push('
        '));else if(i=e.visibleRangesForRange(n,!1))for(l=0,c=i.length;c>l;l++)r=i[l],m++,d.push('
        ');return d.push("
        "),{html:d,lefts:h,leftsIndices:p,piecesCount:m}},t.prototype.shouldCallRender=function(){return this.shouldRender||this._horizontalScrollChanged},t.prototype.render=function(e,t){if(this.shouldRender)this._previousRender=this._actualRender(e),this.shouldRender=!1,this._horizontalScrollChanged=!1;else if(this._horizontalScrollChanged){var n,i,r=this._previousRender.html,o=this._previousRender.lefts,s=this._previousRender.leftsIndices;for(n=0,i=o.length;i>n;n++)r[s[n]]=(o[n]-e.viewportLeft).toString();this._horizontalScrollChanged=!1}return t&&(t.renderedDecorationsPieces+=this._previousRender.piecesCount),this._previousRender.html},t}(n.ViewEventHandler);t.DecorationsOverlay=i}),define("vs/css!vs/editor/core/view/overlays/glyphMargin/glyphMargin",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/overlays/glyphMargin/glyphMargin",["require","exports","vs/editor/core/view/viewContext","vs/editor/core/view/viewEventHandler","vs/css!./glyphMargin"],function(e,t,n,i){var r=function(e){function t(t){e.call(this),this._context=t,this._glyphMarginLeft=0,this._glyphMarginWidth=0,this._previousRender=null,this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._previousRender=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(){return!0},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLineChanged=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype.onCursorPositionChanged=function(){return!1},t.prototype.onCursorSelectionChanged=function(){return!1},t.prototype.onCursorRevealRange=function(){return!1},t.prototype.onConfigurationChanged=function(){return!0},t.prototype.onLayoutChanged=function(e){return this._glyphMarginLeft=e.glyphMarginLeft,this._glyphMarginWidth=e.glyphMarginWidth,!0},t.prototype.onScrollChanged=function(e){return e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!1},t.prototype.onScrollHeightChanged=function(){return!1},t.prototype._actualRender=function(e){var t=[],i=0;if(!this._context.configuration.editor.glyphMargin)return{html:t,count:i};var r,o,s,a,u,l,c,d,h,p,f=this._context.model.getDecorationsInRange(e.visibleRange),g=this._context.configuration.editor.lineHeight.toString(),m={};for(a=0,u=f.length;u>a;a++)if(r=f[a],r.options.glyphMarginClassName)if(o=r.range,r.options.isWholeLine)for(h=o.startLineNumber;h<=o.endLineNumber;h++)e.lineIsVisible(h)&&(l=e.getViewportVerticalOffsetForLineNumber(h),m.hasOwnProperty(l.toString())||(m[l.toString()]={}),m[l.toString()][r.options.glyphMarginClassName]=!0);else if(s=e.visibleRangesForRange(o,!1))for(h=0,p=s.length;p>h;h++)l=s[h].top,m.hasOwnProperty(l.toString())||(m[l.toString()]={}),m[l.toString()][r.options.glyphMarginClassName]=!0;t.push('
        ');for(c in m){t.push('
        ') }return t.push("
        "),{html:t,count:i}},t.prototype.shouldCallRender=function(){return this.shouldRender},t.prototype.render=function(e,t){return this.shouldRender&&(this._previousRender=this._actualRender(e),this.shouldRender=!1),t&&(t.renderedMarginGlyphs+=this._previousRender.count),this._previousRender.html},t}(i.ViewEventHandler);t.GlyphMarginOverlay=r}),define("vs/css!vs/editor/core/view/overlays/linesDecorations/linesDecorations",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/overlays/linesDecorations/linesDecorations",["require","exports","vs/editor/core/view/viewContext","vs/editor/core/view/viewEventHandler","vs/css!./linesDecorations"],function(e,t,n,i){var r=function(e){function t(t){e.call(this),this._context=t,this._decorationsLeft=0,this._decorationsWidth=0,this._previousRender=null,this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._previousRender=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(){return!0},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLineChanged=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype.onCursorPositionChanged=function(){return!1},t.prototype.onCursorSelectionChanged=function(){return!1},t.prototype.onCursorRevealRange=function(){return!1},t.prototype.onConfigurationChanged=function(){return!0},t.prototype.onLayoutChanged=function(e){return this._decorationsLeft=e.decorationsLeft,this._decorationsWidth=e.decorationsWidth,!0},t.prototype.onScrollChanged=function(e){return e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!1},t.prototype.onScrollHeightChanged=function(){return!1},t.prototype._actualRender=function(e){var t,i,r,o,s,a,u,l,c,d,h=[],p=0,f=this._context.model.getDecorationsInRange(e.visibleRange),g=this._context.configuration.editor.lineHeight.toString(),m={};for(o=0,s=f.length;s>o;o++)if(t=f[o],t.options.linesDecorationsClassName)if(i=t.range,t.options.isWholeLine)for(c=i.startLineNumber;c<=i.endLineNumber;c++)e.lineIsVisible(c)&&(a=e.getViewportVerticalOffsetForLineNumber(c),m.hasOwnProperty(a.toString())||(m[a.toString()]={}),m[a.toString()][t.options.linesDecorationsClassName]=!0);else if(r=e.visibleRangesForRange(i,!1))for(c=0,d=r.length;d>c;c++)a=r[c].top,m.hasOwnProperty(a.toString())||(m[a.toString()]={}),m[a.toString()][t.options.linesDecorationsClassName]=!0;h.push('
        ');for(u in m){h.push('
        ')}return h.push("
        "),{html:h,renderedCount:p}},t.prototype.shouldCallRender=function(){return this.shouldRender},t.prototype.render=function(e,t){return this.shouldRender&&(this._previousRender=this._actualRender(e),this.shouldRender=!1),t&&(t.renderedLinesDecorations+=this._previousRender.renderedCount),this._previousRender.html},t}(i.ViewEventHandler);t.LinesDecorationsOverlay=r}),define("vs/css!vs/editor/core/view/overlays/lineNumbers/lineNumbers",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/overlays/lineNumbers/lineNumbers",["require","exports","vs/editor/core/view/viewContext","vs/editor/core/view/viewEventHandler","vs/css!./lineNumbers"],function(e,t,n,i){var r=function(e){function t(t){e.call(this),this._context=t,this._lineNumbersLeft=0,this._lineNumbersWidth=0,this._previousRender=[],this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._previousRender=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(){return!1},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLineChanged=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype.onCursorPositionChanged=function(){return!1},t.prototype.onCursorSelectionChanged=function(){return!1},t.prototype.onCursorRevealRange=function(){return!1},t.prototype.onConfigurationChanged=function(){return!0},t.prototype.onLayoutChanged=function(e){return this._lineNumbersLeft=e.lineNumbersLeft,this._lineNumbersWidth=e.lineNumbersWidth,!0},t.prototype.onScrollChanged=function(e){return e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!1},t.prototype.onScrollHeightChanged=function(){return!1},t.prototype._actualRender=function(e){var t=[];if(!this._context.configuration.editor.lineNumbers)return t;var i,r;for(t.push('
        '),r=e.visibleRange.startLineNumber;r<=e.visibleRange.endLineNumber;r++)i=e.getViewportVerticalOffsetForLineNumber(r),t.push('
        '),t.push(this._context.model.getLineRenderLineNumber(r)),t.push("
        ");return t.push("
        "),t},t.prototype.shouldCallRender=function(){return this.shouldRender},t.prototype.render=function(e){return this.shouldRender&&(this._previousRender=this._actualRender(e),this.shouldRender=!1),this._previousRender},t}(i.ViewEventHandler);t.LineNumbersOverlay=r}),define("vs/css!vs/editor/core/view/overlays/scrollDecoration/scrollDecoration",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/overlays/scrollDecoration/scrollDecoration",["require","exports","vs/editor/core/view/viewContext","vs/editor/core/view/viewEventHandler","vs/css!./scrollDecoration"],function(e,t,n,i){var r=function(e){function t(t){e.call(this),this._context=t,this._width=0,this._previousRender=[],this._context.addEventHandler(this)}return __extends(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._previousRender=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(){return!1},t.prototype.onModelLinesDeleted=function(){return!0},t.prototype.onModelLineChanged=function(){return!0},t.prototype.onModelLinesInserted=function(){return!0},t.prototype.onCursorPositionChanged=function(){return!1},t.prototype.onCursorSelectionChanged=function(){return!1},t.prototype.onCursorRevealRange=function(){return!1},t.prototype.onConfigurationChanged=function(){return!0},t.prototype.onLayoutChanged=function(e){return this._width=e.width,!0},t.prototype.onScrollChanged=function(e){return e.vertical},t.prototype.onZonesChanged=function(){return!0},t.prototype.onScrollWidthChanged=function(){return!1},t.prototype.onScrollHeightChanged=function(){return!1},t.prototype._actualRender=function(e){var t=[];return this._context.configuration.editor.scrollbar.useShadows?0===e.getViewportVerticalOffsetForLineNumber(1)?t:(t.push('
        '),t):t},t.prototype.shouldCallRender=function(){return this.shouldRender},t.prototype.render=function(e){return this.shouldRender&&(this._previousRender=this._actualRender(e),this.shouldRender=!1),this._previousRender},t}(i.ViewEventHandler);t.ScrollDecorationOverlay=r});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/viewImpl",["require","exports","vs/nls!vs/editor/editor.main","vs/base/dom/dom","vs/base/eventEmitter","vs/editor/core/constants","vs/editor/core/view/viewContext","vs/editor/core/controller/keyboardHandler","vs/editor/core/controller/pointerHandler","vs/editor/core/view/parts/zones/zones","vs/editor/core/view/lines/viewLines","vs/editor/core/view/parts/overviewRuler/overviewRuler","vs/editor/core/view/parts/overviewRuler/decorationsOverviewRuler","vs/editor/core/view/parts/viewCursors/viewCursors","vs/editor/core/view/parts/contentWidgets/contentWidgets","vs/editor/core/view/parts/overlayWidgets/overlayWidgets","vs/editor/core/view/layout/layoutProvider","vs/editor/core/view/viewEventHandler","vs/editor/core/view/viewEventDispatcher","vs/editor/core/range","vs/base/env","vs/base/errors","vs/editor/core/view/viewController","vs/editor/core/view/viewOverlays","vs/editor/core/view/overlays/currentLineHighlight/currentLineHighlight","vs/editor/core/view/overlays/selections/selections","vs/editor/core/view/overlays/decorations/decorations","vs/editor/core/view/overlays/glyphMargin/glyphMargin","vs/editor/core/view/overlays/linesDecorations/linesDecorations","vs/editor/core/view/overlays/lineNumbers/lineNumbers","vs/editor/core/view/overlays/scrollDecoration/scrollDecoration","vs/base/lifecycle"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f,g,m,v,y,_,b,C,w,S,L,E,T,N,M,x,R,I){var k=function(e){function t(t,n,i,o){var l=this;e.call(this),this.telemetryService=o,this.outgoingEventBus=new r.EventEmitter;var c=new w.ViewController(i,n,this.outgoingEventBus);this.listenersToRemove=[],this.listenersToDispose=[],this.eventDispatcher=new y.ViewEventDispatcher(function(e){return l._renderOnce(e)}),this.linesContent=document.createElement("div"),this.linesContent.className=s.ClassNames.LINES_CONTENT,this.domNode=document.createElement("div"),this.domNode.className=n.getEditorClassName(),this.overflowGuardContainer=document.createElement("div"),this.overflowGuardContainer.className=s.ClassNames.OVERFLOW_GUARD,this.layoutProvider=new m.LayoutProvider(n,i,this.eventDispatcher,this.linesContent,this.domNode),this.eventDispatcher.addEventHandler(this.layoutProvider),this.context=new s.ViewContext(t,n,i,this.eventDispatcher,function(e){return l.eventDispatcher.addEventHandler(e)},function(e){return l.eventDispatcher.removeEventHandler(e)}),this.createTextArea(),this.createViewParts(),this.keyboardHandler=new a.KeyboardHandler(this.context,c,this.createKeyboardHandlerHelper()),this.pointerHandler=new u.PointerHandler(this.context,c,this.createPointerHandlerHelper()),this.hasFocus=!1,this.renderOnceCount=0,this.isRendering=!1,this.codeEditorHelper=null,this.eventDispatcher.addEventHandler(this),this.listenersToRemove.push(i.addBulkListener(function(e){return l.eventDispatcher.emitMany(e)}))}return __extends(t,e),t.prototype.createTextArea=function(){var e=this;this.textArea=document.createElement("textarea"),this.textArea.className=s.ClassNames.TEXTAREA,this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",n.localize("vs_editor_core_view_viewImpl",0)),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-multiline","true"),this.textArea.style.top="0px",this.textArea.style.left="0px",this.textArea.style.fontSize=this.context.configuration.editor.fontSize+"px",this.textArea.style.lineHeight=this.context.configuration.editor.lineHeight+"px",this.listenersToDispose.push(i.addDisposableListener(this.textArea,"focus",function(){return e._setHasFocus(!0)})),this.listenersToDispose.push(i.addDisposableListener(this.textArea,"blur",function(){return e._setHasFocus(!1)})),this.textAreaCover=document.createElement("div"),this.textAreaCover.className=this.context.configuration.editor.glyphMargin?s.ClassNames.GLYPH_MARGIN+" "+s.ClassNames.TEXTAREA_COVER:this.context.configuration.editor.lineNumbers?s.ClassNames.LINE_NUMBERS+" "+s.ClassNames.TEXTAREA_COVER:"monaco-editor-background "+s.ClassNames.TEXTAREA_COVER,this.textAreaCover.style.position="absolute",this.textAreaCover.style.width="1px",this.textAreaCover.style.height="1px",this.textAreaCover.style.top="0px",this.textAreaCover.style.left="0px"},t.prototype.createViewParts=function(){var e=this;this.viewParts=[],this.viewLines=new c.ViewLines(this.context,this.layoutProvider),this.viewZones=new l.ViewZones(this.context,this.layoutProvider),this.viewParts.push(this.viewZones);var t=new h.DecorationsOverviewRuler(this.context,this.layoutProvider.getScrollHeight(),function(t){return e.layoutProvider.getVerticalOffsetForLineNumber(t)});this.viewParts.push(t);var n=new S.ViewOverlays(this.context);this.viewParts.push(n),n.addDynamicOverlay(new N.GlyphMarginOverlay(this.context)),n.addDynamicOverlay(new M.LinesDecorationsOverlay(this.context)),n.addDynamicOverlay(new x.LineNumbersOverlay(this.context)),n.addDynamicOverlay(new E.SelectionsOverlay(this.context)),n.addDynamicOverlay(new T.DecorationsOverlay(this.context)),n.addDynamicOverlay(new R.ScrollDecorationOverlay(this.context)),n.addOverlay(new L.CurrentLineHighlightOverlay(this.context)),this.contentWidgets=new f.ViewContentWidgets(this.context),this.viewParts.push(this.contentWidgets);var i=new p.ViewCursors(this.context);if(this.viewParts.push(i),this.overlayWidgets=new g.ViewOverlayWidgets(this.context),this.viewParts.push(this.overlayWidgets),this.linesContentContainer=this.layoutProvider.getScrollbarContainerDomNode(),this.linesContentContainer.style.position="absolute",t){var r=this.layoutProvider.getOverviewRulerInsertData();r.parent.insertBefore(t.getDomNode(),r.insertBefore)}this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.domNode),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(i.getDomNode()),this.overflowGuardContainer.appendChild(n.domNode),this.overflowGuardContainer.appendChild(this.linesContentContainer),this.overflowGuardContainer.appendChild(this.overlayWidgets.domNode),this.overflowGuardContainer.appendChild(this.textArea),this.overflowGuardContainer.appendChild(this.textAreaCover),this.domNode.appendChild(this.overflowGuardContainer)},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode,linesContentDomNode:this.linesContent,focusTextArea:function(){e.focus()},getScrollTop:function(){return e.layoutProvider.getScrollTop()},setScrollTop:function(t){return e.layoutProvider.setScrollTop(t)},getScrollLeft:function(){return e.layoutProvider.getScrollLeft()},setScrollLeft:function(t){return e.layoutProvider.setScrollLeft(t)},getLineNumberAtVerticalOffset:function(t){return e.layoutProvider.getLineNumberAtVerticalOffset(t)},getWhitespaceAtVerticalOffset:function(t){return e.layoutProvider.getWhitespaceAtVerticalOffset(t)},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},getPositionFromDOMInfo:function(t,n){return e._renderNow(),e.viewLines.getPositionFromDOMInfo(t,n)},visibleRangeForPosition2:function(t,n){e._renderNow();var i=e.viewLines.visibleRangesForRange2(new _.Range(t,n,t,n),0,!1);return i?i[0]:null},getLineWidth:function(t){return e._renderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createKeyboardHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode,textArea:this.textArea,visibleRangeForPositionRelativeToEditor:function(t,n){e._renderNow();var i=e.layoutProvider.getLinesViewportData(),r=e.viewLines.visibleRangesForRange2(new _.Range(t,n,t,n),i.visibleRangesDeltaTop,!1);return r?r[0]:null}}},t.prototype.onLayoutChanged=function(e){return this.domNode.style.width=e.width+"px",this.domNode.style.height=e.height+"px",this.overflowGuardContainer.style.width=e.width+"px",this.overflowGuardContainer.style.height=e.height+"px",this.linesContent.style.width=e.contentWidth+"px",this.linesContent.style.height=e.contentHeight+"px",this.linesContentContainer.style.left=e.contentLeft+"px",this.linesContentContainer.style.width=e.contentWidth+"px",this.linesContentContainer.style.height=e.contentHeight+"px",this.outgoingEventBus.emit(o.EventType.ViewLayoutChanged,e),!1},t.prototype.onConfigurationChanged=function(){return this.domNode.className=this.context.configuration.getEditorClassName(),this.textArea.style.fontSize=this.context.configuration.editor.fontSize+"px",this.textArea.style.lineHeight=this.context.configuration.editor.lineHeight+"px",!1},t.prototype.onScrollChanged=function(){return this.outgoingEventBus.emit("scroll",{scrollTop:this.layoutProvider.getScrollTop(),scrollLeft:this.layoutProvider.getScrollLeft()}),!1},t.prototype.onViewFocusChanged=function(e){return i.toggleClass(this.domNode,"focused",e),e?this.outgoingEventBus.emit(o.EventType.ViewFocusGained,{}):this.outgoingEventBus.emit(o.EventType.ViewFocusLost,{}),!1},t.prototype.dispose=function(){this.eventDispatcher.removeEventHandler(this),this.outgoingEventBus.dispose(),this.listenersToRemove.forEach(function(e){e()}),this.listenersToRemove=[],this.listenersToDispose=I.disposeAll(this.listenersToDispose),this.keyboardHandler.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var e=0,t=this.viewParts.length;t>e;e++)this.viewParts[e].dispose();this.viewParts=[],this.layoutProvider.dispose()},t.prototype.getCodeEditorHelper=function(){var e=this;return this.codeEditorHelper||(this.codeEditorHelper={getScrollTop:function(){return e.layoutProvider.getScrollTop()},setScrollTop:function(t){return e.layoutProvider.setScrollTop(t)},getScrollLeft:function(){return e.layoutProvider.getScrollLeft()},setScrollLeft:function(t){return e.layoutProvider.setScrollLeft(t)},getLayoutInfo:function(){return e.layoutProvider.getLayoutInfo()},getVerticalOffsetForLineNumber:function(t){return e.layoutProvider.getVerticalOffsetForLineNumber(t)},delegateVerticalScrollbarMouseDown:function(t){return e.layoutProvider.delegateVerticalScrollbarMouseDown(t)},getOffsetForColumn:function(t,n){e._renderNow();var i=e.viewLines.visibleRangesForRange2(new _.Range(t,n,t,n),0,!1);return i?i[0].left:-1}}),this.codeEditorHelper},t.prototype.getInternalEventBus=function(){return this.outgoingEventBus},t.prototype.saveState=function(){return this.layoutProvider.saveState()},t.prototype.restoreState=function(e){return this.layoutProvider.restoreState(e)},t.prototype.focus=function(){this.textArea.focus(),i.selectTextInInputElement(this.textArea),this._setHasFocus(!0)},t.prototype.isFocused=function(){return this.hasFocus},t.prototype.createOverviewRuler=function(e,t,n){var i=this;return new d.OverviewRuler(this.context,e,this.layoutProvider.getScrollHeight(),t,n,function(e){return i.layoutProvider.getVerticalOffsetForLineNumber(e)})},t.prototype.change=function(e){var t=this;this._renderOnce(function(){var n=!1,i={addZone:function(e){return n=!0,t.viewZones.addZone(e)},removeZone:function(e){n=t.viewZones.removeZone(e)||n}},r=e(i);return i.addZone=null,i.removeZone=null,n&&t.context.privateViewEventBus.emit(o.EventType.ViewZonesChanged,null),r})},t.prototype.addContentWidget=function(e){var t=this;this._renderOnce(function(){t.contentWidgets.addWidget(e.widget),t.layoutContentWidget(e)})},t.prototype.layoutContentWidget=function(e){var t=this;this._renderOnce(function(){var n=e.position?e.position.position:null,i=e.position?e.position.preference:null;t.contentWidgets.setWidgetPosition(e.widget,n,i)})},t.prototype.removeContentWidget=function(e){var t=this;this._renderOnce(function(){t.contentWidgets.removeWidget(e.widget)})},t.prototype.addOverlayWidget=function(e){var t=this;this._renderOnce(function(){t.overlayWidgets.addWidget(e.widget),t.layoutOverlayWidget(e)})},t.prototype.layoutOverlayWidget=function(e){var t=this;this._renderOnce(function(){var n=e.position?e.position.preference:null;t.overlayWidgets.setWidgetPosition(e.widget,n)})},t.prototype.removeOverlayWidget=function(e){var t=this;this._renderOnce(function(){t.overlayWidgets.removeWidget(e.widget)})},t.prototype.render=function(){this.layoutProvider.emitLayoutChangedEvent()},t.prototype.renderOnce=function(e){return this._renderOnce(e)},t.prototype._renderOnce=function(e){var t=this;return this.outgoingEventBus.deferredEmit(function(){t.renderOnceCount++;try{var n=e?e():null}finally{t.renderOnceCount--}if(0===t.renderOnceCount&&!t.isRendering)try{t.isRendering=!0,t._scheduleRender()}finally{t.isRendering=!1}return n})},t.prototype._scheduleRender=function(){var e=this;this._shouldRender=!0,i.runAtThisOrScheduleAtNextAnimationFrame(function(){e._renderNow()})},t.prototype._renderNow=function(){var e=this;this._shouldRender&&(this._shouldRender=!1,this.outgoingEventBus.deferredEmit(function(){e.actualRender()}))},t.prototype.createRenderingContext=function(e){var t=this,n=this.layoutProvider.getCurrentViewport(),i={scrollWidth:this.layoutProvider.getScrollWidth(),scrollHeight:this.layoutProvider.getScrollHeight(),visibleRange:e.visibleRange,viewportWidth:n.width,viewportHeight:n.height,viewportLeft:n.left,getScrolledTopFromAbsoluteTop:function(e){return t.layoutProvider.getScrolledTopFromAbsoluteTop(e)},getViewportVerticalOffsetForLineNumber:function(e){var n=t.layoutProvider.getVerticalOffsetForLineNumber(e),i=t.layoutProvider.getScrolledTopFromAbsoluteTop(n);return i},heightInPxForLine:function(e){return t.layoutProvider.heightInPxForLine(e)},visibleRangesForRange:function(n,i){return t.viewLines.visibleRangesForRange2(n,e.visibleRangesDeltaTop,i)},visibleRangeForPosition:function(n){var i=t.viewLines.visibleRangesForRange2(new _.Range(n.lineNumber,n.column,n.lineNumber,n.column),e.visibleRangesDeltaTop,!1);return i?i[0]:null},visibleRangeForPosition2:function(n,i){var r=t.viewLines.visibleRangesForRange2(new _.Range(n,i,n,i),e.visibleRangesDeltaTop,!1);return r?r[0]:null},lineIsVisible:function(t){return e.visibleRange.startLineNumber<=t&&t<=e.visibleRange.endLineNumber}};return i},t.prototype.actualRender=function(){if(i.isInDOM(this.domNode)){var e,t,n=!1;b.enableTelemetry&&(n=!0);var r=null,o=(new Date).getTime();try{if(n){var s=this.layoutProvider.getLayoutInfo();r={lines:{editorWidth:s.width,editorHeight:s.height,totalVisibleLinesCount:0,totalVisiblePartsCount:0,totalVisibleCharactersCount:0,renderedVisibleLinesCount:0,renderedVisiblePartsCount:0,renderedVisibleCharactersCount:0,time:0},parts:{renderedContentWidgets:0,renderedOverlayWidgets:0,renderedDecorationsPieces:0,renderedMarginGlyphs:0,renderedLinesDecorations:0,renderedSelectionPieces:0,renderedViewZones:0,time:0},time:0}}var a=(new Date).getTime();for(e=0,t=this.viewParts.length;t>e;e++)this.viewParts[e].onBeforeForcedLayout();var u=this.viewLines.render(n?r.lines:null);n&&(r.lines.time=(new Date).getTime()-a);var l=this.createRenderingContext(u),c=(new Date).getTime();for(e=0,t=this.viewParts.length;t>e;e++)this.viewParts[e].onReadAfterForcedLayout(l,n?r.parts:null);for(e=0,t=this.viewParts.length;t>e;e++)this.viewParts[e].onWriteAfterForcedLayout();n&&(r.parts.time=(new Date).getTime()-c,r.time=(new Date).getTime()-o,r.time>=100&&this.telemetryService&&this.telemetryService.publicLog("editorSlowRender",r))}catch(d){C.onUnexpectedError(d)}}},t.prototype._setHasFocus=function(e){this.hasFocus!==e&&(this.hasFocus=e,this.context.privateViewEventBus.emit(o.EventType.ViewFocusChanged,this.hasFocus))},t}(v.ViewEventHandler);t.View=k}),define("vs/editor/core/view/model/characterHardWrappingLineMapper",["require","exports","vs/editor/core/view/model/prefixSumComputer"],function(e,t,n){function i(e,t,n){var i,r=[],u=0,l=e+t+n;for(i=0;i=i;i++)r[i]=0;for(i=0;it;t++)u=f.charCodeAt(t),l=u===v,c=um&&0!==t&&(-1!==C?(d=C,h=w):-1!==S?(d=S,h=L):(d=t,h=0),_[b++]=d-y,y=d,r=e.nextVisibleColumn(h,g,l),C=-1,w=0,S=-1,L=0),-1!==C&&(w=e.nextVisibleColumn(w,g,l)),-1!==S&&(L=e.nextVisibleColumn(L,g,l)),c===s&&(C=t+1,w=0),c===a&&(S=t+1,L=0);_[b++]=i-y,this.prefixSums=new n.PrefixSumComputer(_)},e.prototype.getOutputLineCount=function(){return-1===this.wrappingColumn?1:this.prefixSums.getCount()},e.prototype.getInputOffsetOfOutputPosition=function(e,t){return-1===this.wrappingColumn?t:0===e?t:this.prefixSums.getAccumulatedValue(e-1)+t},e.prototype.getOutputPositionOfInputOffset=function(e,t){return-1===this.wrappingColumn?(t.outputLineIndex=0,t.outputOffset=e,void 0):(this.prefixSums.getIndexOf(e,r),t.outputLineIndex=r.index,t.outputOffset=r.remainder,void 0)},e}();t.CharacterHardWrappingLineMapper=u;var l=function(){function e(e,t,n){this.characterClasses=i(e,t,n)}return e.prototype.createLineMapper=function(e,t,n){return new u(this.characterClasses,e,t,n)},e}();t.CharacterHardWrappingLineMapperFactory=l}),define("vs/editor/core/view/model/filteredLineTokens",["require","exports","vs/base/arrays"],function(e,t,n){var i=function(){function e(e,t,i){this._original=e,this._startOffset=t,this._endOffset=i,this.tokens=[];var r=e.getTokens();if(r.length>0){var o,s,a,u=n.findIndexInSegmentsArray(r,t);for(this.tokens.push({startIndex:0,type:r[u].type}),s=u+1,a=r.length;a>s&&(o=r[s],!(o.startIndex>=i));s++)this.tokens.push({startIndex:o.startIndex-t,type:o.type})}}return e.prototype.getTokens=function(){return this.tokens},e.prototype.getTextLength=function(){return this._endOffset-this._startOffset},e.prototype.equals=function(t){if(t instanceof e){var n=t;return this._startOffset!==n._startOffset?!1:this._endOffset!==n._endOffset?!1:this._original.equals(n._original)}return!1},e.prototype.findIndexOfOffset=function(e){return n.findIndexInSegmentsArray(this.tokens,e)},e}();t.FilteredLineTokens=i}),define("vs/editor/core/view/model/splitLinesCollection",["require","exports","vs/editor/core/view/model/prefixSumComputer","vs/editor/core/view/model/filteredLineTokens","vs/editor/core/position","vs/editor/core/view/viewContext"],function(e,t,n,i,r,o){var s={outputLineIndex:0,outputOffset:0},a=function(){function e(e){this.positionMapper=e,this.outputLineCount=this.positionMapper.getOutputLineCount()}return e.prototype.setLineText=function(e){this.positionMapper.setLineText(e),this.outputLineCount=this.positionMapper.getOutputLineCount()},e.prototype.setTabSize=function(e){this.positionMapper.setTabSize(e),this.outputLineCount=this.positionMapper.getOutputLineCount()},e.prototype.setWrappingColumn=function(e){this.positionMapper.setWrappingColumn(e),this.outputLineCount=this.positionMapper.getOutputLineCount()},e.prototype.getOutputLineCount=function(){return this.outputLineCount},e.prototype.getInputStartOffsetOfOutputLineIndex=function(e){return this.positionMapper.getInputOffsetOfOutputPosition(e,0)},e.prototype.getInputEndOffsetOfOutputLineIndex=function(e,t,n){return n+1===this.outputLineCount?e.getLineMaxColumn(t)-1:this.positionMapper.getInputOffsetOfOutputPosition(n+1,0)},e.prototype.getOutputLineContent=function(e,t,n){var i=this.getInputStartOffsetOfOutputLineIndex(n),r=this.getInputEndOffsetOfOutputLineIndex(e,t,n);return e.getLineContent(t).substring(i,r)},e.prototype.getOutputLineMaxColumn=function(e,t,n){return this.getOutputLineContent(e,t,n).length+1},e.prototype.getOutputLineTokens=function(e,t,n){var r=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n);return new i.FilteredLineTokens(e.getLineTokens(t,!0),r,o)},e.prototype.getInputColumnOfOutputPosition=function(e,t){return this.positionMapper.getInputOffsetOfOutputPosition(e,t-1)+1},e.prototype.getOutputPositionOfInputPosition=function(e,t){this.positionMapper.getOutputPositionOfInputOffset(t-1,s);var n=s.outputLineIndex,i=s.outputOffset+1;return new r.Position(e+n,i)},e}(),u=function(){function e(e,t,n,i){this.model=e,this.tabSize=n,this.wrappingColumn=i,this.linePositionMapperFactory=t,this.constructLines(),this.tmpIndexOfResult={index:0,remainder:0}}return e.prototype.constructLines=function(){this.lines=[];for(var e,t,i=[],r=0,o=this.model.getLineCount();o>r;r++)t=this.linePositionMapperFactory.createLineMapper(this.model.getLineContent(r+1),this.tabSize,this.wrappingColumn),e=new a(t),i[r]=e.getOutputLineCount(),this.lines[r]=e;this.prefixSumComputer=new n.PrefixSumComputer(i)},e.prototype.setTabSize=function(e,t){if(this.tabSize===e)return!1;this.tabSize=e;for(var n=0;n=0;d--)u=this.linePositionMapperFactory.createLineMapper(n[d],this.tabSize,this.wrappingColumn),r=new a(u),this.lines.splice(e-1,0,r),s=r.getOutputLineCount(),c+=s,this.prefixSumComputer.insertValue(e-1,s);var h={fromLineNumber:l,toLineNumber:l+c-1};i(o.EventNames.LinesInsertedEvent,h)},e.prototype.onModelLineChanged=function(e,t,n){var i=e-1,r=this.lines[i].getOutputLineCount();this.lines[i].setLineText(t);var s=this.lines[i].getOutputLineCount(),a=!1,u=0,l=-1,c=0,d=-1,h=0,p=-1;r>s?(u=1===e?1:this.prefixSumComputer.getAccumulatedValue(e-2)+1,l=u+s-1,h=l+1,p=h+(r-s)-1,a=!0):s>r?(u=1===e?1:this.prefixSumComputer.getAccumulatedValue(e-2)+1,l=u+r-1,c=l+1,d=c+(s-r)-1,a=!0):(u=1===e?1:this.prefixSumComputer.getAccumulatedValue(e-2)+1,l=u+s-1),this.prefixSumComputer.changeValue(i,s);var f,g,m,v;if(l>=u)for(var f=u;l>=f;f++)g={lineNumber:f},n(o.EventNames.LineChangedEvent,g);return d>=c&&(m={fromLineNumber:c,toLineNumber:d},n(o.EventNames.LinesInsertedEvent,m)),p>=h&&(v={fromLineNumber:h,toLineNumber:p},n(o.EventNames.LinesDeletedEvent,v)),a},e.prototype.getOutputLineCount=function(){return this.prefixSumComputer.getTotalValue()},e.prototype.getOutputLineContent=function(e){this.prefixSumComputer.getIndexOf(e-1,this.tmpIndexOfResult); var t=this.tmpIndexOfResult.index,n=this.tmpIndexOfResult.remainder;return this.lines[t].getOutputLineContent(this.model,t+1,n)},e.prototype.getOutputLineMaxColumn=function(e){this.prefixSumComputer.getIndexOf(e-1,this.tmpIndexOfResult);var t=this.tmpIndexOfResult.index,n=this.tmpIndexOfResult.remainder;return this.lines[t].getOutputLineMaxColumn(this.model,t+1,n)},e.prototype.getOutputLineTokens=function(e){this.prefixSumComputer.getIndexOf(e-1,this.tmpIndexOfResult);var t=this.tmpIndexOfResult.index,n=this.tmpIndexOfResult.remainder;return this.lines[t].getOutputLineTokens(this.model,t+1,n)},e.prototype.convertOutputPositionToInputPosition=function(e,t){this.prefixSumComputer.getIndexOf(e-1,this.tmpIndexOfResult);var n=this.tmpIndexOfResult.index,i=this.tmpIndexOfResult.remainder,o=this.lines[n].getInputColumnOfOutputPosition(i,t);return new r.Position(n+1,o)},e.prototype.convertInputPositionToOutputPosition=function(e,t){var n=1+(1===e?0:this.prefixSumComputer.getAccumulatedValue(e-2)),i=this.lines[e-1].getOutputPositionOfInputPosition(n,t);return i},e}();t.SplitLinesCollection=u}),define("vs/editor/core/view/model/viewModelDecorations",["require","exports","vs/editor/core/range","vs/editor/core/view/viewContext"],function(e,t,n,i){var r=function(){function e(e,t,n){this.editorId=e,this.configuration=t,this.converter=n,this.decorations=[]}return e.prototype.dispose=function(){this.converter=null,this.decorations=null},e.compareDecorations=function(e,t){return n.compareRangesUsingStarts(e.range,t.range)},e.prototype.reset=function(t){var n,i,r,o,s=t.getAllDecorations(this.editorId,this.configuration.editor.readOnly);for(this.decorations=[],n=0,i=s.length;i>n;n++)r=s[n],o={id:r.id,options:r.options,ownerId:r.ownerId,modelRange:r.range,range:this.converter.convertModelRangeToViewRange(r.range,r.options.isWholeLine)},this.decorations[n]=o;this.decorations.sort(e.compareDecorations)},e.prototype.onModelDecorationsChanged=function(t,n){var r,o,s,a=!1,u={},l={},c=this.configuration.editor.readOnly;for(o=0,s=t.addedOrChangedDecorations.length;s>o;o++)r=t.addedOrChangedDecorations[o],c&&r.isForValidation||r.ownerId&&r.ownerId!==this.editorId||(l[r.id]=r);for(o=0,s=t.removedDecorations.length;s>o;o++)u[t.removedDecorations[o]]=!0;var d,h={};for(o=0,s=this.decorations.length;s>o;o++)d=this.decorations[o],l.hasOwnProperty(d.id)&&(h[d.id]=!0,r=l[d.id],d.options=r.options,d.modelRange=r.range,d.range=this.converter.convertModelRangeToViewRange(r.range,r.options.isWholeLine),a=!0),u.hasOwnProperty(d.id)&&(this.decorations.splice(o,1),s--,o--,a=!0);var p;for(p in l)!h.hasOwnProperty(p)&&l.hasOwnProperty(p)&&(r=l[p],d={id:r.id,options:r.options,ownerId:r.ownerId,modelRange:r.range,range:this.converter.convertModelRangeToViewRange(r.range,r.options.isWholeLine)},this.decorations.push(d),a=!0);if(a){this.decorations.sort(e.compareDecorations);var f=null;n(i.EventNames.DecorationsChangedEvent,f)}},e.prototype.onLineMappingChanged=function(t){var r,o,s,a,u=this.decorations,l=!1;for(o=0,a=u.length;a>o;o++)r=u[o],s=this.converter.convertModelRangeToViewRange(r.modelRange,r.options.isWholeLine),l||n.equalsRange(s,r.range)||(l=!0),r.range=s;if(l){this.decorations.sort(e.compareDecorations);var c=null;t(i.EventNames.DecorationsChangedEvent,c)}},e.prototype.getAllDecorations=function(){return this.decorations},e.prototype.getInlineDecorations=function(e){return this.getDecorationsInLines(e,e,!0)},e.prototype.getDecorationsInRange=function(e){return this.getDecorationsInLines(e.startLineNumber,e.endLineNumber,!1)},e.prototype.getDecorationsInLines=function(e,t,n){var i,r,o,s,a=[],u=0,l=this.decorations;for(o=0,s=l.length;s>o&&(i=l[o],r=i.range,!(r.startLineNumber>t));o++)r.endLineNumbert;t++)e.push(this.converter.convertModelSelectionToViewSelection(this.lastCursorSelectionChangedEvent.secondarySelections[t]));return e}return[new i.Selection(1,1,1,1)]},e.prototype.onCursorPositionChanged=function(e,t){this.lastCursorPositionChangedEvent=e;var n=this.converter.validateViewPosition(e.viewPosition.lineNumber,e.viewPosition.column,e.position),i=this.configuration.editor.stopRenderingLineAfter;-1!==i&&n.column>i&&(n=n.clone(),n.column=i);for(var o=[],s=0,a=e.secondaryPositions.length;a>s;s++)o[s]=this.converter.validateViewPosition(e.secondaryViewPositions[s].lineNumber,e.secondaryViewPositions[s].column,e.secondaryPositions[s]),-1!==i&&o[s].column>i&&(o[s]=o[s].clone(),o[s].column=i);var u={position:n,secondaryPositions:o,isInEditableRange:e.isInEditableRange};t(r.EventNames.CursorPositionChangedEvent,u)},e.prototype.onCursorSelectionChanged=function(e,t){this.lastCursorSelectionChangedEvent=e;for(var n=this.converter.convertModelSelectionToViewSelection(e.selection),i=[],o=0,s=e.secondarySelections.length;s>o;o++)i[o]=this.converter.convertModelSelectionToViewSelection(e.secondarySelections[o]);var a={selection:n,secondarySelections:i};t(r.EventNames.CursorSelectionChangedEvent,a)},e.prototype.onCursorRevealRange=function(e,t){var i=null;if(e.viewRange){var o=this.converter.validateViewPosition(e.viewRange.startLineNumber,e.viewRange.startColumn,e.range.getStartPosition()),s=this.converter.validateViewPosition(e.viewRange.endLineNumber,e.viewRange.endColumn,e.range.getEndPosition());i=new n.Range(o.lineNumber,o.column,s.lineNumber,s.column)}else i=this.converter.convertModelRangeToViewRange(e.range);var a={range:i,revealVerticalInCenter:e.revealVerticalInCenter,revealHorizontal:e.revealHorizontal};t(r.EventNames.RevealRangeEvent,a)},e.prototype.onLineMappingChanged=function(e){this.lastCursorPositionChangedEvent&&this.onCursorPositionChanged(this.lastCursorPositionChangedEvent,e),this.lastCursorSelectionChangedEvent&&this.onCursorSelectionChanged(this.lastCursorSelectionChangedEvent,e)},e}();t.ViewModelCursors=o});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/view/model/viewModel",["require","exports","vs/base/eventEmitter","vs/editor/core/view/viewContext","vs/editor/core/constants","vs/editor/core/selection","vs/editor/core/range","vs/editor/core/view/model/viewModelDecorations","vs/editor/core/view/model/viewModelCursors","vs/base/strings","vs/editor/core/position"],function(e,t,n,i,r,o,s,a,u,l,c){var d=function(e){function t(t,n,i,r){var o=this;e.call(this),this.lines=t,this.editorId=n,this.configuration=i,this.model=r,this.restoreCurrentCenteredModelRange=null,this.isHandlingExternalEvents=!1,this.decorations=new a.ViewModelDecorations(this.editorId,this.configuration,{convertModelRangeToViewRange:function(e,t){return t?o.convertWholeLineModelRangeToViewRange(e):o.convertModelRangeToViewRange(e)}}),this.decorations.reset(this.model),this.cursors=new u.ViewModelCursors(this.configuration,this),this.listenersToRemove=[],this.listenersToRemove.push(this.model.addBulkListener(function(e){return o.onEvents(e)})),this.listenersToRemove.push(this.configuration.addBulkListener(function(e){return o.onEvents(e)}))}return __extends(t,e),t.prototype.dispose=function(){this.listenersToRemove.forEach(function(e){e()}),this.listenersToRemove=[],this.decorations.dispose(),this.decorations=null,this.lines=null,this.configuration=null,this.model=null},t.prototype.setTabSize=function(e){var t=this;this.deferredEmit(function(){var n=t.lines.setTabSize(e,function(e,n){return t.emit(e,n)});n&&(t.emit(i.EventNames.LineMappingChangedEvent),t.decorations.onLineMappingChanged(function(e,n){return t.emit(e,n)}),t.cursors.onLineMappingChanged(function(e,n){return t.emit(e,n)}))})},t.prototype.restoreCenteredModelRange=function(){if(this.restoreCurrentCenteredModelRange){var e=this.convertModelRangeToViewRange(this.restoreCurrentCenteredModelRange);this.restoreCurrentCenteredModelRange=null;var t={range:e,revealVerticalInCenter:!0,revealHorizontal:!1};this.emit(i.EventNames.RevealRangeEvent,t)}},t.prototype.setWrappingColumn=function(e,t){var n=this;this.restoreCurrentCenteredModelRange=null;var r=!1;this.deferredEmit(function(){if(t){var o=new s.Range(t,1,t,n.getLineMaxColumn(t));n.restoreCurrentCenteredModelRange=n.convertViewRangeToModelRange(o)}r=n.lines.setWrappingColumn(e,function(e,t){return n.emit(e,t)}),r?(n.emit(i.EventNames.LineMappingChangedEvent),n.decorations.onLineMappingChanged(function(e,t){return n.emit(e,t)}),n.cursors.onLineMappingChanged(function(e,t){return n.emit(e,t)})):n.restoreCurrentCenteredModelRange=null,n.isHandlingExternalEvents||n.restoreCenteredModelRange()})},t.prototype.addEventSource=function(e){var t=this;this.listenersToRemove.push(e.addBulkListener(function(e){return t.onEvents(e)}))},t.prototype.onEvents=function(e){var t=this;this.isHandlingExternalEvents=!0,this.deferredEmit(function(){var n,o,s,a,u,l=!1,c=!1;for(n=0,o=e.length;o>n;n++)switch(s=e[n],a=s.getData(),s.getType()){case r.EventType.ModelContentChanged:switch(u=a,u.changeType){case r.EventType.ModelContentChangedFlush:t.onModelFlushed(u),l=!0;break;case r.EventType.ModelContentChangedLinesDeleted:t.onModelLinesDeleted(u),l=!0;break;case r.EventType.ModelContentChangedLinesInserted:t.onModelLinesInserted(u),l=!0;break;case r.EventType.ModelContentChangedLineChanged:c=t.onModelLineChanged(u);break;default:console.info("ViewModel received unkown event: "),console.info(s)}break;case r.EventType.ModelTokensChanged:t.onModelTokensChanged(a);break;case r.EventType.ModelModeChanged:break;case r.EventType.ModelPropertiesChanged:break;case r.EventType.ModelDecorationsChanged:t.onModelDecorationsChanged(a);break;case r.EventType.ModelDispose:break;case r.EventType.CursorPositionChanged:t.onCursorPositionChanged(a);break;case r.EventType.CursorSelectionChanged:t.onCursorSelectionChanged(a);break;case r.EventType.CursorRevealRange:t.onCursorRevealRange(a);break;case r.EventType.ConfigurationChanged:t.setTabSize(t.configuration.getIndentationOptions().tabSize),t.emit(s.getType(),a);break;default:console.info("View received unkown event: "),console.info(s)}!l&&c&&(t.emit(i.EventNames.LineMappingChangedEvent),t.decorations.onLineMappingChanged(function(e,n){return t.emit(e,n)}),t.cursors.onLineMappingChanged(function(e,n){return t.emit(e,n)}))}),this.restoreCenteredModelRange(),this.isHandlingExternalEvents=!1},t.prototype.onModelFlushed=function(){var e=this;this.lines.onModelFlushed(function(t,n){return e.emit(t,n)}),this.decorations.reset(this.model)},t.prototype.onModelDecorationsChanged=function(e){var t=this;this.decorations.onModelDecorationsChanged(e,function(e,n){return t.emit(e,n)})},t.prototype.onModelLinesDeleted=function(e){var t=this;this.lines.onModelLinesDeleted(e.fromLineNumber,e.toLineNumber,function(e,n){return t.emit(e,n)})},t.prototype.onModelTokensChanged=function(e){var t=this.convertModelPositionToViewPosition(e.fromLineNumber,1).lineNumber,n=this.convertModelPositionToViewPosition(e.toLineNumber,this.model.getLineMaxColumn(e.toLineNumber)).lineNumber,e={fromLineNumber:t,toLineNumber:n};this.emit(i.EventNames.TokensChangedEvent,e)},t.prototype.onModelLineChanged=function(e){var t=this,n=this.lines.onModelLineChanged(e.lineNumber,e.detail,function(e,n){return t.emit(e,n)});return n},t.prototype.onModelLinesInserted=function(e){var t=this;this.lines.onModelLinesInserted(e.fromLineNumber,e.toLineNumber,e.detail.split("\n"),function(e,n){return t.emit(e,n)})},t.prototype.validateViewPosition=function(e,t,n){1>e&&(e=1);var i=this.getLineCount();e>i&&(e=i);var r=this.getLineMaxColumn(e);1>t&&(t=1),t>r&&(t=r);var o=this.convertViewPositionToModelPosition(e,t);return o.equals(n)?new c.Position(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)},t.prototype.onCursorPositionChanged=function(e){var t=this;this.cursors.onCursorPositionChanged(e,function(e,n){return t.emit(e,n)})},t.prototype.onCursorSelectionChanged=function(e){var t=this;this.cursors.onCursorSelectionChanged(e,function(e,n){return t.emit(e,n)})},t.prototype.onCursorRevealRange=function(e){var t=this;this.cursors.onCursorRevealRange(e,function(e,n){return t.emit(e,n)})},t.prototype.getLineCount=function(){return this.lines.getOutputLineCount()},t.prototype.getLineContent=function(e){return this.lines.getOutputLineContent(e)},t.prototype.getLineMaxColumn=function(e){return this.lines.getOutputLineMaxColumn(e)},t.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=l.firstNonWhitespaceIndex(this.getLineContent(e));return-1===t?0:t+1},t.prototype.getLineLastNonWhitespaceColumn=function(e){var t=l.lastNonWhitespaceIndex(this.getLineContent(e));return-1===t?0:t+2},t.prototype.getLineTokens=function(e){return this.lines.getOutputLineTokens(e)},t.prototype.getInlineDecorations=function(e){return this.decorations.getInlineDecorations(e)},t.prototype.getLineRenderLineNumber=function(e){var t=this.convertViewPositionToModelPosition(e,1);if(1!==t.column)return"";var n=t.lineNumber;return"function"==typeof this.configuration.editor.lineNumbers?this.configuration.editor.lineNumbers(n):n.toString()},t.prototype.getDecorationsInRange=function(e){return this.decorations.getDecorationsInRange(e)},t.prototype.getAllDecorations=function(){return this.decorations.getAllDecorations()},t.prototype.getValueInRange=function(e,t){var n=this.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)},t.prototype.getModelLineContent=function(e){return this.model.getLineContent(e)},t.prototype.getSelections=function(){return this.cursors.getSelections()},t.prototype.getModelLineMaxColumn=function(e){return this.model.getLineMaxColumn(e)},t.prototype.validateModelPosition=function(e){return this.model.validatePosition(e)},t.prototype.convertViewPositionToModelPosition=function(e,t){return this.lines.convertOutputPositionToInputPosition(e,t)},t.prototype.convertViewRangeToModelRange=function(e){var t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new s.Range(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.convertModelPositionToViewPosition=function(e,t){return this.lines.convertInputPositionToOutputPosition(e,t)},t.prototype.convertModelSelectionToViewSelection=function(e){var t=this.convertModelPositionToViewPosition(e.selectionStartLineNumber,e.selectionStartColumn),n=this.convertModelPositionToViewPosition(e.positionLineNumber,e.positionColumn);return new o.Selection(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.convertModelRangeToViewRange=function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return new s.Range(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.convertWholeLineModelRangeToViewRange=function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,this.model.getLineMaxColumn(e.endLineNumber));return new s.Range(t.lineNumber,t.column,n.lineNumber,n.column)},t}(n.EventEmitter);t.ViewModel=d}),define("vs/css!vs/editor/css/editor",["vs/css!vs/editor/editor.main"],{}),define("vs/css!vs/editor/css/default-theme",["vs/css!vs/editor/editor.main"],{});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/codeEditorWidget",["require","exports","vs/base/lib/winjs.base","vs/editor/core/constants","vs/editor/core/internalConstants","vs/base/objects","vs/base/types","vs/platform/platform","vs/base/dom/dom","vs/base/eventEmitter","vs/editor/core/config/configuration","vs/editor/core/controller/cursor","vs/editor/core/view/viewImpl","vs/editor/core/view/model/characterHardWrappingLineMapper","vs/editor/core/view/model/splitLinesCollection","vs/editor/core/view/model/viewModel","vs/editor/core/position","vs/editor/core/range","vs/editor/core/selection","vs/base/performance/timer","vs/editor/editorExtensions","vs/base/ui/actions","vs/editor/editor","vs/css!./../css/editor","vs/css!./../css/default-theme"],function(e,t,n,i,r,o,s,a,u,l,c,d,h,p,f,g,m,v,y,_,b,C){var w=0,S=function(e){function t(t,n,r){var o=this;e.call(this);var s=_.start(0,"CodeEditor.ctor");this.id=++w,this.domElement=n,this._lifetimeListeners=[],r=r||{};var l=null;r.model&&(l=r.model,delete r.model),this.configuration=new c.Configuration(r,n,function(e){return o.model?o.model.guessIndentation(e):null}),this._lifetimeListeners.push(this.configuration.addListener(i.EventType.ConfigurationChanged,function(e){return o.emit(i.EventType.ConfigurationChanged,e)})),this.forcedWidgetFocusCount=0,this.focusTracker=u.trackFocus(this.domElement),this.focusTracker.addFocusListener(function(){0===o.forcedWidgetFocusCount&&o.emit("widgetFocus",{})}),this.focusTracker.addBlurListener(function(){0===o.forcedWidgetFocusCount&&o.emit("widgetBlur",{})}),this.handlerService=t.handlerService,this._telemetryService=t.telemetryService,this.handlerService?(this.bindings=this.configuration.bindKeys(this.handlerService),this.bindings.deactivate(),this._lifetimeListeners.push(this.addListener("blur",function(){return o.bindings.deactivate()})),this._lifetimeListeners.push(this.addListener("focus",function(){return o.bindings.activate()}))):this.bindings=null,this._attachModel(l),this.contentWidgets={},this.overlayWidgets={},this.contributions={};for(var d=a.Registry.as(b.Extensions.EditorContributions),h=d.getEditorContributions2(),p=0,f=h.length;f>p;p++){var g=h[p].createInstance(t.instantiationService,this);this.contributions[g.getId()]=g}s.stop()}return __extends(t,e),t.prototype.getEditorType=function(){return i.EditorType.ICodeEditor},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){for(;this._lifetimeListeners.length>0;)this._lifetimeListeners.pop()();var t;for(t in this.contributions)this.contributions.hasOwnProperty(t)&&this.contributions[t].dispose();this.contributions={},this.contentWidgets={},this.overlayWidgets={},this.bindings&&(this.bindings.dispose(),this.bindings=null),this.focusTracker.dispose(),this._postDetachModelCleanup(this._detachModel()),this.configuration.dispose(),this.emit(i.EventType.Disposed,{}),e.prototype.dispose.call(this)},t.prototype.updateOptions=function(e){this.configuration.updateOptions(e)},t.prototype.getConfiguration=function(){return o.clone(this.configuration.editor)},t.prototype.getRawConfiguration=function(){return this.configuration.getRawOptions()},t.prototype.getIndentationOptions=function(){return o.clone(this.configuration.getIndentationOptions())},t.prototype.normalizeIndentation=function(e){return this.configuration.normalizeIndentation(e)},t.prototype.getValue=function(e){if("undefined"==typeof e&&(e=null),this.model){var t=e&&e.preserveBOM?!0:!1,n=0;return e&&e.lineEnding&&"\n"===e.lineEnding?n=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(n=2),this.model.getValue(n,t)}return""},t.prototype.setValue=function(e){this.model&&this.model.setValue(e)},t.prototype.getView=function(){return this._view},t.prototype.getModel=function(){return this.model},t.prototype.setModel=function(e){if("undefined"==typeof e&&(e=null),this.model!==e){var t=this._detachModel();this._attachModel(e),this.emit(i.EventType.ModelChanged),this._postDetachModelCleanup(t)}},t.prototype.getDomNode=function(){return this.hasView?this._view.domNode:null},t.prototype.getPosition=function(){return this.cursor?this.cursor.getPosition().clone():null},t.prototype.setPosition=function(e,t,n,i){if("undefined"==typeof t&&(t=!1),"undefined"==typeof n&&(n=!1),"undefined"==typeof i&&(i=!1),this.cursor){if(!m.isIPosition(e))throw new Error("Invalid arguments");this.cursor.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}]),t&&this.revealPosition(e,n,i)}},t.prototype.revealPosition=function(e,t,n){if("undefined"==typeof t&&(t=!1),"undefined"==typeof n&&(n=!1),!m.isIPosition(e))throw new Error("Invalid arguments");this.revealRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},t,n)},t.prototype.getSelection=function(){return this.cursor?this.cursor.getSelection().clone():null},t.prototype.getSelections=function(){if(!this.cursor)return null;for(var e=this.cursor.getSelections(),t=[],n=0,i=e.length;i>n;n++)t[n]=e[n].clone();return t},t.prototype.setSelection=function(e,t,n,i){"undefined"==typeof t&&(t=!1),"undefined"==typeof n&&(n=!1),"undefined"==typeof i&&(i=!1);var r=y.isISelection(e),o=v.isIRange(e);if(!r&&!o)throw new Error("Invalid arguments");if(r)this._setSelectionImpl(e,t,n,i);else if(o){var s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t,n,i)}},t.prototype._setSelectionImpl=function(e,t,n,i){if(this.cursor){var r=new y.Selection(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this.cursor.setSelections("api",[r]),t&&this.revealRange(r,n,i)}},t.prototype.revealRange=function(e,t,n){if("undefined"==typeof t&&(t=!1),"undefined"==typeof n&&(n=!1),this.model&&this.cursor){if(!v.isIRange(e))throw new Error("Invalid arguments");var r=this.model.validateRange(e),o={range:r,viewRange:null,revealVerticalInCenter:t,revealHorizontal:n};this.cursor.emit(i.EventType.CursorRevealRange,o)}},t.prototype.setSelections=function(e){if(this.cursor){if(!e||0===e.length)throw new Error("Invalid arguments");for(var t=0,n=e.length;n>t;t++)if(!y.isISelection(e[t]))throw new Error("Invalid arguments");this.cursor.setSelections("api",e)}},t.prototype.setScrollTop=function(e){if(this.hasView){if("number"!=typeof e)throw new Error("Invalid arguments");this._view.getCodeEditorHelper().setScrollTop(e)}},t.prototype.getScrollTop=function(){return this.hasView?this._view.getCodeEditorHelper().getScrollTop():-1},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.hasView&&this._view.getCodeEditorHelper().delegateVerticalScrollbarMouseDown(e)},t.prototype.setScrollLeft=function(e){if(this.hasView){if("number"!=typeof e)throw new Error("Invalid arguments");this._view.getCodeEditorHelper().setScrollLeft(e)}},t.prototype.getScrollLeft=function(){return this.hasView?this._view.getCodeEditorHelper().getScrollLeft():-1},t.prototype.saveViewState=function(){if(!this.cursor||!this.hasView)return null;var e=this.cursor.saveState(),t=this._view.saveState();return{cursorState:e,viewState:t}},t.prototype.restoreViewState=function(e){if(this.cursor&&this.hasView){var t=e;if(t&&t.cursorState&&t.viewState){var n=t,i=n.cursorState;s.isArray(i)?this.cursor.restoreState(i):this.cursor.restoreState([i]),this._view.restoreState(n.viewState)}}},t.prototype.layout=function(e){this.configuration.observeReferenceElement(e)},t.prototype.onVisible=function(){},t.prototype.onHide=function(){},t.prototype.focus=function(){this.hasView&&this._view.focus()},t.prototype.beginForcedWidgetFocus=function(){this.forcedWidgetFocusCount++},t.prototype.endForcedWidgetFocus=function(){this.forcedWidgetFocusCount--},t.prototype.isFocused=function(){return this.hasView&&this._view.isFocused()},t.prototype.getContribution=function(e){return this.contributions[e]||null},t.prototype.getActions=function(){var e,t=[];for(e in this.contributions)if(this.contributions.hasOwnProperty(e)){var n=this.contributions[e];C.isAction(n)&&t.push(n)}return t},t.prototype.getAction=function(e){var t=this.contributions[e];return t&&C.isAction(t)?t:null},t.prototype.trigger=function(e,t,i){var r=this.getAction(t);null!==r?r.enabled&&n.Promise.as(r.run()).done():this.configuration.handlerDispatcher.trigger(e,t,i)},t.prototype.executeCommand=function(e,t){return this.configuration.handlerDispatcher.trigger(e,r.Handler.ExecuteCommand,t)},t.prototype.executeCommands=function(e,t){return this.configuration.handlerDispatcher.trigger(e,r.Handler.ExecuteCommands,t)},t.prototype.addContentWidget=function(e){var t={widget:e,position:e.getPosition()};this.contentWidgets[e.getId()]=t,this.hasView&&this._view.addContentWidget(t)},t.prototype.layoutContentWidget=function(e){var t=e.getId();if(this.contentWidgets.hasOwnProperty(t)){var n=this.contentWidgets[t];n.position=e.getPosition(),this.hasView&&this._view.layoutContentWidget(n)}},t.prototype.removeContentWidget=function(e){var t=e.getId();if(this.contentWidgets.hasOwnProperty(t)){var n=this.contentWidgets[t];delete this.contentWidgets[t],this.hasView&&this._view.removeContentWidget(n)}},t.prototype.addOverlayWidget=function(e){var t={widget:e,position:e.getPosition()};this.overlayWidgets[e.getId()]=t,this.hasView&&this._view.addOverlayWidget(t)},t.prototype.layoutOverlayWidget=function(e){var t=e.getId();if(this.overlayWidgets.hasOwnProperty(t)){var n=this.overlayWidgets[t];n.position=e.getPosition(),this.hasView&&this._view.layoutOverlayWidget(n)}},t.prototype.removeOverlayWidget=function(e){var t=e.getId();if(this.overlayWidgets.hasOwnProperty(t)){var n=this.overlayWidgets[t];delete this.overlayWidgets[t],this.hasView&&this._view.removeOverlayWidget(n)}},t.prototype.changeDecorations=function(e){return this.model?this.model.changeDecorations(e,this.id):null},t.prototype.getLineDecorations=function(e){return this.model?this.model.getLineDecorations(e,this.id,this.configuration.editor.readOnly):null},t.prototype.deltaDecorations=function(e,t){return this.model?this.model.deltaDecorations(e,t,this.id):[]},t.prototype.changeViewZones=function(e){this.hasView&&this._view.change(e)},t.prototype.addTypingListener=function(e,t){var n=this;return this.cursor?(this.cursor.addTypingListener(e,t),function(){n.cursor&&n.cursor.removeTypingListener(e,t)}):null},t.prototype.getTopForLineNumber=function(e){return this.hasView?this._view.getCodeEditorHelper().getVerticalOffsetForLineNumber(e):-1},t.prototype.getScrolledVisiblePosition=function(e){if(!this.hasView)return null;var t=this.model.validatePosition(e),n=this._view.getCodeEditorHelper(),i=n.getLayoutInfo(),r=n.getVerticalOffsetForLineNumber(t.lineNumber)-n.getScrollTop(),o=n.getOffsetForColumn(t.lineNumber,t.column)+i.glyphMarginWidth+i.lineNumbersWidth+i.decorationsWidth-n.getScrollLeft();return{top:r,left:o,height:this.configuration.editor.lineHeight}},t.prototype.getOffsetForColumn=function(e,t){return this.hasView?this._view.getCodeEditorHelper().getOffsetForColumn(e,t):-1},t.prototype.getLayoutInfo=function(){return this.hasView?this._view.getCodeEditorHelper().getLayoutInfo():null},t.prototype._attachModel=function(e){var t=this;if(this.model=e?e:null,this.listenersToRemove=[],this._view=null,this.viewModel=null,this.cursor=null,this.model){this.model.setStopLineTokenizationAfter(this.configuration.editor.stopLineTokenizationAfter),this.configuration.setIsDominatedByLongLines(this.model.isDominatedByLongLines(this.configuration.editor.longLineBoundary)),this.configuration.resetIndentationOptions();var n=this.configuration.getWrappingColumn(),r=-1;n>0&&(r=n);var o=new p.CharacterHardWrappingLineMapperFactory(this.configuration.editor.wordWrapBreakBeforeCharacters,this.configuration.editor.wordWrapBreakAfterCharacters,this.configuration.editor.wordWrapBreakObtrusiveCharacters),s=new f.SplitLinesCollection(this.model,o,this.configuration.getIndentationOptions().tabSize,r);this.viewModel=new g.ViewModel(s,this.id,this.configuration,this.model);var a={viewModel:this.viewModel,convertModelPositionToViewPosition:function(e,n){return t.viewModel.convertModelPositionToViewPosition(e,n)},convertViewToModelPosition:function(e,n){return t.viewModel.convertViewPositionToModelPosition(e,n)},validateViewPosition:function(e,n,i){return t.viewModel.validateViewPosition(e,n,i)}};this.cursor=new d.Cursor(this.id,this.configuration,this.model,function(e){return t._view.renderOnce(e)},a),this.viewModel.addEventSource(this.cursor),this._view=new h.View(this.id,this.configuration,this.viewModel,this._telemetryService),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.ViewFocusGained,function(){t.emit("focus"),t.emit("widgetFocus",{})})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener("scroll",function(e){return t.emit("scroll",e)})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.ViewFocusLost,function(){return t.emit("blur")})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.ContextMenu,function(e){return t.emit(i.EventType.ContextMenu,e)})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.MouseDown,function(e){return t.emit(i.EventType.MouseDown,e)})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.MouseUp,function(e){return t.emit(i.EventType.MouseUp,e)})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.KeyUp,function(e){return t.emit(i.EventType.KeyUp,e)})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.MouseMove,function(e){return t.emit(i.EventType.MouseMove,e)})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.MouseLeave,function(e){return t.emit(i.EventType.MouseLeave,e)})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.KeyDown,function(e){return t.emit(i.EventType.KeyDown,e)})),this.listenersToRemove.push(this._view.getInternalEventBus().addListener(i.EventType.ViewLayoutChanged,function(e){return t.emit(i.EventType.EditorLayout,e)})),this.listenersToRemove.push(this.model.addListener(i.EventType.ModelDecorationsChanged,function(e){t.emit(i.EventType.ModelDecorationsChanged,e)})),this.listenersToRemove.push(this.model.addListener(i.EventType.ModelModeChanged,function(e){t.emit(i.EventType.ModelModeChanged,e)})),this.listenersToRemove.push(this.model.addListener(i.EventType.ModelContentChanged,function(){t.emit("change",{})})),this.listenersToRemove.push(this.cursor.addListener(i.EventType.CursorPositionChanged,function(e){return t.emit(i.EventType.CursorPositionChanged,e)})),this.listenersToRemove.push(this.cursor.addListener(i.EventType.CursorSelectionChanged,function(e){return t.emit(i.EventType.CursorSelectionChanged,e)})),this.listenersToRemove.push(this.model.addListener(i.EventType.ModelDispose,function(){t.setModel(null)})),this.domElement.appendChild(this._view.domNode),this._view.renderOnce(function(){var e;for(e in t.contentWidgets)t.contentWidgets.hasOwnProperty(e)&&t._view.addContentWidget(t.contentWidgets[e]);for(e in t.overlayWidgets)t.overlayWidgets.hasOwnProperty(e)&&t._view.addOverlayWidget(t.overlayWidgets[e]);t._view.render(),t.hasView=!0})}else this.hasView=!1},t.prototype._postDetachModelCleanup=function(e){e&&e.removeAllDecorationsWithOwnerId(this.id)},t.prototype._detachModel=function(){this.hasView=!1,this.listenersToRemove.forEach(function(e){e()}),this.listenersToRemove=[],this.cursor&&(this.cursor.dispose(),this.cursor=null),this._view&&(this._view.dispose(),this.domElement.removeChild(this._view.domNode),this._view=null),this.viewModel&&(this.viewModel.dispose(),this.viewModel=null);var e=this.model;return this.model=null,e},t}(l.EventEmitter); t.CodeEditorWidget=S}),define("vs/base/diagnostics",["require","exports"],function(e,t){function n(e,t){return function(){}}var i=self;i.Monaco||(i.Monaco={}),i.Monaco.Diagnostics={};i.Monaco.Diagnostics;t.register=n}),define("vs/platform/handlerService",["require","exports","vs/nls!vs/editor/editor.main","vs/base/diagnostics","vs/base/env","vs/base/dom/dom","vs/base/dom/keyboardEvent"],function(e,t,n,i,r,o,s){function a(e,t){"undefined"==typeof t&&(t=!1);var i=[];return(e.ctrlCmd&&!r.browser.isMacintosh||e.winCtrl&&r.browser.isMacintosh)&&i.push(t?n.localize("vs_platform_handlerService",0):"Ctrl"),e.shift&&i.push(t?n.localize("vs_platform_handlerService",1):"Shift"),e.alt&&i.push(t?n.localize("vs_platform_handlerService",2):"Alt"),(e.ctrlCmd&&r.browser.isMacintosh||e.winCtrl&&!r.browser.isMacintosh)&&i.push(t?n.localize("vs_platform_handlerService",3):"Meta"),i.push(e.key),t?i.join("+"):i.join("-")}t.asString=a;var u=i.register("HandlerServiceActivationVerbose",function(e,t,n){console.log(e+" > "+t.id+" > "+n)}),l=i.register("HandlerServiceFocusVisual",function(e,t){e.style.outlineWidth="5px",e.style.outlineStyle="solid",e.style.outlineColor=t===!0?"yellowgreen":t===!1?"red":"gray"}),c=i.register("HandlerServiceFocusTextual",function(e){console.log("got FOCUS @"+(new Date).getTime(),e)}),d=function(){function e(e,t){this.keyBinding=e,this.onEmpty=t,this.data=[]}return e.prototype.push=function(e,t){"undefined"==typeof t&&(t={});var n,i,r=this,o=this;return n=function(){for(var n=[],r=0;r GROUP disposal"),i.dispose())}catch(o){throw i.dispose(),o}return r}),o.push(r.bind(e,a))};return e(s),i=new h(o)},e.prototype.dispose=function(){this.unbind(),this.map=null},e}();t.HandlerService=p;var f=function(){function e(e){this.delegate=e,this.bindings=[]}return e.prototype.bind=function(e,t,n){var i=this.delegate.bind(e,t,n);return this.bindings.push(i),i},e.prototype.bindGroup=function(e,t){var n=this.delegate.bindGroup(e,t);return this.bindings.push(n),n},e.prototype.capture=function(){return new h(this.bindings)},e}();t.HandlerServiceWrapper=f;var g=function(){function e(e,t){var n=this;this.domNode=e,this.scopeNode=t,this.handlerActive=!1,l(this.scopeNode),this.unbind=o.addListener(this.domNode,o.EventType.FOCUS,function(e){c(e.target),n.update(o.isAncestor(e.target,n.scopeNode))},!0)}return e.prototype.injectHandlerService=function(e){this.delegate=e},e.prototype.update=function(e){this.handlerActive!==e&&(this.handlerActive=e),l(this.scopeNode,e)},e.prototype.bind=function(e,t,n){return this.delegate.bind(e,this.wrapHandler(t),n)},e.prototype.bindGroup=function(e,t){var n=this;return this.delegate.bindGroup(function(t){var i=function(e,i){t(e,n.wrapHandler(i))};e(i)},t)},e.prototype.wrapHandler=function(e){var t=this,n=function(){return t.handlerActive!==!0?!1:e.apply(e,arguments)};return n},e.prototype.dispose=function(){this.unbind()},e}();t.FocusTrackingHandlerService=g}),define("vs/editor/core/model/tokenIterator",["require","exports"],function(e,t){var n=function(){function e(e,t){this._model=e,this._currentLineNumber=t.lineNumber,this._currentTokenIndex=0,this._currentLineTokens=this._model._getInternalTokens(this._currentLineNumber),this._next=null,this._prev=null;for(var n=t.column-1,i=Number.MAX_VALUE,r=this._currentLineTokens.length-1;r>=0;r--){if(this._currentLineTokens[r].startIndex<=n&&i>=n){this._currentTokenIndex=r,this._next=this._current(),this._prev=this._current();break}i=this._currentLineTokens[r].startIndex}}return e.prototype._advanceNext=function(){if(this._prev=this._next,this._next=null,this._currentTokenIndex+10){this._currentTokenIndex=0,this._next=this._current();break}null===this._next&&(this._currentLineTokens=this._model._getInternalTokens(this._currentLineNumber),this._currentTokenIndex=this._currentLineTokens.length,this._advancePrev(),this._next=null)}},e.prototype._advancePrev=function(){if(this._next=this._prev,this._prev=null,this._currentTokenIndex>0)this._currentTokenIndex--,this._prev=this._current();else for(;this._currentLineNumber>1;)if(this._currentLineNumber--,this._currentLineTokens=this._model._getInternalTokens(this._currentLineNumber),this._currentLineTokens.length>0){this._currentTokenIndex=this._currentLineTokens.length-1,this._prev=this._current();break}},e.prototype._current=function(){return{token:this._currentLineTokens[this._currentTokenIndex],lineNumber:this._currentLineNumber,startColumn:this._currentLineTokens[this._currentTokenIndex].startIndex+1,endColumn:this._currentTokenIndex+1o;o++){if(l=o===a-1?d.length:h[o+1].startIndex,s>=m&&(g++,m=g+10&&(y=_.indexOf(w,C),C=y+w.length,c.push({start:s+y,end:s+C}))}}s=l}}return c},e._getWordsInText=function(e,t){var n,i,r,o,s,a,u=e.match(t)||[],l=[];for(n=0;n0&&(i=e.indexOf(a,r),r=i+a.length,o=i,s=r,l.push({start:o,end:s}));return l},e.getWordAtPosition=function(t,i,r,o){if("undefined"==typeof o&&(o=!1),o&&!t._lineIsTokenized(i.lineNumber))return e._getWordAtText(i.column,e.massageWordDefinitionOf(t.getMode()),t.getLineContent(i.lineNumber),0);var s=t._getInternalTokens(i.lineNumber),a=-1,u=-1;if(s.length>0&&(a=n.findIndexInSegmentsArray(s,i.column-1),a>0&&s[a].startIndex===i.column-1&&(u=a-1)),r&&(-1!==a||-1!==u)){var l=e._getNonWordTokenhMap(t);-1!==a&&l.hasOwnProperty(s[a].type)&&(a=-1),-1!==u&&l.hasOwnProperty(s[u].type)&&(u=-1)}var c,d=e.massageWordDefinitionOf(t.getModeAtPosition(i.lineNumber,i.column)),h=t.getLineContent(i.lineNumber),p=null;return p||-1===a||(c=h.substring(s[a].startIndex,a+10&&(o=n.indexOf(l,s),s=o+l.length,a=i+o+1,u=i+s+1,e>=a&&u>=e))return{word:l,startColumn:a,endColumn:u};return null},e._getNonWordTokenhMap=function(e){var t,n,i=e._getNonWordTokenTypes(),r={};for(t=0,n=i.length;n>t;t++)r[i[t]]=!0;return r},e}();t.WordHelper=s;var a=function(){function e(){}return e._sign=function(e){return 0>e?-1:e>0?1:0},e._findMatchingBracketUp=function(t,n,i,r,s){var a,u,l,c=s;for(a=i;a>=1;a--){var d=t._getInternalTokens(a),h=t.getLineContent(a);for(l=(a===i?r:d.length)-1;l>=0;l--)if(d[l].type===n&&(c+=e._sign(d[l].bracket),0===c))return u=l===d.length-1?h.length:d[l+1].startIndex,new o.Range(a,d[l].startIndex+1,a,u+1)}return null},e._findMatchingBracketDown=function(t,n,i,r,s){var a,u,l,c,d,h=1;for(a=i,u=t.getLineCount();u>=a;a++){if(s&&!t._lineIsTokenized(a))return{range:null,isAccurate:!1};var p=t._getInternalTokens(a),f=t.getLineContent(a);for(c=a===i?r+1:0,d=p.length;d>c;c++)if(p[c].type===n&&(h+=e._sign(p[c].bracket),0===h))return l=c===p.length-1?f.length:p[c+1].startIndex,{range:new o.Range(a,p[c].startIndex+1,a,l+1),isAccurate:!0}}return{range:null,isAccurate:!0}},e.findMatchingBracketUp=function(t,n,i){var r,o,s,a,u=i.column-1,l=-1,c=t._getInternalTokens(i.lineNumber),d=t.getLineContent(i.lineNumber);for(r=0,o=c.length;-1===l&&o>r;r++)s=c[r],a=r===o-1?d.length:c[r+1].startIndex,s.startIndex<=u&&a>=u&&(l=r);return e._findMatchingBracketUp(t,n,i.lineNumber,l+1,0)},e.matchBracket=function(t,n,i){if(i&&!t._lineIsTokenized(n.lineNumber))return{brackets:null,isAccurate:!1};var r,s,a=t.getLineContent(n.lineNumber),u={brackets:null,isAccurate:!0};if(a.length>0){var l,c,d=n.column-1,h=t._getInternalTokens(n.lineNumber);for(r=0,s=h.length;null===u.brackets&&s>r;r++)if(l=h[r],c=r===s-1?a.length:h[r+1].startIndex,l.startIndex<=d&&c>=d){if(l.bracket<0){var p=e._findMatchingBracketUp(t,l.type,n.lineNumber,r,-1);p&&(u.brackets=[new o.Range(n.lineNumber,l.startIndex+1,n.lineNumber,c+1),p])}if(null===u.brackets&&l.bracket>0){var f=e._findMatchingBracketDown(t,l.type,n.lineNumber,r,i);u.isAccurate=f.isAccurate,f.range&&(u.brackets=[new o.Range(n.lineNumber,l.startIndex+1,n.lineNumber,c+1),f.range])}}}return u},e}();t.BracketsHelper=a});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/textModelWithTokens",["require","exports","vs/nls!vs/editor/editor.main","vs/base/lib/winjs.base","vs/editor/core/model/textModel","vs/editor/modes/nullMode","vs/base/errors","vs/editor/core/constants","vs/base/arrays","vs/editor/core/config/config","vs/editor/core/model/tokenIterator","vs/editor/core/model/textModelWithTokensHelpers"],function(e,t,n,i,r,o,s,a,u,l,c,d){var h=function(){function e(e,t){var n=this;this._modePromise=e,this._model=t,this._isDisposed=!1,i.TPromise.timeout(0).then(function(){return n._modePromise}).then(function(e){if(!n._isDisposed){var t=n._model;n.dispose(),t.setMode(e)}}).done(null,s.onUnexpectedError)}return e.prototype.dispose=function(){this._modePromise=null,this._model=null,this._isDisposed=!0},e}(),p=function(e){function t(t,n,r){t.push(a.EventType.ModelTokensChanged),t.push(a.EventType.ModelModeChanged),e.call(this,t,n),this._stopLineTokenizationAfter=l.Config.editor.stopLineTokenizationAfter,r?i.Promise.is(r)?(this._modeToModelBinder=new h(r,this),this._mode=new o.NullMode):this._mode=r:this._mode=new o.NullMode,this._revalidateTokensTimeout=-1,this._modeTokenizationFailedTimeout=-1,this._initializeTokenizationState()}return __extends(t,e),t.prototype.dispose=function(){this._modeToModelBinder&&(this._modeToModelBinder.dispose(),this._modeToModelBinder=null),this._clearTimers(),this._mode=null,this._lastState=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t,n){e.prototype._resetValue.call(this,t,n),this._clearTimers(),this._initializeTokenizationState()},t.prototype._resetMode=function(e,t){this._clearTimers(),this._mode=t,this._initializeTokenizationState(),this.emitModelTokensChangedEvent(1,this.getLineCount())},t.prototype._clearTimers=function(){-1!==this._revalidateTokensTimeout&&(window.clearTimeout(this._revalidateTokensTimeout),this._revalidateTokensTimeout=-1),-1!==this._modeTokenizationFailedTimeout&&(window.clearTimeout(this._modeTokenizationFailedTimeout),this._modeTokenizationFailedTimeout=-1)},t.prototype._initializeTokenizationState=function(){var e=null;if(this._mode.tokenizationSupport)try{e=this._mode.tokenizationSupport.getInitialState()}catch(n){s.onUnexpectedError(n,t.MODE_TOKENIZATION_FAILED_MSG),this._mode=new o.NullMode}e||(e=new o.NullState(this._mode,null)),this._lines[0].state=e,this._lastState=null,this._invalidLineStartIndex=0,this._beginBackgroundTokenization()},t.prototype.setStopLineTokenizationAfter=function(e){this._stopLineTokenizationAfter=e},t.prototype.getLineTokens=function(e,t){if("undefined"==typeof t&&(t=!1),1>e||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return t||this._updateTokensUntilLine(e,!0),this._lines[e-1].lineTokens},t.prototype.getRawLineTokens=function(e){return this._updateTokensUntilLine(e,!0),{tokens:this._lines[e-1].lineTokens.getTokens().slice(0),modeTransitions:this._lines[e-1].modeTransitions.slice(0),endState:e=l;l++){if(e=(new Date).getTime()-u,e>t){i=l-1;break}if(o=this._lines[l-1].text.length,-1!==a&&o>a&&(o=a),r>0&&(s=e/r*o,e+s>t)){i=l-1;break}this._updateTokensUntilLine(l,!1),r+=o}i>=n&&this.emitModelTokensChangedEvent(n,i),this._invalidLineStartIndex=c;c++){var d=c+1,h=null,p=this._lines[c].text;if(this._mode.tokenizationSupport){try{h=this._mode.tokenizationSupport.tokenize(this._lines[c].text,this._lines[c].state,0,a)}catch(f){s.onUnexpectedError(f,t.MODE_TOKENIZATION_FAILED_MSG),this._onModeTokenizationFailed()}h&&h.actualStopOffsetd)if(null!==this._lines[d].state&&h.endState.equals(this._lines[d].state)){for(var g=c+1;i>g&&!this._lines[g].isInvalid;){if(i>g+1){if(null===this._lines[g+1].state)break}else if(null===this._lastState)break;g++}this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,g),c=g-1}else this._lines[d].state=h.endState;else this._lastState=h.endState}n&&l>=u&&this.emitModelTokensChangedEvent(u,l),this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,r+1)},t.prototype._onModeTokenizationFailed=function(){var e=this;-1===this._modeTokenizationFailedTimeout&&(this._modeTokenizationFailedTimeout=window.setTimeout(function(){e._modeTokenizationFailedTimeout=-1,e.setMode(new o.NullMode)},200))},t.prototype.emitModelTokensChangedEvent=function(e,t){var n={fromLineNumber:e,toLineNumber:t};this.emit(a.EventType.ModelTokensChanged,n)},t.prototype._emitModelModeChangedEvent=function(e){this.emit(a.EventType.ModelModeChanged,e)},t.prototype._lineIsTokenized=function(e){return this._invalidLineStartIndex>e-1},t.prototype._getNonWordTokenTypes=function(){var e=[];try{e=this._mode.tokenTypeClassificationSupport.getNonWordTokenTypes()}catch(t){s.onUnexpectedError(t)}return e},t.prototype._getWordDefinition=function(){return d.WordHelper.massageWordDefinitionOf(this._mode)},t.prototype.getWordAtPosition=function(e,t,n){return"undefined"==typeof n&&(n=!1),d.WordHelper.getWordAtPosition(this,this.validatePosition(e),t,n)},t.prototype.getWords=function(e,t,n){return"undefined"==typeof n&&(n=!1),d.WordHelper.getWords(this,this.validateLineNumber(e),t,n)},t.prototype.tokenIterator=function(e,t){var n=new c.TokenIterator(this,this.validatePosition(e)),i=t(n);return n._invalidate(),i},t.prototype.findMatchingBracketUp=function(e,t){return d.BracketsHelper.findMatchingBracketUp(this,e,this.validatePosition(t))},t.prototype.matchBracket=function(e,t){return"undefined"==typeof t&&(t=!1),d.BracketsHelper.matchBracket(this,this.validatePosition(e),t)},t.MODE_TOKENIZATION_FAILED_MSG=n.localize("vs_editor_core_model_textModelWithTokens",0),t}(r.TextModel);t.TextModelWithTokens=p});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/textModelWithMarkers",["require","exports","vs/editor/core/model/textModelWithTokens","vs/editor/core/position"],function(e,t,n,i){var r=function(e){function t(t,n,i){e.call(this,t,n,i),this._lastMarkerId=0,this._markerIdToMarker={}}return __extends(t,e),t.prototype.dispose=function(){this._markerIdToMarker=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t,n){e.prototype._resetValue.call(this,t,n),this._markerIdToMarker={}},t.prototype._addMarker=function(e,t,n){var r=this.validatePosition(new i.Position(e,t)),o={id:(++this._lastMarkerId).toString(),column:r.column,stickToPreviousCharacter:n,oldLineNumber:0,oldColumn:0,line:null};return this._markerIdToMarker[o.id]=o,this._lines[r.lineNumber-1].addMarker(o),o.id},t.prototype._changeMarker=function(e,t,n){if(this._markerIdToMarker.hasOwnProperty(e)){var r=this._markerIdToMarker[e],o=this.validatePosition(new i.Position(t,n));o.lineNumber!==r.line.lineNumber&&(r.line.removeMarker(r),this._lines[o.lineNumber-1].addMarker(r)),r.column=o.column}},t.prototype._changeMarkerStickiness=function(e,t){if(this._markerIdToMarker.hasOwnProperty(e)){var n=this._markerIdToMarker[e];n.stickToPreviousCharacter!==t&&(n.stickToPreviousCharacter=t)}},t.prototype._getMarker=function(e){if(this._markerIdToMarker.hasOwnProperty(e)){var t=this._markerIdToMarker[e];return new i.Position(t.line.lineNumber,t.column)}return null},t.prototype._getLineMarkers=function(e){return this._lines[e-1].markers.slice(0)},t.prototype._removeMarker=function(e){if(this._markerIdToMarker.hasOwnProperty(e)){var t=this._markerIdToMarker[e];t.line.removeMarker(t),delete this._markerIdToMarker[e]}},t.prototype._getMarkersInMap=function(e){var t,n=[];for(t in e)e.hasOwnProperty(t)&&this._markerIdToMarker.hasOwnProperty(t)&&n.push(this._markerIdToMarker[t]);return n},t}(n.TextModelWithTokens);t.TextModelWithMarkers=r});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/textModelWithTrackedRanges",["require","exports","vs/editor/editor","vs/editor/core/model/textModelWithMarkers","vs/editor/core/range"],function(e,t,n,i,r){var o=function(e){function t(t,n,i){e.call(this,t,n,i),this._lastRangeId=0,this._ranges={},this._markerIdToRangeId={},this._multiLineTrackedRanges={}}return __extends(t,e),t.prototype.dispose=function(){this._ranges=null,this._markerIdToRangeId=null,this._multiLineTrackedRanges=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t,n){e.prototype._resetValue.call(this,t,n),this._ranges={},this._markerIdToRangeId={},this._multiLineTrackedRanges={}},t.prototype._setRangeIsMultiLine=function(e,t){var n=this._multiLineTrackedRanges.hasOwnProperty(e);!n&&t?this._multiLineTrackedRanges[e]=!0:n&&!t&&delete this._multiLineTrackedRanges[e]},t.prototype._shouldStartMarkerSticksToPreviousCharacter=function(e){return 0===e||2===e?!0:!1},t.prototype._shouldEndMarkerSticksToPreviousCharacter=function(e){return 1===e||2===e?!0:!1},t.prototype.addTrackedRange=function(e,t){e=this.validateRange(e);var n=this._shouldStartMarkerSticksToPreviousCharacter(t),i=this._shouldEndMarkerSticksToPreviousCharacter(t),r=this._addMarker(e.startLineNumber,e.startColumn,n),o=this._addMarker(e.endLineNumber,e.endColumn,i),s={id:(++this._lastRangeId).toString(),startMarkerId:r,endMarkerId:o};return this._ranges[s.id]=s,this._markerIdToRangeId[r]=s.id,this._markerIdToRangeId[o]=s.id,this._setRangeIsMultiLine(s.id,e.startLineNumber!==e.endLineNumber),s.id},t.prototype.changeTrackedRange=function(e,t){if(this._ranges.hasOwnProperty(e)){t=this.validateRange(t);var n=this._ranges[e];this._changeMarker(n.startMarkerId,t.startLineNumber,t.startColumn),this._changeMarker(n.endMarkerId,t.endLineNumber,t.endColumn),this._setRangeIsMultiLine(n.id,t.startLineNumber!==t.endLineNumber)}},t.prototype.changeTrackedRangeStickiness=function(e,t){if(this._ranges.hasOwnProperty(e)){var n=this._ranges[e];this._changeMarkerStickiness(n.startMarkerId,this._shouldStartMarkerSticksToPreviousCharacter(t)),this._changeMarkerStickiness(n.endMarkerId,this._shouldEndMarkerSticksToPreviousCharacter(t))}},t.prototype.removeTrackedRange=function(e){if(this._ranges.hasOwnProperty(e)){var t=this._ranges[e];this._removeMarker(t.startMarkerId),this._removeMarker(t.endMarkerId),this._setRangeIsMultiLine(t.id,!1),delete this._ranges[t.id],delete this._markerIdToRangeId[t.startMarkerId],delete this._markerIdToRangeId[t.endMarkerId]}},t.prototype._newEditorRange=function(e,t){return t.isBefore(e)?new r.Range(e.lineNumber,e.column,e.lineNumber,e.column):new r.Range(e.lineNumber,e.column,t.lineNumber,t.column)},t.prototype.getTrackedRange=function(e){var t=this._ranges[e],n=this._getMarker(t.startMarkerId),i=this._getMarker(t.endMarkerId);return this._newEditorRange(n,i)},t.prototype._getMultiLineTrackedRanges=function(e,t){var n,i,r,o,s=[];for(n in this._multiLineTrackedRanges)if(this._multiLineTrackedRanges.hasOwnProperty(n)){if(i=this._ranges[n],r=this._getMarker(i.startMarkerId),r.lineNumber>t)continue;if(o=this._getMarker(i.endMarkerId),o.lineNumbero;o++)d[c[o].id]=!0;for(a=e;t>=a;a++)for(n=this._getLineMarkers(a),o=0,s=n.length;s>o;o++)i=n[o],this._markerIdToRangeId.hasOwnProperty(i.id)&&(r=this._markerIdToRangeId[i.id],d.hasOwnProperty(r)||(u=this._getMarker(this._ranges[r].startMarkerId),l=this._getMarker(this._ranges[r].endMarkerId),c.push({id:r,range:this._newEditorRange(u,l)}),d[r]=!0));return c},t.prototype._onChangedMarkers=function(e){var t,n,i,r,o,s,a={};for(o=0,s=e.length;s>o;o++)r=e[o],this._markerIdToRangeId.hasOwnProperty(r.id)&&(i=this._markerIdToRangeId[r.id],n=this._ranges[i],a.hasOwnProperty(n.id)?t=a[n.id]:(t={startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0},a[n.id]=t),r.id===n.startMarkerId?(t.startLineNumber=r.oldLineNumber,t.startColumn=r.oldColumn):(t.endLineNumber=r.oldLineNumber,t.endColumn=r.oldColumn),this._setRangeIsMultiLine(n.id,this._getMarker(n.startMarkerId).lineNumber!==this._getMarker(n.endMarkerId).lineNumber));return a},t}(i.TextModelWithMarkers);t.TextModelWithTrackedRanges=o});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/textModelWithDecorations",["require","exports","vs/editor/editor","vs/editor/core/model/textModelWithTrackedRanges","vs/editor/core/constants"],function(e,t,n,i,r){function o(e){return e.replace(/[^a-z0-9\-]/gi," ")}function s(e){return{stickiness:e.stickiness||0,className:o(e.className||""),hoverMessage:e.hoverMessage||"",htmlMessage:e.htmlMessage||[],isWholeLine:e.isWholeLine||!1,overviewRuler:a(e.overviewRuler,e.showInOverviewRuler),glyphMarginClassName:o(e.glyphMarginClassName||""),linesDecorationsClassName:o(e.linesDecorationsClassName||""),inlineClassName:o(e.inlineClassName||"")}}function a(e,t){"undefined"==typeof t&&(t=null);var n={color:"",position:2};return t&&(n.color=t),e&&e.color&&(n.color=e.color),e&&e.hasOwnProperty("position")&&(n.position=e.position),n}function u(e,t){var n=[t.stickiness,e.startLineNumber.toString(),e.startColumn.toString(),e.endLineNumber.toString(),e.endColumn.toString(),t.className,t.hoverMessage,t.htmlMessage.reduce(function(e,t){return e+l(t)},""),t.isWholeLine+"",t.overviewRuler.color,t.overviewRuler.position,t.glyphMarginClassName,t.linesDecorationsClassName,t.inlineClassName];return n.join("-")}function l(e){var t=[e.tagName,e.text,e.className];return e.children&&e.children.forEach(function(e,n){t.push("child"+n+"-"+l(e))}),t.join("-")}var c=function(){function e(){this.changedMarkers={},this.oldDecorationRange={},this.oldDecorationOptions={},this.newOrChangedDecorations={},this.removedDecorations={}}return e.prototype.addNewDecoration=function(e){this.newOrChangedDecorations[e]=!0},e.prototype.addRemovedDecoration=function(e,t,n,i){this.newOrChangedDecorations.hasOwnProperty(e)&&delete this.newOrChangedDecorations[e],this.oldDecorationRange.hasOwnProperty(e)||(this.oldDecorationRange[e]=n),this.oldDecorationOptions.hasOwnProperty(e)||(this.oldDecorationOptions[e]=i),this.removedDecorations[e]=!0},e.prototype.addMovedDecoration=function(e,t){this.oldDecorationRange.hasOwnProperty(e)||(this.oldDecorationRange[e]=t),this.newOrChangedDecorations[e]=!0},e.prototype.addUpdatedDecoration=function(e,t){this.oldDecorationOptions.hasOwnProperty(e)||(this.oldDecorationOptions[e]=t),this.newOrChangedDecorations[e]=!0},e}();t.DeferredEventsBuilder=c;var d=function(e){function t(t,n,i){t.push(r.EventType.ModelDecorationsChanged),e.call(this,t,n,i),this.lastDecorationId=0,this.decorations={},this.rangeIdToDecorationId={},this._currentDeferredEvents=null}return __extends(t,e),t.prototype.dispose=function(){this.decorations=null,this.rangeIdToDecorationId=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t,n){e.prototype._resetValue.call(this,t,n),this.decorations={},this.rangeIdToDecorationId={}},t.prototype.changeDecorations=function(e,t){"undefined"==typeof t&&(t=0);var n=this;return this._withDeferredEvents(function(i){var r={addDecoration:function(e,r){return n._addDecorationImpl(i,t,e,r)},changeDecoration:function(e,t){n._changeDecorationImpl(i,e,t)},changeDecorationOptions:function(e,t){n._changeDecorationOptionsImpl(i,e,t)},removeDecoration:function(e){n._removeDecorationImpl(i,e)},deltaDecorations:function(e,r){return n._deltaDecorationsImpl(i,t,e,r)}},o=e(r);return r.addDecoration=null,r.changeDecoration=null,r.removeDecoration=null,r.deltaDecorations=null,o})},t.prototype.deltaDecorations=function(e,t,n){return"undefined"==typeof n&&(n=0),e||(e=[]),this.changeDecorations(function(n){return n.deltaDecorations(e,t)},n)},t.prototype.removeAllDecorationsWithOwnerId=function(e){var t,n,i=[];for(t in this.decorations)this.decorations.hasOwnProperty(t)&&(n=this.decorations[t],n.ownerId===e&&i.push(n.id));for(var r=0;ru;u++)if(l=h[u],this.rangeIdToDecorationId.hasOwnProperty(l.id)){if(a=this.decorations[this.rangeIdToDecorationId[l.id]],o&&a.ownerId&&a.ownerId!==o)continue;if(s&&(a.options.className===r.ClassName.EditorErrorDecoration||a.options.className===r.ClassName.EditorWarningDecoration))continue; if(l.range.startLineNumber===e&&l.range.endColumni)continue;d.push({id:a.id,ownerId:a.ownerId,range:l.range,options:a.options})}return d},t.prototype.getLinesDecorations=function(e,t,n,i){return"undefined"==typeof n&&(n=0),"undefined"==typeof i&&(i=!1),this._getDecorationsInRange(e,1,t,Number.MAX_VALUE,n,i)},t.prototype.getDecorationsInRange=function(e,t,n){var i=this.validateRange(e);return this._getDecorationsInRange(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn,t,n)},t.prototype.getAllDecorations=function(e,t){"undefined"==typeof e&&(e=0),"undefined"==typeof t&&(t=!1);var n,i,o=[];for(n in this.decorations)if(this.decorations.hasOwnProperty(n)){if(i=this.decorations[n],e&&i.ownerId&&i.ownerId!==e)continue;if(t&&(i.options.className===r.ClassName.EditorErrorDecoration||i.options.className===r.ClassName.EditorWarningDecoration))continue;o.push({id:i.id,ownerId:i.ownerId,range:this.getTrackedRange(i.rangeId),options:i.options})}return o},t.prototype._withDeferredEvents=function(e){var t=this;return this.deferredEmit(function(){var n=t._currentDeferredEvents?!1:!0;n&&(t._currentDeferredEvents=new c);try{var i=e(t._currentDeferredEvents);n&&t._handleCollectedEvents(t._currentDeferredEvents)}finally{n&&(t._currentDeferredEvents=null)}return i})},t.prototype._handleCollectedEvents=function(e){var t=this._getMarkersInMap(e.changedMarkers),n=this._onChangedMarkers(t);this._onChangedRanges(e,n),this._handleCollectedDecorationsEvents(e);for(var i=0,r=t.length;r>i;i++)t[i].oldLineNumber=0,t[i].oldColumn=0},t.prototype._onChangedRanges=function(e,t){var n,i;for(n in t)t.hasOwnProperty(n)&&this.rangeIdToDecorationId.hasOwnProperty(n)&&(i=this.rangeIdToDecorationId[n],e.addMovedDecoration(i,t[n]))},t.prototype._handleCollectedDecorationsEvents=function(e){var t,n,i,o=[],s=[],a=[];for(t in e.newOrChangedDecorations)e.newOrChangedDecorations.hasOwnProperty(t)&&(a.push(t),n=this._getDecorationData(t),n.isForValidation=n.options.className===r.ClassName.EditorErrorDecoration||n.options.className===r.ClassName.EditorWarningDecoration,o.push(n),e.oldDecorationRange.hasOwnProperty(t)&&(i=e.oldDecorationRange[t],i.startLineNumber=i.startLineNumber||n.range.startLineNumber,i.startColumn=i.startColumn||n.range.startColumn,i.endLineNumber=i.endLineNumber||n.range.endLineNumber,i.endColumn=i.endColumn||n.range.endColumn));for(t in e.removedDecorations)e.removedDecorations.hasOwnProperty(t)&&(a.push(t),s.push(t));if(a.length>0){var u={ids:a,addedOrChangedDecorations:o,removedDecorations:s,oldOptions:e.oldDecorationOptions,oldRanges:e.oldDecorationRange};this.emitModelDecorationsChangedEvent(u)}},t.prototype._getDecorationData=function(e){var t=this.decorations[e];return{id:t.id,ownerId:t.ownerId,range:this.getTrackedRange(t.rangeId),isForValidation:!1,options:t.options}},t.prototype.emitModelDecorationsChangedEvent=function(e){this.emit(r.EventType.ModelDecorationsChanged,e)},t.prototype._addDecorationImpl=function(e,t,n,i){i=s(i);var r=this.addTrackedRange(n,i.stickiness),o={ownerId:t,id:(++this.lastDecorationId).toString(),rangeId:r,options:i};return this.decorations[o.id]=o,this.rangeIdToDecorationId[r]=o.id,e.addNewDecoration(o.id),o.id},t.prototype._changeDecorationImpl=function(e,t,n){if(this.decorations.hasOwnProperty(t)){var i=this.decorations[t],r=this.getTrackedRange(i.rangeId);this.changeTrackedRange(i.rangeId,n),e.addMovedDecoration(t,r)}},t.prototype._changeDecorationOptionsImpl=function(e,t,n){if(n=s(n),this.decorations.hasOwnProperty(t)){var i=this.decorations[t],r=i.options;r.stickiness!==n.stickiness&&this.changeTrackedRangeStickiness(i.rangeId,n.stickiness),i.options=n,e.addUpdatedDecoration(t,r)}},t.prototype._removeDecorationImpl=function(e,t){if(this.decorations.hasOwnProperty(t)){var n=this.decorations[t],i=null;e&&(i=this.getTrackedRange(n.rangeId)),this.removeTrackedRange(n.rangeId),delete this.rangeIdToDecorationId[n.rangeId],delete this.decorations[t],e&&e.addRemovedDecoration(t,n.ownerId,i,n.options)}},t.prototype._deltaDecorationsImpl=function(e,t,n,i){var r,o,a=[],u=[];for(r=0,o=i.length;o>r;r++)a[r]=s(i[r].options),u[r]=this.validateRange(i[r].range);return this._deltaImpl(e,t,n,o,u,a)},t.prototype._deltaImpl=function(e,t,n,i,r,o){var s,a,l,c,d={};for(s=0,a=n.length;a>s;s++)this.decorations.hasOwnProperty(n[s])&&(c=this.decorations[n[s]],l=u(this.getTrackedRange(c.rangeId),c.options),d[l]=d[l]||[],d[l].push(n[s]));var h,p,f,g,m=[],v={};for(s=0;i>s;s++){if(l=u(r[s],o[s]),g=!1,d.hasOwnProperty(l))for(f=d[l],h=0,p=f.length;p>h;h++)if(!v.hasOwnProperty(f[h])){g=!0,v[f[h]]=!0,m.push(f[h]);break}g||m.push(this._addDecorationImpl(e,t,r[s],o[s]))}for(s=0,a=n.length;a>s;s++)v.hasOwnProperty(n[s])||this._removeDecorationImpl(e,n[s]);return m},t}(i.TextModelWithTrackedRanges);t.TextModelWithDecorations=d}),define("vs/editor/core/model/modelEditOperation",["require","exports","vs/editor/core/range"],function(e,t,n){var i=function(){function e(){}return e.execute=function(t,n){var i=t.change(function(i){return e._apply(t,i,n.operations)});return{operations:i}},e._apply=function(t,n,i){i.sort(e._compareOperations);for(var r=1;ri;i++)c=t[i].identifier,a=t[i].text,o=t[i].selectionStartMarkerId,s=t[i].positionMarkerId,u=e._getMarker(o),l=e._getMarker(s),d.push({identifier:c,range:new n.Range(u.lineNumber,u.column,l.lineNumber,l.column),text:a}),e._removeMarker(o),e._removeMarker(s);return d},e._applyWithMarkers=function(e,t,n){var i,r,o,s,a,u,l,c,d,h,p=[];for(i=0,r=n.length;r>i;i++)h=n[i].identifier,s=n[i].range,o=n[i].text,s.isEmpty()&&!o?(d={startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1},c=""):(s.isEmpty()?(c="",a={lineNumber:s.startLineNumber,column:s.startColumn}):(l=t.deleteText(s),c=l.deletedText,a=l.position),o?(u=t.insertText(a,o),d={startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:u.lineNumber,endColumn:u.column}):d={startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:a.lineNumber,endColumn:a.column}),p.push({identifier:h,text:c,selectionStartMarkerId:e._addMarker(d.startLineNumber,d.startColumn,!0),positionMarkerId:e._addMarker(d.endLineNumber,d.endColumn,!1)});return p},e._compareOperations=function(e,t){return-n.compareRangesUsingEnds(e.range,t.range)},e}();t.ModelEditOperation=i}),define("vs/editor/core/model/editStack",["require","exports","vs/editor/core/model/modelEditOperation"],function(e,t,n){var i=function(){function e(e){this.model=e,this.currentOpenStackElement=null,this.past=[],this.future=[]}return e.prototype.pushStackElement=function(){null!==this.currentOpenStackElement&&(this.past.push(this.currentOpenStackElement),this.currentOpenStackElement=null)},e.prototype.clear=function(){this.currentOpenStackElement=null,this.past=[],this.future=[]},e.prototype.pushEditOperation=function(e,t,i){this.future=[],this.currentOpenStackElement||(this.currentOpenStackElement={beforeCursorState:e,editOperations:[],afterCursorState:null});var r=n.ModelEditOperation.execute(this.model,{operations:t});return this.currentOpenStackElement.editOperations.push(r),this.currentOpenStackElement.afterCursorState=i?i(r.operations):null,this.currentOpenStackElement.afterCursorState},e.prototype.undo=function(){if(this.pushStackElement(),this.past.length>0){for(var e=this.past.pop(),t=e.editOperations.length-1;t>=0;t--)e.editOperations[t]=n.ModelEditOperation.execute(this.model,e.editOperations[t]);return this.future.push(e),e.beforeCursorState}return null},e.prototype.redo=function(){if(this.future.length>0){if(this.currentOpenStackElement)throw new Error("How is this possible?");for(var e=this.future.pop(),t=0;ti;i++){for(n=l[i],a=n.markers,o=0,s=a.length;s>o;o++)u=a[o],e[u.id]=!0,u.oldLineNumber=u.oldLineNumber||n.lineNumber;n.lineNumber=i+1}},t.prototype._insertText=function(e,t,n,i){var r=this.validatePosition(t);if(0===n.length)return r;for(var o=n.split("\n"),s=0,a=o.length;a>s;s++)"\r"===o[s].charAt(o[s].length-1)&&(o[s]=o[s].substring(0,o[s].length-1));return 1===o.length?this._insertTextOneLine(e,r,o[0],i):this._insertTextMultiline(e,r,o,i)},t.prototype._insertTextOneLine=function(e,t,n,i){return this.callInsertTextOnLine(e,t.lineNumber-1,t.column,{text:n,markers:null},i,!0),new s.Position(t.lineNumber,t.column+n.length)},t.prototype._insertTextMultiline=function(e,t,n,i){var r,a,u=this.callDeleteTextOnLine(e,t.lineNumber-1,t.column,Number.MAX_VALUE,!0,i,!1);this.callInsertTextOnLine(e,t.lineNumber-1,t.column,{text:n[0],markers:null},i,!0);var l="";for(r=1,a=n.length-1;a>r;r++)l+=n[r]+"\n",this._lines.splice(t.lineNumber+r-1,0,new o.ModelLine(t.lineNumber+r,n[r]));var c=t.lineNumber-1+n.length-1;return this._lines.splice(c,0,new o.ModelLine(c+1,n[n.length-1])),this.callInsertTextOnLine(e,c,Number.MAX_VALUE,u,i,!1),this._updateLineNumbers(e,c+2),this._increaseVersionId(),this.emitModelContentChangedLinesInsertedEvent(t.lineNumber-1+2,c+1,l+this._lines[c].text),new s.Position(c+1,1+n[n.length-1].length)},t.prototype._deleteText=function(e,t){var n=this.validateRange(t);return n.isEmpty()?{position:new s.Position(n.startLineNumber,n.startColumn),deletedText:""}:n.startLineNumber===n.endLineNumber?this._deleteTextOneLine(e,n):this._deleteTextMultiline(e,n)},t.prototype._deleteTextOneLine=function(e,t){var n=this.callDeleteTextOnLine(e,t.startLineNumber-1,t.startColumn,t.endColumn,!1,!1,!0);return{position:new s.Position(t.startLineNumber,t.startColumn),deletedText:n.text}},t.prototype._deleteWholeLines=function(e,t,n,i){var r,o,s,a,u,l=[],c=[];for(r=n;i>=r;r++){for(l.push(this._lines[r].text),a=this._lines[r].markers,o=0,s=a.length;s>o;o++)u=a[o],e[u.id]=!0,u.oldColumn=u.oldColumn||u.column,u.oldLineNumber=u.oldLineNumber||r+1,u.column=t;c=c.concat(a)}return this._lines.splice(n,i-n+1),{deletedText:l.join("\n"),deletedMarkers:c}},t.prototype._deleteTextMultiline=function(e,t){if(1===t.startColumn){var n=this._lines[t.startLineNumber-1].state,i=this._deleteWholeLines(e,t.startColumn,t.startLineNumber-1,t.endLineNumber-2);this._increaseVersionId(),this.emitModelContentChangedLinesDeletedEvent(t.startLineNumber,t.endLineNumber-1);var r=this.callDeleteTextOnLine(e,t.startLineNumber-1,1,t.endColumn,!1,!1,!0).text;this._lines[t.startLineNumber-1].addMarkers(i.deletedMarkers),this._lines[t.startLineNumber-1].state=n,this._updateLineNumbers(e,t.startLineNumber);var o=i.deletedText+"\n"+r}else{var a=this.callDeleteTextOnLine(e,t.startLineNumber-1,t.startColumn,Number.MAX_VALUE,!1,!1,!1).text,u=this.callDeleteTextOnLine(e,t.endLineNumber-1,t.endColumn,Number.MAX_VALUE,!0,!1,!1),i=this._deleteWholeLines(e,t.startColumn,t.startLineNumber,t.endLineNumber-1);this._lines[t.startLineNumber-1].addMarkers(i.deletedMarkers),this.callInsertTextOnLine(e,t.startLineNumber-1,Number.MAX_VALUE,u,!1,!0),this._updateLineNumbers(e,t.startLineNumber+1),this._increaseVersionId(),this.emitModelContentChangedLinesDeletedEvent(t.startLineNumber+1,t.endLineNumber);var o=a+"\n"+i.deletedText}return{position:new s.Position(t.startLineNumber,t.startColumn),deletedText:o}},t.prototype.emitModelContentChangedLineChangedEvent=function(e){var t={changeType:a.EventType.ModelContentChangedLineChanged,lineNumber:e,detail:this._lines[e-1].text,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing};this.emit(a.EventType.ModelContentChanged,t)},t.prototype.emitModelContentChangedLinesDeletedEvent=function(e,t){var n={changeType:a.EventType.ModelContentChangedLinesDeleted,fromLineNumber:e,toLineNumber:t,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing};this.emit(a.EventType.ModelContentChanged,n)},t.prototype.emitModelContentChangedLinesInsertedEvent=function(e,t,n){var i={changeType:a.EventType.ModelContentChangedLinesInserted,fromLineNumber:e,toLineNumber:t,detail:n,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing};this.emit(a.EventType.ModelContentChanged,i)},t}(n.TextModelWithDecorations);t.EditableTextModel=u});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/model",["require","exports","vs/base/severity","vs/base/strings","vs/base/objects","vs/base/network","vs/editor/core/constants","vs/editor/core/range","vs/platform/markers/markers","vs/editor/editor","vs/editor/core/model/editableTextModel"],function(e,t,n,i,r,o,s,a,u,l,c){var d=0,h=1e3,p=function(e){function t(t,n,i,r){"undefined"==typeof i&&(i=null),"undefined"==typeof r&&(r=null),e.call(this,[s.EventType.ModelPropertiesChanged,s.EventType.ModelDispose],t,n),d++,this.id="$model"+d,("undefined"==typeof i||null===i)&&(i=new o.URL("inMemory://model/"+d)),this._markerService=r,this._associatedResource=i,this._markerDecorationIds={},this.getMode().bindModel(this),this._extraProperties={},this._addWordRegExpProperty()}return __extends(t,e),t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){var t=this;this.emit(s.EventType.ModelDispose),null!==this._markerService&&this._markerService.change(function(e){e.deleteMarkerSet(t.getAssociatedResource())}),this.getMode()&&this.getMode().unbindModel(this),e.prototype.dispose.call(this)},t.prototype._resetMode=function(t,n){e.prototype._resetMode.call(this,t,n),t.oldMode.unbindModel(this),this._addWordRegExpProperty(),t.newMode.bindModel(this)},t.prototype.getAssociatedResource=function(){return this._associatedResource},t.prototype.setProperty=function(e,t){this._extraProperties[e]=t,this.emitModelPropertiesChangedEvent()},t.prototype.getProperty=function(e){return this._extraProperties.hasOwnProperty(e)?this._extraProperties[e]:null},t.prototype.getProperties=function(){return r.clone(this._extraProperties)},t.prototype.findMatches=function(e,t,n,r,o){if(""===e)return[];var s=null;try{s=i.createRegExp(e,n,r,o)}catch(u){return[]}if(i.regExpLeadsToEndlessLoop(s))return[];var l;return l=a.isIRange(t)?t:t?this.getEditableRange():this.getFullModelRange(),this.doFindMatches(l,s)},t.prototype._addWordRegExpProperty=function(){var e=this._getWordDefinition();this.setProperty("$WordDefinitionForMirrorModel",{source:e.source,flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")})},t.prototype.doFindMatches=function(e,t){var n,i=[],r=0;if(e.startLineNumber===e.endLineNumber)return n=this._lines[e.startLineNumber-1].text.substring(e.startColumn-1,e.endColumn-1),r=this.findMatchesInLine(t,n,e.startLineNumber,e.startColumn-1,r,i),i;n=this._lines[e.startLineNumber-1].text.substring(e.startColumn-1),r=this.findMatchesInLine(t,n,e.startLineNumber,e.startColumn-1,r,i);for(var o=e.startLineNumber+1;o=r;o++)r=this.findMatchesInLine(t,this._lines[o-1].text,o,0,r,i);return h>=r&&(n=this._lines[e.endLineNumber-1].text.substring(0,e.endColumn-1),r=this.findMatchesInLine(t,n,e.endLineNumber,0,r,i)),i},t.prototype.findMatchesInLine=function(e,t,n,i,r,o){var s;do if(s=e.exec(t),s&&(o.push(new a.Range(n,s.index+1+i,n,s.index+1+s[0].length+i)),r++,r>h))return r;while(s);return r},t.prototype.emitModelPropertiesChangedEvent=function(){var e={properties:this._extraProperties};this.emit(s.EventType.ModelPropertiesChanged,e)},t.prototype._publishMarkerUpdate=function(e){var t=u.createMarkerUpdateFromJson(e);null!==this._markerService&&this._markerService.change(function(e){e.processMarkerUpdate(t)});for(var n=t.getId(),i=this._markerDecorationIds[n]||[],r=[],o=t.getMarkers(),s=0;s .selections-layer > .selected-text { background: #ADD6FF !important; } .monaco-editor .dynamic > .selections-layer > .selected-text { background: #E5EBF1 !important; } .monaco-diff-editor .diffOverview { background-color: #f9f7f7; } .monaco-editor .wordHighlight { background-color: rgba(253, 255, 0, 0.28); } .monaco-editor .wordHighlightStrong { background-color: rgba(249, 206, 130, 0.7); } .monaco-editor .valueSetReplacement { outline: solid 2px #888; } .monaco-editor .focus-mode { background-color: #FFFFFF; opacity: 0.333; } .monaco-editor .token { color: #000000; } .monaco-editor .token.meta { color: #e00000; } .monaco-editor .token.meta.code1 { font-weight: bold; } .monaco-editor .token.keyword { color: #0000FF; } .monaco-editor .token.keyword.flow { color: #AF00DB; } .monaco-editor .token.variable { color: #001188; } .monaco-editor .token.variable.predefined { color: #4864AA; } .monaco-editor .token.constant { color: #dd0000; } .monaco-editor .token.string { color: #A31515; } .monaco-editor .token.string.escape { color: #A31515; } .monaco-editor .token.comment { color: #008000; font-style: italic; } .monaco-editor .token.literal { color: #e00000; } .monaco-editor .token.literal.hex { color: #e07000; } .monaco-editor .token.number { color: #09885A; } .monaco-editor .token.number.hex { color: #3030c0; } .monaco-editor .token.number.octal { color: #204070; } .monaco-editor .token.number.binary { color: #e07070; } .monaco-editor .token.regexp { color: #811f3f; } .monaco-editor .token.delimiter { color: #008080; } .monaco-editor .token.tag { color: #800000; } .monaco-editor .token.key { color: #863B00; } .monaco-editor .token.attribute.name { color: red; } .monaco-editor .token.attribute.value { color: #0451A5; } .monaco-editor .token.info-token { color: #316bcd; } .monaco-editor .token.warn-token { color: #cd9731; } .monaco-editor .token.error-token { color: #cd3131; } .monaco-editor .token.debug-token { color: purple; } .monaco-editor .token.meta.php { font-weight: bold; } .monaco-editor .token.comment.vs { font-style: italic; } .monaco-editor .token.attribute.vs { font-style: italic; } .monaco-editor .token.vs { font-style: italic; } .monaco-editor .token.delimiter.vs { font-style: italic; } .monaco-editor .token.string.vs { font-style: italic; } .monaco-editor .token.predefined.ruby { color: #0000FF; } /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ .monaco-editor.vs .current-line { background: none; border: 2px solid #EEE; box-sizing: border-box; } .monaco-editor.vs.focus .current-line { border-color: #EAEAF2; } .monaco-editor.vs .typeInfo { color: blue; } .monaco-editor.vs .typeInfo .documentation { color: #A21B1B; } .monaco-editor.vs .token.delimiter { color: #000000; } .monaco-editor.vs .token.literal { color: #000000; } .monaco-editor.vs .token.delimiter.html { color: #383838; } .monaco-editor.vs .token.meta.content.html { color: red; } .monaco-editor.vs .token.meta.html { color: gray; } .monaco-editor.vs .token.tag.html { color: #800000; } .monaco-editor.vs .token.attribute.name.html { color: red; } .monaco-editor.vs .token.attribute.value.html { color: blue; } .monaco-editor.vs .token.delimiter.xml { color: blue; } .monaco-editor.vs .token.meta.content.xml { color: red; } .monaco-editor.vs .token.meta.xml { color: gray; } .monaco-editor.vs .token.tag.xml { color: #800000; } .monaco-editor.vs .token.attribute.name.xml { color: red; } .monaco-editor.vs .token.attribute.value.xml { color: blue; } .monaco-editor.vs .token.constant.php { color: #dd0000; } .monaco-editor.vs .token.block.php { color: green; } .monaco-editor.vs .token.variable.predefined.php { color: #ff8888; } .monaco-editor.vs .token.entity.ts { color: black; } .monaco-editor.vs .token.vs { color: #006400; } .monaco-editor.vs .token.comment.vs { color: #aeb9ae; } .monaco-editor.vs .token.tag.vs { color: #aeb9ae; } .monaco-editor.vs .token.attribute.name.vs { color: #aeb9ae; } .monaco-editor.vs .token.attribute.value.vs { color: #2c51cc; } .monaco-editor.vs .token.delimiter.vs { color: #708870; } .monaco-editor.vs .token.meta.java { color: gray; } .monaco-editor.vs .token.tag.jade { color: #800000; } .monaco-editor.vs .token.tag.id.jade, .monaco-editor.vs .token.tag.class.jade { color: #4F76AC; } .monaco-editor.vs .token.interpolation.jade { color: magenta; } .monaco-editor.vs .token.interpolation.delimiter.jade { color: magenta; } .monaco-editor .token.emphasis { font-style: italic;} .monaco-editor .token.strong { font-weight: bold; } .monaco-editor .token.header { color: navy ;}PNG  IHDR w&gAMA a pHYs(JtEXtSoftwarePaint.NET v3.5.100r?IDATcPTTd-y qbSS!b T{8,-ٸ2k(U7wR VxNJJFu-5ދ zR%䒖Gʼn2Hr hZ@a1('!}goIENDB`PNG  IHDR~gAMA asRGB pHYsod9IDATc_UqZ V@|A&@C b&G!toVIENDB`PNG  IHDR~gAMA asRGB pHYsod9IDATc7133 1bE A@l _7?b^"'^vvIENDB`PNG  IHDRH-sRGBgAMA a pHYsodtEXtSoftwarePaint.NET v3.5.100r+IDAT8Oc:੒*DՈdMe \j)tpIENDB`/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/modes/monarch/monarchWorker",["require","exports","vs/base/severity","vs/editor/worker/modesWorker","vs/platform/markers/markers"],function(e,t,n,i,o){var r=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t}(i.AbstractWorkerMode);t.MonarchNullWorker=r});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/editor/modes/monarch/monarchWorker.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/editor/modes/monarch/monarchWorker.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,r){function t(){this.constructor=e}for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.prototype=r.prototype,e.prototype=new t};define("vs/languages/nullWorker",["require","exports","vs/editor/worker/modesWorker"],function(e,r,t){var n=function(e){function r(){e.apply(this,arguments)}return __extends(r,e),r}(t.AbstractWorkerMode);r.NullWorker=n});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/nullWorker.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/nullWorker.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ /*! © Microsoft. All rights reserved. This library is supported for use in Windows Store apps only. Build: 1.0.9200.20602.win8_ldr.130108-1504 Version: Microsoft.WinJS.1.0 */ "undefined"==typeof WinJS&&(!function(e){e.setImmediate||(e.setImmediate=function(t){return e.setTimeout(t,0)})}(this),function(e,t){"use strict";function n(e,n){var r,i,o,s=Object.keys(n);for(i=0,o=s.length;o>i;i++){var a=s[i],u=95!==a.charCodeAt(0),l=n[a];!l||"object"!=typeof l||l.value===t&&"function"!=typeof l.get&&"function"!=typeof l.set?u?e[a]=l:(r=r||{},r[a]={value:l,enumerable:u,configurable:!0,writable:!0}):(l.enumerable===t&&(l.enumerable=u),r=r||{},r[a]=l)}r&&Object.defineProperties(e,r)}!function(t){function r(e,t,r){for(var i=e,o=t.split("."),s=0,a=o.length;a>s;s++){var u=o[s];i[u]||Object.defineProperty(i,u,{value:{},writable:!1,enumerable:!0,configurable:!0}),i=i[u]}return r&&n(i,r),i}function i(t,n){return r(e,t,n)}e[t]||(e[t]=Object.create(Object.prototype));var o=e[t];o.Namespace||(o.Namespace=Object.create(Object.prototype)),Object.defineProperties(o.Namespace,{defineWithParent:{value:r,writable:!0,enumerable:!0,configurable:!0},define:{value:i,writable:!0,enumerable:!0,configurable:!0}})}("WinJS"),function(e){function t(t,r,i){return t=t||function(){},e.Utilities.markSupportedForProcessing(t),r&&n(t.prototype,r),i&&n(t,i),t}function r(r,i,o,s){if(r){i=i||function(){};var a=r.prototype;return i.prototype=Object.create(a),e.Utilities.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),o&&n(i.prototype,o),s&&n(i,s),i}return t(i,o,s)}function i(e){e=e||function(){};var t,r;for(t=1,r=arguments.length;r>t;t++)n(e.prototype,arguments[t]);return e}e.Namespace.define("WinJS.Class",{define:t,derive:r,mix:i})}(WinJS)}(this),function(e,t){"use strict";function n(e){return e}function r(e,t,n){return e.split(".").reduce(function(e,t){return e?n(e[t]):null},t)}var i=!!e.Windows,o={notSupportedForProcessing:"Value is not supported within a declarative processing context, if you want it to be supported mark it using WinJS.Utilities.markSupportedForProcessing. The value was: '{0}'"};t.Namespace.define("WinJS.Utilities",{_setHasWinRT:{value:function(e){i=e},configurable:!1,writable:!1,enumerable:!1},hasWinRT:{get:function(){return i},configurable:!1,enumerable:!0},_getMemberFiltered:r,getMember:function(t,i){return t?r(t,i||e,n):null},ready:function(n,r){return new t.Promise(function(i,o){function s(){if(n)try{n(),i()}catch(e){o(e)}else i()}var a=t.Utilities.testReadyState;a||(a=e.document?document.readyState:"complete"),"complete"===a||e.document&&null!==document.body?r?e.setImmediate(s):s():e.addEventListener("DOMContentLoaded",s,!1)})},strictProcessing:{get:function(){return!0},configurable:!1,enumerable:!0},markSupportedForProcessing:{value:function(e){return e.supportedForProcessing=!0,e},configurable:!1,writable:!1,enumerable:!0},requireSupportedForProcessing:{value:function(n){var r=!0;switch(r=r&&!(n===e),r=r&&!(n===e.location),r=r&&!(n instanceof HTMLIFrameElement),r=r&&!("function"==typeof n&&!n.supportedForProcessing),e.frames.length){case 0:break;case 1:r=r&&!(n===e.frames[0]);break;default:for(var i=0,s=e.frames.length;r&&s>i;i++)r=r&&!(n===e.frames[i])}if(r)return n;throw new t.ErrorFromName("WinJS.Utilities.requireSupportedForProcessing",t.Resources._formatString(o.notSupportedForProcessing,n))},configurable:!1,writable:!1,enumerable:!0}}),t.Namespace.define("WinJS",{validation:!1,strictProcessing:{value:function(){},configurable:!1,writable:!1,enumerable:!1}})}(this,WinJS),function(){"use strict";function e(e,t,n){var o=e;return"function"==typeof o&&(o=o()),(n&&i.test(n)?"":n?n+": ":"")+(t?t.replace(r,":")+": ":"")+o}function t(e,t,n){var r=WinJS.Utilities.formatLog(e,t,n);console[n&&i.test(n)?n:"log"](r)}function n(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}var r=/\s+/g,i=/^(error|warn|info|log)$/;WinJS.Namespace.define("WinJS.Utilities",{startLog:function(e){e=e||{},"string"==typeof e&&(e={tags:e});var i=e.type&&new RegExp("^("+n(e.type).replace(r," ").split(" ").join("|")+")$"),o=e.excludeTags&&new RegExp("(^|\\s)("+n(e.excludeTags).replace(r," ").split(" ").join("|")+")(\\s|$)","i"),s=e.tags&&new RegExp("(^|\\s)("+n(e.tags).replace(r," ").split(" ").join("|")+")(\\s|$)","i"),a=e.action||t;if(!(i||o||s||WinJS.log))return WinJS.log=a,void 0;var u=function(e,t,n){i&&!i.test(n)||o&&o.test(t)||s&&!s.test(t)||a(e,t,n),u.next&&u.next(e,t,n)};u.next=WinJS.log,WinJS.log=u},stopLog:function(){delete WinJS.log},formatLog:e})}(),function(e){"use strict";function t(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var r=this[t];n?(r||(r={wrapper:function(e){return r.userHandler(e)},userHandler:n},Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,r.wrapper,!1)),r.userHandler=n):r&&(this.removeEventListener(e,r.wrapper,!1),this[t]=null)},enumerable:!0}}function n(){for(var e={},n=0,r=arguments.length;r>n;n++){var i=arguments[n];e["on"+i]=t(i)}return e}var r=e.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),i={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var r=this._listeners[e]=this._listeners[e]||[],i=0,o=r.length;o>i;i++){var s=r[i];if(s.useCapture===n&&s.listener===t)return}r.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){var i=new r(e,t,this);n=n.slice(0,n.length);for(var o=0,s=n.length;s>o&&!i._stopImmediatePropagationCalled;o++)n[o].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var r=this._listeners&&this._listeners[e];if(r)for(var i=0,o=r.length;o>i;i++){var s=r[i];if(s.listener===t&&s.useCapture===n){r.splice(i,1),0===r.length&&delete this._listeners[e];break}}}};e.Namespace.define("WinJS.Utilities",{_createEventProperty:t,createEventProperties:n,eventMixin:i})}(WinJS),function(e,t,n){"use strict";var r,i=!1,o="contextchanged",s=t.Class.mix(t.Class.define(null,{},{supportedForProcessing:!1}),t.Utilities.eventMixin),a=new s,u={malformedFormatStringInput:"Malformed, did you mean to escape your '{0}'?"};t.Namespace.define("WinJS.Resources",{addEventListener:function(e,n,r){if(t.Utilities.hasWinRT&&!i&&e===o)try{Windows.ApplicationModel.Resources.Core.ResourceManager.current.defaultContext.qualifierValues.addEventListener("mapchanged",function(e){t.Resources.dispatchEvent(o,{qualifier:e.key,changed:e.target[e.key]})},!1),i=!0}catch(s){}a.addEventListener(e,n,r)},removeEventListener:a.removeEventListener.bind(a),dispatchEvent:a.dispatchEvent.bind(a),_formatString:function(e){var n=arguments;return n.length>1&&(e=e.replace(/({{)|(}})|{(\d+)}|({)|(})/g,function(e,r,i,o,s,a){if(s||a)throw t.Resources._formatString(u.malformedFormatStringInput,s||a);return r&&"{"||i&&"}"||n[(0|o)+1]})),e},_getStringWinRT:function(e){if(!r){var t=Windows.ApplicationModel.Resources.Core.ResourceManager.current.mainResourceMap;try{r=t.getSubtree("Resources")}catch(i){}r||(r=t)}var o,s,a;try{a=r.getValue(e),a&&(o=a.valueAsString,o===n&&(o=a.toString()))}catch(i){}if(!o)return{value:e,empty:!0};try{s=a.getQualifierValue("Language")}catch(i){return{value:o}}return{value:o,lang:s}},_getStringJS:function(t){var n=e.strings&&e.strings[t];return"string"==typeof n&&(n={value:n}),n||{value:t,empty:!0}}}),Object.defineProperties(t.Resources,t.Utilities.createEventProperties(o));var l;t.Resources.getString=function(e){return(l=l||(t.Utilities.hasWinRT?t.Resources._getStringWinRT:t.Resources._getStringJS))(e)}}(this,WinJS),function(e,t){"use strict";function n(){}function r(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?N:P,e._value=t,e._setState(n)}function i(e,t,n,r,i,o){return{exception:e,error:t,promise:n,handler:o,id:r,parent:i}}function o(e,t,n,r){var o=n._isException,s=n._errorId;return i(o?t:null,o?null:t,e,s,n,r)}function s(e,t,n){var r=n._isException,o=n._errorId;return m(e,o,r),i(r?t:null,r?null:t,e,o,n)}function a(e,t){var n=++H;return m(e,n),i(null,t,e,n)}function u(e,t){var n=++H;return m(e,n,!0),i(t,null,e,n)}function l(e,t,n,r){g(e,{c:t,e:n,p:r})}function c(e,t,n,r){e._value=t,p(e,t,n,r),e._setState(D)}function d(e,t){var n=e._value,r=e._listeners;if(r){e._listeners=null;var i,o;for(i=0,o=Array.isArray(r)?r.length:1;o>i;i++){var s=1===o?r:r[i],a=s.c,u=s.promise;if(u){try{u._setCompleteValue(a?a(n):n)}catch(l){u._setExceptionValue(l)}u._state!==N&&u._listeners&&t.push(u)}else j.prototype.done.call(e,a)}}}function h(e,t){var n=e._value,r=e._listeners;if(r){e._listeners=null;var i,s;for(i=0,s=Array.isArray(r)?r.length:1;s>i;i++){var a=1===s?r:r[i],u=a.e,l=a.promise;if(l){try{u?(u.handlesOnError||p(l,n,o,e,u),l._setCompleteValue(u(n))):l._setChainedErrorValue(n,e)}catch(c){l._setExceptionValue(c)}l._state!==N&&l._listeners&&t.push(l)}else z.prototype.done.call(e,null,u)}}}function p(e,t,n,r,i){if(S._listeners[E]){if(t instanceof Error&&t.message===L)return;S.dispatchEvent(E,n(e,t,r,i))}}function f(e,t){var n=e._listeners;if(n){var r,i;for(r=0,i=Array.isArray(n)?n.length:1;i>r;r++){var o=1===i?n:n[r],s=o.p;if(s)try{s(t)}catch(a){}o.c||o.e||!o.promise||o.promise._progress(t)}}}function g(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n],n.push(t)):n=t,e._listeners=n}function m(e,t,n){e._isException=n||!1,e._errorId=t}function v(e,t,n,r){e._value=t,p(e,t,n,r),e._setState(W)}function y(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?N:A,e._value=t,e._setState(n)}function _(e,t,n,r){var i=new U(e);return g(e,{promise:i,c:t,e:n,p:r}),i}function b(e){var t;return new WinJS.Promise(function(n){e?t=setTimeout(n,e):setImmediate(n)},function(){t&&clearTimeout(t)})}function C(e,t){var n=function(){t.cancel()},r=function(){e.cancel()};return e.then(n),t.then(r,r),t}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var w=WinJS.Class.mix(WinJS.Class.define(null,{},{supportedForProcessing:!1}),WinJS.Utilities.eventMixin),S=new w;S._listeners={};var E="error",L="Canceled",T=!1,M={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};M.all=M.promise|M.thenPromise|M.errorPromise|M.exceptionPromise|M.completePromise;var x,k,N,R,I,O,P,A,D,W,H=1;x={name:"created",enter:function(e){e._setState(k)},cancel:n,done:n,then:n,_completed:n,_error:n,_notify:n,_progress:n,_setCompleteValue:n,_setErrorValue:n},k={name:"working",enter:n,cancel:function(e){e._setState(I)},done:l,then:_,_completed:r,_error:c,_notify:n,_progress:f,_setCompleteValue:y,_setErrorValue:v},N={name:"waiting",enter:function(e){var t=e._value,n=function(r){t._errorId?e._chainedError(r,t):(p(e,r,o,t,n),e._error(r))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))},cancel:function(e){e._setState(R)},done:l,then:_,_completed:r,_error:c,_notify:n,_progress:f,_setCompleteValue:y,_setErrorValue:v},R={name:"waiting_canceled",enter:function(e){e._setState(O);var t=e._value;t.cancel&&t.cancel()},cancel:n,done:l,then:_,_completed:r,_error:c,_notify:n,_progress:f,_setCompleteValue:y,_setErrorValue:v},I={name:"canceled",enter:function(e){e._setState(O),e._cancelAction()},cancel:n,done:l,then:_,_completed:r,_error:c,_notify:n,_progress:f,_setCompleteValue:y,_setErrorValue:v},O={name:"canceling",enter:function(e){var t=new Error(L);t.name=t.message,e._value=t,e._setState(D)},cancel:n,done:n,then:n,_completed:n,_error:n,_notify:n,_progress:n,_setCompleteValue:n,_setErrorValue:n},P={name:"complete_notify",enter:function(e){if(e.done=j.prototype.done,e.then=j.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.pop(),t._state._notify(t,n);e._setState(A)},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:d,_progress:n,_setCompleteValue:n,_setErrorValue:n},A={name:"success",enter:function(e){e.done=j.prototype.done,e.then=j.prototype.then,e._cleanupAction()},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:d,_progress:n,_setCompleteValue:n,_setErrorValue:n},D={name:"error_notify",enter:function(e){if(e.done=z.prototype.done,e.then=z.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.pop(),t._state._notify(t,n);e._setState(W)},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:h,_progress:n,_setCompleteValue:n,_setErrorValue:n},W={name:"error",enter:function(e){e.done=z.prototype.done,e.then=z.prototype.then,e._cleanupAction()},cancel:n,done:null,then:null,_completed:n,_error:n,_notify:h,_progress:n,_setCompleteValue:n,_setErrorValue:n};var V,F=WinJS.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,n){this._state.done(this,e,t,n)},then:function(e,t,n){return this._state.then(this,e,t,n)},_chainedError:function(e,t){var n=this._state._error(this,e,s,t);return this._run(),n},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,a);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,s,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,u);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),U=WinJS.Class.derive(F,function(e){T&&(T===!0||T&M.thenPromise)&&(this._stack=WinJS.Promise._getStack()),this._creator=e,this._setState(x),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),z=WinJS.Class.define(function(e){T&&(T===!0||T&M.errorPromise)&&(this._stack=WinJS.Promise._getStack()),this._value=e,p(this,e,a)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||p(null,n,o,this,t);var r=t(n);return r&&"object"==typeof r&&"function"==typeof r.done&&r.done(),void 0}catch(i){n=i}n instanceof Error&&n.message===L||setImmediate(function(){throw n})},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||p(null,r,o,this,t),n=new j(t(r))}catch(i){n=i===r?this:new B(i)}return n}},{supportedForProcessing:!1}),B=WinJS.Class.derive(z,function(e){T&&(T===!0||T&M.exceptionPromise)&&(this._stack=WinJS.Promise._getStack()),this._value=e,p(this,e,u)},{},{supportedForProcessing:!1}),j=WinJS.Class.define(function(e){if(T&&(T===!0||T&M.completePromise)&&(this._stack=WinJS.Promise._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new U(null);return t._setCompleteValue(e),t}this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(n){setImmediate(function(){throw n})}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new j(t)}catch(n){return new B(n)}}},{supportedForProcessing:!1}),q=WinJS.Class.derive(F,function(e,t){T&&(T===!0||T&M.promise)&&(this._stack=WinJS.Promise._getStack()),this._oncancel=t,this._setState(x),this._run();try{var n=this._completed.bind(this),r=this._error.bind(this),i=this._progress.bind(this);e(n,r,i)}catch(o){this._setExceptionValue(o)}},{_oncancel:null,_cancelAction:function(){if(!this._oncancel)throw new Error("Promise did not implement oncancel");try{this._oncancel()}catch(e){{e.message,e.stack}S.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){S.addEventListener(e,t,n)},any:function(e){return new q(function(t,n){{var r=Object.keys(e);Array.isArray(e)?[]:{}}0===r.length&&t();var i=0;r.forEach(function(o){q.as(e[o]).then(function(){t({key:o,value:e[o]})},function(s){return s instanceof Error&&s.name===L?(++i===r.length&&t(WinJS.Promise.cancel),void 0):(n({key:o,value:e[o]}),void 0)})})},function(){var t=Object.keys(e);t.forEach(function(t){var n=q.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new j(e)},cancel:{get:function(){return V=V||new z(new WinJS.ErrorFromName(L))}},dispatchEvent:function(e,t){return S.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new q(function(n,r,i){var o=Object.keys(e),s=Array.isArray(e)?[]:{},a=Array.isArray(e)?[]:{},u=0,l=o.length,c=function(e){if(0===--l){var t=Object.keys(s).length;if(0===t)n(a);else{var u=0;o.forEach(function(e){var t=s[e];t instanceof Error&&t.name===L&&u++}),u===t?n(WinJS.Promise.cancel):r(s)}}else i({Key:e,Done:!0})};return o.forEach(function(n){var r=e[n];r===t?u++:q.then(r,function(e){a[n]=e,c(n)},function(e){s[n]=e,c(n)})}),l-=u,0===l?(n(a),void 0):void 0},function(){Object.keys(e).forEach(function(t){var n=q.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){S.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,r){return q.as(e).then(t,n,r)},thenEach:function(e,t,n,r){var i=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){i[o]=q.as(e[o]).then(t,n,r)}),q.join(i)},timeout:function(e,t){var n=b(e);return t?C(n,t):n},wrap:function(e){return new j(e)},wrapError:function(e){return new z(e)},_veryExpensiveTagWithStack:{get:function(){return T},set:function(e){T=e}},_veryExpensiveTagWithStack_tag:M,_getStack:function(){if(Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}}});Object.defineProperties(q,WinJS.Utilities.createEventProperties(E));var G=WinJS.Class.derive(F,function(e){this._oncancel=e,this._setState(x),this._run()},{_cancelAction:function(){this._oncancel&&this._oncancel()},_cleanupAction:function(){this._oncancel=null}},{supportedForProcessing:!1}),K=WinJS.Class.define(function(e){this._promise=new G(e)},{promise:{get:function(){return this._promise}},cancel:function(){this._promise.cancel()},complete:function(e){this._promise._completed(e)},error:function(e){this._promise._error(e)},progress:function(e){this._promise._progress(e)}},{supportedForProcessing:!1});WinJS.Namespace.define("WinJS",{Promise:q,_Signal:K})}(this),function(e,t){"use strict";t.Namespace.define("WinJS",{ErrorFromName:t.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1})})}(this,WinJS),function(){"use strict";WinJS.Namespace.define("WinJS",{xhr:function(e){var t;return new WinJS.Promise(function(n,r,i){t=new XMLHttpRequest,t.onreadystatechange=function(){t._canceled||(4===t.readyState?(t.status>=200&&t.status<300||1223===t.status?n(t):r(t),t.onreadystatechange=function(){}):i(t))},t.open(e.type||"GET",e.url,!0,e.user,e.password),t.responseType=e.responseType||"",Object.keys(e.headers||{}).forEach(function(n){t.setRequestHeader(n,e.headers[n])}),t.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.customRequestInitializer&&e.customRequestInitializer(t),t.send(e.data)},function(){t._canceled=!0,t.abort()})}})}(),function(e){"use strict";var t,n,r,i,o,s,a={nonStaticHTML:"Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property or the document.write method to add a script element will generate this exception. If the content is safe and from a trusted source, use a method to explicitly manipulate elements and attributes, such as createElement, or use setInnerHTMLUnsafe (or other unsafe method)."};t=n=function(e,t){e.innerHTML=t},r=i=function(e,t){e.outerHTML=t},o=s=function(e,t,n){e.insertAdjacentHTML(t,n)};var u=e.MSApp;if(u)n=function(e,t){u.execUnsafeLocalFunction(function(){e.innerHTML=t})},i=function(e,t){u.execUnsafeLocalFunction(function(){e.outerHTML=t})},s=function(e,t,n){u.execUnsafeLocalFunction(function(){e.insertAdjacentHTML(t,n)})};else if(e.msIsStaticHTML){var l=function(t){if(!e.msIsStaticHTML(t))throw new WinJS.ErrorFromName("WinJS.Utitilies.NonStaticHTML",a.nonStaticHTML)};t=function(e,t){l(t),e.innerHTML=t},r=function(e,t){l(t),e.outerHTML=t},o=function(e,t,n){l(n),e.insertAdjacentHTML(t,n)}}WinJS.Namespace.define("WinJS.Utilities",{setInnerHTML:t,setInnerHTMLUnsafe:n,setOuterHTML:r,setOuterHTMLUnsafe:i,insertAdjacentHTML:o,insertAdjacentHTMLUnsafe:s})}(this)),define("vs/base/lib/raw.winjs.base",[],{}),define("vs/base/types",["require","exports"],function(e,t){function n(e){return Array.isArray?Array.isArray(e):e&&"number"==typeof e.length&&e.constructor===Array?!0:!1}function r(e){return"string"==typeof e||e instanceof String?!0:!1}function i(e){return"undefined"==typeof e||null===e?!1:"[object Object]"===Object.prototype.toString.call(e)}function o(e){return("number"==typeof e||e instanceof Number)&&!isNaN(e)?!0:!1}function s(e){return e===!0||e===!1}function a(e){return"undefined"==typeof e}function u(e){return t.isUndefined(e)||null===e}function l(e){if(!t.isObject(e))return!1;for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}function c(e){return"[object Function]"===Object.prototype.toString.call(e)}function d(){for(var e=[],n=0;n0&&e.every(function(e){return t.isFunction(e)})}function h(e){for(var t=[],n=0;n=0&&d.indexOf("MSIE")<0,m=d.indexOf("MSIE 10")>=0,v=d.indexOf("MSIE 9")>=0,y=!1;t.browser={isWindows:d.indexOf("Windows")>=0,isMacintosh:d.indexOf("Macintosh")>=0,isOpera:d.indexOf("Opera")>=0,isIE11orEarlier:g||m||v,isIE11:g,isIE10orEarlier:m||v,isIE10orLater:g||m,isIE10:m,isIE9:v,isFirefox:d.indexOf("Firefox")>=0,isWebKit:d.indexOf("AppleWebKit")>=0,isChrome:d.indexOf("Chrome")>=0,isSafari:-1===d.indexOf("Chrome")&&d.indexOf("Safari")>=0,isIPad:d.indexOf("iPad")>=0,canPushState:function(){return!y&&self&&self.history&&self.history.pushState},disablePushState:function(){y=!0},hasWorkers:f,hasCSSAnimationSupport:function(){if(this._hasCSSAnimationSupport===!0||this._hasCSSAnimationSupport===!1)return this._hasCSSAnimationSupport;for(var e=!1,t=document.createElement("div"),r=["animationName","webkitAnimationName","msAnimationName","MozAnimationName","OAnimationName"],i=0;i0&&null!==e.statusText?t&&null!==e.responseText&&e.responseText.length>0?n.localize("vs_base_errors",3,e.statusText,e.status,e.responseText):n.localize("vs_base_errors",4,e.statusText,e.status):t&&null!==e.responseText&&e.responseText.length>0?n.localize("vs_base_errors",5,e.responseText):n.localize("vs_base_errors",6)}function c(e,t){return l(new C(e),t)}function d(e,t){return t&&e.message&&(e.stack||e.stacktrace)?n.localize("vs_base_errors",7,e.message,e.stack||e.stacktrace):e.message?e.message:n.localize("vs_base_errors",8)}function h(e,t){if("undefined"==typeof t&&(t=!1),!e)return n.localize("vs_base_errors",9);if(o.isString(e))return e;if(e instanceof C)return l(e,t);if(!o.isUndefinedOrNull(e.status))return c(e,t);if(e.detail){var r=e.detail;if(r.error){if(r.error&&!o.isUndefinedOrNull(r.error.status))return c(r.error,t);if(!o.isArray(r.error))return d(r.error,t);for(var i=0;it;t++)this.prefixSum[t]=0;this.prefixSumValidIndex=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValue=function(e,t){this.values.splice(e,0,t),this.prefixSum.splice(e,0,0),e-1e)return 0;if(e<=this.prefixSumValidIndex)return this.prefixSum[e];var t=this.prefixSumValidIndex+1;0===t&&(this.prefixSum[0]=this.values[0],t++);for(var n=t;e>=n;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex=Math.max(this.prefixSumValidIndex,e),this.prefixSum[e]},e.prototype.getIndexOf=function(e,t){for(var n,r,i,o=0,s=this.values.length-1;s>=o;)if(n=o+(s-o)/2|0,i=this.getAccumulatedValue(n),r=i-this.values[n],r>e)s=n-1;else{if(!(e>=i))break;o=n+1}t.index=n,t.remainder=e-r},e}();t.PrefixSumComputer=n}),define("vs/base/eventEmitter",["require","exports","vs/base/errors"],function(e,t,n){var r=function(){function e(e,t,n){"undefined"==typeof n&&(n=null),this._type=e,this._data=t,this._emitterType=n}return e.prototype.getType=function(){return this._type},e.prototype.getData=function(){return this._data},e.prototype.getEmitterType=function(){return this._emitterType},e}();t.EmitterEvent=r;var i=function(){function e(e){if("undefined"==typeof e&&(e=null),this._listeners={},this._bulkListeners=[],this._collectedEvents=[],this._deferredCnt=0,e){this._allowedEventTypes={};for(var t=0;to;o++)i.push(new r(e[o].getType(),e[o].getData(),t))}0===n._deferredCnt?n._emitEvents(i):n._collectedEvents.push.apply(n._collectedEvents,i)})},e.prototype.addEmitter2=function(e,t){var n=this.addEmitter(e,t);return{dispose:n}},e.prototype.addEmitterTypeListener=function(e,t,n){if(t){if("*"===e)throw new Error("Bulk listeners cannot specify an emitter type");return this.addListener(e+"/"+t,n)}return this.addListener(e,n)},e.prototype._removeListener=function(e,t){if(this._listeners.hasOwnProperty(e))for(var n=this._listeners[e],r=0,i=n.length;i>r;r++)if(n[r]===t){n.splice(r,1);break}},e.prototype._removeBulkListener=function(e){for(var t=0,n=this._bulkListeners.length;n>t;t++)if(this._bulkListeners[t]===e){this._bulkListeners.splice(t,1);break}},e.prototype._emitToSpecificTypeListeners=function(e,t){if(this._listeners.hasOwnProperty(e))for(var r=this._listeners[e].slice(0),i=0,o=r.length;o>i;i++)try{r[i](t)}catch(s){n.onUnexpectedError(s)}},e.prototype._emitToBulkListeners=function(e){for(var t=this._bulkListeners.slice(0),r=0,i=t.length;i>r;r++)try{t[r](e)}catch(o){n.onUnexpectedError(o)}},e.prototype._emitEvents=function(e){this._bulkListeners.length>0&&this._emitToBulkListeners(e);for(var t=0,n=e.length;n>t;t++){var r=e[t];this._emitToSpecificTypeListeners(r.getType(),r.getData()),r.getEmitterType()&&this._emitToSpecificTypeListeners(r.getType()+"/"+r.getEmitterType(),r.getData())}},e.prototype.emit=function(e,t){if("undefined"==typeof t&&(t={}),this._allowedEventTypes&&!this._allowedEventTypes.hasOwnProperty(e))throw new Error("Cannot emit this event type because it wasn't white-listed!");if(this._listeners.hasOwnProperty(e)||0!==this._bulkListeners.length){var n=new r(e,t);0===this._deferredCnt?this._emitEvents([n]):this._collectedEvents.push(n)}},e.prototype.deferredEmit=function(e){this._deferredCnt=this._deferredCnt+1;var t=e();return this._deferredCnt=this._deferredCnt-1,0===this._deferredCnt&&this._emitCollected(),t},e.prototype._emitCollected=function(){var e=this._collectedEvents;this._collectedEvents=[],e.length>0&&this._emitEvents(e)},e}();t.EventEmitter=i}),define("vs/editor/editor",["require","exports"],function(e,t){!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(t.SelectionDirection||(t.SelectionDirection={}));t.SelectionDirection;!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(t.OverviewRulerLane||(t.OverviewRulerLane={}));t.OverviewRulerLane;!function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(t.EndOfLinePreference||(t.EndOfLinePreference={}));t.EndOfLinePreference;!function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(t.TrackedRangeStickiness||(t.TrackedRangeStickiness={}));t.TrackedRangeStickiness;!function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(t.ContentWidgetPositionPreference||(t.ContentWidgetPositionPreference={}));t.ContentWidgetPositionPreference;!function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(t.OverlayWidgetPositionPreference||(t.OverlayWidgetPositionPreference={}));t.OverlayWidgetPositionPreference;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET"}(t.MouseTargetType||(t.MouseTargetType={}));t.MouseTargetType}),define("vs/editor/modes/modes",["require","exports","vs/base/types"],function(e,t,n){function r(e){return null===e||"object"!=typeof e?!1:"string"!=typeof e.label||"string"!=typeof e.codeSnippet||"string"!=typeof e.type?!1:n.isUndefinedOrNull(e.highlights)||n.isArray(e.highlights)?n.isUndefinedOrNull(e.typeLabel)||"string"==typeof e.typeLabel?n.isUndefinedOrNull(e.documentationLabel)||"string"==typeof e.documentationLabel?!0:!1:!1:!1}!function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Close=-1]="Close"}(t.Bracket||(t.Bracket={}));t.Bracket;t.isISuggestion=r,function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent"}(t.IndentAction||(t.IndentAction={}));t.IndentAction}),define("vs/base/arrays",["require","exports"],function(e,t){function n(e,t){return"undefined"==typeof t&&(t=0),e[e.length-(1+t)]}function r(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],function(){e.splice(n,1),n--,r--})}function i(e,t){"undefined"==typeof t&&(t=null);for(var n=new Array(e);e-->0;)n.push(t);return n}function o(e,t,n){for(var r=0,i=e.length-1;i>=r;){var o=Math.floor((r+i)/2),s=n(e[o],t);if(0>s)r=o+1;else{if(!(s>0))return o;i=o-1}}return-1}function s(e){for(var t=new Array,n=0,r=e.length;r>n;n++)t.push.apply(t,e[n]);return t}function a(e,t){for(var n,r=0,i=e.length-1;i>r;)n=r+Math.ceil((i-r)/2),e[n].startIndex>t?i=n-1:r=n;return r}function u(e){for(var t=[],n=0;n=0}function c(e,t,n){var r=e[t],i=e[n];e[t]=i,e[n]=r}function d(e,t,n){e.splice(n,0,e.splice(t,1)[0])}t.tail=n,t.forEach=r,t.fill=i,t.binarySearch=o,t.merge=s,t.findIndexInSegmentsArray=a,t.coalesce=u,t.contains=l,t.swap=c,t.move=d}),define("vs/editor/core/model/modelLine",["require","exports","vs/editor/modes/modes","vs/base/arrays"],function(e,t,n,r){var i=function(){function e(e,t){this.lineNumber=e,this.text=t,this.state=null,this.modeTransitions=null,this.isInvalid=!1,this.markers=[],this._recreateLineTokens(null)}return e.prototype._recreateLineTokens=function(t){0===this.text.length?t=e.DEFAULT_TOKENS_EMPTY_TEXT:t&&0!==t.length||(t=e.DEFAULT_TOKENS_NON_EMPTY_TEXT),this.lineTokens=new o(t,this.text.length)},e.prototype.insertText=function(t,n,r,i){var o=this.text,s=o.length+1,a=this.lineTokens.getTokens(),u=r.text.length;n=Math.max(1,n),n=Math.min(n,s);var l,c;if(u>0){var d=o.substring(0,n-1)+r.text+o.substring(n-1,o.length);if(a!==e.DEFAULT_TOKENS_NON_EMPTY_TEXT&&a!==e.DEFAULT_TOKENS_EMPTY_TEXT){var h;for(l=0,c=a.length;c>l;l++)h=a[l],h.startIndex>=n-1&&h.startIndex>0&&(h.startIndex+=u)}var p;for(l=0,c=this.markers.length;c>l;l++)p=this.markers[l],(p.column>n||p.column===n&&(i||!p.stickToPreviousCharacter))&&(t[p.id]=!0,p.oldLineNumber=p.oldLineNumber||this.lineNumber,p.oldColumn=p.oldColumn||p.column,p.column+=u);this.text=d,this._recreateLineTokens(a)}if(r.markers)for(l=0,c=r.markers.length;c>l;l++)p=r.markers[l],t[p.id]=!0,p.oldLineNumber=p.oldLineNumber||this.lineNumber,p.oldColumn=p.oldColumn||p.column,p.line=this,p.column+=n-1,this.markers.push(p)},e.prototype.removeText=function(t,n,r,i,o){var s=r,a="",u=[],l=this.text,c=l.length+1,d=this.lineTokens.getTokens();n=Math.max(1,n),r=Math.max(1,r),n=Math.min(n,c),r=Math.min(r,c);var h;if(r>n&&r>1&&c>n){a=l.substring(n-1,r-1);var p=l.substring(0,n-1)+l.substring(r-1,l.length);if(d!==e.DEFAULT_TOKENS_NON_EMPTY_TEXT&&d!==e.DEFAULT_TOKENS_EMPTY_TEXT){var f,g;for(h=0;h=r-1?g=f-a.length:f>=n-1&&(g=n-1),g>=p.length?(d.splice(h,1),h--):(d[h].startIndex=g,h>0&&d[h-1].startIndex>=g&&(d.splice(h-1,1),h--))}}this.text=p,this._recreateLineTokens(d)}var m;for(h=0;hs||m.column===s&&(o||!m.stickToPreviousCharacter)?(t[m.id]=!0,m.oldLineNumber=m.oldLineNumber||this.lineNumber,m.oldColumn=m.oldColumn||m.column,m.column-=a.length):(m.column>n||m.column===n&&(o||!m.stickToPreviousCharacter))&&(t[m.id]=!0,m.oldLineNumber=m.oldLineNumber||this.lineNumber,m.oldColumn=m.oldColumn||m.column,i?(m.line=null,m.column-=n-1,this.markers.splice(h,1),h--,u.push(m)):m.column=n);return{text:a,markers:u}},e.prototype.addMarker=function(e){e.line=this,this.markers.push(e)},e.prototype.addMarkers=function(e){var t,n;for(t=0,n=e.length;n>t;t++)e[t].line=this;this.markers=this.markers.concat(e)},e.prototype.removeMarker=function(e){var t=this._indexOfMarkerId(e.id);t>=0&&this.markers.splice(t,1),e.line=null},e.prototype._indexOfMarkerId=function(e){var t,n,r=this.markers;for(t=0,n=r.length;n>t;t++)if(r[t].id===e)return t;return-1},e.prototype.setTokens=function(e){this._recreateLineTokens(e)},e.DEFAULT_TOKENS_NON_EMPTY_TEXT=[{startIndex:0,type:"",bracket:0}],e.DEFAULT_TOKENS_EMPTY_TEXT=[],e}();t.ModelLine=i;var o=function(){function e(e,t){this.tokens=e,this.textLength=t}return e.prototype.getTokens=function(){return this.tokens},e.prototype.getTextLength=function(){return this.textLength},e.prototype.equals=function(e){return this===e},e.prototype.findIndexOfOffset=function(e){return r.findIndexInSegmentsArray(this.tokens,e)},e}();t.LineTokens=o}),define("vs/base/strings",["require","exports","vs/nls!vs/editor/worker/editorWorkerServer","vs/base/types"],function(e,t,n,r){function i(e,t,n){"undefined"==typeof n&&(n="0");for(var r=""+e,i=[r],o=r.length;t>o;o++)i.push(n);return i.reverse().join("")}function o(e){for(var t=[],n=0;no;o++)r=r.replace(new RegExp("\\{"+o+"\\}","g"),t[o]);return r}function s(e){return e||(e=new Date),n.localize("vs_base_strings",0,t.pad(e.getMonth()+1,2),t.pad(e.getDate(),2),t.pad(e.getFullYear(),4),t.pad(e.getHours(),2),t.pad(e.getMinutes(),2),t.pad(e.getSeconds(),2))}function a(e){return e||(e=new Date),n.localize("vs_base_strings",1,t.pad(e.getHours(),2),t.pad(e.getMinutes(),2),t.pad(e.getSeconds(),2))}function u(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function l(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function c(e,n,r){return e.replace(new RegExp(t.escapeRegExpCharacters(n.toString()),"g"),r)}function d(e){var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}function h(e,n){"undefined"==typeof n&&(n=" ");var r=t.ltrim(e,n);return t.rtrim(r,n)}function p(e,t){var n=t.length;if(0===n||0===e.length)return e;for(var r=0,i=-1;(i=e.indexOf(t,r))===r;)r+=n;return e.substring(r)}function f(e,t){var n=t.length,r=e.length;if(0===n||0===r)return e;for(var i=r,o=-1;;){if(o=e.lastIndexOf(t,i-1),-1===o||o+n!==i)break;if(0===o)return"";i=o}return e.substring(0,i)}function g(e){return e.replace(/(^\s+|\s+$)/g,"")}function m(e){return e.replace(/\s+/g," ")}function v(e){var t=(new Date).getTime(),r=(t-e)/1e3;if(60>r)return n.localize("vs_base_strings",2,Math.floor(r));var i=r/60;if(60>i)return n.localize("vs_base_strings",3,Math.floor(i));var o=i/60;if(24>o)return n.localize("vs_base_strings",4,Math.floor(o));var s=o/24;return n.localize("vs_base_strings",5,Math.floor(s))}function y(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function _(e,t){for(var n=0,r=t.length;r>n;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return!1;return!0}function b(e,t){if(t.length>e.length)return!1;for(var n=0,r=e.length-t.length;nr;r++)n[r]=encodeURIComponent(n[r]);return n.join("/")}return encodeURIComponent(e)}function L(e){return/^\w[\w.]*$/.test(e)}function T(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function M(e,t,n){return t&&(e="^"+e),n&&(e+="$"),e}function x(e,n){if(t.regExpLeadsToEndlessLoop(new RegExp(e,n)))throw new Error("Regular expression /"+e+"/g results in infinitive matches")}function k(e){return e?(0===e.indexOf("/")&&(e=e.substring(1)),t.encodeURIPart(e,!0)):""}function N(e,t){return"["+e+"m"+t+""}function R(e){for(var t=0,n=e.length;n>t;t++)if(" "!==e.charAt(t)&&" "!==e.charAt(t))return t;return-1}function I(e){for(var t=0,n=e.length;n>t;t++)if(" "!==e.charAt(t)&&" "!==e.charAt(t))return e.substring(0,t);return e}function O(e){for(var t=e.length-1;t>=0;t--)if(" "!==e.charAt(t)&&" "!==e.charAt(t))return t;return-1}function P(e,t){if(!z&&(z=!0,window.Intl&&r.isFunction(window.Intl.Collator))){var n=new window.Intl.Collator;r.isFunction(n.compare)&&(U=n.compare)}return U?U.call(this,e,t):e.localeCompare(t)}function A(e){return e>=97&&122>=e||e>=65&&90>=e}function D(e,t){var n=e.length,r=t.length;if(n!==r)return!1;for(var i=0;n>i;i++){var o=e.charCodeAt(i),s=t.charCodeAt(i);if(o!==s)if(A(o)&&A(s)){var a=Math.abs(o-s);if(0!==a&&32!==a)return!1}else if(String.fromCharCode(o).toLocaleLowerCase()!==String.fromCharCode(s).toLocaleLowerCase())return!1}return!0}function W(e,t,n){"undefined"==typeof n&&(n=4);var r=Math.abs(e.length-t.length);if(r>n)return 0;var i,o,s=[],a=[];for(i=0;in;n++)for(var i=t,o=e[n],s=0,a=o.length;a>s;s++)i=F(i,o.charCodeAt(s));return function(e){for(var n=t,r=0,i=e.length;n.children&&i>r;r++)if(n=V(n,e.charCodeAt(r)),!n)return!1;return!n.children}}function V(e,t){if(!e.children)return null;for(var n=0,r=e.children.length;r>n;n++)if(e.children[n].ch===t)return e.children[n];return null}function F(e,t){if(e.children){for(var n=e.children.length,r=0;n>r;r++)if(e.children[r].ch===t)return e.children[r];return e.children.push({ch:t,children:null}),e.children[n]}return e.children=[{ch:t,children:null}],e.children[0]}t.empty="",t.pad=i,t.format=o,t.formatDate=s,t.formatTime=a,t.escape=u,t.escapeRegExpCharacters=l,t.replaceAll=c,t.stripHtml=d,t.trim=h,t.ltrim=p,t.rtrim=f,t.trimWhitespace=g,t.normalize=m;t.conciseformatDiff=v,t.convertSimple2RegExpPattern=y,t.startsWith=_,t.endsWith=b,t.splice=C,t.createRegExp=w,t.regExpLeadsToEndlessLoop=S,t.encodeURIPart=E,t.isCamelCasePattern=L,t.toRegExpPattern=T,t.anchorPattern=M,t.assertRegExp=x,t.normalizePath=k,t.colorize=N,t.firstNonWhitespaceIndex=R,t.getLeadingWhitespace=I,t.lastNonWhitespaceIndex=O;var U,z=!1;t.localeCompare=P,t.equalsIgnoreCase=D,t.difference=W,t.prefixMatcher=H}),define("vs/editor/core/position",["require","exports"],function(e,t){function n(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column}t.isIPosition=n,function(e){function t(e){return{startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column}}function n(e){return{lineNumber:e.startLineNumber,column:e.startColumn}}function r(e){return{lineNumber:e.endLineNumber,column:e.endColumn}}e.asEmptyRange=t,e.startPosition=n,e.endPosition=r}(t.PositionUtils||(t.PositionUtils={}));var r=(t.PositionUtils,function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.equals=function(e){return!!e&&this.lineNumber===e.lineNumber&&this.column===e.column},e.prototype.isBefore=function(e){return this.lineNumbere.endLineNumber?!1:t.lineNumber===e.startLineNumber&&t.columne.endColumn?!1:!0}function s(e,t){return t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber?!1:t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn?!1:!0}function a(e,t){var n=e.startLineNumber,r=e.startColumn,i=e.endLineNumber,o=e.endColumn,s=t.startLineNumber,a=t.startColumn,u=t.endLineNumber,l=t.endColumn;return s>n?(n=s,r=a):n===s&&(r=Math.max(r,a)),i>u?(i=u,o=l):i===u&&(o=Math.min(o,l)),n>i?null:n===i&&r>o?null:new g(n,r,i,o)}function u(e,t){var n,r,i,o;return t.startLineNumbere.endLineNumber?(i=t.endLineNumber,o=t.endColumn):t.endLineNumber===e.endLineNumber?(i=t.endLineNumber,o=Math.max(t.endColumn,e.endColumn)):(i=e.endLineNumber,o=e.endColumn),new g(n,r,i,o)}function l(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}function c(e,t){return e.startLineNumber===t.startLineNumber?e.startColumn===t.startColumn?e.endLineNumber===t.endLineNumber?e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber:e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber}function d(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}function h(e){return e.endLineNumber>e.startLineNumber}function p(e){return 17*e.startLineNumber+23*e.startColumn+29*e.endLineNumber+37*e.endColumn}function f(e){return new g(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)}t.isIRange=r,t.isEmpty=i,t.containsPosition=o,t.containsRange=s,t.intersectRanges=a,t.plusRange=u,t.equalsRange=l,t.compareRangesUsingStarts=c,t.compareRangesUsingEnds=d,t.spansMultipleLines=h,t.hashCode=p;var g=function(){function e(e,t,n,r){e>n||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}return e.prototype.isEmpty=function(){return t.isEmpty(this)},e.prototype.containsPosition=function(e){return t.containsPosition(this,e)},e.prototype.containsRange=function(e){return t.containsRange(this,e)},e.prototype.plusRange=function(e){return t.plusRange(this,e)},e.prototype.intersectRanges=function(e){return t.intersectRanges(this,e)},e.prototype.equalsRange=function(e){return t.equalsRange(this,e)},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.cloneRange=function(){return new e(this.startLineNumber,this.startColumn,this.endLineNumber,this.endColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return new e(this.startLineNumber,this.startColumn,this.startLineNumber,this.startColumn)},e}();t.Range=g,t.create=f});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/textModel",["require","exports","vs/base/eventEmitter","vs/editor/editor","vs/editor/core/model/modelLine","vs/base/strings","vs/editor/core/position","vs/editor/core/range","vs/editor/core/constants"],function(e,t,n,r,i,o,s,a,u){var l=65279,c=("\r".charCodeAt(0),"\n".charCodeAt(0)," ".charCodeAt(0)),d=" ".charCodeAt(0),h=function(e){function t(t,n){t.push(u.EventType.ModelContentChanged),e.call(this,t),this._constructLines(n),this._versionId=1}return __extends(t,e),t.prototype.getVersionId=function(){return this._versionId},t.prototype._increaseVersionId=function(){this._versionId++},t.prototype._setVersionId=function(e){this._versionId=e},t.prototype.dispose=function(){this._lines=null,this._EOL=null,this._BOM=null,e.prototype.dispose.call(this)},t.prototype._createContentChangedFlushEvent=function(){return{changeType:u.EventType.ModelContentChangedFlush,detail:"",versionId:-1,isUndoing:!1,isRedoing:!1}},t.prototype._resetValue=function(e,t){this._constructLines(t),this._versionId++,e.detail=this.getValue(1),e.versionId=this._versionId},t.prototype.setValue=function(e){if(null!==e){var t=this._createContentChangedFlushEvent();this._resetValue(t,e),this._emitModelContentChangedFlushEvent(t)}},t.prototype.getValue=function(e,t){"undefined"==typeof t&&(t=!1);var n=this.getFullModelRange(),r=this.getValueInRange(n,e);return t?this._BOM+r:r},t.prototype.getValueInRange=function(e,t){"undefined"==typeof t&&(t=0);var n=this.validateRange(e);if(n.isEmpty())return"";if(n.startLineNumber===n.endLineNumber)return this._lines[n.startLineNumber-1].text.substring(n.startColumn-1,n.endColumn-1);var r=this._getEndOfLine(t),i=n.startLineNumber-1,o=n.endLineNumber-1,s=[];s.push(this._lines[i].text.substring(n.startColumn-1));for(var a=i+1;o>a;a++)s.push(this._lines[a].text);return s.push(this._lines[o].text.substring(0,n.endColumn-1)),s.join(r)},t.prototype.isDominatedByLongLines=function(e){var t,n,r,i=0,o=0,s=this._lines;for(t=0,n=this._lines.length;n>t;t++)r=s[t].text.length,r>=e?o+=r:i+=r;return o>i},t.prototype._extractIndentationFactors=function(){var e,t,n,r,i,o,s,a,u,l,h,p=this._lines,f=0,g="",m=0,v=[],y=0,_=[];for(e=0,t=p.length;t>e;e++){for(s=p[e].text,a=!1,u=0,h=0,l=0,n=0,r=s.length;r>n;n++)if(i=s.charCodeAt(n),i===d)l++;else{if(i!==c){a=!0,u=n;break}h++}if(1===h&&(h=0),(l>0||h>0)&&(f++,l>0&&y++,h>0&&(_[h]=(_[h]||0)+1)),a){h=0;var b=!0;for(n=0;m>n&&u>n;n++)o=g.charCodeAt(n),i=s.charCodeAt(n),b&&o!==i&&(b=!1),b||(o===c&&h++,i===c&&h++);for(;m>n;n++)o=g.charCodeAt(n),o===c&&h++;for(;u>n;n++)i=s.charCodeAt(n),i===c&&h++;1===h&&(h=0),h>0&&(v[h]=(v[h]||0)+1),m=u,g=s}}return{linesWithIndentationCount:f,linesIndentedWithTabs:y,relativeSpaceCounts:v,absoluteSpaceCounts:_}},t.prototype.guessIndentation=function(e){var t,n,r=this._extractIndentationFactors(),i=r.linesWithIndentationCount,o=r.linesIndentedWithTabs,s=r.absoluteSpaceCounts,a=r.relativeSpaceCounts,u=0;for(t=1,n=s.length;n>t;t++)u+=s[t]||0;if(o>=u)return{insertSpaces:!1,tabSize:e};if(6>i&&o>0)return{insertSpaces:!1,tabSize:e};var l,c,d,h,p=[];for(l=2,n=s.length;n>l;l++)if(s[l]){for(c=0,d=0,h=l;n>h;h+=l)s[h]?c+=s[h]:d+=l/h;p[l]=c/(1+d)}var f=1,g=0;for(l=Math.max(a.length,p.length);l>=2;l--)c=(p[l]||0)+(a[l]||0),c>g&&(f=l,g=c);return{insertSpaces:!0,tabSize:f}},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1].text},t.prototype.getEOL=function(){return this._EOL},t.prototype.getLineMaxColumn=function(e){return this._lines[e-1].text.length+1},t.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=o.firstNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+1},t.prototype.getLineLastNonWhitespaceColumn=function(e){var t=o.lastNonWhitespaceIndex(this._lines[e-1].text);return-1===t?0:t+2},t.prototype.validateLineNumber=function(e){return 1>e&&(e=1),e>this._lines.length&&(e=this._lines.length),e},t.prototype.validatePosition=function(e){var t=e.lineNumber?e.lineNumber:1,n=e.column?e.column:1;1>t&&(t=1),t>this._lines.length&&(t=this._lines.length),1>n&&(n=1);var r=this.getLineMaxColumn(t);return n>r&&(n=r),new s.Position(t,n)},t.prototype.validateRange=function(e){var t=this.validatePosition(new s.Position(e.startLineNumber,e.startColumn)),n=this.validatePosition(new s.Position(e.endLineNumber,e.endColumn));return new a.Range(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.getFullModelRange=function(){var e=this.getLineCount();return new a.Range(1,1,e,this.getLineMaxColumn(e))},t.prototype._emitModelContentChangedFlushEvent=function(e){this.emit(u.EventType.ModelContentChanged,e)},t._splitText=function(e){for(var t=0,n=-1;-1!==(n=e.indexOf("\r\n",n+1));)t++;var r=e.split(/\r?\n/),o="";r[0].length>0&&r[0].charCodeAt(0)===l&&(o=String.fromCharCode(l),r[0]=r[0].substr(1));var s,a,u=[];for(s=0,a=r.length;a>s;s++)u.push(new i.ModelLine(s+1,r[s]));var c=u.length-1,d="";d=0===c||t>c/2?"\r\n":"\n";var h=u[u.length-1];return"\r"===h.text.charAt(h.text.length-1)&&(h.text=h.text.substring(0,h.text.length-1)),{BOM:o,EOL:d,lines:u}},t.prototype._constructLines=function(e){var n=t._splitText(e); this._BOM=n.BOM,this._EOL=n.EOL,this._lines=n.lines},t.prototype._getEndOfLine=function(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL()}throw new Error("Unknown EOL preference")},t}(n.EventEmitter);t.TextModel=h});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/core/model/mirrorModel",["require","exports","vs/editor/core/constants","vs/editor/core/view/model/prefixSumComputer","vs/editor/core/model/textModel","vs/editor/core/model/modelLine"],function(e,t,n,r,i,o){var s=function(e){function t(t,n,r,i,o,s){e.call(this,t,r),this.wordsRegexp=null,this._modeId=i,s||(s={}),this._setVersionId(n),this._associatedResource=o,this._extraProperties=s}return __extends(t,e),t.prototype.getModeId=function(){return this._modeId},t.prototype._constructLines=function(t){e.prototype._constructLines.call(this,t),this._EOL="\n"},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.getAssociatedResource=function(){return this._associatedResource},t.prototype.getProperty=function(e){return this._extraProperties.hasOwnProperty(e)?this._extraProperties[e]:null},t.prototype._ensurePrefixSum=function(){if(!this._lineStarts){for(var e=[],t=this.getEOL().length,n=0,i=this._lines.length;i>n;n++)e.push(this._lines[n].text.length+t);this._lineStarts=new r.PrefixSumComputer(e)}},t.prototype.getRangeFromOffsetAndLength=function(e,t){var n=this.getPositionFromOffset(e),r=this.getPositionFromOffset(e+t);return{startLineNumber:n.lineNumber,startColumn:n.column,endLineNumber:r.lineNumber,endColumn:r.column}},t.prototype.getOffsetAndLengthFromRange=function(e){var t=this.getOffsetFromPosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this.getOffsetFromPosition({lineNumber:e.endLineNumber,column:e.endColumn});return{offset:t,length:n-t}},t.prototype.getPositionFromOffset=function(e){this._ensurePrefixSum();var t={index:0,remainder:0};return this._lineStarts.getIndexOf(e,t),{lineNumber:t.index+1,column:this.getEOL().length+t.remainder}},t.prototype.getOffsetFromPosition=function(e){return this.getLineStart(e.lineNumber)+e.column-1},t.prototype.getLineStart=function(e){this._ensurePrefixSum();var t=Math.min(e,this._lines.length)-1;return this._lineStarts.getAccumulatedValue(t-1)},t.prototype.getRawLines=function(){return this._lines.map(function(e){return e.text})},t.prototype.getAllWordsWithRange=function(){var e,t=[];for(e=0;e=r[i].start;i++)if(t<=r[i].end)return n(e,r[i].start,r[i].end);return n(e,-1,-1)},t}(i.TextModel);t.AbstractMirrorModel=s;var a=function(e){function t(t,r,i,o,s){e.call(this,[n.EventType.OnBeforeModelContentChangedFlush,n.EventType.OnBeforeModelContentChangedLinesDeleted,n.EventType.OnBeforeModelContentChangedLinesInserted,n.EventType.OnBeforeModelContentChangedLineChanged,"changed"],t,r,i,o,s)}return __extends(t,e),t.prototype.onEvents=function(e){for(var t=!1,r=0,i=e.length;i>r;r++){var o=e[r];switch(o.type){case n.EventType.ModelContentChanged:var s=o;switch(this._lineStarts=null,this._setVersionId(s.versionId),s.changeType){case n.EventType.ModelContentChangedFlush:this.emit(n.EventType.OnBeforeModelContentChangedFlush,o),this._onLinesFlushed(s),t=!0;break;case n.EventType.ModelContentChangedLinesDeleted:this.emit(n.EventType.OnBeforeModelContentChangedLinesDeleted,o),this._onLinesDeleted(s),t=!0;break;case n.EventType.ModelContentChangedLinesInserted:this.emit(n.EventType.OnBeforeModelContentChangedLinesInserted,o),this._onLinesInserted(s),t=!0;break;case n.EventType.ModelContentChangedLineChanged:this.emit(n.EventType.OnBeforeModelContentChangedLineChanged,o),this._onLineChanged(s),t=!0}break;case n.EventType.ModelPropertiesChanged:this._extraProperties=o.properties;break;default:console.warn("Unknown model event: "+o.type)}}t&&this.emit("changed",{})},t.prototype._onLinesFlushed=function(e){this._lineStarts=null,this._constructLines(e.detail)},t.prototype._onLineChanged=function(e){if(this._lineStarts){var t=this.getEOL().length,n=e.detail.length+t;this._lineStarts.changeValue(e.lineNumber-1,n)}this._lines[e.lineNumber-1].text=e.detail},t.prototype._onLinesDeleted=function(e){var t=e.fromLineNumber-1,n=e.toLineNumber-1;this._lineStarts&&this._lineStarts.removeValues(t,n-t+1),this._lines.splice(t,n-t+1)},t.prototype._onLinesInserted=function(e){var t,n,r=this.getEOL().length,i=e.detail.split("\n");for(t=e.fromLineNumber-1,n=0;t=2;){var u=e.charCodeAt(a),l=e.charCodeAt(a+1),c=u|l<<16;c*=t,c^=c>>n,c*=t,s*=t,s^=c,a+=2,o-=2}return 1===o&&(s^=e.charCodeAt(a),s*=t),s^=s>>13,s*=t,s^=s>>15}function r(e,t){return(t<<5)+t+e&2147483647}t.computeMurmur2StringHashCode=n,t.combine=r}),define("vs/base/network",["require","exports","./assert","./hash","./strings","./types"],function(e,t,n,r,i,o){function s(e){var t=window.location.search;if(t){t=t.substring(1);for(var n=t.split("&"),r=0;r=0){var o=i.split("=");if(decodeURIComponent(o[0])===e&&o.length>1)return decodeURIComponent(o[1])}else if(decodeURIComponent(i)===e)return"true"}}return null}function a(e,t){return function(n){return n?n.replace(e,t):n}}function u(e,t,n){for(var r=0;r=0&&u>=0){var l=o.substring(s,u+n.length),c=t+"//"+n;if(l!==c){var d=new RegExp(i.escapeRegExpCharacters(l),"gi");return a(d,c)}}}return function(e){return e}}var l=function(){function e(e){n.ok(!!e,"spec must not be null"),this._spec=e}return e.fromEncoded=function(t){return new e(decodeURIComponent(t))},e.fromValue=function(t){return new e(t)},e.prototype.equals=function(t){return t instanceof e&&t._spec===this._spec},e.prototype.hashCode=function(){return r.computeMurmur2StringHashCode(this._spec)},e.prototype.toJSON=function(){return{$url:this._spec}},e.prototype.toExternal=function(){return this._spec},e.prototype.toString=function(){return this._spec},e.prototype.getScheme=function(){return"undefined"==typeof this._scheme&&(this._scheme=this._doGetScheme()),this._scheme},e.prototype._doGetScheme=function(){var e=this._spec.indexOf(":");return-1===e?null:this._spec.substring(0,e)},e.prototype.getPath=function(){return"undefined"==typeof this._path&&(this._path=this._doGetPath()),this._path},e.prototype._doGetPath=function(){for(var e=0,t=-1,n=0,r=this._spec.length;r>n;n++){var i=this._spec.charAt(n);switch(i){case"/":3===++e&&(t=n);break;case"?":case"#":return-1===t?null:this._spec.substring(t,n)}}return-1===t?null:t===this._spec.length-1?"":this._spec.substring(t)},e}();t.URL=l,t.getQueryValue=s,t._createBasicAuthRemover=u,t.getBasicAuthRemover=o.runOnce(function(){var e=null;try{throw new Error}catch(n){e=n.stack}return e?t._createBasicAuthRemover(e.split("\n"),self.location.protocol,self.location.hostname):function(e){return e}}),function(e){e.inMemory="inMemory"}(t.schemas||(t.schemas={}));t.schemas});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/performance/timer",["require","exports","vs/base/env","vs/base/eventEmitter","vs/nls!vs/editor/worker/editorWorkerServer"],function(e,t,n,r,i){function o(e,t){return d.start(e,t)}function s(){return d}var a=!!self.msWriteProfilerMark;!function(e){e[e.EDITOR=0]="EDITOR",e[e.LANGUAGES=1]="LANGUAGES",e[e.WORKER=2]="WORKER",e[e.WORKBENCH=3]="WORKBENCH"}(t.Topic||(t.Topic={}));var u=(t.Topic,function(){function e(){}return e.prototype.start=function(){return this},e.prototype.stop=function(){},e.prototype.timeTaken=function(){return-1},e}());t.NullTimerEvent=u;var l=function(){function e(e,t,n,r){if(this.timeKeeper=e,this.name=t,this.topic=n,this.stopTime=null,r)return this.startTime=r,void 0;if(this.startTime=new Date,a){var i=["Monaco",this.topic,this.name,"start"];self.msWriteProfilerMark(i.join("|"))}}return e.prototype.start=function(e){if(this.stopTime)throw new Error(i.localize("vs_base_performance_timer",0));return this.timeKeeper.start(this.topic,this.name+"."+e)},e.prototype.stop=function(e){if(null===this.stopTime){if(e)return this.stopTime=e,void 0;if(this.stopTime=new Date,this.timeKeeper.emit("eventStop",this),a){var t=["Monaco",this.topic,this.name,"stop"];self.msWriteProfilerMark(t.join("|"))}}},e.prototype.timeTaken=function(){return this.stopTime?this.stopTime.getTime()-this.startTime.getTime():-1},e}();t.TimerEvent=l;var c=function(e){function r(){e.call(this),this.timeoutId=null,this.collectedEvents=[],this.eventCacheLimit=1e3,this.maxTimerLength=6e4,this.cleanupInterval=12e4}return __extends(r,e),r.prototype.isEnabled=function(){return n.enablePerformanceEvents},r.prototype.start=function(e,n){if(!this.isEnabled())return t.nullEvent;0===e?e="Editor":1===e?e="Languages":2===e?e="Worker":3===e&&(e="Workbench");var r=new l(this,n,e);return this.addEvent(r),this.cleanupTimers(),r},r.prototype.addEvent=function(e){e.id=r.EVENT_ID,r.EVENT_ID++,this.collectedEvents.push(e),this.emit("eventStart",e),this.collectedEvents.length>this.eventCacheLimit&&this.collectedEvents.shift()},r.prototype.cleanupTimers=function(){var e=this;null===this.timeoutId&&(this.timeoutId=setTimeout(function(){var t=Date.now();e.collectedEvents.forEach(function(n){!n.stopTime&&t-n.startTime.getTime()>=e.maxTimerLength&&n.stop()})},this.cleanupInterval))},r.prototype.dispose=function(){clearTimeout(this.timeoutId),e.prototype.dispose.call(this)},r.prototype.getCollectedEvents=function(){return this.collectedEvents.slice(0)},r.prototype.clearCollectedEvents=function(){this.collectedEvents=[]},r.prototype.setInitialCollectedEvents=function(e,t){var n=this;this.isEnabled()&&(t&&(r.PARSE_TIME=t),e.forEach(function(e){var t=new l(n,e.name,e.topic,e.startTime);t.stop(e.stopTime),n.addEvent(t)}))},r.EVENT_ID=1,r.PARSE_TIME=new Date,r}(r.EventEmitter);t.TimeKeeper=c;var d=new c;t.nullEvent=new u,t.start=o,t.getTimeKeeper=s});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/platform/services",["require","exports","vs/base/lib/winjs.base","vs/base/async","vs/base/strings","vs/base/network","vs/base/eventEmitter","vs/base/performance/timer","vs/base/objects","vs/base/hash","vs/base/errors"],function(e,t,n,r,i,o,s,a,u,l,c){var d=function(){function e(e){this._staticArguments=e}return e.prototype.appendStaticArguments=function(e){this._staticArguments.push.apply(this._staticArguments,e)},e.prototype.staticArguments=function(e){return isNaN(e)?this._staticArguments.slice(0):this._staticArguments[e]},e.prototype._validate=function(e){if(!e)throw c.illegalArgument("can not be falsy")},e}();t.AbstractDescriptor=d;var h=function(e){function t(t){for(var n=[],r=0;r0&&(this.origin=this.origin.substring(0,this.origin.length-t.length+1)),i.endsWith(this.origin,"/")||(this.origin+="/")}else this.origin="/"},e.prototype.getRequestUrl=function(e,t,n){var r=this.contextService.getWorkspace();if(r[e]){var o=r[e]+i.normalizePath(t);return n?this.origin+i.ltrim(o,"/"):o}return null},e.prototype.getPath=function(e,t){var n=this.getRequestUrl(e,"/",!0);if(!n)return null;var r=t.toExternal().indexOf(n);return 0===r?t.toExternal().substr(n.length-1):null},e.prototype.getAdditionalHeaders=function(){return this.contextService.getConfiguration().additionalHeaders||{}},e.prototype.supportsPrivateChannel=function(){return!1},e.prototype.establishPrivateChannel=function(){return n.Promise.wrapError("Not Implemented")},e.prototype.supportsRemoteEvents=function(){return!1},e.prototype.addRemoteListener=function(){throw new Error("Not Implemented")},e.prototype.makeRequest=function(e){var t=a.nullEvent,i=this.getAdditionalHeaders();return this._telemetryService&&(i["X-TelemetrySession"]=this._telemetryService.sessionID),e.headers=u.mixin(e.headers,i),this._telemetryService&&(t=this._telemetryService.start("WorkbenchXHR",{url:e.url},!1)),r.always(n.xhr(e),function(e){t.data&&(t.data.status=e.status),t.stop()})},e.prototype.makeChunkedRequest=function(e){function t(e){for(var t,n,r=0,i={};;){if(t=e.indexOf(":",r),n=e.indexOf("\n",t+1),0>t||0>n)break;i[e.substring(r,t).trim()]=e.substring(t+1,n).trim(),r=n+1}return i}function r(e){if(c)return o("canceled"),void 0;var n=e.indexOf("\r\n\r\n",u);if(-1!==n){for(var r=[];-1!==n;){var i=t(e.substring(u,n)),a=Number(i["Content-Length"]);if(n+4+a>e.length)break;var d={header:i,body:e.substr(n+4,a)};l.push(d),r.push(d),u=n+4+a,n=e.indexOf("\r\n\r\n",u)}s(r)}}var i,o,s,a=this,u=0,l=[],c=!1;return new n.Promise(function(t,n,u){i=t,o=n,s=u,a.makeRequest(e).done(function(e){r(e.responseText),i(l)},function(e){o(e)},function(e){3===e.readyState&&r(e.responseText)})},function(){c=!0})},e}();t.BaseRequestService=g,function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(t.StorageScope||(t.StorageScope={}));t.StorageScope;!function(e){e[e.LEFT=0]="LEFT",e[e.CENTER=1]="CENTER",e[e.RIGHT=2]="RIGHT"}(t.Position||(t.Position={}));t.Position;t.POSITIONS=[0,1,2];var m=function(){function e(e){this._selection=e||[]}return Object.defineProperty(e.prototype,"selection",{get:function(){return this._selection},enumerable:!0,configurable:!0}),e.prototype.isEmpty=function(){return 0===this._selection.length},e.EMPTY=new e([]),e}();t.Selection=m;var v=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.toArray=function(){return this.selection},t}(m);t.StructuredSelection=v,function(e){e[e.Info=0]="Info",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(t.Severity||(t.Severity={}));var y=(t.Severity,function(){function e(){}return e.SERVICE_CHANGED="service-changed",e.SET_CHANGED="set-changed",e.SET_ADDED="set-added",e.SET_REMOVED="set-removed",e}());t.MarkerServiceConstants=y;var _=function(){function e(){}return e.UPDATED="update",e}();t.ExperimentServiceEventTypes=_;var b=function(e){function t(t,n,r){e.call(this),this._id=t,this._name=n,this._description=r,this._enabled=!1}return __extends(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled!==e&&(this._enabled=e,this.emit("enabled",this))},enumerable:!0,configurable:!0}),t}(s.EventEmitter);t.Experiment=b;var C=function(){function e(){}return e.UPDATED="update",e}();t.ConfigurationServiceEventTypes=C,t.ResourceEvents={ADDED:"resource.added",REMOVED:"resource.removed",CHANGED:"resource.changed"},function(e){!function(e){e[e.File=1]="File",e[e.Text=2]="Text"}(e.QueryType||(e.QueryType={}));var t=(e.QueryType,function(){function e(){}return e.prototype.search=function(){return n.TPromise.as({fileMatches:[]})},e.Instance=new e,e}());e.NullSearchService=t}(t.search||(t.search={}));t.search});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/collections",["require","exports","vs/base/errors"],function(e,t,n){function r(e,t,n){"undefined"==typeof n&&(n=null);var r=String(t);return e.hasOwnProperty(r)?e[r]:n}function i(e,t,n){var r=String(t);return e.hasOwnProperty(r)?e[r]:(e[r]=n,n)}function o(e,t){return e.hasOwnProperty(t)}function s(e){return{every:function(t){for(var n in e)if(e.hasOwnProperty(n)&&!t(n))return!1;return!0}}}function a(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function u(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=t({key:n,value:e[n]},function(){delete e[n]});if(r===!1)return}}function l(e,t){var n=new b(Math.min(4,Math.ceil(e.length/4)));return e.every(function(e){var r=t(e),i=n.lookup(r);return i||(i=[],n.add(r,i)),i.push(e),!0}),n}function c(e){return new g(e)}function d(e){var n=e.length;return 0===n?t.EmptyIterable:1===n?e[0]:{every:function(t){for(var r=0;n>r;r++)if(!e[r].every(t))return!1;return!0}}}function h(e){return{every:function(t){return t(e)}}}function p(e){if(Array.isArray(e))return e;var t=[];return e.every(function(e){return t.push(e),!0}),t}t.lookup=r,t.lookupOrInsert=i,t.contains=o,t.keys=s,t.values=a,t.forEach=u,t.groupBy=l,t.fromArray=c,t.EmptyIterable={every:function(){return!0}},t.combine=d,t.singleton=h,t.toArray=p;var f=function(){function e(){}return e.prototype.toArray=function(e,t){return"undefined"==typeof e&&(e=new Array),"undefined"==typeof t&&(t=0),this.every(function(n){e[t]=n,t+=1}),e},Object.defineProperty(e.prototype,"length",{get:function(){var e=0;return this.every(function(){e+=1}),e},enumerable:!0,configurable:!0}),e.prototype.every=function(){throw n.notImplemented()},e}();t.AbstractCollection=f;var g=function(e){function t(t){e.call(this),this.data=t}return __extends(t,e),t.prototype.every=function(e){for(var t=0;tn;n++)t[n-1]=arguments[n];return e instanceof s.SyncDescriptor?this._servicesMap.createInstance(e,t):e instanceof s.AsyncDescriptor?this._createInstanceAsync(e,t):this._servicesMap.createInstance(new s.SyncDescriptor(e),t)},t.prototype._createInstanceAsync=function(t,i){var o,a=this;return new n.TPromise(function(n,u){e([t.moduleName],function(e){if(o&&u(o),!e)return u(r.illegalArgument("module not found: "+t.moduleName));if("function"!=typeof e[t.ctorName])return u(r.illegalArgument("not a function: "+t.ctorName));try{i.unshift.apply(i,t.staticArguments()),n(a._servicesMap.createInstance(new s.SyncDescriptor(e[t.ctorName]),i))}catch(l){return u(l)}},u)},function(){o=r.canceled()})},t}()}),define("vs/platform/injectorService",["require","exports","vs/base/collections","vs/base/injector","vs/base/assert","./instantiation/instantiationService"],function(e,t,n,r,i,o){function s(e){var t=new r.Container,n=new c(t),i=o.create(e);return n._instantiationService=i,n._diContainer.registerService(c._instantiationServiceName,i),a(e,t),u(e,t),n}function a(e,t){i.ok(!n.contains(e,c._injectorServiceName),"injectorService is NOT allowed to be added because it is implict"),Object.keys(e).forEach(function(n){var r=e[n];t.registerService(n,r)})}function u(e,t){Object.keys(e).forEach(function(n){var r=e[n];t.injectTo(r),l(r)})}function l(e){return Array.isArray(e)?(e.forEach(function(e){l(e)}),void 0):("function"==typeof e[c._fnInjectionDone]&&e[c._fnInjectionDone].apply(e),void 0)}var c=function(){function e(t){this._diContainer=t,this._diContainer.registerService(e._injectorServiceName,this)}return e.prototype.injectTo=function(e){this._diContainer.injectTo(e),l(e)},e.prototype.createChild=function(t){var n=this._diContainer.createChild();a(t,n);var r=new e(n);return r._instantiationService=this._instantiationService.createChild(t),n.registerService(e._injectorServiceName,r),n.registerService(e._instantiationServiceName,r._instantiationService),u(t,n),r},e._injectorServiceName="injectorService",e._instantiationServiceName="instantiationService",e._fnInjectionDone="injectionDone",e}();t.create=s});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/uuid",["require","exports"],function(e,t){function n(e,t){return"function"==typeof e[t]&&0===e[t].length}function r(e){return e instanceof a||e instanceof u||n(e,"asHex",0)&&n(e,"equals",1)}function i(){return new u}function o(e){if(!l.test(e))throw new Error("invalid uuid");return new a(e)}function s(){return t.v4().asHex()}t.isUUID=r;var a=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e.prototype.equals=function(e){return this.asHex()===e.asHex()},e}(),u=function(e){function t(){e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))}return __extends(t,e),t._oneOf=function(e){var t=Math.floor(e.length*Math.random());return e[t]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(a);t.empty=new a("00000000-0000-0000-0000-000000000000"),t.v4=i;var l=/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/;t.parse=o,t.generateUuid=s}),define("vs/base/dom/iframe",["require","exports"],function(e,t){function n(e){if(!e.parent||e.parent===e)return null;try{var t=e.location,n=e.parent.location;if(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port)return a=!0,null}catch(r){return a=!0,null}return e.parent}function r(e,t){for(var n,r=e.document.getElementsByTagName("iframe"),i=0,o=r.length;o>i;i++)if(n=r[i],n.contentWindow===t)return n;return null}function i(){if(!u){u=[];var e,t=window;do e=n(t),e?u.push({window:t,iframeElement:r(e,t)}):u.push({window:t,iframeElement:null}),t=e;while(t)}return u.slice(0)}function o(){return u||t.getSameOriginWindowChain(),a}function s(e,n){if(!n||e===n)return{top:0,left:0};for(var r=0,i=0,o=t.getSameOriginWindowChain(),s=0;s=o?c():l||(l=!0,t.scheduleAtNextAnimationFrame(d,Number.MAX_VALUE))}},h=t.addListener(e,n,function(e){s=i(s,e),l||(l=!0,t.scheduleAtNextAnimationFrame(d,Number.MAX_VALUE))});return function(){u=!0,h()}}function y(e,n,r,i,o){"undefined"==typeof i&&(i=z),"undefined"==typeof o&&(o=U);var s=null,a=0,u=-1,l=function(){u=-1,a=(new Date).getTime(),r(s),s=null},c=t.addListener(e,n,function(e){s=i(s,e);var t=(new Date).getTime()-a;t>=o?(-1!==u&&window.clearTimeout(u),l()):-1===u&&(u=window.setTimeout(l,o-t))});return function(){-1!==u&&window.clearTimeout(u),c()}}function _(e,t,n,r,i){return F.isNative?v(e,t,n,r,i):y(e,t,n,r,i)}function b(e,n,r,i,o){var s=t.addThrottledListener(e,n,r,i,o);return{dispose:s}}function C(e){return document.defaultView&&r.isFunction(document.defaultView.getComputedStyle)?document.defaultView.getComputedStyle(e,null):e.currentStyle}function w(e,n,r){var i=t.getComputedStyle(e),o="0";return o=i.getPropertyValue?i.getPropertyValue(n):i.getAttribute(r),B(e,o)}function S(e){for(var n=e.offsetParent,r=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){r-=e.scrollTop;var o=t.getComputedStyle(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===n&&(i+=j.getBorderLeftWidth(e),r+=j.getBorderTopWidth(e),r+=e.offsetTop,i+=e.offsetLeft,n=e.offsetParent)}return{left:i,top:r}}function E(e){var n=t.getTopLeftOffset(e);return{left:n.left,top:n.top,width:e.clientWidth,height:e.clientHeight}}function L(e){var t=j.getBorderLeftWidth(e)+j.getBorderRightWidth(e),n=j.getPaddingLeft(e)+j.getPaddingRight(e);return e.offsetWidth-t-n}function T(e){var t=j.getMarginLeft(e)+j.getMarginRight(e);return e.offsetWidth+t}function M(e){var t=j.getBorderTopWidth(e)+j.getBorderBottomWidth(e),n=j.getPaddingTop(e)+j.getPaddingBottom(e);return e.offsetHeight-t-n}function x(e){var t=j.getMarginTop(e)+j.getMarginBottom(e);return e.offsetHeight+t}function k(e,t){if(null===e)return 0;for(var n=e.offsetLeft,r=e.parentNode;null!==r&&(n-=r.offsetLeft,r!==t);)r=r.parentNode;return n}function N(e,t){if(null===e)return 0;for(var n=e.offsetTop,r=e.parentNode;null!==r&&(n-=r.offsetTop,r!==t);)r=r.parentNode;return n}function R(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function I(){q=document.createElement("style"),q.type="text/css",q.media="screen",document.getElementsByTagName("head")[0].appendChild(q)}function O(){return q&&q.sheet&&q.sheet.rules?q.sheet.rules:q&&q.sheet&&q.sheet.cssRules?q.sheet.cssRules:[]}function P(e,t){t&&(q||I(),q.sheet.insertRule(e+"{"+t+"}",0))}function A(e){if(!q)return null;for(var t=O(),n=0;n=0;r--)q.sheet.deleteRule(n[r])}}function W(e){return u.getService().isHTMLElement(e)}function H(e){try{e.select(),e.setSelectionRange&&e.setSelectionRange(0,9999)}catch(t){}}function V(e){var r=!1,o=!1,s=new i.EventEmitter,a=[],u=null;u={addFocusListener:function(e){var t=s.addListener("focus",e);return a.push(t),t},addBlurListener:function(e){var t=s.addListener("blur",e);return a.push(t),t},dispose:function(){for(;a.length>0;)a.pop()()}};var l=function(){o=!1,r||(r=!0,s.emit("focus",{}))},c=function(){r&&(o=!0,n.isTesting()?o&&(o=!1,r=!1,s.emit("blur",{})):window.setTimeout(function(){o&&(o=!1,r=!1,s.emit("blur",{}))},0))};return a.push(t.addListener(e,t.EventType.FOCUS,l,!0)),a.push(t.addListener(e,t.EventType.BLUR,c,!0)),u}t.clearNode=l,t.isInDOM=c,t.hasClass,t.addClass,t.removeClass,t.toggleClass,function(){function e(e,t){var o=e.className;if(!o)return n=-1,void 0;t=t.trim();var s=o.length,a=t.length;if(0===a)return n=-1,void 0;if(a>s)return n=-1,void 0;if(o===t)return n=0,r=s,void 0;for(var u,l=-1;(l=o.indexOf(t,l+1))>=0;){if(u=l+a,(0===l||o.charCodeAt(l-1)===i)&&o.charCodeAt(u)===i)return n=l,r=u+1,void 0;if(l>0&&o.charCodeAt(l-1)===i&&u===s)return n=l-1,r=u,void 0;if(0===l&&u===s)return n=0,r=u,void 0}n=-1}var n,r,i=" ".charCodeAt(0);t.hasClass=function(t,r){return e(t,r),-1!==n},t.addClass=function(t,r){t.className?(e(t,r),-1===n&&(t.className=t.className+" "+r)):t.className=r},t.removeClass=function(t,i){e(t,i),-1!==n&&(t.className=t.className.substring(0,n)+t.className.substring(r))},t.toggleClass=function(r,i,o){e(r,i),-1===n||o||t.removeClass(r,i),-1===n&&o&&t.addClass(r,i)}}(),t.addListener=d,t.addDisposableListener=h,t.addStandardDisposableListener=function(e,t,n,r){var i=n;return"click"===t?i=p(n):("keydown"===t||"keypress"===t||"keyup"===t)&&(i=f(n)),e.addEventListener(t,i,r||!1),{dispose:function(){i&&(e.removeEventListener(t,i,r||!1),i=null,e=null,n=null)}}},t.addNonBubblingMouseOutListener=g,t.addDisposableNonBubblingMouseOutListener=m;var F=function(){var e=function(e){return e((new Date).getTime()),0},t=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame,n=self.cancelAnimationFrame||self.cancelRequestAnimationFrame||self.msCancelAnimationFrame||self.msCancelRequestAnimationFrame||self.webkitCancelAnimationFrame||self.webkitCancelRequestAnimationFrame||self.mozCancelAnimationFrame||self.mozCancelRequestAnimationFrame||self.oCancelAnimationFrame||self.oCancelRequestAnimationFrame,r=!!t,i=t||e,o=n||n;return{isNative:r,request:function(e){return i(e)},cancel:function(e){return o(e)}}}();t.runAtThisOrScheduleAtNextAnimationFrame,t.scheduleAtNextAnimationFrame,t.cancelAtNextAnimationFrame,function(){function e(){i=!1,r.sort(function(e,t){return t.priority-e.priority});var e=r;n+=r.length,r=[];try{o=!0;for(var t=0;tt||t>=r.length||(r[t].cancelled=!0)}}}();var U=16,z=function(e,t){return t};t.addThrottledListener=_,t.addDisposableThrottledListener=b,t.getComputedStyle=C;var B=function(){var e=/^-?\d+(\.\d+)?(px)?$/i,t=/^-?\d+(\.\d+)?/i;return function(n,r){if(!e.test(r)&&t.test(r)){var i=n.style.left;n.style.left=r;var o=n.style.pixelLeft;return n.style.left=i,o}return parseFloat(r)||0}}(),j={getBorderLeftWidth:function(e){return w(e,"border-left-width","borderLeftWidth")},getBorderTopWidth:function(e){return w(e,"border-top-width","borderTopWidth")},getBorderRightWidth:function(e){return w(e,"border-right-width","borderRightWidth")},getBorderBottomWidth:function(e){return w(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return w(e,"padding-left","paddingLeft")},getPaddingTop:function(e){return w(e,"padding-top","paddingTop")},getPaddingRight:function(e){return w(e,"padding-right","paddingRight")},getPaddingBottom:function(e){return w(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return w(e,"margin-left","marginLeft")},getMarginTop:function(e){return w(e,"margin-top","marginTop")},getMarginRight:function(e){return w(e,"margin-right","marginRight")},getMarginBottom:function(e){return w(e,"margin-bottom","marginBottom")},__commaSentinel:!1};t.getTopLeftOffset=S,t.getDomNodePosition=E,t.getContentWidth=L,t.getTotalWidth=T,t.getContentHeight=M,t.getTotalHeight=x,t.getRelativeLeft=k,t.getRelativeTop=N,t.isAncestor=R;var q=null;t.createCSSRule=P,t.getCSSRule=A,t.removeCSSRulesWithPrefix=D,t.isHTMLElement=W,t.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",CONTEXT_MENU:"contextmenu",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.browser.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:n.browser.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.browser.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.selectTextInInputElement=H,t.trackFocus=V,t.UnitConverter={_emInPx:-1,emToPixel:function(e){if(this._emInPx<0){var n=document.createElement("div");n.style.position="absolute",n.style.top="10000px",n.style.left="10000px",n.style.fontSize="1em",n.innerHTML="AbcDef",document.body.appendChild(n);var r=t.getTotalHeight(n);document.body.removeChild(n),this._emInPx=r}var i=e*this._emInPx,o=Math.round(i);return o}}}),define("vs/base/lifecycle",["require","exports"],function(e,t){function n(e){for(var t=0,n=e.length;n>t;t++)e[t]&&e[t].dispose();return[]}function r(){for(var e=[],n=0;n0;)e.pop()();return e}t.disposeAll=n,t.combinedDispose=r,t.cAll=i});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/base/time/idleMonitor",["require","exports","vs/base/dom/dom","vs/base/lifecycle","vs/base/eventEmitter","vs/base/dom/browserService"],function(e,t,n,r,i,o){!function(e){e[e.Idle=0]="Idle",e[e.Active=1]="Active"}(t.UserStatus||(t.UserStatus={}));t.UserStatus;t.DEFAULT_IDLE_TIME=36e5;var s=function(){function e(e){"undefined"==typeof e&&(e=t.DEFAULT_IDLE_TIME);var n=this;this.instance=u.INSTANCE,this.instance.increment(),this.status=null,this.idleCheckTimeout=-1,this.lastActiveTime=-1,this.idleTime=e,this.toDispose=[],this.eventEmitter=new i.EventEmitter,this.toDispose.push(this.eventEmitter),this.toDispose.push({dispose:this.instance.addListener(function(){return n.onUserActive()})}),this.onUserActive()}return e.prototype.addOneTimeActiveListener=function(e){return this.eventEmitter.addOneTimeDisposableListener("onActive",e)},e.prototype.addOneTimeIdleListener=function(e){return this.eventEmitter.addOneTimeDisposableListener("onIdle",e)},e.prototype.getStatus=function(){return this.status},e.prototype.dispose=function(){this.cancelIdleCheck(),this.toDispose=r.disposeAll(this.toDispose),this.instance.decrement()},e.prototype.onUserActive=function(){this.lastActiveTime=(new Date).getTime(),1!==this.status&&(this.status=1,this.scheduleIdleCheck(),this.eventEmitter.emit("onActive"))},e.prototype.onUserIdle=function(){0!==this.status&&(this.status=0,this.eventEmitter.emit("onIdle"))},e.prototype.scheduleIdleCheck=function(){var e=this;if(-1===this.idleCheckTimeout){var t=this.lastActiveTime+this.idleTime;this.idleCheckTimeout=setTimeout(function(){e.idleCheckTimeout=-1,e.checkIfUserIsIdle()},t-(new Date).getTime())}},e.prototype.cancelIdleCheck=function(){-1!==this.idleCheckTimeout&&(clearTimeout(this.idleCheckTimeout),this.idleCheckTimeout=-1)},e.prototype.checkIfUserIsIdle=function(){var e=(new Date).getTime()-this.lastActiveTime;e>=this.idleTime?this.onUserIdle():this.scheduleIdleCheck()},e}();t.IdleMonitor=s;var a=function(){function e(){this.referenceCount=0}return e.prototype.increment=function(){0===this.referenceCount&&this.construct(),this.referenceCount++},e.prototype.decrement=function(){this.referenceCount>0&&(this.referenceCount--,0===this.referenceCount&&this.dispose())},e.prototype.construct=function(){throw new Error("Implement me")},e.prototype.dispose=function(){throw new Error("Implement me")},e}(),u=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.construct=function(){var e=this;this.toDispose=[],this.eventEmitter=new i.EventEmitter,this.toDispose.push(this.eventEmitter),this.toDispose.push(n.addDisposableListener(o.getService().document,"mousemove",function(){return e.onUserActive()})),this.toDispose.push(n.addDisposableListener(o.getService().document,"keydown",function(){return e.onUserActive()})),this.onUserActive()},t.prototype.dispose=function(){this.toDispose=r.disposeAll(this.toDispose)},t.prototype.onUserActive=function(){this.eventEmitter.emit("onActive")},t.prototype.addListener=function(e){return this.eventEmitter.addListener("onActive",e)},t.INSTANCE=new t,t}(a)}),define("vs/platform/telemetry/telemetryService",["require","exports","vs/base/uuid","vs/base/performance/timer","vs/base/errors","vs/base/types","vs/base/objects","vs/base/env","vs/base/time/idleMonitor","vs/base/network"],function(e,t,n,r,i,o,s,a,u,l){var c={publicOnly:!0,enableHardIdle:!0,enableSoftIdle:!0},d=function(){function e(t){var o=this;this.eventQueue=[],this.config=s.withDefaults(t,c),this.sessionID=n.generateUuid()+Date.now(),this.eventMaxQueueSize=e.EVENT_QUEUE_LIMIT,this.eventBatchSize=e.EVENT_BATCH_SIZE,this.failureCount=0,this.sendingEvents=!1,this.waitIntervalId=null,this.timeKeeper=new r.TimeKeeper,this.toUnbind=[],this.toUnbind.push(this.timeKeeper.addListener("eventStop",this.onTelemetryTimerEventStop.bind(this))),this.toUnbind.push(i.errorHandler.addListener(this.onErrorEvent.bind(this))),a.isInWebWorker()===!1&&(this.config.enableHardIdle&&(this.hardIdleMonitor=new u.IdleMonitor),this.config.enableSoftIdle&&(this.softIdleMonitor=new u.IdleMonitor(e.SOFT_IDLE_TIME),this.softIdleMonitor.addOneTimeActiveListener(function(){return o.onUserActive()}),this.softIdleMonitor.addOneTimeIdleListener(function(){return o.onUserIdle()}))),this.authFilter=l.getBasicAuthRemover()}return e.prototype.dispose=function(){for(;this.toUnbind.length;)this.toUnbind.pop()();this.timeKeeper.dispose(),this.hardIdleMonitor&&this.hardIdleMonitor.dispose(),this.softIdleMonitor&&this.softIdleMonitor.dispose(),this.oldOnError&&(self.onerror=this.oldOnError)},e.prototype.onTelemetryTimerEventStop=function(e){var t=e.data||{};t.duration=e.timeTaken(),"public"===e.topic?this.publicLog(e.name,t):this.log(e.name,t)},e.prototype.onErrorEvent=function(e,t,n){"undefined"==typeof t&&(t=null),"undefined"==typeof n&&(n=null),Array.isArray(e.stack)&&(e.stack=e.stack.join("\n")),this.publicLog("UnhandledError",{friendlyMessage:t,name:e.name,message:e.message||e,stack:this.authFilter(e.stack)})},e.prototype.enableGlobalErrorHandler=function(){o.isFunction(self.onerror)&&(this.oldOnError=self.onerror);var e=this,t=function(t,n,r,i,o){e.onUncaughtError(t,n,r,i,o),e.oldOnError&&e.oldOnError.apply(this,arguments)};self.onerror=t},e.prototype.onUncaughtError=function(e,t,n,r,i){var o={message:e,filename:this.authFilter(t),line:n,column:r};i&&(o.error={name:i.name,message:i.message,stack:this.authFilter(i.stack)}),this.publicLog("UncaughtError",o)},e.prototype.onUserIdle=function(){var t=this;this.publicLog(e.IDLE_START_EVENT_NAME),this.softIdleMonitor.addOneTimeIdleListener(function(){return t.onUserIdle()})},e.prototype.onUserActive=function(){var t=this;this.publicLog(e.IDLE_STOP_EVENT_NAME),this.softIdleMonitor.addOneTimeActiveListener(function(){return t.onUserActive()})},e.prototype.injectRequestService=function(e){this.requestService=e},e.prototype.injectExperimentService=function(e){this.experimentService=e},e.prototype.start=function(e,t,n){var r=n?"public":"private",i=this.timeKeeper.start(r,e);return t&&(i.data=t),i},e.prototype.log=function(e,t){this.config.publicOnly||this.handleEvent("restricted",e,t)},e.prototype.publicLog=function(e,t){this.handleEvent("public",e,t)},e.prototype.handleEvent=function(e,t,n){if(!(this.eventQueue.length>=this.eventMaxQueueSize)){n=n||{},n.source="client",n.version={clientVersion:a.version};var r={name:t,kind:e,timestamp:new Date,data:s.safeStringify(n),sessionID:this.sessionID},i=this.getEnabledExperiments();i&&(r.activeExperiments=this.getEnabledExperiments()),this.eventQueue.push(r),this.sendingEvents||this.failureCount>0||(this.eventQueue.length>this.eventBatchSize?(clearTimeout(this.waitIntervalId),this.waitIntervalId=null,this.sendEvents()):this.sendSoon())}},e.prototype.sendSoon=function(){var t=this;null===this.waitIntervalId&&(this.waitIntervalId=setTimeout(function(){t.waitIntervalId=null,t.sendEvents()},e.EVENT_INTERVAL*Math.pow(2,this.failureCount)))},e.prototype.sendEvents=function(){var e=this;if(!this.hardIdleMonitor||0!==this.hardIdleMonitor.getStatus()){this.sendingEvents=!0;var t=this.eventQueue.splice(0,this.eventBatchSize);this.submitToServer(t).then(function(){e.failureCount=0},function(){e.eventQueue.unshift.apply(e.eventQueue,t),e.failureCount++}).done(function(){e.sendingEvents=!1,e.eventQueue.length>0&&e.sendSoon()})}},e.prototype.submitToServer=function(e){var t=JSON.stringify(e),n=this.requestService.getRequestUrl("telemetry"),r={type:"POST",url:n,data:t,headers:{"Content-Type":"application/json"}};return this.requestService.makeRequest(r)},e.prototype.getQueueLength=function(){return this.eventQueue.length},e.prototype.getEnabledExperiments=function(){return this.experimentService?this.experimentService.getEnabled().join(";"):null},e.EVENT_QUEUE_LIMIT=1e4,e.EVENT_INTERVAL=3e4,e.EVENT_BATCH_SIZE=100,e.SOFT_IDLE_TIME=12e4,e.IDLE_START_EVENT_NAME="UserIdleStart",e.IDLE_STOP_EVENT_NAME="UserIdleStop",e}();t.TelemetryService=d});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/worker/resourceService",["require","exports","vs/base/eventEmitter","vs/base/types","vs/platform/services"],function(e,t,n,r,i){var o=function(e){function t(){e.call(this),this.data={},this.linked={},this.unbinds={}}return __extends(t,e),t.prototype.insert=function(e,t){var n=this,r=this.remove(e,t),o=e.toString();return this.data[o]=t,this.unbinds[o]=[],this.unbinds[o].push(t.addBulkListener(function(t){n.emit(i.ResourceEvents.CHANGED,{url:e,originalEvents:t})})),this.emit(i.ResourceEvents.ADDED,{url:e,addedElement:t,removedElement:r}),r},t.prototype.insertLinked=function(e,t,n){if(this.contains(e)){var i=e.toExternal();this.linked.hasOwnProperty(i)||(this.linked[i]={}),this.linked[i][t]=n,r.isFunction(n.onChange)&&this.unbinds[i].push(this.data[i].addBulkListener(function(e){n.onChange(e)}))}},t.prototype.get=function(e){return this.data[e.toString()]?this.data[e.toString()]:null},t.prototype.getLinked=function(e,t){var n=e.toExternal();return this.data[n]?this.linked.hasOwnProperty(n)?this.linked[n].hasOwnProperty(t)?this.linked[n][t]:null:null:null},t.prototype.all=function(){var e=this;return Object.keys(this.data).map(function(t){return e.data[t]})},t.prototype.allLinked=function(){var e=this,t=[];return Object.keys(this.linked).forEach(function(n){Object.keys(e.linked[n]).forEach(function(r){t.push(e.linked[n][r]) })}),t},t.prototype.contains=function(e){return!!this.data[e.toString()]},t.prototype.remove=function(e,t){if(!this.contains(e))return!1;for(var n=e.toString(),o=this.data[n][0];this.unbinds[n].length>0;)this.unbinds[n].pop()();for(var s in this.linked[n])if(this.linked.hasOwnProperty(s)){var a=this.linked[n][s];r.isFunction(a.onRemove)&&a.onRemove()}return delete this.unbinds[n],delete this.linked[n],delete this.data[n],this.emit(i.ResourceEvents.REMOVED,{url:e,removedElement:o,addedElement:t}),!0},t}(n.EventEmitter);t.ResourceService=o}),define("vs/editor/worker/dispatcherService",["require","exports","vs/base/lib/winjs.base","vs/base/types","vs/base/objects","vs/base/network"],function(e,t,n,r,i,o){var s=function(){function e(){this.table={}}return e.prototype.register=function(e){if(r.isString(e))this.table[e]=arguments[1];else for(var t in e){var n=e[t];r.isFunction(n)&&(this.table[t]=n.bind(e))}},e.prototype.dispatch=function(e){if(!this.table[e.type])return n.Promise.wrapError(new Error("no handler/route for: "+e.type));try{var t=this.deserialize(e.payload),r=this.table[e.type].apply(this.table[e.type],t);return n.Promise.is(r)?r:n.Promise.as(r)}catch(i){return n.Promise.wrapError(i)}},e.prototype.deserialize=function(e){return i.cloneAndChange(e,function(e){return r.isString(e.$url)?new o.URL(e.$url):void 0})},e}();t.DispatcherService=s});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/platform/markers/markers",["require","exports","vs/base/assert","vs/base/network"],function(e,t,n,r){function i(e){var t=e;return"string"==typeof t.type&&"number"==typeof t.severity&&"number"==typeof t.code&&"undefined"!=typeof t.text}function o(e){var n=e;return t.isITextMarker(e)&&"undefined"!=typeof n.range}function s(e){var n=e;return t.isITextMarker(e)&&"number"==typeof n.offset&&"number"==typeof n.length}function a(e){var n=e;return t.isITextMarker(e)&&"number"==typeof n.lineNumber&&"number"==typeof n.column&&"number"==typeof n.length}function u(e){var n=e;return t.isITextMarker(e)&&"number"==typeof n.startLineNumber&&"number"==typeof n.startColumn&&"number"==typeof n.endLineNumber&&"number"==typeof n.endColumn}function l(e,t,n,r,i){return{type:"text",severity:e,code:t,text:n,offset:r,length:i}}function c(e,t,n,r){return{type:"text",severity:e,code:t,text:n,range:r}}function d(e){return new y(e)}function h(e,t){return t+"|"+e.toExternal()}function p(e,t){return new b(e,t)}function f(e){return b.fromJson(e)}function g(e,t){var r=null;if(t){if(n.ok(e.getAssociatedResource().toExternal()===t.getAssociatedResource().toExternal()),e.getId()===y.DEFAULT_GROUP)return r=new y(t.getAssociatedResource(),e.getMarkers()),t.getGroups().forEach(function(e){r.addGroup(e)}),r;var i=new v(t,e.getId(),e.getMarkers()),o=t.getGroup(e.getId());return o?(r=new y(t.getAssociatedResource(),t.getGroup(y.DEFAULT_GROUP).getMarkers()),t.getGroups().forEach(function(e){e.getId()!==i.getId()&&r.addGroup(e)}),r.addGroup(i),r):(t.addGroup(i),t)}if(e.getId()===y.DEFAULT_GROUP)return new y(e.getAssociatedResource(),e.getMarkers());r=new y(e.getAssociatedResource());var s=new v(r,e.getId(),e.getMarkers());return r.addGroup(s),r}t.isITextMarker=i,t.isIRangeTextMarker=o,t.isIOffsetLengthTextMarker=s,t.isILineLengthTextMarker=a,t.isILineColumnTextMarker=u,t.createTextMarker=l,t.createRangeTextMarker=c;var m=function(){function e(e){"undefined"==typeof e&&(e=[]),this.markers=e}return e.prototype.length=function(){return this.markers.length},e.prototype.markerAt=function(e){return this.markers[e]},e.prototype.getMarkers=function(){return this.markers.slice(0)},e.prototype.forEach=function(e){this.markers.forEach(e)},e}(),v=function(e){function t(t,n,r){"undefined"==typeof r&&(r=[]),e.call(this,r),this.owner=t,this.id=n}return __extends(t,e),t.prototype.getAssociatedResource=function(){return this.owner.getAssociatedResource()},t.prototype.getId=function(){return this.id},t}(m),y=function(e){function t(t,n){"undefined"==typeof n&&(n=[]),e.call(this,n),this.resource=t,this.groups=[]}return __extends(t,e),t.prototype.getAssociatedResource=function(){return this.resource},t.prototype.getId=function(){return t.DEFAULT_GROUP},t.prototype.getMarkers=function(){var t=e.prototype.getMarkers.call(this);return this.groups.forEach(function(e){t=t.concat(e.getMarkers())}),t},t.prototype.getGroups=function(){return this.groups.slice(0)},t.prototype.getGroup=function(n){if(t.DEFAULT_GROUP===n)return new v(this,this.getId(),e.prototype.getMarkers.call(this));for(var r=0;r1?this.markerUpdateChangeCounts[t]=--n:(delete this.markerUpdateChangeCounts[t],0===this.globalChangeCount&&this._publishMarkerUpdate(e))},e.prototype._getMarkerUpdateChangeCount=function(e){return this.markerUpdateChangeCounts[e.computeKey()]},e.prototype._publishMarkerUpdate=function(e){var t=[];t.push(this._convertToJson(e)),this.publisher.updateMarkers(t),this._removeMarkerUpdate(e)},e.prototype._publishReadyMarkerUpdates=function(){var e=this,t=[];Object.keys(this.markerUpdates).forEach(function(n){var r=e.markerUpdates[n],i=e._getMarkerUpdateChangeCount(r);"undefined"==typeof i&&t.push(e._convertToJson(r))}),this.publisher.updateMarkers(t)},e.prototype._toRangeTextMarker=function(e,t){var n,i,o,s;if(r.isIOffsetLengthTextMarker(t)){var a=t,u=a.offset,l=Math.max(0,a.length),c=e.getRangeFromOffsetAndLength(u,l);n=c.startLineNumber,i=c.startColumn,o=c.endLineNumber,s=c.endColumn}else if(r.isILineLengthTextMarker(t)){var d=t;n=d.lineNumber,i=d.column,o=d.lineNumber,s=d.column+d.length}else if(r.isILineColumnTextMarker(t)){var h=t;n=h.startLineNumber,i=h.startColumn,o=h.endLineNumber,s=h.endColumn}else{if(!r.isIRangeTextMarker(t))throw new Error("Cannot normalize to IRangeTextMarker unknown marker type");var p=t;n=p.range.startLineNumber,i=p.range.startColumn,o=p.range.endLineNumber,s=p.range.endColumn}return{range:{startLineNumber:n,startColumn:i,endLineNumber:o,endColumn:s},severity:t.severity,code:t.code,text:t.text,type:t.type,optionalId:t.optionalId}},e.prototype._convertToJson=function(e){var t=e.toJson(),n=e.getAssociatedResource().toExternal(),i=this.modelInfos[n],o=this.models[n];if(!i||!o)throw new Error("Unknown model for "+n);for(var s=[],a=0,u=t.markers.length;u>a;a++){var l=t.markers[a];if(!r.isITextMarker(l))throw new Error("Unknown marker type");var c=l;s.push(this._toRangeTextMarker(o,c))}return{resource:t.resource,id:t.id,model:{versionId:i.version},markers:s}},e.DEFAULT_GROUP="defaultGroup",e}();t.MarkerPublisher=s,t.createPublisher=i}),define("vs/platform/search/searchService",["require","exports","vs/base/lib/winjs.base","vs/base/strings","vs/base/errors","vs/platform/services"],function(e,t,n,r,i){var o=function(){function e(e,t,n){this.preview=e,this.lineNumber=t,this.offsetAndLengths=n}return e}(),s=function(){function e(e,t){this.filepath=e,this.mime=t,this.lineMatches=[]}return e}(),a=function(){function e(){this.fileMatches=[]}return e}(),u=function(){function e(){}return e.prototype.injectRequestService=function(e){this._requestService=e},e.prototype.search=function(e){return this._doSearch(e,2===e.type)},e.prototype._doSearch=function(e,t){var u,l,c=this;return new n.Promise(function(n,d,h){l=d;var p,f,g,m=new a,v=0,y=function(e){var r=e.getResponseHeader("Content-Type");if(r&&0!==r.indexOf("text/plain")){if(0===r.indexOf("application/json")){if(g=JSON.parse(e.responseText),g.fileMatch&&Array.isArray(g.fileMatch))for(var a=g.fileMatch,u=0;u0;)this.postMessage(this.beforeLoadMessages.shift())},t.prototype.getId=function(){return this.id},t.prototype.postMessage=function(e){this.loaded===!0?window.frames[this.iframeId()].postMessage(JSON.stringify(e),"*"):this.beforeLoadMessages.push(e)},t.prototype.terminate=function(){window.removeEventListener("message",this.onMessage),window.frames[this.iframeId()].close()},t}(),h=function(){function e(e){this.label=e}return e.prototype.create=function(e,t){var n=null;try{n=new c(e,this.label,t)}catch(r){n=new d(e,t)}return n},e}();t.DefaultWorkerFactory=h;var p=function(){function e(t,n){var r=this;this._lastMessageId=0,this._promises={},this._messageHandlers={},this._messagesQueue=[],this._processQueueTimeout=-1,this._waitingForWorkerReply=!1,this._lastTimerEvent=null,this._worker=t.create(++e.LAST_WORKER_ID,function(e){return r._onmessage(e)});var i=null,o=window.require;"function"==typeof o.getConfig?i=o.getConfig():"undefined"!=typeof window.requirejs&&(i=window.requirejs.s.contexts._.config);var a=window.MonacoEnvironment||null;this.onModuleLoaded=this._sendMessage(s.MessageType.INITIALIZE,{id:this._worker.getId(),moduleId:n,loaderConfiguration:i,MonacoEnvironment:a}),this.onModuleLoaded.then(null,function(){return r._onError("Worker failed to load "+n)})}return e.prototype.request=function(e,t,r){var i=this;if("$"===e.charAt(0))throw new Error("Illegal requestName: "+e);var o,s=!1;return new n.Promise(function(n,a,u){i.onModuleLoaded.then(function(){s||(o=i._sendMessage(e,t,r).then(n,a,u))},a,u)},function(){o?o.cancel():s=!0})},e.prototype.destroy=function(){this.dispose()},e.prototype.dispose=function(){var e=Object.keys(this._promises);if(e.length>0){console.warn("Terminating a worker with "+e.length+" pending promises:"),console.warn(this._promises);for(var t in this._promises)e.hasOwnProperty(t)&&this._promises[t].error("Worker forcefully terminated")}this._worker.terminate()},e.prototype.addMessageHandler=function(e,t){this._messageHandlers[e]=t},e.prototype.removeMessageHandler=function(e){delete this._messageHandlers[e]},e.prototype._sendMessage=function(e,t,r){"undefined"==typeof r&&(r=(new Date).getTime());var i,o,s,a=this,u={id:++this._lastMessageId,type:e,timestamp:r,payload:t},l=new n.Promise(function(e,t,n){i=e,o=t,s=n},function(){a._removeMessage(u.id)});return this._promises[u.id]={complete:i,error:o,progress:s,type:e,payload:t},this._enqueueMessage(u),l},e.prototype._enqueueMessage=function(e){var t,n=-1;for(t=this._messagesQueue.length-1;t>=0;t--)if(this._messagesQueue[t].timestamp<=e.timestamp){n=t;break}this._messagesQueue.splice(n+1,0,e),this._processMessagesQueue()},e.prototype._removeMessage=function(e){for(var t=0,n=this._messagesQueue.length;n>t;t++)if(this._messagesQueue[t].id===e)return this._promises.hasOwnProperty(String(e))&&delete this._promises[String(e)],this._messagesQueue.splice(t,1),this._processMessagesQueue(),void 0},e.prototype._processMessagesQueue=function(){var e=this;if(-1!==this._processQueueTimeout&&(clearTimeout(this._processQueueTimeout),this._processQueueTimeout=-1),0!==this._messagesQueue.length&&!this._waitingForWorkerReply){var t=this._messagesQueue[0].timestamp-(new Date).getTime();t=Math.max(0,t),this._processQueueTimeout=setTimeout(function(){if(e._processQueueTimeout=-1,0!==e._messagesQueue.length){e._waitingForWorkerReply=!0;var t=e._messagesQueue.shift();e._lastTimerEvent=i.start(2,e._decodeMessageName(t)),e._worker.postMessage(t)}},t)}},e.prototype._onmessage=function(e){if(e.monacoWorker&&(!e.from||e.from===this._worker.getId())){switch(e.type){case s.MessageType.REPLY:var t=e;if(this._waitingForWorkerReply=!1,this._lastTimerEvent&&this._lastTimerEvent.stop(),!this._promises.hasOwnProperty(String(t.id)))return this._onError("Received unexpected message from Worker:",e),void 0;switch(t.action){case s.ReplyType.COMPLETE:this._promises[t.id].complete(t.payload),delete this._promises[t.id];break;case s.ReplyType.ERROR:this._onError("Main Thread sent to worker the following message:",{type:this._promises[t.id].type,payload:this._promises[t.id].payload}),this._onError("And the worker replied with an error:",t.payload),o.onUnexpectedError(t.payload),this._promises[t.id].error(t.payload),delete this._promises[t.id];break;case s.ReplyType.PROGRESS:this._promises[t.id].progress(t.payload)}break;case s.MessageType.PRINT:var n=e;this._consoleLog(n.level,n.payload);break;default:if(e.type in this&&"function"==typeof this[e.type])this[e.type](e.payload);else{var r=this._messageHandlers[e.type];r&&"function"==typeof r?r(e.payload):this._onError("Received unexpected message from Worker:",e)}}this._processMessagesQueue()}},e.prototype._decodeMessageName=function(e){return e.type},e.prototype._consoleLog=function(e,t){switch(e){case s.PrintType.LOG:console.log(t);break;case s.PrintType.DEBUG:console.info(t);break;case s.PrintType.INFO:console.info(t);break;case s.PrintType.WARN:console.warn(t);break;case s.PrintType.ERROR:console.error(t);break;default:this._onError("Received unexpected message from Worker:",t)}},e.prototype._onError=function(e,t){console.error(e),console.info(t)},e.LAST_WORKER_ID=1,e}();t.WorkerClient=p}),define("vs/platform/thread/attribute",["require","exports","vs/platform/services"],function(e,t){function n(e,t){for(var n in e)if(e[n]===t)return n;throw new Error("Member not found in prototype")}function r(e){var n=e[t.THREAD_SERVICE_PROPERTY_NAME];if(!n)throw new Error("Objects that use thread attributes must be instantiated with the thread service");return n}function i(e,t){var i=n(e.prototype,t);e.prototype[i]=function(){for(var e=[],n=0;nr;r++){var o=e[r](t,n);if(o)return o}return null}}function i(){for(var e=[],t=0;ti;i++){var s=e[i](t,n);if(!s)return null;r=r.concat(s)}return r}}function o(e,t,n){if(0===n.length||n.length0?[{start:0,end:t.length}]:[]}function s(e,t){var n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function a(e,t){return u(e.toLowerCase(),t.toLowerCase(),0,0)}function u(e,t,n,r){if(n===e.length)return[];if(r===t.length)return null;if(e[n]===t[r]){var i=null;if(i=u(e,t,n+1,r+1))return h({start:r,end:r+1},i)}return u(e,t,n,r+1)}function l(e,t){if(0===t.length)return null;for(var n=null,r=0;r=65&&90>=t}function d(e){var t=e.charCodeAt(0);return t>=48&&57>=t}function h(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function p(e,t){for(var n=t;nn;n++)r[n]=!1;for(n=0;n=this.sourceLength},e.prototype.peek=function(){if(this._pos>=this.sourceLength)throw new Error("Stream is at the end");return this._source[this._pos]},e.prototype.next=function(){if(this._pos>=this.sourceLength)throw new Error("Stream is at the end");return this.tokenStart=-1,this.tokenEnd=-1,this._source[this._pos++]},e.prototype.advance=function(e){var t=this._pos;return this._pos+=e,this.resetPeekedToken(),this._source.substring(t,this._pos)},e.prototype.advanceToEOS=function(){var e=this._pos;return this._pos=this.sourceLength,this.resetPeekedToken(),this._source.substring(e,this._pos)},e.prototype.goBack=function(e){this._pos-=e,this.resetPeekedToken()},e.prototype.createPeeker=function(e){var t=this;if(e instanceof RegExp)return function(){var n=e.exec(t._source.substr(t._pos));if(null===n)return 0;if(0!==n.index)throw new Error('Regular expression must begin with the character "^"');return n[0].length};if((e instanceof String||"string"==typeof e)&&e)return function(){for(var n=e.length,r=t._pos+n<=t.sourceLength,i=0;r&&n>i;i++)r=t._source.charCodeAt(t._pos+i)===e.charCodeAt(i);return r?n:0};throw new Error("Condition must be either a regular expression, function or a non-empty string")},e.prototype.advanceIfStringCaseInsensitive=function(e){var t,n=this._pos,r=this._source,i=e.length;if(1>i||n+i>this.sourceLength)return"";for(t=0;i>t;t++)if(r.charAt(n+t).toLowerCase()!==e.charAt(t).toLowerCase())return"";return this.advance(i)},e.prototype.advanceIfString=function(e){var t,n=this._pos,r=this._source,i=e.length;if(1>i||n+i>this.sourceLength)return"";for(t=0;i>t;t++)if(r.charCodeAt(n+t)!==e.charCodeAt(t))return"";return this.advance(i)},e.prototype.advanceIfCharCode=function(e){return this._pos=this.sourceLength)return"";var t=e.exec(this._source.substr(this._pos));if(t){if(0===t.index)return this.advance(t[0].length);throw new Error('Regular expression must begin with the character "^"')}return""},e.prototype.advanceLoop=function(e,t,n){if(this.eos())return"";var r=this.createPeeker(e),i=this._pos,o=0,s=null;for(s=t?function(e){return e>0}:function(e){return 0===e};!this.eos()&&s(o=r());)o>0?this.advance(o):this.next();return n&&!this.eos()&&this.advance(o),this._source.substring(i,this._pos)},e.prototype.advanceWhile=function(e){return this.advanceLoop(e,!0,!1)},e.prototype.advanceUntil=function(e,t){return this.advanceLoop(e,!1,t)},e.prototype.resetPeekedToken=function(){this.tokenStart=-1,this.tokenEnd=-1},e.prototype.setTokenRules=function(e,t){(this.separators!==e||this.whitespace!==t)&&(this.separators=e,this.separatorsArr=this.stringToArray(this.separators),this.whitespace=t,this.whitespaceArr=this.stringToArray(this.whitespace),this.resetPeekedToken())},e.prototype.peekToken=function(){if(-1!==this.tokenStart)return this._source.substring(this.tokenStart,this.tokenEnd);var e=this._source,t=this.sourceLength,n=this.whitespaceArr,r=this.separatorsArr,i=this._pos;if(i>=t)throw new Error("Stream is at the end");for(;n[e.charCodeAt(i)]&&t>i;)i++;var o=i;if(r[e.charCodeAt(o)]&&t>o)o++;else for(;!r[e.charCodeAt(o)]&&!n[e.charCodeAt(o)]&&t>o;)o++;return this.tokenStart=i,this.tokenEnd=o,e.substring(i,o)},e.prototype.nextToken=function(){if(this._pos>=this.sourceLength)throw new Error("Stream is at the end");var e;return e=-1===this.tokenStart?this.peekToken():this._source.substring(this.tokenStart,this.tokenEnd),this._pos=this.tokenEnd,this.tokenStart=-1,this.tokenEnd=-1,e},e.prototype.peekWhitespace=function(){for(var e=this._source,t=this.sourceLength,n=this.whitespaceArr,r=this._pos;n[e.charCodeAt(r)]&&t>r;)r++;return e.substring(this._pos,r)},e.prototype.skipWhitespace=function(){for(var e=this._source,t=this.sourceLength,n=this.whitespaceArr,r=this._pos,i=this._pos;n[e.charCodeAt(i)]&&t>i;)i++;return r!==i?(this._pos=i,this.tokenStart=-1,this.tokenEnd=-1,e.substring(r,i)):""},e.STRING_TO_ARRAY_CACHE={},e}();t.LineStream=n}),define("vs/editor/modes/nullMode",["require","exports","vs/editor/modes/modes"],function(e,t){function n(e,t,n,r){"undefined"==typeof r&&(r=0);var i=[{startIndex:r,type:"",bracket:0}],o=[{startIndex:r,mode:e}];return{tokens:i,actualStopOffset:r+t.length,endState:n,modeTransitions:o}}var r=function(){function e(e,t){this.mode=e,this.stateData=t}return e.prototype.clone=function(){var t=this.stateData?this.stateData.clone():null;return new e(this.mode,t)},e.prototype.equals=function(e){if(this.mode!==e.getMode())return!1;var t=e.getStateData();return this.stateData||t?this.stateData&&t?this.stateData.equals(t):!1:!0},e.prototype.getMode=function(){return this.mode},e.prototype.tokenize=function(e){return e.advanceToEOS(),{type:""}},e.prototype.getStateData=function(){return this.stateData},e.prototype.setStateData=function(e){this.stateData=e},e}();t.NullState=r;var i=function(){function e(){this.tokenTypeClassificationSupport=this}return e.prototype.getId=function(){return"vs.editor.modes.nullMode"},e.prototype.bindModel=function(){},e.prototype.unbindModel=function(){},e.prototype.getNonWordTokenTypes=function(){return[]},e.prototype.getWordDefinition=function(){return e.DEFAULT_WORD_REGEXP},e.DEFAULT_WORD_REGEXP=/(-?\d*\.\d\w*)|(\w+)/g,e}();t.NullMode=i,t.nullTokenize=n}),define("vs/editor/modes/modesRegistry",["require","exports","vs/platform/services","vs/base/lib/winjs.base","vs/base/objects","vs/platform/thread/attribute","vs/base/errors"],function(e,t,n,r,i,o,s){var a=function(){function e(){this.mimetypeToModeId={},this.workerParticipantsRegistry={},this.modesDescriptorsRegistry={},this.modeOptions={}}return e}();t.ModesRegistryDataSource=a;var u=function(e){return n.AsyncDescriptor.fromJSON(e)},l=function(e){return n.AsyncDescriptor.fromJSON(e)},c=function(){function e(e){this._modeInstances={},this._modeCreationRequests={},this._data=new a,this._threadService=e.threadService}return e.prototype.getId=function(){return"modesRegistry"},e.prototype.getSerializableState=function(){var e=this,t=[];t=t.concat(Object.keys(this._modeInstances)),t=t.concat(Object.keys(this._modeCreationRequests));var n=function(e){return e.toJSON()},r={};Object.keys(this._data.workerParticipantsRegistry).forEach(function(t){r[t]=e._data.workerParticipantsRegistry[t].map(n)});var i={};return Object.keys(this._data.modesDescriptorsRegistry).forEach(function(t){i[t]=n(e._data.modesDescriptorsRegistry[t])}),{mimetypeToModeId:this._data.mimetypeToModeId,workerParticipantsRegistry:r,modesDescriptorsRegistry:i,modeOptions:this._data.modeOptions,instantiatedModes:t}},e.prototype.setData=function(e){var t=this;this._data.mimetypeToModeId=e.mimetypeToModeId;var n={};Object.keys(e.workerParticipantsRegistry).forEach(function(t){n[t]=e.workerParticipantsRegistry[t].map(u)});var r={};Object.keys(e.modesDescriptorsRegistry).forEach(function(t){r[t]=l(e.modesDescriptorsRegistry[t])}),this._data.workerParticipantsRegistry=n,this._data.modesDescriptorsRegistry=r,this._data.modeOptions=e.modeOptions,e.instantiatedModes.forEach(function(e){t._getOrCreateOneModeAsync(e).done(null,s.onUnexpectedError)})},e.prototype.cloneFrom=function(e){this._importEverywhere(e.getSerializableState())},e.prototype._importEverywhere=function(e){this.setData(e)},e.prototype.registerWorkerParticipant=function(e,t){this._doRegisterWorkerParticipant(e,t),this._registerWorkerParticipantInWorkers(e,t)},e.prototype._registerWorkerParticipantInWorkers=function(e,t){this._doRegisterWorkerParticipant(e,u(t))},e.prototype._doRegisterWorkerParticipant=function(e,t){this._data.workerParticipantsRegistry.hasOwnProperty(e)||(this._data.workerParticipantsRegistry[e]=[]),this._data.workerParticipantsRegistry[e].push(t)},e.prototype.getWorkerParticipants=function(e){return this._data.workerParticipantsRegistry.hasOwnProperty(e)?this._data.workerParticipantsRegistry[e]:[]},e.prototype.isRegisteredMode=function(e){var t=this._data.mimetypeToModeId[e]||e;return this._data.modesDescriptorsRegistry.hasOwnProperty(t)},e.prototype.getRegisteredModes=function(){return Object.keys(this._data.modesDescriptorsRegistry)},e.prototype.getRegisteredMimetypes=function(){return Object.keys(this._data.mimetypeToModeId)},e.prototype.registerMode=function(e,t,n){this._doRegisterMode(e,t,n),this._registerModeInWorkers(e,t,n)},e.prototype._registerModeInWorkers=function(e,t,n){this._doRegisterMode(e,t,l(n))},e.prototype._doRegisterMode=function(e,t,n){var r=this;t.forEach(function(t){r._data.mimetypeToModeId[t]=e}),this._data.modesDescriptorsRegistry[e]=n},e.prototype.configureMode=function(e,t){if(!this._data.mimetypeToModeId.hasOwnProperty(e))throw new Error("Mimetype "+e+" was not found in the registry");this.configureModeById(this._data.mimetypeToModeId[e],t)},e.prototype.configureModeById=function(e,t){var n=this._data.modeOptions[e]||{},r=i.mixin(i.clone(n),t);if(!i.equals(n,r)&&(this._data.modeOptions[e]=r,this._modeInstances.hasOwnProperty(e))){var o=this._modeInstances[e];o&&o.configSupport&&o.configSupport.configure(r)}},e.prototype.getMode=function(e){for(var t=this._extractModeIds(e),n=0;n=0&&(t.validateTimeout=setTimeout(function(){t.validateTimeout=-1,n.validate(t.model.getAssociatedResource())},n.autoValidateDelay))},e.prototype._onModelEvents=function(e,t){var n,r,i=[],s=!1;for(n=0,r=t.length;r>n;n++){var a=t[n],u=a.getData();switch(a.getType()){case o.EventType.ModelContentChanged:switch(u.changeType){case o.EventType.ModelContentChangedFlush:i.push(this._mixinProperties({type:a.getType()},u,["changeType","detail","versionId"]));break;case o.EventType.ModelContentChangedLinesDeleted:i.push(this._mixinProperties({type:a.getType()},u,["changeType","fromLineNumber","toLineNumber","versionId"]));break;case o.EventType.ModelContentChangedLinesInserted:i.push(this._mixinProperties({type:a.getType()},u,["changeType","fromLineNumber","toLineNumber","detail","versionId"]));break;case o.EventType.ModelContentChangedLineChanged:i.push(this._mixinProperties({type:a.getType()},u,["changeType","lineNumber","detail","versionId"]))}s=!0;break;case o.EventType.ModelPropertiesChanged:i.push(this._mixinProperties({type:a.getType()},u,["properties"]))}}i.length>0&&this._modelEvents(this._models[e].model.getAssociatedResource(),i),s&&this._setupValidation(e)},e.prototype._mixinProperties=function(e,t,n){for(var r=0;ra;a++)if(r.endsWith(s.type,n[a]))return!0;return!1}function m(e,n,r){var o=i.Registry.as(t.Extensions.EditorModes);o.registerMode(e,n,r)}function v(e,n,r,i){t.registerModeAsyncDescriptor(e,n,new l.AsyncDescriptor(r,i))}function y(e,n){var r=i.Registry.as(t.Extensions.EditorModes);r.configureModeById(e,n)}function _(e){var n=i.Registry.as(t.Extensions.EditorModes);return n.getOrCreateMode(e)}function b(e,n,r){var o=i.Registry.as(t.Extensions.EditorModes);o.registerWorkerParticipant(e,new l.AsyncDescriptor(n,r))}t.isDigit=function(){var e="0".charCodeAt(0),t="1".charCodeAt(0),n="2".charCodeAt(0),r="3".charCodeAt(0),i="4".charCodeAt(0),o="5".charCodeAt(0),s="6".charCodeAt(0),a="7".charCodeAt(0),u="8".charCodeAt(0),l="9".charCodeAt(0),c="a".charCodeAt(0),d="b".charCodeAt(0),h="c".charCodeAt(0),p="d".charCodeAt(0),f="e".charCodeAt(0),g="f".charCodeAt(0),m="A".charCodeAt(0),v="B".charCodeAt(0),y="C".charCodeAt(0),_="D".charCodeAt(0),b="E".charCodeAt(0),C="F".charCodeAt(0);return function(w,S){var E=w.charCodeAt(0);switch(S){case 1:return E===e;case 2:return E>=e&&t>=E;case 3:return E>=e&&n>=E;case 4:return E>=e&&r>=E;case 5:return E>=e&&i>=E;case 6:return E>=e&&o>=E;case 7:return E>=e&&s>=E;case 8:return E>=e&&a>=E;case 9:return E>=e&&u>=E;case 10:return E>=e&&l>=E;case 11:return E>=e&&l>=E||E===c||E===m;case 12:return E>=e&&l>=E||E>=c&&d>=E||E>=m&&v>=E;case 13:return E>=e&&l>=E||E>=c&&h>=E||E>=m&&y>=E;case 14:return E>=e&&l>=E||E>=c&&p>=E||E>=m&&_>=E;case 15:return E>=e&&l>=E||E>=c&&f>=E||E>=m&&b>=E;default:return E>=e&&l>=E||E>=c&&g>=E||E>=m&&C>=E}}}(),t.isLineToken=g;var C=function(){function e(e,t,n){this.startIndex=e,this.type=t,this.bracket=n}return e}(),w=function(){function e(e,t,n,r){"undefined"==typeof n&&(n=null),"undefined"==typeof r&&(r=!1),this._instantiationService=e.instantiationService,this._contextService=e.contextService,this._threadService=e.threadService,this._descriptor=t,this._workerDescriptor=n||l.AsyncDescriptor.create("vs/languages/nullWorker","NullWorker"),this.supportsNestedMode=r,this.models={},this._options=null,this.validationSupport=this,this.autoValidateDelay=500,this.tokenizationSupport=this,this.occurrencesSupport=this,this.suggestSupport=this,this.inplaceReplaceSupport=this,this.diffSupport=this,this.dirtyDiffSupport=this,this.linkSupport=this,this.configSupport=this,this.electricCharacterSupport=this,this.commentsSupport=this,this.characterPairSupport=this,this.tokenTypeClassificationSupport=this,this._workerPiecePromise=null}return e.prototype._getWorkerPieceWithParticipants=function(){var e=this;if(!this._workerPiecePromise){var t=this._descriptor.workerParticipants;this._workerPiecePromise=t&&0!==t.length?n.TPromise.join(t.map(function(t){return e._instantiationService.createInstance(t)})).then(function(t){return e._getWorkerPiece(t)}):this._getWorkerPiece([])}return this._workerPiecePromise},e.prototype._getWorkerPiece=function(e){return this._instantiationService.createInstance(this._workerDescriptor,this.getId(),e)},e.prototype._worker=function(e){return this._getWorkerPieceWithParticipants().then(e)},e.prototype.getId=function(){return this._descriptor.id},e.prototype.bindModel=function(e){this._threadService&&f.BoundModels.getInstance(this._threadService).bindModel(e),this.models[e.id]=e},e.prototype.unbindModel=function(e){this._threadService&&f.BoundModels.getInstance(this._threadService).unbindModel(e),delete this.models[e.id]},e.prototype.validate=function(e){return this._worker(function(t){return t.validate(e)})},e.prototype._validateAll=function(e){return this._worker(function(t){return t.validateAll(e)})},e.prototype.getFilter=function(){return o.DefaultFilter},e.prototype.suggest=function(e,t){return this._worker(function(n){return n.suggest(e,t)})},e.prototype.getTriggerCharacters=function(){return[]},e.prototype.shouldAutotriggerSuggest=function(t,n,r){return this._handleEvent(t,n,r,function(t,n,r,i){return t instanceof e?t.shouldAutotriggerSuggestImpl(n,r.tokens,i):t.suggestSupport?t.suggestSupport.shouldAutotriggerSuggest(n,r,i):void 0})},e.prototype.shouldAutotriggerSuggestImpl=function(){return!1},e.prototype.shouldShowEmptySuggestionList=function(){return!0},e.prototype.shouldTriggerParameterHints=function(){return!0},e.prototype.findOccurrences=function(e,t,n){return"undefined"==typeof n&&(n=!1),this._worker(function(r){return r.findOccurrences(e,t,n)})},e.prototype.navigateValueSet=function(e,t,n){return this._worker(function(r){return r.navigateValueSet(e,t,n)})},e.prototype.computeDiff=function(e,t){return this._worker(function(n){return n.computeDiff(e,t)})},e.prototype.computeDirtyDiff=function(e){return this._worker(function(t){return t.computeDirtyDiff(e)})},e.prototype.computeLinks=function(e){return this._worker(function(t){return t.computeLinks(e)})},e.prototype.configure=function(e){var t=this;return this._options=e,this._threadService.isInMainThread?this._configureWorkers(e).then(function(){var e=Object.keys(t.models).map(function(e){return t.models[e].getAssociatedResource()});return t._validateAll(e)}):this._worker(function(t){return t.configure(e)})},e.prototype._configureWorkers=function(e){return this._worker(function(t){return t.configure(e)})},e.prototype.onEnter=function(t,n,r){return this._handleEvent(t,n,r,function(t,n,r,i){return t instanceof e?t.onEnterImpl(n,r.tokens,i):t.electricCharacterSupport?t.electricCharacterSupport.onEnter(n,r,i):void 0})},e.prototype.onEnterImpl=function(){return null},e.prototype.onElectricCharacter=function(t,n,r){return this._handleEvent(t,n,r,function(t,n,r,i){return t instanceof e?t.onElectricCharacterImpl(n,r.tokens,i):t.electricCharacterSupport?t.electricCharacterSupport.onElectricCharacter(n,r,i):void 0})},e.prototype.onElectricCharacterImpl=function(){return null},e.prototype.getElectricCharacters=function(){return[]},e.prototype.getInitialState=function(){throw new Error("Abstract Method")},e.prototype.getNonWordTokenTypes=function(){return[]},e.prototype.getWordDefinition=function(){return u.NullMode.DEFAULT_WORD_REGEXP},e.prototype.getAutoClosingPairs=function(){return[]},e.prototype.shouldAutoClosePair=function(t,n,r,i){return this._handleEvent(n,r,i,function(n,r,i,o){return n instanceof e?n.shouldAutoClosePairImpl(t,r,i.tokens,o):n.characterPairSupport?n.characterPairSupport.shouldAutoClosePair(t,r,i,o):void 0})},e.prototype.shouldAutoClosePairImpl=function(){return!0},e.prototype.getSurroundingPairs=function(){return this.getAutoClosingPairs()},e.prototype.getCommentsConfiguration=function(){return null},e.prototype._handleEvent=function(e,t,n,r){if(0===t.tokens.length||!this.supportsNestedMode)return r(this,e,t,n);var i=t.modeTransitions,o=t.tokens,s=d.findIndexInSegmentsArray(i,n),a=i[s].mode,u=i[s].startIndex,l=d.findIndexInSegmentsArray(o,u),c=-1,h=-1;s+1m;m++)p=o[m],f.push(new C(p.startIndex-g,p.type,p.bracket));var v=e.substring(g,c),y=n-g,_={tokens:f,modeTransitions:[{startIndex:0,mode:a}],actualStopOffset:0,endState:null};return r(a,v,_,y)},e.prototype._getEmbeddedLevel=function(e){for(var t=-1;e;)t++,e=e.getStateData();return t},e.prototype._nestedTokenize=function(e,t,n,r,i,o){for(var s=t.getStateData(),a=this.getLeavingNestedModeData(e,s),l=t;l.getStateData()&&l.getStateData().getMode()!==this;)l=l.getStateData();var c=l.getMode();if(!a){var d;return d=c.tokenizationSupport?c.tokenizationSupport.tokenize(e,t,n,r):u.nullTokenize(c,e,t,n),d.tokens=i.concat(d.tokens),d.modeTransitions=o.concat(d.modeTransitions),d}var h=a.nestedModeBuffer;if(h.length>0){var p;p=c.tokenizationSupport?c.tokenizationSupport.tokenize(h,t,n,r):u.nullTokenize(c,h,t,n),t=p.endState,i=i.concat(p.tokens),o=o.concat(p.modeTransitions)}var f=a.bufferAfterNestedMode,g=a.stateAfterNestedMode;return g.setStateData(s.getStateData()),this.onReturningFromNestedMode(g,t),this._myTokenize(f,g,n+h.length,r,i,o)},e.prototype._myTokenize=function(t,n,r,i,o,a){var u,l,c=new s.LineStream(t),d=null;n=n.clone(),(a.length<=0||a[a.length-1].mode!==this)&&a.push({startIndex:r,mode:this});for(var h=Math.min(i-r,t.length),p=0;c.pos()o;o++)n[r+o]=e[t+o]},e}();t.MyArray=i;// Copyright (C) 2008 Microsoft Corporation var o=1447,s=function(){function e(){this.m_changes=[],this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE,this.m_originalCount=0,this.m_modifiedCount=0}return e.prototype.MarkNextChange=function(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new n.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),a=function(){function e(e,t,n){"undefined"==typeof n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_originalIds=[],this.m_modifiedIds=[],this.m_forwardHistory=[],this.m_reverseHistory=[],this.ComputeUniqueIdentifiers()}return e.prototype.ComputeUniqueIdentifiers=function(){var e=this.OriginalSequence.getLength(),t=this.ModifiedSequence.getLength();this.m_originalIds=new Array(e),this.m_modifiedIds=new Array(t);var n,r={},i=1;for(n=0;e>n;n++){var o=this.OriginalSequence.getElementHash(n);r.hasOwnProperty(o)?this.m_originalIds[n]=r[o]:(this.m_originalIds[n]=i++,r[o]=this.m_originalIds[n])}for(n=0;t>n;n++){var s=this.ModifiedSequence.getElementHash(n);r.hasOwnProperty(s)?this.m_modifiedIds[n]=r[s]:(this.m_modifiedIds[n]=i++,r[s]=this.m_modifiedIds[n])}},e.prototype.ElementsAreEqual=function(e,t){return this.m_originalIds[e]===this.m_modifiedIds[t]},e.prototype.ComputeDiff=function(){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1)},e.prototype._ComputeDiff=function(e,t,n,r){var i=[!1];return this.ComputeDiffRecursive(e,t,n,r,i)},e.prototype.ComputeDiffRecursive=function(e,t,i,o,s){for(s[0]=!1;t>=e&&o>=i&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){var a;return o>=i?(r.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new n.DiffChange(e,0,i,o-i+1)]):t>=e?(r.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),a=[new n.DiffChange(e,t-e+1,i,0)]):(r.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var u=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,o,u,l,s),d=u[0],h=l[0];if(null!==c)return c;if(!s[0]){var p=this.ComputeDiffRecursive(e,d,i,h,s),f=[];return f=s[0]?[new n.DiffChange(d+1,t-(d+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,o,s),this.ConcatenateChanges(p,f)}return[new n.DiffChange(e,t-e+1,i,o-i+1)]},e.prototype.WALKTRACE=function(e,t,r,i,o,a,u,l,c,d,h,p,f,g,m,v,y,_){var b,C=null,w=null,S=new s,E=t,L=r,T=f[0]-v[0]-i,M=Number.MIN_VALUE,x=this.m_forwardHistory.length-1;do b=T+e,b===E||L>b&&c[b-1]h&&S.MarkNextChange(),M=h,S.AddModifiedElement(h+1,g),T=b+1-e):(h=c[b-1]+1,g=h-T-i,M>h&&S.MarkNextChange(),M=h-1,S.AddOriginalElement(h,g+1),T=b-1-e),x>=0&&(c=this.m_forwardHistory[x],e=c[0],E=1,L=c.length-1);while(--x>=-1);if(C=S.getReverseChanges(),_[0]){var k=f[0]+1,N=v[0]+1;if(null!==C&&C.length>0){var R=C[C.length-1];k=Math.max(k,R.getOriginalEnd()),N=Math.max(N,R.getModifiedEnd())}w=[new n.DiffChange(k,p-k+1,N,m-N+1)]}else{S=new s,E=a,L=u,T=f[0]-v[0]-l,M=Number.MAX_VALUE,x=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do b=T+o,b===E||L>b&&d[b-1]>=d[b+1]?(h=d[b+1]-1,g=h-T-l,h>M&&S.MarkNextChange(),M=h+1,S.AddOriginalElement(h+1,g+1),T=b+1-o):(h=d[b-1],g=h-T-l,h>M&&S.MarkNextChange(),M=h,S.AddModifiedElement(h+1,g+1),T=b-1-o),x>=0&&(d=this.m_reverseHistory[x],o=d[0],E=1,L=d.length-1);while(--x>=-1);w=S.getChanges()}return this.ConcatenateChanges(C,w)},e.prototype.ComputeRecursionPoint=function(e,t,r,s,a,u,l){var c,d,h,p=0,f=0,g=0,m=0;e--,r--,a[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var v=t-e+(s-r),y=v+1,_=new Array(y),b=new Array(y),C=s-r,w=t-e,S=e-r,E=t-s,L=w-C,T=L%2===0;_[C]=e,b[w]=t,l[0]=!1;var M,x;for(h=1;v/2+1>=h;h++){var k=0,N=0;for(p=this.ClipDiagonalBound(C-h,h,C,y),f=this.ClipDiagonalBound(C+h,h,C,y),M=p;f>=M;M+=2){for(c=M===p||f>M&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1,d=c-(M-C)-S,x=c;t>c&&s>d&&this.ElementsAreEqual(c+1,d+1);)c++,d++;if(_[M]=c,c+d>k+N&&(k=c,N=d),!T&&Math.abs(M-w)<=h-1&&c>=b[M])return a[0]=c,u[0]=d,x<=b[M]&&o>0&&o+1>=h?this.WALKTRACE(C,p,f,S,w,g,m,E,_,b,c,t,a,d,s,u,T,l):null}var R=(k-e+(N-r)-h)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(k,this.OriginalSequence,R))return l[0]=!0,a[0]=k,u[0]=N,R>0&&o>0&&o+1>=h?this.WALKTRACE(C,p,f,S,w,g,m,E,_,b,c,t,a,d,s,u,T,l):(e++,r++,[new n.DiffChange(e,t-e+1,r,s-r+1)]);for(g=this.ClipDiagonalBound(w-h,h,w,y),m=this.ClipDiagonalBound(w+h,h,w,y),M=g;m>=M;M+=2){for(c=M===g||m>M&&b[M-1]>=b[M+1]?b[M+1]-1:b[M-1],d=c-(M-w)-E,x=c;c>e&&d>r&&this.ElementsAreEqual(c,d);)c--,d--;if(b[M]=c,T&&Math.abs(M-C)<=h&&c<=_[M])return a[0]=c,u[0]=d,x>=_[M]&&o>0&&o+1>=h?this.WALKTRACE(C,p,f,S,w,g,m,E,_,b,c,t,a,d,s,u,T,l):null}if(o>=h){var I=new Array(f-p+2);I[0]=C-p+1,i.Copy(_,p,I,1,f-p+1),this.m_forwardHistory.push(I),I=new Array(m-g+2),I[0]=w-g+1,i.Copy(b,g,I,1,m-g+1),this.m_reverseHistory.push(I)}}return this.WALKTRACE(C,p,f,S,w,g,m,E,_,b,c,t,a,d,s,u,T,l)},e.prototype.ConcatenateChanges=function(e,t){var n=[],r=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(r=new Array(e.length+t.length-1),i.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],i.Copy(t,1,r,e.length,t.length-1),r):(r=new Array(e.length+t.length),i.Copy(e,0,r,0,e.length),i.Copy(t,0,r,e.length,t.length),r)},e.prototype.ChangesOverlap=function(e,t,i){if(r.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),r.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var o=e.originalStart,s=e.originalLength,a=e.modifiedStart,u=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(u=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n.DiffChange(o,s,a,u),!0}return i[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,r){if(e>=0&&r>e)return e;var i=n,o=r-n-1,s=t%2===0;if(0>e){var a=i%2===0;return s===a?0:1}var u=o%2===0;return s===u?r-1:r-2},e}();t.LcsDiff=a});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/diff/diffComputer",["require","exports","vs/base/diff/diff"],function(e,t,n){function r(e){if(e.length<=1)return e;var t,n,r,i,s,a,u=[e[0]],l=u[0];for(t=1,n=e.length;n>t;t++)a=e[t],r=a.originalStart-(l.originalStart+l.originalLength),i=a.modifiedStart-(l.modifiedStart+l.modifiedLength),s=Math.min(r,i),o>s?(l.originalLength=a.originalStart+a.originalLength-l.originalStart,l.modifiedLength=a.modifiedStart+a.modifiedLength-l.modifiedStart):(u.push(a),l=a);return u}var i=2e3,o=3,s=function(){function e(e,t,n){this.buffer=e,this.startMarkers=t,this.endMarkers=n}return e.prototype.getLength=function(){return this.startMarkers.length},e.prototype.getElementHash=function(e){return this.buffer.substring(this.startMarkers[e].offset,this.endMarkers[e].offset)},e.prototype.getStartLineNumber=function(e){return e===this.startMarkers.length?this.startMarkers[e-1].lineNumber+1:this.startMarkers[e].lineNumber},e.prototype.getStartColumn=function(e){return this.startMarkers[e].column},e.prototype.getEndLineNumber=function(e){return this.endMarkers[e].lineNumber},e.prototype.getEndColumn=function(e){return this.endMarkers[e].column},e}(),a=function(e){function t(t,n){var r,i,o,s,a,u="",l=[],c=[];for(o=0,r=0,i=t.length;i>r;r++)u+=t[r],s=1,a=t[r].length+1,n&&(s=this._getFirstNonBlankColumn(t[r],1),a=this._getLastNonBlankColumn(t[r],1)),l.push({offset:o+s-1,lineNumber:r+1,column:s}),c.push({offset:o+a-1,lineNumber:r+1,column:a}),o+=t[r].length;e.call(this,u,l,c)}return __extends(t,e),t.prototype._getFirstNonBlankColumn=function(e,t){for(var n=0,r=e.length;r>n;n++)if(" "!==e.charAt(n)&&" "!==e.charAt(n))return n+1;return t},t.prototype._getLastNonBlankColumn=function(e,t){for(var n=e.length-1;n>=0;n--)if(" "!==e.charAt(n)&&" "!==e.charAt(n))return n+2;return t},t.prototype.getCharSequence=function(e,t){var n,r,i,o,a=[],u=[];for(n=e;t>=n;n++)for(i=this.startMarkers[n],o=this.endMarkers[n],r=i.offset;rh;h++)this.charChanges.push(new u(d[h],a,l))}}return e}(),c=function(){function e(e,t,n,r){this.shouldPostProcessCharChanges=n||!1,this.shouldIgnoreTrimWhitespace=r||!1,this.maximumRunTimeMs=i,this.original=new a(e,this.shouldIgnoreTrimWhitespace),this.modified=new a(t,this.shouldIgnoreTrimWhitespace)}return e.prototype.computeDiff=function(){this.computationStartTime=(new Date).getTime();for(var e=new n.LcsDiff(this.original,this.modified,this._continueProcessingPredicate.bind(this)),t=e.ComputeDiff(),r=[],i=0,o=t.length;o>i;i++)r.push(new l(t[i],this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldPostProcessCharChanges));return r},e.prototype._continueProcessingPredicate=function(){if(0===this.maximumRunTimeMs)return!0;var e=(new Date).getTime();return e-this.computationStartTime=t;t++)l[t]=String.fromCharCode(t);for(t=0;t",l["(".charCodeAt(0)]=")",l["[".charCodeAt(0)]="]",l["{".charCodeAt(0)]="}";var d,h,p,f,g,m,v,y,_;for(t=1,n=e.getLineCount();n>=t;t++){for(d=e.getLineContent(t),h=0,p=d.length,f=null,g=0,m=o;p>h;)v=d.charAt(h),_=!1,m===a?(" "===v||" "===v||v===f)&&(r.push(this._createLink(d,t,g,h)),_=!0):m===s?" "===v||" "===v||v===f?_=!0:m=a:i[m].hasOwnProperty(v)?m=i[m][v]:_=!0,_&&(m=o,g=h+1,y=d.charCodeAt(h),f=yr;r++)a(n[r])?this._validationParticipants.push(n[r]):u(n[r])&&this._suggestParticipants.push(n[r])}return e.prototype._getModeId=function(){return this._modeId},e.prototype.injectResourceService=function(e){this.resourceService=e},e.prototype.validate=function(e){var t=this;return this.markerService.createPublisher().batchChanges(function(n){t.doValidate(e,n),t.triggerValidateParticipation(e,n)}),n.Promise.as(null)},e.prototype.validateAll=function(e){var t=this;return n.Promise.join(e.map(function(e){return t.validate(e)}))},e.prototype.triggerValidateParticipation=function(e,t,n){"undefined"==typeof n&&(n=null);var r=this.resourceService.get(e);this._validationParticipants.forEach(function(e){try{e.validate(r,t,n)}catch(i){}})},e.prototype.doValidate=function(){},e.prototype.suggest=function(e,t){var r=this;return this._getSuggestContext(e).then(function(i){var o=[r.doSuggest(e,t)];return o.push.apply(o,r._participantSuggests(e,t,i)),n.TPromise.join(o)}).then(function(e){for(var t=r.getSuggestionFilterMain(),n=[],i=0,o=e.length;o>i;i++)e[i]&&n.push({currentWord:e[i].currentWord,suggestions:e[i].suggestions.filter(function(n){return t(e[i].currentWord,n)})});return n},function(){return[{currentWord:"",suggestions:[]}]})},e.prototype._participantSuggests=function(e,t,n){return this._suggestParticipants.map(function(r){try{return r.suggest(e,t,n)}catch(i){}})},e.prototype._getSuggestContext=function(){return n.TPromise.as(void 0)},e.prototype.doSuggest=function(e,t){var r=this.resourceService.get(e),i=r.getWordUntilPosition(t),o={currentWord:i,suggestions:[]};return o.suggestions.push.apply(o.suggestions,this.suggestWords(e,t)),o.suggestions.push.apply(o.suggestions,this.suggestSnippets(e,t)),n.Promise.as(o)},e.prototype.suggestWords=function(e,t){var n=this.resourceService.get(e),r=n.getWordUntilPosition(t),i=n.getAllUniqueWords(r);return i.filter(function(e){return!/^-?\d*\.?\d/.test(e)}).map(function(e){return{type:"text",label:e,codeSnippet:e}})},e.prototype.suggestSnippets=function(){return[]},e.prototype.getSuggestionFilterMain=function(){var e=this.getSuggestionFilter();return this._suggestParticipants.forEach(function(t){"function"==typeof t.filter&&(e=i.and(e,t.filter))}),e},e.prototype.getSuggestionFilter=function(){return e.filter},e.prototype.findOccurrences=function(e,t){for(var r=this.resourceService.get(e),i=r.getWordAtPosition(t),o=[],s=r.getAllWordsWithRange(),a=Math.min(1e3,s.length),u=0;a>u;u++)s[u].text===i&&o.push({range:s[u].range});return n.TPromise.as(o)},e.prototype.computeDiff=function(e,t){var i=this.resourceService.get(e),o=this.resourceService.get(t);if(null!==i&&null!==o){var s=i.getRawLines(),a=o.getRawLines(),u=new r.DiffComputer(s,a,!0,!0);return n.TPromise.as(u.computeDiff())}return n.TPromise.as(null)},e.prototype.computeDirtyDiff=function(e){var t=this.resourceService.get(e),i=t.getProperty("original");if(i&&null!==t){var s=o.TextModel._splitText(i),a=s.lines.map(function(e){return e.text}),u=t.getRawLines(),l=new r.DiffComputer(a,u,!1,!0);return n.TPromise.as(l.computeDiff())}return n.TPromise.as([])},e.prototype.navigateValueSet=function(e,t,r){var i=this.doNavigateValueSet(e,t,r,!0);return n.TPromise.as(i&&i.value&&i.range?i:null)},e.prototype.doNavigateValueSet=function(e,t,n,r){var i,o=this.resourceService.get(e),s={range:null,value:null};if(r)t.startColumn===t.endColumn&&(t.endColumn+=1),i=o.getValueInRange(t),s.range=t;else{var a={lineNumber:t.startLineNumber,column:t.startColumn},u=o.getWordUntilPosition(a);if(i=o.getWordAtPosition(a),0!==i.indexOf(u))return null;if(i.length0&&null===r;)r=this.valueSetReplace(e.pop(),t,n);return r},e.prototype.valueSetReplace=function(e,t,n){var r=e.indexOf(t);return r>=0?(r+=n?1:-1,0>r?r=e.length-1:r%=e.length,e[r]):null},e.prototype.computeLinks=function(e){var t=this.resourceService.get(e),r=s(t);return n.TPromise.as(r)},e.prototype.configure=function(){return n.TPromise.as(!0)},e.filter=i.DefaultFilter,e}();t.AbstractWorkerMode=l}),define("vs/editor/modes/autoIndentation/autoIndentation",["require","exports","vs/editor/modes/modes"],function(e,t){var n=function(){function e(e){this.brackets=e}return e.prototype.getElectricBrackets=function(){for(var e,t=[],n=0;n0&&""===i.type;)r--,i=t[r-1];if(r>0&&this.tokenTypeIsBracket(i.type)&&1===i.bracket){for(var o=t[r];rr;r++)if(" "!==e[r]&&" "!==e[r])return null;return{matchBracketType:this.tokenTypeFromChar(e[n])}},e.prototype.tokenTypeFromChar=function(e){for(var t,n=0;n'"]/g,"_")}function a(e,t){e.textContent+=t}function u(e,t){if(e){var n=document.getElementById(e);n&&(a(n,t+"\n"),n.scrollTop&&(n.scrollTop=n.scrollHeight))}console&&console.log(t)}function l(e,t){u(e.logConsole,t)}function c(e,t){if(!e)throw new Error(t);if(t=e.displayName+" highlighter: "+t,e.logConsole){var n=document.getElementById(e.logConsole);n&&a(n,t+"\n")}if(!e.noThrow)throw new Error(t);console&&console.log(t)}function d(e,n,r,i,o){var s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,a=null;return n.replace(s,function(n,s,u,l,c,d,h){return t.empty(u)?t.empty(l)?!t.empty(c)&&c0;){var n=e.tokenizer[t];if(n)return n;var r=t.lastIndexOf(".");t=0>r?null:t.substr(0,r)}return null}function p(e,t){for(;t&&t.length>0;){var n=e.stateNames[t];if(n)return!0;var r=t.lastIndexOf(".");t=0>r?null:t.substr(0,r)}return!1}t.monarchPath="vs/editor/modes/monarch/monarch",t.version=n,t.empty=r,t.fixCase=i;var f={"&":"&","<":"<",">":">","'":"'",'"':"""},g=new RegExp("["+Object.keys(f).join("")+"]","g");t.htmlEscape=o,t.sanitize=s,t.log=l,t.throwError=c,t.substituteMatches=d,t.findRules=h,t.stateExists=p}),define("vs/editor/modes/monarch/monarchCompile",["require","exports","vs/base/objects","vs/editor/modes/modes","vs/editor/modes/monarch/monarchCommon"],function(e,t,n,r,i){function o(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;var n;for(n in t)if(t.hasOwnProperty(n)&&!e(t[n]))return!1;return!0}function s(e,t,n){return"boolean"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function a(e,t,n){return"string"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function u(e,t,n){return a(e,t,n)}function l(e,t,n){return o(function(e){return"string"==typeof e},e)?e.slice(0):"string"==typeof e?[e]:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function c(e,t){if("string"!=typeof t)return null;for(var n=0;t.indexOf("@")>=0&&5>n;)n++,t=t.replace(/@(\w+)/g,function(n,r){var o="";return"string"==typeof e[r]?o=e[r]:e[r]&&e[r]instanceof RegExp?o=e[r].source:void 0===e[r]?i.throwError(e,"language definition does not contain attribute '"+r+"', used at: "+t):i.throwError(e,"attribute reference '"+r+"' must be a string, used at: "+t),i.empty(o)?"":"(?:"+o+")"});return new RegExp(t,e.ignoreCase?"i":"")}function d(e,t,n,r){if(0>r)return e;if(r=100){r-=100;var i=n.split(".");if(i.unshift(n),r=0&&(r.tokenSubst=!0),"string"==typeof n.bracket&&("@open"===n.bracket?r.bracket=1:"@close"===n.bracket?r.bracket=-1:i.throwError(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t)),n.next)if("string"!=typeof n.next)i.throwError(e,"the next state must be a string value in rule: "+t);else{var o=n.next;/^(@pop|@push|@popall)$/.test(o)||("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&(i.stateExists(e,i.substituteMatches(e,o,"",[],""))||i.throwError(e,"the next state '"+n.next+"' is not defined in rule: "+t))),r.next=o}return"number"==typeof n.goBack&&(r.goBack=n.goBack),"string"==typeof n.switchTo&&(r.switchTo=n.switchTo),"string"==typeof n.log&&(r.log=n.log),"string"==typeof n.nextEmbedded&&(r.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),r}if(Array.isArray(n)){var s,a=[];for(s in n)n.hasOwnProperty(s)&&(a[s]=p(e,t,n[s]));return{group:a}}if(n.cases){var u,l=[];for(u in n.cases)if(n.cases.hasOwnProperty(u)){var c=p(e,t,n.cases[u]);"@default"===u||"@"===u||""===u?l.push({test:null,value:c,name:u}):"@eos"===u?l.push({test:function(e,t,n,r){return r},value:c,name:u}):l.push(h(e,t,u,c))}var d=e.defaultToken;return{test:function(e,t,n,r){var i;for(i in l)if(l.hasOwnProperty(i)){var o=!l[i].test||l[i].test(e,t,n,r);if(o)return l[i].value}return d}}}return i.throwError(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t),""}return{token:""}}function f(e){function t(o,u,l){var c;for(c in l)if(l.hasOwnProperty(c)){var d=l[c],h=d.include;if(h)"string"!=typeof h&&i.throwError(n,"an 'include' attribute must be a string at: "+o),"@"===h[0]&&(h=h.substr(1)),e.tokenizer[h]||i.throwError(n,"include target '"+h+"' is not defined at: "+o),t(o+"."+h,u,e.tokenizer[h]);else{var p=new g(o);if(Array.isArray(d)&&d.length>=1&&d.length<=3)if(p.setRegex(r,d[0]),d.length>=3)if("string"==typeof d[1])p.setAction(r,{token:d[1],next:d[2]});else if("object"==typeof d[1]){var f=d[1];f.next=d[2],p.setAction(r,f)}else i.throwError(n,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+o);else p.setAction(r,d[1]);else d.regex||i.throwError(n,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+o),d.name&&(p.name=a(d.name)),d.matchOnlyAtStart&&(p.matchOnlyAtLineStart=s(d.matchOnlyAtLineStart)),p.setRegex(r,d.regex),p.setAction(r,d.action);u.push(p)}}}if(!e||"object"!=typeof e)throw new Error("Monarch: expecting a language definition object");if("string"!=typeof e.name)throw new Error("Monarch: a language definition must include a string 'name' attribute");var n={};n.name=e.name,n.displayName=a(e.displayName,n.name),n.logConsole=a(e.logConsole),n.noThrow=!1,n.maxStack=100,n.mimeTypes=l(e.mimeTypes,void 0,function(){i.throwError(n,"the attribute 'mimeTypes' must be defined as an array of strings")}),n.start=a(e.start),n.fileExtensions=l(e.fileExtensions),n.ignoreCase=s(e.ignoreCase,!1),n.lineComment=a(e.lineComment,"//"),n.blockCommentStart=a(e.blockCommentStart,"/*"),n.blockCommentEnd=a(e.blockCommentEnd,"*/"),n.tokenPostfix=a(e.tokenPostfix,"."+n.name),n.defaultToken=a(e.defaultToken,"source",function(){i.throwError(n,"the 'defaultToken' must be a string")}),n.editorOptions=e.editorOptions?e.editorOptions:null,n.workerDescriptor=e.workerDescriptor,n.usesEmbedded=!1,n.wordDefinition=e.wordDefinition||void 0,!n.lineComment&&e.lineComments&&("string"==typeof e.lineComments?n.lineComment=e.lineComments:"string"==typeof e.lineComments[0]&&(n.lineComment=e.lineComments[0]));var r=e;r.name=n.name,r.displayName=n.displayName,r.ignoreCase=n.ignoreCase,r.noThrow=n.noThrow,r.usesEmbedded=n.usesEmbedded,r.stateNames=e.tokenizer,r.logConsole=n.logConsole,r.defaultToken=n.defaultToken,e.tokenizer&&"object"==typeof e.tokenizer||i.throwError(n,"a language definition must define the 'tokenizer' attribute as an object"),n.tokenizer=[];var o;for(o in e.tokenizer)if(e.tokenizer.hasOwnProperty(o)){n.start||(n.start=o);var d=e.tokenizer[o];n.tokenizer[o]=new Array,t("tokenizer."+o,n.tokenizer[o],d)}n.usesEmbedded=r.usesEmbedded,n.nonWordTokens=l(e.nonWordTokens,["delimiter","delimiter.parenthesis","delimiter.curly","delimiter.square","delimiter.angle"],function(){i.throwError(n,"the 'nonWordTokens' attribute must be an array of strings")});var h;for(h in n.nonWordTokens)n.nonWordTokens.hasOwnProperty(h)&&(n.nonWordTokens[h]+=n.tokenPostfix);e.brackets?Array.isArray(e.brackets)||i.throwError(n,"the 'brackets' attribute must be defined as an array"):e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];var p=[];for(var f in e.brackets)if(e.brackets.hasOwnProperty(f)){var m=e.brackets[f];m&&Array.isArray(m)&&3===m.length&&(m={token:m[2],open:m[0],close:m[1]}),m.open===m.close&&i.throwError(n,"open and close brackets in a 'brackets' attribute must be different: "+m.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required."),"string"==typeof m.open&&"string"==typeof m.token?p.push({token:a(m.token)+n.tokenPostfix,open:i.fixCase(n,a(m.open)),close:i.fixCase(n,a(m.close))}):i.throwError(n,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}n.brackets=p;var v;if(e.autoClosingPairs?(Array.isArray(e.autoClosingPairs)||i.throwError(n,"the 'autoClosingPairs' attribute must be an array of string pairs (as arrays)"),v=e.autoClosingPairs.slice(0)):v=[['"','"'],["'","'"],["@brackets"]],n.autoClosingPairs=[],v)for(var y in v)if(v.hasOwnProperty(y)){var _,b=v[y];if("@brackets"===b||"@brackets"===b[0]){var C;for(C in p)p.hasOwnProperty(C)&&p[C].open&&1===p[C].open.length&&p[C].close&&1===p[C].close.length&&(_={open:p[C].open,close:p[C].close},n.autoClosingPairs.push(_))}else Array.isArray(b)&&2===b.length&&"string"==typeof b[0]&&1===b[0].length&&"string"==typeof b[1]&&1===b[1].length?(_={open:i.fixCase(n,b[0]),close:i.fixCase(n,b[1])},n.autoClosingPairs.push(_)):"string"==typeof b.open&&1===b.open.length&&"string"==typeof b.close&&1===b.close.length?(_={open:i.fixCase(n,b.open[0]),close:i.fixCase(n,b.close[0])},n.autoClosingPairs.push(_)):i.throwError(n,"every element in an 'autoClosingPairs' array must be a pair of 1 character strings, or a '@brackets' directive")}if(e.autoIndent){var w=[];Array.isArray(e.autoIndent)||i.throwError(n,"an 'autoIndent' attribute must be an array of '{match,matchAfter}' objects");for(var S in e.autoIndent)e.autoIndent.hasOwnProperty(S)&&("string"!=typeof e.autoIndent[S].match&&i.throwError(n,"each object in the 'autoIndent' array must define a 'match' attribute"),w.push({match:c(n,e.autoIndent[S].match),matchAfter:c(n,a(e.autoIndent[S].matchAfter))}));n.autoIndent=w}if(e.autoComplete){var E=[];Array.isArray(e.autoComplete)||i.throwError(n,"an 'autoComplete' attribute must be an array of '{trigger,match,complete}' objects");for(var L in e.autoComplete)e.autoComplete.hasOwnProperty(L)&&("string"!=typeof e.autoComplete[L].triggers&&i.throwError(n,"each object in the 'autoComplete' array must define a 'triggers' attribute"),"string"!=typeof e.autoComplete[L].match&&i.throwError(n,"each object in the 'autoComplete' array must define a 'match' attribute as a regular expression string"),"string"!=typeof e.autoComplete[L].complete&&i.throwError(n,"each object in the 'autoComplete' array must define a 'complete' attribute"),E.push({triggers:i.fixCase(n,a(e.autoComplete[L].triggers)),match:c(n,e.autoComplete[L].match),complete:a(e.autoComplete[L].complete)})); n.autoComplete=E}if(e.noindentBrackets){var T=u(e.noindentBrackets,null,function(){i.throwError(n,"the 'noindentBrackets' must be a regular expression string")});n.noindentBrackets=c(n,T)}var M=[];for(var x in n.brackets)if(n.brackets.hasOwnProperty(x)){var k=n.brackets[x].close;k&&k.length>0&&(n.noindentBrackets&&n.noindentBrackets.test(k)||M.push(k.substr(k.length-1)))}for(var N in n.autoComplete)n.autoComplete.hasOwnProperty(N)&&M.push(n.autoComplete[N].triggers);return n.electricChars=M.join("")+a(e.outdentTriggers,""),n.logConsole||(n.logConsole="monarchConsole"),n.noThrow=!0,n}var g=function(){function e(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}return e.prototype.setRegex=function(e,t){var n;"string"==typeof t?n=t:t instanceof RegExp?n=t.source:i.throwError(e,"rules must start with a match string or regular expression: "+this.name),this.matchOnlyAtLineStart=n.length>0&&"^"===n[0],this.name=this.name+": "+n,this.regex=c(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")},e.prototype.setAction=function(e,t){this.action=p(e,this.name,t)},e}();t.compile=f});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/editor/modes/monarch/monarch",["require","exports","vs/platform/platform","vs/platform/services","vs/editor/modes/stream","vs/editor/modes/modes","vs/editor/modes/modesExtensions","vs/editor/modes/monarch/monarchCommon","vs/editor/modes/monarch/monarchCompile"],function(e,t,n,r,i,o,s,a,u){function l(e){return!e||""===e||/\bcomment\b/.test(e)||/\bwhite\b/.test(e)}function c(e,t){if(!t)return null;t=a.fixCase(e,t);for(var n=e.brackets,r=0;r0&&s.pop();if(0===s.length)return null;var a=s.pop();if(e.noindentBrackets){var u=h(t,n,a);if(e.noindentBrackets.test(u))return null}return i0){var s=a.fixCase(e,t.substr(r,1)),u=d(t,n,r+1).pre;for(f=0;f=0){var l=u.match(e.autoComplete[f].match);if(l){i=l[0].replace(e.autoComplete[f].match,e.autoComplete[f].complete);break}}}for(var c=0,p=0,f=0;fr);f++)c=n[f].startIndex,p=f;if(!(-1!==n[p].bracket||e.noindentBrackets&&e.noindentBrackets.test(h(t,n,p)))){var g=!0;for(f=0;c>f;f++)if(" "!==t[f]&&" "!==t[f]){g=!1;break}g&&(o=n[p].type)}return i||o?{matchBracketType:o,appendText:i}:null}function g(e){var t=u.compile(e),n=new b({},null,t);return w[t.name]={mode:n,mimeTypes:t.mimeTypes},n}function m(e){var t=u.compile(e),r=new b({},null,t);if(w[t.name]={mode:r,mimeTypes:t.mimeTypes},n&&n.Registry){var i=n.Registry.as(s.Extensions.EditorModes);i.registerMode(t.mimeTypes,new n.DeferredDescriptor(a.monarchPath,"MonarchMode",[t]))}return r}function v(e,t){if(!e||void 0===e.getMode)return null;var n=e.getMode(t);if(n)return n;if(e.getOrCreateMode){var r=e.getOrCreateMode(t);return r&&r.value?r.value:null}}function y(e){if(n){var t=v(n.Registry.as(s.Extensions.EditorModes),e);if(t)return t}if(w[e])return w[e].mode;var r;for(r in w)if(w.hasOwnProperty(r))for(var i=w[r],o=0;o=this.lexer.maxStack?a.throwError(this.lexer,"maximum tokenizer stack size reached: ["+this.stack[0]+","+this.stack[1]+",...,"+this.stack[this.stack.length-2]+","+this.stack[this.stack.length-1]+"]"):this.stack.unshift(i);else if("@pop"===u.next)this.stack.length<=1?a.throwError(this.lexer,"trying to pop an empty stack in rule: "+d.name):this.stack.shift();else if("@popall"===u.next)this.stack.length>1&&(this.stack=[this.stack[this.stack.length-1]]);else{var y=a.substituteMatches(this.lexer,u.next,s,o,i);"@"===y[0]&&(y=y.substr(1)),a.findRules(this.lexer,y)?this.stack.unshift(y):a.throwError(this.lexer,"trying to set a next state '"+y+"' that is undefined in rule: "+d.name)}u.log&&"string"==typeof u.log&&a.log(this.lexer,this.lexer.displayName+": "+a.substituteMatches(this.lexer,u.log,s,o,i))}if(null===v&&(a.throwError(this.lexer,"lexer rule has no well-defined action in rule: "+d.name),v=this.lexer.defaultToken),Array.isArray(v)){this.groupActions&&this.groupActions.length>0&&a.throwError(this.lexer,"groups cannot be nested: "+d.name),o.length!==v.length+1&&a.throwError(this.lexer,"matched number of groups does not match the number of actions in rule: "+d.name);for(var _=0,b=1;bn;n++)e[n]instanceof r.MirrorModel&&t.push(e[n]);return new c.MarkerPublisher(t,g.BoundModels.getInstance(this.threadService))},e}(),y=function(){function e(){var e=this;this.dispatcherService=new l.DispatcherService,this.modePromise=new n.Promise(function(t){e.modeCompleteCallback=t})}return e.prototype.initialize=function(e,t,n,r,l){var c,y=new o.BaseContextService(l.contextService.workspace,l.contextService.configuration,l.contextService.options);c=i.enableTelemetry&&y.getWorkspace()&&y.getWorkspace().telemetry?new a.TelemetryService({publicOnly:!i.enablePrivateTelemetry}):m.nullService;var _=o.search.NullSearchService.Instance;y.getWorkspace().search&&(_=new d.SearchService);var b=new h.ThreadService(l.threadService),C={threadService:b,searchService:_,contextService:y,requestService:new o.BaseRequestService,resourceService:new u.ResourceService,dispatcherService:this.dispatcherService,publisherService:{sendMessage:function(t,n){e.request(t,n)}},workerMarkerService:new v,telemetryService:c},w=s.create(C),S=f.Registry.as(p.Extensions.EditorModes);w.injectTo(S),g.BoundModels.getInstance(b),t(void 0)},e.prototype.request=function(e,t,n,r,i){i.mainThread=e,this.dispatcherService.dispatch(i).then(t,n,r)},e}();t.EditorWorkerServer=y,t.value=new y}),define("vs/base/severity",["require","exports","vs/base/strings"],function(e,t,n){function r(e){return e?n.equalsIgnoreCase(o,e)?i.Error:n.equalsIgnoreCase(s,e)||n.equalsIgnoreCase(a,e)?i.Warning:n.equalsIgnoreCase(u,e)?i.Info:0:0}!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=4]="Error"}(t.Severity||(t.Severity={}));var i=t.Severity,o="error",s="warning",a="warn",u="info";t.fromValue=r});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/editor/worker/editorWorkerServer.nls",[],{vs_base_errors:["{0}: {1}","Permission Denied (HTTP {0})","Permission Denied","{0} (HTTP {1}: {2})","{0} (HTTP {1})","Unknown Connection Error ({0})","An unknown connection error occurred. Either you are no longer connected to the internet or the server you are connected to is offline.","{0}: {1}","An unknown error occurred. Please consult the log for more details.","An unknown error occurred. Please consult the log for more details.","An unknown error occurred. Please consult the log for more details.","Failed to load a required file. Either you are no longer connected to the internet or the server you are connected to is offline. Please refresh the browser to try again."],vs_base_strings:["{0}-{1}-{2} {3}:{4}:{5}","{0}:{1}:{2}","{0}s","{0}m","{0}h","{0}d"],vs_base_performance_timer:["Cannot start a new timer from a stopped one."]});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/editor/worker/editorWorkerServer.nls.keys",[],{vs_base_errors:{path:"vs/base/errors.js",keys:["message","error.permission.verbose","error.permission","error.http.verbose","error.http","error.connection.unknown.verbose","error.connection.unknown","stackTrace.format","error.defaultMessage1","error.defaultMessage2","error.defaultMessage3","loaderError"]},vs_base_strings:{path:"vs/base/strings.js",keys:["format.date","format.time","diff.seconds","diff.minutes","diff.hours","diff.days"]},vs_base_performance_timer:{path:"vs/base/performance/timer.js",keys:["startAfterStopError"]}});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/coffeescript/coffeescript",["require","exports","vs/editor/modes/autoIndentation/autoIndentation","vs/base/objects","vs/editor/modes/modes","vs/editor/modes/modesExtensions"],function(e,t,n,r,i,o){var s="+-*%&|^~!=<>/?:.,",a="+-*/%&|^~!=<>()[]\"'\\/?:.,#{}",u=" ",l=new n.Brackets([{tokenType:"delimiter.bracket.coffee",open:"{",close:"}",isElectric:!0},{tokenType:"delimiter.parenthesis.coffee",open:"(",close:")",isElectric:!0},{tokenType:"delimiter.array.coffee",open:"[",close:"]",isElectric:!0}]),c=r.createKeywordMatcher(["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"]),d=function(e){return s.indexOf(e)>-1},h=function(e){function t(t,n,r){e.call(this,t),this.name=n,this.parent=r}return __extends(t,e),t.prototype.equals=function(n){if(!e.prototype.equals.call(this,n))return!1;var r=n;return n instanceof t&&this.getMode()===r.getMode()&&this.name===r.name&&(null===this.parent&&null===r.parent||null!==this.parent&&this.parent.equals(r.parent))},t.prototype.tokenize=function(e){return e.setTokenRules(a,u),e.skipWhitespace().length>0?{type:""}:this.stateTokenize(e)},t.prototype.stateTokenize=function(){throw new Error("To be implemented")},t}(o.AbstractState),p=function(e){function t(t,n,r,i){e.call(this,t,"string",n),this.isAtBeginning=!0,this.previous=r,this.bracketStack=i}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.previous,null!==this.bracketStack?r.clone(this.bracketStack):null)},t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.previous===t.previous&&r.equals(this.bracketStack,t.bracketStack)},t.prototype.tokenize=function(e){this.isAtBeginning?1:0;return this.isAtBeginning=!1,e.advanceUntil(/^(#{|\\"|")/,!1),e.eos()||2===e.advanceIfRegExp(/^\\"/).length?{type:"string.coffee"}:2===e.advanceIfString("#{").length?(this.bracketStack.push("#{"),{type:"string.coffee",nextState:new b(this.getMode(),this,this.previous,this.bracketStack)}):e.advanceIfRegExp(/^"("")?/).length>0?(this.previous="string.coffee",{type:"string.coffee",nextState:new b(this.getMode(),this,this.previous,this.bracketStack)}):{type:"string.coffee"}},t}(h),f=function(e){function t(t,n,r){e.call(this,t,"string",n),this.isAtBeginning=!0,this.delimiter=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.delimiter)},t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.delimiter===t.delimiter},t.prototype.tokenize=function(e){var t=this.isAtBeginning?1:0;for(this.isAtBeginning=!1;!e.eos();){var n=e.next();if("\\"===n)return 0==t?e.eos()?{type:"string.escape.coffee"}:(e.next(),e.eos()?{type:"string.escape.coffee",nextState:this.parent}:{type:"string.escape.coffee"}):(e.goBack(1),{type:"string.coffee"});if(n===this.delimiter)break;t+=1}return{type:"string.coffee",nextState:this.parent}},t}(h),g=function(e){function t(t,n,r){e.call(this,t,"regexp",n),this.isAtBeginning=!0,this.previous=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.previous)},t.prototype.tokenize=function(e){if(-1!==["","bracket.open","delimiter"].indexOf(this.previous)){for(var t,n=this.isAtBeginning?1:0,r=e.pos();!e.eos();){if(t=e.next(),"/"===t)return{type:"regexp.coffee",nextState:this.parent};"\\"!==t||e.eos()||"/"!==e.peek()||e.next(),n+=1}e.goBack(e.pos()-r)}return{type:"delimiter.coffee",nextState:this.parent}},t}(h),m=function(e){function t(t,n,r,i){e.call(this,t,"regexp.multiline",n),this.previous=r,this.bracketStack=i}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.previous,null!==this.bracketStack?r.clone(this.bracketStack):null)},t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.previous===t.previous&&r.equals(this.bracketStack,t.bracketStack)},t.prototype.tokenize=function(e){for(;!e.eos();){if("#"===e.peek()&&0===e.pos())return new y(this.getMode(),this,"regexMultiline",this.bracketStack).tokenize(e);if("#"===e.peek())return this.previous="regexMultiline",{type:"regexp.coffee",nextState:new y(this.getMode(),this,this.previous,this.bracketStack)};if(3===e.advanceIfString("///").length)return{type:"regexp.coffee",nextState:new b(this.getMode(),this,this.previous,this.bracketStack)};e.next()}return{type:"regexp.coffee"}},t}(h),v=function(e){function t(t,n,r){e.call(this,t,"number",n),this.firstDigit=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.firstDigit)},t.prototype.tokenize=function(e){var t=this.firstDigit,n=10,r=!1,i=!1;if("0"===t&&!e.eos()){if(t=e.peek(),"x"===t.toLowerCase())n=16;else if("."===t)n=10;else{if(!o.isDigit(t,8))return{type:"number.coffee",nextState:this.parent};n=8}e.next()}for(;!e.eos();)if(t=e.peek(),o.isDigit(t,n))e.next();else if(10===n)if("."!==t||i||r){if("e"!==t||i)break;i=!0,e.next(),e.eos()||"-"!==e.peek()||e.next()}else{if(e.next(),e.eos()||!o.isDigit(e.peek(),n)){e.goBack(1);break}r=!0}else{if(8!==n||!o.isDigit(t,10))break;n=10,e.next()}var s="number";return 16===n?s+=".hex":8===n&&(s+=".octal"),{type:s+".coffee",nextState:this.parent}},t}(h),y=function(e){function t(t,n,r,i){e.call(this,t,"comment",n),this.previous=r,this.bracketStack=i}return __extends(t,e),t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.previous===t.previous&&r.equals(this.bracketStack,t.bracketStack)},t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.previous,null!==this.bracketStack?r.clone(this.bracketStack):null)},t.prototype.tokenize=function(e){return"regexMultiline"===this.previous?(e.advanceToEOS(),this.previous="",{type:"comment.coffee",nextState:new m(this.getMode(),this,this.previous,this.bracketStack)}):(e.advanceUntil("###",!1),{type:"comment.coffee",nextState:3===e.advanceIfString("###").length?this.parent:null})},t}(h),_=function(e){function t(t,n,r){e.call(this,t,"keyword",n),this.token=r}return __extends(t,e),t.prototype.makeClone=function(){return new g(this.getMode(),this.parent?this.parent.clone():null,this.token)},t.prototype.tokenize=function(e){return"@"===this.token[0]?(e.advanceWhile(/^[a-zA-Z0-9]/),{type:"variable.predefined.coffee",nextState:this.parent}):"this"===this.token?{type:"variable.predefined.coffee",nextState:this.parent}:{type:"keyword.coffee",nextState:this.parent}},t}(h),b=function(e){function t(t,n,r,i){e.call(this,t,"expression",n),this.previous=r,this.bracketStack=i}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.previous,null!==this.bracketStack?r.clone(this.bracketStack):null)},t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.previous===t.previous&&r.equals(this.bracketStack,t.bracketStack)},t.prototype.stateTokenize=function(e){var t;if("}"===e.peek()&&"#{"===this.bracketStack[this.bracketStack.length-1])return this.bracketStack.pop(),e.next(),t={nextState:new p(this.getMode(),this,n,this.bracketStack)},this.previous="string.nested.end",t;if(o.isDigit(e.peek(),10))return t={nextState:new v(this.getMode(),this,e.next())},this.previous="number",t;var n=e.nextToken();if(c(n)||"@"===n[0])return t={nextState:new _(this.getMode(),this,n)},this.previous="keyword",t;if("#"===n)return 2===e.advanceIfString("##").length?(t={nextState:new y(this.getMode(),this,this.previous,this.bracketStack)},this.previous="",t):(e.advanceToEOS(),this.previous="",{type:"comment.coffee"});if("/"===n)return 2===e.advanceIfString("//").length?(t={nextState:new m(this.getMode(),this,this.previous,this.bracketStack)},this.previous="regexp.multiline",t):(t={nextState:new g(this.getMode(),this,this.previous)},this.previous="regexp",t);if('"'===n)return t={nextState:new p(this.getMode(),this,n,this.bracketStack)},this.previous="string",t;if("'"===n)return t={nextState:new f(this.getMode(),this,n)},this.previous="string",t;if(l.characterIsBracket(n)){var r=l.bracketTypeFromChar(n);return"{"===n?(this.previous="bracket.open",this.bracketStack.push(n)):"}"===n?(this.previous="bracket.close",this.bracketStack.length>0&&this.bracketStack.pop()):l.characterIsBracket(n)&&(this.previous=1===r?"bracket.open":"bracket.close"),{bracket:r,type:l.tokenTypeFromChar(n)}}return d(n)?(this.previous="delimiter",{type:"delimiter.coffee"}):(this.previous="identitifer",{type:""})},t}(h),C=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),t.prototype.getInitialState=function(){return new b(this,null,"",[])},t.prototype.getNonWordTokenTypes=function(){return["delimiter.coffee","delimiter.parenthesis.coffee","delimiter.bracket.coffee","delimiter.array.coffee","regexp.coffee"]},t.prototype.getElectricCharacters=function(){return l.getElectricBrackets()},t.prototype.isIndentToken=function(e,t,n){for(var r=["for","while","loop","if","unless","else","switch","try","catch","finally","class","->"],i=e.lineTokens.length-1;i>=0;i--){if("then"===e.lineTokens[i])return!1;if(-1!==r.indexOf(e.lineTokens[i])&&n[i].startIndex+e.lineTokens[i].length<=t)return!0}return!1},t.prototype.splitLineIntoTokens=function(e,t,n){for(var r=null,i=[],o=1;o",isElectric:!1}]),d=r.createKeywordMatcher(["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","while","where","yield"]),p=function(e){return u.indexOf(e)>-1},f=function(e){function t(t,n,r){e.call(this,t),this.name=n,this.parent=r}return __extends(t,e),t.prototype.equals=function(n){if(!e.prototype.equals.call(this,n))return!1;var r=n;return n instanceof t&&this.getMode()===r.getMode()&&this.name===r.name&&(null===this.parent&&null===r.parent||null!==this.parent&&this.parent.equals(r.parent))},t.prototype.tokenize=function(e){return e.setTokenRules(l,c),e.skipWhitespace().length>0?{type:""}:this.stateTokenize(e)},t.prototype.stateTokenize=function(){throw new Error("To be implemented")},t}(o.AbstractState);t.CSState=f;var g=function(e){function t(t,n,r){e.call(this,t,"string",n),this.isAtBeginning=!0,this.delimiter=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.delimiter)},t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.delimiter===t.delimiter},t.prototype.tokenize=function(e){var t=this.isAtBeginning?1:0;for(this.isAtBeginning=!1;!e.eos();){var n=e.next();if("\\"===n)return 0===t?e.eos()?{type:"string.escape.cs"}:(e.next(),e.eos()?{type:"string.escape.cs",nextState:this.parent}:{type:"string.escape.cs"}):(e.goBack(1),{type:"string.cs"});if(n===this.delimiter)break;t+=1}return{type:"string.cs",nextState:this.parent}},t}(f),m=function(e){function t(t,n){e.call(this,t,"verbatimstring",n)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null)},t.prototype.tokenize=function(e){for(;!e.eos();){var t=e.next();if('"'===t){if(e.eos()||'"'!==e.peek())return{type:"string.cs",nextState:this.parent};e.next()}}return{type:"string.cs"}},t}(f),v=function(e){function t(t,n,r){e.call(this,t,"number",n),this.firstDigit=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.firstDigit)},t.prototype.tokenize=function(e){var t=this.firstDigit,n=10,r=!1,i=!1;if("0"===t&&!e.eos()){if(t=e.peek(),"x"===t)n=16;else{if("."!==t)return{type:"number.cs",nextState:this.parent};n=10}e.next()}for(;!e.eos();)if(t=e.peek(),o.isDigit(t,n))e.next();else{if(10!==n)break;if("."!==t||i||r){if("e"!==t.toLowerCase()||i){if("f"===t.toLowerCase()||"d"===t.toLowerCase()){e.next();break}break}i=!0,e.next(),e.eos()||"-"!==e.peek()||e.next()}else r=!0,e.next()}var s="number";return 16===n&&(s+=".hex"),{type:s+".cs",nextState:this.parent}},t}(f),y=function(e){function t(t,n,r){e.call(this,t,"comment",n),this.commentChar=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.commentChar)},t.prototype.tokenize=function(e){for(;!e.eos();){var t=e.next();if("*"===t&&!e.eos()&&!e.peekWhitespace()&&e.peek()===this.commentChar)return e.next(),{type:"comment.cs",nextState:this.parent}}return{type:"comment.cs"}},t}(f);t.CSComment=y;var _=function(e){function t(t,n,r,i,o,s){e.call(this,t,"expression",n),this.level=r,this.plevel=i,this.razorMode=o,this.expression=s,this.vsState=new a.VSXMLExpression(t,null)}return __extends(t,e),t.prototype.setVSXMLState=function(e){this.vsState=e},t.prototype.makeClone=function(){var e=new t(this.getMode(),this.parent?this.parent.clone():null,this.level,this.plevel,this.razorMode,this.expression);return null!==this.vsState&&e.setVSXMLState(this.vsState.clone()),e},t.prototype.equals=function(n){return e.prototype.equals.call(this,n)&&n instanceof t&&(null===this.vsState&&null===n.vsState||null!==this.vsState&&this.vsState.equals(n.vsState))},t.prototype.stateTokenize=function(e){if(o.isDigit(e.peek(),10))return{nextState:new v(this.getMode(),this,e.next())};var t=e.nextToken();if(this.razorMode&&"<"===t&&!e.eos()&&/[_:!\/\w]/.test(e.peek()))return{nextState:new C(this.getMode(),this,0)};if(d(t))return this.level<=0&&(this.expression=!1),{type:"keyword.cs"};if("/"===t){if(!e.eos()&&!e.peekWhitespace())switch(e.peekToken()){case"/":if(e.nextToken(),!e.eos()&&"/"===e.peekToken()){if(e.nextToken(),e.eos())return{type:"comment.vs"};if("/"!==e.peekToken())return{type:"comment.vs",nextState:new a.VSXMLEmbeddedState(this.getMode(),this.vsState,this)}}return e.advanceToEOS(),{type:"comment.cs"};case"*":return e.nextToken(),{nextState:new y(this.getMode(),this,"/")}}return{type:"delimiter.cs"}}if("@"===t&&!e.eos())switch(e.peekToken()){case'"':return e.nextToken(),{nextState:new m(this.getMode(),this)};case"*":return e.nextToken(),{nextState:new y(this.getMode(),this,"@")}}if('"'===t||"'"===t)return{nextState:new g(this.getMode(),this,t)};if(h.characterIsBracket(t)){var n={bracket:h.bracketTypeFromChar(t),type:h.tokenTypeFromChar(t)};return this.razorMode&&("{"===t&&(this.expression=!1,this.level++,1===this.level&&(n.type="meta.cshtml")),"}"===t&&(this.level--,this.level<=0&&(n.type="meta.cshtml",n.nextState=this.parent)),this.expression&&("("===t&&(this.plevel++,1===this.plevel&&(n.type="meta.cshtml")),")"===t&&(this.plevel--,this.expression&&this.plevel<=0&&(n.type="meta.cshtml",n.nextState=this.parent)))),n}return p(t)?{type:"delimiter.cs"}:this.razorMode&&this.expression&&this.plevel<=0?{type:"",nextState:this.parent}:{type:""}},t}(f);t.CSStatement=_;var b=["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],C=function(e){function t(t,n,r){e.call(this,t,"number",n),this.state=r}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null,this.state)},t.prototype.nextName=function(e){return e.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/)},t.prototype.nextAttrValue=function(e){return e.advanceIfRegExp(/^('|').*?\1/)},t.prototype.tokenize=function(e){switch(this.state){case 5:if(e.advanceUntil("-->",!1).length>0)return{type:"comment.html.content"};if(e.advanceIfString("-->").length>0)return this.state=0,{type:"comment.html",bracket:-1,nextState:this.parent};break;case 3:if(e.advanceUntil(">",!1).length>0)return{type:"meta.content.html"};if(e.advanceIfString(">").length>0)return this.state=0,{type:"meta.html",bracket:-1,nextState:this.parent};break;case 0:return e.advanceIfString("!--").length>0?(this.state=5,{type:"comment.html",bracket:1}):e.advanceIfRegExp(/!DOCTYPE/i).length>0?(this.state=3,{type:"meta.html",bracket:1}):e.advanceIfString("/").length>0?(this.state=2,{type:"delimiter.end.html",bracket:1}):(this.state=1,{type:"delimiter.start.html",bracket:1});case 2:var t=this.nextName(e);return t.length>0?{type:"tag.html.tag-"+t,bracket:-1!==b.indexOf(t)?-1:-1}:e.advanceIfString(">").length>0?(this.state=0,{type:"delimiter.end.html",bracket:-1,nextState:this.parent}):(e.advanceUntil(">",!1),{type:""});case 1:var t=this.nextName(e);if(t.length>0)return this.state=4,{type:"tag.html.tag-"+t,bracket:-1!==b.indexOf(t)?-1:1};break;case 4:if(e.skipWhitespace().length>0)return{type:""};var n=this.nextName(e);return n.length>0?(this.state=7,{type:"attribute.name.html"}):e.advanceIfRegExp(/^\/?>/).length>0?(this.state=0,{type:"delimiter.start.html",bracket:-1,nextState:this.parent}):(e.next(),{type:""});case 7:return e.skipWhitespace().length>0||e.eos()?{type:""}:"="===e.peek()?(e.next(),this.state=8,{type:""}):(this.state=4,this.tokenize(e));case 8:if(e.skipWhitespace().length>0||e.eos())return{type:""};var r=this.nextAttrValue(e);return r.length>0?(this.state=4,{type:"attribute.value.html"}):(this.state=4,this.tokenize(e))}return e.next(),this.state=0,{type:"",nextState:this.parent}},t}(f),w=function(e){function t(t,n){e.call(this,t,n)}return __extends(t,e),t.prototype.getInitialState=function(){return new _(this,null,0,0,!1,!1)},t.prototype.getNonWordTokenTypes=function(){return["delimiter.cs","delimiter.parenthesis.cs","delimiter.bracket.cs","delimiter.array.cs"]},t.prototype.getElectricCharacters=function(){return h.getElectricBrackets()},t.prototype.getAutoClosingPairs=function(){return[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'",close:"'"}]},t.prototype.onEnterImpl=function(e,t,n){return h.onEnter(e,t,n)},t.prototype.onElectricCharacterImpl=function(e,t,n){return h.onElectricCharacter(e,t,n)},t.prototype.getCommentsConfiguration=function(){return{lineCommentTokens:["//"],blockCommentStartToken:"/*",blockCommentEndToken:"*/"}},t}(o.AbstractMode);t.CSMode=w});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/csharp/csharp.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/csharp/csharp.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/css/services/browsers",["require","exports"],function(e,r){"use strict";function t(){if(!s){s={};for(var e=0,r=h.length;r>e;e++){var t=h[e];s[t.name]=new l(t)}}return s}var n={css:{atdirectives:[{name:"@bottom-center",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-width box within the area defined by the bottom margin, centered on the page area, and between the bottom-left and bottom-right margin boxes."},{name:"@bottom-left",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-width box within the area defined by the bottom margin and adjoining the bottom-left-corner margin box."},{name:"@bottom-left-corner",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A box filling the area defined by the intersection of the bottom and left margins of the page box."},{name:"@bottom-right",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-width box within the area defined by the bottom margin and adjoining the bottom-right corner margin box."},{name:"@bottom-right-corner",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A box filling the area defined by the intersection of the bottom and right margins of the page box."},{name:"@charset",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-syntax/#charset",syntax:"@charset 'utf-8';",desc:"Defines character set of the document."},{name:"@counter",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#counter0",syntax:"@counter footnote { list-style-type: super-decimal; }",desc:"Authors may use @counter declaration blocks and the 'page-policy' property, which applies only to strings and counters."},{name:"@font-face",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#the-font-face-rule",syntax:"@font-face { }",desc:"Allows for linking to fonts that are automatically activated when needed. This permits authors to work around the limitation of 'web-safe' fonts, allowing for consistent rendering independent of the fonts available in a given user's environment."},{name:"@import",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-syntax/#at-import",syntax:"@import url('file.css') tv, print;",desc:"Includes content of another file."},{name:"@keyframes",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#keyframes",syntax:"@keyframes animation-name",desc:"Defines set of animation key frames."},{name:"@left-bottom",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-height box within the area defined by the left margin and adjacent to the top of the bottom-left-corner."},{name:"@left-middle",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-height box in the area defined by the left margin, centered on the page area, and between the left-top and left-bottom margin boxes."},{name:"@left-top",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-height box within the area defined by the left margin and adjacent to the bottom of the top-left-corner."},{name:"@media",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-mediaqueries",syntax:"@media print { ... }",desc:"Defines a stylesheet for a particular media type."},{name:"@-moz-document",version:"3.0",browsers:"FF1.8",ref:"https://developer.mozilla.org/en/CSS/@document",desc:"The @-moz-document rule is a Gecko-specific at-rule that restricts the style rules contained within it based on the URL of the document."},{name:"@-moz-keyframes",version:"3.0",browsers:"FF5",ref:"https://developer.mozilla.org/en/CSS/@keyframes",syntax:"@-moz-keyframes animation-name",desc:"Defines set of animation key frames."},{name:"@-ms-viewport",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh868813.aspx",syntax:"@$(name) { width: device-width; }"},{name:"@namespace",version:"3.0",browsers:"C,FF1,IE9,O8,S1",ref:"http://www.w3.org/TR/css3-namespace/#declaration",syntax:"@namespace [prefix] string|url;",desc:"Declares a prefix and associates it with a namespace name."},{name:"@-o-keyframes",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#keyframes",syntax:"@-o-keyframes animation-name { }"},{name:"@-o-viewport",version:"3.0",browsers:"O11",ref:"http://dev.w3.org/csswg/css-device-adapt/#the-viewport-rule",syntax:"@$(name) { width: 320px; zoom: 0.5; }",desc:"Sets the viewport properties in Opera Mobile 11 and newer."},{name:"@page",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-page/#page-box-page-rule",syntax:"@page",desc:"Directive defines various page parameters."},{name:"@right-bottom",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-height box within the area defined by the right margin and adjacent to the top of the bottom-right-corner."},{name:"@right-middle",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-height box in the area defined by the right margin, centered on the page area, and between the right-top and right-bottom margin boxes."},{name:"@right-top",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-height box within the area defined by the right margin and adjacent to the bottom of the top-right-corner."},{name:"@string",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#string",syntax:"@string chapter { page-policy: last; }",desc:"Authors may use @string declaration blocks and the 'page-policy' property, which applies only to strings and counters."},{name:"@top-center",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-width box within the area defined by the top margin, centered on the page area, and between the top-left and top-right margin boxes."},{name:"@top-left",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-width box within the area defined by the top margin and adjoining the top-left-corner margin box."},{name:"@top-left-corner",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A fixed-size box filling the area defined by the intersection of the top and left margins of the page box."},{name:"@top-right",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A variable-width box within the area defined by the top margin and adjoining the top-right-corner margin box."},{name:"@top-right-corner",version:"3",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page-box",desc:"A box filling the area defined by the intersection of the top and right margins of the page box."},{name:"@-webkit-keyframes",version:"3.0",browsers:"C,S4",ref:"http://www.w3.org/TR/css3-animations/#keyframes",syntax:"@-webkit-keyframes animation-name",desc:"Defines set of animation key frames."},{name:"@-we-palette",version:"",browsers:"none",syntax:"@-we-palette",desc:"Parent directive for handling custom color palettes in Visual Studio."}],pseudoclasses:[{name:":active",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-selectors/#the-user-action-pseudo-classes-hover-act",syntax:"a:active { color: red; }",desc:"The :active pseudo-class applies while an element is being activated by the user. For example, between the times the user presses the mouse button and releases it."},{name:":after",version:"2.0",browsers:"C,FF1,IE8,O8,S1",ref:"http://www.w3.org/TR/css3-content/#inserting",syntax:"div:after { content: 'abc'; }",desc:"Pseudo-element is used to insert content immediately after the content of an element (or other pseudo-element). The 'content' property is used to specify the content to insert."},{name:":before",version:"2.0",browsers:"C,FF1,IE8,O8,S1",ref:"http://www.w3.org/TR/css3-content/#inserting",syntax:"div:before { content: 'abc'; }",desc:"Pseudo-element is used to insert content immediately before the content of an element (or other pseudo-element). The 'content' property is used to specify the content to insert."},{name:":checked",version:"3.0",browsers:"C,FF1,IE9,O9,S3.13",ref:"http://www.w3.org/TR/css3-selectors/#checked",syntax:"input:checked { color: red; }",desc:"Radio and checkbox elements can be toggled by the user. Some menu items are 'checked' when the user selects them. When such elements are toggled 'on' the :checked pseudo-class applies."},{name:":corner-present",version:"3.0",browsers:"C,S5"},{name:":decrement",version:"3.0",browsers:"C,S5"},{name:":default",version:"3.0",browsers:"C,FF3,IE10,O10,S5",ref:"http://www.w3.org/TR/css3-ui/#pseudo-default",syntax:"input:default { color: red; }",desc:"The :default selector applies to the one or more UI elements that are the default among a set of similar elements. This selector typically applies to context menu items, buttons, and select lists/menus."},{name:":disabled",version:"3.0",browsers:"C,FF1.5,IE9,O9,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#enableddisabled",syntax:"input:disabled { background-color: silver; }",desc:"The :disabled pseudo-class represents user interface elements that are in a disabled state; such elements have a corresponding enabled state."},{name:":double-button",version:"3.0",browsers:"C,S5"},{name:":empty",version:"3.0",browsers:"C,FF1.5,IE9,O9,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#empty-pseudo",syntax:"div:empty { background-color: red; }",desc:"The :empty pseudo-class represents an element that has no children at all."},{name:":enabled",version:"3.0",browsers:"C,FF1.5,IE9,O9,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#enableddisabled",syntax:"input:enabled { background-color: green; }",desc:"The :enabled pseudo-class represents user interface elements that are in an enabled state; such elements have a corresponding disabled state."},{name:":end",version:"3.0",browsers:"C,S5"},{name:":first",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-page/#left-right-first",syntax:"@page :first { margin-left: 4cm; }",desc:"When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."},{name:":first-child",version:"2.0",browsers:"C,FF3,IE7,O9.5,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#first-child-pseudo",syntax:"li:first-child { font-size: 1.2em; }",desc:"Same as :nth-child(1). The :first-child pseudo-class represents an element that is the first child of some other element."},{name:":first-letter",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-selectors/#first-letter",syntax:"p:first-letter { font-size: 200%; }",desc:"The :first-letter pseudo-element represents the first letter of an element, if it is not preceded by any other content (such as images or inline tables) on its line."},{name:":first-line",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-selectors/#first-line",syntax:"p:first-line { color: green; }",desc:"The :first-line pseudo-element describes the contents of the first formatted line of an element."},{name:":first-of-type",version:"3.0",browsers:"C,FF3.5,IE9,O9.5,S3.2",ref:"http://www.w3.org/TR/css3-selectors/#first-of-type-pseudo",syntax:"dl dt:first-of-type { font-size: 200%; }",desc:"Same as :nth-of-type(1). The :first-of-type pseudo-class represents an element that is the first sibling of its type in the list of children of its parent element."},{name:":focus",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-selectors/#the-user-action-pseudo-classes-hover-act",syntax:"a:focus { color: yellow; }",desc:"The :focus pseudo-class applies while an element has the focus (accepts keyboard or mouse events, or other forms of input)."},{name:":horizontal",version:"3.0",browsers:"C,S5"},{name:":hover",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-selectors/#the-user-action-pseudo-classes-hover-act",syntax:"a:hover { text-decoration: none; }",desc:"The :hover pseudo-class applies while the user designates an element with a pointing device, but does not necessarily activate it. For example, a visual user agent could apply this pseudo-class when the cursor (mouse pointer) hovers over a box generated by the element."},{name:":increment",version:"3.0",browsers:"C,S5"},{name:":indeterminate",version:"3.0",browsers:"C,FF3.6,IE9,O10.6,S3",ref:"http://www.w3.org/TR/css3-ui/#indeterminate",syntax:"input:indeterminate { margin: auto 2px; }",desc:"The :indeterminate pseudo-class applies to UI elements whose value is in an indeterminate state."},{name:":in-range",version:"3.0",browsers:"C,FF10,IE10,O9.6,S5.1",ref:"http://www.w3.org/TR/css3-ui/#in-range",syntax:"input:in-range { color: green; }",desc:"The in-range and out-of-range pseudo-classes should be used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes."},{name:":invalid",version:"3.0",browsers:"C,FF4,IE10,O10,S5",ref:"http://www.w3.org/TR/css3-ui/",syntax:"input:invalid { border-color: red; }",desc:"An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification."},{name:":lang(en)",version:"2.0",browsers:"C,FF1,IE8,O8,S3",ref:"http://www.w3.org/TR/css3-selectors/#lang-pseudo",syntax:"html:lang(en) { color: blue; }",desc:"The pseudo-class :lang(C) represents an element that is in language C."},{name:":last-child",version:"3.0",browsers:"C,FF1,IE9,O9.5,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#last-child-pseudo",syntax:"li:last-child { font-size: 1.2em; }",desc:"Same as :nth-last-child(1). The :last-child pseudo-class represents an element that is the last child of some other element."},{name:":last-of-type",version:"3.0",browsers:"C,FF3.5,IE9,O9.5,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#last-of-type-pseudo",syntax:"dl dt:last-of-type { font-size: 200%; }",desc:"Same as :nth-last-of-type(1). The :last-of-type pseudo-class represents an element that is the last sibling of its type in the list of children of its parent element."},{name:":left",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-page/#left-right-first",syntax:"@page :left { margin-left: 4cm; }",desc:"When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."},{name:":link",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-selectors/#the-link-pseudo-classes-link-and-visited",syntax:"a:link { text-decoration: none; }",desc:"The :link pseudo-class applies to links that have not yet been visited."},{name:":-moz-any",version:"3.0",browsers:"FF4"},{name:":-moz-any-link",version:"3.0",browsers:"FF1"},{name:":-moz-broken",version:"3.0",browsers:"FF3"},{name:":-moz-drag-over",version:"3.0",browsers:"FF1"},{name:":-moz-first-node",version:"3.0",browsers:"FF1"},{name:":-moz-focusring",version:"3.0",browsers:"FF4"},{name:":-moz-last-node",version:"3.0",browsers:"FF1"},{name:":-moz-loading",version:"3.0",browsers:"FF3"},{name:":-moz-only-whitespace",version:"3.0",browsers:"FF1.5"},{name:":-moz-placeholder",version:"3.0",browsers:"FF4"},{name:":-moz-submit-invalid",version:"3.0",browsers:"FF4"},{name:":-moz-suppressed",version:"3.0",browsers:"FF3"},{name:":-moz-ui-invalid",version:"3.0",browsers:"FF4"},{name:":-moz-ui-valid",version:"3.0",browsers:"FF4"},{name:":-moz-user-disabled",version:"3.0",browsers:"FF3"},{name:":-moz-window-inactive",version:"3.0",browsers:"FF4"},{name:":-ms-input-placeholder",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh767367.aspx",syntax:"input:-ms-input-placeholder { color: red; }"},{name:":-ms-keyboard-active",version:"3.0",browsers:"IE10",ref:"#NoOnlineDocs",syntax:"input:-ms-keyboard-active { background: red; }"},{name:":-ms-lang(en)",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-selectors/#lang-pseudo",syntax:"html:-ms-lang(en) { color: blue; }",desc:"The pseudo-class :-ms-lang(C) represents an element that is in language C."},{name:":no-button",version:"3.0",browsers:"C,S5"},{name:":not(:empty)",version:"3.0",browsers:"C,FF1,IE9,O9.5,S2",ref:"http://www.w3.org/TR/css3-selectors/#negation",syntax:"div:not(:empty) { border-color: pink; }",desc:"The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself) as an argument. It represents an element that is not represented by its argument."},{name:":nth-child(2n+1)",version:"3.0",browsers:"C,FF3.5,IE9,O9.5,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#nth-child-pseudo",syntax:"tr:nth-child(2n+1) { border-color: pink; }",desc:"The :nth-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element."},{name:":nth-last-child(-n+2)",version:"3.0",browsers:"C,FF3.5,IE9,O9.5,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#nth-last-child-pseudo",syntax:"tr:nth-last-child(-n+2) { border-color: pink; }",desc:"The :nth-last-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n, and has a parent element."},{name:":nth-last-of-type(n+2)",version:"3.0",browsers:"C,FF3.5,IE9,O9.5,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#nth-of-type-pseudo",syntax:"tr:nth-last-of-type(n+2) { border-color: pink; }",desc:"The :nth-last-of-type(an+b) pseudo-class notation represents an element that has an+b-1 siblings with the same expanded element name after it in the document tree, for any zero or positive integer value of n, and has a parent element."},{name:":nth-of-type(2n+1)",version:"3.0",browsers:"C,FF3.5,IE9,O9.5,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#nth-of-type-pseudo",syntax:"tr:nth-of-type(2n) { border-color: pink; }",desc:"The :nth-of-type(an+b) pseudo-class notation represents an element that has an+b-1 siblings with the same expanded element name before it in the document tree, for any zero or positive integer value of n, and has a parent element."},{name:":only-child",version:"3.0",browsers:"C,FF1.5,IE9,O9.5,S3.1",ref:"http://www.w3.org/TR/css3-selectors/#only-child-pseudo",syntax:"p:only-child { color: #f00; }",desc:"Represents an element that has a parent element and whose parent element has no other element children. Same as :first-child:last-child or :nth-child(1):nth-last-child(1), but with a lower specificity."},{name:":only-of-type",version:"3.0",browsers:"C,FF3.5,IE9,O9.5,S3.2",ref:"http://www.w3.org/TR/css3-selectors/#only-of-type-pseudo",syntax:"p:only-of-type { color: #f00; }",desc:"The :only-of-type selector matches every element that is the only child of its type, of its parent. Same as :first-of-type:last-of-type or :nth-of-type(1):nth-last-of-type(1), but with a lower specificity."},{name:":optional",version:"3.0",browsers:"C,FF4,IE10,O10,S5",ref:"http://www.w3.org/TR/css3-ui/",syntax:"input:optional { color: yellow; }",desc:"A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional."},{name:":out-of-range",version:"3.0",browsers:"C,FF10,IE10,O9.6,S5.1",ref:"http://www.w3.org/TR/css3-ui/#out-of-range",syntax:"input:out-of-range { color: red; }",desc:"The in-range and out-of-range pseudo-classes should be used in conjunction with the min and max attributes, whether on a range input, a number field, or any other types that accept those attributes."},{name:":read-only",version:"3.0",browsers:"C,FF10,IE10,O9,S4",ref:"http://www.w3.org/TR/css3-ui/",syntax:"input:read-only { margin: auto; }",desc:"An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only."},{name:":read-write",version:"3.0",browsers:"C,FF10,IE10,O9,S4",ref:"http://www.w3.org/TR/css3-ui/",syntax:"input:read-write { margin: auto 2px; }",desc:"An element whose contents are not user-alterable is :read-only. However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents, most elements are :read-only."},{name:":required",version:"3.0",browsers:"C,FF4,IE10,O10,S5",ref:"http://www.w3.org/TR/css3-ui/",syntax:"input:optional { color: yellow; }",desc:"A form element is :required or :optional if a value for it is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional."},{name:":right",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-page/#left-right-first",syntax:"@page :right { margin-left: 4cm; }",desc:"When printing double-sided documents, the page boxes on left and right pages may be different. This can be expressed through CSS pseudo-classes defined in the page context."},{name:":root",version:"3.0",browsers:"C,FF1,IE9,O9.5,S1",ref:"http://www.w3.org/TR/css3-selectors/#root-pseudo",syntax:":root { padding: auto 3em; }",desc:"The :root pseudo-class represents an element that is the root of the document. In HTML 4, this is always the HTML element."},{name:":single-button",version:"3.0",browsers:"C,S5"},{name:":start",version:"3.0",browsers:"C,S5"},{name:":target",version:"3.0",browsers:"C,FF1,IE9,O9.5,S1",ref:"http://www.w3.org/TR/css3-selectors/#root-pseudo",syntax:"h2:target { background-color: yellow; }",desc:"Some URIs refer to a location within a resource. This kind of URI ends with a 'number sign' (#) followed by an anchor identifier (called the fragment identifier)."},{name:":valid",version:"3.0",browsers:"C,FF4,IE10,O10,S5",ref:"http://www.w3.org/TR/css3-ui/",syntax:"input:valid { border-color: green; }",desc:"An element is :valid or :invalid when it is, respectively, valid or invalid with respect to data validity semantics defined by a different specification."},{name:":vertical",version:"3.0",browsers:"C,S5"},{name:":visited",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-selectors/#the-link-pseudo-classes-link-and-visited",syntax:"a:visited { color: purple; }",desc:"The :visited pseudo-class applies once the link has been visited by the user."},{name:":window-inactive",version:"3.0",browsers:"C,S3"}],pseudoelements:[{name:"::after",version:"3.0",browsers:"C,FF1.5,IE10,O7,S4",ref:"http://www.w3.org/TR/css3-content/#inserting",syntax:"div::after { content: 'abc'; }",desc:"Pseudo-element is used to insert content immediately after the content of an element (or other pseudo-element). The 'content' property is used to specify the content to insert."},{name:"::after(2)",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#inserting",syntax:"span::after(2) { content: 'B'; }",desc:"Pseudo-element is used to insert content immediately after the content of an element (or other pseudo-element). The number parameter is used when multiple '::after()' functions are used in conjunction. The 'content' property is used to specify the content to insert."},{name:"::alternate",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#inserting1",syntax:"span::after::alternate { content: 'alternate2'; move-to: example; }",desc:"This pseudo-element is created by setting its 'move-to' property to an identifier. It is rendered at the next occurrence of 'pending()' in a 'content' property."},{name:"::before",version:"3.0",browsers:"C,FF1.5,IE10,O8,S1",ref:"http://www.w3.org/TR/css3-content/#inserting",syntax:"div::before { content: 'abc'; }",desc:"Pseudo-element is used to insert content immediately before the content of an element (or other pseudo-element). The 'content' property is used to specify the content to insert."},{name:"::before(2)",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#inserting",syntax:"span::before(2) { content: 'B'; }",desc:"Pseudo-element is used to insert content immediately before the content of an element (or other pseudo-element). The number parameter is used when multiple '::before()' functions are used in conjunction. The 'content' property is used to specify the content to insert."},{name:"::first-letter",version:"3.0",browsers:"C,FF1.5,IE10,O7,S1",ref:"http://www.w3.org/TR/css3-selectors/#first-letter",syntax:"p::first-letter { font-size: 200%; }",desc:"The ::first-letter pseudo-element represents the first letter of an element, if it is not preceded by any other content (such as images or inline tables) on its line."},{name:"::first-line",version:"3.0",browsers:"C,FF1.5,IE10,O7,S1",ref:"http://www.w3.org/TR/css3-selectors/#first-line",syntax:"p::first-line { color: green; }",desc:"The ::first-line pseudo-element describes the contents of the first formatted line of an element."},{name:"::line-marker",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#block",syntax:"pre::line-marker { width: 2em; }",desc:"The '::line-marker' pseudo-element is positioned in exactly the same way as the '::marker' pseudo-element, but appears on every line, not just the first."},{name:"::marker",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#block",syntax:"li::marker { content: counter(item, decimal) '.'; }",desc:"For a '::marker' pseudo-element to be generated, its superior parent must have a computed 'display' value of 'list-item'."},{name:"::-moz-focus-inner",version:"3.0",browsers:"FF4"},{name:"::-moz-list-bullet",version:"3.0",browsers:"FF1"},{name:"::-moz-list-number",version:"3.0",browsers:"FF1"},{name:"::-moz-placeholder",version:"3.0",browsers:"FF4"},{name:"::-moz-selection",version:"3.0",browsers:"FF1"},{name:"::-ms-browse",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh779844.aspx",desc:"Applies one or more styles to the browse button of an input type=file control."},{name:"::-ms-check",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465739.aspx",desc:"Applies one or more styles to the check of a checkbox or radio button input control."},{name:"::-ms-clear",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465740.aspx",desc:"Applies one or more styles to the entry area of a text input control when it contains no content."},{name:"::-ms-expand",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465742.aspx",desc:"Applies one or more styles to the drop-down button of a select control."},{name:"::-ms-fill",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465757.aspx",desc:"Applies one or more styles to the bar portion of a progress bar."},{name:"::-ms-fill-lower",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465745.aspx",desc:"Applies one or more styles to portion of the slider track from its smallest value up to the value currently selected by the thumb. In a left-to-right layout, this is the portion of the slider track to the left of the thumb."},{name:"::-ms-fill-upper",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465748.aspx",desc:"Applies one or more styles to portion of the slider track from the value currently selected by the thumb up to the slider's largest value. In a left-to-right layout, this is the portion of the slider track to the right of the thumb."},{name:"::-ms-reveal",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465773.aspx",desc:"Applies one or more styles to the password reveal button of an input type=password control."},{name:"::-ms-thumb",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465780.aspx",desc:"Applies one or more styles to portion of the range input control (also known as a slider control) that the user drags."},{name:"::-ms-ticks-after",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465789.aspx",desc:"Applies one or more styles to the tick marks of a slider that begin just after the thumb and continue up to the slider's largest value. In a left-to-right layout, these are the ticks to the right of the thumb."},{name:"::-ms-ticks-before",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465796.aspx",desc:"Applies one or more styles to the tick marks of a slider that represent its smallest values up to the value currently selected by the thumb. In a left-to-right layout, these are the ticks to the left of the thumb."},{name:"::-ms-tooltip",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465805.aspx",desc:"Applies one or more styles to the tooltip of a slider (input type=range)."},{name:"::-ms-track",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465813.aspx",desc:"Applies one or more styles to track of a slider."},{name:"::-ms-value",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh465820.aspx",desc:"Applies one or more styles to the content of a text or password input control, or a select control."},{name:"::outside",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#wrapping",syntax:"span::outside::before { content: 'A'; }",desc:"An '::outside' pseudo-element is one that is generated immediately outside the pseudo-element's superior."},{name:"::outside(2)",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#wrapping",syntax:"span::outside(1)::before { content: 'A'; }",desc:"An '::outside' pseudo-element is one that is generated immediately outside the pseudo-element's superior. When given a parameter, '::outside(n)' represents an nth pseudo-element generated immediately around the n-1th pseudo-element."},{name:"::selection",version:"3.0",browsers:"C,FF4,IE9,O9.5,S1.1",ref:"http://www.w3.org/TR/css3-selectors/#selection",syntax:"p::selection { color: red; }",desc:"The ::selection selector matches the portion of an element that is selected by a user. Only a few CSS properties can be applied to ::selection: color, background, cursor, and outline."},{name:"::-webkit-input-placeholder",version:"3.0",browsers:"C,S4"},{name:"::-webkit-resizer",version:"3.0",browsers:"C,S5"},{name:"::-webkit-scrollbar",version:"3.0",browsers:"C,S5"},{name:"::-webkit-scrollbar-button",version:"3.0",browsers:"C,S5"},{name:"::-webkit-scrollbar-corner",version:"3.0",browsers:"C,S5"},{name:"::-webkit-scrollbar-thumb",version:"3.0",browsers:"C,S5"},{name:"::-webkit-scrollbar-track",version:"3.0",browsers:"C,S5"},{name:"::-webkit-scrollbar-track-piece",version:"3.0",browsers:"C,S5"},{name:"::-webkit-search-cancel-button",version:"3.0",browsers:"C,S4"},{name:"::-webkit-search-decoration",version:"3.0",browsers:"C,S4"},{name:"::-webkit-search-results-button",version:"3.0",browsers:"C,S4"},{name:"::-webkit-search-results-decoration",version:"3.0",browsers:"C,S4"}],properties:[{name:"align-content",restriction:"enum",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#align-content",syntax:"p { $(name): flex-start; }",desc:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",values:[{name:"center",version:"3.0",browsers:"all"},{name:"flex-end",version:"3.0",browsers:"all"},{name:"flex-start",version:"3.0",browsers:"all"},{name:"space-around",version:"3.0",browsers:"all"},{name:"space-between",version:"3.0",browsers:"all"},{name:"stretch",version:"3.0",browsers:"all"}]},{name:"align-items",restriction:"enum",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#align-items",syntax:"p { $(name): flex-start; }",desc:"Flex items can be aligned in the cross axis of the current line of the flex container, similar to 'justify-content' but in the perpendicular direction.",values:[{name:"baseline",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"flex-end",version:"3.0",browsers:"all"},{name:"flex-start",version:"3.0",browsers:"all"},{name:"stretch",version:"3.0",browsers:"all"}]},{name:"align-self",restriction:"enum",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#align-items",syntax:"p { $(name): flex-start; }",desc:"Flex items can be aligned in the cross axis of the current line of the flex container, similar to 'justify-content' but in the perpendicular direction.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"baseline",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"flex-end",version:"3.0",browsers:"all"},{name:"flex-start",version:"3.0",browsers:"all"},{name:"stretch",version:"3.0",browsers:"all"}]},{name:"animation",restriction:"time, enum, identifier, number",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#animation",syntax:"div { $(name): movearound 4s ease 3 normal; }",desc:"Shorthand property combines six of the animation properties into a single property.",values:[{name:"alternate",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",version:"3.0",browsers:"all",desc:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",version:"3.0",browsers:"all",desc:"Both forwards and backwards fill modes are applied."},{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"forwards",version:"3.0",browsers:"all",desc:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",version:"3.0",browsers:"all",desc:"Causes the animation to repeat forever."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"none",version:"3.0",browsers:"all",desc:"No animation is performed"},{name:"normal",version:"3.0",browsers:"all",desc:"Normal playback."},{name:"reverse",version:"3.0",browsers:"all",desc:"All iterations of the animation are played in the reverse direction from the way they were specified."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"animation-delay",restriction:"time",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#animation-delay",syntax:"div { $(name): 4s; }",desc:"Defines when the animation will start. An 'animation-delay' value of '0' means the animation will execute as soon as it is applied. Otherwise, the value specifies an offset from the moment the animation is applied, and the animation will delay execution by that offset."},{name:"animation-direction",restriction:"enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#animation-direction",syntax:"div { $(name): normal; }",desc:"Defines whether or not the animation should play in reverse on alternate cycles.",values:[{name:"alternate",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"normal",version:"3.0",browsers:"all",desc:"Normal playback."},{name:"reverse",version:"3.0",browsers:"all",desc:"All iterations of the animation are played in the reverse direction from the way they were specified."}]},{name:"animation-duration",restriction:"time",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#animation-duration",syntax:"div { $(name): 4s; }",desc:"Defines the length of time that an animation takes to complete one cycle."},{name:"animation-fill-mode",restriction:"enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#animation-fill-mode-property",syntax:"div { $(name): forwards; }",desc:"Defines what values are applied by the animation outside the time it is executing.",values:[{name:"backwards",version:"3.0",browsers:"all",desc:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",version:"3.0",browsers:"all",desc:"Both forwards and backwards fill modes are applied."},{name:"forwards",version:"3.0",browsers:"all",desc:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"none",version:"3.0",browsers:"all",desc:"There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."}]},{name:"animation-iteration-count",restriction:"number",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#animation-iteration-count",syntax:"div { $(name): 3; }",desc:"Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",values:{value:{name:"infinite",version:"3.0",browsers:"all",desc:"Causes the animation to repeat forever."}}},{name:"animation-name",restriction:"identifier",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#the-animation-name-property-",syntax:"div { $(name): movearound; }",desc:"Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No animation is performed"}}},{name:"animation-play-state",restriction:"enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#animation-play-state",syntax:"div { $(name): running; }",desc:"Defines whether the animation is running or paused.",values:[{name:"paused",version:"3.0",browsers:"all",desc:"A running animation will be paused."},{name:"running",version:"3.0",browsers:"all",desc:"Resume playback of a paused animation."}]},{name:"animation-timing-function",restriction:"enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-animations/#animation-timing-function",syntax:"div { $(name): ease; }",desc:"Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",values:[{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"azimuth",restriction:"angle",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/2007/CR-CSS21-20070719/aural.html#propdef-azimuth",syntax:" | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",desc:"Sound spatial information",values:[{name:"behind",version:"2.0",browsers:"all"},{name:"center",version:"2.0",browsers:"all",desc:"Same as '0deg'. With 'behind', '180deg'."},{name:"center-left",version:"2.0",browsers:"all",desc:"Same as '340deg'. With 'behind', '200deg'."},{name:"center-right",version:"2.0",browsers:"all",desc:"Same as '20deg'. With 'behind', '160deg'."},{name:"far-left",version:"2.0",browsers:"all",desc:"Same as '300deg'. With 'behind', '240deg'."},{name:"far-right",version:"2.0",browsers:"all",desc:"Same as '60deg'. With 'behind', '120deg'."},{name:"left",version:"2.0",browsers:"all",desc:"Same as '320deg'. With 'behind', '220deg'"},{name:"left-side",version:"2.0",browsers:"all",desc:"Same as '270deg'. With 'behind', '270deg'."},{name:"leftwards",version:"2.0",browsers:"all",desc:"Moves the sound to the left, relative to the current angle. More precisely, subtracts 20 degrees."},{name:"right",version:"2.0",browsers:"all",desc:"Same as '40deg'. With 'behind', '140deg'."},{name:"right-side",version:"2.0",browsers:"all",desc:"Same as '90deg'. With 'behind', '90deg'."},{name:"rightwards",version:"2.0",browsers:"all",desc:"Moves the sound to the right, relative to the current angle. More precisely, adds 20 degrees."}]},{name:"backface-visibility",restriction:"enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-3d-transforms/#backface-visibility",syntax:"div { $(name): hidden; }",desc:"Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",values:[{name:"hidden",version:"3.0",browsers:"all"},{name:"visible",version:"3.0",browsers:"all"}]},{name:"background",restriction:"enum, color, length, percentage, url",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#background",syntax:"section { $(name): url(image.png) no-repeat #999; }",desc:"Background of an element",values:[{name:"border-box",version:"1.0",browsers:"all",desc:"The background is painted within (clipped to) the border box."},{name:"bottom",version:"1.0",browsers:"all",desc:"Equivalent to '100%' for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset."},{name:"center",version:"1.0",browsers:"all",desc:"Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."},{name:"content-box",version:"1.0",browsers:"all",desc:"The background is painted within (clipped to) the content box."},{name:"fixed",version:"1.0",browsers:"all",desc:"The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."},{name:"left",version:"1.0",browsers:"all",desc:"Equivalent to '0%' for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset."},{name:"linear-gradient()",version:"3.0",browsers:"FF16,IE10,O12.5"},{name:"local",version:"3.0",browsers:"all",desc:"The background is fixed with regard to the element's contents: if the element has a scrolling mechanism, the background scrolls with the element's contents."},{name:"-moz-element(#id)",version:"3.0",browsers:"FF3.6"},{name:"-moz-linear-gradient()",version:"3.0",browsers:"FF3.6"},{name:"-moz-radial-gradient()",version:"3.0",browsers:"FF3.6"},{name:"-moz-repeating-linear-gradient()",version:"3.0",browsers:"FF10"},{name:"-moz-repeating-radial-gradient()",version:"3.0",browsers:"FF10"},{name:"none",version:"1.0",browsers:"all",desc:"A value of 'none' counts as an image layer but draws nothing."},{name:"no-repeat",version:"1.0",browsers:"all",desc:"The image is placed once and not repeated in this direction."},{name:"-o-linear-gradient()",version:"3.0",browsers:"O11.1-12"},{name:"-o-repeating-linear-gradient()",version:"3.0",browsers:"O11.1-12"},{name:"padding-box",version:"1.0",browsers:"all",desc:"The background is painted within (clipped to) the padding box"},{name:"radial-gradient()",version:"3.0",browsers:"FF16,IE10,O12.5"},{name:"repeat",version:"1.0",browsers:"all",desc:"The image is repeated in this direction as often as needed to cover the background painting area."},{name:"repeating-linear-gradient()",version:"3.0",browsers:"FF16,IE10,O12.5"},{name:"repeating-radial-gradient()",version:"3.0",browsers:"FF16,IE10,O12.5"},{name:"repeat-x",version:"1.0",browsers:"all",desc:"Equivalent to 'repeat no-repeat'."},{name:"repeat-y",version:"1.0",browsers:"all",desc:"Equivalent to 'no-repeat repeat'."},{name:"right",version:"1.0",browsers:"all",desc:"Equivalent to '100%' for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset."},{name:"round",version:"3.0",browsers:"all",desc:"The image is repeated as often as will fit within the background positioning area. If it doesn't fit a whole number of times, it is rescaled so that it does."},{name:"scroll",version:"1.0",browsers:"all",desc:"The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element's border.)"},{name:"space",version:"3.0",browsers:"all",desc:"The image is repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area. The first and last images touch the edges of the area."},{name:"top",version:"1.0",browsers:"all",desc:"Equivalent to '0%' for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},{name:"url()",version:"1.0",browsers:"all"},{name:"-webkit-gradient()",version:"3.0",browsers:"C,S4"},{name:"-webkit-image-set()",version:"3.0",browsers:"C,S6"},{name:"-webkit-linear-gradient()",version:"3.0",browsers:"C,S5.1"},{name:"-webkit-radial-gradient()",version:"3.0",browsers:"C,S5.1"},{name:"-webkit-repeating-linear-gradient()",version:"3.0",browsers:"C,S5.1"},{name:"-webkit-repeating-radial-gradient()",version:"3.0",browsers:"C,S5.1"}]},{name:"background-attachment",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#the-background-attachment",syntax:".box { $(name): fixed; }",desc:"If background images are specified, this property specifies whether they are fixed with regard to the viewport ('fixed') or scroll along with the element ('scroll') or its contents ('local').",values:[{name:"fixed",version:"1.0",browsers:"all",desc:"The background is fixed with regard to the viewport. In paged media where there is no viewport, a 'fixed' background is fixed with respect to the page box and therefore replicated on every page."},{name:"local",version:"3.0",browsers:"all",desc:"The background is fixed with regard to the element's contents: if the element has a scrolling mechanism, the background scrolls with the element's contents."},{name:"scroll",version:"1.0",browsers:"all",desc:"The background is fixed with regard to the element itself and does not scroll with its contents. (It is effectively attached to the element's border.)"}]},{name:"background-clip",restriction:"enum",version:"3.0",browsers:"C,FF4,IE9,O10.5,S3",ref:"http://www.w3.org/TR/css3-background/#the-background-clip",syntax:"header { $(name): border-box; }",desc:"Determines the background painting area.",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the border box."},{name:"content-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the content box."},{name:"padding-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the padding box"}]},{name:"background-color",restriction:"color",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#the-background-color",syntax:"body { $(name): white; }",desc:"Color used for an element's background",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"1.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"1.0",browsers:"C,S1"},{name:"-webkit-link",version:"1.0",browsers:"C,S1"},{name:"-webkit-text",version:"1.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"background-image",restriction:"url, enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#the-background-image",syntax:"article { $(name): url(image.png); }",desc:"Image used for an element's background",values:[{name:"linear-gradient()",version:"3.0",browsers:"FF16,IE10,O12.5"},{name:"-moz-image-rect()",version:"3.0",browsers:"FF3.6"},{name:"-moz-linear-gradient()",version:"3.0",browsers:"FF3.6"},{name:"-moz-radial-gradient()",version:"3.0",browsers:"FF3.6"},{name:"-moz-repeating-linear-gradient()",version:"3.0",browsers:"FF10"},{name:"-moz-repeating-radial-gradient()",version:"3.0",browsers:"FF10"},{name:"none",version:"1.0",browsers:"all",desc:"A value of 'none' counts as an image layer but draws nothing."},{name:"-o-linear-gradient()",version:"3.0",browsers:"O11.1"},{name:"-o-repeating-linear-gradient()",version:"3.0",browsers:"O11.1-12"},{name:"radial-gradient()",version:"3.0",browsers:"FF16,IE10,O12.5"},{name:"repeating-linear-gradient()",version:"3.0",browsers:"FF16,IE10,O12.5"},{name:"repeating-radial-gradient()",version:"3.0",browsers:"FF16,IE10,O12.5"},{name:"url()",version:"1.0",browsers:"all"},{name:"-webkit-gradient()",version:"3.0",browsers:"C,S4"},{name:"-webkit-image-set()",version:"3.0",browsers:"C,S6"},{name:"-webkit-linear-gradient()",version:"3.0",browsers:"C,S5.1"},{name:"-webkit-radial-gradient()",version:"3.0",browsers:"C,S5.1"},{name:"-webkit-repeating-linear-gradient()",version:"3.0",browsers:"C,S5.1"},{name:"-webkit-repeating-radial-gradient()",version:"3.0",browsers:"C,S5.1"}]},{name:"background-origin",restriction:"enum",version:"3.0",browsers:"C,FF4,IE9,O10.5,S3",ref:"http://www.w3.org/TR/css3-background/#the-background-origin",syntax:"header { $(name): border-box; }",desc:"For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the border box."},{name:"content-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the content box."},{name:"padding-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the padding box"}]},{name:"background-position",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#the-background-position",syntax:"div { $(name): left center}",desc:"If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",values:[{name:"bottom",version:"1.0",browsers:"all",desc:"Equivalent to '100%' for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset."},{name:"center",version:"1.0",browsers:"all",desc:"Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."},{name:"left",version:"1.0",browsers:"all",desc:"Equivalent to '0%' for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset."},{name:"right",version:"1.0",browsers:"all",desc:"Equivalent to '100%' for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset."},{name:"top",version:"1.0",browsers:"all",desc:"Equivalent to '0%' for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."}]},{name:"background-position-x",restriction:"length, percentage",version:"3.0",browsers:"IE6",ref:"http://www.w3.org/TR/css3-background/#the-background-position",syntax:"body { $(name): center; }",desc:"If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",values:[{name:"bottom",version:"3.0",browsers:"all",desc:"Equivalent to '100%' for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset."},{name:"center",version:"3.0",browsers:"all",desc:"Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."},{name:"left",version:"3.0",browsers:"all",desc:"Equivalent to '0%' for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset."},{name:"right",version:"3.0",browsers:"all",desc:"Equivalent to '100%' for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset."},{name:"top",version:"3.0",browsers:"all",desc:"Equivalent to '0%' for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."}]},{name:"background-position-y",restriction:"length, percentage",version:"3.0",browsers:"IE6",ref:"http://www.w3.org/TR/css3-background/#the-background-position",syntax:"body { $(name): center; }",desc:"If background images have been specified, this property specifies their initial position (after any resizing) within their corresponding background positioning area.",values:[{name:"bottom",version:"3.0",browsers:"all",desc:"Equivalent to '100%' for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset."},{name:"center",version:"3.0",browsers:"all",desc:"Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."},{name:"left",version:"3.0",browsers:"all",desc:"Equivalent to '0%' for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset."},{name:"right",version:"3.0",browsers:"all",desc:"Equivalent to '100%' for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset."},{name:"top",version:"3.0",browsers:"all",desc:"Equivalent to '0%' for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."}]},{name:"background-repeat",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#the-background-repeat",syntax:"article { $(name): no-repeat; }",desc:"How the background image is tiled within an element",values:[{name:"no-repeat",version:"1.0",browsers:"all",desc:"The image is placed once and not repeated in this direction."},{name:"repeat",version:"1.0",browsers:"all",desc:"The image is repeated in this direction as often as needed to cover the background painting area."},{name:"repeat-x",version:"1.0",browsers:"all",desc:"Equivalent to 'repeat no-repeat'."},{name:"repeat-y",version:"1.0",browsers:"all",desc:"Equivalent to 'no-repeat repeat'."},{name:"round",version:"3.0",browsers:"all",desc:"The image is repeated as often as will fit within the background positioning area. If it doesn't fit a whole number of times, it is rescaled so that it does."},{name:"space",version:"3.0",browsers:"all",desc:"The image is repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area. The first and last images touch the edges of the area."}]},{name:"background-size",restriction:"length, percentage",version:"3.0",browsers:"C,FF4,IE9,O10,S4.1",ref:"http://www.w3.org/TR/css3-background/#the-background-size",syntax:"header { $(name): 20px; }",desc:"Specifies the size of the background images.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"contain",version:"3.0",browsers:"all",desc:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."},{name:"cover",version:"3.0",browsers:"all",desc:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."}]},{name:"behavior",restriction:"url",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/ie/gg192966.aspx",syntax:"div { $(name): url(http://example.com/png_fix.htc); }",desc:"IE only. Used to extend behaviors of the browser"},{name:"border",restriction:"length, color, enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#borders",syntax:"header { $(name): 5px solid red;}",desc:"Shorthand property for setting border width, style and color",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-bottom",restriction:"length, color, enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#borders",syntax:"header { $(name): 5px solid red;}",desc:"Shorthand property for setting border width, style and color",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-bottom-color",restriction:"color",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-color",syntax:"td { $(name): blue; }",desc:"The color of the border around all four edges of an element.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"1.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"1.0",browsers:"C,S1"},{name:"-webkit-link",version:"1.0",browsers:"C,S1"},{name:"-webkit-text",version:"1.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"border-bottom-left-radius",restriction:"length, percentage",version:"3.0",browsers:"C,FF4,IE9,O10.5,S5",ref:"http://www.w3.org/TR/css3-background/#border-radius",syntax:"td { $(name): 4px; }",desc:"The two length or percentage values of the 'border-*-radius' properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge. The first value is the horizontal radius, the second the vertical radius. If the second value is omitted it is copied from the first. If either length is zero, the corner is square, not rounded. Percentages for the horizontal radius refer to the width of the border box, whereas percentages for the vertical radius refer to the height of the border box."},{name:"border-bottom-right-radius",restriction:"length, percentage",version:"3.0",browsers:"C,FF4,IE9,O10.5,S5",ref:"http://www.w3.org/TR/css3-background/#border-radius",syntax:"td { $(name): 4px; }",desc:"The two length or percentage values of the 'border-*-radius' properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge. The first value is the horizontal radius, the second the vertical radius. If the second value is omitted it is copied from the first. If either length is zero, the corner is square, not rounded. Percentages for the horizontal radius refer to the width of the border box, whereas percentages for the vertical radius refer to the height of the border box."},{name:"border-bottom-style",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-style",syntax:"td { $(name): solid; }",desc:"The style of the border around edges of an element.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"border-bottom-width",restriction:"length",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-width",syntax:"td { $(name): 2px; }",desc:"'Border-width' is a shorthand that sets the four 'border-*-width' properties. If it has four values, they set top, right, bottom and left in that order. If left is missing, it is the same as right; if bottom is missing, it is the same as top; if right is missing, it is the same as top.",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-collapse",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/tables.html#borders",syntax:"table { $(name): collapse; }",desc:"Selects a table's border model.",values:[{name:"collapse",version:"2.0",browsers:"all",desc:"Selects the collapsing borders model."},{name:"separate",version:"2.0",browsers:"all",desc:"Selects the separated borders border model."}]},{name:"border-color",restriction:"color",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-color",syntax:"td { $(name): blue; }",desc:"The color of the border around all four edges of an element.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"1.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"1.0",browsers:"C,S1"},{name:"-webkit-link",version:"1.0",browsers:"C,S1"},{name:"-webkit-text",version:"1.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"border-image",restriction:"length, percentage, number, url, enum",version:"3.0",browsers:"C",ref:"http://www.w3.org/TR/css3-background/#border-image",syntax:"td { $(name): url(border.png) 30 30 round;}",desc:"Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."},{name:"fill",version:"3.0",browsers:"all",desc:"Causes the middle part of the border-image to be preserved. (By default it is discarded, i.e., treated as empty.)"},{name:"none",version:"3.0",browsers:"all"},{name:"repeat",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area."},{name:"round",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."},{name:"space",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."},{name:"stretch",version:"3.0",browsers:"all",desc:"The image is stretched to fill the area."},{name:"url()",version:"3.0",browsers:"all"}]},{name:"border-image-outset",restriction:"length, number",version:"3.0",browsers:"FF13",ref:"http://www.w3.org/TR/css3-background/#border-image-outset",syntax:"div { $(name): 3px; }",desc:"The values specify the amount by which the border image area extends beyond the border box on the top, right, bottom, and left sides respectively. If the fourth value is absent, it is the same as the second. If the third one is also absent, it is the same as the first. If the second one is also absent, it is the same as the first. Numbers represent multiples of the corresponding border-width."},{name:"border-image-repeat",restriction:"enum",version:"3.0",browsers:"FF13",ref:"http://www.w3.org/TR/css3-background/#the-border-image-repeat",syntax:"td { $(name): stretch; }",desc:"Specifies how the images for the sides and the middle part of the border image are scaled and tiled. If the second keyword is absent, it is assumed to be the same as the first.",values:[{name:"repeat",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area."},{name:"round",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."},{name:"space",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."},{name:"stretch",version:"3.0",browsers:"all",desc:"The image is stretched to fill the area."}]},{name:"border-image-slice",restriction:"number, percentage",version:"3.0",browsers:"C,FF12",ref:"http://www.w3.org/TR/css3-background/#border-image-slice",syntax:"div { $(name): 10%; }",desc:"The four 'border-image-slice' values represent inward offsets from the top, right, bottom, and left edges of the image respectively, dividing it into nine regions: four corners, four edges and a middle. The middle image part is discarded (treated as fully transparent) unless the 'fill' keyword is present. (It is drawn over the background; see the border-image drawing process.) If the fourth number/percentage is absent, it is the same as the second. If the third one is also absent, it is the same as the first. If the second one is also absent, it is the same as the first.",values:{value:{name:"fill",version:"3.0",browsers:"all",desc:"Causes the middle part of the border-image to be preserved. (By default it is discarded, i.e., treated as empty.)"}}},{name:"border-image-source",restriction:"url",version:"3.0",browsers:"C,FF13",ref:"http://www.w3.org/TR/css3-background/#the-border-image-source",syntax:"aside { $(name): url(image.png); }",desc:"Specifies an image to use instead of the border styles given by the 'border-style' properties and as an additional background layer for the element. If the value is 'none' or if the image cannot be displayed, the border styles will be used.",values:[{name:"none",version:"3.0",browsers:"all"},{name:"url()",version:"3.0",browsers:"all"}]},{name:"border-image-width",restriction:"length, percentage, number",version:"3.0",browsers:"FF13",ref:"http://www.w3.org/TR/css3-background/#border-image-slice",syntax:".album { $(name): 4px; }",desc:"The four values of 'border-image-width' specify offsets that are used to divide the border image area into nine parts. They represent inward distances from the the top, right, bottom, and left sides of the area, respectively.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."}}},{name:"border-left",restriction:"length, color, enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#borders",syntax:"header { $(name): 5px solid red;}",desc:"Shorthand property for setting border width, style and color",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-left-color",restriction:"color",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-color",syntax:"td { $(name): blue; }",desc:"The color of the border around all four edges of an element.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"1.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"1.0",browsers:"C,S1"},{name:"-webkit-link",version:"1.0",browsers:"C,S1"},{name:"-webkit-text",version:"1.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"border-left-style",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-style",syntax:"td { $(name): solid; }",desc:"The style of the border around edges of an element.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"border-left-width",restriction:"length",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-width",syntax:"td { $(name): 2px; }",desc:"'Border-width' is a shorthand that sets the four 'border-*-width' properties. If it has four values, they set top, right, bottom and left in that order. If left is missing, it is the same as right; if bottom is missing, it is the same as top; if right is missing, it is the same as top.",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-radius",restriction:"length, percentage",version:"3.0",browsers:"C,FF4,IE9,O10.5,S5",ref:"http://www.w3.org/TR/css3-background/#border-radius",syntax:"td { $(name): 3px 4px; }",desc:"The two length or percentage values of the 'border-*-radius' properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge. The first value is the horizontal radius, the second the vertical radius. If the second value is omitted it is copied from the first. If either length is zero, the corner is square, not rounded. Percentages for the horizontal radius refer to the width of the border box, whereas percentages for the vertical radius refer to the height of the border box."},{name:"border-right",restriction:"length, color, enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#borders",syntax:"header { $(name): 5px solid red;}",desc:"Shorthand property for setting border width, style and color",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-right-color",restriction:"color",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-color",syntax:"td { $(name): blue; }",desc:"The color of the border around all four edges of an element.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"1.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"1.0",browsers:"C,S1"},{name:"-webkit-link",version:"1.0",browsers:"C,S1"},{name:"-webkit-text",version:"1.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"border-right-style",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-style",syntax:"td { $(name): solid; }",desc:"The style of the border around edges of an element.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"border-right-width",restriction:"length",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-width",syntax:"td { $(name): 2px; }",desc:"'Border-width' is a shorthand that sets the four 'border-*-width' properties. If it has four values, they set top, right, bottom and left in that order. If left is missing, it is the same as right; if bottom is missing, it is the same as top; if right is missing, it is the same as top.",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-spacing",restriction:"length",version:"2.0",browsers:"C,FF1,IE8,O7,S1.2",ref:"http://www.w3.org/TR/CSS2/tables.html#borders",syntax:"table { $(name): 10px 50px; }",desc:"The lengths specify the distance that separates adjoining cell borders. If one length is specified, it gives both the horizontal and vertical spacing. If two are specified, the first gives the horizontal spacing and the second the vertical spacing. Lengths may not be negative."},{name:"border-style",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-style",syntax:"td { $(name): solid; }",desc:"The style of the border around edges of an element.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"border-top",restriction:"length, color, enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#borders",syntax:"header { $(name): 5px solid red;}",desc:"Shorthand property for setting border width, style and color",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-top-color",restriction:"color",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-color",syntax:"td { $(name): blue; }",desc:"The color of the border around all four edges of an element.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"1.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"1.0",browsers:"C,S1"},{name:"-webkit-link",version:"1.0",browsers:"C,S1"},{name:"-webkit-text",version:"1.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"border-top-left-radius",restriction:"length, percentage",version:"3.0",browsers:"C,FF4,IE9,O10.5,S5",ref:"http://www.w3.org/TR/css3-background/#border-radius",syntax:"td { $(name): 4px; }",desc:"The two length or percentage values of the 'border-*-radius' properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge. The first value is the horizontal radius, the second the vertical radius. If the second value is omitted it is copied from the first. If either length is zero, the corner is square, not rounded. Percentages for the horizontal radius refer to the width of the border box, whereas percentages for the vertical radius refer to the height of the border box."},{name:"border-top-right-radius",restriction:"length, percentage",version:"3.0",browsers:"C,FF4,IE9,O10.5,S5",ref:"http://www.w3.org/TR/css3-background/#border-radius",syntax:"td { $(name): 4px; }",desc:"The two length or percentage values of the 'border-*-radius' properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge. The first value is the horizontal radius, the second the vertical radius. If the second value is omitted it is copied from the first. If either length is zero, the corner is square, not rounded. Percentages for the horizontal radius refer to the width of the border box, whereas percentages for the vertical radius refer to the height of the border box."},{name:"border-top-style",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-style",syntax:"td { $(name): solid; }",desc:"The style of the border around edges of an element.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"border-top-width",restriction:"length",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-width",syntax:"td { $(name): 2px; }",desc:"'Border-width' is a shorthand that sets the four 'border-*-width' properties. If it has four values, they set top, right, bottom and left in that order. If left is missing, it is the same as right; if bottom is missing, it is the same as top; if right is missing, it is the same as top.",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"border-width",restriction:"length",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-background/#border-width",syntax:"td { $(name): 2px; }",desc:"'Border-width' is a shorthand that sets the four 'border-*-width' properties. If it has four values, they set top, right, bottom and left in that order. If left is missing, it is the same as right; if bottom is missing, it is the same as top; if right is missing, it is the same as top.",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"bottom",restriction:"length, percentage",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/visuren.html#propdef-bottom",syntax:"article { $(name): 50px; }",desc:"Specifies how far an absolutely positioned box's bottom margin edge is offset above the bottom edge of the box's 'containing block'.",values:{value:{name:"auto",version:"2.0",browsers:"all",desc:"For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"}}},{name:"box-decoration-break",restriction:"enum",version:"3.0",browsers:"O11",ref:"http://www.w3.org/TR/css3-background/#the-box-decoration-break",syntax:"div { $(name): clone; }",desc:"Specifies whether individual boxes are treated as broken pieces of one continuous box, or whether each box is individually wrapped with the border and padding.",values:[{name:"clone",version:"3.0",browsers:"all",desc:"Each box is independently wrapped with the border and padding. The 'border-radius' and 'border-image' and 'box-shadow', if any, are applied to each box independently. The background is drawn independently in each box of the element. A no-repeat background image will thus be rendered once in each box of the element."},{name:"slice",version:"3.0",browsers:"all",desc:"No border and no padding are inserted at the break. No box-shadow is drawn at the broken edge; 'border-radius' has no effect at its corners; and the 'border-image' is rendered for the whole box as if it were unbroken. The effect is as though the element were rendered with no break present, and then sliced by the break afterward."}]},{name:"box-shadow",restriction:"length, color, enum",version:"3.0",browsers:"C,FF9,IE9,O11.6,S5.1",ref:"http://www.w3.org/TR/css3-background/#box-shadow",syntax:"div { $(name): rgba(0,0,0,0.4) 10px 10px inset; }",desc:"Attaches one or more drop-shadows to the box. The property is a comma-separated list of shadows, each specified by 2-4 length values, an optional color, and an optional 'inset' keyword. Omitted lengths are 0; omitted colors are a user agent chosen color.",values:[{name:"inset",version:"3.0",browsers:"all",desc:"Changes the drop shadow from an outer shadow (one that shadows the box onto the canvas, as if it were lifted above the canvas) to an inner shadow (one that shadows the canvas onto the box, as if the box were cut out of the canvas and shifted behind it)."},{name:"none",version:"3.0",browsers:"all"}]},{name:"box-sizing",restriction:"enum",version:"3.0",browsers:"C,IE8,O8,S5.1",ref:"http://www.w3.org/TR/css3-ui/#box-sizing",syntax:"div { $(name): content-box; }",desc:"Box Model addition in CSS3.",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The specified width and height (and respective min/max properties) on this element determine the border box of the element."},{name:"content-box",version:"3.0",browsers:"all",desc:"Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."},{name:"padding-box",version:"3.0",browsers:"none",desc:"The specified width and height (and respective min/max properties) on this element determine the padding box of the element."}]},{name:"break-after",restriction:"enum",version:"3.0",browsers:"IE10,O11.1",ref:"http://www.w3.org/TR/css3-multicol/#column-breaks",syntax:"h2 { $(name): column; }",desc:"Describes the page/column break behavior before the generated box.",values:[{name:"always",version:"3.0",browsers:"all",desc:"Always force a page break before/after the generated box."},{name:"auto",version:"3.0",browsers:"all",desc:"Neither force nor forbid a page/column break before/after the generated box."},{name:"avoid",version:"3.0",browsers:"all",desc:"Avoid a page/column break before/after the generated box."},{name:"avoid-column",version:"3.0",browsers:"all",desc:"Avoid a column break before/after the generated box."},{name:"avoid-page",version:"3.0",browsers:"all",desc:"Avoid a page break before/after the generated box."},{name:"column",version:"3.0",browsers:"all",desc:"Always force a column break before/after the generated box."},{name:"left",version:"3.0",browsers:"all",desc:"Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."},{name:"page",version:"3.0",browsers:"all",desc:"Always force a page break before/after the generated box."},{name:"right",version:"3.0",browsers:"all",desc:"Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."}]},{name:"break-before",restriction:"enum",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-breaks",syntax:"h2 { $(name): column; }",desc:"Describes the page/column break behavior before the generated box.",values:[{name:"always",version:"3.0",browsers:"all",desc:"Always force a page break before/after the generated box."},{name:"auto",version:"3.0",browsers:"all",desc:"Neither force nor forbid a page/column break before/after the generated box."},{name:"avoid",version:"3.0",browsers:"all",desc:"Avoid a page/column break before/after the generated box."},{name:"avoid-column",version:"3.0",browsers:"all",desc:"Avoid a column break before/after the generated box."},{name:"avoid-page",version:"3.0",browsers:"all",desc:"Avoid a page break before/after the generated box."},{name:"column",version:"3.0",browsers:"all",desc:"Always force a column break before/after the generated box."},{name:"left",version:"3.0",browsers:"all",desc:"Force one or two page breaks before/after the generated box so that the next page is formatted as a left page."},{name:"page",version:"3.0",browsers:"all",desc:"Always force a page break before/after the generated box."},{name:"right",version:"3.0",browsers:"all",desc:"Force one or two page breaks before/after the generated box so that the next page is formatted as a right page."}]},{name:"break-inside",restriction:"enum",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-breaks",syntax:"h2 { $(name): avoid-column; }",desc:"Describes the page/column break behavior inside the generated box.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Neither force nor forbid a page/column break inside the generated box."},{name:"avoid",version:"3.0",browsers:"all",desc:"Avoid a page/column break inside the generated box."},{name:"avoid-column",version:"3.0",browsers:"all",desc:"Avoid a column break inside the generated box."},{name:"avoid-page",version:"3.0",browsers:"all",desc:"Avoid a page break inside the generated box."}]},{name:"caption-side",restriction:"enum",version:"2.0",browsers:"C,FF,IE8,O,S",ref:"http://www.w3.org/TR/CSS2/tables.html#caption-position",syntax:"caption { $(name): bottom; }",desc:"Specifies the position of the caption box with respect to the table box.",values:[{name:"bottom",version:"2.0",browsers:"all",desc:"Positions the caption box below the table box."},{name:"top",version:"2.0",browsers:"all",desc:"Positions the caption box above the table box."}]},{name:"clear",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/2006/WD-CSS21-20060411/visuren.html#propdef-clear",syntax:"footer { $(name): both; }",desc:"Indicates which sides of an element's box(es) may not be adjacent to an earlier floating box. The 'clear' property does not consider floats inside the element itself or in other block formatting contexts.",values:[{name:"both",version:"1.0",browsers:"all",desc:"The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any right-floating and left-floating boxes that resulted from elements earlier in the source document."},{name:"left",version:"1.0",browsers:"all",desc:"The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any left-floating boxes that resulted from elements earlier in the source document."},{name:"none",version:"1.0",browsers:"all",desc:"No constraint on the box's position with respect to floats."},{name:"right",version:"1.0",browsers:"all",desc:"The clearance of the generated box is set to the amount necessary to place the top border edge below the bottom outer edge of any right-floating boxes that resulted from elements earlier in the source document."}]},{name:"clip",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/visufx.html#propdef-clip",syntax:"span { $(name): rect(0px, 60px, 200px, 0px); }",desc:"Defines the visible portion of an element's box.",values:[{name:"auto",version:"2.0",browsers:"all"},{name:"rect()",version:"2.0",browsers:"all"}]},{name:"clip-path",restriction:"url, enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG/masking.html#ClipPathElement",desc:"Allows authors to control under what circumstances (if any) a particular graphic element can become the target of mouse events.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"clip-rule",restriction:"enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG/masking.html#ClipPathElement",desc:"Allows authors to control under what circumstances (if any) a particular graphic element can become the target of mouse events.",values:[{name:"evenodd",version:"3.0",browsers:"all",desc:"This rule determines the 'insideness' of a point on the canvas by drawing a ray from that point to infinity in any direction and counting the number of path segments from the given shape that the ray crosses."},{name:"nonzero",version:"3.0",browsers:"all",desc:"This rule determines the 'insideness' of a point on the canvas by drawing a ray from that point to infinity in any direction and then examining the places where a segment of the shape crosses the ray."}]},{name:"color",restriction:"color",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-color/#foreground",syntax:"body { $(name): red; }",desc:"Color of an element's text",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"1.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"1.0",browsers:"C,S1"},{name:"-webkit-link",version:"1.0",browsers:"C,S1"},{name:"-webkit-text",version:"1.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"color-interpolation",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/SVG11/painting.html#ColorInterpolationProperty",desc:"Specifies the color space for gradient interpolations, color animations and alpha compositing.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"linearRGB",version:"3.0",browsers:"all"},{name:"sRGB",version:"3.0",browsers:"all"}]},{name:"color-interpolation-filters",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/SVG11/painting.html#ColorInterpolationFiltersProperty",desc:"Specifies the color space for imaging operations performed via filter effects.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"linearRGB",version:"3.0",browsers:"all"},{name:"sRGB",version:"3.0",browsers:"all"}]},{name:"color-rendering",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/SVG11/painting.html#ColorRenderingProperty",desc:"The creator of SVG content might want to provide a hint to the implementation about how to make speed vs. quality tradeoffs as it performs color interpolation and compositing. The ‘color-rendering’ property provides a hint to the SVG user agent about how to optimize its color interpolation and compositing operations.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"optimizeQuality",version:"3.0",browsers:"all"},{name:"optimizeSpeed",version:"3.0",browsers:"all"}]},{name:"column-count",restriction:"integer",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-count",syntax:"div { $(name): 3; }",desc:"Describes the optimal number of columns into which the content of the element will be flowed.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"Determines the number of columns by the 'column-width' property and the element width."}}},{name:"column-fill",restriction:"enum",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#filling-columns",syntax:"article { $(name): balance; }",desc:"In continuous media, this property will only be consulted if the length of columns has been constrained. Otherwise, columns will automatically be balanced.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Fills columns sequentially."},{name:"balance",version:"3.0",browsers:"all",desc:"Balance content equally between columns, if possible."}]},{name:"column-gap",restriction:"length",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-gap0",syntax:"div { $(name): 10px; }",desc:"Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",values:{value:{name:"normal",version:"3.0",browsers:"all",desc:"User agent specific and typically equivalent to 1em."}}},{name:"column-rule",restriction:"length, color, enum",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-rule0",syntax:"header { $(name): 5px solid red;}",desc:"This property is a shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"column-rule-color",restriction:"color",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-color",syntax:"div { $(name): #ff0; }",desc:"Sets the color of the column rule",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"column-rule-style",restriction:"enum",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-style",syntax:"div { $(name): solid; }",desc:"Sets the style of the rule between columns of an element.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"column-rule-width",restriction:"length",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-width",syntax:"div { $(name): 3px; }",desc:"Sets the width of the rule between columns. Negative values are not allowed.",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"columns",restriction:"length, integer",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#columns0",syntax:"div { $(name): 100px 3; }",desc:"A shorthand property which sets both 'column-width' and 'column-count'.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"The width depends on the values of other properties."}}},{name:"column-span",restriction:"enum",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-span0",syntax:"article { $(name): all; }",desc:"Describes the page/column break behavior after the generated box.",values:[{name:"all",version:"3.0",browsers:"all",desc:"The element spans across all columns. Content in the normal flow that appears before the element is automatically balanced across all columns before the element appear."},{name:"none",version:"3.0",browsers:"all",desc:"The element does not span multiple columns."}]},{name:"column-width",restriction:"length",version:"3.0",browsers:"IE10,O11.6",ref:"http://www.w3.org/TR/css3-multicol/#column-width",syntax:"div { $(name): 100px; }",desc:"This property describes the width of columns in multicol elements.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"The width depends on the values of other properties."}}},{name:"content",restriction:"string, url",version:"2.0",browsers:"C,FF1,IE8,O4,S1",ref:"http://www.w3.org/TR/css3-content/#content",syntax:"a:after { $(name): ' ( attr(href))';}",desc:"Determines which page-based occurrence of a given element is applied to a counter or string value.",values:[{name:"attr()",version:"2.0",browsers:"all",desc:"The attr(n) function returns as a string the value of attribute n for the subject of the selector"},{name:"box",version:"3.0",browsers:"none",desc:"A hollow square."},{name:"check",version:"3.0",browsers:"none",desc:"A check mark."},{name:"circle",version:"3.0",browsers:"none",desc:"A hollow circle."},{name:"close-quote",version:"2.0",browsers:"none",desc:"Value is replaced by the appropriate string from the 'quotes' property."},{name:"contents",version:"3.0",browsers:"none",desc:"Displays the element's descendents."},{name:"counter(name)",version:"2.0",browsers:"all",desc:"Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."},{name:"counter(name, style)",version:"2.0",browsers:"none",desc:"Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."},{name:"counters(name, string)",version:"2.0",browsers:"none",desc:"Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."},{name:"counters(name, string, style)",version:"2.0",browsers:"none",desc:"Counters are denoted by identifiers (see the 'counter-increment' and 'counter-reset' properties)."},{name:"date(format)",version:"3.0",browsers:"none",desc:"Current date and/or time, formatted according to the specified formatting string. Format is based on POSIX date formatting strings."},{name:"diamond",version:"3.0",browsers:"none",desc:"A filled diamond. On some platforms, this is similar to 'disc'."},{name:"disc",version:"3.0",browsers:"none",desc:"A filled circle."},{name:"endnote",version:"3.0",browsers:"none",desc:"Shorthand for 'counter(endnote, normal)'. This is intended to be used on the in-flow part of a endnote."},{name:"footnote",version:"3.0",browsers:"none",desc:"Shorthand for 'counter(footnote, normal)'. This is intended to be used on the in-flow part of a footnote."},{name:"hyphen",version:"3.0",browsers:"none",desc:"A hyphen bullet."},{name:"icon",version:"2.0",browsers:"all",desc:"The (pseudo-)element is replaced in its entirety by the resource referenced by its 'icon' property, and treated as a replaced element."},{name:"inhibit",version:"3.0",browsers:"none",desc:"On elements, this inhibits the children of the element from being rendered as children of this element, as if the element was empty. On pseudo-elements, this inhibits the creation of the pseudo-element, as if 'display' computed to 'none'."},{name:"list-item",version:"3.0",browsers:"none",desc:"Shorthand for 'counter(list-item, normal)'. Note that this is not equivalent to 'normal' when set on a '::marker' pseudo-element that has a superior with 'display' set to 'list-item', as it ignores the 'list-style' properties."},{name:"no-close-quote",version:"2.0",browsers:"none",desc:"Inserts nothing (as in 'none'), but increments (decrements) the level of nesting for quotes."},{name:"none",version:"2.0",browsers:"all",desc:"On elements, this inhibits the children of the element from being rendered as children of this element, as if the element was empty. On pseudo-elements it causes the pseudo-element to have no content."},{name:"no-open-quote",version:"2.0",browsers:"none",desc:"Inserts nothing (as in 'none'), but increments (decrements) the level of nesting for quotes."},{name:"normal",version:"2.0",browsers:"all",desc:"See http://www.w3.org/TR/css3-content/#content for computation rules."},{name:"open-quote",version:"2.0",browsers:"none",desc:"Value is replaced by the appropriate string from the 'quotes' property."},{name:"pending()",version:"2.0",browsers:"none",desc:"This causes all elements and pseudo-elements whose 'move-to' property computes to the specified identifier to be inserted as children of the current element (or pseudo-element)."},{name:"section-note",version:"3.0",browsers:"none",desc:"Shorthand for 'counter(section-note, normal)'. This is intended to be used on the in-flow part of a section-note."},{name:"square",version:"3.0",browsers:"none",desc:"A filled square."},{name:"string(name)",version:"2.0",browsers:"none",desc:"Specifies a string value"},{name:"url()",version:"2.0",browsers:"all"}]},{name:"counter-increment",restriction:"identifier, integer",version:"2.0",browsers:"C,FF1.5,IE8,O10.5,S3",ref:"http://www.w3.org/TR/css3-content/#counters",syntax:"h1:before { $(name): section; }",desc:"Counters are used with the 'counter()' and 'counters()' functions of the the 'content' property.",values:{value:{name:"none",version:"2.0",browsers:"all",desc:"The counter is not modified."}}},{name:"counter-reset",restriction:"identifier, integer",version:"2.0",browsers:"C,FF1.5,IE8,O10.5,S3",ref:"http://www.w3.org/TR/css3-content/#counters",syntax:"h1 { $(name): section; }",desc:"Property accepts one or more names of counters (identifiers), each one optionally followed by an integer. The integer gives the value that the counter is set to on each occurrence of the element.",values:{value:{name:"none",version:"2.0",browsers:"all",desc:"The counter is not modified."}}},{name:"crop",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#the-crop",syntax:" | auto",desc:"Allows a replaced element to be just a rectangular area of an object, instead of the whole object.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The element's computed intrinsic width and height are the same as its actual intrinsic width and height."},{name:"insert-rect(top, right, bottom, left)",version:"3.0",browsers:"all",desc:"Each of the four arguments can be a or a . All percentage values are computed relative to the intrinsic dimensions of the element, if there is one. Values are offsets relative to the respective edges of the element."},{name:"rect(top, right, bottom, left)",version:"3.0",browsers:"all",desc:"Each of the four arguments can be a or a . All percentage values are computed relative to the intrinsic dimensions of the element, if there is one. Values are offsets relative to the top left of the element."}]},{name:"cue",restriction:"url, volume, enum",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#cue",syntax:"h1 { $(name): url(sound.wav) -3dB;}",desc:"Shorthand for setting 'cue-before' and 'cue-after'. If two values are given the first value is 'cue-before' and the second is 'cue-after'. If only one value is given, it applies to both properties.",values:[{name:"loud",version:"2.0",browsers:"all"},{name:"medium",version:"2.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all",desc:"No auditory icon is specified."},{name:"silent",version:"2.0",browsers:"all",desc:"Value of '0'"},{name:"soft",version:"2.0",browsers:"all"},{name:"url()",version:"2.0",browsers:"all"},{name:"x-loud",version:"2.0",browsers:"all",desc:"Value of '100'"},{name:"x-soft",version:"2.0",browsers:"all"}]},{name:"cue-after",restriction:"url, volume, enum",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#cue-after",syntax:"h1 { $(name): url(dong.wav) -3dB;}",desc:"Auditory icons are another way to distinguish semantic elements. Sounds may be played before and/or after the element to delimit it.",values:[{name:"loud",version:"2.0",browsers:"all"},{name:"medium",version:"2.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all",desc:"No auditory icon is specified."},{name:"silent",version:"2.0",browsers:"all",desc:"Value of '0'"},{name:"soft",version:"2.0",browsers:"all"},{name:"url()",version:"2.0",browsers:"all"},{name:"x-loud",version:"2.0",browsers:"all",desc:"Value of '100'"},{name:"x-soft",version:"2.0",browsers:"all"}]},{name:"cue-before",restriction:"url, volume, enum",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#cue-before",syntax:"h1 { $(name): url(dong.wav) -3dB;}",desc:"Auditory icons are another way to distinguish semantic elements. Sounds may be played before and/or after the element to delimit it.",values:[{name:"loud",version:"2.0",browsers:"all"},{name:"medium",version:"2.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all",desc:"No auditory icon is specified."},{name:"silent",version:"2.0",browsers:"all",desc:"Value of '0'"},{name:"soft",version:"2.0",browsers:"all"},{name:"url()",version:"2.0",browsers:"all"},{name:"x-loud",version:"2.0",browsers:"all",desc:"Value of '100'"},{name:"x-soft",version:"2.0",browsers:"all"}]},{name:"cursor",restriction:"url, number",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-ui/#cursor0",syntax:"nav { $(name): pointer; }",desc:"Allows control over cursor appearance in an element",values:[{name:"alias",version:"3.0",browsers:"all",desc:"Indicates an alias of/shortcut to something is to be created. Often rendered as an arrow with a small curved arrow next to it."},{name:"all-scroll",version:"3.0",browsers:"all",desc:"Indicates that the something can be scrolled in any direction. Often rendered as arrows pointing up, down, left, and right with a dot in the middle."},{name:"auto",version:"2.0",browsers:"all",desc:"The UA determines the cursor to display based on the current context."},{name:"cell",version:"3.0",browsers:"all",desc:"Indicates that a cell or set of cells may be selected. Often rendered as a thick plus-sign with a dot in the middle."},{name:"col-resize",version:"3.0",browsers:"all",desc:"Indicates that the item/column can be resized horizontally. Often rendered as arrows pointing left and right with a vertical bar separating them."},{name:"context-menu",version:"3.0",browsers:"all",desc:"A context menu is available for the object under the cursor. Often rendered as an arrow with a small menu-like graphic next to it."},{name:"copy",version:"3.0",browsers:"all",desc:"Indicates something is to be copied. Often rendered as an arrow with a small plus sign next to it."},{name:"crosshair",version:"2.0",browsers:"all",desc:"A simple crosshair (e.g., short line segments resembling a '+' sign). Often used to indicate a two dimensional bitmap selection mode."},{name:"default",version:"2.0",browsers:"all",desc:"The platform-dependent default cursor. Often rendered as an arrow."},{name:"e-resize",version:"2.0",browsers:"all",desc:"Indicates that east edge is to be moved."},{name:"ew-resize",version:"3.0",browsers:"all",desc:"Indicates a bidirectional east-west resize cursor."},{name:"help",version:"2.0",browsers:"all",desc:"Help is available for the object under the cursor. Often rendered as a question mark or a balloon."},{name:"move",version:"2.0",browsers:"all",desc:"Indicates something is to be moved."},{name:"-moz-grab",version:"3.0",browsers:"FF"},{name:"-moz-grabbing",version:"3.0",browsers:"FF"},{name:"-moz-zoom-in",version:"3.0",browsers:"FF"},{name:"-moz-zoom-out",version:"3.0",browsers:"FF"},{name:"ne-resize",version:"2.0",browsers:"all",desc:"Indicates that movement starts from north-east corner."},{name:"nesw-resize",version:"3.0",browsers:"all",desc:"Indicates a bidirectional north-east/south-west cursor."},{name:"no-drop",version:"3.0",browsers:"all",desc:"Indicates that the dragged item cannot be dropped at the current cursor location. Often rendered as a hand or pointer with a small circle with a line through it."},{name:"none",version:"3.0",browsers:"all",desc:"No cursor is rendered for the element."},{name:"not-allowed",version:"3.0",browsers:"all",desc:"Indicates that the requested action will not be carried out. Often rendered as a circle with a line through it."},{name:"n-resize",version:"2.0",browsers:"all",desc:"Indicates that north edge is to be moved."},{name:"ns-resize",version:"3.0",browsers:"all",desc:"Indicates a bidirectional north-south cursor."},{name:"nw-resize",version:"2.0",browsers:"all",desc:"Indicates that movement starts from north-west corner."},{name:"nwse-resize",version:"3.0",browsers:"all",desc:"Indicates a bidirectional north-west/south-east cursor."},{name:"pointer",version:"2.0",browsers:"all",desc:"The cursor is a pointer that indicates a link."},{name:"progress",version:"2.1",browsers:"all",desc:"A progress indicator. The program is performing some processing, but is different from 'wait' in that the user may still interact with the program. Often rendered as a spinning beach ball, or an arrow with a watch or hourglass."},{name:"row-resize",version:"3.0",browsers:"all",desc:"Indicates that the item/row can be resized vertically. Often rendered as arrows pointing up and down with a horizontal bar separating them."},{name:"se-resize",version:"2.0",browsers:"all",desc:"Indicates that movement starts from south-east corner."},{name:"s-resize",version:"2.0",browsers:"all",desc:"Indicates that south edge is to be moved."},{name:"sw-resize",version:"2.0",browsers:"all",desc:"Indicates that movement starts from south-west corner."},{name:"text",version:"2.0",browsers:"all",desc:"Indicates text that may be selected. Often rendered as a vertical I-beam."},{name:"vertical-text",version:"3.0",browsers:"all",desc:"Indicates vertical-text that may be selected. Often rendered as a horizontal I-beam."},{name:"wait",version:"2.0",browsers:"all",desc:"Indicates that the program is busy and the user should wait. Often rendered as a watch or hourglass."},{name:"-webkit-grab",version:"2.0",browsers:"C,S1.2"},{name:"-webkit-grabbing",version:"2.0",browsers:"C,S1.2"},{name:"-webkit-zoom-in",version:"2.0",browsers:"C,S1.2"},{name:"-webkit-zoom-out",version:"2.0",browsers:"C,S1.2"},{name:"w-resize",version:"2.0",browsers:"all",desc:"Indicates that west edge is to be moved."},{name:"zoom-in",version:"3.0",browsers:"none",desc:"Indicates that something can be zoomed (magnified) in or out, and often rendered as a magnifying glass with a '+' or '-' in the center of the glass, for 'zoom-in’ and 'zoom-out' respectively."},{name:"zoom-out",version:"3.0",browsers:"none",desc:"Indicates that something can be zoomed (magnified) in or out, and often rendered as a magnifying glass with a '+' or '-' in the center of the glass, for 'zoom-in’ and 'zoom-out' respectively."}]},{name:"direction",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-writing-modes/#direction0",syntax:"div { $(name): rtl; }",desc:"Specifies the base directionality of text and elements on a line, and the directionality of embeddings and overrides for the Unicode bidirectional algorithm.",values:[{name:"ltr",version:"2.0",browsers:"all",desc:"Left-to-right direction."},{name:"rtl",version:"2.0",browsers:"all",desc:"Right-to-left direction."}]},{name:"display",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#display",syntax:"p { $(name): inline; }",desc:"This property, in combination with 'float' and 'position', determines the type of box or boxes that are generated for an element.",values:[{name:"block",version:"2.0",browsers:"all",desc:"Block boxes."},{name:"compact",version:"3.0",browsers:"none",desc:"Either block boxes or a marker box, depending on context. Properties apply to compact boxes based on their final status."},{name:"flexbox",version:"1.0",browsers:"O12.1"},{name:"grid",version:"3.0",browsers:"none"},{name:"inline",version:"2.0",browsers:"all",desc:"Inline boxes."},{name:"inline-block",version:"2.0",browsers:"all",desc:"A block box, which itself is flowed as a single inline box, similar to a replaced element. The inside of an inline-block is formatted as a block box, and the box itself is formatted as an inline box."},{name:"inline-flexbox",version:"1.0",browsers:"O12.1"},{name:"inline-grid",version:"3.0",browsers:"none"},{name:"inline-table",version:"2.0",browsers:"all"},{name:"list-item",version:"2.0",browsers:"all",desc:"One or more block boxes and one marker box."},{name:"marker",version:"3.0",browsers:"none"},{name:"-moz-box",version:"1.0",browsers:"FF"},{name:"-moz-deck",version:"1.0",browsers:"FF"},{name:"-moz-grid",version:"1.0",browsers:"FF"},{name:"-moz-grid-group",version:"1.0",browsers:"FF"},{name:"-moz-grid-line",version:"1.0",browsers:"FF"},{name:"-moz-groupbox",version:"1.0",browsers:"FF"},{name:"-moz-inline-box",version:"1.0",browsers:"FF"},{name:"-moz-inline-grid",version:"1.0",browsers:"FF"},{name:"-moz-inline-stack",version:"1.0",browsers:"FF"},{name:"-moz-marker",version:"1.0",browsers:"FF"},{name:"-moz-popup",version:"1.0",browsers:"FF"},{name:"-moz-stack",version:"1.0",browsers:"FF"},{name:"-ms-flexbox",version:"1.0",browsers:"IE10"},{name:"-ms-grid",version:"3.0",browsers:"IE10",desc:"A value of grid causes an element to display as a block-level Grid element"},{name:"-ms-inline-flexbox",version:"1.0",browsers:"IE10"},{name:"-ms-inline-grid",version:"3.0",browsers:"IE10",desc:"A value of inline-grid causes an element to display as an inline-level Grid element."},{name:"none",version:"1.0",browsers:"all",desc:"This value causes an element to generate no boxes (i.e., the element has no effect on layout). Descendant elements do not generate any boxes either; this behavior cannot be overridden by setting the 'display' property on the descendants."},{name:"normal",version:"3.0",browsers:"all"},{name:"ruby",version:"3.0",browsers:"all"},{name:"ruby-base",version:"3.0",browsers:"all"},{name:"ruby-base-container",version:"3.0",browsers:"all"},{name:"ruby-base-group",version:"3.0",browsers:"none"},{name:"ruby-text",version:"3.0",browsers:"all"},{name:"ruby-text-container",version:"3.0",browsers:"all"},{name:"ruby-text-group",version:"3.0",browsers:"none"},{name:"run-in",version:"2.0",browsers:"all",desc:"Either block or inline boxes, depending on context. Properties apply to run-in boxes based on their final status (inline-level or block-level)."},{name:"table",version:"2.0",browsers:"all"},{name:"table-caption",version:"2.0",browsers:"all"},{name:"table-cell",version:"2.0",browsers:"all"},{name:"table-column",version:"2.0",browsers:"all"},{name:"table-column-group",version:"2.0",browsers:"all"},{name:"table-footer-group",version:"2.0",browsers:"all"},{name:"table-header-group",version:"2.0",browsers:"all"},{name:"table-row",version:"2.0",browsers:"all"},{name:"table-row-group",version:"2.0",browsers:"all"},{name:"-webkit-box",version:"1.0",browsers:"C,S1"},{name:"-webkit-inline-box",version:"1.0",browsers:"C,S1"}]},{name:"elevation",restriction:"angle",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/2007/CR-CSS21-20070719/aural.html#propdef-azimuth",syntax:" | below | level | above | higher | lower",desc:"Sound spatial information",values:[{name:"above",version:"2.0",browsers:"all",desc:"Same as '90deg'."},{name:"below",version:"2.0",browsers:"all",desc:"Same as '-90deg'."},{name:"higher",version:"2.0",browsers:"all",desc:"Adds 10 degrees to the current elevation."},{name:"level",version:"2.0",browsers:"all",desc:"Same as '0deg'."},{name:"lower",version:"2.0",browsers:"all",desc:"Subtracts 10 degrees from the current elevation."}]},{name:"empty-cells",restriction:"enum",version:"2.0",browsers:"C,FF1,IE7,O4,S1.2",ref:"http://www.w3.org/TR/CSS2/tables.html#empty-cells",syntax:"table { $(name): hide; }",desc:"In the separated borders model, this property controls the rendering of borders and backgrounds around cells that have no visible content.",values:[{name:"hide",version:"2.0",browsers:"all",desc:"No borders or backgrounds are drawn around/behind empty cells."},{name:"-moz-show-background",version:"3.0",browsers:"FF"},{name:"show",version:"2.0",browsers:"all",desc:"Borders and backgrounds are drawn around/behind empty cells (like normal cells)."}]},{name:"enable-background",restriction:"integer, length, percentage, enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/filters.html#EnableBackgroundProperty",desc:"Allocate a shared background image all graphic elements within a container.",values:[{name:"accumulate",version:"3.0",browsers:"all",desc:"If the ancestor container element has a property of new, then all graphics elements within the current container are rendered both on the parent's background image and onto the target."},{name:"new",version:"3.0",browsers:"all",desc:"Create a new background image canvas. All children of the current container element can access the background, and they will be rendered onto both the parent's background image canvas in addition to the target device."}]},{name:"fill",restriction:"color, enum, url",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#FillProperty",desc:"The 'fill' property paints the interior of the given graphical element.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"url()",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"fill-opacity",restriction:"number(0-1)",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#FillOpacityProperty",desc:"'fill-opacity' specifies the opacity of the painting operation used to paint the interior the current object."},{name:"fill-rule",restriction:"enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#FillRuleProperty",desc:"The 'fill-rule' property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape.",values:[{name:"evenodd",version:"3.0",browsers:"all"},{name:"nonzero",version:"3.0",browsers:"all"}]},{name:"filter",restriction:"",version:"3.0",browsers:"IE6-9",ref:"http://msdn.microsoft.com/en-us/ie/gg192966.aspx",syntax:"div { $(name): alpha(opacity = 50); }",desc:"IE only. Used to produce visual effects."},{name:"fit",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#fit",syntax:"Comma-separated list of 'fit' keywords where 'fit' = fill | hidden | meet | slice",desc:"Gives a hint for how to scale a replaced element if neither its 'width' nor its 'height' property is 'auto'.",values:[{name:"fill",version:"3.0",browsers:"all",desc:"Scale the object's height and width independently so that the content just touches all edges of the containing box."},{name:"hidden",version:"3.0",browsers:"all",desc:"Do not scale the object."},{name:"meet",version:"3.0",browsers:"all",desc:"Make the object as large as possible with its width <= 'width' and height <= 'height', while preserving its aspect ratio. Position the object as for the 'hidden' value."},{name:"slice",version:"3.0",browsers:"all",desc:"Make the object as small as possible with its width >= 'width' and height >= 'height', while preserving its aspect ratio. Position the object as for the 'hidden' value."}]},{name:"fit-position",restriction:"percentage, length",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#fit",syntax:"[ [ | ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ] | auto",desc:"Gives a hint for how to scale a replaced element if neither its 'width' nor its 'height' property is 'auto'.",values:[{name:"bottom",version:"3.0",browsers:"all",desc:"Equivalent to '100%' for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset."},{name:"center",version:"3.0",browsers:"all",desc:"Equivalent to '50%' ('left 50%') for the horizontal position if the horizontal position is not otherwise specified, or '50%' ('top 50%') for the vertical position if it is."},{name:"fill",version:"3.0",browsers:"all",desc:"Scale the object's height and width independently so that the content just touches all edges of the containing box."},{name:"hidden",version:"3.0",browsers:"all",desc:"Do not scale the object."},{name:"left",version:"3.0",browsers:"all",desc:"Equivalent to '0%' for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset."},{name:"meet",version:"3.0",browsers:"all",desc:"Make the object as large as possible with its width <= 'width' and height <= 'height', while preserving its aspect ratio. Position the object as for the 'hidden' value."},{name:"right",version:"3.0",browsers:"all",desc:"Equivalent to '100%' for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset."},{name:"slice",version:"3.0",browsers:"all",desc:"Make the object as small as possible with its width >= 'width' and height >= 'height', while preserving its aspect ratio. Position the object as for the 'hidden' value."},{name:"top",version:"3.0",browsers:"all",desc:"Equivalent to '0%' for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."}]},{name:"flex",restriction:"length, number, percentage",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#flex",syntax:"p { $(name): 0 1 auto; }",desc:"Specifies the components of a flexible length: the flex grow factor and flex shrink factor, and the flex basis.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"}]},{name:"flex-basis",restriction:"length, number, percentage",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#flex-basis-propdef",syntax:"p { $(name): 30%; }",desc:"The 'flex-basis' property sets the flex basis. Negative lengths are invalid.",values:{value:{name:"auto",version:"3.0",browsers:"all"}}},{name:"flex-direction",restriction:"enum",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#flex-direction",syntax:"div { $(name): column; }",desc:"Specifies how flexbox items are placed in the flexbox.",values:[{name:"column",version:"3.0",browsers:"all"},{name:"column-reverse",version:"3.0",browsers:"all"},{name:"row",version:"3.0",browsers:"all"},{name:"row-reverse",version:"3.0",browsers:"all"}]},{name:"flex-flow",restriction:"enum",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#flex-flow",syntax:"div { $(name): column wrap; }",desc:"Specifies how flexbox items are placed in the flexbox.",values:[{name:"column",version:"3.0",browsers:"all"},{name:"column-reverse",version:"3.0",browsers:"all"},{name:"nowrap",version:"3.0",browsers:"all",desc:"The flexbox is single-line. The cross-start direction is equivalent to either the 'start' or 'before' direction of the current writing mode, whichever is in the cross-axis, and the cross-end direction is the opposite direction of cross-start."},{name:"row",version:"3.0",browsers:"all"},{name:"row-reverse",version:"3.0",browsers:"all"},{name:"wrap",version:"3.0",browsers:"all",desc:"The flexbox is multi-line. The cross-start direction is equivalent to either the 'start' or 'before' direction of the current writing mode, whichever is in the cross-axis, and the cross-end direction is the opposite direction of cross-start."},{name:"wrap-reverse",version:"3.0",browsers:"all",desc:"Same as 'wrap', except the cross-start and cross-end directions are swapped."}]},{name:"flex-grow",restriction:"number",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#flex-grow",syntax:"p { $(name): 4; }",desc:"The 'flex-grow' property sets the flex grow factor. Negative numbers are invalid."},{name:"flex-shrink",restriction:"number",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#flex-shrink",syntax:"p { $(name): 4; }",desc:"The 'flex-shrink' property sets the flex shrink factor. Negative numbers are invalid."},{name:"flex-wrap",restriction:"enum",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#flex-wrap",syntax:"div { $(name): nowrap; }",desc:"controls whether the flexbox is single-line or multi-line, and the direction of the cross axis, which affects the direction new lines are stacked in and the meaning of the 'flex-align', 'flex-item-align', and 'flex-line-pack' properties.",values:[{name:"nowrap",version:"3.0",browsers:"all",desc:"The flexbox is single-line. The cross-start direction is equivalent to either the 'start' or 'before' direction of the current writing mode, whichever is in the cross-axis, and the cross-end direction is the opposite direction of cross-start."},{name:"wrap",version:"3.0",browsers:"all",desc:"The flexbox is multi-line. The cross-start direction is equivalent to either the 'start' or 'before' direction of the current writing mode, whichever is in the cross-axis, and the cross-end direction is the opposite direction of cross-start."},{name:"wrap-reverse",version:"3.0",browsers:"all",desc:"Same as 'wrap', except the cross-start and cross-end directions are swapped."}]},{name:"float",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/2006/WD-CSS21-20060411/visuren.html#propdef-float",syntax:"img { $(name): right; }",desc:"Specifies how a box should be floated. It may be set for any element, but only applies to elements that generate boxes that are not absolutely positioned.",values:[{name:"left",version:"1.0",browsers:"all",desc:"The element generates a block box that is floated to the left. Content flows on the right side of the box, starting at the top (subject to the 'clear' property)."},{name:"none",version:"1.0",browsers:"all",desc:"The box is not floated."},{name:"right",version:"1.0",browsers:"all",desc:"Similar to 'left', except the box is floated to the right, and content flows on the left side of the box, starting at the top."}]},{name:"flood-color",restriction:"color",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/filters.html#FloodColorProperty",desc:"Indicates what color to use to flood the current filter primitive subregion.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"flood-opacity",restriction:"number(0-1)",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/filters.html#FloodOpacityProperty",desc:"Indicates what opacity to use to flood the current filter primitive subregion."},{name:"font",restriction:"font",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#propdef-font",syntax:"body { $(name): bold 12px arial, verdana; }",desc:"Shorthand property for setting 'font-style', 'font-variant', 'font-weight', 'font-size', 'line-height', and 'font-family', at the same place in the style sheet. The syntax of this property is based on a traditional typographical shorthand notation to set multiple properties related to fonts.",values:[{name:"100",version:"1.0",browsers:"all",desc:"Thin"},{name:"200",version:"1.0",browsers:"all",desc:"Extra Light (Ultra Light)"},{name:"300",version:"1.0",browsers:"all",desc:"Light"},{name:"400",version:"1.0",browsers:"all",desc:"Normal"},{name:"500",version:"1.0",browsers:"all",desc:"Medium"},{name:"600",version:"1.0",browsers:"all",desc:"Semi Bold (Demi Bold)"},{name:"700",version:"1.0",browsers:"all",desc:"Bold"},{name:"800",version:"1.0",browsers:"all",desc:"Extra Bold (Ultra Bold)"},{name:"900",version:"1.0",browsers:"all",desc:"Black (Heavy)"},{name:"bold",version:"1.0",browsers:"all",desc:"Same as 700"},{name:"bolder",version:"1.0",browsers:"all",desc:"Specifies the weight of the face bolder than the inherited value."},{name:"caption",version:"3.0",browsers:"all",desc:"The font used for captioned controls (e.g., buttons, drop-downs, etc.)."},{name:"icon",version:"3.0",browsers:"all",desc:"The font used to label icons."},{name:"italic",version:"1.0",browsers:"all",desc:"Selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'."},{name:"large",version:"1.0",browsers:"all"},{name:"larger",version:"1.0",browsers:"all"},{name:"lighter",version:"1.0",browsers:"all",desc:"Specifies the weight of the face lighter than the inherited value."},{name:"medium",version:"1.0",browsers:"all"},{name:"menu",version:"3.0",browsers:"all",desc:"The font used in menus (e.g., dropdown menus and menu lists)."},{name:"message-box",version:"3.0",browsers:"all",desc:"The font used in dialog boxes."},{name:"normal",version:"1.0",browsers:"all",desc:"Specifies a face that is not labeled as a small-caps font."},{name:"oblique",version:"1.0",browsers:"all",desc:"Selects a font that is labeled 'oblique'."},{name:"small",version:"1.0",browsers:"all"},{name:"small-caps",version:"1.0",browsers:"all",desc:"Specifies a font that is labeled as a small-caps font. If a genuine small-caps font is not available, user agents should simulate a small-caps font."},{name:"small-caption",version:"3.0",browsers:"all",desc:"The font used for labeling small controls."},{name:"smaller",version:"1.0",browsers:"all"},{name:"status-bar",version:"3.0",browsers:"all",desc:"The font used in window status bars."},{name:"x-large",version:"1.0",browsers:"all"},{name:"x-small",version:"1.0",browsers:"all"},{name:"xx-large",version:"1.0",browsers:"all"},{name:"xx-small",version:"1.0",browsers:"all"}]},{name:"font-family",restriction:"font",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#font-family0",syntax:"body { $(name): arial, verdana; }",desc:"Specifies a prioritized list of font family names or generic family names. A user agent iterates through the list of family names until it matches an available font that contains a glyph for the character to be rendered.",values:[{name:"cursive",version:"1.0",browsers:"all"},{name:"fantasy",version:"1.0",browsers:"all"},{name:"monospace",version:"1.0",browsers:"all"},{name:"sans-serif",version:"1.0",browsers:"all"},{name:"serif",version:"1.0",browsers:"all"}]},{name:"font-feature-settings",restriction:"string, number",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-fonts/#propdef-font-feature-settings",syntax:"body { $(name): 'hwid'; }",desc:"This property provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",values:[{name:"normal",version:"3.0",browsers:"all",desc:"No change in glyph substitution or positioning occurs."},{name:"off",version:"3.0",browsers:"none"},{name:"on",version:"3.0",browsers:"none"}]},{name:"font-kerning",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#propdef-font-kerning",syntax:"body { $(name): normal; }",desc:"Kerning is the contextual adjustment of inter-glyph spacing. This property controls metric kerning, kerning that utilizes adjustment data contained in the font.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"normal",version:"3.0",browsers:"all"}]},{name:"font-language-override",restriction:"string",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#font-language-override-prop",syntax:"body { $(name): 'SRB'; }",desc:"The value of 'normal' implies that when rendering with OpenType fonts the language of the document is used to infer the OpenType language system, used to select language specific features when rendering.",values:{value:{name:"normal",version:"3.0",browsers:"all",desc:"Implies that when rendering with OpenType fonts the language of the document is used to infer the OpenType language system, used to select language specific features when rendering."}}},{name:"font-size",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#font-size-prop",syntax:"div { $(name): 12px; }",desc:"Indicates the desired height of glyphs from the font. For scalable fonts, the font-size is a scale factor applied to the EM unit of the font. (Note that certain glyphs may bleed outside their EM box.) For non-scalable fonts, the font-size is converted into absolute units and matched against the declared font-size of the font, using the same absolute coordinate space for both of the matched values.",values:[{name:"large",version:"1.0",browsers:"all"},{name:"larger",version:"1.0",browsers:"all"},{name:"medium",version:"1.0",browsers:"all"},{name:"small",version:"1.0",browsers:"all"},{name:"smaller",version:"1.0",browsers:"all"},{name:"x-large",version:"1.0",browsers:"all"},{name:"x-small",version:"1.0",browsers:"all"},{name:"xx-large",version:"1.0",browsers:"all"},{name:"xx-small",version:"1.0",browsers:"all"}]},{name:"font-size-adjust",restriction:"number",version:"3.0",browsers:"FF3.5,IE10",ref:"http://www.w3.org/TR/css3-fonts/#font-size-adjust",syntax:"div { $(name): 0.58; }",desc:"This property is a way to preserve the readability of text when font fallback occurs. It does this by adjusting the font-size so that the x-height is the same irregardless of the font used.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"Do not preserve the font's x-height."}}},{name:"font-stretch",restriction:"enum",version:"3.0",browsers:"FF9,IE9",ref:"http://www.w3.org/TR/css3-fonts/#font-stretch0",syntax:"div { $(name): expanded; }",desc:"The font-stretch property is used to expand or contract the horizontal width of the font. The change is relative to the normal width of the font as displayed by the browser.",values:[{name:"condensed",version:"3.0",browsers:"all"},{name:"expanded",version:"3.0",browsers:"all"},{name:"extra-condensed",version:"3.0",browsers:"all"},{name:"extra-expanded",version:"3.0",browsers:"all"},{name:"narrower",version:"3.0",browsers:"IE10",desc:"Indicates a narrower value relative to the width of the parent element."},{name:"normal",version:"3.0",browsers:"all"},{name:"semi-condensed",version:"3.0",browsers:"all"},{name:"semi-expanded",version:"3.0",browsers:"all"},{name:"ultra-condensed",version:"3.0",browsers:"all"},{name:"ultra-expanded",version:"3.0",browsers:"all"},{name:"wider",version:"3.0",browsers:"IE10",desc:"Indicates a wider value relative to the width of the parent element."}]},{name:"font-style",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#font-style0",syntax:"body { $(name): italic; }",desc:"Allows italic or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.",values:[{name:"italic",version:"1.0",browsers:"all",desc:"Selects a font that is labeled 'italic', or, if that is not available, one labeled 'oblique'."},{name:"normal",version:"1.0",browsers:"all",desc:"Selects a face that is classified as 'normal'."},{name:"oblique",version:"1.0",browsers:"all",desc:"Selects a font that is labeled 'oblique'."}]},{name:"font-synthesis",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#propdef-font-synthesis",syntax:"html:lang(ar) { $(name): none; }",desc:"This property controls whether user agents are allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces.",values:[{name:"none",version:"3.0",browsers:"all",desc:"Disallow all synthetic faces."},{name:"style",version:"3.0",browsers:"all"},{name:"weight",version:"3.0",browsers:"all"}]},{name:"font-variant",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#font-variant-prop",syntax:"div { $(name): small-caps; }",desc:"Specifies variant representations of the font",values:[{name:"normal",version:"1.0",browsers:"all",desc:"Specifies a face that is not labeled as a small-caps font."},{name:"small-caps",version:"1.0",browsers:"all",desc:"Specifies a font that is labeled as a small-caps font. If a genuine small-caps font is not available, user agents should simulate a small-caps font."}]},{name:"font-variant-alternates",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#propdef-font-variant-alternates",syntax:"h2 { $(name): styleset(3,5); }",desc:"For any given character, fonts can provide a variety of alternate glyphs in addition to the default glyph for that character. This property provides control over the selection of these alternate glyphs.",values:[{name:"annotation()",version:"3.0",browsers:"all",desc:"Enables display of alternate annotation forms."},{name:"character-variant()",version:"3.0",browsers:"all",desc:"Enables display of specific character variants."},{name:"contextual",version:"3.0",browsers:"all",desc:"Enables display of contextual alternates."},{name:"historical-forms",version:"3.0",browsers:"all",desc:"Enables display of historical forms."},{name:"no-contextual",version:"3.0",browsers:"all",desc:"Disables display of contextual alternates."},{name:"normal",version:"3.0",browsers:"all"},{name:"ornaments()",version:"3.0",browsers:"all",desc:"Enables replacement of default glyphs with ornaments, if provided in the font."},{name:"ruby",version:"3.0",browsers:"all",desc:"Enables display of ruby glyphs. This value only selects a glyph for use in ruby text, it does not affect font scaling."},{name:"styleset()",version:"3.0",browsers:"all",desc:"Enables display with stylistic sets."},{name:"stylistic()",version:"3.0",browsers:"all",desc:"Enables display of stylistic alternates."},{name:"swash()",version:"3.0",browsers:"all",desc:"Enables display of swash glyphs."}]},{name:"font-variant-caps",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#font-variant-caps-prop",syntax:"p { $(name): titling-caps; }",desc:"Specifies control over capitalized forms.",values:[{name:"all-petite-caps",version:"3.0",browsers:"all",desc:"Enables display of petite capitals for both upper and lowercase letters."},{name:"all-small-caps",version:"3.0",browsers:"all",desc:"Enables display of small capitals for both upper and lowercase letters."},{name:"normal",version:"3.0",browsers:"all"},{name:"petite-caps",version:"3.0",browsers:"all",desc:"Enables display of petite capitals."},{name:"small-caps",version:"3.0",browsers:"all",desc:"Enables display of small capitals. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters."},{name:"titling-caps",version:"3.0",browsers:"all",desc:"Enables display of titling capitals."},{name:"unicase",version:"3.0",browsers:"all",desc:"Enables display of mixture of small capitals for uppercase letters with normal lowercase letters."}]},{name:"font-variant-east-asian",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#font-variant-east-asian-prop",syntax:"mark { $(name): normal; }",desc:"Allows control of glyph substitute and positioning in East Asian text.",values:[{name:"full-width",version:"3.0",browsers:"all",desc:"Enables rendering of full-width variants."},{name:"hojo-kanji",version:"3.0",browsers:"all",desc:"Enables rendering of Hojo Kanji forms."},{name:"jis04",version:"3.0",browsers:"all",desc:"Enables rendering of JIS04 forms."},{name:"jis78",version:"3.0",browsers:"all",desc:"Enables rendering of JIS78 forms."},{name:"jis83",version:"3.0",browsers:"all",desc:"Enables rendering of JIS83 forms."},{name:"jis90",version:"3.0",browsers:"all",desc:"Enables rendering of JIS90 forms."},{name:"nlckanji",version:"3.0",browsers:"all",desc:"Enables rendering of NLC Kanji forms."},{name:"normal",version:"3.0",browsers:"all"},{name:"proportional-width",version:"3.0",browsers:"all",desc:"Enables rendering of proportionally-spaced variants."},{name:"simplified",version:"3.0",browsers:"all",desc:"Enables rendering of simplified forms."},{name:"traditional",version:"3.0",browsers:"all",desc:"Enables rendering of traditional forms."}]},{name:"font-variant-ligatures",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#font-variant-ligatures-prop",syntax:"div { $(name): historical-ligatures; }",desc:"Specifies control over which ligatures are enabled or disabled. A value of ‘normal’ implies that the defaults set by the font are used.",values:[{name:"additional-ligatures",version:"3.0",browsers:"all",desc:"Enables display of additional ligatures."},{name:"common-ligatures",version:"3.0",browsers:"all",desc:"Enables display of common ligatures."},{name:"historical-ligatures",version:"3.0",browsers:"all",desc:"Enables display of historical ligatures."},{name:"no-additional-ligatures",version:"3.0",browsers:"all",desc:"Disables display of additional ligatures."},{name:"no-common-ligatures",version:"3.0",browsers:"all",desc:"Disables display of common ligatures."},{name:"no-historical-ligatures",version:"3.0",browsers:"all",desc:"Disables display of historical ligatures."},{name:"normal",version:"3.0",browsers:"all",desc:"Implies that the defaults set by the font are used."}]},{name:"font-variant-numeric",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#font-variant-numeric-prop",syntax:".amount { $(name): oldstyle-nums diagonal-fractions; }",desc:"Specifies control over numerical forms.",values:[{name:"diagonal-fractions",version:"3.0",browsers:"all",desc:"Enables display of lining diagonal fractions."},{name:"lining-nums",version:"3.0",browsers:"all",desc:"Enables display of lining numerals."},{name:"normal",version:"3.0",browsers:"all"},{name:"oldstyle-nums",version:"3.0",browsers:"all",desc:"Enables display of old-style numerals."},{name:"proportional-nums",version:"3.0",browsers:"all",desc:"Enables display of proportional numerals."},{name:"slashed-zero",version:"3.0",browsers:"all",desc:"Enables display of slashed zeros."},{name:"stacked-fractions",version:"3.0",browsers:"all",desc:"Enables display of lining stacked fractions."},{name:"tabular-nums",version:"3.0",browsers:"all",desc:"Enables display of tabular numerals."}]},{name:"font-variant-position",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-fonts/#propdef-font-variant-position",syntax:"sub { $(name): subscript; }",desc:"Specifies the vertical position",values:[{name:"normal",version:"3.0",browsers:"all"},{name:"ordinal",version:"3.0",browsers:"all"},{name:"sub",version:"3.0",browsers:"all"},{name:"super",version:"3.0",browsers:"all"}]},{name:"font-weight",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#font-weight-the-font-weight-property",syntax:"th { $(name): bold; }",desc:"Specifies weight of glyphs in the font, their degree of blackness or stroke thickness.",values:[{name:"100",version:"1.0",browsers:"all",desc:"Thin"},{name:"200",version:"1.0",browsers:"all",desc:"Extra Light (Ultra Light)"},{name:"300",version:"1.0",browsers:"all",desc:"Light"},{name:"400",version:"1.0",browsers:"all",desc:"Normal"},{name:"500",version:"1.0",browsers:"all",desc:"Medium"},{name:"600",version:"1.0",browsers:"all",desc:"Semi Bold (Demi Bold)"},{name:"700",version:"1.0",browsers:"all",desc:"Bold"},{name:"800",version:"1.0",browsers:"all",desc:"Extra Bold (Ultra Bold)"},{name:"900",version:"1.0",browsers:"all",desc:"Black (Heavy)"},{name:"bold",version:"1.0",browsers:"all",desc:"Same as 700"},{name:"bolder",version:"1.0",browsers:"all",desc:"Specifies the weight of the face bolder than the inherited value."},{name:"lighter",version:"1.0",browsers:"all",desc:"Specifies the weight of the face lighter than the inherited value."},{name:"normal",version:"1.0",browsers:"all",desc:"Same as 400"}]},{name:"glyph-orientation-horizontal",restriction:"angle",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/text.html#GlyphOrientationHorizontalProperty",desc:"Sets or retrieves a value that alters the orientation of a sequence of characters relative to an inline-progression-direction of horizontal."},{name:"glyph-orientation-vertical",restriction:"angle, enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/text.html#GlyphOrientationVerticalProperty",desc:"Sets or retrieves a value that alters the orientation of a sequence of characters relative to an inline-progression-direction of vertical.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"Sets the orientation based on the fullwidth or non-fullwidth characters and the most common orientation."}}},{name:"grid-cell",restriction:"string, enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-cell",syntax:"#item1 { $(name): 'n'; }",desc:"The grid-cell is valid on grid items and places the grid item inside the explicitly named grid cell.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"grid-column",restriction:"integer, string, enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-column",syntax:"#item1 { $(name): start end; }",desc:"grid-column is used to place grid items and explicitly defined grid cells in the Grid.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"end",version:"3.0",browsers:"all"},{name:"start",version:"3.0",browsers:"all"}]},{name:"grid-column-align",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-column-align",syntax:"article { $(name): center; }",desc:"Aligns the columns in a grid.",values:[{name:"center",version:"3.0",browsers:"all",desc:"Places the center of the Grid Item's margin box at the center of the the Grid Item's column."},{name:"end",version:"3.0",browsers:"all",desc:"Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's column."},{name:"start",version:"3.0",browsers:"all",desc:"Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's column."},{name:"stretch",version:"3.0",browsers:"all",desc:"Ensures that the Grid Item's margin box is equal to the size of the Grid Item's column."}]},{name:"grid-columns",restriction:"",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-columns",syntax:"div { $(name): 150px 1fr; }",desc:"Lays out the columns of the grid."},{name:"grid-column-sizing",restriction:"",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-column-sizing",desc:"By default, any implicit columns or rows created are auto sized to content. The default size can be changed using the grid-column-sizing and grid-row-sizing properties.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"minmax()",version:"3.0",browsers:"all"}]},{name:"grid-column-span",restriction:"integer",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row-span-and-grid-column-span",syntax:"#item { $(name): 2; }.",desc:"Specifies the number of columns to span."},{name:"grid-flow",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-flow",syntax:"#item { $(name): rows; }",desc:"Grid items can be automatically placed into an unoccupied space of the grid. The grid-flow property controls the direction in which the search for unoccupied space takes place.",values:[{name:"columns",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"rows",version:"3.0",browsers:"all"}]},{name:"grid-row",restriction:"integer, string, enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row",syntax:"#item1 { $(name): start end; }",desc:"grid-row is used to place grid items and explicitly defined grid cells in the Grid.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"end",version:"3.0",browsers:"all"},{name:"start",version:"3.0",browsers:"all"}]},{name:"grid-row-align",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row-align",syntax:"div { $(name): stretch; }",desc:"Aligns the rows in a grid.",values:[{name:"center",version:"3.0",browsers:"all",desc:"Places the center of the Grid Item's margin box at the center of the the Grid Item's row."},{name:"end",version:"3.0",browsers:"all",desc:"Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's row."},{name:"start",version:"3.0",browsers:"all",desc:"Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's row."},{name:"stretch",version:"3.0",browsers:"all",desc:"Ensures that the Grid Item's margin box is equal to the size of the Grid Item's row."}]},{name:"grid-rows",restriction:"",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-rows",syntax:"div { $(name): 50px 1fr 50px; }",desc:"Lays out the columns of the grid."},{name:"grid-row-sizing",restriction:"",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row-sizing",desc:"By default, any implicit columns or rows created are auto sized to content. The default size can be changed using the grid-column-sizing and grid-row-sizing properties.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"minmax()",version:"3.0",browsers:"all"}]},{name:"grid-row-span",restriction:"integer",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row-span-and-grid-column-span",syntax:"#item { $(name): 2; }.",desc:"Specifies the number of rows to span."},{name:"grid-template",restriction:"string, enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-template",syntax:"#item1 { $(name): 'hh' 'nm' 'ff'; }",desc:"The grid-template property provides a visualization of the grid element's structure while simultaneously defining the grid cells which can be used to layer or stack the child elements of the grid.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"hanging-punctuation",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#hanging-punctuation0",syntax:"p { $(name): first; }",desc:"Determines whether a punctuation mark, if one is present, may be placed outside the content area at the start or at the end of a full line of text.",values:[{name:"allow-end",version:"3.0",browsers:"all",desc:"Punctuation (specifically, stops and commas) may hang outside the end edge of all lines if the punctuation does not otherwise fit prior to justification."},{name:"first",version:"3.0",browsers:"all",desc:"Punctuation (specifically, opening brackets and quotes) may hang outside the start edge of the first line."},{name:"force-end",version:"3.0",browsers:"all",desc:"Punctuation (specifically, stops and commas) may hang outside the end edge of all lines. If justification is enabled on this line, then it will force the punctuation to hang."},{name:"none",version:"3.0",browsers:"all",desc:"No characters can hang."}]},{name:"height",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#height",syntax:"footer { $(name): 100px; }",desc:"Specifies the height of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",values:{value:{name:"auto",version:"1.0",browsers:"all",desc:"The height depends on the values of other properties."}}},{name:"hyphens",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#hyphens0",syntax:"div { $(name): manual; }",desc:"This property controls whether hyphenation is allowed to create more break opportunities within a line of text.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."},{name:"manual",version:"3.0",browsers:"all",desc:"Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"},{name:"none",version:"3.0",browsers:"all",desc:"Words are not broken at line breaks, even if characters inside the word suggest line break points."}]},{name:"icon",restriction:"url",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-ui/#icon",syntax:"auto | 'uri' [, 'uri']*",desc:"Provides the author the ability to style any arbitrary element with an iconic equivalent. An element's icon is not used/rendered unless the 'content' property is set to the value 'icon'.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Use a default generic icon provided by the user agent."},{name:"url()",version:"3.0",browsers:"all"}]},{name:"image-orientation",restriction:"angle",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#image-orientation",syntax:"auto | ",desc:"Rotates an image in the clockwise direction",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"The image will be set to the orientation of the page"}}},{name:"image-rendering",restriction:"enum",version:"3.0",browsers:"C,FF3.6,O11.6,S",ref:"http://www.w3.org/TR/SVG11/painting.html#ImageRenderingProperty",desc:"The creator of SVG content might want to provide a hint to the implementation about how to make speed vs. quality tradeoffs as it performs image processing. The ‘image-rendering’ property provides a hint to the SVG user agent about how to optimize its image rendering.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"-moz-crisp-edges",version:"3.0",browsers:"FF"},{name:"optimizeQuality",version:"3.0",browsers:"all"},{name:"optimizeSpeed",version:"3.0",browsers:"all"}]},{name:"ime-mode",restriction:"enum",version:"3.0",browsers:"FF3,IE5",ref:"http://www.w3.org/TR/css3-ui/#ime-mode",syntax:"body { $(name): active; }",desc:"Controls the state of the input method editor for text fields.",values:[{name:"active",version:"3.0",browsers:"all",desc:"The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."},{name:"auto",version:"3.0",browsers:"all",desc:"No change is made to the current input method editor state. This is the default."},{name:"disabled",version:"3.0",browsers:"all",desc:"The input method editor is disabled and may not be activated by the user."},{name:"inactive",version:"3.0",browsers:"all",desc:"The input method editor is initially inactive, but the user may activate it if they wish."},{name:"normal",version:"3.0",browsers:"all",desc:"The IME state should be normal; this value can be used in a user style sheet to override the page setting."}]},{name:"justify-content",restriction:"enum",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#align-content",syntax:"p { $(name): flex-start; }",desc:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",values:[{name:"center",version:"3.0",browsers:"all"},{name:"flex-end",version:"3.0",browsers:"all"},{name:"flex-start",version:"3.0",browsers:"all"},{name:"space-around",version:"3.0",browsers:"all"},{name:"space-between",version:"3.0",browsers:"all"}]},{name:"kerning",restriction:"length, enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/text.html#KerningProperty",desc:"Indicates whether the user agent should adjust inter-glyph spacing based on kerning tables that are included in the relevant font or instead disable auto-kerning and set inter-character spacing to a specific length.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"Indicates that the user agent should adjust inter-glyph spacing based on kerning tables that are included in the font that will be used."}}},{name:"left",restriction:"length, percentage",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/visuren.html#propdef-left",syntax:"article { $(name): 50px; }",desc:"Specifies how far an absolutely positioned box's left margin edge is offset to the right of the left edge of the box's 'containing block'.",values:{value:{name:"auto",version:"2.0",browsers:"all",desc:"For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"}}},{name:"letter-spacing",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-text/#letter-spacing0",syntax:"h2 { $(name): 2px; }",desc:"Specifies the minimum, maximum, and optimal spacing between grapheme clusters.",values:{value:{name:"normal",version:"1.0",browsers:"all",desc:"The spacing is the normal spacing for the current font. It is typically zero-length."}}},{name:"lighting-color",restriction:"color",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/filters.html#LightingColorProperty",desc:"Defines the color of the light source for filter primitives 'feDiffuseLighting' and 'feSpecularLighting'.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"line-break",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#line-break0",syntax:"p { $(name): normal; }",desc:"Specifies what set of line breaking restrictions are in effect within the element.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The UA determines the set of line-breaking restrictions to use for CJK scripts, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines."},{name:"loose",version:"3.0",browsers:"all",desc:"Breaks text using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."},{name:"normal",version:"3.0",browsers:"all",desc:"Breaks text using the most common set of line-breaking rules."},{name:"strict",version:"3.0",browsers:"all",desc:"Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."}]},{name:"line-height",restriction:"number, length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-linebox/#line-height",syntax:"#menu { $(name): 22px; }",desc:"Determines the block-progression dimension of the text content area of an inline box.",values:[{name:"none",version:"1.0",browsers:"all",desc:"The computed value of the property is the ancestor block element font-size."},{name:"normal",version:"1.0",browsers:"all",desc:"Tells user agents to set the computed value to a 'reasonable' value based on the font size of the element."}]},{name:"list-style",restriction:"enum, url",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-lists/#list-style",syntax:"ul { $(name): square url('square.png');}",desc:"Shorthand for setting 'list-style-type', 'list-style-position' and 'list-style-image'",values:[{name:"armenian",version:"1.0",browsers:"all"},{name:"circle",version:"1.0",browsers:"all",desc:"A hollow circle."},{name:"decimal",version:"1.0",browsers:"all"},{name:"decimal-leading-zero",version:"1.0",browsers:"all"},{name:"disc",version:"1.0",browsers:"all",desc:"A filled circle."},{name:"georgian",version:"1.0",browsers:"all"},{name:"hanging",version:"1.0",browsers:"none",desc:"As 'inside', except the marker is instead placed immediately before the first text or significant whitespace in the list item or its children"},{name:"inside",version:"1.0",browsers:"all",desc:"The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."},{name:"lower-alpha",version:"1.0",browsers:"all"},{name:"lower-greek",version:"1.0",browsers:"all"},{name:"lower-latin",version:"1.0",browsers:"all"},{name:"lower-roman",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all"},{name:"outside",version:"1.0",browsers:"all",desc:"The ::marker pseudo-element is an inline element placed immediately before all ::before pseudo-elements in the principal block box, after which the element's content flows."},{name:"square",version:"1.0",browsers:"all",desc:"A filled square."},{name:"upper-alpha",version:"1.0",browsers:"all"},{name:"upper-latin",version:"1.0",browsers:"all"},{name:"upper-roman",version:"1.0",browsers:"all"},{name:"url()",version:"1.0",browsers:"all"}]},{name:"list-style-image",restriction:"url",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-lists/#list-style-image",syntax:" | none",desc:"Sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker.",values:[{name:"none",version:"1.0",browsers:"all"},{name:"url()",version:"1.0",browsers:"all"}]},{name:"list-style-position",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-lists/#list-style-position",syntax:"ul { $(name): inside; }",desc:"Specifies the position of the '::marker' pseudo-element's box in the list item.",values:[{name:"hanging",version:"1.0",browsers:"none",desc:"As 'inside', except the marker is instead placed immediately before the first text or significant whitespace in the list item or its children"},{name:"inside",version:"1.0",browsers:"all",desc:"The marker box is outside the principal block box, as described in the section on the ::marker pseudo-element below."},{name:"outside",version:"1.0",browsers:"all",desc:"The ::marker pseudo-element is an inline element placed immediately before all ::before pseudo-elements in the principal block box, after which the element's content flows."}]},{name:"list-style-type",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-lists/#list-style-type",syntax:" | | | | | | normal | none",desc:"Can be used to make an element look like a standard user interface element on the platform.",values:[{name:"armenian",version:"1.0",browsers:"all"},{name:"circle",version:"1.0",browsers:"all",desc:"A hollow circle."},{name:"decimal",version:"1.0",browsers:"all"},{name:"decimal-leading-zero",version:"1.0",browsers:"all"},{name:"disc",version:"1.0",browsers:"all",desc:"A filled circle."},{name:"georgian",version:"1.0",browsers:"all"},{name:"lower-alpha",version:"1.0",browsers:"all"},{name:"lower-greek",version:"1.0",browsers:"all"},{name:"lower-latin",version:"1.0",browsers:"all"},{name:"lower-roman",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all"},{name:"square",version:"1.0",browsers:"all",desc:"A filled square."},{name:"upper-alpha",version:"1.0",browsers:"all"},{name:"upper-latin",version:"1.0",browsers:"all"},{name:"upper-roman",version:"1.0",browsers:"all"}]},{name:"margin",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#margin1",syntax:"div { $(name): 4px 7px 2px 4px; }",desc:"Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",values:{value:{name:"auto",version:"1.0",browsers:"all"}}},{name:"margin-bottom",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#margin1",syntax:"div { $(name): 4px; }",desc:"Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",values:{value:{name:"auto",version:"1.0",browsers:"all"}}},{name:"margin-left",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#margin1",syntax:"div { $(name): 4px; }",desc:"Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",values:{value:{name:"auto",version:"1.0",browsers:"all"}}},{name:"margin-right",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#margin1",syntax:"div { $(name): 4px; }",desc:"Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",values:{value:{name:"auto",version:"1.0",browsers:"all"}}},{name:"margin-top",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#margin1",syntax:"div { $(name): 4px; }",desc:"Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative.",values:{value:{name:"auto",version:"1.0",browsers:"all"}}},{name:"marker",restriction:"url",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#MarkerProperty",desc:"Specifies the marker symbol that shall be used for all points on the sets the value for all vertices on the given ‘path’ element or basic shape.",values:[{name:"none",version:"3.0",browsers:"all"},{name:"url()",version:"3.0",browsers:"all"}]},{name:"marker-end",restriction:"url",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#MarkerEndProperty",desc:"Defines the arrowhead or polymarker that shall be drawn at the final vertex.",values:[{name:"none",version:"3.0",browsers:"all"},{name:"url()",version:"3.0",browsers:"all"}]},{name:"marker-mid",restriction:"url",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#MarkerMidProperty",desc:"Defines the arrowhead or polymarker that shall be drawn at every other vertex.",values:[{name:"none",version:"3.0",browsers:"all"},{name:"url()",version:"3.0",browsers:"all"}]},{name:"marker-start",restriction:"url",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#MarkerStartProperty",desc:"Defines the arrowhead or polymarker that shall be drawn at the first vertex of the given ‘path’ element or basic shape.",values:[{name:"none",version:"3.0",browsers:"all"},{name:"url()",version:"3.0",browsers:"all"}]},{name:"marquee-direction",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-box/#marquee-direction",syntax:"li { $(name): forward; }",desc:"Determines the initial direction in which the content moves if the marquee effect is used.",values:[{name:"forward",version:"3.0",browsers:"all"},{name:"reverse",version:"3.0",browsers:"all"}]},{name:"marquee-loop",restriction:"integer",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-box/#marquee-loop",syntax:"li { $(name): 1; }",desc:"Specifies how often the content moves.",values:{value:{name:"infinite",version:"3.0",browsers:"all"}}},{name:"marquee-speed",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-box/#marquee-speed",syntax:"li { $(name): fast; }",desc:"This property determines how fast the content scrolls.",values:[{name:"fast",version:"3.0",browsers:"all"},{name:"normal",version:"3.0",browsers:"all"},{name:"slow",version:"3.0",browsers:"all"}]},{name:"marquee-style",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-box/#marquee-style",syntax:"li { $(name): scroll; }",desc:"Specifies the style of how the content move.",values:[{name:"alternate",version:"3.0",browsers:"all"},{name:"scroll",version:"3.0",browsers:"all"},{name:"slide",version:"3.0",browsers:"all"}]},{name:"mask",restriction:"url, enum",version:"3.0",browsers:"FF3.5,IE10,O9",ref:"http://www.w3.org/TR/SVG/masking.html#ClipPathElement",desc:"Allows authors to control under what circumstances (if any) a particular graphic element can become the target of mouse events.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"max-height",restriction:"length, percentage",version:"2.0",browsers:"C,FF1,IE7,O7,S1",ref:"http://www.w3.org/TR/css3-box/#max-height",syntax:"footer { $(name): 300px; }",desc:"Allows authors to constrain content height to a certain range.",values:{value:{name:"none",version:"2.0",browsers:"all",desc:"No limit on the height of the box."}}},{name:"max-width",restriction:"length, percentage",version:"2.0",browsers:"C,FF1,IE7,O7,S1",ref:"http://www.w3.org/TR/css3-box/#max-width",syntax:"footer { $(name): 300px; }",desc:"Allows authors to constrain content width to a certain range.",values:{value:{name:"none",version:"2.0",browsers:"all",desc:"No limit on the width of the box."}}},{name:"max-zoom",restriction:"number, percentage",version:"",browsers:"all"},{name:"min-height",restriction:"length, percentage",version:"2.0",browsers:"C,FF1,IE7,O7,S1",ref:"http://www.w3.org/TR/css3-box/#min-height",syntax:"footer { $(name): 300px; }",desc:"Allows authors to constrain content height to a certain range."},{name:"min-width",restriction:"length, percentage",version:"2.0",browsers:"C,FF1,IE7,O7,S1",ref:"http://www.w3.org/TR/css3-box/#min-width",syntax:"footer { $(name): 300px; }",desc:"Allows authors to constrain content width to a certain range."},{name:"min-zoom",restriction:"number, percentage",version:"",browsers:"all"},{name:"move-to",restriction:"identifier",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#moving",syntax:"normal | here | ",desc:"Property causes the element or pseudo-element to be removed from the flow and reinserted at a later point in the document.",values:[{name:"here",version:"3.0",browsers:"all",desc:"The element or pseudo-element is not moved. This value inhibits the creation of '::alternate' pseudo-elements and any pseudo-elements that have such a pseudo-element as a superior."},{name:"normal",version:"3.0",browsers:"all",desc:"For '::alternate' pseudo-elements, if the superior parent uses the 'footnote' counter in its 'content' property then the computed value of 'move-to' is 'footnotes'."}]},{name:"-moz-animation",restriction:"time, enum, identifier, number",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-animations/#animation",syntax:"div { $(name): movearound 4s ease 3 normal; }",desc:"Shorthand property combines six of the animation properties into a single property.",values:[{name:"alternate",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",version:"3.0",browsers:"all",desc:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",version:"3.0",browsers:"all",desc:"Both forwards and backwards fill modes are applied."},{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"forwards",version:"3.0",browsers:"all",desc:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",version:"3.0",browsers:"all",desc:"Causes the animation to repeat forever."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"none",version:"3.0",browsers:"all",desc:"No animation is performed"},{name:"normal",version:"3.0",browsers:"all",desc:"Normal playback."},{name:"reverse",version:"3.0",browsers:"all",desc:"All iterations of the animation are played in the reverse direction from the way they were specified."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-moz-animation-delay",restriction:"time",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-animations/#animation-delay",syntax:"div { $(name): 4s; }",desc:"Defines when the animation will start. An 'animation-delay' value of '0' means the animation will execute as soon as it is applied. Otherwise, the value specifies an offset from the moment the animation is applied, and the animation will delay execution by that offset."},{name:"-moz-animation-direction",restriction:"enum",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-animations/#animation-direction",syntax:"div { $(name): normal; }",desc:"Defines whether or not the animation should play in reverse on alternate cycles.",values:[{name:"alternate",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"normal",version:"3.0",browsers:"all",desc:"Normal playback."},{name:"reverse",version:"3.0",browsers:"all",desc:"All iterations of the animation are played in the reverse direction from the way they were specified."}]},{name:"-moz-animation-duration",restriction:"time",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-animations/#animation-duration",syntax:"div { $(name): 4s; }",desc:"Defines the length of time that an animation takes to complete one cycle."},{name:"-moz-animation-iteration-count",restriction:"number",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-animations/#animation-iteration-count",syntax:"div { $(name): 3; }",desc:"Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",values:{value:{name:"infinite",version:"3.0",browsers:"all",desc:"Causes the animation to repeat forever."}}},{name:"-moz-animation-name",restriction:"identifier",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-animations/#the-animation-name-property-",syntax:"div { $(name): movearound; }",desc:"Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No animation is performed"}}},{name:"-moz-animation-play-state",restriction:"enum",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-animations/#animation-play-state",syntax:"div { $(name): running; }",desc:"Defines whether the animation is running or paused.",values:[{name:"paused",version:"3.0",browsers:"all",desc:"A running animation will be paused."},{name:"running",version:"3.0",browsers:"all",desc:"Resume playback of a paused animation."}]},{name:"-moz-animation-timing-function",restriction:"enum",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-animations/#animation-timing-function",syntax:"div { $(name): ease; }",desc:"Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",values:[{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-moz-appearance",restriction:"enum",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-appearance",syntax:".example { $(name): toolbarbutton; }",desc:"The -moz-appearance CSS property is used in Gecko (Firefox) to display an element using a platform-native styling based on the operating system's theme.",values:[{name:"button",version:"3.0",browsers:"all"},{name:"button-arrow-down",version:"3.0",browsers:"all"},{name:"button-arrow-next",version:"3.0",browsers:"all"},{name:"button-arrow-previous",version:"3.0",browsers:"all"},{name:"button-arrow-up",version:"3.0",browsers:"all"},{name:"button-bevel",version:"3.0",browsers:"all"},{name:"checkbox",version:"3.0",browsers:"all"},{name:"checkbox-container",version:"3.0",browsers:"all"},{name:"checkbox-label",version:"3.0",browsers:"all"},{name:"dialog",version:"3.0",browsers:"all"},{name:"groupbox",version:"3.0",browsers:"all"},{name:"listbox",version:"3.0",browsers:"all"},{name:"menuarrow",version:"3.0",browsers:"all"},{name:"menuimage",version:"3.0",browsers:"all"},{name:"menuitem",version:"3.0",browsers:"all"},{name:"menuitemtext",version:"3.0",browsers:"all"},{name:"menulist",version:"3.0",browsers:"all"},{name:"menulist-button",version:"3.0",browsers:"all"},{name:"menulist-text",version:"3.0",browsers:"all"},{name:"menulist-textfield",version:"3.0",browsers:"all"},{name:"menupopup",version:"3.0",browsers:"all"},{name:"menuradio",version:"3.0",browsers:"all"},{name:"menuseparator",version:"3.0",browsers:"all"},{name:"-moz-mac-unified-toolbar",version:"3.0",browsers:"all"},{name:"-moz-win-borderless-glass",version:"3.0",browsers:"all"},{name:"-moz-win-browsertabbar-toolbox",version:"3.0",browsers:"all"},{name:"-moz-win-communications-toolbox",version:"3.0",browsers:"all"},{name:"-moz-win-glass",version:"3.0",browsers:"all"},{name:"-moz-win-media-toolbox",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"progressbar",version:"3.0",browsers:"all"},{name:"progresschunk",version:"3.0",browsers:"all"},{name:"radio",version:"3.0",browsers:"all"},{name:"radio-container",version:"3.0",browsers:"all"},{name:"radio-label",version:"3.0",browsers:"all"},{name:"radiomenuitem",version:"3.0",browsers:"all"},{name:"resizer",version:"3.0",browsers:"all"},{name:"resizerpanel",version:"3.0",browsers:"all"},{name:"scrollbarbutton-down",version:"3.0",browsers:"all"},{name:"scrollbarbutton-left",version:"3.0",browsers:"all"},{name:"scrollbarbutton-right",version:"3.0",browsers:"all"},{name:"scrollbarbutton-up",version:"3.0",browsers:"all"},{name:"scrollbar-small",version:"3.0",browsers:"all"},{name:"scrollbartrack-horizontal",version:"3.0",browsers:"all"},{name:"scrollbartrack-vertical",version:"3.0",browsers:"all"},{name:"separator",version:"3.0",browsers:"all"},{name:"spinner",version:"3.0",browsers:"all"},{name:"spinner-downbutton",version:"3.0",browsers:"all"},{name:"spinner-textfield",version:"3.0",browsers:"all"},{name:"spinner-upbutton",version:"3.0",browsers:"all"},{name:"statusbar",version:"3.0",browsers:"all"},{name:"statusbarpanel",version:"3.0",browsers:"all"},{name:"tab",version:"3.0",browsers:"all"},{name:"tabpanels",version:"3.0",browsers:"all"},{name:"tab-scroll-arrow-back",version:"3.0",browsers:"all"},{name:"tab-scroll-arrow-forward",version:"3.0",browsers:"all"},{name:"textfield",version:"3.0",browsers:"all"},{name:"textfield-multiline",version:"3.0",browsers:"all"},{name:"toolbar",version:"3.0",browsers:"all"},{name:"toolbox",version:"3.0",browsers:"all"},{name:"tooltip",version:"3.0",browsers:"all"},{name:"treeheadercell",version:"3.0",browsers:"all"},{name:"treeheadersortarrow",version:"3.0",browsers:"all"},{name:"treeitem",version:"3.0",browsers:"all"},{name:"treetwistyopen",version:"3.0",browsers:"all"},{name:"treeview",version:"3.0",browsers:"all"},{name:"treewisty",version:"3.0",browsers:"all"},{name:"window",version:"3.0",browsers:"all"}]},{name:"-moz-backface-visibility",restriction:"enum",version:"3.0",browsers:"FF10",ref:"http://www.w3.org/TR/css3-3d-transforms/#backface-visibility",syntax:"div { $(name): hidden; }",desc:"Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",values:[{name:"hidden",version:"3.0",browsers:"all"},{name:"visible",version:"3.0",browsers:"all"}]},{name:"-moz-background-clip",restriction:"enum",version:"3.0",browsers:"FF1-3.6",ref:"http://www.w3.org/TR/css3-background/#the-background-clip",syntax:"header { $(name): border-box; }",desc:"Determines the background painting area.",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the border box."},{name:"content-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the content box."},{name:"padding",version:"3.0",browsers:"all"},{name:"padding-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the padding box"}]},{name:"-moz-background-inline-policy",restriction:"enum",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-background-inline-policy",syntax:"div { $(name): bounding-box; }",desc:"In Gecko-based applications like Firefox, the -moz-background-inline-policy CSS property specifies how the background image of an inline element is determined when the content of the inline element wraps onto multiple lines. The choice of position has significant effects on repetition.",values:[{name:"bounding-box",version:"3.0",browsers:"all"},{name:"continuous",version:"3.0",browsers:"all"},{name:"each-box",version:"3.0",browsers:"all"}]},{name:"-moz-background-origin",restriction:"enum",version:"3.0",browsers:"FF1",ref:"http://www.w3.org/TR/css3-background/#the-background-origin",syntax:"header { $(name): border-box; }",desc:"For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the border box."},{name:"content-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the content box."},{name:"padding-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the padding box"}]},{name:"-moz-background-size",restriction:"length, percentage",version:"3.0",browsers:"FF3.6",ref:"http://www.w3.org/TR/css3-background/#the-background-size",syntax:"header { $(name): 20px; }",desc:"Specifies the size of the background images.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"contain",version:"3.0",browsers:"all",desc:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."},{name:"cover",version:"3.0",browsers:"all",desc:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."}]},{name:"-moz-border-bottom-colors",restriction:"color",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-border-left-colors",syntax:"td { $(name): #00ff33 #33ff66 #66ff99; }",desc:"In Mozilla applications like Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-moz-border-image",restriction:"length, percentage, number, url, enum",version:"3.0",browsers:"FF3.6",ref:"http://www.w3.org/TR/css3-background/#border-image",syntax:"td { $(name): url(border.png) 30 30 round;}",desc:"Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."},{name:"fill",version:"3.0",browsers:"all",desc:"Causes the middle part of the border-image to be preserved. (By default it is discarded, i.e., treated as empty.)"},{name:"none",version:"3.0",browsers:"all"},{name:"repeat",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area."},{name:"round",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."},{name:"space",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."},{name:"stretch",version:"3.0",browsers:"all",desc:"The image is stretched to fill the area."},{name:"url()",version:"3.0",browsers:"all"}]},{name:"-moz-border-left-colors",restriction:"color",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-border-left-colors",syntax:"td { $(name): #00ff33 #33ff66 #66ff99; }",desc:"In Mozilla applications like Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-moz-border-right-colors",restriction:"color",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-border-left-colors",syntax:"td { $(name): #00ff33 #33ff66 #66ff99; }",desc:"In Mozilla applications like Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-moz-border-top-colors",restriction:"color",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-border-left-colors",syntax:"td { $(name): #00ff33 #33ff66 #66ff99; }",desc:"In Mozilla applications like Firefox, -moz-border-bottom-colors sets a list of colors for the bottom border.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-moz-box-align",restriction:"enum",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-box-align",syntax:"div { $(name): end; }",desc:"In Mozilla applications, -moz-box-align specifies how a XUL box aligns its contents across (perpendicular to) the direction of its layout. The effect of this is only visible if there is extra space in the box.",values:[{name:"baseline",version:"3.0",browsers:"all",desc:"If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used."},{name:"center",version:"3.0",browsers:"all",desc:"Any extra space is divided evenly, with half placed above the child and the other half placed after the child."},{name:"end",version:"3.0",browsers:"all",desc:"For normal direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element."},{name:"start",version:"3.0",browsers:"all",desc:"For normal direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element."},{name:"stretch",version:"3.0",browsers:"all",desc:"The height of each child is adjusted to that of the containing block."}]},{name:"-moz-box-direction",restriction:"enum",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-box-direction",syntax:"div { $(name): reverse; }",desc:"In Mozilla applications, -moz-box-direction specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).",values:[{name:"normal",version:"3.0",browsers:"all",desc:"A box with a computed value of horizontal for box-orient displays its children from left to right. A box with a computed value of vertical displays its children from top to bottom."},{name:"reverse",version:"3.0",browsers:"all",desc:"A box with a computed value of horizontal for box-orient displays its children from right to left. A box with a computed value of vertical displays its children from bottom to top."}]},{name:"-moz-box-flex",restriction:"number",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-box-flex",syntax:"div { $(name): 1; }",desc:"In Mozilla applications, -moz-box-flex specifies how a box grows to fill the box that contains it, in the direction of the containing box's layout."},{name:"-moz-box-flexgroup",restriction:"integer",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-box-flexgroup",syntax:"div { $(name): 3; }",desc:"Flexible elements can be assigned to flex groups using the 'box-flex-group' property."},{name:"-moz-box-ordinal-group",restriction:"integer",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-box-ordinal-group",syntax:"div { $(name): 5; }",desc:"Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group."},{name:"-moz-box-orient",restriction:"enum",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-box-orient",syntax:"div { $(name): vertical; }",desc:"In Mozilla applications, -moz-box-orient specifies whether a box lays out its contents horizontally or vertically.",values:[{name:"block-axis",version:"3.0",browsers:"all",desc:"Elements are oriented along the box's axis."},{name:"horizontal",version:"3.0",browsers:"all",desc:"The box displays its children from left to right in a horizontal line."},{name:"inline-axis",version:"3.0",browsers:"all",desc:"Elements are oriented vertically."},{name:"vertical",version:"3.0",browsers:"all",desc:"The box displays its children from stacked from top to bottom vertically."}]},{name:"-moz-box-pack",restriction:"enum",version:"3.0",browsers:"FF1",ref:"https://developer.mozilla.org/en/CSS/-moz-box-pack",syntax:"div { $(name): end; }",desc:"In Mozilla applications, -moz-box-pack specifies how a box packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box.",values:[{name:"center",version:"3.0",browsers:"all",desc:"The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."},{name:"end",version:"3.0",browsers:"all",desc:"For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."},{name:"justify",version:"3.0",browsers:"all",desc:"The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."},{name:"start",version:"3.0",browsers:"all",desc:"For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."}]},{name:"-moz-box-sizing",restriction:"enum",version:"3.0",browsers:"FF1",ref:"http://www.w3.org/TR/css3-ui/#box-sizing",syntax:"div { $(name): content-box; }",desc:"Box Model addition in CSS3.",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The specified width and height (and respective min/max properties) on this element determine the border box of the element."},{name:"content-box",version:"3.0",browsers:"all",desc:"Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."},{name:"padding-box",version:"3.0",browsers:"none",desc:"The specified width and height (and respective min/max properties) on this element determine the padding box of the element."}]},{name:"-moz-column-count",restriction:"integer",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-multicol/#column-count",syntax:"div { $(name): 3; }",desc:"Describes the optimal number of columns into which the content of the element will be flowed.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"Determines the number of columns by the 'column-width' property and the element width."}}},{name:"-moz-column-gap",restriction:"length",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-multicol/#column-gap0",syntax:"div { $(name): 10px; }",desc:"Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",values:{value:{name:"normal",version:"3.0",browsers:"all",desc:"User agent specific and typically equivalent to 1em."}}},{name:"-moz-column-rule",restriction:"length, color, enum",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-multicol/#column-rule0",syntax:"header { $(name): 5px solid red;}",desc:"This property is a shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"-moz-column-rule-color",restriction:"color",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-color",syntax:"div { $(name): #ff0; }",desc:"Sets the color of the column rule",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-moz-column-rule-style",restriction:"enum",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-style",syntax:"div { $(name): solid; }",desc:"Sets the style of the rule between columns of an element.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"-moz-column-rule-width",restriction:"length",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-width",syntax:"div { $(name): 3px; }",desc:"Sets the width of the rule between columns. Negative values are not allowed.",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"-moz-column-width",restriction:"length",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-multicol/#column-width",syntax:"div { $(name): 100px; }",desc:"This property describes the width of columns in multicol elements.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"The width depends on the values of other properties."}}},{name:"-moz-font-feature-settings",restriction:"string, number",version:"3.0",browsers:"FF4",ref:"http://www.w3.org/TR/css3-fonts/#propdef-font-feature-settings",syntax:"body { $(name): 'hwid'; }",desc:"This property provides low-level control over OpenType font features. It is intended as a way of providing access to font features that are not widely used but are needed for a particular use case.",values:[{name:"normal",version:"3.0",browsers:"all",desc:"No change in glyph substitution or positioning occurs."},{name:"off",version:"3.0",browsers:"none"},{name:"on",version:"3.0",browsers:"none"}]},{name:"-moz-hyphens",restriction:"enum",version:"3.0",browsers:"FF9",ref:"http://www.w3.org/TR/css3-text/#hyphens0",syntax:"div { $(name): manual; }",desc:"This property controls whether hyphenation is allowed to create more break opportunities within a line of text.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."},{name:"manual",version:"3.0",browsers:"all",desc:"Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"},{name:"none",version:"3.0",browsers:"all",desc:"Words are not broken at line breaks, even if characters inside the word suggest line break points."}]},{name:"-moz-perspective",restriction:"number",version:"3.0",browsers:"FF10",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective",syntax:"div { $(name): none; }",desc:"Applies the same transform as the perspective() transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No perspective transform is applied."}}},{name:"-moz-perspective-origin",restriction:"percentage, length",version:"3.0",browsers:"FF10",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective-origin",syntax:"div { $(name): 10px; }",desc:"Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-moz-text-align-last",restriction:"enum",version:"3.0",browsers:"FF12",ref:"http://www.w3.org/TR/css3-text/#text-align-last0",syntax:"div { $(name): right; }",desc:"Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all",desc:"The inline contents are centered within the line box."},{name:"end",version:"3.0",browsers:"none",desc:"The inline contents are aligned to the end edge of the line box."},{name:"justify",version:"3.0",browsers:"all",desc:"The text is justified according to the method specified by the 'text-justify' property."},{name:"left",version:"3.0",browsers:"all",desc:"The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."},{name:"right",version:"3.0",browsers:"all",desc:"The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."},{name:"start",version:"3.0",browsers:"none",desc:"The inline contents are aligned to the start edge of the line box."}]},{name:"-moz-text-decoration-color",restriction:"color",version:"3.0",browsers:"FF6",ref:"http://www.w3.org/TR/css3-text/#text-decoration-color0",syntax:"div { $(name): #ff0; }",desc:"Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-moz-text-decoration-line",restriction:"enum",version:"3.0",browsers:"FF6",ref:"http://www.w3.org/TR/css3-text/#text-decoration-line0",syntax:"div { $(name): underline; }",desc:"Specifies what line decorations, if any, are added to the element.",values:[{name:"line-through",version:"3.0",browsers:"all",desc:"Each line of text has a line through the middle."},{name:"none",version:"3.0",browsers:"all",desc:"Neither produces nor inhibits text decoration."},{name:"overline",version:"3.0",browsers:"all",desc:"Each line of text has a line above it."},{name:"underline",version:"3.0",browsers:"all",desc:"Each line of text is underlined."}]},{name:"-moz-text-decoration-style",restriction:"enum",version:"3.0",browsers:"FF6",ref:"http://www.w3.org/TR/css3-text/#text-decoration-style0",syntax:"div { $(name): solid; }",desc:"Specifies the line style for underline, line-through and overline text decoration.",values:[{name:"dashed",version:"3.0",browsers:"all",desc:"Produces a dashed line style."},{name:"dotted",version:"3.0",browsers:"all",desc:"Produces a dotted line."},{name:"double",version:"3.0",browsers:"all",desc:"Produces a double line."},{name:"none",version:"3.0",browsers:"all",desc:"Produces no line."},{name:"solid",version:"3.0",browsers:"all",desc:"Produces a solid line."},{name:"wavy",version:"3.0",browsers:"all",desc:"Produces a wavy line."}]},{name:"-moz-transform",restriction:"enum",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-property",syntax:"div { $(name): rotate(-90deg); }",desc:"A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",values:[{name:"matrix()",version:"3.0",browsers:"all",desc:"Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"},{name:"matrix3d()",version:"3.0",browsers:"all",desc:"specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."},{name:"none",version:"3.0",browsers:"all"},{name:"rotate()",version:"3.0",browsers:"all",desc:"Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."},{name:"rotate3d()",version:"3.0",browsers:"all",desc:"Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."},{name:"rotateX('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the X axis."},{name:"rotateY('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Y axis."},{name:"rotateZ('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Z axis."},{name:"scale()",version:"3.0",browsers:"all",desc:"Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."},{name:"scale3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."},{name:"scaleX()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."},{name:"scaleY()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."},{name:"scaleZ()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."},{name:"skew()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."},{name:"skewX()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X axis by the given angle."},{name:"skewY()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the Y axis by the given angle."},{name:"translate()",version:"3.0",browsers:"all",desc:"Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."},{name:"translate3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."},{name:"translateX()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the X direction."},{name:"translateY()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Y direction."},{name:"translateZ()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."}]},{name:"-moz-transform-origin",restriction:"length, percentage",version:"3.0",browsers:"FF3.5",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-origin",syntax:".album { $(name): 20% 40%; }",desc:"Establishes the origin of transformation for an element. This property is applied by first translating the element by the negated value of the property, then applying the element's transform, then translating by the property value.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-moz-transition",restriction:"time, property, enum",version:"3.0",browsers:"FF4",ref:"http://www.w3.org/TR/css3-transitions/#transition",syntax:"div { $(name): background-color linear 1s; }",desc:"Shorthand property combines four of the transition properties into a single property.",values:[{name:"all",version:"3.0",browsers:"all",desc:"Every property that is able to undergo a transition will do so."},{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"none",version:"3.0",browsers:"all",desc:"No property will transition."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-moz-transition-delay",restriction:"time",version:"3.0",browsers:"FF4",ref:"http://www.w3.org/TR/css3-transitions/#transition-delay",syntax:"div { $(name): 1s; }",desc:"Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied."},{name:"-moz-transition-duration",restriction:"time",version:"3.0",browsers:"FF4",ref:"http://www.w3.org/TR/css3-transitions/#transition-duration",syntax:"div { $(name): 1s; }",desc:"Specifies how long the transition from the old value to the new value should take."},{name:"-moz-transition-property",restriction:"property",version:"3.0",browsers:"FF4",ref:"http://www.w3.org/TR/css3-transitions/#transition-property",syntax:"div { $(name): background-color; }",desc:"Specifies the name of the CSS property to which the transition is applied.",values:[{name:"all",version:"3.0",browsers:"all",desc:"Every property that is able to undergo a transition will do so."},{name:"none",version:"3.0",browsers:"all",desc:"No property will transition."}]},{name:"-moz-transition-timing-function",restriction:"enum",version:"3.0",browsers:"FF4",ref:"http://www.w3.org/TR/css3-transitions/#transition-timing-function",syntax:"div { $(name): linear; }",desc:"Describes how the intermediate values used during a transition will be calculated.",values:[{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-moz-user-focus",restriction:"",version:"",browsers:"FF1.5",ref:"https://developer.mozilla.org/en-US/docs/CSS/-moz-user-focus",syntax:"div { $(name): ignore; }",desc:"Used to indicate whether the element can have focus.",values:[{name:"ignore",version:"",browsers:"all"},{name:"normal",version:"",browsers:"all"}]},{name:"-moz-user-select",restriction:"enum",version:"3.0",browsers:"FF1.5",ref:"https://developer.mozilla.org/en/CSS/-moz-user-select",syntax:"div { $(name): text; }",desc:"Controls the appearance of selection.",values:[{name:"all",version:"3.0",browsers:"all"},{name:"element",version:"3.0",browsers:"all"},{name:"elements",version:"3.0",browsers:"all"},{name:"-moz-all",version:"3.0",browsers:"all"},{name:"-moz-none",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"text",version:"3.0",browsers:"all"},{name:"toggle",version:"3.0",browsers:"all"}]},{name:"-ms-accelerator",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.css3.com/css-accelerator/",syntax:"u { $(name): true; }",desc:"IE only. Has the ability to turn off its system underlines for accelerator keys until the ALT key is pressed",values:[{name:"false",version:"3.0",browsers:"all",desc:"The element does not contain an accelerator key sequence."},{name:"true",version:"3.0",browsers:"all",desc:"The element contains an accelerator key sequence."}]},{name:"-ms-behavior",restriction:"url",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/ie/gg192966.aspx",syntax:"div { $(name): url(http://example.com/png_fix.htc); }",desc:"IE only. Used to extend behaviors of the browser"},{name:"-ms-block-progression",restriction:"enum",version:"3.0",browsers:"IE8",ref:"http://www.w3.org/TR/2003/CR-css3-text-20030514/#Progression",syntax:"div { $(name): bt; }",desc:"The 'block-progression' property sets the block-progression value and the flow orientation",values:[{name:"bt",version:"3.0",browsers:"all",desc:"Bottom-to-top block flow. Layout is horizontal."},{name:"lr",version:"3.0",browsers:"all"},{name:"rl",version:"3.0",browsers:"all"},{name:"tb",version:"3.0",browsers:"all"}]},{name:"-ms-content-zoom-chaining",restriction:"",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441243.aspx",syntax:"div { $(name): chained; }",desc:"Gets or sets a value that indicates the zoom behavior that occurs when a user hits the content boundary during a manipulation.",values:[{name:"chained",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"}]},{name:"-ms-content-zooming",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441251.aspx",syntax:"div { $(name): zoom; }",desc:"Gets or sets a value that indicates whether zooming is enabled.",values:[{name:"none",version:"3.0",browsers:"all"},{name:"zoom",version:"3.0",browsers:"all"}]},{name:"-ms-content-zoom-limit",restriction:"percentage",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996912.aspx",syntax:"div { $(name): 10%; }",desc:"Gets or sets a shorthand value that sets values for the -ms-content-zoom-limit-min and the -ms-content-zoom-limit-max properties."},{name:"-ms-content-zoom-limit-max",restriction:"percentage",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996913.aspx",syntax:"div { $(name): 10%; }",desc:"Gets or sets a value that specifies the maximum value for the msContentZoomFactor property."},{name:"-ms-content-zoom-limit-min",restriction:"percentage",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996914.aspx",syntax:"div { $(name): 10%; }",desc:"Gets or sets a value that specifies the minimum value for the msContentZoomFactor property."},{name:"-ms-content-zoom-snap",restriction:"",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441255.aspx",syntax:"header { $(name): proximity; }",desc:"Gets or sets a shorthand value that sets values for the -ms-content-zoom-snap-type and the -ms-content-zoom-snap-points properties.",values:[{name:"mandatory",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"proximity",version:"3.0",browsers:"all"},{name:"snapInterval(100%, 100%)",version:"3.0",browsers:"all"},{name:"snapList()",version:"3.0",browsers:"all"}]},{name:"-ms-content-zoom-snap-points",restriction:"",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441259.aspx",desc:"Gets or sets a value that defines where zoom snap-points are located.",values:[{name:"snapInterval(100%, 100%)",version:"3.0",browsers:"all"},{name:"snapList()",version:"3.0",browsers:"all"}]},{name:"-ms-content-zoom-snap-type",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441264.aspx",syntax:"header { $(name): proximity; }",desc:"Gets or sets a value that indicates how zooming is affected by defined snap-points.",values:[{name:"mandatory",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"proximity",version:"3.0",browsers:"all"}]},{name:"-ms-filter",restriction:"string",version:"3.0",browsers:"IE8-9",ref:"http://msdn.microsoft.com/en-us/ie/gg192966.aspx",syntax:"div { $(name): 'alpha(opacity = 50)'; }",desc:"IE only. Used to produce visual effects."},{name:"-ms-flex",restriction:"length, number, percentage",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex",syntax:"p { $(name): 1 auto; }",desc:"specifies the parameters of a flexible length: the positive and negative flexibility, and the preferred size.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"}]},{name:"-ms-flex-align",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex-align0",syntax:"div { $(name): center; }",desc:"The 'flex-align' property changes the way free space is allocated in the length axis.",values:[{name:"baseline",version:"3.0",browsers:"all",desc:"Align all flexbox items so that their baselines line up, then distribute free space above and below the content."},{name:"center",version:"3.0",browsers:"all",desc:"The flexbox item's margin box is centered in the cross axis within the line."},{name:"end",version:"3.0",browsers:"all",desc:"The cross-end margin edge of the flexbox item is placed flush with the cross-end edge of the line."},{name:"start",version:"3.0",browsers:"all",desc:"The cross-start margin edge of the flexbox item is placed flush with the cross-start edge of the line."},{name:"stretch",version:"3.0",browsers:"all",desc:"If the cross size property of the flexbox item is anything other than 'auto', this value is identical to 'start'."}]},{name:"-ms-flex-direction",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex-direction0",syntax:"div { $(name): column; }",desc:"Specifies how flexbox items are placed in the flexbox.",values:[{name:"column",version:"3.0",browsers:"all"},{name:"column-reverse",version:"3.0",browsers:"all"},{name:"row",version:"3.0",browsers:"all"},{name:"row-reverse",version:"3.0",browsers:"all"}]},{name:"-ms-flex-flow",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex-flow",syntax:"div { $(name): column wrap; }",desc:"Specifies how flexbox items are placed in the flexbox.",values:[{name:"column",version:"3.0",browsers:"all"},{name:"column-reverse",version:"3.0",browsers:"all"},{name:"nowrap",version:"3.0",browsers:"all",desc:"The flexbox is single-line. The cross-start direction is equivalent to either the 'start' or 'before' direction of the current writing mode, whichever is in the cross-axis, and the cross-end direction is the opposite direction of cross-start."},{name:"row",version:"3.0",browsers:"all"},{name:"row-reverse",version:"3.0",browsers:"all"},{name:"wrap",version:"3.0",browsers:"all",desc:"The flexbox is multi-line. The cross-start direction is equivalent to either the 'start' or 'before' direction of the current writing mode, whichever is in the cross-axis, and the cross-end direction is the opposite direction of cross-start."},{name:"wrap-reverse",version:"3.0",browsers:"all",desc:"Same as 'wrap', except the cross-start and cross-end directions are swapped."}]},{name:"-ms-flex-item-align",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex-item-align",syntax:"div { $(name): center; }",desc:"The 'flex-align' property changes the way free space is allocated in the length axis.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"baseline",version:"3.0",browsers:"all",desc:"Align all flexbox items so that their baselines line up, then distribute free space above and below the content."},{name:"center",version:"3.0",browsers:"all",desc:"The flexbox item's margin box is centered in the cross axis within the line."},{name:"end",version:"3.0",browsers:"all",desc:"The cross-end margin edge of the flexbox item is placed flush with the cross-end edge of the line."},{name:"start",version:"3.0",browsers:"all",desc:"The cross-start margin edge of the flexbox item is placed flush with the cross-start edge of the line."},{name:"stretch",version:"3.0",browsers:"all",desc:"If the cross size property of the flexbox item is anything other than 'auto', this value is identical to 'start'."}]},{name:"-ms-flex-line-pack",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex-line-pack0",syntax:"div { $(name): justify; }",desc:"The 'flex-line-pack' property aligns a flexbox's lines within the flexbox when there is extra space in the cross axis, similar to how 'flex-pack' aligns individual items within the main axis.",values:[{name:"center",version:"3.0",browsers:"all",desc:"The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."},{name:"distribute",version:"3.0",browsers:"all",desc:"Lines are evenly distributed in the flexbox, with half-size spaces on either end."},{name:"end",version:"3.0",browsers:"all",desc:"For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."},{name:"justify",version:"3.0",browsers:"all",desc:"The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."},{name:"start",version:"3.0",browsers:"all",desc:"For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."},{name:"stretch",version:"3.0",browsers:"all",desc:"Lines stretch to take up the remaining space. If the leftover free-space is negative, this value is identical to 'start'."}]},{name:"-ms-flex-order",restriction:"integer",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex-order0",syntax:"p { $(name): 1; }",desc:"This property is an integer with an initial value of 1."},{name:"-ms-flex-pack",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex-pack0",syntax:"div { $(name): justify; }",desc:"The 'flex-pack' property defines the flexibility of these packing spaces.",values:[{name:"center",version:"3.0",browsers:"all",desc:"The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."},{name:"distribute",version:"3.0",browsers:"all",desc:"Lines are evenly distributed in the flexbox, with half-size spaces on either end."},{name:"end",version:"3.0",browsers:"all",desc:"For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."},{name:"justify",version:"3.0",browsers:"all",desc:"The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."},{name:"start",version:"3.0",browsers:"all",desc:"For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."}]},{name:"-ms-flex-wrap",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-flexbox/#flex-wrap",syntax:"div { $(name): nowrap; }",desc:"controls whether the flexbox is single-line or multi-line, and the direction of the cross axis, which affects the direction new lines are stacked in and the meaning of the 'flex-align', 'flex-item-align', and 'flex-line-pack' properties.",values:[{name:"nowrap",version:"3.0",browsers:"all",desc:"The flexbox is single-line. The cross-start direction is equivalent to either the 'start' or 'before' direction of the current writing mode, whichever is in the cross-axis, and the cross-end direction is the opposite direction of cross-start."},{name:"wrap",version:"3.0",browsers:"all",desc:"The flexbox is multi-line. The cross-start direction is equivalent to either the 'start' or 'before' direction of the current writing mode, whichever is in the cross-axis, and the cross-end direction is the opposite direction of cross-start."},{name:"wrap-reverse",version:"3.0",browsers:"all",desc:"Same as 'wrap', except the cross-start and cross-end directions are swapped."}]},{name:"-ms-flow-from",restriction:"identifier",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-regions/#flow-from",syntax:"div { $(name): identifier; }",desc:"Gets or sets a value that identifies a Connected Frame container in the document that accepts the content flow from the data source.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"-ms-flow-into",restriction:"identifier",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-regions/#flow-into",syntax:"div { $(name): identifier; }",desc:"Gets or sets a value that identifies an iframe container in the document that serves as the Connected Frame data source.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"-ms-grid-column",restriction:"integer, string, enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-column",syntax:"#item1 { $(name): start end; }",desc:"grid-column is used to place grid items and explicitly defined grid cells in the Grid.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"end",version:"3.0",browsers:"all"},{name:"start",version:"3.0",browsers:"all"}]},{name:"-ms-grid-column-align",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-column-align",syntax:"article { $(name): center; }",desc:"Aligns the columns in a grid.",values:[{name:"center",version:"3.0",browsers:"all",desc:"Places the center of the Grid Item's margin box at the center of the the Grid Item's column."},{name:"end",version:"3.0",browsers:"all",desc:"Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's column."},{name:"start",version:"3.0",browsers:"all",desc:"Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's column."},{name:"stretch",version:"3.0",browsers:"all",desc:"Ensures that the Grid Item's margin box is equal to the size of the Grid Item's column."}]},{name:"-ms-grid-columns",restriction:"",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-columns",syntax:"div { $(name): 150px 1fr; }",desc:"Lays out the columns of the grid."},{name:"-ms-grid-column-span",restriction:"integer",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row-span-and-grid-column-span",syntax:"#item { $(name): 2; }.",desc:"Specifies the number of columns to span."},{name:"-ms-grid-layer",restriction:"integer",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/2011/WD-css3-grid-layout-20110407/#grid-layer",syntax:"div { $(name): 2; }",desc:"Grid-layer is similar in concept to z-index, but avoids overloading the meaning of the z-index property, which is applicable only to positioned elements."},{name:"-ms-grid-row",restriction:"integer, string, enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row",syntax:"#item1 { $(name): start end; }",desc:"grid-row is used to place grid items and explicitly defined grid cells in the Grid.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"end",version:"3.0",browsers:"all"},{name:"start",version:"3.0",browsers:"all"}]},{name:"-ms-grid-row-align",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row-align",syntax:"div { $(name): stretch; }",desc:"Aligns the rows in a grid.",values:[{name:"center",version:"3.0",browsers:"all",desc:"Places the center of the Grid Item's margin box at the center of the the Grid Item's row."},{name:"end",version:"3.0",browsers:"all",desc:"Aligns the end edge of the Grid Item's margin box to the end edge of the Grid Item's row."},{name:"start",version:"3.0",browsers:"all",desc:"Aligns the starting edge of the Grid Item's margin box to the starting edge of the Grid Item's row."},{name:"stretch",version:"3.0",browsers:"all",desc:"Ensures that the Grid Item's margin box is equal to the size of the Grid Item's row."}]},{name:"-ms-grid-rows",restriction:"",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-rows",syntax:"div { $(name): 50px 1fr 50px; }",desc:"Lays out the columns of the grid."},{name:"-ms-grid-row-span",restriction:"integer",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-grid-layout/#grid-row-span-and-grid-column-span",syntax:"#item { $(name): 2; }.",desc:"Specifies the number of rows to span."},{name:"-ms-high-contrast-adjust",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441137.aspx",syntax:"section { $(name): auto; }",desc:"Gets or sets a value that indicates whether to override any Cascading Style Sheets (CSS) properties that would have been set in high contrast mode.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"}]},{name:"-ms-hyphenate-limit-chars",restriction:"integer",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441147.aspx",syntax:"div { $(name): 5 2 2; }",desc:"Gets or sets one to three values that indicates the minimum number of characters in a hyphenated word.",values:{value:{name:"auto",version:"3.0",browsers:"all"}}},{name:"-ms-hyphenate-limit-lines",restriction:"integer",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441157.aspx",syntax:"div { $(name): 2; }",desc:"Gets or sets a value that indicates the maximum number of consecutive lines in an element that may be ended with a hyphenated word.",values:{value:{name:"no-limit",version:"3.0",browsers:"all"}}},{name:"-ms-hyphenate-limit-zone",restriction:"percentage, length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441168.aspx",syntax:"div { $(name): 25%; }",desc:"Gets or sets a value that defines the width of the hyphenation zone."},{name:"-ms-hyphens",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-text/#hyphens0",syntax:"div { $(name): manual; }",desc:"This property controls whether hyphenation is allowed to create more break opportunities within a line of text.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."},{name:"manual",version:"3.0",browsers:"all",desc:"Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"},{name:"none",version:"3.0",browsers:"all",desc:"Words are not broken at line breaks, even if characters inside the word suggest line break points."}]},{name:"-ms-ime-mode",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-ui/#ime-mode",syntax:"body { $(name): active; }",desc:"Controls the state of the input method editor for text fields.",values:[{name:"active",version:"3.0",browsers:"all",desc:"The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it."},{name:"auto",version:"3.0",browsers:"all",desc:"No change is made to the current input method editor state. This is the default."},{name:"disabled",version:"3.0",browsers:"all",desc:"The input method editor is disabled and may not be activated by the user."},{name:"inactive",version:"3.0",browsers:"all",desc:"The input method editor is initially inactive, but the user may activate it if they wish."},{name:"normal",version:"3.0",browsers:"all",desc:"The IME state should be normal; this value can be used in a user style sheet to override the page setting."}]},{name:"-ms-interpolation-mode",restriction:"enum",version:"3.0",browsers:"IE7",ref:"http://msdn.microsoft.com/en-us/library/ie/ms530822(v=vs.85).aspx",syntax:"img.highqual { $(name): bicubic; }",desc:"Gets or sets the interpolation (resampling) method used to stretch images.",values:[{name:"bicubic",version:"3.0",browsers:"all"},{name:"nearest-neighbor",version:"3.0",browsers:"all"}]},{name:"-ms-layout-grid",restriction:"",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/ie/ms530771(v=vs.85).aspx",syntax:"div { $(name): both fixed 12px 12px}",desc:"Sets or retrieves the composite document grid properties that specify the layout of text characters.",values:[{name:"char",version:"3.0",browsers:"all",desc:"Any of the range of character values available to the -ms-layout-grid-char property."},{name:"line",version:"3.0",browsers:"all",desc:"Any of the range of line values available to the -ms-layout-grid-line property."},{name:"mode",version:"3.0",browsers:"all",desc:"Any of the range of mode values available to the -ms-layout-grid-mode property."},{name:"type",version:"3.0",browsers:"all",desc:"Any of the range of type values available to the -ms-layout-grid-type property."}]},{name:"-ms-layout-grid-char",restriction:"enum, length, percentage",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/ie/ms530772(v=vs.85).aspx",syntax:"div { $(name): auto; }",desc:"Sets or retrieves the size of the character grid used for rendering the text content of an element.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Largest character in the font of the element is used to set the character grid."},{name:"none",version:"3.0",browsers:"all",desc:"Default. No character grid is set."}]},{name:"-ms-layout-grid-line",restriction:"length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/ie/ms530773(v=vs.85).aspx",syntax:"div { $(name): auto; }",desc:"Sets or retrieves the gridline value used for rendering the text content of an element.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Largest character in the font of the element is used to set the character grid."},{name:"none",version:"3.0",browsers:"all",desc:"Default. No grid line is set."}]},{name:"-ms-layout-grid-mode",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/ie/ms530774(v=vs.85).aspx",syntax:"div { $(name): line; }",desc:"Gets or sets whether the text layout grid uses two dimensions.",values:[{name:"both",version:"3.0",browsers:"all",desc:"Default. Both the char and line grid modes are enabled. This setting is necessary to fully enable the layout grid on an element."},{name:"char",version:"3.0",browsers:"all",desc:"Only a character grid is used. This is recommended for use with block-level elements, such as a blockquote, where the line grid is intended to be disabled."},{name:"line",version:"3.0",browsers:"all",desc:"Only a line grid is used. This is recommended for use with inline elements, such as a span, to disable the horizontal grid on runs of text that act as a single entity in the grid layout."},{name:"none",version:"3.0",browsers:"all",desc:"No grid is used."}]},{name:"-ms-layout-grid-type",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/ie/ms530775(v=vs.85).aspx",syntax:"div { $(name): strict; }",desc:"Sets or retrieves the type of grid used for rendering the text content of an element.",values:[{name:"fixed",version:"3.0",browsers:"all",desc:"Grid used for monospaced layout. All noncursive characters are treated as equal; every character is centered within a single grid space by default."},{name:"loose",version:"3.0",browsers:"all",desc:"Default. Grid used for Japanese and Korean characters."},{name:"strict",version:"3.0",browsers:"all",desc:"Grid used for Chinese, as well as Japanese (Genko) and Korean characters. Only the ideographs, kanas, and wide characters are snapped to the grid."}]},{name:"-ms-line-break",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-text/#line-break0",syntax:"p { $(name): strict; }",desc:"Specifies what set of line breaking restrictions are in effect within the element.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The UA determines the set of line-breaking restrictions to use for CJK scripts, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines."},{name:"keep-all",version:"3.0",browsers:"all",desc:"Sequences of CJK characters can no longer break on implied break points. This option should only be used where the presence of word separator characters still creates line-breaking opportunities, as in Korean."},{name:"newspaper",version:"3.0",browsers:"all",desc:"Breaks CJK scripts using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers."},{name:"normal",version:"3.0",browsers:"all",desc:"Breaks CJK scripts using a normal set of line-breaking rules."},{name:"strict",version:"3.0",browsers:"all",desc:"Breaks CJK scripts using a more restrictive set of line-breaking rules than 'normal'."}]},{name:"-ms-overflow-style",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441298.aspx",syntax:"p { $(name): scrollbar; }",desc:"Specify whether content is clipped when it overflows the element's content area.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"No preference, UA should use the first scrolling method in the list that it supports."},{name:"-ms-autohiding-scrollbar",version:"3.0",browsers:"all",desc:"Indicates the element displays auto-hiding scrollbars during mouse interactions and panning indicators during touch and keyboard interactions."},{name:"none",version:"3.0",browsers:"all",desc:"Indicates the element does not display scrollbars or panning indicators, even when its content overflows."},{name:"scrollbar",version:"3.0",browsers:"all",desc:'Scrollbars are typically narrow strips inserted on one or two edges of an element and which often have arrows to click on and a "thumb" to drag up and down (or left and right) to move the contents of the element.'}]},{name:"-ms-perspective",restriction:"number",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective",syntax:"div { $(name): none; }",desc:"Applies the same transform as the perspective() transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No perspective transform is applied."}}},{name:"-ms-perspective-origin",restriction:"percentage, length",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective-origin",syntax:"div { $(name): 10px; }",desc:"Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-ms-perspective-origin-x",restriction:"percentage, length",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective-origin",desc:"Establishes the origin for the perspective property. It effectively sets the X position at which the viewer appears to be looking at the children of the element.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-ms-perspective-origin-y",restriction:"percentage, length",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective-origin",desc:"Establishes the origin for the perspective property. It effectively sets the Y position at which the viewer appears to be looking at the children of the element.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-ms-progress-appearance",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/Hh779845.aspx",syntax:"progress { $(name): bar; }",desc:"Gets or sets a value that specifies whether a progress control displays as a bar or a ring.",values:[{name:"bar",version:"3.0",browsers:"all"},{name:"ring",version:"3.0",browsers:"all"}]},{name:"-ms-scrollbar-3dlight-color",restriction:"color",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/library/ms531153(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-ms-scrollbar-arrow-color",restriction:"color",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/library/ms531154(VS.85).aspx",syntax:"body { $(name): #00ffff; }",desc:"Determines the color of the arrow elements of a scroll arrow.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-ms-scrollbar-base-color",restriction:"color",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/library/ms531155(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-ms-scrollbar-darkshadow-color",restriction:"color",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/library/ms531156(v=VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the gutter of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-ms-scrollbar-face-color",restriction:"color",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/library/ms531157(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the scroll box and scroll arrows of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-ms-scrollbar-highlight-color",restriction:"color",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/library/ms531158(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-ms-scrollbar-shadow-color",restriction:"color",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/library/ms531159(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-ms-scrollbar-track-color",restriction:"color",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/library/ms531160(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the track element of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-ms-scroll-chaining",restriction:"enum, length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466007.aspx",syntax:"div { $(name): chained; }",desc:"Gets or sets a value that indicates the scrolling behavior that occurs when a user hits the content boundary during a manipulation.",values:[{name:"chained",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"}]},{name:"-ms-scroll-limit",restriction:"length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996918.aspx",desc:"Gets or sets a shorthand value that sets values for the -ms-scroll-limit-x-min, -ms-scroll-limit-y-min, -ms-scroll-limit-x-max, and -ms-scroll-limit-y-max properties.",values:{value:{name:"auto",version:"3.0",browsers:"all"}}},{name:"-ms-scroll-limit-x-max",restriction:"length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996919.aspx",syntax:"div { $(name): auto; }",desc:"Gets or sets a value that specifies the maximum value for the scrollLeft property.",values:{value:{name:"auto",version:"3.0",browsers:"all"}}},{name:"-ms-scroll-limit-x-min",restriction:"length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996920.aspx",syntax:"div { $(name): 5px; }",desc:"Gets or sets a value that specifies the minimum value for the scrollLeft property."},{name:"-ms-scroll-limit-y-max",restriction:"length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996921.aspx",syntax:"div { $(name): auto; }",desc:"Gets or sets a value that specifies the maximum value for the scrollTop property.",values:{value:{name:"auto",version:"3.0",browsers:"all"}}},{name:"-ms-scroll-limit-y-min",restriction:"length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996922.aspx",syntax:"div { $(name): 5px; }",desc:"Gets or sets a value that specifies the minimum value for the scrollTop property."},{name:"-ms-scroll-rails",restriction:"enum, length",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466018.aspx",syntax:"div { $(name): railed; }",desc:"Gets or sets a value that indicates whether or not small motions perpendicular to the primary axis of motion will result in either changes to both the scrollTop and scrollLeft properties or a change to the primary axis (for instance, either the scrollTop or scrollLeft properties will change, but not both).",values:[{name:"none",version:"3.0",browsers:"all"},{name:"railed",version:"3.0",browsers:"all"}]},{name:"-ms-scroll-snap-points-x",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466031.aspx",syntax:"div { $(name): snapInterval(100%, 100%); }",desc:"Gets or sets a value that defines where snap-points will be located along the x-axis.",values:[{name:"snapInterval(100%, 100%)",version:"3.0",browsers:"all"},{name:"snapList()",version:"3.0",browsers:"all"}]},{name:"-ms-scroll-snap-points-y",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466042.aspx",syntax:"div { $(name): snapInterval(100%, 100%); }",desc:"Gets or sets a value that defines where snap-points will be located along the y-axis.",values:[{name:"snapInterval(100%, 100%)",version:"3.0",browsers:"all"},{name:"snapList()",version:"3.0",browsers:"all"}]},{name:"-ms-scroll-snap-type",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466057.aspx",syntax:"div { $(name): proximity; }",desc:"Gets or sets a value that defines what type of snap-point should be used for the current element. There are two type of snap-points, with the primary difference being whether or not the user is guaranteed to always stop on a snap-point.",values:[{name:"mandatory",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"proximity",version:"3.0",browsers:"all"}]},{name:"-ms-scroll-snap-x",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466066.aspx",syntax:"div { $(name): proximity snapInterval(100%, 100%); }",desc:"Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-x properties.",values:[{name:"mandatory",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"proximity",version:"3.0",browsers:"all"},{name:"snapInterval(100%, 100%)",version:"3.0",browsers:"all"},{name:"snapList()",version:"3.0",browsers:"all"}]},{name:"-ms-scroll-snap-y",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466078.aspx",syntax:"div { $(name): proximity snapInterval(100%, 100%); }",desc:"Gets or sets a shorthand value that sets values for the -ms-scroll-snap-type and -ms-scroll-snap-points-y properties.",values:[{name:"mandatory",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"proximity",version:"3.0",browsers:"all"},{name:"snapInterval(100%, 100%)",version:"3.0",browsers:"all"},{name:"snapList()",version:"3.0",browsers:"all"}]},{name:"-ms-scroll-translation",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh996917.aspx",syntax:"div { $(name): vertical-to-horizontal; }",desc:"Gets or sets a value that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.",values:[{name:"none",version:"3.0",browsers:"all"},{name:"vertical-to-horizontal",version:"3.0",browsers:"all"}]},{name:"-ms-text-align-last",restriction:"enum",version:"3.0",browsers:"IE8",ref:"http://www.w3.org/TR/css3-text/#text-align-last0",syntax:"div { $(name): right; }",desc:"Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all",desc:"The inline contents are centered within the line box."},{name:"end",version:"3.0",browsers:"none",desc:"The inline contents are aligned to the end edge of the line box."},{name:"justify",version:"3.0",browsers:"all",desc:"The text is justified according to the method specified by the 'text-justify' property."},{name:"left",version:"3.0",browsers:"all",desc:"The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."},{name:"right",version:"3.0",browsers:"all",desc:"The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."},{name:"start",version:"3.0",browsers:"none",desc:"The inline contents are aligned to the start edge of the line box."}]},{name:"-ms-text-autospace",restriction:"enum",version:"3.0",browsers:"IE8",ref:"http://www.w3.org/TR/css3-text/#text-autospace",syntax:"div { $(name): ideograph-numeric; }",desc:"Determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its 'ink' lines up with the first glyph in the line above and below.",values:[{name:"ideograph-alpha",version:"3.0",browsers:"all",desc:"Creates 1/4em extra spacing between runs of ideographic letters and non-ideographic letters, such as Latin-based, Cyrillic, Greek, Arabic or Hebrew."},{name:"ideograph-numeric",version:"3.0",browsers:"all",desc:"Creates 1/4em extra spacing between runs of ideographic letters and numeric glyphs."},{name:"ideograph-parenthesis",version:"3.0",browsers:"all",desc:"Creates extra spacing between normal (non wide) parenthesis and ideographs."},{name:"ideograph-space",version:"3.0",browsers:"all",desc:"Extends the width of the space character while surrounded by ideographs."},{name:"none",version:"3.0",browsers:"all",desc:"No extra space is created."},{name:"punctuation",version:"3.0",browsers:"all",desc:"Creates extra non-breaking spacing around punctuation as required by language-specific typographic conventions."}]},{name:"-ms-text-justify",restriction:"enum",version:"3.0",browsers:"IE8",ref:"http://www.w3.org/TR/css3-text/#text-justify0",syntax:"div { $(name): inter-word; }",desc:"Selects the justification algorithm used when 'text-align' is set to 'justify'. The property applies to block containers, but the UA may (but is not required to) also support it on inline elements.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."},{name:"distribute",version:"3.0",browsers:"all",desc:"Justification primarily changes spacing both at word separators and at grapheme cluster boundaries in all scripts except those in the connected and cursive groups. This value is sometimes used in e.g. Japanese, often with the 'text-align-last' property."},{name:"inter-cluster",version:"3.0",browsers:"all",desc:"Justification primarily changes spacing at word separators and at grapheme cluster boundaries in clustered scripts. This value is typically used for Southeast Asian scripts such as Thai."},{name:"inter-ideograph",version:"3.0",browsers:"all",desc:"Justification primarily changes spacing at word separators and at inter-graphemic boundaries in scripts that use no word spaces. This value is typically used for CJK languages."},{name:"inter-word",version:"3.0",browsers:"all",desc:"Justification primarily changes spacing at word separators. This value is typically used for languages that separate words using spaces, like English or (sometimes) Korean."},{name:"kashida",version:"3.0",browsers:"all",desc:"Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."},{name:"none",version:"3.0",browsers:"none",desc:"Justification is disabled."},{name:"trim",version:"3.0",browsers:"none",desc:"Specifies that compression is preferred to expansion and enables the trimming of blank space in glyphs where allowed by typographic tradition."}]},{name:"-ms-text-kashida-space",restriction:"percentage",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh453798.aspx",syntax:"article { $(name): 10%; }",desc:"Sets or retrieves the ratio of kashida expansion to white space expansion when justifying lines of text in the object."},{name:"-ms-text-overflow",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-ui/#text-overflow0",syntax:"span { $(name): ellipsis; }",desc:"Text can overflow for example when it is prevented from wrapping",values:[{name:"clip",version:"3.0",browsers:"all",desc:"Clip inline content that overflows. Characters may be only partially rendered."},{name:"ellipsis",version:"3.0",browsers:"all",desc:"Render an ellipsis character (U+2026) to represent clipped inline content."}]},{name:"-ms-text-size-adjust",restriction:"percentage",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/ff462082%28v=VS.92%29.aspx",syntax:"html { $(name): 150%; }",desc:"Specifies a size adjustment for displaying text content in Internet Explorer.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"}]},{name:"-ms-text-underline-position",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-text/#text-underline-position0",syntax:"div { $(name): auto; }",desc:"Sets the position of an underline specified on the same element: it does not affect underlines specified by ancestor elements.This property is typically used in vertical writing contexts such as in Japanese documents where it often desired to have the underline appear 'over' (to the right of) the affected run of text",values:[{name:"alphabetic",version:"3.0",browsers:"all",desc:"The underline is aligned with the alphabetic baseline. In this case the underline is likely to cross some descenders."},{name:"auto",version:"3.0",browsers:"all",desc:"The user agent may use any algorithm to determine the underline's position. In horizontal line layout, the underline should be aligned as for alphabetic. In vertical line layout, if the language is set to Japanese or Korean, the underline should be aligned as for over."},{name:"over",version:"3.0",browsers:"all",desc:"The underline is aligned with the 'top' (right in vertical writing) edge of the element's em-box. In this mode, an overline also switches sides."},{name:"under",version:"3.0",browsers:"all",desc:"The underline is aligned with the 'bottom' (left in vertical writing) edge of the element's em-box. In this case the underline usually does not cross the descenders. This is sometimes called 'accounting' underline."}]},{name:"-ms-touch-action",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx",syntax:"div { $(name): manipulation double-tap-zoom; }",desc:"Gets or sets a value that indicates whether and how a given region can be manipulated by the user.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The element is a passive element, with several exceptions."},{name:"double-tap-zoom",version:"3.0",browsers:"all",desc:"The element will zoom on double-tap."},{name:"manipulation",version:"3.0",browsers:"all",desc:"The element is a manipulation-causing element."},{name:"none",version:"3.0",browsers:"all",desc:"The element is a manipulation-blocking element."},{name:"pan-x",version:"3.0",browsers:"all",desc:"The element permits touch-driven panning on the horizontal axis. The touch pan is performed on the nearest ancestor with horizontally scrollable content."},{name:"pan-y",version:"3.0",browsers:"all",desc:"The element permits touch-driven panning on the vertical axis. The touch pan is performed on the nearest ancestor with vertically scrollable content."},{name:"pinch-zoom",version:"3.0",browsers:"all",desc:"The element permits pinch-zooming. The pinch-zoom is performed on the nearest ancestor with zoomable content."}]},{name:"-ms-touch-select",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/ie/hh975292(v=vs.85).aspx",syntax:"div::selection { $(name): grippers; }",desc:"Gets or sets a value that toggles the 'gripper' visual elements that enable touch text selection.",values:[{name:"grippers",version:"3.0",browsers:"all",desc:"Grippers are always on."},{name:"none",version:"3.0",browsers:"all",desc:"Grippers are always off."}]},{name:"-ms-transform",restriction:"enum",version:"3.0",browsers:"IE9-9",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-property",syntax:"div { $(name): rotate(-90deg); }",desc:"A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",values:[{name:"matrix()",version:"3.0",browsers:"all",desc:"Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"},{name:"matrix3d()",version:"3.0",browsers:"all",desc:"specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."},{name:"none",version:"3.0",browsers:"all"},{name:"rotate()",version:"3.0",browsers:"all",desc:"Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."},{name:"rotate3d()",version:"3.0",browsers:"all",desc:"Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."},{name:"rotateX('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the X axis."},{name:"rotateY('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Y axis."},{name:"rotateZ('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Z axis."},{name:"scale()",version:"3.0",browsers:"all",desc:"Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."},{name:"scale3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."},{name:"scaleX()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."},{name:"scaleY()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."},{name:"scaleZ()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."},{name:"skew()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."},{name:"skewX()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X axis by the given angle."},{name:"skewY()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the Y axis by the given angle."},{name:"translate()",version:"3.0",browsers:"all",desc:"Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."},{name:"translate3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."},{name:"translateX()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the X direction."},{name:"translateY()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Y direction."},{name:"translateZ()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."}]},{name:"-ms-transform-origin",restriction:"length, percentage",version:"3.0",browsers:"IE9-9",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-origin",syntax:".album { $(name): 20% 40%; }",desc:"Establishes the origin of transformation for an element. This property is applied by first translating the element by the negated value of the property, then applying the element's transform, then translating by the property value.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-ms-transform-origin-x",restriction:"length, percentage",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-3d-transforms/#transform-origin",desc:"The x coordinate of the origin for transforms applied to an element with respect to its border box."},{name:"-ms-transform-origin-y",restriction:"length, percentage",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-3d-transforms/#transform-origin",desc:"The y coordinate of the origin for transforms applied to an element with respect to its border box."},{name:"-ms-transform-origin-z",restriction:"length, percentage",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-3d-transforms/#transform-origin",desc:"The z coordinate of the origin for transforms applied to an element with respect to its border box."},{name:"-ms-user-select",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://ie.microsoft.com/testdrive/HTML5/msUserSelect/",syntax:"div { $(name): none; }",desc:"Controls the appearance of selection.",values:[{name:"element",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"text",version:"3.0",browsers:"all"}]},{name:"-ms-word-break",restriction:"enum",version:"3.0",browsers:"IE8",ref:"http://www.w3.org/TR/css3-text/#word-break0",syntax:"p.album { $(name): break-all; }",desc:"Specifies line break opportunities for non-CJK scripts.",values:[{name:"break-all",version:"3.0",browsers:"all",desc:"Lines may break between any two grapheme clusters for non-CJK scripts. This option is used mostly in a context where the text is predominantly using CJK characters with few non-CJK excerpts and it is desired that the text be better distributed on each line."},{name:"keep-all",version:"3.0",browsers:"all",desc:"Block characters can no longer create implied break points. Otherwise this option is equivalent to 'normal'. This option is mostly used where the presence of word separator characters still creates line-breaking opportunities, as in Korean."},{name:"normal",version:"3.0",browsers:"all",desc:"Breaks non-CJK scripts according to their own rules."}]},{name:"-ms-word-wrap",restriction:"enum",version:"3.0",browsers:"IE8",ref:"http://www.w3.org/TR/css3-text/#word-wrap0",syntax:"p { $(name): break-word; }",desc:"Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",values:[{name:"break-word",version:"3.0",browsers:"all",desc:"An unbreakable 'word' may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."},{name:"hyphenate",version:"3.0",browsers:"none",desc:"An unbreakable 'word' may be hyphenated if there are no otherwise-acceptable break points in the line even if hyphenation is turned off."},{name:"normal",version:"3.0",browsers:"all",desc:"Lines may break only at allowed break points."}]},{name:"-ms-wrap-flow",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-exclusions/#wrap-flow-property",syntax:"div { $(name): maximum; }",desc:"An element becomes an exclusion when its 'wrap-flow' property has a computed value other than 'auto'.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"For floats an exclusion is created, for all other elements an exclusion is not created."},{name:"both",version:"3.0",browsers:"all",desc:"Inline flow content can flow on all sides of the exclusion."},{name:"clear",version:"3.0",browsers:"all",desc:"Inline flow content can only wrap on top and bottom of the exclusion and must leave the areas to the start and end edges of the exclusion box empty."},{name:"end",version:"3.0",browsers:"all",desc:"Inline flow content can wrap on the end side of the exclusion area but must leave the area to the start edge of the exclusion area empty."},{name:"maximum",version:"3.0",browsers:"all",desc:"Inline flow content can wrap on the side of the exclusion with the largest available space for the given line, and must leave the other side of the exclusion empty."},{name:"start",version:"3.0",browsers:"all",desc:"Inline flow content can wrap on the start edge of the exclusion area but must leave the area to end edge of the exclusion area empty."}]},{name:"-ms-wrap-margin",restriction:"length, percentage",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466103.aspx",syntax:"div { $(name): 20px; }",desc:"Gets or sets a value that is used to offset the inner wrap shape from other shapes."},{name:"-ms-wrap-through",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh441290.aspx",syntax:"div { $(name): wrap; }",desc:"Gets or sets a value that specifies how content should wrap around an exclusion element.",values:[{name:"none",version:"3.0",browsers:"all",desc:"The exclusion element does not inherit its parent node's wrapping context. Its descendants are only subject to exclusion shapes defined inside the element."},{name:"wrap",version:"3.0",browsers:"all",desc:"The exclusion element inherits its parent node's wrapping context. Its descendant inline content wraps around exclusions defined outside the element."}]},{name:"-ms-writing-mode",restriction:"enum",version:"3.0",browsers:"IE8",ref:"http://www.w3.org/TR/2003/CR-css3-text-20030514/#writing-mode",syntax:"span { $(name): lr-tb; }",desc:"This is a shorthand property for both 'direction' and 'block-progression'.",values:[{name:"bt-lr",version:"3.0",browsers:"all"},{name:"bt-rl",version:"3.0",browsers:"all"},{name:"lr-bt",version:"3.0",browsers:"all"},{name:"lr-tb",version:"3.0",browsers:"all"},{name:"rl-bt",version:"3.0",browsers:"all"},{name:"rl-tb",version:"3.0",browsers:"all"},{name:"tb-lr",version:"3.0",browsers:"all"},{name:"tb-rl",version:"3.0",browsers:"all"}]},{name:"-ms-zoom",restriction:"enum, integer, number, percentage",version:"3.0",browsers:"IE8",ref:"http://msdn.microsoft.com/en-us/ie/gg192966.aspx",syntax:".example { $(name): 1; }",desc:"Sets or retrieves the magnification scale of the object.",values:{value:{name:"normal",version:"3.0",browsers:"all"}}},{name:"-ms-zoom-animation",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://msdn.microsoft.com/en-us/library/windows/apps/hh466117.aspx",syntax:"div { $(name): none; }",desc:"Gets or sets a value that indicates whether an animation is used when zooming.",values:[{name:"default",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"}]},{name:"nav-down",restriction:"enum, identifier, string",version:"3.0",browsers:"O9.5",ref:"http://www.w3.org/TR/css3-ui/#nav-up",syntax:"auto | 'id' [ current | root | 'target-name' ]?",desc:"Provides an way to control directional focus navigation.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The user agent automatically determines which element to navigate the focus to in response to directional navigational input."},{name:"current",version:"3.0",browsers:"all"},{name:"root",version:"3.0",browsers:"all"}]},{name:"nav-index",restriction:"number",version:"3.0",browsers:"O9.5",ref:"http://www.w3.org/TR/css3-ui/#nav-index0",syntax:"auto | 'number'",desc:"Provides an input-method-neutral way of specifying the sequential navigation order (also known as 'tabbing order').",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"The element's sequential navigation order is assigned automatically by the user agent."}}},{name:"nav-left",restriction:"enum, identifier, string",version:"3.0",browsers:"O9.5",ref:"http://www.w3.org/TR/css3-ui/#nav-up",syntax:"auto | 'id' [ current | root | 'target-name' ]?",desc:"Provides an way to control directional focus navigation.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The user agent automatically determines which element to navigate the focus to in response to directional navigational input."},{name:"current",version:"3.0",browsers:"all"},{name:"root",version:"3.0",browsers:"all"}]},{name:"nav-right",restriction:"enum, identifier, string",version:"3.0",browsers:"O9.5",ref:"http://www.w3.org/TR/css3-ui/#nav-up",syntax:"auto | 'id' [ current | root | 'target-name' ]?",desc:"Provides an way to control directional focus navigation.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The user agent automatically determines which element to navigate the focus to in response to directional navigational input."},{name:"current",version:"3.0",browsers:"all"},{name:"root",version:"3.0",browsers:"all"}]},{name:"nav-up",restriction:"enum, identifier, string",version:"3.0",browsers:"O9.5",ref:"http://www.w3.org/TR/css3-ui/#nav-up",syntax:"auto | 'id' [ current | root | 'target-name' ]?",desc:"Provides an way to control directional focus navigation.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The user agent automatically determines which element to navigate the focus to in response to directional navigational input."},{name:"current",version:"3.0",browsers:"all"},{name:"root",version:"3.0",browsers:"all"}]},{name:"-o-animation",restriction:"time, enum, identifier, number",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#animation",syntax:"div { $(name): movearound 4s ease 3 normal; }",desc:"Shorthand property combines six of the animation properties into a single property.",values:[{name:"alternate",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",version:"3.0",browsers:"all",desc:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",version:"3.0",browsers:"all",desc:"Both forwards and backwards fill modes are applied."},{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"forwards",version:"3.0",browsers:"all",desc:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",version:"3.0",browsers:"all",desc:"Causes the animation to repeat forever."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"none",version:"3.0",browsers:"all",desc:"No animation is performed"},{name:"normal",version:"3.0",browsers:"all",desc:"Normal playback."},{name:"reverse",version:"3.0",browsers:"all",desc:"All iterations of the animation are played in the reverse direction from the way they were specified."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-o-animation-delay",restriction:"time",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#animation-delay",syntax:"div { $(name): 4s; }",desc:"Defines when the animation will start. An 'animation-delay' value of '0' means the animation will execute as soon as it is applied. Otherwise, the value specifies an offset from the moment the animation is applied, and the animation will delay execution by that offset."},{name:"-o-animation-direction",restriction:"enum",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#animation-direction",syntax:"div { $(name): normal; }",desc:"Defines whether or not the animation should play in reverse on alternate cycles.",values:[{name:"alternate",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"normal",version:"3.0",browsers:"all",desc:"Normal playback."},{name:"reverse",version:"3.0",browsers:"all",desc:"All iterations of the animation are played in the reverse direction from the way they were specified."}]},{name:"-o-animation-duration",restriction:"time",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#animation-duration",syntax:"div { $(name): 4s; }",desc:"Defines the length of time that an animation takes to complete one cycle."},{name:"-o-animation-fill-mode",restriction:"enum",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#animation-fill-mode-property",syntax:"div { $(name): forwards; }",desc:"Defines what values are applied by the animation outside the time it is executing.",values:[{name:"backwards",version:"3.0",browsers:"all",desc:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",version:"3.0",browsers:"all",desc:"Both forwards and backwards fill modes are applied."},{name:"forwards",version:"3.0",browsers:"all",desc:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"none",version:"3.0",browsers:"all",desc:"There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."}]},{name:"-o-animation-iteration-count",restriction:"number",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#animation-iteration-count",syntax:"div { $(name): 3; }",desc:"Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",values:{value:{name:"infinite",version:"3.0",browsers:"all",desc:"Causes the animation to repeat forever."}}},{name:"-o-animation-name",restriction:"identifier",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#the-animation-name-property-",syntax:"div { $(name): movearound; }",desc:"Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No animation is performed"}}},{name:"-o-animation-play-state",restriction:"enum",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#animation-play-state",syntax:"div { $(name): running; }",desc:"Defines whether the animation is running or paused.",values:[{name:"paused",version:"3.0",browsers:"all",desc:"A running animation will be paused."},{name:"running",version:"3.0",browsers:"all",desc:"Resume playback of a paused animation."}]},{name:"-o-animation-timing-function",restriction:"enum",version:"3.0",browsers:"O12",ref:"http://www.w3.org/TR/css3-animations/#animation-timing-function",syntax:"div { $(name): ease; }",desc:"Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",values:[{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-o-background-size",restriction:"length, percentage",version:"3.0",browsers:"O9.6",ref:"http://www.w3.org/TR/css3-background/#the-background-size",syntax:"div { $(name): contain; }",desc:"Specifies the size of the background images.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"contain",version:"3.0",browsers:"all",desc:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."},{name:"cover",version:"3.0",browsers:"all",desc:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."}]},{name:"-o-border-image",restriction:"length, percentage, number, url, enum",version:"3.0",browsers:"O11.6",ref:"http://www.w3.org/TR/css3-background/#border-image",syntax:"div { $(name): url(border.png) 0 5 0 5;}",desc:"Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."},{name:"fill",version:"3.0",browsers:"all",desc:"Causes the middle part of the border-image to be preserved. (By default it is discarded, i.e., treated as empty.)"},{name:"none",version:"3.0",browsers:"all"},{name:"repeat",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area."},{name:"round",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."},{name:"space",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."},{name:"stretch",version:"3.0",browsers:"all",desc:"The image is stretched to fill the area."},{name:"url()",version:"3.0",browsers:"all"}]},{name:"-o-object-fit",restriction:"enum",version:"3.0",browsers:"O10.6",ref:"http://dev.w3.org/csswg/css3-images/#object-fit",syntax:"p { $(name): cover; }",desc:"The object-fit property specifies how the contents of a replaced element should be scaled relative to the box established by its used height and width.",values:[{name:"contain",version:"3.0",browsers:"all"},{name:"cover",version:"3.0",browsers:"all"},{name:"fill",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"scale-down",version:"3.0",browsers:"all"}]},{name:"-o-object-position",restriction:"enum, length, percentage",version:"3.0",browsers:"O10.6",ref:"http://dev.w3.org/csswg/css3-images/#object-position0",syntax:"img { $(name): left top; }",desc:"Determines the alignment of the replaced element inside its box.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"opacity",restriction:"number(0-1)",version:"3.0",browsers:"C,FF3.6,IE9,O9,S1.2",ref:"http://www.w3.org/TR/css3-color/#opacity",syntax:"article { $(name): opacity: 0.4; }",desc:"Opacity of an element's text, where 1 is opaque and 0 is entirely transparent."},{name:"order",restriction:"enum",version:"3.0",browsers:"O12.1",ref:"http://www.w3.org/TR/css3-flexbox/#order",syntax:"p { $(name): -1; }",desc:"Controls the order in which flex items appear within their flex container, by assigning them to ordinal groups."},{name:"orientation",restriction:"",version:"",browsers:"all"},{name:"orphans",restriction:"integer",version:"2.0",browsers:"C,IE8,O7,S1.3",ref:"http://www.w3.org/TR/CSS2/page.html#propdef-orphans",syntax:"",desc:"Specifies the minimum number of lines in a block element that must be left at the bottom of a page."},{name:"-o-table-baseline",restriction:"integer",version:"3.0",browsers:"O9.6",ref:"http://www.w3.org/TR/mathml-for-css/",syntax:"td { $(name): 2; }",desc:"Determines which row of a inline-table should be used as baseline of inline-table."},{name:"-o-tab-size",restriction:"integer, length",version:"3.0",browsers:"O10.6",ref:"http://www.w3.org/TR/css3-text/#tab-size",syntax:"div { $(name): 4; }",desc:"This property determines the width of the tab character (U+0009), in space characters (U+0020), when rendered"},{name:"-o-text-overflow",restriction:"enum",version:"3.0",browsers:"O10",ref:"http://www.w3.org/TR/css3-ui/#text-overflow0",syntax:"span { $(name): ellipsis; }",desc:"Text can overflow for example when it is prevented from wrapping",values:[{name:"clip",version:"3.0",browsers:"all",desc:"Clip inline content that overflows. Characters may be only partially rendered."},{name:"ellipsis",version:"3.0",browsers:"all",desc:"Render an ellipsis character (U+2026) to represent clipped inline content."}]},{name:"-o-transform",restriction:"enum",version:"3.0",browsers:"O10.5",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-property",syntax:"div { $(name): rotate(-90deg); }",desc:"A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",values:[{name:"matrix()",version:"3.0",browsers:"all",desc:"Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"},{name:"matrix3d()",version:"3.0",browsers:"all",desc:"specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."},{name:"none",version:"3.0",browsers:"all"},{name:"rotate()",version:"3.0",browsers:"all",desc:"Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."},{name:"rotate3d()",version:"3.0",browsers:"all",desc:"Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."},{name:"rotateX('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the X axis."},{name:"rotateY('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Y axis."},{name:"rotateZ('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Z axis."},{name:"scale()",version:"3.0",browsers:"all",desc:"Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."},{name:"scale3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."},{name:"scaleX()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."},{name:"scaleY()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."},{name:"scaleZ()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."},{name:"skew()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."},{name:"skewX()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X axis by the given angle."},{name:"skewY()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the Y axis by the given angle."},{name:"translate()",version:"3.0",browsers:"all",desc:"Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."},{name:"translate3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."},{name:"translateX()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the X direction."},{name:"translateY()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Y direction."},{name:"translateZ()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."}]},{name:"-o-transform-origin",restriction:"length, percentage",version:"3.0",browsers:"O10.5",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-origin",syntax:"div { $(name): 20% 40%; }",desc:"Establishes the origin of transformation for an element. This property is applied by first translating the element by the negated value of the property, then applying the element's transform, then translating by the property value.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-o-transition",restriction:"time, property, enum",version:"3.0",browsers:"O11.5",ref:"http://www.w3.org/TR/css3-transitions/#transition",syntax:"div { $(name): background-color linear 1s; }",desc:"Shorthand property combines four of the transition properties into a single property.",values:[{name:"all",version:"3.0",browsers:"all",desc:"Every property that is able to undergo a transition will do so."},{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"none",version:"3.0",browsers:"all",desc:"No property will transition."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-o-transition-delay",restriction:"time",version:"3.0",browsers:"O11.5",ref:"http://www.w3.org/TR/css3-transitions/#transition-delay",syntax:"div { $(name): 1s; }",desc:"Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied."},{name:"-o-transition-duration",restriction:"time",version:"3.0",browsers:"O11.5",ref:"http://www.w3.org/TR/css3-transitions/#transition-duration",syntax:"div { $(name): 1s; }",desc:"Specifies how long the transition from the old value to the new value should take."},{name:"-o-transition-property",restriction:"property",version:"3.0",browsers:"O11.5",ref:"http://www.w3.org/TR/css3-transitions/#transition-property",syntax:"div { $(name): background-color; }",desc:"Specifies the name of the CSS property to which the transition is applied.",values:[{name:"all",version:"3.0",browsers:"all",desc:"Every property that is able to undergo a transition will do so."},{name:"none",version:"3.0",browsers:"all",desc:"No property will transition."}]},{name:"-o-transition-timing-function",restriction:"enum",version:"3.0",browsers:"O11.5",ref:"http://www.w3.org/TR/css3-transitions/#transition-timing-function",syntax:"div { $(name): linear; }",desc:"Describes how the intermediate values used during a transition will be calculated.",values:[{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"outline",restriction:"length, color, enum",version:"2.0",browsers:"C,FF1.5,IE8,O8,S1.2",ref:"http://www.w3.org/TR/css3-ui/#outline0",syntax:"header { $(name): 5px solid red;}",desc:"Shorthand property, and sets all three of 'outline-style', 'outline-width', and 'outline-color'.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"outline-color",restriction:"color",version:"2.0",browsers:"C,FF1.5,IE8,O8,S1.2",ref:"http://www.w3.org/TR/css3-ui/#outline-color0",syntax:"body { $(name): red; }",desc:"The color of the outline",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"invert",version:"2.0",browsers:"all",desc:"'Invert' is expected to perform a color inversion on the pixels on the screen. This is a common way to ensure the focus border is visible, regardless of color background."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"2.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"2.0",browsers:"C,S1"},{name:"-webkit-link",version:"2.0",browsers:"C,S1"},{name:"-webkit-text",version:"2.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"outline-offset",restriction:"length",version:"3.0",browsers:"C,FF1.5,O9.5,S1.2",ref:"http://www.w3.org/TR/css3-ui/#outline-offset0",syntax:"article { $(name): 15px; }",desc:"Width of the outline"},{name:"outline-style",restriction:"enum",version:"2.0",browsers:"C,FF1.5,IE8,O8,S1.2",ref:"http://www.w3.org/TR/css3-ui/#outline-style0",syntax:"td { $(name): solid; }",desc:"Style of the outline",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"outline-width",restriction:"length",version:"2.0",browsers:"C,FF1.5,IE8,O8,S1.2",ref:"http://www.w3.org/TR/css3-ui/#outline-width0",syntax:"td { $(name): 2px; }",desc:"Width of the outline",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"overflow",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#overflow",syntax:"div { overflow: hidden auto; }",desc:"Shorthand for setting 'overflow-x' and 'overflow-y'.",values:[{name:"auto",version:"2.0",browsers:"all",desc:"The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."},{name:"hidden",version:"2.0",browsers:"all",desc:"Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."},{name:"-moz-hidden-unscrollable",version:"3.0",browsers:"FF"},{name:"no-content",version:"3.0",browsers:"none",desc:"When the content doesn't fit in the content box, the whole content is hidden, as if 'visibility: hidden' were specified."},{name:"no-display",version:"3.0",browsers:"none",desc:"When the content doesn't fit in the content box, the whole box is removed, as if 'display: none' were specified."},{name:"scroll",version:"2.0",browsers:"all",desc:"Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."},{name:"visible",version:"2.0",browsers:"all",desc:"Content is not clipped, i.e., it may be rendered outside the content box."}]},{name:"overflow-style",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-box/#overflow-style",syntax:"div { $(name): marquee, panner; }",desc:"Specify whether content is clipped when it overflows the element's content area.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"No preference, UA should use the first scrolling method in the list that it supports."},{name:"marquee",version:"3.0",browsers:"all",desc:"Content moving autonomously, without any user events to control it."},{name:"move",version:"3.0",browsers:"all",desc:"User can move the content of the element directly (rather than indirectly by moving a scrollbar or a panner). Typically, the mouse pointer changes into a hand or a cross of four arrows to indicate that the user can drag the content around."},{name:"panner",version:"3.0",browsers:"all",desc:"A panner is typically a rectangle shown in one corner of the element, with a smaller rectangle inside."},{name:"scrollbar",version:"3.0",browsers:"all",desc:'Scrollbars are typically narrow strips inserted on one or two edges of an element and which often have arrows to click on and a "thumb" to drag up and down (or left and right) to move the contents of the element.'}]},{name:"overflow-wrap",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#overflow-wrap0",syntax:"div { $(name): break-word; }",desc:"This property specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit within the line box.",values:[{name:"break-word",version:"3.0",browsers:"all"},{name:"normal",version:"3.0",browsers:"all"}]},{name:"overflow-x",restriction:"enum",version:"3.0",browsers:"C,FF1.5,IE5,O9.5,S3",ref:"http://www.w3.org/TR/css3-box/#overflow-x",syntax:"div { $(name): hidden; }",desc:"Specify whether content is clipped when it overflows the element's content area.",values:[{name:"auto",version:"2.0",browsers:"all",desc:"The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."},{name:"hidden",version:"2.0",browsers:"all",desc:"Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."},{name:"no-content",version:"3.0",browsers:"none",desc:"When the content doesn't fit in the content box, the whole content is hidden, as if 'visibility: hidden' were specified."},{name:"no-display",version:"3.0",browsers:"none",desc:"When the content doesn't fit in the content box, the whole box is removed, as if 'display: none' were specified."},{name:"scroll",version:"2.0",browsers:"all",desc:"Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."},{name:"visible",version:"2.0",browsers:"all",desc:"Content is not clipped, i.e., it may be rendered outside the content box."},{name:"-webkit-marquee",version:"2.0",browsers:"C,S3"}]},{name:"overflow-y",restriction:"enum",version:"3.0",browsers:"C,FF1.5,IE5,O9.5,S3",ref:"http://www.w3.org/TR/css3-box/#overflow-x",syntax:"div { $(name): hidden; }",desc:"Specify whether content is clipped when it overflows the element's content area.",values:[{name:"auto",version:"2.0",browsers:"all",desc:"The behavior of the 'auto' value is UA-dependent, but should cause a scrolling mechanism to be provided for overflowing boxes."},{name:"hidden",version:"2.0",browsers:"all",desc:"Content is clipped and no scrolling mechanism should be provided to view the content outside the clipping region."},{name:"no-content",version:"3.0",browsers:"none",desc:"When the content doesn't fit in the content box, the whole content is hidden, as if 'visibility: hidden' were specified."},{name:"no-display",version:"3.0",browsers:"none",desc:"When the content doesn't fit in the content box, the whole box is removed, as if 'display: none' were specified."},{name:"scroll",version:"2.0",browsers:"all",desc:"Content is clipped and if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed for a box whether or not any of its content is clipped."},{name:"visible",version:"2.0",browsers:"all",desc:"Content is not clipped, i.e., it may be rendered outside the content box."},{name:"-webkit-marquee",version:"2.0",browsers:"C,S3"}]},{name:"padding",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#padding1",syntax:"div { $(name): 4px 7px 2px 4px; }",desc:"Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative."},{name:"padding-bottom",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#padding1",syntax:"ul { $(name): 2em; }",desc:"Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative."},{name:"padding-left",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#padding1",syntax:"ul { $(name): 2em; }",desc:"Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative."},{name:"padding-right",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#padding1",syntax:"ul { $(name): 2em; }",desc:"Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative."},{name:"padding-top",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#padding1",syntax:"ul { $(name): 2em; }",desc:"Shorthand property to set values the thickness of the padding area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. The value may not be negative."},{name:"page",restriction:"identifier",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-page/#page",syntax:"auto | ",desc:"Specifies a particular type of page where an element SHOULD be displayed",values:{value:{name:"auto",version:"3.0",browsers:"all"}}},{name:"page-break-after",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/page.html#propdef-page-break-after",syntax:"table { $(name): always; }",desc:"Defines rules for page breaks after an element.",values:[{name:"always",version:"2.0",browsers:"all",desc:"Always force a page break after the generated box."},{name:"auto",version:"2.0",browsers:"all",desc:"Neither force nor forbid a page break after generated box."},{name:"avoid",version:"2.0",browsers:"all",desc:"Avoid a page break after the generated box."},{name:"left",version:"2.0",browsers:"all",desc:"Force one or two page breaks after the generated box so that the next page is formatted as a left page."},{name:"right",version:"2.0",browsers:"all",desc:"Force one or two page breaks after the generated box so that the next page is formatted as a right page."}]},{name:"page-break-before",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/page.html#propdef-page-break-before",syntax:"table { $(name): always; }",desc:"Defines rules for page breaks before an element.",values:[{name:"always",version:"2.0",browsers:"all",desc:"Always force a page break before the generated box."},{name:"auto",version:"2.0",browsers:"all",desc:"Neither force nor forbid a page break before the generated box."},{name:"avoid",version:"2.0",browsers:"all",desc:"Avoid a page break before the generated box."},{name:"left",version:"2.0",browsers:"all",desc:"Force one or two page breaks before the generated box so that the next page is formatted as a left page."},{name:"right",version:"2.0",browsers:"all",desc:"Force one or two page breaks before the generated box so that the next page is formatted as a right page."}]},{name:"page-break-inside",restriction:"enum",version:"2.0",browsers:"C,IE8,O7,S1.3",ref:"http://www.w3.org/TR/CSS2/page.html#propdef-page-break-inside",syntax:"table { $(name): avoid; }",desc:"Defines rules for page breaks inside an element.",values:[{name:"auto",version:"2.0",browsers:"all",desc:"Neither force nor forbid a page break inside the generated box."},{name:"avoid",version:"2.0",browsers:"all",desc:"Avoid a page break inside the generated box."}]},{name:"page-policy",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-content/#page-policy",syntax:"@string chapter { $(name): last; }",desc:"Determines which page-based occurrence of a given element is applied to a counter or string value.",values:[{name:"first",version:"3.0",browsers:"all",desc:"Takes the value after the first state change in the counter or string during processing of the page."},{name:"last",version:"3.0",browsers:"all",desc:"Takes the value following the final state change on the page."},{name:"start",version:"3.0",browsers:"all",desc:"Takes the value of the counter or string at the beginning of the page (before applying style to the elements of the page, but after applying it to the @page context itself)."}]},{name:"pause",restriction:"time, enum",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#pause",syntax:"h2 { $(name): 30ms 40ms; }",desc:"Shorthand for setting 'pause-before' and 'pause-after'. If two values are given, the first value is 'pause-before' and the second is 'pause-after'. If only one value is given, it applies to both properties.",values:[{name:"medium",version:"2.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"strong",version:"2.0",browsers:"all"},{name:"weak",version:"2.0",browsers:"all"},{name:"x-strong",version:"2.0",browsers:"all"},{name:"x-weak",version:"2.0",browsers:"all"}]},{name:"pause-after",restriction:"time",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#pause-after",syntax:"h3 { $(name): 30ms; }",desc:"Specifies a pause or prosodic boundary to be observed after an element or, if any 'cue-after' is specified, after these. Values indicate the prosodic strength of the break in speech output.",values:[{name:"medium",version:"2.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"strong",version:"2.0",browsers:"all"},{name:"weak",version:"2.0",browsers:"all"},{name:"x-strong",version:"2.0",browsers:"all"},{name:"x-weak",version:"2.0",browsers:"all"}]},{name:"pause-before",restriction:"time",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#pause-before",syntax:"h3 { $(name): 30ms; }",desc:"Specifies a pause or prosodic boundary to be observed before an element or, if any 'cue-before' is specified, before these. Values indicate the prosodic strength of the break in speech output.",values:[{name:"medium",version:"2.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"strong",version:"2.0",browsers:"all"},{name:"weak",version:"2.0",browsers:"all"},{name:"x-strong",version:"2.0",browsers:"all"},{name:"x-weak",version:"2.0",browsers:"all"}]},{name:"perspective",restriction:"number",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective",syntax:"div { $(name): none; }",desc:"Applies the same transform as the perspective() transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No perspective transform is applied."}}},{name:"perspective-origin",restriction:"percentage, length",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective-origin",syntax:"div { $(name): 10px; }",desc:"Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"pitch",restriction:"frequency",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/CSS2/aural.html#propdef-pitch",syntax:" | x-low | low | medium | high | x-high",desc:"Specifies the average pitch (a frequency) of the speaking voice. The average pitch of a voice depends on the voice family. For example, the average pitch for a standard male voice is around 120Hz, but for a female voice, it's around 210Hz.",values:[{name:"high",version:"2.0",browsers:"all"},{name:"low",version:"2.0",browsers:"all"},{name:"medium",version:"2.0",browsers:"all",desc:"Equivalent to 100% and means the normal pitch for this voice"},{name:"x-high",version:"2.0",browsers:"all"},{name:"x-low",version:"2.0",browsers:"all"}]},{name:"pitch-range",restriction:"number",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/CSS2/aural.html#propdef-pitch-range",syntax:"",desc:"Specifies variation in average pitch. The perceived pitch of a human voice is determined by the fundamental frequency and typically has a value of 120Hz for a male voice and 210Hz for a female voice."},{name:"pointer-events",restriction:"enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty",desc:"Allows authors to control under what circumstances (if any) a particular graphic element can become the target of mouse events.",values:[{name:"all",version:"3.0",browsers:"all"},{name:"fill",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"painted",version:"3.0",browsers:"all"},{name:"stroke",version:"3.0",browsers:"all"},{name:"visible",version:"3.0",browsers:"all"},{name:"visibleFill",version:"3.0",browsers:"all"},{name:"visiblePainted",version:"3.0",browsers:"all"},{name:"visibleStroke",version:"3.0",browsers:"all"}]},{name:"position",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/visuren.html#propdef-position",syntax:"div { $(name): absolute; }",values:[{name:"absolute",version:"2.0",browsers:"all",desc:"The box's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties. These properties specify offsets with respect to the box's 'containing block'."},{name:"fixed",version:"2.0",browsers:"all",desc:"The box's position is calculated according to the 'absolute' model, but in addition, the box is fixed with respect to some reference. As with the 'absolute' model, the box's margins do not collapse with any other margins."},{name:"-ms-page",version:"3.0",browsers:"IE10",desc:"The box's position is calculated according to the 'absolute' model."},{name:"relative",version:"2.0",browsers:"all",desc:"The box's position is calculated according to the normal flow (this is called the position in normal flow). Then the box is offset relative to its normal position."},{name:"static",version:"2.0",browsers:"all",desc:"The box is a normal box, laid out according to the normal flow. The 'top', 'right', 'bottom', and 'left' properties do not apply."},{name:"-webkit-sticky",version:"2.0",browsers:"C"}]},{name:"quotes",restriction:"string",version:"2.0",browsers:"C,FF1.5,IE8,O8,S5.1",ref:"http://www.w3.org/TR/css3-content/#quotes",syntax:"none | [ ]+",desc:"Specifies quotation marks for any number of embedded quotations.",values:{value:{name:"none",version:"2.0",browsers:"all",desc:"The 'open-quote' and 'close-quote' values of the 'content' property produce no quotations marks, as if they were 'no-open-quote' and 'no-close-quote' respectively."}}},{name:"resize",restriction:"enum",version:"3.0",browsers:"C,FF4,S3",ref:"http://www.w3.org/TR/css3-ui/#resize0",syntax:"div { $(name): both; }",desc:"Allows control over the appearance and function of the resizing mechanism (e.g. a resize box or widget) on the element. Applies to elements with 'overflow' other than 'visible'.",values:[{name:"both",version:"3.0",browsers:"all",desc:"The UA presents a bidirectional resizing mechanism to allow the user to adjust both the height and the width of the element."},{name:"horizontal",version:"3.0",browsers:"all",desc:"The UA presents a unidirectional horizontal resizing mechanism to allow the user to adjust only the width of the element."},{name:"none",version:"3.0",browsers:"all",desc:"The UA does not present a resizing mechanism on the element, and the user is given no direct manipulation mechanism to resize the element."},{name:"vertical",version:"3.0",browsers:"all",desc:"The UA presents a unidirectional vertical resizing mechanism to allow the user to adjust only the height of the element."}]},{name:"rest",restriction:"time",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#rest",syntax:"h3 { $(name): 4s; }",desc:"Shorthand for setting 'rest-before' and 'rest-after'. If two values are given, the first value is 'rest-before' and the second is 'rest-after'. If only one value is given, it applies to both properties.",values:[{name:"medium",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"strong",version:"3.0",browsers:"all"},{name:"weak",version:"3.0",browsers:"all"},{name:"x-strong",version:"3.0",browsers:"all"},{name:"x-weak",version:"3.0",browsers:"all"}]},{name:"rest-after",restriction:"time",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#rest-after",syntax:"h3 { $(name): 4s; }",desc:"Specifies a rest or prosodic boundary to be observed after an element's content.",values:[{name:"medium",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"strong",version:"3.0",browsers:"all"},{name:"weak",version:"3.0",browsers:"all"},{name:"x-strong",version:"3.0",browsers:"all"},{name:"x-weak",version:"3.0",browsers:"all"}]},{name:"rest-before",restriction:"time",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#rest-before",syntax:"h3 { $(name): 4s; }",desc:"Specifies a rest or prosodic boundary to be observed before an element's content.",values:[{name:"medium",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"strong",version:"3.0",browsers:"all"},{name:"weak",version:"3.0",browsers:"all"},{name:"x-strong",version:"3.0",browsers:"all"},{name:"x-weak",version:"3.0",browsers:"all"}]},{name:"richness",restriction:"number(0-100)",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/CSS2/aural.html#propdef-richness",syntax:"A value between '0' and '100'. The higher the value, the more the voice will carry. A lower value will produce a soft, mellifluous voice.",desc:"Specifies the richness, or brightness, of the speaking voice. A rich voice will 'carry' in a large room, a smooth voice will not."},{name:"right",restriction:"length, percentage",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/visuren.html#propdef-right",syntax:"article { $(name): 50px; }",desc:"Specifies how far an absolutely positioned box's right margin edge is offset to the left of the right edge of the box's 'containing block'.",values:{value:{name:"auto",version:"2.0",browsers:"all",desc:"For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"}}},{name:"rotation",restriction:"angle",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-box/#rotation",syntax:"img { $(name): 90deg; }",desc:"Rotates a block-level element counterclockwise around the point given by 'rotation-point'."},{name:"rotation-point",restriction:"percentage, length",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-box/#rotation-point",syntax:"img { $(name): 10% 25%; }",desc:"Pair of values that defines a point as an offset from the top left border edge. Initial value is 50% 50%.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"ruby-align",restriction:"enum",version:"3.0",browsers:"FF10,IE5",ref:"http://www.w3.org/TR/css3-ruby/#rubyalign",syntax:"auto | start | left | center | end | right | distribute-letter | distribute-space | line-edge",desc:"This property can be used on any element to control the text alignment of the ruby text and ruby base contents relative to each other.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The user agent determines how the ruby contents are aligned. This is the initial value."},{name:"center",version:"3.0",browsers:"all",desc:"The ruby text content is centered within the width of the base. If the length of the base is smaller than the length of the ruby text, then the base is centered within the width of the ruby text."},{name:"distribute-letter",version:"3.0",browsers:"all",desc:"If the width of the ruby text is smaller than that of the base, then the ruby text contents are evenly distributed across the width of the base, with the first and last ruby text glyphs lining up with the corresponding first and last base glyphs. If the width of the ruby text is at least the width of the base, then the letters of the base are evenly distributed across the width of the ruby text."},{name:"distribute-space",version:"3.0",browsers:"all",desc:"If the width of the ruby text is smaller than that of the base, then the ruby text contents are evenly distributed across the width of the base, with a certain amount of white space preceding the first and following the last character in the ruby text. That amount of white space is normally equal to half the amount of inter-character space of the ruby text."},{name:"end",version:"3.0",browsers:"all",desc:"The ruby text content is aligned with the end edge of the base."},{name:"left",version:"3.0",browsers:"all",desc:"The ruby text content is aligned with the start edge of the base."},{name:"line-edge",version:"3.0",browsers:"all",desc:"If the ruby text is not adjacent to a line edge, it is aligned as in 'auto'. If it is adjacent to a line edge, then it is still aligned as in auto, but the side of the ruby text that touches the end of the line is lined up with the corresponding edge of the base."},{name:"right",version:"3.0",browsers:"all",desc:"The ruby text content is aligned with the end edge of the base."},{name:"start",version:"3.0",browsers:"all",desc:"The ruby text content is aligned with the start edge of the base."}]},{name:"ruby-overhang",restriction:"enum",version:"3.0",browsers:"FF10,IE5",ref:"http://www.w3.org/TR/css3-ruby/#rubyover",syntax:"auto | start | end | none",desc:"Determines whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The ruby text can overhang text adjacent to the base on either side. This is the initial value."},{name:"end",version:"3.0",browsers:"all",desc:"The ruby text can overhang the text that follows it."},{name:"none",version:"3.0",browsers:"all",desc:"The ruby text cannot overhang any text adjacent to its base, only its own base."},{name:"start",version:"3.0",browsers:"all",desc:"The ruby text can overhang the text that precedes it."}]},{name:"ruby-position",restriction:"enum",version:"3.0",browsers:"FF10,IE5",ref:"http://www.w3.org/TR/css3-ruby/#ruby-position",syntax:"before | after | right",desc:"This property is used by the parent of elements with display: ruby-text to control the position of the ruby text with respect to its base.",values:[{name:"after",version:"3.0",browsers:"all",desc:"The ruby text appears after the base. This is a relatively rare setting used in ideographic East Asian writing systems, most easily found in educational text."},{name:"before",version:"3.0",browsers:"all",desc:"The ruby text appears before the base. This is the most common setting used in ideographic East Asian writing systems."},{name:"inline",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all",desc:"The ruby text appears on the right of the base. Unlike 'before' and 'after', this value is not relative to the text flow direction."}]},{name:"ruby-span",restriction:"enum",version:"3.0",browsers:"FF10",ref:"http://www.w3.org/TR/css3-ruby/#rubyspan",syntax:"attr(x) | none",desc:"Determines whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base.",values:[{name:"attr(x)",version:"3.0",browsers:"all",desc:"The value of attribute 'x' is a string value. The string value is evaluated as a to determine the number of ruby base elements to be spanned by the annotation element."},{name:"none",version:"3.0",browsers:"all",desc:"No spanning. The computed value is '1'."}]},{name:"scrollbar-3dlight-color",restriction:"color",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/library/ms531153(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"scrollbar-arrow-color",restriction:"color",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/library/ms531154(VS.85).aspx",syntax:"body { $(name): #00ffff; }",desc:"Determines the color of the arrow elements of a scroll arrow.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"scrollbar-base-color",restriction:"color",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/library/ms531155(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the main elements of a scroll bar, which include the scroll box, track, and scroll arrows.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"scrollbar-darkshadow-color",restriction:"color",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/library/ms531156(v=VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the gutter of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"scrollbar-face-color",restriction:"color",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/library/ms531157(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the scroll box and scroll arrows of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"scrollbar-highlight-color",restriction:"color",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/library/ms531158(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the top and left edges of the scroll box and scroll arrows of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"scrollbar-shadow-color",restriction:"color",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/library/ms531159(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"scrollbar-track-color",restriction:"color",version:"3.0",browsers:"IE6",ref:"http://msdn.microsoft.com/en-us/library/ms531160(VS.85).aspx",syntax:"textarea { $(name): #00ffff; }",desc:"Determines the color of the track element of a scroll bar.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"shape-rendering",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/SVG11/painting.html#ShapeRenderingProperty",desc:"The creator of SVG content might want to provide a hint to the implementation about what tradeoffs to make as it renders vector graphics elements such as ‘path’ elements and basic shapes such as circles and rectangles.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"crispEdges",version:"3.0",browsers:"all"},{name:"geometricPrecision",version:"3.0",browsers:"all"},{name:"optimizeQuality",version:"3.0",browsers:"all"},{name:"optimizeSpeed",version:"3.0",browsers:"all"}]},{name:"size",restriction:"length",version:"2.1",browsers:"C,O8",ref:"http://www.w3.org/TR/css3-page/#page-size-prop",syntax:"{1,2} | auto | [ || [ portrait | landscape] ]"},{name:"speak",restriction:"enum",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#speak",syntax:"div { $(name): normal; }",desc:"Specifies whether text will be rendered aurally and if so, in what manner.",values:[{name:"digits",version:"2.0",browsers:"all",desc:"Speak numbers one digit at a time, for instance, 'twelve' would be spoken as 'one two', and '31' as 'three one'."},{name:"literal-punctuation",version:"2.0",browsers:"all",desc:"Similar to 'normal' value, but punctuation such as semicolons, braces, and so on are to be spoken literally."},{name:"none",version:"2.0",browsers:"all",desc:"Suppresses aural rendering so that the element requires no time to render."},{name:"no-punctuation",version:"2.0",browsers:"all",desc:"Similar to 'normal' value but punctuation is not to be spoken nor rendered as various pauses."},{name:"normal",version:"2.0",browsers:"all",desc:"Uses language-dependent pronunciation rules for rendering an element and its children. Punctuation is not spoken, but instead is rendered naturally as various pauses."},{name:"spell-out",version:"2.0",browsers:"all",desc:"Spells the text one letter at a time (useful for acronyms and abbreviations). In languages where accented characters are rare, it is permitted to drop accents in favor of alternative unaccented spellings."}]},{name:"speak-as",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#speak-as",syntax:"div { $(name): spell-out; }",desc:"Determines in what manner text gets rendered aurally, based upon a basic predefined list of possible values.",values:[{name:"digits",version:"3.0",browsers:"all",desc:"Speak numbers one digit at a time, for instance, 'twelve' would be spoken as 'one two', and '31' as 'three one'."},{name:"literal-punctuation",version:"3.0",browsers:"all",desc:"Punctuation such as semicolons, braces, and so on is named aloud (i.e. spoken literally) rather than rendered naturally as appropriate pauses."},{name:"no-punctuation",version:"3.0",browsers:"all",desc:"Punctuation is not rendered: neither spoken nor rendered as pauses."},{name:"normal",version:"3.0",browsers:"all",desc:"Uses language-dependent pronunciation rules for rendering the element's content."},{name:"spell-out",version:"3.0",browsers:"all",desc:"Spells the text one letter at a time (useful for acronyms and abbreviations)."}]},{name:"speech-rate",restriction:"number",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/CSS2/aural.html#propdef-speech-rate",syntax:" | x-slow | slow | medium | fast | x-fast | faster | slower",desc:"Controls the speaking rate. The default rate for a voice depends on the language and dialect and on the personality of the voice.",values:[{name:"fast",version:"2.0",browsers:"all",desc:"Same as 300 words per minute."},{name:"faster",version:"2.0",browsers:"all",desc:"Adds 40 words per minute to the current speech rate."},{name:"medium",version:"2.0",browsers:"all",desc:"Same as 180-200 words per minute."},{name:"slow",version:"2.0",browsers:"all",desc:"Same as 120 words per minute."},{name:"slower",version:"2.0",browsers:"all",desc:"Subtracts 40 words per minute from the current speech rate."},{name:"x-fast",version:"2.0",browsers:"all",desc:"Same as 500 words per minute."},{name:"x-slow",version:"2.0",browsers:"all",desc:"Same as 80 words per minute."}]},{name:"src",restriction:"enum, string, url, identifier",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#src-desc",syntax:"src: url(font.woff) format('woff');",desc:"specifies the resource containing font data. It is required, whether the font is downloadable or locally installed. It's value is a prioritized, comma-separated list of external references or locally installed font face names."},{name:"stop-color",restriction:"color",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/pservers.html#StopColorProperty",desc:"The 'stop-color' property indicates what color to use at that gradient stop.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"stop-opacity",restriction:"number(0-1)",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/pservers.html#StopOpacityProperty",desc:"The 'stop-opacity' property defines the opacity of a given gradient stop."},{name:"stress",restriction:"number(0-100)",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/CSS2/aural.html#propdef-stress",syntax:"A value, between '0' and '100'. The meaning of values depends on the language being spoken. For example, a level of '50' for a standard, English-speaking male voice (average pitch = 122Hz), speaking with normal intonation and emphasis would have a different meaning than '50' for an Italian voice.",desc:"Specifies the height of 'local peaks' in the intonation contour of a voice. For example, English is a stressed language, and different parts of a sentence are assigned primary, secondary, or tertiary stress."},{name:"stroke",restriction:"color",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#StrokeProperty",desc:"The 'stroke' property paints along the outline of the given graphical element.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"stroke-dasharray",restriction:"length, percentage, enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#StrokeDashArrayProperty",desc:"Controls the pattern of dashes and gaps used to stroke paths.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"stroke-dashoffset",restriction:"percentage, length, integer",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#StrokeDashOffsetProperty",desc:"Specifies the distance into the dash pattern to start the dash."},{name:"stroke-linecap",restriction:"enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#StrokeLinecapProperty",desc:"Specifies the shape to be used at the end of open subpaths when they are stroked.",values:[{name:"butt",version:"3.0",browsers:"all"},{name:"round",version:"3.0",browsers:"all"},{name:"square",version:"3.0",browsers:"all"}]},{name:"stroke-linejoin",restriction:"enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#StrokeLinejoinProperty",desc:"specifies the shape to be used at the corners of paths or basic shapes when they are stroked.",values:[{name:"bevel",version:"3.0",browsers:"all"},{name:"miter",version:"3.0",browsers:"all"},{name:"round",version:"3.0",browsers:"all"}]},{name:"stroke-miterlimit",restriction:"number",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#StrokeMiterLimitProperty",syntax:"path { $(name): 4; }",desc:"When two line segments meet at a sharp angle and miter joins have been specified for 'stroke-linejoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path."},{name:"stroke-opacity",restriction:"number(0-1)",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#StrokeOpacityProperty",desc:"Specifies the opacity of the painting operation used to stroke the current object."},{name:"stroke-width",restriction:"percentage, length, integer",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/painting.html#StrokeWidthProperty",desc:"This property specifies the width of the stroke on the current object."},{name:"table-layout",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/tables.html#width-layout",syntax:"table { $(name): fixed; }",desc:"Controls the algorithm used to lay out the table cells, rows, and columns.",values:[{name:"auto",version:"2.0",browsers:"all",desc:"Use any automatic table layout algorithm."},{name:"fixed",version:"2.0",browsers:"all",desc:"Use the fixed table layout algorithm."}]},{name:"tab-size",restriction:"integer, length",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#tab-size",syntax:"div { $(name): 4; }",desc:"This property determines the width of the tab character (U+0009), in space characters (U+0020), when rendered"},{name:"text-align",restriction:"string",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-text/#text-align0",syntax:"h2 { $(name): center; }",desc:"Describes how inline contents of a block are horizontally aligned if the contents do not completely fill the line box.",values:[{name:"center",version:"1.0",browsers:"all",desc:"The inline contents are centered within the line box."},{name:"end",version:"3.0",browsers:"none",desc:"The inline contents are aligned to the end edge of the line box."},{name:"justify",version:"1.0",browsers:"all",desc:"The text is justified according to the method specified by the 'text-justify' property."},{name:"left",version:"1.0",browsers:"all",desc:"The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."},{name:"match-parent",version:"3.0",browsers:"none",desc:"This value behaves the same as 'inherit' except that an inherited value of 'start' or 'end' is calculated against its parent's 'direction' value."},{name:"right",version:"1.0",browsers:"all",desc:"The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."},{name:"start",version:"3.0",browsers:"none",desc:"The inline contents are aligned to the start edge of the line box."}]},{name:"text-align-last",restriction:"enum",version:"3.0",browsers:"FF12,IE5",ref:"http://www.w3.org/TR/css3-text/#text-align-last0",syntax:"div { $(name): right; }",desc:"Describes how the last line of a block or a line right before a forced line break is aligned when 'text-align' is set to 'justify'.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all",desc:"The inline contents are centered within the line box."},{name:"end",version:"3.0",browsers:"none",desc:"The inline contents are aligned to the end edge of the line box."},{name:"justify",version:"3.0",browsers:"all",desc:"The text is justified according to the method specified by the 'text-justify' property."},{name:"left",version:"3.0",browsers:"all",desc:"The inline contents are aligned to the left edge of the line box. In vertical text, 'left' aligns to the edge of the line box that would be the start edge for left-to-right text."},{name:"right",version:"3.0",browsers:"all",desc:"The inline contents are aligned to the right edge of the line box. In vertical text, 'right' aligns to the edge of the line box that would be the end edge for left-to-right text."},{name:"start",version:"3.0",browsers:"none",desc:"The inline contents are aligned to the start edge of the line box."}]},{name:"text-anchor",restriction:"enum",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/SVG11/text.html#TextAnchorProperty",desc:"Used to align (start-, middle- or end-alignment) a string of text relative to a given point.",values:[{name:"end",version:"3.0",browsers:"all"},{name:"middle",version:"3.0",browsers:"all"},{name:"start",version:"3.0",browsers:"all"}]},{name:"text-decoration",restriction:"enum, color",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-text/#text-decoration0",syntax:"a:visited { $(name): line-through; }",desc:"Decorations applied to font used for an element's text.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"Produces a dashed line style."},{name:"dotted",version:"1.0",browsers:"all",desc:"Produces a dotted line."},{name:"double",version:"1.0",browsers:"all",desc:"Produces a double line."},{name:"line-through",version:"1.0",browsers:"all",desc:"Each line of text has a line through the middle."},{name:"none",version:"1.0",browsers:"all",desc:"Produces no line."},{name:"overline",version:"1.0",browsers:"all",desc:"Each line of text has a line above it."},{name:"solid",version:"1.0",browsers:"all",desc:"Produces a solid line."},{name:"underline",version:"1.0",browsers:"all",desc:"Each line of text is underlined."},{name:"wavy",version:"1.0",browsers:"all",desc:"Produces a wavy line."}]},{name:"text-decoration-color",restriction:"color",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-decoration-color0",syntax:"div { $(name): #ff0; }",desc:"Specifies the color of text decoration (underlines overlines, and line-throughs) set on the element with text-decoration-line.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"text-decoration-line",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-decoration-line0",syntax:"div { $(name): underline; }",desc:"Specifies what line decorations, if any, are added to the element.",values:[{name:"line-through",version:"3.0",browsers:"all",desc:"Each line of text has a line through the middle."},{name:"none",version:"3.0",browsers:"all",desc:"Neither produces nor inhibits text decoration."},{name:"overline",version:"3.0",browsers:"all",desc:"Each line of text has a line above it."},{name:"underline",version:"3.0",browsers:"all",desc:"Each line of text is underlined."}]},{name:"text-decoration-skip",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-decoration-skip0",syntax:"none | [ images || spaces || ink || all ]",desc:"Specifies what parts of the element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors.",values:[{name:"ink",version:"3.0",browsers:"all",desc:"Skip over where glyphs are drawn: interrupt the decoration line to let text show through where the text decoration would otherwise cross over a glyph. The UA may also skip a small distance to either side of the glyph outline."},{name:"none",version:"3.0",browsers:"all",desc:"Skip nothing: text-decoration is drawn for all text content and for inline replaced elements."},{name:"objects",version:"3.0",browsers:"all",desc:"Skip this element if it is an atomic inline (such as an image or inline-block)."},{name:"spaces",version:"3.0",browsers:"all",desc:"Skip white space: this includes regular spaces (U+0020) and tabs (U+0009), as well as nbsp (U+00A0), ideographic space (U+3000), all fixed width spaces (such as U+2000–U+200A, U+202F and U+205F), and any adjacent letter-spacing or word-spacing."}]},{name:"text-decoration-style",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-decoration-style0",syntax:"div { $(name): solid; }",desc:"Specifies the line style for underline, line-through and overline text decoration.",values:[{name:"dashed",version:"3.0",browsers:"all",desc:"Produces a dashed line style."},{name:"dotted",version:"3.0",browsers:"all",desc:"Produces a dotted line."},{name:"double",version:"3.0",browsers:"all",desc:"Produces a double line."},{name:"none",version:"3.0",browsers:"all",desc:"Produces no line."},{name:"solid",version:"3.0",browsers:"all",desc:"Produces a solid line."},{name:"wavy",version:"3.0",browsers:"all",desc:"Produces a wavy line."}]},{name:"text-emphasis",restriction:"color, string",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-emphasis0",syntax:" | | none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ]",desc:"Shorthand for setting text-emphasis-style and text-emphasis-color in one declaration.",values:[{name:"circle",version:"3.0",browsers:"all",desc:"Draw large circles as marks. The filled circle is U+25CF '●', and the open circle is U+25CB '○'."},{name:"dot",version:"3.0",browsers:"all",desc:"Draw small circles as marks. The filled dot is U+2022 '•', and the open dot is U+25E6 '◦'."},{name:"double-circle",version:"3.0",browsers:"all",desc:"Draw double circles as marks. The filled double-circle is U+25C9 '◉', and the open double-circle is U+25CE '◎'."},{name:"filled",version:"3.0",browsers:"all",desc:"The shape is filled with solid color."},{name:"none",version:"3.0",browsers:"all",desc:"No emphasis marks."},{name:"open",version:"3.0",browsers:"all",desc:"The shape is hollow."},{name:"sesame",version:"3.0",browsers:"all",desc:"Draw sesames as marks. The filled sesame is U+FE45 '﹅', and the open sesame is U+FE46 '﹆'."},{name:"triangle",version:"3.0",browsers:"all",desc:"Draw triangles as marks. The filled triangle is U+25B2 '▲', and the open triangle is U+25B3 '△'."}]},{name:"text-emphasis-color",restriction:"color",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-emphasis-color0",syntax:"div { $(name): #ff0; }",desc:"Describes the foreground color of the emphasis marks.",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"text-emphasis-position",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-emphasis-position0",syntax:"[ above | below ] && [ right | left ]",desc:"Describes where emphasis marks are drawn at.",values:[{name:"above",version:"3.0",browsers:"all",desc:"Draw marks over the text in horizontal typographic mode."},{name:"below",version:"3.0",browsers:"all",desc:"Draw marks under the text in horizontal typographic mode."},{name:"left",version:"3.0",browsers:"all",desc:"Draw marks to the left of the text in vertical typographic mode."},{name:"right",version:"3.0",browsers:"all",desc:"Draw marks to the right of the text in vertical typographic mode."}]},{name:"text-emphasis-style",restriction:"string",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-emphasis-style0",syntax:"none | [[ filled | open ] || [ dot | circle | double-circle | triangle | sesame ]] | ",desc:"Applies emphasis marks to the element's text.",values:[{name:"circle",version:"3.0",browsers:"all",desc:"Draw large circles as marks. The filled circle is U+25CF '●', and the open circle is U+25CB '○'."},{name:"dot",version:"3.0",browsers:"all",desc:"Draw small circles as marks. The filled dot is U+2022 '•', and the open dot is U+25E6 '◦'."},{name:"double-circle",version:"3.0",browsers:"all",desc:"Draw double circles as marks. The filled double-circle is U+25C9 '◉', and the open double-circle is U+25CE '◎'."},{name:"filled",version:"3.0",browsers:"all",desc:"The shape is filled with solid color."},{name:"none",version:"3.0",browsers:"all",desc:"No emphasis marks."},{name:"open",version:"3.0",browsers:"all",desc:"The shape is hollow."},{name:"sesame",version:"3.0",browsers:"all",desc:"Draw sesames as marks. The filled sesame is U+FE45 '﹅', and the open sesame is U+FE46 '﹆'."},{name:"triangle",version:"3.0",browsers:"all",desc:"Draw triangles as marks. The filled triangle is U+25B2 '▲', and the open triangle is U+25B3 '△'."}]},{name:"text-indent",restriction:"percentage, length",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-text/#text-indent0",syntax:"li { $(name): 5px; }",desc:"Specifies the indentation applied to lines of inline content in a block. The indentation only affects the first line of inline content in the block unless the 'hanging' keyword is specified, in which case it affects all lines except the first.",values:[{name:"each-line",version:"3.0",browsers:"none",desc:"Indentation affects the first line of the block container as well as each line after a forced line break, but does not affect lines after a text wrap break."},{name:"hanging",version:"3.0",browsers:"none",desc:"Inverts which lines are affected."}]},{name:"text-justify",restriction:"enum",version:"3.0",browsers:"IE5.5",ref:"http://www.w3.org/TR/css3-text/#text-justify0",syntax:"div { $(name): inter-word; }",desc:"Selects the justification algorithm used when 'text-align' is set to 'justify'. The property applies to block containers, but the UA may (but is not required to) also support it on inline elements.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality."},{name:"distribute",version:"3.0",browsers:"all",desc:"Justification primarily changes spacing both at word separators and at grapheme cluster boundaries in all scripts except those in the connected and cursive groups. This value is sometimes used in e.g. Japanese, often with the 'text-align-last' property."},{name:"inter-cluster",version:"3.0",browsers:"all",desc:"Justification primarily changes spacing at word separators and at grapheme cluster boundaries in clustered scripts. This value is typically used for Southeast Asian scripts such as Thai."},{name:"inter-ideograph",version:"3.0",browsers:"all",desc:"Justification primarily changes spacing at word separators and at inter-graphemic boundaries in scripts that use no word spaces. This value is typically used for CJK languages."},{name:"inter-word",version:"3.0",browsers:"all",desc:"Justification primarily changes spacing at word separators. This value is typically used for languages that separate words using spaces, like English or (sometimes) Korean."},{name:"kashida",version:"3.0",browsers:"all",desc:"Justification primarily stretches Arabic and related scripts through the use of kashida or other calligraphic elongation."},{name:"none",version:"3.0",browsers:"none",desc:"Justification is disabled."},{name:"trim",version:"3.0",browsers:"none",desc:"Specifies that compression is preferred to expansion and enables the trimming of blank space in glyphs where allowed by typographic tradition."}]},{name:"text-overflow",restriction:"enum",version:"3.0",browsers:"C,FF9,IE5.5,O11.6,S2",ref:"http://www.w3.org/TR/css3-ui/#text-overflow0",syntax:"span { $(name): ellipsis; }",desc:"Text can overflow for example when it is prevented from wrapping",values:[{name:"clip",version:"3.0",browsers:"all",desc:"Clip inline content that overflows. Characters may be only partially rendered."},{name:"ellipsis",version:"3.0",browsers:"all",desc:"Render an ellipsis character (U+2026) to represent clipped inline content."}]},{name:"text-rendering",restriction:"enum",version:"3.0",browsers:"C,FF3,O9,S5",ref:"http://www.w3.org/TR/SVG11/painting.html#TextRenderingProperty",desc:"The creator of SVG content might want to provide a hint to the implementation about what tradeoffs to make as it renders text. The ‘text-rendering’ property provides these hints.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"geometricPrecision",version:"3.0",browsers:"all"},{name:"optimizeLegibility",version:"3.0",browsers:"all"},{name:"optimizeSpeed",version:"3.0",browsers:"all"}]},{name:"text-shadow",restriction:"length, color",version:"3.0",browsers:"C,FF3.6,IE10,O9.5,S1.1",ref:"http://www.w3.org/TR/css3-text/#text-shadow0",syntax:"h1 { $(name): 20px 12px 2px #333;}",desc:"Enables shadow effects to be applied to the text of the element.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No shadow."}}},{name:"text-space-collapse",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#text-space-collapse",syntax:"div { $(name): collapse; }",desc:"This property declares whether and how white space inside the element is collapsed. Values have the following meanings, which must be interpreted according to the white space processing rules.",values:[{name:"collapse",version:"3.0",browsers:"all"},{name:"preserve",version:"3.0",browsers:"all"},{name:"preserve-breaks",version:"3.0",browsers:"all"}]},{name:"text-transform",restriction:"enum",version:"",browsers:"all",ref:"http://www.w3.org/TR/css3-text/#text-transform0",syntax:"h1 { $(name): capitalize; }",desc:"Controls capitalization effects of an element's text.",values:[{name:"capitalize",version:"",browsers:"all",desc:"Puts all words in titlecase."},{name:"fullsize-kana",version:"3.0",browsers:"none",desc:"Converts all small Kana characters to normal Kana. This value is typically used for ruby annotation text."},{name:"fullwidth",version:"3.0",browsers:"none",desc:"Puts all characters in fullwidth form. If the character does not have corresponding fullwidth form, it is left as is."},{name:"lowercase",version:"",browsers:"all",desc:"Puts all characters of each word in lowercase."},{name:"none",version:"",browsers:"all",desc:"No capitalization effects."},{name:"uppercase",version:"",browsers:"all",desc:"Puts all characters of each word in uppercase."}]},{name:"text-underline-position",restriction:"enum",version:"3.0",browsers:"IE10",ref:"http://www.w3.org/TR/css3-text/#text-underline-position0",syntax:"article { $(name): auto; }",desc:"Sets the position of an underline specified on the same element: it does not affect underlines specified by ancestor elements. This property is typically used in vertical writing contexts such as in Japanese documents where it often desired to have the underline appear 'over' (to the right of) the affected run of text",values:[{name:"alphabetic",version:"3.0",browsers:"none",desc:"The underline is aligned with the alphabetic baseline. In this case the underline is likely to cross some descenders."},{name:"auto",version:"3.0",browsers:"all",desc:"The user agent may use any algorithm to determine the underline's position. In horizontal line layout, the underline should be aligned as for alphabetic. In vertical line layout, if the language is set to Japanese or Korean, the underline should be aligned as for over."},{name:"below",version:"3.0",browsers:"all",desc:"The underline is aligned with the under edge of the element's content box."},{name:"left",version:"3.0",browsers:"none",desc:"In vertical typographic modes, the underline is aligned as for 'below', on the left edge of the text."},{name:"right",version:"3.0",browsers:"none",desc:"In vertical typographic modes, the underline is aligned as for 'below;, except it is aligned to the right edge of the text"}]},{name:"text-wrap",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-text/#word-break0",syntax:"p.test { $(name): none; }",desc:"Specifies mode for text wrapping.",values:[{name:"avoid",version:"3.0",browsers:"all",desc:"Line breaking is suppressed within the element: the UA may only break within the element if there are no other valid break points in the line."},{name:"none",version:"3.0",browsers:"all",desc:"Lines may not break; text that does not fit within the block container overflows it."},{name:"normal",version:"3.0",browsers:"all",desc:"Lines may break at allowed break points, as determined by the line-breaking rules in effect. Honors rules specified in Unicode Standard Annex #14 for the WJ, ZW, and GL line-breaking classes."}]},{name:"top",restriction:"length, percentage",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/visuren.html#propdef-top",syntax:"article { $(name): 50px; }",desc:"Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's 'containing block'.",values:{value:{name:"auto",version:"2.0",browsers:"all",desc:"For non-replaced elements, the effect of this value depends on which of related properties have the value 'auto' as well"}}},{name:"transform",restriction:"enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-property",syntax:"div { $(name): rotate(-90deg); }",desc:"A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",values:[{name:"matrix()",version:"3.0",browsers:"all",desc:"Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"},{name:"matrix3d()",version:"3.0",browsers:"all",desc:"specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."},{name:"none",version:"3.0",browsers:"all"},{name:"rotate()",version:"3.0",browsers:"all",desc:"Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."},{name:"rotate3d()",version:"3.0",browsers:"all",desc:"Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."},{name:"rotateX('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the X axis."},{name:"rotateY('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Y axis."},{name:"rotateZ('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Z axis."},{name:"scale()",version:"3.0",browsers:"all",desc:"Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."},{name:"scale3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."},{name:"scaleX()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."},{name:"scaleY()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."},{name:"scaleZ()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."},{name:"skew()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."},{name:"skewX()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X axis by the given angle."},{name:"skewY()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the Y axis by the given angle."},{name:"translate()",version:"3.0",browsers:"all",desc:"Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."},{name:"translate3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."},{name:"translateX()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the X direction."},{name:"translateY()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Y direction."},{name:"translateZ()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."}]},{name:"transform-origin",restriction:"length, percentage",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-origin",syntax:".album { $(name): 20% 40%; }",desc:"Establishes the origin of transformation for an element. This property is applied by first translating the element by the negated value of the property, then applying the element's transform, then translating by the property value.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"transform-style",restriction:"enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-3d-transforms/#transform-origin",syntax:"div { $(name): flat; }",desc:"Defines how nested elements are rendered in 3D space.",values:[{name:"flat",version:"3.0",browsers:"all",desc:"All children of this element are rendered flattened into the 2D plane of the element."},{name:"preserve-3d",version:"3.0",browsers:"none",desc:"Flattening is not performed, so children maintain their position in 3D space."}]},{name:"transition",restriction:"time, property, enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-transitions/#transition",syntax:"div { $(name): background-color linear 1s; }",desc:"Shorthand property combines four of the transition properties into a single property.",values:[{name:"all",version:"3.0",browsers:"all",desc:"Every property that is able to undergo a transition will do so."},{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"none",version:"3.0",browsers:"all",desc:"No property will transition."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"transition-delay",restriction:"time",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-transitions/#transition-delay",syntax:"div { $(name): 1s; }",desc:"Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied."},{name:"transition-duration",restriction:"time",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-transitions/#transition-duration",syntax:"div { $(name): 1s; }",desc:"Specifies how long the transition from the old value to the new value should take."},{name:"transition-property",restriction:"property",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-transitions/#transition-property",syntax:"div { $(name): background-color; }",desc:"Specifies the name of the CSS property to which the transition is applied.",values:[{name:"all",version:"3.0",browsers:"all",desc:"Every property that is able to undergo a transition will do so."},{name:"none",version:"3.0",browsers:"all",desc:"No property will transition."}]},{name:"transition-timing-function",restriction:"enum",version:"3.0",browsers:"FF16,IE10,O12.5",ref:"http://www.w3.org/TR/css3-transitions/#transition-timing-function",syntax:"div { $(name): linear; }",desc:"Describes how the intermediate values used during a transition will be calculated.",values:[{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"unicode-bidi",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-writing-modes/#unicode-bidi0",syntax:"p { $(name): embed; }",desc:"The level of embedding with respect to the bidirectional algorithm.",values:[{name:"bidi-override",version:"2.0",browsers:"all",desc:"Inside the element, reordering is strictly in sequence according to the 'direction' property; the implicit part of the bidirectional algorithm is ignored."},{name:"embed",version:"2.0",browsers:"all",desc:"If the element is inline-level, this value opens an additional level of embedding with respect to the bidirectional algorithm. The direction of this embedding level is given by the 'direction' property."},{name:"isolate",version:"3.0",browsers:"none",desc:"The contents of the element are considered to be inside a separate, independent paragraph."},{name:"normal",version:"2.0",browsers:"all",desc:"The element does not open an additional level of embedding with respect to the bidirectional algorithm. For inline-level elements, implicit reordering works across element boundaries."},{name:"plaintext",version:"3.0",browsers:"none",desc:"For the purposes of the Unicode bidirectional algorithm, the base directionality of each bidi paragraph for which the element forms the containing block is determined not by the element's computed 'direction'."}]},{name:"unicode-range",restriction:"unicode-range",version:"3.0",browsers:"all",ref:"http://www.w3.org/TR/css3-fonts/#unicode-range",syntax:"'urange' [, 'urange']*",desc:"Range of Unicode characters supported by a given font. Initial value is U+0-10FFFF"},{name:"user-select",restriction:"enum",version:"3.0",browsers:"none",ref:"http://css-infos.net/property/-webkit-user-select",syntax:"div { $(name): text; }",desc:"Controls the appearance of selection.",values:[{name:"all",version:"3.0",browsers:"all"},{name:"element",version:"3.0",browsers:"all"},{name:"elements",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"text",version:"3.0",browsers:"all"},{name:"toggle",version:"3.0",browsers:"all"}]},{name:"user-zoom",restriction:"",version:"",browsers:"all"},{name:"vertical-align",restriction:"percentage, length",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-linebox/#vertical-align",syntax:"div { $(name): middle; }",desc:"Affects the vertical positioning of the inline boxes generated by an inline-level element inside a line box.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Align the dominant baseline of the parent box with the equivalent, or heuristically reconstructed, baseline of the element inline box."},{name:"baseline",version:"1.0",browsers:"all",desc:"Align the 'alphabetic' baseline of the element with the 'alphabetic' baseline of the parent element."},{name:"bottom",version:"1.0",browsers:"all",desc:"Align the after edge of the extended inline box with the after-edge of the line box."},{name:"central",version:"3.0",browsers:"none",desc:"Align the 'central' baseline of the inline element with the central baseline of the parent."},{name:"middle",version:"3.0",browsers:"all",desc:"Align the 'middle' baseline of the inline element with the middle baseline of the parent."},{name:"sub",version:"1.0",browsers:"all",desc:"Lower the baseline of the box to the proper position for subscripts of the parent's box. (This value has no effect on the font size of the element's text.)"},{name:"super",version:"1.0",browsers:"all",desc:"Raise the baseline of the box to the proper position for superscripts of the parent's box. (This value has no effect on the font size of the element's text.)"},{name:"text-bottom",version:"1.0",browsers:"all",desc:"Align the bottom of the box with the after-edge of the parent element's font."},{name:"text-top",version:"1.0",browsers:"all",desc:"Align the top of the box with the before-edge of the parent element's font."},{name:"top",version:"1.0",browsers:"all",desc:"Align the before edge of the extended inline box with the before-edge of the line box."},{name:"use-script",version:"3.0",browsers:"none",desc:"Align the script preferred baseline of the element (determined by the computed script value) with the equivalent baseline of the parent element."},{name:"-webkit-baseline-middle",version:"2.0",browsers:"C,S1"}]},{name:"visibility",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#visibility",syntax:"img { $(name): hidden; }",desc:"Specifies whether the boxes generated by an element are rendered. Invisible boxes still affect layout (set the ‘display’ property to ‘none’ to suppress box generation altogether).",values:[{name:"collapse",version:"2.0",browsers:"all",desc:"Table-specific. If used on elements other than rows, row groups, columns, or column groups, 'collapse' has the same meaning as 'hidden'."},{name:"hidden",version:"2.0",browsers:"all",desc:"The generated box is invisible (fully transparent, nothing is drawn), but still affects layout."},{name:"visible",version:"2.0",browsers:"all",desc:"The generated box is visible."}]},{name:"voice-balance",restriction:"number(-100-100)",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#voice-balance",syntax:" | left | center | right | leftwards | rightwards",desc:"Refers to the balance between left and right channels, and presumes a two channel (stereo) model that is widely supported on consumer audio equipment.",values:[{name:"center",version:"3.0",browsers:"all",desc:"Same as '0'."},{name:"left",version:"3.0",browsers:"all",desc:"Same as -100."},{name:"leftwards",version:"3.0",browsers:"all",desc:"Moves the sound to the left, relative to the inherited voice balance. More precisely, subtract 20 from the inherited value and clip the resulting value to the range '-100' and '100'."},{name:"right",version:"3.0",browsers:"all",desc:"Same as '100' or '+100'."},{name:"rightwards",version:"3.0",browsers:"all",desc:"Moves the sound to the right, relative to the inherited voice balance. More precisely, add 20 to the inherited value and clip the resulting value to the range '-100' and '100'."}]},{name:"voice-duration",restriction:"time",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#voice-duration",syntax:"",desc:"Allows authors to specify how long it should take to render the selected element's content. This property overrides the 'voice-rate' property."},{name:"voice-family",restriction:"number, string",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#voice-family",syntax:"[[ | ],]* [ | ]",desc:"Comma-separated, prioritized list of voice family names (compare with 'font-family').",values:[{name:"child",version:"2.0",browsers:"all",desc:"Child voice for 'age'"},{name:"female",version:"2.0",browsers:"all",desc:"Female voice for 'generic-voice'"},{name:"male",version:"2.0",browsers:"all",desc:"Male voice for 'generic-voice'"},{name:"neutral",version:"2.0",browsers:"all",desc:"Neutral voice for 'generic-voice'"},{name:"old",version:"2.0",browsers:"all",desc:"Old person voice for 'age'"},{name:"young",version:"2.0",browsers:"all",desc:"Young person voice for 'age'"}]},{name:"voice-pitch",restriction:"percentage, number, frequency, semitones",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#voice-pitch",syntax:"h2 { $(name): absolute 30Hz; }",desc:"Specifies the average pitch (a frequency) of the speaking voice. The average pitch of a voice depends on the voice family. For example, the average pitch for a standard male voice is around 120Hz, but for a female voice, it's around 210Hz.",values:[{name:"absolute",version:"3.0",browsers:"all"},{name:"high",version:"3.0",browsers:"all"},{name:"low",version:"3.0",browsers:"all"},{name:"medium",version:"3.0",browsers:"all",desc:"Equivalent to 100% and means the normal pitch for this voice"},{name:"x-high",version:"3.0",browsers:"all"},{name:"x-low",version:"3.0",browsers:"all"}]},{name:"voice-range",restriction:"percentage, number, frequency, semitones",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#voice-props-voice-range",syntax:"h2 { $(name): +10Hz; }",desc:"Specifies variation in average pitch. Human languages are spoken with varying inflection and pitch; these variations convey additional meaning and emphasis.",values:[{name:"absolute",version:"3.0",browsers:"all"},{name:"high",version:"3.0",browsers:"all"},{name:"low",version:"3.0",browsers:"all"},{name:"medium",version:"3.0",browsers:"all"},{name:"x-high",version:"3.0",browsers:"all"},{name:"x-low",version:"3.0",browsers:"all"}]},{name:"voice-rate",restriction:"percentage",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#voice-rate",syntax:" | x-slow | slow | medium | fast | x-fast",desc:"Controls the speaking rate. The default rate for a voice depends on the language and dialect and on the personality of the voice.",values:[{name:"fast",version:"3.0",browsers:"all"},{name:"medium",version:"3.0",browsers:"all",desc:"Equivalent to 100% and means the normal rate for this voice."},{name:"slow",version:"3.0",browsers:"all"},{name:"x-fast",version:"3.0",browsers:"all"},{name:"x-slow",version:"3.0",browsers:"all"}]},{name:"voice-stress",restriction:"enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#voice-stress",syntax:"h2 { $(name): moderate; }",desc:"Indicates the strength of emphasis to be applied. Emphasis is indicated using a combination of pitch change, timing changes, loudness and other acoustic differences) that varies from one language to the next.",values:[{name:"moderate",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all",desc:"Inhibits the synthesizer from emphasizing words it would normally emphasize."},{name:"normal",version:"3.0",browsers:"all"},{name:"reduced",version:"3.0",browsers:"all",desc:"Effectively the opposite of emphasizing a word. For example, when the phrase 'going to' is reduced it may be spoken as 'gonna'."},{name:"strong",version:"3.0",browsers:"all"}]},{name:"voice-volume",restriction:"volume, enum",version:"3.0",browsers:"none",ref:"http://www.w3.org/TR/css3-speech/#voice-volume",syntax:" | silent | x-soft | soft | medium | loud | x-loud",desc:"Refers to the amplitude of the waveform output by the speech synthesizer. The value of 'silent' is mapped to '0' and 'x-loud' is mapped to '100'. The mapping of other values to numerical volume levels is implementation dependent and may vary from one speech synthesizer to the next.",values:[{name:"loud",version:"3.0",browsers:"all"},{name:"medium",version:"3.0",browsers:"all"},{name:"silent",version:"3.0",browsers:"all",desc:"Volume value 0."},{name:"soft",version:"3.0",browsers:"all"},{name:"x-loud",version:"3.0",browsers:"all",desc:"Volume value 100."},{name:"x-soft",version:"3.0",browsers:"all"}]},{name:"volume",restriction:"percentage, number",version:"2.0",browsers:"none",ref:"http://www.w3.org/TR/CSS2/aural.html#propdef-volume",syntax:" | | silent | x-soft | soft | medium | loud | x-loud",desc:"Volume refers to the median volume of the waveform. In other words, a highly inflected voice at a volume of 50 might peak well above that.",values:[{name:"loud",version:"2.0",browsers:"all",desc:"Same as '75'."},{name:"medium",version:"2.0",browsers:"all",desc:"Same as '50'."},{name:"silent",version:"2.0",browsers:"all",desc:"No sound at all. The value '0' does not mean the same as 'silent'."},{name:"soft",version:"2.0",browsers:"all",desc:"Same as '25'."},{name:"x-loud",version:"2.0",browsers:"all",desc:"Same as '100'."},{name:"x-soft",version:"2.0",browsers:"all",desc:"Same as '0'."}]},{name:"-webkit-animation",restriction:"time, enum, identifier, number",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#animation",syntax:"div { $(name): movearound 4s ease 3 normal; }",desc:"Shorthand property combines six of the animation properties into a single property.",values:[{name:"alternate",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",version:"3.0",browsers:"all",desc:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",version:"3.0",browsers:"all",desc:"Both forwards and backwards fill modes are applied."},{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"forwards",version:"3.0",browsers:"all",desc:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",version:"3.0",browsers:"all",desc:"Causes the animation to repeat forever."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"none",version:"3.0",browsers:"all",desc:"No animation is performed"},{name:"normal",version:"3.0",browsers:"all",desc:"Normal playback."},{name:"reverse",version:"3.0",browsers:"all",desc:"All iterations of the animation are played in the reverse direction from the way they were specified."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-webkit-animation-delay",restriction:"time",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#animation-delay",syntax:"div { $(name): 4s; }",desc:"Defines when the animation will start. An 'animation-delay' value of '0' means the animation will execute as soon as it is applied. Otherwise, the value specifies an offset from the moment the animation is applied, and the animation will delay execution by that offset."},{name:"-webkit-animation-direction",restriction:"enum",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#animation-direction",syntax:"div { $(name): normal; }",desc:"Defines whether or not the animation should play in reverse on alternate cycles.",values:[{name:"alternate",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",version:"3.0",browsers:"all",desc:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"normal",version:"3.0",browsers:"all",desc:"Normal playback."},{name:"reverse",version:"3.0",browsers:"all",desc:"All iterations of the animation are played in the reverse direction from the way they were specified."}]},{name:"-webkit-animation-duration",restriction:"time",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#animation-duration",syntax:"div { $(name): 4s; }",desc:"Defines the length of time that an animation takes to complete one cycle."},{name:"-webkit-animation-fill-mode",restriction:"enum",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#animation-fill-mode-property",syntax:"div { $(name): forwards; }",desc:"Defines what values are applied by the animation outside the time it is executing.",values:[{name:"backwards",version:"3.0",browsers:"all",desc:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",version:"3.0",browsers:"all",desc:"Both forwards and backwards fill modes are applied."},{name:"forwards",version:"3.0",browsers:"all",desc:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"none",version:"3.0",browsers:"all",desc:"There is no change to the property value between the time the animation is applied and the time the animation begins playing or after the animation completes."}]},{name:"-webkit-animation-iteration-count",restriction:"number",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#animation-iteration-count",syntax:"div { $(name): 3; }",desc:"Defines the number of times an animation cycle is played. The default value is one, meaning the animation will play from beginning to end once.",values:{value:{name:"infinite",version:"3.0",browsers:"all",desc:"Causes the animation to repeat forever."}}},{name:"-webkit-animation-name",restriction:"identifier",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#the-animation-name-property-",syntax:"div { $(name): movearound; }",desc:"Defines a list of animations that apply. Each name is used to select the keyframe at-rule that provides the property values for the animation.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No animation is performed"}}},{name:"-webkit-animation-play-state",restriction:"enum",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#animation-play-state",syntax:"div { $(name): running; }",desc:"Defines whether the animation is running or paused.",values:[{name:"paused",version:"3.0",browsers:"all",desc:"A running animation will be paused."},{name:"running",version:"3.0",browsers:"all",desc:"Resume playback of a paused animation."}]},{name:"-webkit-animation-timing-function",restriction:"enum",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-animations/#animation-timing-function",syntax:"div { $(name): ease; }",desc:"Describes how the animation will progress over one cycle of its duration. See the 'transition-timing-function'.",values:[{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-webkit-appearance",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-appearance",syntax:"h3 { $(name): button; }",desc:"Changes the appearance of buttons and other controls to resemble native controls.",values:[{name:"button",version:"3.0",browsers:"all"},{name:"button-bevel",version:"3.0",browsers:"all"},{name:"caps-lock-indicator",version:"3.0",browsers:"all"},{name:"caret",version:"3.0",browsers:"all"},{name:"checkbox",version:"3.0",browsers:"all"},{name:"default-button",version:"3.0",browsers:"all"},{name:"listbox",version:"3.0",browsers:"all"},{name:"listitem",version:"3.0",browsers:"all"},{name:"media-fullscreen-button",version:"3.0",browsers:"all"},{name:"media-mute-button",version:"3.0",browsers:"all"},{name:"media-play-button",version:"3.0",browsers:"all"},{name:"media-seek-back-button",version:"3.0",browsers:"all"},{name:"media-seek-forward-button",version:"3.0",browsers:"all"},{name:"media-slider",version:"3.0",browsers:"all"},{name:"media-sliderthumb",version:"3.0",browsers:"all"},{name:"menulist",version:"3.0",browsers:"all"},{name:"menulist-button",version:"3.0",browsers:"all"},{name:"menulist-text",version:"3.0",browsers:"all"},{name:"menulist-textfield",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"push-button",version:"3.0",browsers:"all"},{name:"radio",version:"3.0",browsers:"all"},{name:"scrollbarbutton-down",version:"3.0",browsers:"all"},{name:"scrollbarbutton-left",version:"3.0",browsers:"all"},{name:"scrollbarbutton-right",version:"3.0",browsers:"all"},{name:"scrollbarbutton-up",version:"3.0",browsers:"all"},{name:"scrollbargripper-horizontal",version:"3.0",browsers:"all"},{name:"scrollbargripper-vertical",version:"3.0",browsers:"all"},{name:"scrollbarthumb-horizontal",version:"3.0",browsers:"all"},{name:"scrollbarthumb-vertical",version:"3.0",browsers:"all"},{name:"scrollbartrack-horizontal",version:"3.0",browsers:"all"},{name:"scrollbartrack-vertical",version:"3.0",browsers:"all"},{name:"searchfield",version:"3.0",browsers:"all"},{name:"searchfield-cancel-button",version:"3.0",browsers:"all"},{name:"searchfield-decoration",version:"3.0",browsers:"all"},{name:"searchfield-results-button",version:"3.0",browsers:"all"},{name:"searchfield-results-decoration",version:"3.0",browsers:"all"},{name:"slider-horizontal",version:"3.0",browsers:"all"},{name:"sliderthumb-horizontal",version:"3.0",browsers:"all"},{name:"sliderthumb-vertical",version:"3.0",browsers:"all"},{name:"slider-vertical",version:"3.0",browsers:"all"},{name:"square-button",version:"3.0",browsers:"all"},{name:"textarea",version:"3.0",browsers:"all"},{name:"textfield",version:"3.0",browsers:"all"}]},{name:"-webkit-backface-visibility",restriction:"enum",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-3d-transforms/#backface-visibility",syntax:"div { $(name): hidden; }",desc:"Determines whether or not the 'back' side of a transformed element is visible when facing the viewer. With an identity transform, the front side of an element faces the viewer.",values:[{name:"hidden",version:"3.0",browsers:"all"},{name:"visible",version:"3.0",browsers:"all"}]},{name:"-webkit-background-clip",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-background/#the-background-clip",syntax:"header { $(name): border-box; }",desc:"Determines the background painting area.",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the border box."},{name:"content-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the content box."},{name:"padding-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the padding box"}]},{name:"-webkit-background-composite",restriction:"enum",version:"3.0",browsers:"C,S3",syntax:"div { $(name): padding; }",values:[{name:"border",version:"3.0",browsers:"all"},{name:"padding",version:"3.0",browsers:"all"}]},{name:"-webkit-background-origin",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-background/#the-background-origin",syntax:"header { $(name): border-box; }",desc:"For elements rendered as a single box, specifies the background positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes 'box-decoration-break' operates on to determine the background positioning area(s).",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the border box."},{name:"content-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the content box."},{name:"padding-box",version:"3.0",browsers:"all",desc:"The background is painted within (clipped to) the padding box"}]},{name:"-webkit-background-size",restriction:"length, percentage",version:"3.0",browsers:"C,O12.5,S3",ref:"http://www.w3.org/TR/css3-background/#the-background-size",syntax:"header { $(name): 20px; }",desc:"Specifies the size of the background images.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"contain",version:"3.0",browsers:"all",desc:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the largest size such that both its width and its height can fit inside the background positioning area."},{name:"cover",version:"3.0",browsers:"all",desc:"Scale the image, while preserving its intrinsic aspect ratio (if any), to the smallest size such that both its width and its height can completely cover the background positioning area."}]},{name:"-webkit-border-image",restriction:"length, percentage, number, url, enum",version:"3.0",browsers:"C,S5",ref:"http://www.w3.org/TR/css3-background/#border-image",syntax:"td { $(name): url(border.png) 30 30 round;}",desc:"Shorthand property for setting 'border-image-source', 'border-image-slice', 'border-image-width', 'border-image-outset' and 'border-image-repeat'. Omitted values are set to their initial values.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"If 'auto' is specified then the border image width is the intrinsic width or height (whichever is applicable) of the corresponding image slice. If the image does not have the required intrinsic dimension then the corresponding border-width is used instead."},{name:"fill",version:"3.0",browsers:"all",desc:"Causes the middle part of the border-image to be preserved. (By default it is discarded, i.e., treated as empty.)"},{name:"none",version:"3.0",browsers:"all"},{name:"repeat",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area."},{name:"round",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the image is rescaled so that it does."},{name:"space",version:"3.0",browsers:"all",desc:"The image is tiled (repeated) to fill the area. If it does not fill the area with a whole number of tiles, the extra space is distributed around the tiles."},{name:"stretch",version:"3.0",browsers:"all",desc:"The image is stretched to fill the area."},{name:"url()",version:"3.0",browsers:"all"}]},{name:"-webkit-box-align",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-box-align",syntax:"div { $(name): end; }",desc:"Specifies the alignment of nested elements within an outer flexible box element.",values:[{name:"baseline",version:"3.0",browsers:"all",desc:"If this box orientation is inline-axis or horizontal, all children are placed with their baselines aligned, and extra space placed before or after as necessary. For block flows, the baseline of the first non-empty line box located within the element is used. For tables, the baseline of the first cell is used."},{name:"center",version:"3.0",browsers:"all",desc:"Any extra space is divided evenly, with half placed above the child and the other half placed after the child."},{name:"end",version:"3.0",browsers:"all",desc:"For normal direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element. For reverse direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element."},{name:"start",version:"3.0",browsers:"all",desc:"For normal direction boxes, the top edge of each child is placed along the top of the box. Extra space is placed below the element. For reverse direction boxes, the bottom edge of each child is placed along the bottom of the box. Extra space is placed above the element."},{name:"stretch",version:"3.0",browsers:"all",desc:"The height of each child is adjusted to that of the containing block."}]},{name:"-webkit-box-direction",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-box-direction",syntax:"div { $(name): reverse; }",desc:"In webkit applications, -webkit-box-direction specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge).",values:[{name:"normal",version:"3.0",browsers:"all",desc:"A box with a computed value of horizontal for box-orient displays its children from left to right. A box with a computed value of vertical displays its children from top to bottom."},{name:"reverse",version:"3.0",browsers:"all",desc:"A box with a computed value of horizontal for box-orient displays its children from right to left. A box with a computed value of vertical displays its children from bottom to top."}]},{name:"-webkit-box-flex",restriction:"number",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-box-flex",syntax:"div { $(name): 1; }",desc:"Specifies an element's flexibility."},{name:"-webkit-box-flex-group",restriction:"integer",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-box-flex-group",syntax:"div { $(name): 4; }",desc:"Flexible elements can be assigned to flex groups using the 'box-flex-group' property."},{name:"-webkit-box-ordinal-group",restriction:"integer",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-box-ordinal-group",syntax:"div { $(name): 3; }",desc:"Indicates the ordinal group the element belongs to. Elements with a lower ordinal group are displayed before those with a higher ordinal group."},{name:"-webkit-box-orient",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-box-orient",syntax:"div { $(name): vertical; }",desc:"In webkit applications, -webkit-box-orient specifies whether a box lays out its contents horizontally or vertically.",values:[{name:"block-axis",version:"3.0",browsers:"all",desc:"Elements are oriented along the box's axis."},{name:"horizontal",version:"3.0",browsers:"all",desc:"The box displays its children from left to right in a horizontal line."},{name:"inline-axis",version:"3.0",browsers:"all",desc:"Elements are oriented vertically."},{name:"vertical",version:"3.0",browsers:"all",desc:"The box displays its children from stacked from top to bottom vertically."}]},{name:"-webkit-box-pack",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-box-pack",syntax:"div { $(name): end; }",desc:"Specifies alignment of child elements within the current element in the direction of orientation.",values:[{name:"center",version:"3.0",browsers:"all",desc:"The extra space is divided evenly, with half placed before the first child and the other half placed after the last child."},{name:"end",version:"3.0",browsers:"all",desc:"For normal direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child. For reverse direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child."},{name:"justify",version:"3.0",browsers:"all",desc:"The space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child. If there is only one child, treat the pack value as if it were start."},{name:"start",version:"3.0",browsers:"all",desc:"For normal direction boxes, the left edge of the first child is placed at the left side, with all extra space placed after the last child. For reverse direction boxes, the right edge of the last child is placed at the right side, with all extra space placed before the first child."}]},{name:"-webkit-box-reflect",restriction:"",version:"3.0",browsers:"C,S4",ref:"http://css-infos.net/property/-webkit-box-reflect",syntax:"div { $(name): below 5px; }",desc:"Defines a reflection of a border box.",values:[{name:"above",version:"3.0",browsers:"all",desc:"The reflection appears above the border box."},{name:"below",version:"3.0",browsers:"all",desc:"The reflection appears below the border box."},{name:"left",version:"3.0",browsers:"all",desc:"The reflection appears to the left of the border box."},{name:"right",version:"3.0",browsers:"all",desc:"The reflection appears to the right of the border box."}]},{name:"-webkit-box-sizing",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-ui/#box-sizing",syntax:"div { $(name): content-box; }",desc:"Box Model addition in CSS3.",values:[{name:"border-box",version:"3.0",browsers:"all",desc:"The specified width and height (and respective min/max properties) on this element determine the border box of the element."},{name:"content-box",version:"3.0",browsers:"all",desc:"Behavior of width and height as specified by CSS2.1. The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element."},{name:"padding-box",version:"3.0",browsers:"none",desc:"The specified width and height (and respective min/max properties) on this element determine the padding box of the element."}]},{name:"-webkit-column-count",restriction:"integer",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-multicol/#column-count",syntax:"div { $(name): 3; }",desc:"Describes the optimal number of columns into which the content of the element will be flowed.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"Determines the number of columns by the 'column-width' property and the element width."}}},{name:"-webkit-column-gap",restriction:"length",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-multicol/#column-gap0",syntax:"div { $(name): 10px; }",desc:"Sets the gap between columns. If there is a column rule between columns, it will appear in the middle of the gap.",values:{value:{name:"normal",version:"3.0",browsers:"all",desc:"User agent specific and typically equivalent to 1em."}}},{name:"-webkit-column-rule",restriction:"length, color, enum",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-multicol/#column-rule0",syntax:"header { $(name): 5px solid red;}",desc:"This property is a shorthand for setting 'column-rule-width', 'column-rule-style', and 'column-rule-color' at the same place in the style sheet. Omitted values are set to their initial values.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"medium",version:"1.0",browsers:"all"},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"-webkit-column-rule-color",restriction:"color",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-color",syntax:"div { $(name): #ff0; }",desc:"Sets the color of the column rule",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-webkit-column-rule-style",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-style",syntax:"div { $(name): solid; }",desc:"Sets the style of the rule between columns of an element.",values:[{name:"dashed",version:"1.0",browsers:"all",desc:"A series of square-ended dashes."},{name:"dotted",version:"1.0",browsers:"all",desc:"A series of round dots."},{name:"double",version:"1.0",browsers:"all",desc:"Two parallel solid lines with some space between them. (The thickness of the lines is not specified, but the sum of the lines and the space must equal 'border-width'.)"},{name:"groove",version:"1.0",browsers:"all",desc:"Looks as if it were carved in the canvas. (This is typically achieved by creating a \"shadow\" from two colors that are slightly lighter and darker than the 'border-color'.)"},{name:"hidden",version:"3.0",browsers:"all",desc:"Same as 'none', but has different behavior in the border conflict resolution rules for border-collapsed tables."},{name:"inset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is sunken into the canvas. Treated as 'ridge' in border-collapsed tables."},{name:"none",version:"1.0",browsers:"all",desc:"No border. Color and width are ignored (i.e., the border has width 0, unless the border is an image)"},{name:"outset",version:"1.0",browsers:"all",desc:"Looks as if the content on the inside of the border is coming out of the canvas. Treated as 'groove' in border-collapsed tables."},{name:"ridge",version:"1.0",browsers:"all",desc:"Looks as if it were coming out of the canvas."},{name:"solid",version:"1.0",browsers:"all",desc:"A single line segment."}]},{name:"-webkit-column-rule-width",restriction:"length",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-multicol/#column-rule-width",syntax:"div { $(name): 3px; }",desc:"Sets the width of the rule between columns. Negative values are not allowed.",values:[{name:"medium",version:"1.0",browsers:"all"},{name:"thick",version:"1.0",browsers:"all"},{name:"thin",version:"1.0",browsers:"all"}]},{name:"-webkit-columns",restriction:"length, integer",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-multicol/#columns0",syntax:"div { $(name): 100px 3; }",desc:"A shorthand property which sets both 'column-width' and 'column-count'.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"The width depends on the values of other properties."}}},{name:"-webkit-column-width",restriction:"length",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-multicol/#column-width",syntax:"div { $(name): 100px; }",desc:"This property describes the width of columns in multicol elements.",values:{value:{name:"auto",version:"3.0",browsers:"all",desc:"The width depends on the values of other properties."}}},{name:"-webkit-filter",restriction:"enum",version:"3.0",browsers:"S6",syntax:"img { $(name): blur(3px); }",values:[{name:"blur(3px)",version:"3.0",browsers:"all"},{name:"brightness(2)",version:"3.0",browsers:"all"},{name:"contrast(2)",version:"3.0",browsers:"all"},{name:"grayscale()",version:"3.0",browsers:"all"},{name:"hue-rotate(180deg)",version:"3.0",browsers:"all"},{name:"invert()",version:"3.0",browsers:"all"},{name:"saturate(3)",version:"3.0",browsers:"all"},{name:"sepia()",version:"3.0",browsers:"all"}]},{name:"-webkit-flow-from",restriction:"identifier",version:"3.0",browsers:"C,S5.2",ref:"http://www.w3.org/TR/css3-regions/#flow-from",syntax:"div { $(name): identifier; }",desc:"Gets or sets a value that identifies a Connected Frame container in the document that accepts the content flow from the data source.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"-webkit-flow-into",restriction:"identifier",version:"3.0",browsers:"C,S5.2",ref:"http://www.w3.org/TR/css3-regions/#flow-into",syntax:"div { $(name): identifier; }",desc:"Gets or sets a value that identifies an iframe container in the document that serves as the Connected Frame data source.",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"-webkit-hyphens",restriction:"enum",version:"3.0",browsers:"S5.1",ref:"http://www.w3.org/TR/css3-text/#hyphens0",syntax:"div { $(name): manual; }",desc:"This property controls whether hyphenation is allowed to create more break opportunities within a line of text.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"Conditional hyphenation characters inside a word, if present, take priority over automatic resources when determining hyphenation points within the word."},{name:"manual",version:"3.0",browsers:"all",desc:"Words are only broken at line breaks where there are characters inside the word that suggest line break opportunities"},{name:"none",version:"3.0",browsers:"all",desc:"Words are not broken at line breaks, even if characters inside the word suggest line break points."}]},{name:"-webkit-line-break",restriction:"",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-line-break",syntax:"p { $(name): normal; }",desc:"Specifies line-breaking rules for CJK (Chinese, Japanese, and Korean) text.",values:[{name:"after-white-space",version:"3.0",browsers:"all"},{name:"normal",version:"3.0",browsers:"all"}]},{name:"-webkit-margin-bottom-collapse",restriction:"enum",version:"3.0",browsers:"C,S3",syntax:"div { $(name): collapse; }",values:[{name:"collapse",version:"3.0",browsers:"all"},{name:"discard",version:"3.0",browsers:"all"},{name:"separate",version:"3.0",browsers:"all"}]},{name:"-webkit-margin-collapse",restriction:"enum",version:"3.0",browsers:"C,S3",syntax:"div { $(name): collapse; }",values:[{name:"collapse",version:"3.0",browsers:"all"},{name:"discard",version:"3.0",browsers:"all"},{name:"separate",version:"3.0",browsers:"all"}]},{name:"-webkit-margin-start",restriction:"percentage, length",version:"3.0",browsers:"C,S3",syntax:"div { $(name): 5px; }",values:{value:{name:"auto",version:"3.0",browsers:"all"}}},{name:"-webkit-margin-top-collapse",restriction:"enum",version:"3.0",browsers:"C,S3",syntax:"div { $(name): collapse; }",values:[{name:"collapse",version:"3.0",browsers:"all"},{name:"discard",version:"3.0",browsers:"all"},{name:"separate",version:"3.0",browsers:"all"}]},{name:"-webkit-marquee-direction",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-box/#marquee-direction",syntax:"li { $(name): forward; }",desc:"Determines the initial direction in which the content moves if the marquee effect is used.",values:[{name:"forward",version:"3.0",browsers:"all"},{name:"reverse",version:"3.0",browsers:"all"}]},{name:"-webkit-marquee-increment",restriction:"percentage, length",version:"3.0",browsers:"C,S3",syntax:"div { $(name): 10%; }",values:[{name:"large",version:"3.0",browsers:"all"},{name:"medium",version:"3.0",browsers:"all"},{name:"small",version:"3.0",browsers:"all"}]},{name:"-webkit-marquee-repitition",restriction:"integer",version:"3.0",browsers:"C,S3",syntax:"div { $(name): 3; }",values:{value:{name:"infinite",version:"3.0",browsers:"all"}}},{name:"-webkit-marquee-speed",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-box/#marquee-speed",syntax:"li { $(name): fast; }",desc:"This property determines how fast the content scrolls.",values:[{name:"fast",version:"3.0",browsers:"all"},{name:"normal",version:"3.0",browsers:"all"},{name:"slow",version:"3.0",browsers:"all"}]},{name:"-webkit-marquee-style",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://www.w3.org/TR/css3-box/#marquee-style",syntax:"li { $(name): scroll; }",desc:"Specifies the style of how the content move.",values:[{name:"alternate",version:"3.0",browsers:"all"},{name:"scroll",version:"3.0",browsers:"all"},{name:"slide",version:"3.0",browsers:"all"}]},{name:"-webkit-nbsp-mode",restriction:"",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-nbsp-mode",syntax:"p { $(name): space; }",desc:"Defines the behavior of nonbreaking spaces within text.",values:[{name:"normal",version:"3.0",browsers:"all"},{name:"space",version:"3.0",browsers:"all"}]},{name:"-webkit-overflow-scrolling",restriction:"",version:"3.0",browsers:"C,S5",ref:"http://css-infos.net/property/-webkit-nbsp-mode",syntax:"div { $(name): touch; }",desc:"Specifies whether to use native-style scrolling in an overflow:scroll element.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"touch",version:"3.0",browsers:"all"}]},{name:"-webkit-padding-start",restriction:"percentage, length",version:"3.0",browsers:"C,S3",syntax:"div { $(name): 5px; }"},{name:"-webkit-perspective",restriction:"number",version:"3.0",browsers:"C,S4",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective",syntax:"div { $(name): none; }",desc:"Applies the same transform as the perspective() transform function, except that it applies only to the positioned or transformed children of the element, not to the transform on the element itself.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No perspective transform is applied."}}},{name:"-webkit-perspective-origin",restriction:"percentage, length",version:"3.0",browsers:"C,S4",ref:"http://www.w3.org/TR/css3-3d-transforms/#perspective-origin",syntax:"div { $(name): 10px; }",desc:"Establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-webkit-tap-highlight-color",restriction:"color",version:"3",browsers:"C,S3.1",ref:"http://css-infos.net/property/-webkit-tap-highlight-color",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3",browsers:"C,S1"},{name:"-webkit-link",version:"3",browsers:"C,S1"},{name:"-webkit-text",version:"3",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-webkit-text-fill-color",restriction:"color",version:"3.0",browsers:"S3",syntax:"div { $(name): red; }",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-webkit-text-shadow",restriction:"length, color",version:"3.0",browsers:"C,S1.1",ref:"http://www.w3.org/TR/css3-text/#text-shadow0",syntax:"h1 { $(name): 20px 12px 2px #333;}",desc:"Enables shadow effects to be applied to the text of the element.",values:{value:{name:"none",version:"3.0",browsers:"all",desc:"No shadow."}}},{name:"-webkit-text-size-adjust",restriction:"percentage",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-text-size-adjust",syntax:"div { $(name): 60%; }",desc:"Specifies a size adjustment for displaying text content in Safari on iPhone.",values:[{name:"auto",version:"3.0",browsers:"all",desc:"The text size is automatically adjusted for Safari on iPhone."},{name:"none",version:"3.0",browsers:"all",desc:"The text size is not adjusted."}]},{name:"-webkit-text-stroke",restriction:"color, length, percentage",version:"3.0",browsers:"S3",syntax:"div { $(name): red 2x; }",values:[{name:"medium",version:"3.0",browsers:"all"},{name:"thick",version:"3.0",browsers:"all"},{name:"thin",version:"3.0",browsers:"all"}]},{name:"-webkit-text-stroke-color",restriction:"color",version:"3.0",browsers:"S3",syntax:"div { $(name): red; }",values:[{name:"ActiveBorder",version:"2.0",browsers:"all",desc:"Active window border."},{name:"ActiveCaption",version:"2.0",browsers:"all",desc:"Active window caption."},{name:"aliceblue",version:"3.0",browsers:"all"},{name:"antiquewhite",version:"3.0",browsers:"all"},{name:"AppWorkspace",version:"2.0",browsers:"all",desc:"Background color of multiple document interface."},{name:"aqua",version:"1.0",browsers:"all"},{name:"aquamarine",version:"3.0",browsers:"all"},{name:"azure",version:"3.0",browsers:"all"},{name:"Background",version:"2.0",browsers:"all",desc:"Desktop background."},{name:"beige",version:"3.0",browsers:"all"},{name:"bisque",version:"3.0",browsers:"all"},{name:"black",version:"1.0",browsers:"all"},{name:"blanchedalmond",version:"3.0",browsers:"all"},{name:"blue",version:"1.0",browsers:"all"},{name:"blueviolet",version:"3.0",browsers:"all"},{name:"brown",version:"3.0",browsers:"all"},{name:"burlywood",version:"3.0",browsers:"all"},{name:"ButtonFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonHighlight",version:"2.0",browsers:"all",desc:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonShadow",version:"2.0",browsers:"all",desc:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border."},{name:"ButtonText",version:"2.0",browsers:"all",desc:"Text on push buttons."},{name:"cadetblue",version:"3.0",browsers:"all"},{name:"CaptionText",version:"2.0",browsers:"all",desc:"Text in caption, size box, and scrollbar arrow box."},{name:"chartreuse",version:"3.0",browsers:"all"},{name:"chocolate",version:"3.0",browsers:"all"},{name:"coral",version:"3.0",browsers:"all"},{name:"cornflowerblue",version:"3.0",browsers:"all"},{name:"cornsilk",version:"3.0",browsers:"all"},{name:"crimson",version:"3.0",browsers:"all"},{name:"currentColor",version:"3.0",browsers:"all",desc:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time."},{name:"cyan",version:"3.0",browsers:"all"},{name:"darkblue",version:"3.0",browsers:"all"},{name:"darkcyan",version:"3.0",browsers:"all"},{name:"darkgoldenrod",version:"3.0",browsers:"all"},{name:"darkgray",version:"3.0",browsers:"all"},{name:"darkgreen",version:"3.0",browsers:"all"},{name:"darkgrey",version:"3.0",browsers:"all"},{name:"darkkhaki",version:"3.0",browsers:"all"},{name:"darkmagenta",version:"3.0",browsers:"all"},{name:"darkolivegreen",version:"3.0",browsers:"all"},{name:"darkorange",version:"3.0",browsers:"all"},{name:"darkorchid",version:"3.0",browsers:"all"},{name:"darkred",version:"3.0",browsers:"all"},{name:"darksalmon",version:"3.0",browsers:"all"},{name:"darkseagreen",version:"3.0",browsers:"all"},{name:"darkslateblue",version:"3.0",browsers:"all"},{name:"darkslategray",version:"3.0",browsers:"all"},{name:"darkslategrey",version:"3.0",browsers:"all"},{name:"darkturquoise",version:"3.0",browsers:"all"},{name:"darkviolet",version:"3.0",browsers:"all"},{name:"deeppink",version:"3.0",browsers:"all"},{name:"deepskyblue",version:"3.0",browsers:"all"},{name:"dimgray",version:"3.0",browsers:"all"},{name:"dimgrey",version:"3.0",browsers:"all"},{name:"dodgerblue",version:"3.0",browsers:"all"},{name:"firebrick",version:"3.0",browsers:"all"},{name:"flavor",version:"3.0",browsers:"none",desc:"The accent color (typically chosen by the user) to customize the user interface of the user agent itself."},{name:"floralwhite",version:"3.0",browsers:"all"},{name:"forestgreen",version:"3.0",browsers:"all"},{name:"fuchsia",version:"1.0",browsers:"all"},{name:"gainsboro",version:"3.0",browsers:"all"},{name:"ghostwhite",version:"3.0",browsers:"all"},{name:"gold",version:"3.0",browsers:"all"},{name:"goldenrod",version:"3.0",browsers:"all"},{name:"gray",version:"1.0",browsers:"all"},{name:"GrayText",version:"2.0",browsers:"all",desc:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color."},{name:"green",version:"1.0",browsers:"all"},{name:"greenyellow",version:"3.0",browsers:"all"},{name:"grey",version:"3.0",browsers:"all"},{name:"Highlight",version:"2.0",browsers:"all",desc:"Item(s) selected in a control."},{name:"HighlightText",version:"2.0",browsers:"all",desc:"Text of item(s) selected in a control."},{name:"honeydew",version:"3.0",browsers:"all"},{name:"hotpink",version:"3.0",browsers:"all"},{name:"InactiveBorder",version:"2.0",browsers:"all",desc:"Inactive window border."},{name:"InactiveCaption",version:"2.0",browsers:"all",desc:"Inactive window caption."},{name:"InactiveCaptionText",version:"2.0",browsers:"all",desc:"Color of text in an inactive caption."},{name:"indianred",version:"3.0",browsers:"all"},{name:"indigo",version:"3.0",browsers:"all"},{name:"InfoBackground",version:"2.0",browsers:"all",desc:"Background color for tooltip controls."},{name:"InfoText",version:"2.0",browsers:"all",desc:"Text color for tooltip controls."},{name:"ivory",version:"3.0",browsers:"all"},{name:"khaki",version:"3.0",browsers:"all"},{name:"lavender",version:"3.0",browsers:"all"},{name:"lavenderblush",version:"3.0",browsers:"all"},{name:"lawngreen",version:"3.0",browsers:"all"},{name:"lemonchiffon",version:"3.0",browsers:"all"},{name:"lightblue",version:"3.0",browsers:"all"},{name:"lightcoral",version:"3.0",browsers:"all"},{name:"lightcyan",version:"3.0",browsers:"all"},{name:"lightgoldenrodyellow",version:"3.0",browsers:"all"},{name:"lightgray",version:"3.0",browsers:"all"},{name:"lightgreen",version:"3.0",browsers:"all"},{name:"lightgrey",version:"3.0",browsers:"all"},{name:"lightpink",version:"3.0",browsers:"all"},{name:"lightsalmon",version:"3.0",browsers:"all"},{name:"lightseagreen",version:"3.0",browsers:"all"},{name:"lightskyblue",version:"3.0",browsers:"all"},{name:"lightslategray",version:"3.0",browsers:"all"},{name:"lightslategrey",version:"3.0",browsers:"all"},{name:"lightsteelblue",version:"3.0",browsers:"all"},{name:"lightyellow",version:"3.0",browsers:"all"},{name:"lime",version:"1.0",browsers:"all"},{name:"limegreen",version:"3.0",browsers:"all"},{name:"linen",version:"3.0",browsers:"all"},{name:"magenta",version:"3.0",browsers:"all"},{name:"maroon",version:"1.0",browsers:"all"},{name:"mediumaquamarine",version:"3.0",browsers:"all"},{name:"mediumblue",version:"3.0",browsers:"all"},{name:"mediumorchid",version:"3.0",browsers:"all"},{name:"mediumpurple",version:"3.0",browsers:"all"},{name:"mediumseagreen",version:"3.0",browsers:"all"},{name:"mediumslateblue",version:"3.0",browsers:"all"},{name:"mediumspringgreen",version:"3.0",browsers:"all"},{name:"mediumturquoise",version:"3.0",browsers:"all"},{name:"mediumvioletred",version:"3.0",browsers:"all"},{name:"Menu",version:"2.0",browsers:"all",desc:"Menu background."},{name:"MenuText",version:"2.0",browsers:"all",desc:"Text in menus."},{name:"midnightblue",version:"3.0",browsers:"all"},{name:"mintcream",version:"3.0",browsers:"all"},{name:"mistyrose",version:"3.0",browsers:"all"},{name:"moccasin",version:"3.0",browsers:"all"},{name:"navajowhite",version:"3.0",browsers:"all"},{name:"navy",version:"3.0",browsers:"all"},{name:"none",version:"2.0",browsers:"all"},{name:"oldlace",version:"3.0",browsers:"all"},{name:"olive",version:"1.0",browsers:"all"},{name:"olivedrab",version:"3.0",browsers:"all"},{name:"orange",version:"1.0",browsers:"all"},{name:"orangered",version:"3.0",browsers:"all"},{name:"orchid",version:"3.0",browsers:"all"},{name:"palegoldenrod",version:"3.0",browsers:"all"},{name:"palegreen",version:"3.0",browsers:"all"},{name:"paleturquoise",version:"3.0",browsers:"all"},{name:"palevioletred",version:"3.0",browsers:"all"},{name:"papayawhip",version:"3.0",browsers:"all"},{name:"peachpuff",version:"3.0",browsers:"all"},{name:"peru",version:"3.0",browsers:"all"},{name:"pink",version:"3.0",browsers:"all"},{name:"plum",version:"3.0",browsers:"all"},{name:"powderblue",version:"3.0",browsers:"all"},{name:"purple",version:"1.0",browsers:"all"},{name:"red",version:"1.0",browsers:"all"},{name:"rosybrown",version:"3.0",browsers:"all"},{name:"royalblue",version:"3.0",browsers:"all"},{name:"saddlebrown",version:"3.0",browsers:"all"},{name:"salmon",version:"3.0",browsers:"all"},{name:"sandybrown",version:"3.0",browsers:"all"},{name:"Scrollbar",version:"2.0",browsers:"all",desc:"Scroll bar gray area."},{name:"seagreen",version:"3.0",browsers:"all"},{name:"seashell",version:"3.0",browsers:"all"},{name:"sienna",version:"3.0",browsers:"all"},{name:"silver",version:"1.0",browsers:"all"},{name:"skyblue",version:"3.0",browsers:"all"},{name:"slateblue",version:"3.0",browsers:"all"},{name:"slategray",version:"3.0",browsers:"all"},{name:"slategrey",version:"3.0",browsers:"all"},{name:"snow",version:"3.0",browsers:"all"},{name:"springgreen",version:"3.0",browsers:"all"},{name:"steelblue",version:"3.0",browsers:"all"},{name:"tan",version:"3.0",browsers:"all"},{name:"teal",version:"1.0",browsers:"all"},{name:"thistle",version:"3.0",browsers:"all"},{name:"ThreeDDarkShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDFace",version:"2.0",browsers:"all",desc:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDHighlight",version:"2.0",browsers:"all",desc:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDLightShadow",version:"2.0",browsers:"all",desc:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"ThreeDShadow",version:"2.0",browsers:"all",desc:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border."},{name:"tomato",version:"3.0",browsers:"all"},{name:"transparent",version:"1.0",browsers:"all",desc:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},{name:"turquoise",version:"3.0",browsers:"all"},{name:"violet",version:"3.0",browsers:"all"},{name:"-webkit-activelink",version:"3.0",browsers:"C,S1"},{name:"-webkit-focus-ring-color",version:"3.0",browsers:"C,S1"},{name:"-webkit-link",version:"3.0",browsers:"C,S1"},{name:"-webkit-text",version:"3.0",browsers:"C,S1"},{name:"wheat",version:"3.0",browsers:"all"},{name:"white",version:"1.0",browsers:"all"},{name:"whitesmoke",version:"3.0",browsers:"all"},{name:"Window",version:"2.0",browsers:"all",desc:"Window background."},{name:"WindowFrame",version:"2.0",browsers:"all",desc:"Window frame."},{name:"WindowText",version:"2.0",browsers:"all",desc:"Text in windows."},{name:"yellow",version:"1.0",browsers:"all"},{name:"yellowgreen",version:"3.0",browsers:"all"}]},{name:"-webkit-text-stroke-width",restriction:"length, percentage",version:"3.0",browsers:"S3",syntax:"div { $(name): 2px; }",values:[{name:"medium",version:"3.0",browsers:"all"},{name:"thick",version:"3.0",browsers:"all"},{name:"thin",version:"3.0",browsers:"all"}]},{name:"-webkit-touch-callout",restriction:"enum",version:"3.0",browsers:"S3",syntax:"a { $(name): none; }",values:{value:{name:"none",version:"3.0",browsers:"all"}}},{name:"-webkit-transform",restriction:"enum",version:"3.0",browsers:"C,O12,S3.1",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-property",syntax:"div { $(name): rotate(-90deg); }",desc:"A two-dimensional transformation is applied to an element through the 'transform' property. This property contains a list of transform functions similar to those allowed by SVG.",values:[{name:"matrix()",version:"3.0",browsers:"all",desc:"Specifies a 2D transformation in the form of a transformation matrix of six values. matrix(a,b,c,d,e,f) is equivalent to applying the transformation matrix [a b c d e f]"},{name:"matrix3d()",version:"3.0",browsers:"all",desc:"specifies a 3D transformation as a 4x4 homogeneous matrix of 16 values in column-major order."},{name:"none",version:"3.0",browsers:"all"},{name:"rotate()",version:"3.0",browsers:"all",desc:"Specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property."},{name:"rotate3d()",version:"3.0",browsers:"all",desc:"Specifies a clockwise 3D rotation by the angle specified in last parameter about the [x,y,z] direction vector described by the first 3 parameters."},{name:"rotateX('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the X axis."},{name:"rotateY('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Y axis."},{name:"rotateZ('angle')",version:"3.0",browsers:"all",desc:"Specifies a clockwise rotation by the given angle about the Z axis."},{name:"scale()",version:"3.0",browsers:"all",desc:"Specifies a 2D scale operation by the [sx,sy] scaling vector described by the 2 parameters. If the second parameter is not provided, it is takes a value equal to the first."},{name:"scale3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D scale operation by the [sx,sy,sz] scaling vector described by the 3 parameters."},{name:"scaleX()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sx,1] scaling vector, where sx is given as the parameter."},{name:"scaleY()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [sy,1] scaling vector, where sy is given as the parameter."},{name:"scaleZ()",version:"3.0",browsers:"all",desc:"Specifies a scale operation using the [1,1,sz] scaling vector, where sz is given as the parameter."},{name:"skew()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X and Y axes. The first angle parameter specifies the skew on the X axis. The second angle parameter specifies the skew on the Y axis. If the second parameter is not given then a value of 0 is used for the Y angle (ie: no skew on the Y axis)."},{name:"skewX()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the X axis by the given angle."},{name:"skewY()",version:"3.0",browsers:"all",desc:"Specifies a skew transformation along the Y axis by the given angle."},{name:"translate()",version:"3.0",browsers:"all",desc:"Specifies a 2D translation by the vector [tx, ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter."},{name:"translate3d()",version:"3.0",browsers:"all",desc:"Specifies a 3D translation by the vector [tx,ty,tz], with tx, ty and tz being the first, second and third translation-value parameters respectively."},{name:"translateX()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the X direction."},{name:"translateY()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Y direction."},{name:"translateZ()",version:"3.0",browsers:"all",desc:"Specifies a translation by the given amount in the Z direction. Note that percentage values are not allowed in the translateZ translation-value, and if present are evaluated as 0."}]},{name:"-webkit-transform-origin",restriction:"length, percentage",version:"3.0",browsers:"C,O12,S3.1",ref:"http://www.w3.org/TR/css3-2d-transforms/#transform-origin",syntax:".album { $(name): 20% 40%; }",desc:"Establishes the origin of transformation for an element. This property is applied by first translating the element by the negated value of the property, then applying the element's transform, then translating by the property value.",values:[{name:"bottom",version:"3.0",browsers:"all"},{name:"center",version:"3.0",browsers:"all"},{name:"left",version:"3.0",browsers:"all"},{name:"right",version:"3.0",browsers:"all"},{name:"top",version:"3.0",browsers:"all"}]},{name:"-webkit-transform-origin-x",restriction:"length, percentage",version:"3.0",browsers:"C,S3.1",ref:"http://www.w3.org/TR/css3-3d-transforms/#transform-origin",syntax:"img { $(name): 5px}",desc:"The x coordinate of the origin for transforms applied to an element with respect to its border box."},{name:"-webkit-transform-origin-y",restriction:"length, percentage",version:"3.0",browsers:"C,S3.1",ref:"http://www.w3.org/TR/css3-3d-transforms/#transform-origin",syntax:"img { $(name): 5px}",desc:"The y coordinate of the origin for transforms applied to an element with respect to its border box."},{name:"-webkit-transform-origin-z",restriction:"length, percentage",version:"3.0",browsers:"C,S4",ref:"http://www.w3.org/TR/css3-3d-transforms/#transform-origin",syntax:"img { $(name): 5px}",desc:"The z coordinate of the origin for transforms applied to an element with respect to its border box."},{name:"-webkit-transform-style",restriction:"enum",version:"3.0",browsers:"C,S4",ref:"http://www.w3.org/TR/css3-3d-transforms/#transform-origin",syntax:"div { $(name): flat; }",desc:"Defines how nested elements are rendered in 3D space.",values:[{name:"flat",version:"3.0",browsers:"all",desc:"All children of this element are rendered flattened into the 2D plane of the element."},{name:"preserve-3d",version:"3.0",browsers:"none",desc:"Flattening is not performed, so children maintain their position in 3D space."}]},{name:"-webkit-transition",restriction:"time, property, enum",version:"3.0",browsers:"C,O12,S5",ref:"http://www.w3.org/TR/css3-transitions/#transition",syntax:"div { $(name): background-color linear 1s; }",desc:"Shorthand property combines four of the transition properties into a single property.",values:[{name:"all",version:"3.0",browsers:"all",desc:"Every property that is able to undergo a transition will do so."},{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"none",version:"3.0",browsers:"all",desc:"No property will transition."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-webkit-transition-delay",restriction:"time",version:"3.0",browsers:"C,O12,S5",ref:"http://www.w3.org/TR/css3-transitions/#transition-delay",syntax:"div { $(name): 1s; }",desc:"Defines when the transition will start. It allows a transition to begin execution some period of time from when it is applied."},{name:"-webkit-transition-duration",restriction:"time",version:"3.0",browsers:"C,O12,S5",ref:"http://www.w3.org/TR/css3-transitions/#transition-duration",syntax:"div { $(name): 1s; }",desc:"Specifies how long the transition from the old value to the new value should take."},{name:"-webkit-transition-property",restriction:"property",version:"3.0",browsers:"C,O12,S5",ref:"http://www.w3.org/TR/css3-transitions/#transition-property",syntax:"div { $(name): background-color; }",desc:"Specifies the name of the CSS property to which the transition is applied.",values:[{name:"all",version:"3.0",browsers:"all",desc:"Every property that is able to undergo a transition will do so."},{name:"none",version:"3.0",browsers:"all",desc:"No property will transition."}]},{name:"-webkit-transition-timing-function",restriction:"enum",version:"3.0",browsers:"C,O12,S5",ref:"http://www.w3.org/TR/css3-transitions/#transition-timing-function",syntax:"div { $(name): linear; }",desc:"Describes how the intermediate values used during a transition will be calculated.",values:[{name:"cubic-bezier()",version:"3.0",browsers:"all",desc:"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2). All values must be in the range [0, 1]."},{name:"ease",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0)."},{name:"ease-in",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0)."},{name:"ease-in-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0)."},{name:"ease-out",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0, 0, 0.58, 1.0)."},{name:"linear",version:"3.0",browsers:"all",desc:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0)."},{name:"step-end",version:"3.0",browsers:"all",desc:"The step-end function is equivalent to steps(1, end)."},{name:"steps(1, start)",version:"3.0",browsers:"all",desc:"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value 'start' or 'end'."},{name:"step-start",version:"3.0",browsers:"all",desc:"The step-start function is equivalent to steps(1, start)."}]},{name:"-webkit-user-drag",restriction:"enum",version:"3.0",browsers:"S3",syntax:"div { $(name): element; }",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"element",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"}]},{name:"-webkit-user-modify",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-user-modify",syntax:"div { $(name): read-only; }",desc:"Determines whether a user can edit the content of an element.",values:[{name:"read-only",version:"3.0",browsers:"all"},{name:"read-write",version:"3.0",browsers:"all"},{name:"read-write-plaintext-only",version:"3.0",browsers:"all"}]},{name:"-webkit-user-select",restriction:"enum",version:"3.0",browsers:"C,S3",ref:"http://css-infos.net/property/-webkit-user-select",syntax:"div { $(name): text; }",desc:"Controls the appearance of selection.",values:[{name:"auto",version:"3.0",browsers:"all"},{name:"none",version:"3.0",browsers:"all"},{name:"text",version:"3.0",browsers:"all"}]},{name:"white-space",restriction:"enum",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-text/#white-space0",syntax:"section { $(name): nowrap; }",desc:"Shorthand property for the 'white-space-collapsing' and 'text-wrap' properties.",values:[{name:"normal",version:"1.0",browsers:"all",desc:"Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'normal'."},{name:"nowrap",version:"1.0",browsers:"all",desc:"Sets 'white-space-collapsing' to 'collapse' and 'text-wrap' to 'none'."},{name:"pre",version:"1.0",browsers:"all",desc:"Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'none'."},{name:"pre-line",version:"1.0",browsers:"all",desc:"Sets 'white-space-collapsing' to 'preserve-breaks' and 'text-wrap' to 'normal'."},{name:"pre-wrap",version:"1.0",browsers:"all",desc:"Sets 'white-space-collapsing' to 'preserve' and 'text-wrap' to 'normal'."}]},{name:"widows",restriction:"integer",version:"2.0",browsers:"C,IE8,O9.5,S1",ref:"http://www.w3.org/TR/CSS2/page.html#propdef-widows",syntax:"",desc:"Specifies the minimum number of lines in a block element that must be left at the top of a page."},{name:"width",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-box/#width",syntax:"header { $(name): 200px; }",desc:"Specifies the width of the content area, padding area or border area (depending on 'box-sizing') of certain boxes.",values:{value:{name:"auto",version:"1.0",browsers:"all",desc:"The width depends on the values of other properties."}}},{name:"word-break",restriction:"enum",version:"3.0",browsers:"C,FF15,IE5,S3",ref:"http://www.w3.org/TR/css3-text/#word-break0",syntax:"p.album { $(name): break-all; }",desc:"Specifies line break opportunities for non-CJK scripts.",values:[{name:"break-all",version:"3.0",browsers:"all",desc:"Lines may break between any two grapheme clusters for non-CJK scripts. This option is used mostly in a context where the text is predominantly using CJK characters with few non-CJK excerpts and it is desired that the text be better distributed on each line."},{name:"keep-all",version:"3.0",browsers:"all",desc:"Block characters can no longer create implied break points. Otherwise this option is equivalent to 'normal'. This option is mostly used where the presence of word separator characters still creates line-breaking opportunities, as in Korean."},{name:"normal",version:"3.0",browsers:"all",desc:"Breaks non-CJK scripts according to their own rules."}]},{name:"word-spacing",restriction:"length, percentage",version:"1.0",browsers:"all",ref:"http://www.w3.org/TR/css3-text/#word-spacing0",syntax:"article { $(name): 3px; }",desc:"Specifies the minimum, maximum, and optimal spacing between words.",values:{value:{name:"normal",version:"1.0",browsers:"all",desc:"The normal inter-word space, as defined by the current font and/or the user agent."}}},{name:"word-wrap",restriction:"enum",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/css3-text/#word-wrap0",syntax:"p { $(name): break-word; }",desc:"Specifies whether the UA may break within a word to prevent overflow when an otherwise-unbreakable string is too long to fit.",values:[{name:"break-word",version:"2.0",browsers:"all",desc:"An unbreakable 'word' may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line."},{name:"hyphenate",version:"2.0",browsers:"none",desc:"An unbreakable 'word' may be hyphenated if there are no otherwise-acceptable break points in the line even if hyphenation is turned off."},{name:"normal",version:"2.0",browsers:"all",desc:"Lines may break only at allowed break points."}]},{name:"z-index",restriction:"integer",version:"2.0",browsers:"all",ref:"http://www.w3.org/TR/CSS2/visuren.html#propdef-z-index",syntax:"img { $(name): 3; }",desc:"For a positioned box, the 'z-index' property specifies the stack level of the box in the current stacking context and whether the box establishes a local stacking context.",values:{value:{name:"auto",version:"2.0",browsers:"all",desc:"The stack level of the generated box in the current stacking context is 0. The box does not establish a new stacking context unless it is the root element."}}},{name:"zoom",restriction:"enum, integer, number, percentage",version:"3.0",browsers:"IE6,S4",ref:"http://msdn.microsoft.com/en-us/ie/gg192966.aspx",syntax:".example { $(name): 1; }",desc:"Sets or retrieves the magnification scale of the object.",values:{value:{name:"normal",version:"3.0",browsers:"all"}}}]}},o={FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"}; r.browserNames=o;var s,i=function(e){var r={},t=0;return e&&e.split(",").forEach(function(e){if(e=e.trim(),"all"===e)r.all=!0,r.FF=r.S=r.C=r.IE=r.O="",t=Number.MAX_VALUE;else if("none"!==e)for(var n in o)0===e.indexOf(n)&&(r[n]=e.substring(n.length).trim(),t++)}),r.count=t,r},a=function(){function e(e){this.data=e}return Object.defineProperty(e.prototype,"name",{get:function(){return this.data.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this.data.desc},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"browsers",{get:function(){return this.browserEntry||(this.browserEntry=i(this.data.browsers)),this.browserEntry},enumerable:!0,configurable:!0}),e}(),l=function(){function e(e){this.data=e}return Object.defineProperty(e.prototype,"name",{get:function(){return this.data.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return Number(this.data.version)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"browsers",{get:function(){return this.browserEntry||(this.browserEntry=i(this.data.browsers)),this.browserEntry},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restrictions",{get:function(){return this.data.restriction?this.data.restriction.split(",").map(function(e){return e.trim()}):[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reference",{get:function(){return this.data.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this.data.desc},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this.data.values?Array.isArray(this.data.values)?this.data.values.map(function(e){return new a(e)}):[new a(this.data.values.value)]:[]},enumerable:!0,configurable:!0}),e}(),c=n.css.atdirectives,d=n.css.pseudoclasses,u=n.css.pseudoelements,h=n.css.properties;r.getProperties=t;var m;r.getAtDirectives=function(){if(!m){m=[];for(var e=0,r=c.length;r>e;e++){var t=c[e];m.push(new l(t))}}return m};var p;r.getPseudoClasses=function(){if(!p){p=[];for(var e=0,r=d.length;r>e;e++){var t=d[e];p.push(new l(t))}}return p};var v;r.getPseudoElements=function(){if(!v){v=[];for(var e=0,r=u.length;r>e;e++){var t=u[e];p.push(new l(t))}}return v}});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/css/services/browsers.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/css/services/browsers.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/css/css",["require","exports","vs/editor/modes/autoIndentation/autoIndentation","vs/editor/modes/modes","vs/editor/modes/modesExtensions","vs/base/objects","vs/platform/services","vs/platform/thread/attribute"],function(e,t,n,r,i,o,s,a){!function(e){e[e.Selector=0]="Selector",e[e.Rule=1]="Rule",e[e.Value=2]="Value",e[e.ValuePostUrl=3]="ValuePostUrl",e[e.ValueInUrlFunction=4]="ValueInUrlFunction",e[e.Unit=5]="Unit",e[e.Meta=6]="Meta"}(t.States||(t.States={}));var u=(t.States,new n.Brackets([{tokenType:"delimiter.bracket.css",open:"{",close:"}",isElectric:!0}])),l=function(e){function t(t,n,r,i,o,s){e.call(this,t),this.kind=n,this.inComment=r,this.quote=i,this.inMeta=o,this.metaBraceCount=s}return __extends(t,e),t.prototype.nextState=function(e,t){return this.kind=e,t},t.prototype.makeClone=function(){return new t(this.getMode(),this.kind,this.inComment,this.quote,this.inMeta,this.metaBraceCount)},t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&o.equals(this,t)},t.prototype.tokenizeInComment=function(e){return/\*\/$/.test(e.advanceUntil("*/",!0))&&(this.inComment=!1),{type:"comment.css"}},t.prototype.tokenizeInString=function(e){for(var t,n=!1,r=this.quote;!e.eos();)if(t=e.next(),n)n=!1;else if("\\"===t)n=!0;else if(t===r){this.quote=null;break}return{type:"string.css"}},t.prototype.tokenize=function(e){if(this.inComment)return this.tokenizeInComment(e);if(null!==this.quote)return this.tokenizeInString(e);if(e.skipWhitespace().length>0)return{type:""};if(e.advanceIfString("/*").length>0)return this.inComment=!0,this.tokenizeInComment(e);if(e.advanceIfString("'").length>0)return this.quote="'",this.tokenizeInString(e);if(e.advanceIfString('"').length>0)return this.quote='"',this.tokenizeInString(e);var t=e.next();if(3===this.kind){if("("===t)return this.nextState(4,{type:"delimiter.parenthesis.css",bracket:1});this.kind=2}else if(4===this.kind){if(")"!==t)return e.advanceIfRegExp(/^[^\)]*/),{type:"string.css"};this.kind=2}switch(this.kind){case 0:return"{"===t?this.nextState(1,{type:"delimiter.bracket.css",bracket:1}):"("===t||")"===t?{type:"delimiter.parenthesis.css",bracket:"("===t?1:-1}:"@"!==t||this.inMeta?"}"===t&&this.inMeta?(this.inMeta=!1,this.nextState(0,{type:"delimiter.bracket.css",bracket:-1})):/[\*\(\)\[\]\+>=\~\|;]/.test(t)?{type:"delimiter.css"}:"#"===t?(e.advanceIfRegExp(/^[\w\-]*/),{type:"tag.css"}):(e.advanceIfRegExp(/^[\w\-]*/),{type:"tag.css"}):(e.advanceIfRegExp(/^[\w\-]*/),this.nextState(6,{type:"keyword.css"}));case 6:if("{"===t){var n=1;return this.inMeta&&(n=0),this.nextState(n,{type:"delimiter.bracket.css",bracket:1})}return"("===t||")"===t?{type:"delimiter.parenthesis.css",bracket:"("===t?1:-1}:";"===t?(0===this.metaBraceCount&&(this.inMeta=!1),this.nextState(0,{type:"delimiter.css"})):/[\*\(\)\[\]\+>=\~\|]/.test(t)?{type:"delimiter.css"}:(this.inMeta=!0,e.advanceIfRegExp(/^[\w\-]*/),{type:"attribute.value.css"});case 1:return"}"===t?this.nextState(0,{type:"delimiter.bracket.css",bracket:-1}):":"===t?this.nextState(2,{type:"delimiter.css"}):"("===t||")"===t?{type:"delimiter.parenthesis.css",bracket:"("===t?1:-1}:(e.advanceIfRegExp(/^[\w\-]*/),{type:"attribute.name.css"});case 2:if("}"===t)return this.nextState(0,{type:"delimiter.bracket.css",bracket:-1});if(";"===t)return this.nextState(1,{type:"delimiter.css"});if(("u"===t||"U"===t)&&e.advanceIfStringCaseInsensitive("rl").length>0)return this.nextState(3,{type:"attribute.value.css"});if("("===t||")"===t)return{type:"delimiter.parenthesis.css",bracket:"("===t?1:-1};if(","===t)return{type:"delimiter.css"};if("#"===t)return e.advanceIfRegExp(/^[\w]*/),{type:"attribute.value.hex.css"};if(/\d/.test(t)||/-|\+/.test(t)&&!e.eos()&&/\d/.test(e.peek()))return e.advanceIfRegExp(/^[\d\.]*/),this.nextState(5,{type:"attribute.value.number.css"});if("!"===t)return{type:"keyword.css"};if(("i"===t||"I"===t)&&e.advanceIfStringCaseInsensitive("mportant").length>0)return{type:"keyword.css"};if(e.advanceIfRegExp(/^[\w\-]*/).length>0)return{type:"attribute.value.css"};break;case 5:return e.goBack(1),e.advanceIfRegExp(/^(em|ex|ch|rem|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)/).length>0?{type:"attribute.value.unit.css"}:(this.nextState(2,null),this.tokenize(e))}return{type:""}},t}(i.AbstractState);t.State=l;var c=function(e){function t(t,n){e.call(this,t,n,s.AsyncDescriptor.create("vs/languages/css/cssWorker","CSSWorker")),this.extraInfoSupport=this,this.referenceSupport=this,this.logicalSelectionSupport=this,this.outlineSupport=this}return __extends(t,e),t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype.canFindReferences=function(e,t){return i.isLineToken(e,t,"attribute.name.css","attribute.value.css","tag.css")},t.prototype.computeInfo=function(e,t){return this._worker(function(n){return n.computeInfo(e,t)})},t.prototype.findReferences=function(e,t){return this._worker(function(n){return n.findReferences(e,t)})},t.prototype.getRangesToPosition=function(e,t){return this._worker(function(n){return n.getRangesToPosition(e,t)})},t.prototype.getOutline=function(e){return this._worker(function(t){return t.getOutline(e)})},t.prototype.getInitialState=function(){return new l(this,0,!1,null,!1,0)},t.prototype.getNonWordTokenTypes=function(){return["delimiter.css","delimiter.parenthesis.css","delimiter.bracket.css"]},t.prototype.getElectricCharacters=function(){return u.getElectricBrackets()},t.prototype.getAutoClosingPairs=function(){return[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t.prototype.onEnterImpl=function(e,t,n){return u.onEnter(e,t,n)},t.prototype.onElectricCharacterImpl=function(e,t,n){return u.onElectricCharacter(e,t,n)},t.prototype.getTriggerCharacters=function(){return[" ",":"]},t.prototype.shouldAutotriggerSuggestImpl=function(e,t){if(t.length<2)return!1;for(var n=!1,r=!1,i=0,o=t.length;o>i;i++)if(n||"attribute.name.css"!==t[i].type){if(n&&!r&&"delimiter.css"===t[i].type)r=!0;else if(""!==t[i].type)return!1}else n=!0;return n&&r},t.prototype.getCommentsConfiguration=function(){return{blockCommentStartToken:"/*",blockCommentEndToken:"*/"}},t.prototype.getWordDefinition=function(){return/(#?-?\d*\.\d\w*%?)|(@?#?[\w-?]+%?)/g},t.prototype.findColorDeclarations=function(e){return this._worker(function(t){return t.findColorDeclarations(e)})},t.$computeInfo=a.OneWorker(t,t.prototype.computeInfo),t.$findReferences=a.OneWorker(t,t.prototype.findReferences),t.$getRangesToPosition=a.OneWorker(t,t.prototype.getRangesToPosition),t.$getOutline=a.OneWorker(t,t.prototype.getOutline),t.$findColorDeclarations=a.OneWorker(t,t.prototype.findColorDeclarations),t}(i.AbstractMode);t.CSSMode=c});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/css/css.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/css/css.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/css/parser/cssNodes",["require","exports","vs/base/types"],function(e,t,n){function r(e,t,n){if("undefined"==typeof n&&(n=-1),t.parent instanceof a){var r=t.parent.children.indexOf(t);r>=0&&t.parent.children.splice(r,1)}return t.parent=e,-1!==n?t.parent.children.splice(r,0,t):e.children.push(t),t}function i(e,t){var n=null;return e.accept(function(e){return e.offset<=t&&e.offset+e.length>=t&&(n?e.length<=n.length&&(n=e):n=e),!0}),n}function o(e,n){for(var r=t.getNodeAtOffset(e,n),i=[];r;)i.unshift(r),r=r.parent;return i}function s(e){var t=e.findParent(18);return t&&t.getValue()&&t.getValue().encloses(e)?t:null}!function(e){e[e.Undefined=0]="Undefined",e[e.Identifier=1]="Identifier",e[e.Stylesheet=2]="Stylesheet",e[e.Ruleset=3]="Ruleset",e[e.Selector=4]="Selector",e[e.SimpleSelector=5]="SimpleSelector",e[e.SelectorInterpolation=6]="SelectorInterpolation",e[e.SelectorCombinator=7]="SelectorCombinator",e[e.SelectorCombinatorParent=8]="SelectorCombinatorParent",e[e.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",e[e.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",e[e.Page=11]="Page",e[e.PageBoxMarginBox=12]="PageBoxMarginBox",e[e.ClassSelector=13]="ClassSelector",e[e.IdentifierSelector=14]="IdentifierSelector",e[e.ElementNameSelector=15]="ElementNameSelector",e[e.PseudoSelector=16]="PseudoSelector",e[e.AttributeSelector=17]="AttributeSelector",e[e.Declaration=18]="Declaration",e[e.Declarations=19]="Declarations",e[e.Property=20]="Property",e[e.Expression=21]="Expression",e[e.BinaryExpression=22]="BinaryExpression",e[e.Term=23]="Term",e[e.Operator=24]="Operator",e[e.Value=25]="Value",e[e.StringLiteral=26]="StringLiteral",e[e.URILiteral=27]="URILiteral",e[e.EscapedValue=28]="EscapedValue",e[e.Function=29]="Function",e[e.NumericValue=30]="NumericValue",e[e.HexColorValue=31]="HexColorValue",e[e.MixinDeclaration=32]="MixinDeclaration",e[e.MixinReference=33]="MixinReference",e[e.VariableName=34]="VariableName",e[e.VariableDeclaration=35]="VariableDeclaration",e[e.Prio=36]="Prio",e[e.Interpolation=37]="Interpolation",e[e.NestedProperties=38]="NestedProperties",e[e.ExtendsReference=39]="ExtendsReference",e[e.SelectorPlaceholder=40]="SelectorPlaceholder",e[e.Debug=41]="Debug",e[e.If=42]="If",e[e.Else=43]="Else",e[e.For=44]="For",e[e.Each=45]="Each",e[e.While=46]="While",e[e.MixinContent=47]="MixinContent",e[e.Media=48]="Media",e[e.Keyframe=49]="Keyframe",e[e.FontFace=50]="FontFace",e[e.Import=51]="Import",e[e.Namespace=52]="Namespace",e[e.Invocation=53]="Invocation",e[e.FunctionDeclaration=54]="FunctionDeclaration",e[e.ReturnStatement=55]="ReturnStatement",e[e.MediaQuery=56]="MediaQuery",e[e.FunctionParameter=57]="FunctionParameter",e[e.FunctionArgument=58]="FunctionArgument",e[e.KeyframeSelector=59]="KeyframeSelector",e[e.Brackets=60]="Brackets"}(t.NodeType||(t.NodeType={}));t.NodeType;!function(e){e[e.Mixin=0]="Mixin",e[e.Rule=1]="Rule",e[e.Variable=2]="Variable",e[e.Function=3]="Function",e[e.Keyframe=4]="Keyframe",e[e.Unknown=5]="Unknown"}(t.ReferenceType||(t.ReferenceType={}));t.ReferenceType;t.adopt=r,t.getNodeAtOffset=i,t.getNodePath=o,t.getParentDeclaration=s;var a=function(){function e(e,t,n,r){"undefined"==typeof e&&(e=null),"undefined"==typeof t&&(t=-1),"undefined"==typeof n&&(n=-1),"undefined"==typeof r&&(r=0),this.data=e,this.type=r,this.parent=null,this.children=[],this.offset=t,this.length=n,this.issues=[]}return e.prototype.accept=function(e){n.isFunction(e)||(e=e.visitNode.bind(e)),e(this)&&this.children.forEach(function(t){t.accept(e)})},e.prototype.attachTo=function(e,n){return"undefined"==typeof n&&(n=-1),t.adopt(e,this,n),this},e.prototype.isErroneous=function(){return this.issues.length>0},e.prototype.setNode=function(e,t,n){return"undefined"==typeof n&&(n=-1),t?(t.attachTo(this,n),this[e]=t,!0):!1},e.prototype.addChild=function(e){return e?(e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},e.prototype.updateOffsetAndLength=function(e){(e.offsetthis.offset+this.length||-1===this.length)&&(this.length=e.offset+e.length-this.offset)},e.prototype.getChildren=function(){return this.children.slice(0)},e.prototype.getChild=function(e){return e=0;n--)if(t=this.children[n],t.offset<=e)return t;return null},e.prototype.findChildAtOffset=function(e,t){var n=this.findFirstChildBeforeOffset(e);return n&&n.offset+n.length>=e?t?n.findChildAtOffset(e,!0)||n:n:null},e.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},e.prototype.getParent=function(){for(var e=this.parent;e instanceof u;)e=e.parent;return e},e.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},e.prototype.setData=function(e,t){this.options||(this.options={}),this.options[e]=t},e.prototype.getData=function(e){return this.options&&this.options.hasOwnProperty(e)?this.options[e]:null},e}();t.Node=a;var u=function(e){function t(t,n,r){"undefined"==typeof n&&(n=0),"undefined"==typeof r&&(r=-1),e.call(this,null,-1,-1,n),this.attachTo(t,r),this.offset=-1,this.length=-1}return __extends(t,e),t}(a);t.Nodelist=u;var l=function(e){function t(t){e.call(this,t,60),this.exclusiveOffset=-1,this.exclusiveLength=-1}return __extends(t,e),t.prototype.begin=function(e,t){this.offset=e,this.exclusiveOffset=e+t},t.prototype.end=function(e,t){this.length=e-this.offset+t,this.exclusiveLength=this.offset-this.exclusiveOffset+(this.length-t)},t}(u);t.Brackets=l;var c=function(e){function t(t,n,r){e.call(this,t,n,r,1)}return __extends(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.data},enumerable:!0,configurable:!0}),t.prototype.containsInterpolation=function(){return this.getChildren().length>0},t}(a);t.Identifier=c;var h=function(e){function t(t,n,r){e.call(this,t,n,r,2)}return __extends(t,e),t.prototype.setName=function(e){this.name=e},t}(a);t.Stylesheet=h;var d=function(e){function t(){e.call(this,null,-1,-1,19)}return __extends(t,e),t}(a);t.Declarations=d;var p=function(e){function t(t,n,r,i){e.call(this,t,n,r,i)}return __extends(t,e),t.prototype.getBrackets=function(){return this.brackets||(this.brackets=new l(this)),this.brackets},t.prototype.getDeclarations=function(){var e=this.getBrackets().declarations;return e||(e=new d,this.setDeclarations(e)),e},t.prototype.setDeclarations=function(e){return this.getBrackets().setNode("declarations",e)},t}(a);t.BodyDeclaration=p;var f=function(e){function t(t,n,r){e.call(this,t,n,r,3)}return __extends(t,e),t.prototype.getSelectors=function(){return this.selectors||(this.selectors=new u(this)),this.selectors},t}(p);t.RuleSet=f;var g=function(e){function t(t,n,r){e.call(this,t,n,r,4)}return __extends(t,e),t}(a);t.Selector=g;var m=function(e){function t(t,n,r){e.call(this,t,n,r,5)}return __extends(t,e),t}(a);t.SimpleSelector=m;var v=function(e){function t(t,n,r){e.call(this,t,n,r,18),this.colonPosition=-1,this.semicolonPosition=-1}return __extends(t,e),t.prototype.setProperty=function(e){return this.setNode("property",e)},t.prototype.getProperty=function(){return this.property},t.prototype.getFullPropertyName=function(){var e=this.property?this.property.getName():"unknown";if(this.parent instanceof d&&this.parent.getParent()instanceof M){var n=this.parent.getParent().getParent();if(n instanceof t)return n.getFullPropertyName()+e}return e},t.prototype.setValue=function(e){return this.setNode("value",e)},t.prototype.getValue=function(){return this.value},t.prototype.setNestedProperties=function(e){return this.setNode("nestedProprties",e)},t.prototype.getNestedProperties=function(){return this.nestedProprties},t}(a);t.Declaration=v;var y=function(e){function t(t,n,r){e.call(this,t,n,r,20)}return __extends(t,e),t.prototype.setIdentifier=function(e){return this.setNode("identifier",e)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.data},t}(a);t.Property=y;var _=function(e){function t(t,n,r,i){"undefined"==typeof i&&(i=53),e.call(this,t,n,r,i)}return __extends(t,e),t.prototype.getArguments=function(){return this.arguments||(this.arguments=new u(this)),this.arguments},t}(a);t.Invocation=_;var b=function(e){function t(t,n,r){e.call(this,t,n,r,29)}return __extends(t,e),t.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.identifier?this.identifier.value:""},t}(_);t.Function=b;var C=function(e){function t(t,n,r){e.call(this,t,n,r,57)}return __extends(t,e),t.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.identifier?this.identifier.data:""},t.prototype.setDefaultValue=function(e){return this.setNode("defaultValue",e,0)},t.prototype.getDefaultValue=function(){return this.defaultValue},t}(a);t.FunctionParameter=C;var w=function(e){function t(t,n,r){e.call(this,t,n,r,58)}return __extends(t,e),t.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.identifier?this.identifier.data:""},t.prototype.setValue=function(e){return this.setNode("value",e,0)},t.prototype.getValue=function(){return this.value},t}(a);t.FunctionArgument=w;var S=function(e){function t(t,n,r){e.call(this,t,n,r,42)}return __extends(t,e),t.prototype.setExpression=function(e){return this.setNode("expression",e,0)},t.prototype.setElseClause=function(e){return this.setNode("elseClause",e)},t}(p);t.IfStatement=S;var E=function(e){function t(t,n,r){e.call(this,t,n,r,44)}return __extends(t,e),t}(p);t.ForStatement=E;var k=function(e){function t(t,n,r){e.call(this,t,n,r,45)}return __extends(t,e),t}(p);t.EachStatement=k;var x=function(e){function t(t,n,r){e.call(this,t,n,r,46)}return __extends(t,e),t}(p);t.WhileStatement=x;var T=function(e){function t(t,n,r){e.call(this,t,n,r,54)}return __extends(t,e),t.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.identifier?this.identifier.value:""},t.prototype.getParameters=function(){return this.parameters||(this.parameters=new u(this)),this.parameters},t}(p);t.FunctionDeclaration=T;var L=function(e){function t(t,n,r){e.call(this,t,n,r,50)}return __extends(t,e),t}(p);t.FontFace=L;var M=function(e){function t(t,n,r){e.call(this,t,n,r,38)}return __extends(t,e),t}(p);t.NestedProperties=M;var N=function(e){function t(t,n,r){e.call(this,t,n,r,49)}return __extends(t,e),t.prototype.setKeyword=function(e){return this.setNode("keyword",e,0)},t.prototype.getKeyword=function(){return this.keyword},t.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.identifier?this.identifier.value:""},t}(p);t.Keyframe=N;var P=function(e){function t(t,n,r){e.call(this,t,n,r,59)}return __extends(t,e),t}(p);t.KeyframeSelector=P;var I=function(e){function t(t,n,r){e.call(this,t,n,r,51)}return __extends(t,e),t.prototype.setMedialist=function(e){return e?(e.attachTo(this),this.medialist=e,!0):!1},t}(a);t.Import=I;var R=function(e){function t(t,n,r){e.call(this,t,n,r,52)}return __extends(t,e),t}(a);t.Namespace=R;var O=function(e){function t(t,n,r){e.call(this,t,n,r,48)}return __extends(t,e),t}(p);t.Media=O;var A=function(e){function t(t,n,r){e.call(this,t,n,r)}return __extends(t,e),t.prototype.getMediums=function(){return this.mediums||(this.mediums=new u(this)),this.mediums},t}(a);t.Medialist=A;var D=function(e){function t(t,n,r){e.call(this,t,n,r,56)}return __extends(t,e),t}(a);t.MediaQuery=D;var W=function(e){function t(t,n,r){e.call(this,t,n,r,11)}return __extends(t,e),t}(p);t.Page=W;var H=function(e){function t(t,n,r){e.call(this,t,n,r,12)}return __extends(t,e),t}(p);t.PageBoxMarginBox=H;var V=function(e){function t(t,n,r){e.call(this,t,n,r,21)}return __extends(t,e),t}(a);t.Expression=V;var F=function(e){function t(t,n,r){e.call(this,t,n,r,22)}return __extends(t,e),t.prototype.setLeft=function(e){return this.setNode("left",e)},t.prototype.getLeft=function(){return this.left},t.prototype.setRight=function(e){return this.setNode("right",e)},t.prototype.getRight=function(){return this.right},t.prototype.setOperator=function(e){return this.setNode("operator",e)},t.prototype.getOperator=function(){return this.operator},t}(a);t.BinaryExpression=F;var z=function(e){function t(t,n,r){e.call(this,t,n,r,23)}return __extends(t,e),t.prototype.setOperator=function(e){return this.setNode("operator",e)},t.prototype.getOperator=function(){return this.operator},t.prototype.setExpression=function(e){return this.setNode("expression",e)},t.prototype.getExpression=function(){return this.expression},t}(a);t.Term=z;var B=function(e){function t(t,n,r){e.call(this,t,n,r,30)}return __extends(t,e),t.prototype.fromString=function(e){for(var t,n=0,r=".".charCodeAt(0),i="0".charCodeAt(0),o="9".charCodeAt(0),s=0,a=e.length;a>s&&(t=e.charCodeAt(s),t>=i&&o>=t||t===r);s++)n+=1;this.value=e.substring(0,n),this.unit=a>n?e.substring(n):void 0},t}(a);t.NumericValue=B;var U=function(e){function t(t,n,r){e.call(this,t,n,r,35)}return __extends(t,e),t.prototype.setVariable=function(e){return e?(e.attachTo(this),this.variable=e,!0):!1},t.prototype.getName=function(){return this.variable?this.variable.getName():""},t.prototype.setValue=function(e){return e?(e.attachTo(this),this.value=e,!0):!1},t}(a);t.VariableDeclaration=U;var j=function(e){function t(t,n,r){e.call(this,t,n,r,34)}return __extends(t,e),t.prototype.getName=function(){return this.data},t}(a);t.Variable=j;var q=function(e){function t(t,n,r){e.call(this,t,n,r,39)}return __extends(t,e),t.prototype.setSelector=function(e){return this.setNode("selector",e,0)},t.prototype.getSelector=function(){return this.selector},t.prototype.getName=function(){return this.selector?this.selector.data:""},t}(a);t.ExtendsReference=q;var G=function(e){function t(t,n,r){e.call(this,t,n,r,33)}return __extends(t,e),t.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.identifier?this.identifier.value:""},t.prototype.getArguments=function(){return this.arguments||(this.arguments=new u(this)),this.arguments},t.prototype.setContent=function(e){return this.setNode("content",e)},t.prototype.getContent=function(){return this.content},t}(a);t.MixinReference=G;var K=function(e){function t(t,n,r){e.call(this,t,n,r,32)}return __extends(t,e),t.prototype.setIdentifier=function(e){return this.setNode("identifier",e,0)},t.prototype.getIdentifier=function(){return this.identifier},t.prototype.getName=function(){return this.identifier?this.identifier.value:""},t.prototype.getParameters=function(){return this.parameters||(this.parameters=new u(this)),this.parameters},t.prototype.setGuard=function(e){return e&&(e.attachTo(this),this.guard=e),!1},t}(p);t.MixinDeclaration=K;var J=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.getConditions=function(){return this.conditions||(this.conditions=new u(this)),this.conditions},t}(a);t.LessGuard=J;var X=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.setVariable=function(e){return this.setNode("variable",e)},t}(a);t.GuardCondition=X;var Y=function(){function e(e,t,n,r,i,o){"undefined"==typeof i&&(i=e.offset),"undefined"==typeof o&&(o=e.length),this.node=e,this.rule=t,this.level=n,this.message=r||t.message,this.offset=i,this.length=o}return e.prototype.getRule=function(){return this.rule},e.prototype.getLevel=function(){return this.level},e.prototype.getOffset=function(){return this.offset},e.prototype.getLength=function(){return this.length},e.prototype.getNode=function(){return this.node},e.prototype.getMessage=function(){return this.message},e}();t.Marker=Y;var $=function(){function e(){this.entries=[]}return e.entries=function(t){var n=new e;return t.accept(n),n.entries},e.prototype.visitNode=function(e){if(e.isErroneous())for(var t=0;t0;)this.callOnDispose.pop()();this.entries=null},e.prototype.onChange=function(){var e=this;this.activeDelay.cancel(),this.activeDelay=n.Promise.timeout(50),this.activeDelay.then(function(){e.updateResources()})},e.prototype.join=function(){return this.activeDelay.then(function(){},function(){})},e.prototype.updateResources=function(){var e=this,t=((new Date).getTime(),0);this.resourceService.all().filter(function(t){return t instanceof i.MirrorModel?t.getModeId()===e._cssModeId:!1}).forEach(function(n){var r=n.getAssociatedResource().toExternal(),i=e.entries[r],o="undefined"!=typeof i;o&&i.version===n.getVersionId()||(o||(i={node:null,version:-1},e.entries[r]=i),i.node=e.createParser().parse(n.getValue()),i.node.setName(r),i.version=n.getVersionId(),t+=1)})},e.prototype.getStylesheet=function(e){return this.entries.hasOwnProperty(e.toExternal())?this.entries[e.toExternal()].node:null},e.prototype.getNodePath=function(e,t){var n=this.getStylesheet(e);return n?t=n.offset+n.length?[n]:r.getNodePath(n,t):[]},e}();t.CSSLanguageService=o}),define("vs/languages/css/services/languageFacts",["require","exports","vs/languages/css/parser/cssNodes","vs/languages/css/services/browsers","vs/base/strings"],function(e,t,n,r,i){function o(e){if(31===e.type)return!0;if(29===e.type&&e.getName()){var n=e.getName();return i.equalsIgnoreCase(n,"rgb")||i.equalsIgnoreCase(n,"rgba")||i.equalsIgnoreCase(n,"hsl")||i.equalsIgnoreCase(n,"hsla")}if(1===e.type){if(e.parent&&23!==e.parent.type)return!1;var r=e.data.toLowerCase();if("none"===r)return!1;if(t.colors[r]||t.colors[r.toLowerCase()])return!0}return!1}function s(e){return e?(e=e.toLowerCase(),r.getProperties().hasOwnProperty(e)):!1}function a(e){return e.browsers.count>1}function u(e){for(var t=r.getProperties(),n=Object.keys(t);n.length>0;)for(var i=t[n.pop()],o=i.values,s=0,a=o.length;a>s;s++)if(o[s].name===e)return o.slice(0);return null}function l(){for(var e=r.getAtDirectives(),t=Object.keys(e),n=[],i=0;i0&&(t+=", "),t+=r.browserNames[n];var i=e[n];i.length>0&&(t=t+" "+i)}return t}t.colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},t.units={length:["em","rem","ex","px","cm","mm","in","pt","pc","cc"],angle:["deg","rad","grad"],time:["ms","s"],frequency:["hz","khz"],resolution:["dpi","dpcm"],percentage:["%"]},t.isColorValue=o,t.isKnownProperty=s,t.isCommonValue=a,t.getAlternateValues=u,t.getPageBoxDirectives=l,t.getEntryDescription=c,t.getBrowserLabel=h});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/css/parser/cssSymbols",["require","exports","./cssNodes"],function(e,t,n){var r=function(){function e(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}return e.prototype.addChild=function(e){this.children.push(e),e.setParent(this)},e.prototype.setParent=function(e){this.parent=e},e.prototype.findScope=function(e,t){if("undefined"==typeof t&&(t=0),this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t){for(var n=0;n=0;s--){var a=null,u=o[s];if(u instanceof n.Property?a=this.getCompletionsForDeclarationProperty():u instanceof n.Expression&&(a=this.getCompletionsForExpression(u)),u instanceof n.SimpleSelector?a=this.getCompletionsForSelector():u instanceof n.Declarations?a=this.getCompletionsForDeclarations(u):u instanceof n.RuleSet?a=this.getCompletionsForRuleSet(u):u instanceof n.Stylesheet&&(a=this.getCompletionsForStylesheet(u)),a)return a}var l=t.getAllUniqueWords(this.currentWord);return{currentWord:this.currentWord,suggestions:l.map(function(e){return{type:"text",label:e,codeSnippet:e}})}},e.prototype.getWordUntilPosition=function(e,t){for(var n=e.getLineContent(t.lineNumber),r=t.column-2,i=!1;r>=0;r--){var o=n.charAt(r);if(":"!==o){if(i)break;if(!/[\w\d\.\-@]/.test(o))break}else i=!0}return n.substring(r+1,t.column-1)},e.prototype.getCompletionsForDeclarationProperty=function(){var e=i.getProperties(),t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];r.browsers.count>1&&t.push({label:r.name,documentationLabel:o.getEntryDescription(r),codeSnippet:r.name+": ",type:"property"})}return s.declarationSnippets.forEach(function(e){t.push(e)}),{currentWord:this.currentWord,suggestions:t}},e.prototype.getCompletionsForDeclarationValue=function(e){var t=[],n=e.getFullPropertyName(),r=i.getProperties()[n];return r&&(this.getColorProposals(r,t),this.getValueEnumProposals(r,t),this.getUnitProposals(r,t)),this.getVariableProposals(e,t),{currentWord:this.currentWord,suggestions:t}},e.prototype.getValueEnumProposals=function(e,t){if(e.values){var n=1===e.restrictions.length&&"color"===e.restrictions[0]?"color":"value";e.values.forEach(function(e){!o.colors[e.name]&&o.isCommonValue(e)&&t.push({label:e.name,documentationLabel:o.getEntryDescription(e),codeSnippet:e.name,type:n})})}},e.prototype.getVariableProposals=function(e,t){var n=e.findParent(2),i=new r.Symbols(n),o=i.findSymbolsAtOffset(this.offset,2);o.forEach(function(e){t.push({label:e.name,codeSnippet:e.name,type:"value"})})},e.prototype.getUnitProposals=function(e,t){var n=isNaN(parseFloat(this.currentWord))?"0":this.currentWord;e.restrictions.forEach(function(e){var r=o.units[e];r&&r.forEach(function(e){t.push({label:n+e,codeSnippet:n+e,type:"value"})})})},e.prototype.getColorProposals=function(e,t){if(-1!==e.restrictions.indexOf("color"))for(var n in o.colors)t.push({label:n,documentationLabel:o.colors[n],codeSnippet:n,type:"color"})},e.prototype.getCompletionsForStylesheet=function(e){var t=e.findFirstChildBeforeOffset(this.offset);return t?t instanceof n.RuleSet?this.getCompletionsForRuleSet(t):null:this.getCompletionForTopLevel()},e.prototype.getCompletionForTopLevel=function(){var e=[];return i.getAtDirectives().forEach(function(t){t.browsers.count>0&&e.push({label:t.name,codeSnippet:t.name,documentationLabel:o.getEntryDescription(t),type:"value"})}),{currentWord:this.currentWord,suggestions:e}},e.prototype.getCompletionsForRuleSet=function(e){var t=e.getBrackets(),n=-1!==t.length&&this.offset>=t.offset+t.length;if(n)return this.getCompletionForTopLevel();var r=-1===t.offset||this.offset<=t.offset;return r?this.getCompletionsForSelector():this.getCompletionsForDeclarations(e.getDeclarations()) },e.prototype.getCompletionsForSelector=function(){var e=[];return i.getPseudoClasses().forEach(function(t){t.browsers.all&&e.push({label:t.name,codeSnippet:t.name,documentationLabel:o.getEntryDescription(t),type:"value"})}),i.getPseudoElements().forEach(function(t){t.browsers.all&&e.push({label:t.name,codeSnippet:t.name,documentationLabel:o.getEntryDescription(t),type:"value"})}),{currentWord:this.currentWord,suggestions:e}},e.prototype.getCompletionsForDeclarations=function(e){var t=e.findFirstChildBeforeOffset(this.offset);if(!t)return this.getCompletionsForDeclarationProperty();if(t instanceof n.Declaration){var r=t;return-1===r.colonPosition||this.offset<=r.colonPosition||-1!==r.semicolonPosition&&r.semicolonPositionthis.source.length)return!1;for(t=0;t=y&&_>=e?(this.stream.advance(t+1),this.stream.advanceWhileChar(function(e){return e>=y&&_>=e||0===t&&e===$}),!0):!1},e.prototype._string=function(){if(this.stream.peekChar()===z||this.stream.peekChar()===F){var e=this.stream.nextChar(),t=!1,n=-1;return this.stream.advanceWhileChar(function(r){switch(n=r,r){case A:return t=!0,!0;case V:case W:case H:case e:var i=t;return t=!1,i;default:return t=!1,!0}}),n===e?(this.stream.nextChar(),2):3}return null},e.prototype.url=function(){if(this.matchWordAnyCase(Q)){this.whitespace();var e=9,t=this._string();return 3===t?e=4:null===t&&(this.stream.advanceWhileChar(function(e){return e!==M}),e=9),this.whitespace(),this.stream.advanceIfChar(M)?e:4}return null},e.prototype.whitespace=function(){var e=this.stream.advanceWhileChar(function(e){return e===B||e===U||e===W||e===V||e===H});return e>0},e.prototype.name=function(){var e=this.stream.peekChar();return this.nmchar(e)?(this.stream.advance(1),this.stream.advanceWhileChar(this.nmchar.bind(this)),!0):!1},e.prototype.ident=function(){var e=this.stream.peekChar();return this.nmstart(e)||e===E&&this.nmstart(this.stream.peekChar(1))?(this.stream.advance(1),this.stream.advanceWhileChar(this.nmchar.bind(this)),!0):!1},e.prototype.dimension=function(){var e=this.stream.peekChar();return this.nmstart(e)?(this.stream.advance(1),this.stream.advanceWhileChar(this.nmchar.bind(this)),!0):!1},e.prototype.nmstart=function(e){return e===k||e>=r&&d>=e||e>=p&&v>=e||e>=128&&65535>=e?!0:!1},e.prototype.nmchar=function(e){return this.nmstart(e)||e===E||e>=y&&_>=e?!0:!1},e}();t.Scanner=nt}),define("vs/languages/css/parser/cssErrors",["require","exports","vs/nls!vs/languages/css/cssWorker"],function(e,t,n){var r=function(){function e(e,t){this.id=e,this.message=t}return e}();t.CSSIssueType=r,t.ParseError={NumberExpected:new r("css-numberexpected",n.localize("vs_languages_css_parser_cssErrors",0)),ConditionExpected:new r("css-conditionexpected",n.localize("vs_languages_css_parser_cssErrors",1)),RuleOrSelectorExpected:new r("css-ruleorselectorexpected",n.localize("vs_languages_css_parser_cssErrors",2)),DotExpected:new r("css-dotexpected",n.localize("vs_languages_css_parser_cssErrors",3)),ColonExpected:new r("css-colonexpected",n.localize("vs_languages_css_parser_cssErrors",4)),SemiColonExpected:new r("css-semicolonexpected",n.localize("vs_languages_css_parser_cssErrors",5)),TermExpected:new r("css-termexpected",n.localize("vs_languages_css_parser_cssErrors",6)),ExpressionExpected:new r("css-expressionexpected",n.localize("vs_languages_css_parser_cssErrors",7)),OperatorExpected:new r("css-operatorexpected",n.localize("vs_languages_css_parser_cssErrors",8)),IdentifierExpected:new r("css-identifierexpected",n.localize("vs_languages_css_parser_cssErrors",9)),PercentageExpected:new r("css-percentageexpected",n.localize("vs_languages_css_parser_cssErrors",10)),URIOrStringExpected:new r("css-uriorstringexpected",n.localize("vs_languages_css_parser_cssErrors",11)),URIExpected:new r("css-uriexpected",n.localize("vs_languages_css_parser_cssErrors",12)),VariableNameExpected:new r("css-varnameexpected",n.localize("vs_languages_css_parser_cssErrors",13)),VariableValueExpected:new r("css-varvalueexpected",n.localize("vs_languages_css_parser_cssErrors",14)),PropertyValueExpected:new r("css-propertyvalueexpected",n.localize("vs_languages_css_parser_cssErrors",15)),LeftCurlyExpected:new r("css-lcurlyexpected",n.localize("vs_languages_css_parser_cssErrors",16)),RightCurlyExpected:new r("css-rcurlyexpected",n.localize("vs_languages_css_parser_cssErrors",17)),LeftSquareBracketExpected:new r("css-rbracketexpected",n.localize("vs_languages_css_parser_cssErrors",18)),RightSquareBracketExpected:new r("css-lbracketexpected",n.localize("vs_languages_css_parser_cssErrors",19)),LeftParenthesisExpected:new r("css-lparentexpected",n.localize("vs_languages_css_parser_cssErrors",20)),RightParenthesisExpected:new r("css-rparentexpected",n.localize("vs_languages_css_parser_cssErrors",21)),CommaExpected:new r("css-commaexpected",n.localize("vs_languages_css_parser_cssErrors",22)),PageDirectiveOrDeclarationExpected:new r("css-pagedirordeclexpected",n.localize("vs_languages_css_parser_cssErrors",23)),UnknownAtRule:new r("css-unknownatrule",n.localize("vs_languages_css_parser_cssErrors",24)),UnknownKeyword:new r("css-unknownkeyword",n.localize("vs_languages_css_parser_cssErrors",25)),SelectorExpected:new r("css-selectorexpected",n.localize("vs_languages_css_parser_cssErrors",26)),StringLiteralExpected:new r("css-stringliteralexpected",n.localize("vs_languages_css_parser_cssErrors",27))}}),define("vs/languages/css/parser/cssParser",["require","exports","vs/base/types","./cssScanner","./cssNodes","vs/languages/css/level","./cssErrors","vs/languages/css/services/languageFacts"],function(e,t,n,r,i,o,s,a){var u=function(){function e(e){"undefined"==typeof e&&(e=new r.Scanner),this.scanner=e,this.token=null,this.prevToken=null}return e.prototype.peek=function(e,t,n){return"undefined"==typeof n&&(n=!0),e!==this.token.type?!1:"undefined"!=typeof t?n?t.toLowerCase()===this.token.text.toLowerCase():t===this.token.text:!0},e.prototype.hasWhitespace=function(){return this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset},e.prototype.consumeToken=function(){this.prevToken=this.token,this.token=this.scanner.scan()},e.prototype.mark=function(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}},e.prototype.restoreAtMark=function(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)},e.prototype.acceptOne=function(e,t,n){"undefined"==typeof n&&(n=!0);for(var r=0;r")?(e.type=8,this.finish(e)):this.accept(27,"+")?(e.type=9,this.finish(e)):this.accept(27,"~")?(e.type=10,this.finish(e)):null},e.prototype._parseSimpleSelector=function(){var e=this.create(i.SimpleSelector),t=0;for(e.addChild(this._parseElementName())&&t++;(0===t||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null},e.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},e.prototype._parseSelectorIdent=function(){return this._parseIdent()},e.prototype._parseHash=function(){if(!this.peek(5)&&!this.peek(27,"#"))return null;var e=this.create(i.Node,14);if(this.accept(27,"#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,s.ParseError.IdentifierExpected)}else this.consumeToken();return this.finish(e)},e.prototype._parseClass=function(){if(!this.peek(27,"."))return null;var e=this.create(i.Node,13);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,s.ParseError.IdentifierExpected):this.finish(e)},e.prototype._parseElementName=function(){var e=this.create(i.Node,15);return e.addChild(this._parseSelectorIdent())||this.accept(27,"*")?this.finish(e):null},e.prototype._parseAttrib=function(){if(!this.peek(19))return null;var e=this.create(i.Node,17);return this.consumeToken(),!e.addChild(this._parseBinaryExpr()),this.accept(20)?this.finish(e):this.finish(e,s.ParseError.RightSquareBracketExpected)},e.prototype._parsePseudo=function(){if(!this.peek(13))return null;var e=this.mark(),t=this.create(i.Node,16);return this.consumeToken(),!this.hasWhitespace()&&this.accept(13),this.hasWhitespace()?(this.restoreAtMark(e),null):t.addChild(this._parseIdent())?this.hasWhitespace()||!this.accept(17)||(t.addChild(this._parseBinaryExpr()||this._parseSimpleSelector()),this.accept(18))?this.finish(t):this.finish(t,s.ParseError.RightParenthesisExpected):this.finish(t,s.ParseError.IdentifierExpected)},e.prototype._parsePrio=function(){if(!this.peek(34))return null;var e=this.create(i.Node,36);return this.accept(34)&&this.accept(0,"important",!0)?this.finish(e):null},e.prototype._parseExpr=function(e){"undefined"==typeof e&&(e=!1);var t=this.create(i.Expression);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(36)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)},e.prototype._parseBinaryExpr=function(e,t){var n=this.create(i.BinaryExpression,e);if(!n.setLeft(e||this._parseTerm()))return null;if(!n.setOperator(t||this._parseOperator()))return this.finish(n);if(!n.setRight(this._parseTerm()))return this.finish(n,s.ParseError.TermExpected);n=this.finish(n);var r=this._parseOperator();return r&&(n=this._parseBinaryExpr(n,r)),this.finish(n)},e.prototype._parseTerm=function(){var e=this.create(i.Term);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseFunction())||e.setExpression(this._parseIdent())||e.setExpression(this._parseURILiteral())||e.setExpression(this._parseStringLiteral())||e.setExpression(this._parseNumeric())||e.setExpression(this._parseHexColor())?this.finish(e):null},e.prototype._parseNumeric=function(){var e=this.create(i.NumericValue);return this.accept(6)||this.accept(7)||this.accept(35)||this.accept(30)||this.accept(28)||this.accept(29)||this.accept(31)||this.accept(32)||this.accept(8)||this.accept(33)?(e.fromString(this.prevToken.text),this.finish(e)):null},e.prototype._parseStringLiteral=function(){var e=this.create(i.Node,26);return this.accept(2)||this.accept(3)?this.finish(e):null},e.prototype._parseURILiteral=function(){var e=this.create(i.Node,27);return this.accept(9)||this.accept(4)?this.finish(e):null},e.prototype._parseIdent=function(e){var t=this.create(i.Identifier);return e&&(t.referenceTypes=e),this.accept(0)?this.finish(t):null},e.prototype._parseFunction=function(){var e=this.mark(),t=this.create(i.Function);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(17))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(36);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,s.ParseError.ExpressionExpected);return this.accept(18)?this.finish(t):this.finish(t,s.ParseError.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){return this._parseIdent([3])},e.prototype._parseFunctionArgument=function(){var e=this.create(i.FunctionArgument);return e.setValue(this._parseExpr(!0))?this.finish(e):null},e.prototype._parseHexColor=function(){var e=this.create(i.Node,31);return this.accept(5)?this.finish(e):null},e}();t.Parser=u});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/css/services/selectorPrinting",["require","exports","vs/languages/css/parser/cssNodes","vs/base/strings"],function(e,t,n,r){function i(e){var t=new l;return e.getChildren().forEach(function(e){switch(e.type){case 7:case 40:case 15:t.name="*"===e.data?"element":e.data;break;case 13:t.addAttr("class",e.data.substring(1));break;case 14:t.addAttr("id",e.data.substring(1));break;case 32:t.addAttr("class",e.getName());break;case 16:t.addAttr(e.data,r.empty);break;case 17:var n,i=e.getChildren()[0];if(i.getRight())switch(i.getOperator().data){case"|=":n=r.format("{0}-…",d.remove(i.getRight().data));break;case"^=":n=r.format("{0}…",d.remove(i.getRight().data));break;case"$=":n=r.format("…{0}",d.remove(i.getRight().data));break;case"~=":n=r.format(" … {0} … ",d.remove(i.getRight().data));break;case"*=":n=r.format("…{0}…",d.remove(i.getRight().data));break;default:n=d.remove(i.getRight().data)}t.addAttr(i.getLeft().data,n)}}),t}function o(e){var n=t.toElement(e),r=new p('"').print(n);return{tagName:"span",className:"selector",children:r}}function s(e){switch(e.type){case 32:case 2:return!0}return!1}function a(e){var t=new c,r=[];if(e.getParent()instanceof n.RuleSet)for(var i=e.getParent().getParent();i&&!s(i);)i instanceof n.RuleSet&&r.push(i),i=i.getParent();for(var o=new f(t),a=r.length-1;a>=0;a--){var u=r[a].getSelectors().getChild(0);u&&o.processSelector(u)}return o.processSelector(e),t}function u(e){var n=t.selectorToElement(e),r=new p('"').print(n);return{tagName:"span",className:"selector",children:r}}var l=function(){function e(){}return e.prototype.addChild=function(t){t instanceof e&&(t.parent=this),this.children||(this.children=[]),this.children.push(t)},e.prototype.addAttr=function(e,t){this.attributes||(this.attributes={}),this.attributes.hasOwnProperty(e)?this.attributes[e]+=" "+t:this.attributes[e]=t},e.prototype.clone=function(){var t=new e;t.name=this.name,t.children=[],t.attributes={};for(var n in this.attributes)t.addAttr(n,this.attributes[n]);for(var r=0;r0;){var r=e.shift(),i=this.doPrintElement(r);n.children.push(i),r.children&&(e.push.apply(e,r.children),n=i)}return t.children},e.prototype.doPrintElement=function(e){var t=this;if(e instanceof h)return{tagName:"ul",children:[{tagName:"li",children:[{tagName:"span",className:"label",text:e.name}]}]};var n=[{isText:!0,text:"<"}];return e.name?n.push({tagName:"span",className:"name",text:e.name}):n.push({tagName:"span",text:"element"}),e.attributes&&Object.keys(e.attributes).forEach(function(r){n.push({isText:!0,text:" "}),n.push({tagName:"span",className:"key",text:r});var i=e.attributes[r];i&&(n.push({isText:!0,text:"="}),n.push({tagName:"span",className:"value",text:d.ensure(i,t.quote)}))}),n.push({isText:!0,text:">"}),{tagName:"ul",children:[{tagName:"li",children:n}]}},e}();!function(e){function t(e,t){return t+n(e)+t}function n(e){return e=r.trim(e,"'"),e=r.trim(e,'"')}e.ensure=t,e.remove=n}(d||(d={})),t.toElement=i,t.simpleSelectorToHtml=o;var f=function(){function e(e){this.prev=null,this.element=e}return e.prototype.processSelector=function(e){var r=this;e.getChildren().forEach(function(e){if(e instanceof n.SimpleSelector){if(r.prev instanceof n.SimpleSelector){var i=new h("…"); r.element.addChild(i),r.element=i}else!r.prev||"+"!==r.prev.data&&"~"!==r.prev.data||(r.element=r.element.parent);r.prev&&"~"===r.prev.data&&(r.element.addChild(t.toElement(e)),r.element.addChild(new h("⋮")));var o=t.toElement(e);r.element.addChild(o),r.element=o}(e instanceof n.SimpleSelector||8===e.type||9===e.type||10===e.type)&&(r.prev=e)})},e}();t.selectorToElement=a,t.selectorToHtml=u}),define("vs/languages/css/services/lintRules",["require","exports","vs/nls!vs/languages/css/cssWorker","vs/languages/css/level"],function(e,t,n,r){function i(){var e={};for(var n in t.Rules){var r=t.Rules[n];e[r.id]=r.getConfiguration()}return e}function o(){var e={};for(var n in t.Rules){var r=t.Rules[n];e[r.id]=r.defaultValue}return e}function s(e){var n={};for(var i in t.Rules){var o=t.Rules[i],s=r.toLevel(e[o.id]);s&&(n[o.id]=s)}return n}var a="warning",u="error",l="ignore",c=function(){function e(e,t,n){this.id=e,this.message=t,this.defaultValue=n}return e.prototype.getConfiguration=function(){return{type:"string",enum:[l,a,u],default:this.defaultValue,description:this.message}},e}();t.Rule=c,t.Rules={AllVendorPrefixes:new c("compatibleVendorPrefixes",n.localize("vs_languages_css_services_lintRules",0),a),IncludeStandardPropertyWhenUsingVendorPrefix:new c("vendorPrefix",n.localize("vs_languages_css_services_lintRules",1),a),DuplicateDeclarations:new c("duplicateProperties",n.localize("vs_languages_css_services_lintRules",2),a),EmptyRuleSet:new c("emptyRules",n.localize("vs_languages_css_services_lintRules",3),a),ImportStatemement:new c("importStatement",n.localize("vs_languages_css_services_lintRules",4),l),NoWidthOrHeightWhenPaddingOrBorder:new c("boxModel",n.localize("vs_languages_css_services_lintRules",5),l),UniversalSelector:new c("universalSelector",n.localize("vs_languages_css_services_lintRules",6),a),ZeroWithUnit:new c("zeroUnits",n.localize("vs_languages_css_services_lintRules",7),l),RequiredPropertiesForFontFace:new c("fontFaceProperties",n.localize("vs_languages_css_services_lintRules",8),a),HexColorLength:new c("hexColorLength",n.localize("vs_languages_css_services_lintRules",9),u),ArgsInColorFunction:new c("argumentsInColorFunction",n.localize("vs_languages_css_services_lintRules",10),u),UnknownProperty:new c("unknownProperties",n.localize("vs_languages_css_services_lintRules",11),a),UnknownVendorSpecificProperty:new c("unknownVendorSpecificProperties",n.localize("vs_languages_css_services_lintRules",12),a),PropertyIgnoredDueToDisplay:new c("propertyIgnoredDueToDisplay",n.localize("vs_languages_css_services_lintRules",13),a),AvoidImportant:new c("important",n.localize("vs_languages_css_services_lintRules",14),l),AvoidFloat:new c("float",n.localize("vs_languages_css_services_lintRules",15),l),AvoidIdSelector:new c("idSelector",n.localize("vs_languages_css_services_lintRules",16),l)},t.getConfigurationProperties=i,t.getDefaultSettings=o,t.sanitize=s}),define("vs/languages/css/services/lint",["require","exports","vs/languages/css/services/languageFacts","vs/languages/css/services/lintRules","vs/languages/css/parser/cssNodes","vs/nls!vs/languages/css/cssWorker","vs/languages/css/level"],function(e,t,n,r,i,o,s){var a=function(){function e(e,t){this.name=e,this.node=t}return e}(),u=function(){function e(){this.data={}}return e.prototype.add=function(e,t,n){var r=this.data[e];r||(r={nodes:[],names:[]},this.data[e]=r),r.names.push(t),n&&r.nodes.push(n)},e}(),l=function(){function e(e){"undefined"==typeof e&&(e={}),this.warnings=[],this.configuration={};for(var t in r.Rules){var n=r.Rules[t],i=e[n.id]||s.toLevel(n.defaultValue);this.configuration[n.id]=i}}return e.entries=function(t,n){var r=new e(n);return t.accept(r),r.getEntries()},e.prototype.fetch=function(e,t){for(var n=[],r=0;r=0&&n.push(e[r]);return n},e.prototype.getEntries=function(e){return"undefined"==typeof e&&(e=6),this.warnings.filter(function(t){return 0!==(t.getLevel()&e)})},e.prototype.addEntry=function(e,t,n){var r=new i.Marker(e,t,this.configuration[t.id],n);this.warnings.push(r)},e.prototype.getMissingNames=function(e,t){e=e.slice(0);for(var n=0;n0||this.fetch(c,"height").length>0)&&(this.fetchWithin(c,"padding").length>0||this.fetchWithin(c,"border").length>0)){for(var h=this.fetch(c,"width"),d=0;d0&&["width","height","margin-top","margin-bottom","float"].forEach(function(e){for(var t=l.fetch(c,e),n=0;n0)for(var f=this.fetch(c,"float"),d=0;d0)for(var f=this.fetch(c,"vertical-align"),d=0;d1&&"background"!==m.name.toLowerCase()&&this.addEntry(m.node,r.Rules.DuplicateDeclarations)}var v=new u,y=!1;if(t.getDeclarations().getChildren().forEach(function(t){if(s.isCSSDeclaration(t)){var i=t,o=i.getFullPropertyName();if(0===o.indexOf("-")){n.isKnownProperty(o)||s.addEntry(i.getProperty(),r.Rules.UnknownVendorSpecificProperty);var a=e.prefixExp.exec(o);null!==a&&v.add(a[2],o,i.getProperty())}else n.isKnownProperty(o)||s.addEntry(i.getProperty(),r.Rules.UnknownProperty),v.add(o,o,null)}else y=!0}),!y){var _=function(e){if(S){var t=o.localize("vs_languages_css_services_lint",4,b);s.addEntry(e,r.Rules.IncludeStandardPropertyWhenUsingVendorPrefix,t)}if(T){var t=o.localize("vs_languages_css_services_lint",5,T);s.addEntry(e,r.Rules.AllVendorPrefixes,t)}};for(var b in v.data){var C=v.data[b],w=C.names,S=n.isKnownProperty(b)&&-1===w.indexOf(b);if(S||1!==w.length){for(var E=[],g=0,k=e.prefixes.length;k>g;g++){var x=e.prefixes[g];n.isKnownProperty(x+b)&&E.push(x+b)}var T=this.getMissingNames(E,w);(T||S)&&C.nodes.forEach(_)}}}return!0},e.prototype.visitNumericValue=function(e){return"%"===e.unit?!0:(0===parseFloat(e.value)&&e.unit&&this.addEntry(e,r.Rules.ZeroWithUnit),!0)},e.prototype.visitFontFace=function(e){var t=this,n=!1,i=!1,o=!1;return e.getDeclarations().getChildren().forEach(function(e){if(t.isCSSDeclaration(e)){var r=e.getProperty().getName().toLocaleLowerCase();"src"===r&&(n=!0),"font-family"===r&&(i=!0)}else o=!0}),o||n&&i||this.addEntry(e,r.Rules.RequiredPropertiesForFontFace),!0},e.prototype.isCSSDeclaration=function(e){if(e instanceof i.Declaration){if(!e.getValue())return!1;var t=e.getProperty();return!t||t.getIdentifier().containsInterpolation()?!1:!0}return!1},e.prototype.visitUnknownNode=function(e){return 31===e.type&&7!==e.data.length&&4!==e.data.length&&this.addEntry(e,r.Rules.HexColorLength),!0},e.prototype.visitFunction=function(e){var t=e.getName().toLowerCase(),n=-1,o=0;switch(t){case"rgb(":case"hsl(":n=3;break;case"rgba(":case"hsla(":n=4}return-1!==n&&(e.getArguments().accept(function(e){return e instanceof i.BinaryExpression?(o+=1,!1):!0}),o!==n&&this.addEntry(e,r.Rules.ArgsInColorFunction)),!0},e.prefixes=["-ms-","-moz-","-o-","-webkit-"],e.prefixExp=new RegExp("^("+e.prefixes.join("|")+")(.+)"),e}();t.LintVisitor=l});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/css/cssWorker",["require","exports","vs/nls!vs/languages/css/cssWorker","vs/base/severity","vs/base/strings","vs/base/lib/winjs.base","vs/editor/worker/modesWorker","vs/platform/markers/markers","vs/languages/css/services/cssLanguageService","vs/languages/css/services/languageFacts","vs/languages/css/services/browsers","./services/occurrences","vs/languages/css/services/intelliSense","vs/editor/core/model/mirrorModel","vs/languages/css/parser/cssNodes","vs/languages/css/level","vs/languages/css/parser/cssParser","vs/languages/css/services/selectorPrinting","vs/languages/css/services/lint","vs/languages/css/services/lintRules"],function(e,t,n,r,i,o,s,a,u,l,c,h,d,p,f,g,m,v,y,_){var b=function(e){function t(t,n,r){e.call(this,t,n,r),this.languageService=this.createLanguageService(t,n),this.lintSettings={}}return __extends(t,e),t.prototype.createLanguageService=function(e,t){return new u.CSSLanguageService(e.resourceService,this.createParser.bind(this),t)},t.prototype.createParser=function(){return new m.Parser},t.prototype.configure=function(e){if(e){var t=e.validationSettings;this.lintSettings=t&&t.lint?_.sanitize(t.lint):{}}return o.Promise.as(null)},t.prototype.doValidate=function(e,t){var n=this;this.languageService.join().then(function(){var i=n.resourceService.get(e);t.changeMarkers(i.getAssociatedResource(),function(t){var i=n.languageService.getStylesheet(e),o=[];o.push.apply(o,f.ParseErrorCollector.entries(i)),o.push.apply(o,n.collectLintEntries(i));for(var s=0;so?n.length-1:o,i[1]+n[o]}return null},t.prototype.valueReplace=function(e,t,n){var r=this;return this.languageService.join().then(function(){var o=r.resourceService.get(e),s=o.getOffsetFromPosition({lineNumber:t.startLineNumber,column:t.startColumn}),a=r.languageService.getStylesheet(e),u=f.getNodeAtOffset(a,s);if(u){var h=f.getParentDeclaration(u);if(h){var d=c.getProperties()[h.getFullPropertyName()];if(d&&d.values){for(var p=d.values.filter(function(e){return l.isCommonValue(e)}),g=0,m=p.length;m>g;g++)if(i.equalsIgnoreCase(p[g].name,u.data)){var v=g;n?v=(g+1)%m:(v=g-1,0>v&&(v=m-1));var y={value:p[v].name,range:r._range(u,o)};return y}if(p.length>0){var y={value:p[0].name,range:r._range(u,o)};return y}return null}}}})},t.prototype.findColorDeclarations=function(e){var t=this;return this.languageService.join().then(function(){var n=t.resourceService.get(e),r=t.languageService.getStylesheet(e),i=[];return r.accept(function(e){return l.isColorValue(e)&&i.push({range:t._range(e,n),value:e.data}),!0}),i})},t.prototype._range=function(e,t,n){if("undefined"==typeof n&&(n=!1),n){var r=t.getPositionFromOffset(e.offset);return{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:r.lineNumber,endColumn:r.column}}return t.getRangeFromOffsetAndLength(e.offset,e.length)},t.prototype._preview=function(e,t,n){"undefined"==typeof n&&(n=200);for(var r=t.offset,i=t.length;t.length0)try{var i=new n.Parser,s=i.parse(r,!0);s.accept(new o(t,e))}catch(a){console.error(a)}})},e.ID="vs/languages/css/monacoParticipant",e}();t.WorkerParticipant=s});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/css/monacoParticipant.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/css/monacoParticipant.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,r){function t(){this.constructor=e}for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.prototype=r.prototype,e.prototype=new t};define("vs/languages/html/html",["require","exports","vs/editor/modes/modes","vs/editor/modes/modesExtensions","vs/base/objects","vs/platform/platform","vs/platform/services","vs/platform/thread/attribute","vs/languages/javascript/javascript","vs/languages/css/css"],function(e,r,t,n,o,s,i,a){!function(e){e[e.Content=0]="Content",e[e.OpeningStartTag=1]="OpeningStartTag",e[e.OpeningEndTag=2]="OpeningEndTag",e[e.WithinDoctype=3]="WithinDoctype",e[e.WithinTag=4]="WithinTag",e[e.WithinComment=5]="WithinComment",e[e.WithinEmbeddedContent=6]="WithinEmbeddedContent",e[e.AttributeName=7]="AttributeName",e[e.AttributeValue=8]="AttributeValue"}(r.States||(r.States={}));var l=(r.States,["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"]),c=["script","style"],d=/^tag\.html\./,u=function(e){function r(r,t,n,o,s,i,a){e.call(this,r),this.kind=t,this.lastTagName=n,this.lastAttributeName=o,this.embeddedContentType=s,this.attributeValueQuote=i,this.attributeValue=a}return __extends(r,e),r.escapeTagName=function(e){return"tag.html.tag-"+e.replace(/:/g,"-")},r.prototype.makeClone=function(){return new r(this.getMode(),this.kind,this.lastTagName,this.lastAttributeName,this.embeddedContentType,this.attributeValueQuote,this.attributeValue)},r.prototype.equals=function(r){return e.prototype.equals.call(this,r)&&o.equals(this,r)},r.prototype.nextName=function(e){return e.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/).toLowerCase()},r.prototype.tokenize=function(e){switch(this.kind){case 5:if(e.advanceUntil("-->",!1).length>0)return{type:"comment.html.content"};if(e.advanceIfString("-->").length>0)return this.kind=0,{type:"comment.html",bracket:-1};break;case 3:if(e.advanceUntil(">",!1).length>0)return{type:"meta.content.html"};if(e.advanceIfString(">").length>0)return this.kind=0,{type:"meta.html",bracket:-1};break;case 0:if(e.advanceIfCharCode("<".charCodeAt(0)).length>0){if(!e.eos()&&"!"===e.peek()){if(e.advanceIfString("!--").length>0)return this.kind=5,{type:"comment.html",bracket:1};if(e.advanceIfStringCaseInsensitive("!DOCTYPE").length>0)return this.kind=3,{type:"meta.html",bracket:1}}return e.advanceIfCharCode("/".charCodeAt(0)).length>0?(this.kind=2,{type:"delimiter.end.html",bracket:1}):(this.kind=1,{type:"delimiter.start.html",bracket:1})}break;case 2:var t=this.nextName(e);return t.length>0?{type:r.escapeTagName(t),bracket:-1!==l.indexOf(t)?-1:-1}:e.advanceIfString(">").length>0?(this.kind=0,{type:"delimiter.end.html",bracket:-1}):(e.advanceUntil(">",!1),{type:""});case 1:if(this.lastTagName=this.nextName(e),this.lastTagName.length>0)return this.lastAttributeName=null,("script"===this.lastTagName||"style"===this.lastTagName)&&(this.lastAttributeName=null,this.embeddedContentType=null),this.kind=4,{type:r.escapeTagName(this.lastTagName),bracket:-1!==l.indexOf(this.lastTagName)?-1:1};break;case 4:if(e.skipWhitespace().length>0||e.eos())return{type:""};var n=this.nextName(e);return n.length>0?(this.lastAttributeName=n,this.kind=7,{type:"attribute.name.html"}):e.advanceIfString("/>").length>0||e.advanceIfCharCode(">".charCodeAt(0)).length>0?-1!==c.indexOf(this.lastTagName)?(this.kind=6,{type:"delimiter.start.html",bracket:-1}):(this.kind=0,{type:"delimiter.start.html",bracket:-1}):(e.next(),{type:""});case 7:return e.skipWhitespace().length>0||e.eos()?{type:""}:"="===e.peek()?(e.next(),this.kind=8,{type:""}):(this.kind=4,this.tokenize(e));case 8:if(e.skipWhitespace().length>0||e.eos())return{type:""};if('"'!==this.attributeValueQuote&&"'"!==this.attributeValueQuote){var o=e.peek();return"'"===o||'"'===o?(this.attributeValueQuote=o,this.attributeValue=o,e.next(),{type:"attribute.value.html"}):(this.kind=4,this.tokenize(e))}if(this.attributeValue!==this.attributeValueQuote||"script"!==this.lastTagName&&"style"!==this.lastTagName||"type"!==this.lastAttributeName){var s=e.next();return s===this.attributeValueQuote?(this.kind=4,this.attributeValue="",this.attributeValueQuote=""):this.attributeValue+=s,{type:"attribute.value.html"}}if(this.attributeValue=e.advanceUntil(this.attributeValueQuote,!0),this.attributeValue.length>0)return this.embeddedContentType=this.unquote(this.attributeValue),this.kind=4,this.attributeValue="",this.attributeValueQuote="",{type:"attribute.value.html"}}return e.next(),this.kind=0,{type:""}},r.prototype.unquote=function(e){var r=0,t=e.length;return'"'===e[0]&&r++,'"'===e[t-1]&&t--,e.substring(r,t)},r}(n.AbstractState);r.State=u;var h=function(e){function r(r,t,n){"undefined"==typeof n&&(n=i.AsyncDescriptor.create("vs/languages/html/htmlWorker","HTMLWorker")),e.call(this,r,t,n,!0),this.formattingSupport=this}return __extends(r,e),r.prototype.getInitialState=function(){return new u(this,0,"","","","","")},r.prototype.getNonWordTokenTypes=function(){return["delimiter.html"]},r.prototype.getAutoClosingPairs=function(){var e={'"':'"',"'":"'"};this.collectAutoClosingPairs(e,m.getMode("text/javascript")),this.collectAutoClosingPairs(e,m.getMode("text/css"));var r,t=[];for(r in e)t.push({open:r,close:e[r]});return t},r.prototype.collectAutoClosingPairs=function(e,r){if(r&&r.characterPairSupport){var t=r.characterPairSupport.getAutoClosingPairs();if(null!==t)for(var n=0;n"},{open:'"',close:'"'},{open:"'",close:"'"}]},r.prototype.enterNestedMode=function(e){return e instanceof u&&6===e.kind},r.prototype.getNestedMode=function(e){var r=null,t=e;if(null!==t.embeddedContentType&&(r=m.getMode(t.embeddedContentType)),null===r){var n=null;n="script"===t.lastTagName?"text/javascript":"style"===t.lastTagName?"text/css":"text/plain",r=m.getMode(n)}return r},r.prototype.getLeavingNestedModeData=function(e,r){var t=r.lastTagName,n=new RegExp("<\\/"+t+"\\s*>","i"),o=n.exec(e);return null!==o?{nestedModeBuffer:e.substring(0,o.index),bufferAfterNestedMode:e.substring(o.index),stateAfterNestedMode:new u(this,0,"","","","","")}:null},r.prototype.splitLineIntoTokens=function(e,r,t,n){var o;o=n?function(e,r,t){return t>=e&&r>t}:function(e,r,t){return t>e&&r>=t};for(var s=null,i=[],a=0;a0&&(i.push(e.substring(r[a-1].startIndex,r[a].startIndex)),o(r[a-1].startIndex,r[a].startIndex,t)&&(s=a-1));return i.push(e.substring(r[a-1].startIndex)),s=null===s?i.length-1:s,{lineTokens:i,offsetTokenIndex:s}},r.prototype.onEnterImpl=function(e,r,t){if(""===e)return null;for(var n=this.splitLineIntoTokens(e,r,t,!1),o=n.offsetTokenIndex,s=n.lineTokens;o>0&&""===r[o].type;)o--;return 0>o||"delimiter.start.html"!==r[o].type?null:"/>"===s[o]?null:(o=n.offsetTokenIndex+1,o":!0,"/":!0};return this.collectElectricCharactersFromMode(e,m.getMode("text/javascript")),this.collectElectricCharactersFromMode(e,m.getMode("text/css")),Object.keys(e)},r.prototype.collectElectricCharactersFromMode=function(e,r){if(r&&r.electricCharacterSupport){var t=r.electricCharacterSupport.getElectricCharacters();if(null!==t)for(var n=0;n1){var i=e.substring(s.startIndex,o===r.length-1?e.length:r[o+1].startIndex);if("delimiter.end.html"===s.type&&"=0&&0!==s.type.indexOf("tag.html.tag-"));if(o>=0){var l=e.substring(s.startIndex,a)+">";return{appendText:l,advanceCount:l.length}}return null}if("delimiter.start.html"===s.type&&">"===i){var a;do a=s.startIndex,o--,s=r[o];while(o>=0&&0!==s.type.indexOf("tag.html.tag-"));if(o>=0)return{appendText:""}}}if("delimiter.start.html"===s.type&&"/>"===i)return null;do o--;while(o>=0&&""===r[o].type);return 0>o||!d.test(r[o].type)?null:{matchBracketType:r[o].type}},r.prototype.getWordDefinition=function(){return/(-?\d*\.\d\w*)|(#?[\w-?]+%?)/g},r.prototype.getCommentsConfiguration=function(){return{blockCommentStartToken:""}},r.prototype._worker=function(r){return e.prototype._worker.call(this,r)},r.prototype.format=function(e,r,t){return this._worker(function(n){return n.format(e,r,t)})},r.$format=a.OneWorker(r,r.prototype.format),r}(n.AbstractMode);r.HTMLMode=h;var m=s.Registry.as(n.Extensions.EditorModes)});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/html/html.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/html/html.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/lib/htmlLib",["require","exports"],function(){function e(e){return e}var r={style_html:e};return r}),define("vs/languages/html/htmlSnippets",["require","exports","vs/nls!vs/languages/html/htmlWorker"],function(e,r,t){r.snippets=[{type:"snippet",label:"html",codeSnippet:["","","",' ',' '," {{Page Title}}",' ',' ',' ',"",""," {{}}","",""].join("\n"),documentationLabel:t.localize("vs_languages_html_htmlSnippets",0)},{type:"snippet",label:"ul",codeSnippet:'
          \n
        • {{item 1}}
        • \n
        • {{item 2}}
        • \n
        • {{item 3}}
        • \n
        ',documentationLabel:t.localize("vs_languages_html_htmlSnippets",1)},{type:"snippet",label:"ol",codeSnippet:'
          \n
        1. {{item 1}}
        2. \n
        3. {{item 2}}
        4. \n
        5. {{item 3}}
        6. \n
        ',documentationLabel:t.localize("vs_languages_html_htmlSnippets",2)},{type:"snippet",label:"table",codeSnippet:[''," "," "," "," "," "," "," "," "," "," ","
        {{Row 1, Column 1}}{{Row 1, Column 2}}{{Row 1, Column 3}}
        {{Row 2, Column 1}}{{Row 2, Column 2}}{{Row 2, Column 3}}
        "].join("\n"),documentationLabel:t.localize("vs_languages_html_htmlSnippets",3)},{type:"snippet",label:"js",codeSnippet:'{{}}',documentationLabel:t.localize("vs_languages_html_htmlSnippets",4)},{type:"snippet",label:"script",codeSnippet:'{{}}',documentationLabel:t.localize("vs_languages_html_htmlSnippets",5)},{type:"snippet",label:"css",codeSnippet:'{{}}',documentationLabel:t.localize("vs_languages_html_htmlSnippets",6)},{type:"snippet",label:"img",codeSnippet:'{{Image Description}}{{}}',documentationLabel:t.localize("vs_languages_html_htmlSnippets",7)}]});var __extends=this.__extends||function(e,r){function t(){this.constructor=e}for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.prototype=r.prototype,e.prototype=new t};define("vs/languages/html/htmlWorker",["require","exports","vs/base/lib/winjs.base","vs/editor/worker/modesWorker","vs/languages/lib/htmlLib","./htmlSnippets"],function(e,r,t,n,o,s){var i=function(e){function r(){e.apply(this,arguments)}return __extends(r,e),r.prototype.format=function(e,r,n){var s=this.resourceService.get(e),i=s.getValueInRange(r),a=o.style_html(i,{indent_size:n.insertSpaces?n.tabSize:1,indent_char:n.insertSpaces?" ":" ",max_char:120});return t.Promise.as(a)},r.prototype.suggestSnippets=function(){return s.snippets},r}(n.AbstractWorkerMode);r.HTMLWorker=i});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/html/htmlWorker.nls",[],{vs_languages_html_htmlSnippets:["Simple HTML5 starting point","A small unordered list","A small ordered list","A basic table starting point","Insert a link to an external Javascript file","Insert a link to an external Javascript file","Insert a link to a style sheet","An image"]});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/html/htmlWorker.nls.keys",[],{vs_languages_html_htmlSnippets:{path:"vs/languages/html/htmlSnippets.js",keys:["html.snippet","ul.snippet","ol.snippet","table.snippet","javascriptlink.snippet","javascriptlink.snippet","stylesheetlink.snippet","img.snippet"]}});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";define("vs/languages/javascript/jsdoc",["require","exports","vs/editor/modes/modes","vs/base/strings","vs/base/arrays"],function(e,r,t,n,o){function s(e,r,t){var o=e[t];if("*"!==o)return null;if(e.indexOf("*/",t)>-1)return null;for(var s=null,i=0;it)break;s=a}return s?n.startsWith(a.type,"comment.doc")?"/*"!==e.substring(s.startIndex,t)?null:{appendText:"*/"}:null:null}function i(e,r,t){var s,i,a=o.findIndexInSegmentsArray(r,t),l=r[a];return l?n.startsWith(l.type,"comment.doc")?(s=e.indexOf("/**"),i=e.indexOf("*/"),-1===s&&-1===i?{indentAction:0,appendText:"* "}:-1!==s&&t>=s+3&&-1!==i&&i>=t?{indentAction:2,appendText:" * ",indentOutdentAppendText:" "}:-1!==s&&t>=s+3?{indentAction:0,appendText:" * "}:null):null:null}r.onElectricCharacter=s,r.onEnter=i});var __extends=this.__extends||function(e,r){function t(){this.constructor=e}for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.prototype=r.prototype,e.prototype=new t};define("vs/languages/typescript/tokenization",["require","exports","vs/base/strings","vs/base/arrays","vs/editor/modes/modes","vs/editor/modes/modesExtensions","vs/languages/vsxml/vsxml","./lib/typescriptServices"],function(e,r,t,n,o,s,i,a){function l(e,r){if(!e)return e;switch(r){case 1:return e+".js";case 0:return e+".ts"}throw new Error("illegal state")}function c(e,r){return new m(e,new i.VSXMLExpression(e,null),new d(r),0)}!function(e){e[e.TypeScript=0]="TypeScript",e[e.EcmaScript5=1]="EcmaScript5"}(r.Language||(r.Language={}));r.Language;!function(e){e[e.Start=0]="Start",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InDocMultiLineCommentTrivia=2]="InDocMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=3]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=4]="InDoubleQuoteStringLiteral"}(r.EndOfLineState||(r.EndOfLineState={}));var u=(r.EndOfLineState,[]);u[11]=!0,u[14]=!0,u[13]=!0,u[12]=!0,u[35]=!0,u[93]=!0,u[94]=!0,u[73]=!0,u[37]=!0,u[24]=!0;var d=function(){function e(e){this._language=e,this._characterWindow=a.ArrayUtilities.createArray(512,0),this._diagnostics=[]}return e.prototype.equals=function(r){return this===r?!0:r instanceof e?this._language===r._language:!1},Object.defineProperty(e.prototype,"language",{get:function(){return this._language},enumerable:!0,configurable:!0}),e.prototype.getClassificationsForLine=function(e,r){var n=0;0!==r&&(4===r?e='"\\\n'+e:3===r?e="'\\\n"+e:1===r?e="/*\n"+e:2===r&&(e="/**\n"+e),n=3);var o=new h;this._scanner=new a.Scanner(t.empty,a.SimpleText.fromString(e),1,this._characterWindow);for(var s=0;this._scanner.absoluteIndex()n;n++){var s=r.syntaxTriviaAt(n);this._addResult(e,t,s.fullWidth(),s.kind(),s)}},e.prototype._addResult=function(e,r,t,n,o){t>0&&(0===r.entries.length&&(t-=e),r.entries.push(this._classify(t,n,o)))},e.prototype._classify=function(e,r,t){var n="",o=0;switch(1===this._language&&r>=60&&69>=r&&(r=11),r){case 28:case 23:case 16:case 42:case 22:case 15:case 18:case 33:case 36:n="keyword.flow";break;case 47:case 57:case 55:n="keyword.visibility";break;case 40:case 44:case 52:case 46:case 27:case 65:case 58:case 49:n="keyword.declare";break;case 61:case 67:case 69:case 60:n="keyword.datatype";break;case 32:n="keyword.null";break;case 6:n=0===t.fullText().indexOf("/**")?"comment.doc":"comment.block";break;case 7:n="comment.line";break;case 14:n="string";break;case 13:n="number";break;case 12:n="regexp";break;case 11:n="identifier";break;case 72:case 73:n="delimiter.parenthesis",o=72===r?1:-1;break;case 70:case 71:n="delimiter.bracket",o=70===r?1:-1;break;case 74:case 75:n="delimiter.array",o=74===r?1:-1;break;default:a.SyntaxFacts.isAnyKeyword(r)?n="keyword":a.SyntaxFacts.isAnyPunctuation(r)&&(n="delimiter")}return{type:l(n,this._language),length:e,bracket:o}},e}();r.Classifier=d;var h=function(){function e(){this.finalLexState=0,this.entries=[]}return e}();r.ClassificationResult=h;var m=function(e){function r(r,t,n,o){e.call(this,r),this._lineTokensIdx=0,this._lineTokens=[],this._vsState=t,this._classifier=n,this._endOfLineState=o}return __extends(r,e),r.prototype.setVSXMLState=function(e){this._vsState=e},r.prototype.makeClone=function(){return new r(this.getMode(),this._vsState.clone(),this._classifier,this._endOfLineState)},r.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&t instanceof r&&this.getMode()===t.getMode()&&this._endOfLineState===t._endOfLineState&&this._classifier.equals(t._classifier)&&this._vsState.equals(t._vsState)},r.prototype.tokenize=function(e){if(this._lineTokensIdx>=this._lineTokens.length){if(e.advanceIfRegExp(/^\s*\/\/\//).length>0)return e.eos()?{type:"comment.vs"}:"/"===e.peek()?(e.advanceToEOS(),{type:l("comment",this._classifier.language)}):{type:"comment.vs",nextState:new i.VSXMLEmbeddedState(this.getMode(),this._vsState,this)};var r=e.advanceToEOS();e.goBack(r.length);var t=this._classifier.getClassificationsForLine(r,this._endOfLineState);this._endOfLineState=t.finalLexState,this._lineTokens=t.entries,this._lineTokensIdx=0}if(this._lineTokensIdx-1?'"'!==e&&"'"!==e:s.type.indexOf("comment")>-1?"'"!==e:!0:!0},r.prototype.onEnterImpl=function(e,r,t){var n=s.onEnter(e,r,t);return n?n:c.onEnter(e,r,t)},r.prototype.onElectricCharacterImpl=function(e,r,t){return s.onElectricCharacter(e,r,t)||c.onElectricCharacter(e,r,t)},r.prototype.getCommentsConfiguration=function(){return{lineCommentTokens:["//"],blockCommentStartToken:"/*",blockCommentEndToken:"*/"}},r.prototype.getTriggerCharacters=function(){return["."]},r.prototype.shouldAutotriggerSuggestImpl=function(e,r,t){if(0===r.length)return!1;var n=i.findIndexInSegmentsArray(r,t-1),o=r[n].type;return o.indexOf("string")>=0||o.indexOf("comment")>=0||o.indexOf("number")>=0?!1:!0},r.prototype._worker=function(r){return e.prototype._worker.call(this,r)},r.prototype.getOutline=function(e){return this._worker(function(r){return r.getOutline(e)})},r.prototype.getWordDefinition=function(){return/(-?\d*\.\d\w*)|([\w$]+)/g},r.prototype.getSuggestionDetails=function(e,r,t){return this._worker(function(n){return n.getSuggestionDetails(e,r,t)})},r.prototype.canFindReferences=function(e,r){return n.isLineToken(e,r,"identifier.js")},r.prototype.findReferences=function(e,r){return this._worker(function(t){return t.findReferences(e,r)})},r.prototype.canFindDeclaration=function(e,r){return n.isLineToken(e,r,"identifier.js","string.js","attribute.value.vs")},r.prototype.findDeclaration=function(e,r){return this._worker(function(t){return t.findDeclaration(e,r)})},r.prototype.computeInfo=function(e,r){return this._worker(function(t){return t.computeInfo(e,r)})},r.prototype.getRangesToPosition=function(e,r){return this._worker(function(t){return t.getRangesToPosition(e,r)})},r.prototype.getParameterHints=function(e,r){return this._worker(function(t){return t.getParameterHints(e,r)})},r.prototype.getParameterHintsTriggerCharacters=function(){return["(",","]},r.prototype.shouldTriggerParameterHints=function(e,r,t){if(0===r.tokens.length)return!1;var n=i.findIndexInSegmentsArray(r.tokens,t-1),o=r.tokens[n].type;return"string.js"===o||"string.escape.js"===o?!1:!0},r.prototype.format=function(e,r,t){return this._worker(function(n){return n.format(e,r,t)})},r.$getOutline=l.OneWorker(r,r.prototype.getOutline),r.$getSuggestionDetails=l.OneWorker(r,r.prototype.getSuggestionDetails),r.$findReferences=l.OneWorker(r,r.prototype.findReferences),r.$findDeclaration=l.OneWorker(r,r.prototype.findDeclaration),r.$computeInfo=l.OneWorker(r,r.prototype.computeInfo),r.$getRangesToPosition=l.OneWorker(r,r.prototype.getRangesToPosition),r.$getParameterHints=l.OneWorker(r,r.prototype.getParameterHints),r.$format=l.OneWorker(r,r.prototype.format),r}(n.AbstractMode);r.JSMode=u});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/javascript/javascript.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/javascript/javascript.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";define("vs/languages/javascript/javascript.configuration",["require","exports","vs/base/severity","vs/base/collections"],function(e,r,t,n){var o=function(){function e(e){this._lintSettings=e,this._severities={},this._severities[2011]=this._severities[2012]=t.fromValue(e.forcedTypeConversion),this._severities[2111]=this._severities[2112]=this._severities[2113]=this._severities[2114]=t.fromValue(e.mixedTypesArithmetics),this._severities[2121]=this._severities[2120]=t.fromValue(e.primitivesInInstanceOf),this._severities[2094]=t.fromValue(e.unknownProperty),this._severities[2095]=t.fromValue(e.undeclaredVariables),this._severities[2134]=t.fromValue(e.redeclaredVariables),this._severities[2084]=t.fromValue(e.newOnReturningFunctions)}return e.prototype.classify=function(e){var r=/.*?(\d+):.*?/.exec(e.message());if(!r)return t.Severity.Error;var o=Number(r[1]);return isNaN(o)?t.Severity.Error:2e3>o?t.Severity.Error:2094===o&&0!==n.lookup(this._severities,o)&&/The property '[\w\d_]+' does not exist on value of type '(any|{})'\./.test(e.text())?0:n.lookup(this._severities,o,0)},e}();r.JavaScriptDiagnosticsClassifier=o,r.defaultLintSettings={curlyBracketsMustNotBeOmitted:"ignore",emptyBlocksWithoutComment:"ignore",comparisonOperatorsNotStrict:"ignore",missingSemicolon:"ignore",reservedKeywords:"warning",typeScriptSpecifics:"warning",unknownTypeOfResults:"warning",semicolonsInsteadOfBlocks:"ignore",functionsInsideLoops:"ignore",tripleSlashReferenceAlike:"warning",unusedVariables:"ignore",unusedFunctions:"ignore",newOnLowercaseFunctions:"warning",newOnReturningFunctions:"warning",redeclaredVariables:"warning",undeclaredVariables:"error",unknownProperty:"ignore",primitivesInInstanceOf:"error",mixedTypesArithmetics:"warning",forcedTypeConversion:"warning"},r._internalDefaultValidationSettings={scope:"/",baseUrl:"",noImplicitAny:!1,noLib:!1,extraLibs:["vs/text!vs/languages/typescript/lib/lib.d.ts"],semanticValidation:!0,syntaxValidation:!0,target:"ES5",module:"",lint:r.defaultLintSettings},r.defaultValidationSettings={target:"ES5",module:"",baseUrl:"",lint:r.defaultLintSettings},r.defaultSuggestSettions={alwaysAllWords:!1,useCodeSnippetsOnMethodSuggest:!1}});var __extends=this.__extends||function(e,r){function t(){this.constructor=e}for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.prototype=r.prototype,e.prototype=new t};define("vs/languages/typescript/js/javaScriptAnalyzer",["require","exports","vs/base/strings","vs/languages/typescript/lib/typescriptServices"],function(e,r,t,n){var o=function(){function e(e,r){this.offset=e,this.length=r}return e}();r.Node=o;var s=function(e){function r(){e.apply(this,arguments),this.items=[]}return __extends(r,e),r}(o);r.List=s;var i=function(e){function r(r,t,n){e.call(this,r,t),this.scope=n,this.requireStatements=[],this.exportsDotExpressions=[]}return __extends(r,e),r}(o);r.DefineNode=i;var a=function(e){function r(r,t,n){e.call(this,r,t),this.name=n}return __extends(r,e),r}(o);r.CallbackParameter=a;var l=function(e){function r(r,t,n){e.call(this,r,t),this.path=n}return __extends(r,e),r}(o);r.DependencyNode=l;var c=function(e){function r(r,t,n,o){e.call(this,r,t),this.name=n,this.path=o}return __extends(r,e),r}(o);r.RequireStatement=c;var u=function(e){function r(r,t,n){e.call(this,r,t),this.name=n}return __extends(r,e),r}(o);r.ExportsExpression=u;var d=function(e){function r(r,t,n){e.call(this,r,t),this.name=n}return __extends(r,e),r}(o);r.DeclaredGlobalVariable=d;var h=function(e){function r(){e.apply(this,arguments)}return __extends(r,e),r.prototype.collect=function(e,r){return"undefined"==typeof r&&(r=[]),this._bucket=r,this._syntaxTree=e,this._syntaxInfo=n.SyntaxInformationMap.create(this._syntaxTree.sourceUnit(),!0,!1),this._syntaxTree.sourceUnit().accept(this),this._bucket},r.prototype._untilParent=function(e,r){for(var t=this._syntaxInfo.parent(e);t&&t.kind()!==r;)t=this._syntaxInfo.parent(t);return t},r}(n.SyntaxWalker);r.AbstractCollector=h;var m=function(e){function r(){e.apply(this,arguments),this._currentScopeId=0}return __extends(r,e),r.prototype._store=function(e){this._currentNode?e instanceof c?this._currentNode.requireStatements.push(e):e instanceof u&&this._currentNode.exportsDotExpressions.push(e):this._bucket.push(e)},r.prototype.visitBinaryExpression=function(r){if(212===r.left.kind()&&107===r.operatorToken.kind()&&149===this._syntaxInfo.parent(r).kind()){var t=r.left,n=t.expression;if(v.isIdentifier(n,"exports")){var o=this._syntaxInfo.start(n),s=this._syntaxInfo.end(t.name);return this._store(new u(o,s-o,t.name.valueText())),void 0}}return e.prototype.visitBinaryExpression.call(this,r)},r.prototype.visitInvocationExpression=function(t){if(v.isIdentifier(t.expression,r._Require)){var n=t.argumentList.arguments;if(v.isPath(n,14)){var s,a=this._untilParent(t,225);return a&&(s=a.propertyName.text()),this._store(new c(this._syntaxInfo.start(t),t.width(),s,v.textValue(n.nonSeparatorAt(0)))),void 0}}else if(v.isIdentifier(t.expression,r._Define)){this._currentNode=new i(this._syntaxInfo.start(t),t.width(),this._currentScopeId);var n=t.argumentList.arguments;if(v.isPath(n,215)?this._currentNode.objectLiteral=new o(this._syntaxInfo.start(n.nonSeparatorAt(0)),n.nonSeparatorAt(0).width()):v.isPath(n,222)?this._fillInParametersAndBody(n.nonSeparatorAt(0),this._currentNode):v.isPath(n,214,222)?(this._fillInDependencies(n.nonSeparatorAt(0),this._currentNode),this._fillInParametersAndBody(n.nonSeparatorAt(1),this._currentNode)):v.isPath(n,14,214,222)?(this._currentNode.identifier=n.nonSeparatorAt(0).valueText(),this._fillInDependencies(n.nonSeparatorAt(1),this._currentNode),this._fillInParametersAndBody(n.nonSeparatorAt(2),this._currentNode)):this._currentNode=null,this._currentNode)return this._bucket.push(this._currentNode),e.prototype.visitInvocationExpression.call(this,t),this._currentNode=null,void 0}return e.prototype.visitInvocationExpression.call(this,t)},r.prototype._fillInDependencies=function(e,r){r.dependencyArray=new s(this._syntaxInfo.start(e),e.width());for(var t=0,n=e.expressions.nonSeparatorCount();n>t;t++){var o=e.expressions.nonSeparatorAt(t);r.dependencyArray.items.push(new l(this._syntaxInfo.start(o),o.width(),v.textValue(o)))}},r.prototype._fillInParametersAndBody=function(e,r){var t,n;t=this._syntaxInfo.end(e.callSignature.parameterList.openParenToken),n=this._syntaxInfo.start(e.callSignature.parameterList.closeParenToken),r.callbackParameters=new s(t,n-t);for(var i=e.callSignature.parameterList.parameters,l=0,c=i.nonSeparatorCount();c>l;l++){var u=i.nonSeparatorAt(l);r.callbackParameters.items.push(new a(this._syntaxInfo.start(u),u.width(),v.textValue(u)))}t=this._syntaxInfo.end(e.block.openBraceToken),n=this._syntaxInfo.start(e.block.closeBraceToken),r.callbackBody=new o(t,n-t)},r.prototype.visitNode=function(r){switch(r.kind()){case 129:case 222:case 218:case 219:this._currentScopeId+=1,e.prototype.visitNode.call(this,r),this._currentScopeId-=1;break;default:e.prototype.visitNode.call(this,r)}},r._Define="define",r._Require="require",r}(h);r.ImportsAndExportsCollector=m;var p=function(e){function r(){e.apply(this,arguments)}return __extends(r,e),r.prototype.visitToken=function(r){for(var t=r.leadingTrivia().concat(r.trailingTrivia()),n=r.leadingTrivia().count(),o=this._syntaxInfo.fullStart(r),s=0,i=t.count();i>s;s++)s===n&&(o+=r.width()),6===t.syntaxTriviaAt(s).kind()&&(this._handleMultilineComment(t.syntaxTriviaAt(s).fullText(),o),o+=t.syntaxTriviaAt(s).fullWidth());e.prototype.visitToken.call(this,r)},r.prototype._handleMultilineComment=function(e,n){var o=r._Pattern.exec(e);if(o){n+=o[1].length;for(var s=o[2].split(","),i=0,a=s.length;a>i;i++){var l=s[i].length-t.ltrim(s[i]," ").length,c=s[i].length-t.rtrim(s[i]," ").length,u=s[i].trim(),h=u.indexOf(":");u=u.substring(0,~h?h:void 0),n+=l,this._bucket.push(new d(n,u.length,u)),n+=1+u.length+c}}},r._Pattern=/^(\/\* ?globals? )([\s\S]+)\*\//m,r}(h);r.GlobalVariableCollector=p;var v;!function(e){function r(e){for(var r=[],t=0;tn;n++)if(e.nonSeparatorAt(n).kind()!==r[n])return!1;return!0}function t(e,r){return 11!==e.kind()?!1:n(e)===r}function n(e){var r=e.leadingTriviaWidth(),t=e.trailingTriviaWidth(),n=e.fullText();return n.substring(r,n.length-t)}function o(e,r,t){return r&&t?e.fullWidth():e.width()+(r?e.leadingTriviaWidth():0)+(t?e.trailingTriviaWidth():0)}e.isPath=r,e.isIdentifier=t,e.textValue=n,e.width=o}(v||(v={}))});var __extends=this.__extends||function(e,r){function t(){this.constructor=e}for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.prototype=r.prototype,e.prototype=new t};define("vs/languages/typescript/js/textEdits",["require","exports","vs/base/arrays","vs/base/strings","vs/base/collections"],function(e,r,t,n,o){function s(e,t){return-r.compareDecending(e,t)}function i(e,r){return e.offset===r.offset?r.length-e.length:r.offset-e.offset}function a(e){var r={};t.forEach(e,function(e,t){if(e.isInsert()){var n=o.lookupOrInsert(r,e.offset,e);n!==e&&(n.text+=e.text,t())}})}function l(e,t){var o,s=[],i=t.length,l=[],c=[];a(e),e.sort(r.compareDecending);for(var u=0,h=e.length;h>u;u++)o=e[u],s.push(t.substring(o.end,i)),s.push(o.text),i=o.offset,l.push(o.deltaLength),c.push(new d(o.offset,o.text.length,t.substr(o.offset,o.length)));s.push(t.substring(0,i));for(var m=0,u=c.length-1;u>=0;u--)c[u].offset+=m,m+=l[u];return{value:s.reverse().join(n.empty),doEdits:e,undoEdits:c}}function c(e,t,n){"undefined"==typeof n&&(n=0),e.sort(r.compareAscending);for(var o,s=0,i=0,a=e.length;a>i;i++)if(o=e[i],o.end<=t)s+=o.deltaLength;else{if(o.offset>t)break;o.offset<=t&&o.end>t&&(0===n?s+=Math.min(0,o.offset+(o.length+o.deltaLength)-t):1===n?s+=o.offset-t:2===n&&(s+=o.end+o.deltaLength-t))}return t+s}var u=function(){function e(e,r){this.offset=e,this.length=r}return e.from=function(r){return new e(r.offset,r.length)},Object.defineProperty(e.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return this.offset===e.offset&&this.length===e.length},e.prototype.before=function(e){return this.end<=e.offset},e.prototype.after=function(r){return new e(r.offset,r.length).before(this)},e.prototype.contains=function(e){var r=e.offset-this.offset;return r>=0?r<=this.length-e.length:!1},e.prototype.overlaps=function(r){var t=new e(r.offset,r.length);return this.offset=t.offset&&this.end<=t.end||t.offset=this.offset&&t.end<=this.end},e}();r.TextSpan=u;var d=function(e){function r(r,t,n){e.call(this,r,t),this.text=n}return __extends(r,e),Object.defineProperty(r.prototype,"deltaLength",{get:function(){return this.text.length-this.length},enumerable:!0,configurable:!0}),r.prototype.isInsert=function(){return 0===this.length&&this.text.length>0},r.prototype.isReplace=function(){return this.length>0&&this.text.length>0},r.prototype.isDelete=function(){return this.length>0&&0===this.text.length},r}(u);r.Edit=d,r.compareAscending=s,r.compareDecending=i,r.apply=l,function(e){e[e.None=0]="None",e[e.StickLeft=1]="StickLeft",e[e.StickRight=2]="StickRight"}(r.TranslationBehaviour||(r.TranslationBehaviour={}));r.TranslationBehaviour;r.translate=c}),define("vs/languages/typescript/js/javaScriptRewriter",["require","exports","vs/base/strings","vs/base/paths","vs/base/collections","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/js/javaScriptAnalyzer","vs/languages/typescript/js/textEdits"],function(e,r,t,n,o,s,i,a){function l(e,r){return d.rewrite(e,r)}var c=function(){function e(){this._counter=0,this._proposalToName={},this._allNames={}}return e.prototype.next=function(r){if(!r)return t.format("_var_{0}",this._counter++);var s=o.lookup(this._proposalToName,r);if(s)return s;if(s=r.replace(/["']/g,t.empty),s=n.basename(s),s=s.replace(e._RegExp,t.empty),0===s.length)return this.next();s=s.split(t.empty).join(e._SpecialChar),s+=e._SpecialChar;for(var i=s,a=1;o.contains(this._allNames,s);a++)s=i+a;return this._allNames[s]=!0,this._proposalToName[r]=s,s},e.prototype.allocateIfFree=function(e){return o.contains(this._allNames,e)?!1:(this._allNames[e]=!0,!0)},e.prototype.reset=function(){this._counter=0,this._proposalToName={},this._allNames={}},e._RegExp=/[^A-Za-z_$]/g,e._SpecialChar="̲",e}(),u=function(){function e(){}return e.prototype.rewrite=function(e,r){r||(r=s.Parser.parse("fakefilename.ts",s.TextFactory.createText(e),!1,new s.ParseOptions(1,!0)));var t=[];if((new i.GlobalVariableCollector).collect(r,t),(new i.ImportsAndExportsCollector).collect(r,t),0===t.length)return{value:e,doEdits:[],undoEdits:[]};this._edits=[],this._currentValue=e,this._variableNames=new c;for(var n=!1,o=0,l=t.length;l>o;o++){var u=t[o];u instanceof i.DefineNode&&!n&&0===u.scope?(this._translateDefineNode(u),n=!0):u instanceof i.ExportsExpression?this._translateExportsExpression(u):u instanceof i.RequireStatement?this._translateRequireStatement(u):u instanceof i.DeclaredGlobalVariable&&this._translateGlobalVariable(u)}return a.apply(this._edits,e)},e.prototype._translateGlobalVariable=function(e){this._variableNames.allocateIfFree(e.name)&&this._insert(0,t.format("declare var {0}:any;\n",e.name))},e.prototype._translateRequireStatement=function(e){var r=this._variableNames.next(e.name||e.path);this._insert(0,t.format("import {0} = require({1});\n",r,e.path)),this._replace(e.offset,e.length,r)},e.prototype._translateExportsExpression=function(e){this._replace(e.offset,e.length-e.name.length,"export var ")},e.prototype._translateDefineNode=function(r){if(r.objectLiteral)this._insert(0,e._DeclareWithLiteral);else{if(r.dependencyArray)for(var n=0,o=r.callbackParameters.items.length;o>n;n++){var s=r.callbackParameters.items[n],i=r.dependencyArray.items[n];if(!e._SpecialCallbackParams.hasOwnProperty(s.name)&&i){var a=this._variableNames.next();this._insert(0,t.format("import {0} = require({1});\n",a,i.path)),this._insert(s.offset+s.length,t.format(":typeof {0}",a))}}for(var l=[],n=0,o=r.requireStatements.length;o>n;n++){var c=r.requireStatements[n],u=this._variableNames.next(),d=this._variableNames.next();this._insert(0,t.format("import {0} = require({1});\n",u,c.path)),this._replace(c.offset,c.length,d),l.push(t.format("{0}:typeof {1}",d,u))}l.length>0&&this._insert(r.callbackParameters.offset+r.callbackParameters.length,t.format("{0}{1}",r.callbackParameters.items.length>0?",":"",l.join(",")));for(var h=[],n=0,o=r.exportsDotExpressions.length;o>n;n++){var m=r.exportsDotExpressions[n],p=this._variableNames.next();this._replace(m.offset,m.length,t.format("var {0}",p)),h.push(m.name),h.push(":"),h.push(p),h.push(",")}h.length>0&&(h.pop(),this._insert(r.callbackBody.offset+r.callbackBody.length,t.format("return {{0}};",h.join(t.empty))));var v=r.identifier?"id,":t.empty,f=r.dependencyArray?"dep,":t.empty,b=r.callbackParameters.items.map(function(e){return e.name}).concat(r.requireStatements.map(function(e,r){return t.format("_p{0}",r)})).join(",");this._insert(0,t.format(e._DeclareTemplate,v,f,b))}var w=this._variableNames.next();this._insert(r.offset,t.format("var {0} = ",w)),this._append(t.format("\nexport = {0};",w))},e.prototype._insert=function(e,r){this._edits.push(new a.Edit(e,0,r))},e.prototype._append=function(e){this._edits.push(new a.Edit(this._currentValue.length,0,e))},e.prototype._replace=function(e,r,t){this._edits.push(new a.Edit(e,r,t))},e._SpecialCallbackParams={exports:!0,module:!0,require:!0},e._DeclareWithLiteral="declare function define(literal:T):T;\n",e._DeclareTemplate="declare function define({0}{1}callback:({2})=>T):T;\n",e}(),d=new u;return l});var __extends=this.__extends||function(e,r){function t(){this.constructor=e}for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);t.prototype=r.prototype,e.prototype=new t};define("vs/languages/javascript/javascriptWorker",["require","exports","vs/base/network","vs/base/lifecycle","vs/base/strings","vs/base/arrays","vs/base/lib/winjs.base","vs/platform/services","vs/editor/core/position","vs/editor/core/model/mirrorModel","vs/languages/typescript/typescriptWorker2","vs/languages/typescript/typescript.configuration","vs/languages/javascript/javascript.configuration","vs/languages/typescript/js/javaScriptRewriter","vs/languages/typescript/js/textEdits","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/service/languageServiceAdapter","vs/languages/typescript/service/languageServiceHost2","vs/editor/contrib/links/linkComputer"],function(e,r,t,n,o,s,i,a,l,c,u,d,h,m,p,v,f,b,w){var g=function(){function e(e){this.delegate=e}return e.prototype.addListener=function(e,r){return this.delegate.addListener(e,r)},e.prototype.addListener2=function(e,r){return this.delegate.addListener2(e,r)},e.prototype.addOneTimeListener=function(e,r){return this.delegate.addOneTimeListener(e,r)},e.prototype.addBulkListener=function(e){return this.delegate.addBulkListener(e)},e.prototype.addBulkListener2=function(e){return this.delegate.addBulkListener2(e)},e.prototype.addEmitter=function(e,r){return this.delegate.addEmitter(e,r)},e.prototype.addEmitter2=function(e,r){return this.delegate.addEmitter2(e,r)},e.prototype.addEmitterTypeListener=function(e,r,t){return this.delegate.addEmitterTypeListener(e,r,t)},e.prototype.emit=function(e,r){this.delegate.emit(e,r)},e.prototype.dispose=function(){this.delegate.dispose()},e}();r.DelegateEventEmitter=g;var y=function(e){function r(r){e.call(this,r),this._delegate=r}return __extends(r,e),r.prototype.getDelegate=function(){return this._delegate},r.prototype.get=function(e){return this._delegate.get(e)},r.prototype.getLinked=function(e,r){return this._delegate.getLinked(e,r)},r.prototype.insert=function(e,r){return this._delegate.insert(e,r)},r.prototype.insertLinked=function(e,r,t){return this._delegate.insertLinked(e,r,t)},r.prototype.all=function(){return this._delegate.all()},r.prototype.allLinked=function(){return this._delegate.allLinked()},r.prototype.contains=function(e){return this._delegate.contains(e)},r.prototype.remove=function(e){return this._delegate.remove(e)},r}(g);r.DelegateResourceService=y;var _=function(e){function r(){e.apply(this,arguments)}return __extends(r,e),r.prototype.get=function(e){return this._delegate.getLinked(e,x.ID)||this._delegate.get(e)},r.prototype.getOriginalModel=function(e){return this._delegate.get(e)},r}(y);r.MyResourceService=_;var k=function(){function e(){}return e.prototype.to=function(e){return e},e.prototype.from=function(e){return e},Object.defineProperty(e.prototype,"report",{get:function(){return{isInserted:function(){return!1}}},enumerable:!0,configurable:!0}),e.Instance=new e,e}();r.IdentityTranslator=k;var x=function(e){function r(r,t){e.call(this,r.getVersionId(),r.getValue(),r.getModeId(),r.getAssociatedResource()),this._syntaxTreeService=t,this._model=r,this._callOnDispose=[this.addEmitter(this._model)],this._translateDocument(),this._attach()}return __extends(r,e),r.prototype.dispose=function(){n.cAll(this._callOnDispose),e.prototype.dispose.call(this)},r.prototype._attach=function(){var e=this;if(this._model instanceof c.MirrorModel){var r;this._callOnDispose.push(this._model.addListener("changed",function(){e._setVersionId(e._model.getVersionId()),e._lineStarts=null,clearTimeout(r),r=setTimeout(function(){return e._translateDocument()},250)}))}},r.prototype._translateDocument=function(){this._parsedVersionId!==this.getVersionId()&&(this._parsedVersionId=this.getVersionId(),this._textOperationResult=m(this._model.getValue(),this._syntaxTreeService.syntaxTree(this._model.getAssociatedResource())),this._constructLines(this._textOperationResult.value))},Object.defineProperty(r.prototype,"translator",{get:function(){return this},enumerable:!0,configurable:!0}),r.prototype.to=function(e){if(this._translateDocument(),l.isIPosition(e))return this._doTranslate(this._textOperationResult.doEdits,this._model,this,e,0);var r=e,t=this._doTranslate(this._textOperationResult.doEdits,this._model,this,{lineNumber:r.startLineNumber,column:r.startColumn},0),n=this._doTranslate(this._textOperationResult.doEdits,this._model,this,{lineNumber:r.endLineNumber,column:r.endColumn},0);return{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}},r.prototype.from=function(e){if(this._translateDocument(),l.isIPosition(e))return this._doTranslate(this._textOperationResult.undoEdits,this,this._model,e,0);var r=e,t=this._doTranslate(this._textOperationResult.undoEdits,this,this._model,{lineNumber:r.startLineNumber,column:r.startColumn},1),n=this._doTranslate(this._textOperationResult.undoEdits,this,this._model,{lineNumber:r.endLineNumber,column:r.endColumn},2);return{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}},r.prototype._doTranslate=function(e,r,t,n,o){var s=r.getOffsetFromPosition(n),i=p.translate(e,s,o);return t.getPositionFromOffset(i)},Object.defineProperty(r.prototype,"report",{get:function(){return this},enumerable:!0,configurable:!0}),r.prototype.isInserted=function(e){var r;r=l.isIPosition(e)?l.PositionUtils.asEmptyRange(e):e;for(var t=this.getOffsetAndLengthFromRange(r),n=this._textOperationResult.undoEdits,o=0,s=n.length;s>o;o++)if(n[o].contains(t))return!0;return!1},r.prototype.getWordAtPosition=function(r){return this._translateDocument(),e.prototype.getWordAtPosition.call(this,r)},r.prototype.getWordUntilPosition=function(r){return this._translateDocument(),e.prototype.getWordUntilPosition.call(this,r)},r.prototype.getLineStart=function(r){return this._translateDocument(),e.prototype.getLineStart.call(this,r)},r.prototype.getLineContent=function(r){return this._translateDocument(),e.prototype.getLineContent.call(this,r)},r.prototype.getLineMaxColumn=function(r){return this._translateDocument(),e.prototype.getLineMaxColumn.call(this,r)},r.prototype.getRangeFromOffsetAndLength=function(r,t){return this._translateDocument(),e.prototype.getRangeFromOffsetAndLength.call(this,r,t)},r.prototype.getOffsetAndLengthFromRange=function(r){return this._translateDocument(),e.prototype.getOffsetAndLengthFromRange.call(this,r)},r.prototype.getPositionFromOffset=function(r){return this._translateDocument(),e.prototype.getPositionFromOffset.call(this,r)},r.prototype.getOffsetFromPosition=function(r){return this._translateDocument(),e.prototype.getOffsetFromPosition.call(this,r)},r.prototype.getRawLines=function(){return this._translateDocument(),e.prototype.getRawLines.call(this)},r.prototype.getLineCount=function(){return this._translateDocument(),e.prototype.getLineCount.call(this)},r.prototype.getValueInRange=function(r,t){return this._translateDocument(),e.prototype.getValueInRange.call(this,r,t)},r.prototype.getValue=function(){return this._translateDocument(),e.prototype.getValue.call(this)},r.prototype.getProperty=function(e){return this._model.getProperty(e)},r.ID="myMirrorModel",r}(c.MirrorModel);r.MyMirrorModel=x;var T=function(){function e(e){this._resourceService=e,this._host=new b.LanguageServiceHost(this._resourceService),this._languageService=new v.Services.LanguageService(this._host),this._adapter=new f.LanguageServiceAdapter(h._internalDefaultValidationSettings,h.defaultSuggestSettions,this._host,this._languageService)}return e.prototype.adapter=function(e){return this._host.updateResources([e]),this._adapter},e.prototype.syntaxTree=function(e){return this._host.updateResources([e]),this._languageService.getSyntaxTree(e.toExternal())},e}();r.SyntaxTreeLanguageService=T;var S=function(e){function r(r,t,n){e.call(this,r,t,n,{syntacticValidation:!0,semanticValidation:!0,validateAllFiles:!1}),this._originalInstantiationService=r.instantiationService}return __extends(r,e),r.prototype.injectResourceService=function(r){var t=this;this._syntaxTreeLanguageService=new T(r),this._myResourceService=new _(r),this._instantiationService=this._instantiationService.createChild({resourceService:this._myResourceService});var n=r.addListener(a.ResourceEvents.ADDED,function(e){var n=e.url.toExternal(),s=e.addedElement;o.endsWith(n,".js")&&s instanceof c.AbstractMirrorModel&&r.insertLinked(e.url,x.ID,new x(s,t._syntaxTreeLanguageService))});this._callOnDispose.push(n),e.prototype.injectResourceService.call(this,this._myResourceService),this.configure(null)},r.prototype.configure=function(r){for(var t=d.sanitize(r,h._internalDefaultValidationSettings,h.defaultSuggestSettions),n=0,o=t.validationSettings.length;o>n;n++){var s=new h.JavaScriptDiagnosticsClassifier(t.validationSettings[n].lint);t.validationSettings[n].diagnosticClassifier=s.classify.bind(s)}return e.prototype.configure.call(this,t)},r.prototype.translator=function(e){var r=this.resourceService.getLinked(e,x.ID);return r instanceof x?r.translator:k.Instance},r.prototype._withOriginalSyntaxTree=function(e,r){return i.Promise.as(r(this._syntaxTreeLanguageService.adapter(e)))},r.prototype.format=function(e,r,t){return this._withOriginalSyntaxTree(e,function(n){return n.format(e,r,t)})},r.prototype.getOutline=function(e){return this._withOriginalSyntaxTree(e,function(r){return r.getOutline(e)})},r.prototype.getRangesToPosition=function(e,r){return this._withOriginalSyntaxTree(e,function(t){return t.getRangesToPosition(e,r)})},r.prototype.computeLinks=function(e){var r=this._myResourceService.getOriginalModel(e);return i.TPromise.as(w(r))},r.prototype.doValidate=function(r,t){e.prototype.doValidate.call(this,r,t)},r.prototype._publishMarkersForResource=function(r,t,n){var o=this.translator(r);return s.forEach(n,function(e,r){o.report.isInserted(e.range)?r():e.range=o.from(e.range)}),e.prototype._publishMarkersForResource.call(this,r,t,n)},r.prototype.doSuggest=function(r,t){var n=(this.resourceService.get(r),this.translator(r));return e.prototype.doSuggest.call(this,r,n.to(t)).then(function(e){return e})},r.prototype._getSuggestContext=function(r){var t=this;return e.prototype._getSuggestContext.call(this,r).then(function(e){return t._withOriginalSyntaxTree(r,function(t){return e.syntaxTree=t.languageService.getSyntaxTree(r.toExternal()),e})})},r.prototype.getParameterHints=function(r,t){return e.prototype.getParameterHints.call(this,r,this.translator(r).to(t))},r.prototype.findOccurrences=function(r,t,n){var o=this;return e.prototype.findOccurrences.call(this,r,this.translator(r).to(t),n).then(function(e){return s.forEach(e,function(e,t){o.translator(r).report.isInserted(e.range)?t():e.range=o.translator(r).from(e.range)}),e})},r.prototype._findTypeScriptDeclaration=function(r,n){var o=this;return e.prototype._findTypeScriptDeclaration.call(this,r,this.translator(r).to(n)).then(function(e){if(e){var r=o.translator(new t.URL(e.resourceUrl));if(!r.report.isInserted(e.range))return e.range=r.from(e.range),e}return null})},r.prototype.findReferences=function(r,n){var o=this;return e.prototype.findReferences.call(this,r,this.translator(r).to(n)).then(function(e){return s.forEach(e,function(e,r){var n=o.translator(new t.URL(e.resourceUrl));n.report.isInserted(e.range)?r():e.range=n.from(e.range)}),e})},r.prototype.computeInfo=function(r,t){var n=this;return e.prototype.computeInfo.call(this,r,this.translator(r).to(t)).then(function(e){return e&&(e.range=n.translator(r).from(e.range)),e})},r.prototype.navigateValueSet=function(r,t,n){var o=this;return e.prototype.navigateValueSet.call(this,r,this.translator(r).to(t),n).then(function(e){return e&&(e.range=o.translator(r).from(e.range)),e})},r.prototype._withOriginalResourceService=function(e){this.resourceService=this._myResourceService.getDelegate();var r=e();return this.resourceService=this._myResourceService,r},r.prototype.computeDiff=function(r,t){var n=this;return this._withOriginalResourceService(function(){return e.prototype.computeDiff.call(n,r,t)})},r.prototype.computeDirtyDiff=function(r){var t=this;return this._withOriginalResourceService(function(){return e.prototype.computeDirtyDiff.call(t,r)})},r}(u.TypeScriptWorker2);r.JavaScriptWorker=S});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/javascript/javascriptWorker.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/javascript/javascriptWorker.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);r.prototype=t.prototype,e.prototype=new r};define("vs/languages/plaintext/plaintext",["require","exports","vs/editor/modes/modesExtensions"],function(e,t,r){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){return e.advanceToEOS(),{type:""}},t}(r.AbstractState),s=function(e){function t(t,r){e.call(this,t,r)}return __extends(t,e),t.prototype.getInitialState=function(){return new n(this)},t}(r.AbstractMode);t.Mode=s});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/plaintext/plaintext.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/plaintext/plaintext.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";define("vs/languages/javascript/jsdoc",["require","exports","vs/editor/modes/modes","vs/base/strings","vs/base/arrays"],function(e,t,n,r,i){function s(e,t,n){var i=e[n];if("*"!==i)return null;if(e.indexOf("*/",n)>-1)return null;for(var s=null,o=0;on)break;s=a}return s?r.startsWith(a.type,"comment.doc")?"/*"!==e.substring(s.startIndex,n)?null:{appendText:"*/"}:null:null}function o(e,t,n){var s,o,a=i.findIndexInSegmentsArray(t,n),l=t[a];return l?r.startsWith(l.type,"comment.doc")?(s=e.indexOf("/**"),o=e.indexOf("*/"),-1===s&&-1===o?{indentAction:0,appendText:"* "}:-1!==s&&n>=s+3&&-1!==o&&o>=n?{indentAction:2,appendText:" * ",indentOutdentAppendText:" "}:-1!==s&&n>=s+3?{indentAction:0,appendText:" * "}:null):null:null}t.onElectricCharacter=s,t.onEnter=o});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/tokenization",["require","exports","vs/base/strings","vs/base/arrays","vs/editor/modes/modes","vs/editor/modes/modesExtensions","vs/languages/vsxml/vsxml","./lib/typescriptServices"],function(e,t,n,r,i,s,o,a){function l(e,t){if(!e)return e;switch(t){case 1:return e+".js";case 0:return e+".ts"}throw new Error("illegal state")}function c(e,t){return new d(e,new o.VSXMLExpression(e,null),new p(t),0)}!function(e){e[e.TypeScript=0]="TypeScript",e[e.EcmaScript5=1]="EcmaScript5"}(t.Language||(t.Language={}));t.Language;!function(e){e[e.Start=0]="Start",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InDocMultiLineCommentTrivia=2]="InDocMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=3]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=4]="InDoubleQuoteStringLiteral"}(t.EndOfLineState||(t.EndOfLineState={}));var u=(t.EndOfLineState,[]);u[11]=!0,u[14]=!0,u[13]=!0,u[12]=!0,u[35]=!0,u[93]=!0,u[94]=!0,u[73]=!0,u[37]=!0,u[24]=!0;var p=function(){function e(e){this._language=e,this._characterWindow=a.ArrayUtilities.createArray(512,0),this._diagnostics=[]}return e.prototype.equals=function(t){return this===t?!0:t instanceof e?this._language===t._language:!1},Object.defineProperty(e.prototype,"language",{get:function(){return this._language},enumerable:!0,configurable:!0}),e.prototype.getClassificationsForLine=function(e,t){var r=0;0!==t&&(4===t?e='"\\\n'+e:3===t?e="'\\\n"+e:1===t?e="/*\n"+e:2===t&&(e="/**\n"+e),r=3);var i=new h;this._scanner=new a.Scanner(n.empty,a.SimpleText.fromString(e),1,this._characterWindow);for(var s=0;this._scanner.absoluteIndex()r;r++){var s=t.syntaxTriviaAt(r);this._addResult(e,n,s.fullWidth(),s.kind(),s)}},e.prototype._addResult=function(e,t,n,r,i){n>0&&(0===t.entries.length&&(n-=e),t.entries.push(this._classify(n,r,i)))},e.prototype._classify=function(e,t,n){var r="",i=0;switch(1===this._language&&t>=60&&69>=t&&(t=11),t){case 28:case 23:case 16:case 42:case 22:case 15:case 18:case 33:case 36:r="keyword.flow";break;case 47:case 57:case 55:r="keyword.visibility";break;case 40:case 44:case 52:case 46:case 27:case 65:case 58:case 49:r="keyword.declare";break;case 61:case 67:case 69:case 60:r="keyword.datatype";break;case 32:r="keyword.null";break;case 6:r=0===n.fullText().indexOf("/**")?"comment.doc":"comment.block";break;case 7:r="comment.line";break;case 14:r="string";break;case 13:r="number";break;case 12:r="regexp";break;case 11:r="identifier";break;case 72:case 73:r="delimiter.parenthesis",i=72===t?1:-1;break;case 70:case 71:r="delimiter.bracket",i=70===t?1:-1;break;case 74:case 75:r="delimiter.array",i=74===t?1:-1;break;default:a.SyntaxFacts.isAnyKeyword(t)?r="keyword":a.SyntaxFacts.isAnyPunctuation(t)&&(r="delimiter")}return{type:l(r,this._language),length:e,bracket:i}},e}();t.Classifier=p;var h=function(){function e(){this.finalLexState=0,this.entries=[]}return e}();t.ClassificationResult=h;var d=function(e){function t(t,n,r,i){e.call(this,t),this._lineTokensIdx=0,this._lineTokens=[],this._vsState=n,this._classifier=r,this._endOfLineState=i}return __extends(t,e),t.prototype.setVSXMLState=function(e){this._vsState=e},t.prototype.makeClone=function(){return new t(this.getMode(),this._vsState.clone(),this._classifier,this._endOfLineState)},t.prototype.equals=function(n){return e.prototype.equals.call(this,n)&&n instanceof t&&this.getMode()===n.getMode()&&this._endOfLineState===n._endOfLineState&&this._classifier.equals(n._classifier)&&this._vsState.equals(n._vsState)},t.prototype.tokenize=function(e){if(this._lineTokensIdx>=this._lineTokens.length){if(e.advanceIfRegExp(/^\s*\/\/\//).length>0)return e.eos()?{type:"comment.vs"}:"/"===e.peek()?(e.advanceToEOS(),{type:l("comment",this._classifier.language)}):{type:"comment.vs",nextState:new o.VSXMLEmbeddedState(this.getMode(),this._vsState,this)};var t=e.advanceToEOS();e.goBack(t.length);var n=this._classifier.getClassificationsForLine(t,this._endOfLineState);this._endOfLineState=n.finalLexState,this._lineTokens=n.entries,this._lineTokensIdx=0}if(this._lineTokensIdx-1?'"'!==e&&"'"!==e:o.type.indexOf("comment")>-1?"'"!==e:!0:!0},t.prototype.onEnterImpl=function(e,t,n){var i=r.onEnter(e,t,n);return i?i:c.onEnter(e,t,n)},t.prototype.onElectricCharacterImpl=function(e,t,n){return r.onElectricCharacter(e,t,n)||c.onElectricCharacter(e,t,n)},t.prototype.getCommentsConfiguration=function(){return{lineCommentTokens:["//"],blockCommentStartToken:"/*",blockCommentEndToken:"*/"}},t.prototype.getTriggerCharacters=function(){return["."]},t.prototype.shouldAutotriggerSuggestImpl=function(e,t,n){if(0===t.length)return!1;var r=i.findIndexInSegmentsArray(t,n-1),s=t[r].type;return s.indexOf("string")>=0||s.indexOf("comment")>=0||s.indexOf("number")>=0?!1:!0},t.prototype.getOutline=function(e){return this._worker(function(t){return t.getOutline(e)})},t.prototype.getSuggestionDetails=function(e,t,n){return this._worker(function(r){return r.getSuggestionDetails(e,t,n)})},t.prototype.getParameterHints=function(e,t){return this._worker(function(n){return n.getParameterHints(e,t)})},t.prototype.getParameterHintsTriggerCharacters=function(){return["(",","]},t.prototype.shouldTriggerParameterHints=function(e,t,n){if(0===t.tokens.length)return!1;var r=i.findIndexInSegmentsArray(t.tokens,n-1),s=t.tokens[r].type;return"string.ts"===s?!1:!0},t.prototype.getEmitOutput=function(e,t){return this._worker(function(n){return n.getEmitOutput(e,t)})},t.prototype.getWordDefinition=function(){return/(-?\d*\.\d\w*)|([\w$]+)/g},t.prototype.canFindReferences=function(e,t){return n.isLineToken(e,t,"identifier.ts")},t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype.findReferences=function(e,t){return this._worker(function(n){return n.findReferences(e,t)})},t.prototype.getNavigateToItems=function(e){return this._worker(function(t){return t.getNavigateToItems(e)})},t.prototype.quickFix=function(e,t){return this._worker(function(n){return n.quickFix(e,t)})},t.prototype.getRangesToPosition=function(e,t){return this._worker(function(n){return n.getRangesToPosition(e,t)})},t.prototype.canFindDeclaration=function(e,t){return n.isLineToken(e,t,"identifier.ts","string.ts","attribute.value.vs")},t.prototype.findDeclaration=function(e,t){return this._worker(function(n){return n.findDeclaration(e,t)})},t.prototype.findTypeDeclaration=function(e,t){return this._worker(function(n){return n.findTypeDeclaration(e,t)})},t.prototype.computeInfo=function(e,t){return this._worker(function(n){return n.computeInfo(e,t)})},t.prototype.getAutoFormatTriggerCharacters=function(){return[";"]},t.prototype.format=function(e,t,n){return this._worker(function(r){return r.format(e,t,n)})},t.prototype.formatAfterKeystroke=function(e,t,n){return this._worker(function(r){return r.formatAfterKeystroke(e,t,n)})},t.$_configureWorkersGlobalSettings=l.AllWorkers(t,t.prototype._configureWorkersGlobalSettings),t.$getOutline=l.OneWorker(t,t.prototype.getOutline),t.$getSuggestionDetails=l.OneWorker(t,t.prototype.getSuggestionDetails),t.$getParameterHints=l.OneWorker(t,t.prototype.getParameterHints),t.$getEmitOutput=l.OneWorker(t,t.prototype.getEmitOutput),t.$findReferences=l.OneWorker(t,t.prototype.findReferences),t.$getNavigateToItems=l.OneWorker(t,t.prototype.getNavigateToItems),t.$quickFix=l.OneWorker(t,t.prototype.quickFix),t.$getRangesToPosition=l.OneWorker(t,t.prototype.getRangesToPosition),t.$findDeclaration=l.OneWorker(t,t.prototype.findDeclaration),t.$findTypeDeclaration=l.OneWorker(t,t.prototype.findTypeDeclaration),t.$computeInfo=l.OneWorker(t,t.prototype.computeInfo),t.$format=l.OneWorker(t,t.prototype.format),t.$formatAfterKeystroke=l.OneWorker(t,t.prototype.formatAfterKeystroke),t}(n.AbstractMode);t.TypeScriptMode=u});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/typescript.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/typescript.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";define("vs/base/time/schedulers",["require","exports"],function(e,t){var n=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){-1!==this.timeoutToken&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.setRunner=function(e){this.runner=e},e.prototype.setTimeout=function(e){this.timeout=e},e.prototype.schedule=function(){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,this.timeout)},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.runner()},e}();t.RunOnceScheduler=n}),define("vs/languages/typescript/lint/rules",["require","exports","vs/languages/typescript/lib/typescriptServices"],function(e,t){!function(e){function t(e){for(var t=[],n=0;ni;i++)if(r===t[i])return!0;return!1}function n(e){var t=e.fullText(),n=e.leadingTriviaWidth(),r=e.trailingTriviaWidth();return 0===n&&0===r?t:t.substr(n,t.length-(n+r))}e.isOfKind=t,e.text=n}(t.syntaxHelper||(t.syntaxHelper={}));t.syntaxHelper}),define("vs/languages/typescript/lint/rules/layout",["require","exports","vs/languages/typescript/lint/rules","vs/languages/typescript/lib/typescriptServices"],function(e,t,n){var r=function(){function e(){this.code="SA1503",this.name="CurlyBracketsMustNotBeOmitted",this.filter=[147,235,161,155,154,158]}return e.prototype.checkElement=function(e,t){var n=e;235===n.kind()&&n.statement&&147===n.statement.kind()||n.statement&&146!==n.statement.kind()&&t.reportError(n.statement,this.name,this.code)},e}();t.CurlyBracketsMustNotBeOmitted=r;var i=function(){function e(){this.code="SA1514",this.name="EmptyBlocksWithoutComment",this.filter=[146]}return e.prototype.checkElement=function(e,t){e.statements.childCount()>0||this._hasComment(e)||t.reportError(e,this.name,this.code)},e.prototype._hasComment=function(e){if(!e)return!1;if(!e.firstToken()||!e.lastToken())return!1;for(var t=e.leadingTrivia().concat(e.trailingTrivia()),r=0,i=t.count();i>r;r++)if(n.syntaxHelper.isOfKind(t.syntaxTriviaAt(r),6,7))return!0;for(var r=0,i=e.childCount();i>r;r++)if(this._hasComment(e.childAt(r)))return!0;return!1},e}();t.EmptyBlocksWithoutComment=i}),define("vs/languages/typescript/lint/rules/typescript",["require","exports","vs/base/strings","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r){var i=function(){function e(){this.code="SA9002",this.name="FunctionsWithoutReturnType",this.filter=[142]}return e.prototype.checkElement=function(e,t){if(!e.typeAnnotation){var n=t.parent(e);if(218!==n.kind()&&219!==n.kind()&&222!==n.kind())if(n instanceof r.MemberFunctionDeclarationSyntax){var i=n;t.reportError(i.propertyName,this.name,this.code)}else if(n instanceof r.FunctionDeclarationSyntax){var s=n;t.reportError(s.identifier,this.name,this.code)}}},e}();t.FunctionsWithoutReturnType=i;var s=function(){function e(){this.code="SA9056",this.name="TripleSlashReferenceAlike",this.filter=[7]}return e.prototype.checkElement=function(e,t){this._couldMeanTripleSlash(e)&&t.reportError(e,this.name,this.code)},e.prototype._couldMeanTripleSlash=function(t){var r=t.fullText();if(e._TripleSlashReference.test(r))return!1;var i=r.split(/[\s=]/);if(!(i.length>5)){for(var s=0,o=0,a=0,l=0,c=i.length;c>l;l++)s=Math.max(s,n.difference("reference",i[l])),o=Math.max(o,n.difference("path",i[l])),a=Math.max(a,(n.startsWith(i[l],'"')||n.startsWith(i[l],"'")?1:0)+(n.endsWith(i[l],'"')||n.endsWith(i[l],"'")?1:0));return(a>0||o>5)&&s>5?!0:!1}},e._TripleSlashReference=/^(\/\/\/\s*s;s++)if(i.childAt(s)instanceof r.VariableDeclaratorSyntax){n=i.childAt(s);var a=t.end(n.propertyName)-1,l=t.languageService().getOccurrencesAtPosition(t.filename(),a);if(l.length<=1){var a=void 0,c=void 0;n.typeAnnotation&&(a=t.start(n.propertyName),c=t.end(n.typeAnnotation)-a),t.reportError(n.propertyName,this.name,this.code,a,c)}}},e}();t.UnusedVariables=a;var l=function(){function e(){this.code="SA9059",this.name="UnusedFunctions",this.filter=[129]}return e.prototype.checkElement=function(e,t){if(!r.SyntaxUtilities.containsToken(e.modifiers,47)&&!r.SyntaxUtilities.containsToken(e.modifiers,63)){var n=e.identifier,i=t.end(n)-1,s=t.languageService().getOccurrencesAtPosition(t.filename(),i);s.length<=1&&t.reportError(n,this.name,this.code)}},e}();t.UnusedFunctions=l;var c=function(){function e(){this.code="SA9060",this.name="UnusedMembers",this.filter=[136,135]}return e.prototype.checkElement=function(e,t){var n;if(e instanceof r.MemberVariableDeclarationSyntax){if(!r.SyntaxUtilities.containsToken(e.modifiers,55))return;n=e.variableDeclarator.propertyName}else if(e instanceof r.MemberFunctionDeclarationSyntax){if(!r.SyntaxUtilities.containsToken(e.modifiers,55))return;n=e.propertyName}if(n){var i=t.end(n)-1,s=t.languageService().getOccurrencesAtPosition(t.filename(),i);s.length<=1&&t.reportError(n,this.name,this.code)}},e}();t.UnusedMembers=c}),define("vs/languages/typescript/lint/rules/javascript",["require","exports","vs/base/strings","vs/base/collections","vs/languages/typescript/lint/rules","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r,i,s){var o=function(){function e(){this.code="SA9005",this.name="ComparisonOperatorsNotStrict",this.filter=[84,86]}return e.prototype.checkElement=function(e,t){t.reportError(e,this.name,this.code)},e}();t.ComparisonOperatorsNotStrict=o;var a=function(){function e(){this.code="SA9050",this.name="MissingSemicolon",this.filter=[78]}return e.prototype.checkElement=function(e,t){e&&0!==e.fullWidth()||t.reportError(t.parent(e),this.name,this.code)},e}();t.MissingSemicolon=a;var l=function(){function e(){this.code="SA9051",this.name="ReservedKeywords"}return e.prototype.checkElement=function(e,t){s.SyntaxFacts.isFutureReservedKeyword(e.kind())&&t.reportError(e,this.name,this.code)},e}();t.ReservedKeywords=l;var c=function(){function e(){this.code="SA9052",this.name="TypeScriptSpecifics"}return e.prototype.checkElement=function(e,t){e.kind()<11||this._isTrulyTypeScriptSpecific(e)&&t.reportError(e,this.name,this.code)},e.prototype._isTrulyTypeScriptSpecific=function(e){if(!this._isTypeScriptSpecificToken(e))return!1;var t=[];do{for(var n=0,r=e.childCount();r>n;n++){var i=e.childAt(n);i&&t.push(i)}if(e=t.shift(),this._isTypeScriptSpecificToken(e))return!1}while(t.length>0);return!0},e.prototype._isTypeScriptSpecificToken=function(e){if(!e)return!1;if("function"==typeof e.isTypeScriptSpecific&&e.isTypeScriptSpecific())return!0;var t=e.kind();return t>=60&&69>=t?!0:s.SyntaxFacts.isFutureReservedKeyword(t)||s.SyntaxFacts.isFutureReservedKeyword(t)?!0:!1},e}();t.TypeScriptSpecifics=c;var u=function(){function e(){this.code="SA9053",this.name="UnknownTypeOfResults"}return e.prototype.checkElement=function(t,o){if(t instanceof s.BinaryExpressionSyntax){var a=t;if(i.syntaxHelper.isOfKind(a.left,171)){var l=!1;if(14===a.right.kind()){var c=i.syntaxHelper.text(a.right);c=n.trim(c,"'"),c=n.trim(c,'"'),l=!r.contains(e._AllowedStrings,c)}else 32===a.right.kind()?l=!0:"undefined"===i.syntaxHelper.text(a.right)&&(l=!0);l&&o.reportError(a,this.name,this.code)}}},e._AllowedStrings={undefined:!0,object:!0,function:!0,boolean:!0,number:!0,string:!0},e}();t.UnknownTypeOfResults=u;var p=function(){function e(){this.code="SA9054",this.name="SemicolonsInsteadOfBlocks",this.filter=[147,235,158,154,155]}return e.prototype.checkElement=function(e,t){e.statement&&"function"==typeof e.statement.kind&&156===e.statement.kind()&&t.reportError(e,this.name,this.code)},e}();t.SemicolonsInsteadOfBlocks=p;var h=function(){function e(){this.code="SA9055",this.name="FunctionsInsideLoops",this.filter=[222,129,219,218]}return e.prototype.checkElement=function(e,t){for(var n=t.parent(e);n;){if(i.syntaxHelper.isOfKind(n,154,155,158,161)){t.reportError(e,this.name,this.code);break}n=t.parent(n)}},e}();t.FunctionsInsideLoops=h;var d=function(){function e(){this.code="SA9062",this.name="NewOnLowercaseFunctions",this.filter=[216]}return e.prototype.checkElement=function(e,t){var n;n=e.expression instanceof s.MemberAccessExpressionSyntax?e.expression.name.fullText():i.syntaxHelper.text(e.expression),n&&!n.charAt(0).match(/[A-Z_]/)&&t.reportError(e.expression,this.name,this.code)},e}();t.NewOnLowercaseFunctions=d});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/lint/lint",["require","exports","vs/nls!vs/languages/typescript/typescriptWorker2","vs/base/severity","vs/base/types","vs/base/collections","vs/languages/typescript/lib/typescriptServices","./rules/layout","./rules/typescript","./rules/javascript"],function(e,t,n,r,i,s,o,a,l,c){function u(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"function"==typeof r&&(t[String(n).toLowerCase()]=r)}}function p(e){var t={},n=[];u(a,t),u(c,t),u(l,t);for(var o in e)if(e.hasOwnProperty(o)){var p=s.lookup(t,String(o).toLowerCase());p&&n.push({rule:i.create(p),severity:r.fromValue(e[o])})}return n}function h(e,t,n){var r=p(e),i=new f(t,r);return i.check(t.getSyntaxTree(n.toExternal()))}var d=function(){function e(e){this._rules={},this._errors=[];for(var t=0,n=e.length;n>t;t++)this._addRule(e[t])}return e.prototype._addRule=function(e){var t=this,n=function(n){s.lookupOrInsert(t._rules,n,[]).push(e)};e.rule.filter?e.rule.filter.forEach(n):n(-1)},e.prototype.check=function(e){return this._lineMap=e.lineMap(),this._syntaxInfo=o.SyntaxInformationMap.create(e.sourceUnit(),!0,!1),this._errors.length=0,this._currentSeverity=r.Severity.Warning,this._visit(e.sourceUnit()),this._errors.slice(0)},e.prototype.reportError=function(e,t,n,r,i){"undefined"==typeof r&&(r=this.start(e)),"undefined"==typeof i&&(i="function"==typeof e.width?e.width():e.fullWidth());var s=this._lineMap.getLineAndCharacterFromPosition(r),o=this._lineMap.getLineAndCharacterFromPosition(r+i);this._errors.push({message:t,code:n,severity:this._currentSeverity,range:{startLineNumber:1+s.line(),startColumn:1+s.character(),endLineNumber:1+o.line(),endColumn:1+o.character()}})},e.prototype.start=function(e){return e===this._currentTrivia?this._currentTriviaPosition:this._syntaxInfo.start(e)},e.prototype.end=function(e){return e===this._currentTrivia?this._currentTriviaPosition+e.fullWidth():this._syntaxInfo.end(e)},e.prototype.parent=function(e){return this._syntaxInfo.parent(e)},e.prototype._visit=function(e){if(e){if(e.isToken()){var t=e.leadingTrivia(),n=t.count();t.concat(e.trailingTrivia()),this._currentTriviaPosition=this.start(e)-e.leadingTriviaWidth();for(var r=0,i=t.count();i>r;r++)this._currentTrivia=t.syntaxTriviaAt(r),this._checkNodeOrToken(this._currentTrivia),r!==n?this._currentTriviaPosition+=this._currentTrivia.fullWidth():this._currentTriviaPosition=this.end(e)-e.trailingTriviaWidth();this._currentTrivia=null,this._currentTriviaPosition=null}this._checkNodeOrToken(e);for(var r=0,i=e.childCount();i>r;r++)this._visit(e.childAt(r))}},e.prototype._checkNodeOrToken=function(e){for(var t=e.kind(),n=s.lookup(this._rules,t,[]).concat(s.lookup(this._rules,-1,[])),r=0,i=n.length;i>r;r++)if(this._currentSeverity=n[r].severity,0!==this._currentSeverity)try{n[r].rule.checkElement(e,this)}catch(o){console.error(o)}},e}();t.SimpleStyleRuleChecker=d;var m=function(e){function t(t,n){e.call(this,n),this._languageService=t}return __extends(t,e),t.prototype.languageService=function(){return this._languageService},t.prototype.filename=function(){return this._filename},t.prototype.check=function(t){return this._filename=t.fileName(),e.prototype.check.call(this,t)},t}(d);t.LanuageServiceStyleRuleChecker=m;var f=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.reportError=function(t,n,r,i,s){return e.prototype.reportError.call(this,t,this._lookupMessage(n,r),r,i,s)},t.prototype._lookupMessage=function(e,t){switch(t){case"SA1503":return n.localize("vs_languages_typescript_lint_lint",0);case"SA1514":return n.localize("vs_languages_typescript_lint_lint",1);case"SA9005":return n.localize("vs_languages_typescript_lint_lint",2);case"SA9050":return n.localize("vs_languages_typescript_lint_lint",3);case"SA9051":return n.localize("vs_languages_typescript_lint_lint",4);case"SA9052":return n.localize("vs_languages_typescript_lint_lint",5);case"SA9053":return n.localize("vs_languages_typescript_lint_lint",6);case"SA9054":return n.localize("vs_languages_typescript_lint_lint",7);case"SA9055":return n.localize("vs_languages_typescript_lint_lint",8);case"SA9062":return n.localize("vs_languages_typescript_lint_lint",9);case"SA9002":return n.localize("vs_languages_typescript_lint_lint",10);case"SA9056":return n.localize("vs_languages_typescript_lint_lint",11);case"SA9057":return n.localize("vs_languages_typescript_lint_lint",12);case"SA9058":return n.localize("vs_languages_typescript_lint_lint",13);case"SA9059":return n.localize("vs_languages_typescript_lint_lint",14);case"SA9060":return n.localize("vs_languages_typescript_lint_lint",15);case"SA9061":return n.localize("vs_languages_typescript_lint_lint",16)}return e},t}(m);t.StyleRuleCheckerWithMessages=f,t.check=h}),define("vs/languages/typescript/service/textEdit",["require","exports","vs/base/strings"],function(e,t,n){function r(e){return new s(e)}var i=function(){function e(e,t,n){this.offset=e,this.length=t,this.text=n||"",this.parent=null,this.children=[]}return e.prototype.isNoop=function(){return 0===this.length&&0===this.text.length},e.prototype.isDelete=function(){return this.length>0&&0===this.text.length},e.prototype.isInsert=function(){return 0===this.length&&this.text.length>0},e.prototype.isReplace=function(){return this.length>0&&this.text.length>0},e.prototype.getRightMostChild=function(){var e=this.children.length;return 0===e?this:this.children[e-1].getRightMostChild()},e.prototype.remove=function(){return this.parent?this.parent.removeChild(this):!1},e.prototype.addChild=function(e){e.parent=this;var t,n;for(t=0,n=this.children.length;n>t&&!(this.children[t].offset>e.offset);t++);this.children.splice(t,0,e)},e.prototype.removeChild=function(e){var t=this.children.indexOf(e);return-1===t?!1:(e.parent=null,this.children.splice(t,1),!0)},e.prototype.insert=function(e){if(this.enclosedBy(e))return e.insert(this),e;var t,n,r;for(t=0,n=this.children.length;n>t;t++)if(r=this.children[t],r.enclosedBy(e))this.removeChild(r),e.insert(r),n--,t--;else if(r.encloses(e))return r.insert(e),this;return this.addChild(e),this},e.prototype.enclosedBy=function(e){return e.encloses(this)},e.prototype.encloses=function(e){if(this.offset===this.offset&&this.length===e.length)return!1;var t=this.length-e.length,n=e.offset-this.offset;return n>=0&&t>=0&&t>=n},e}();t.Edit=i;var s=function(){function e(e){this.model=e,this.modelVersion=e.getVersionId(),this.edit=new i(0,this.model.getValue().length,null)}return e.prototype.replace=function(e,t,n){"undefined"==typeof t&&(t=0),"undefined"==typeof n&&(n=null);var r=new i(e,t,n);r.isNoop()||(this.edit=this.edit.insert(r))},e.prototype.apply=function(){if(this.model.getVersionId()!==this.modelVersion)throw new Error("illegal state - model has been changed");for(var e,t=this.model.getValue();(e=this.edit.getRightMostChild())!==this.edit;)t=n.splice(t,e.offset,e.length,e.text),e.parent.length+=e.text.length-e.length,e.remove();return t},e}();t.create=r});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/resources/remoteModels",["require","exports","vs/editor/core/model/mirrorModel"],function(e,t,n){var r=function(e){function t(n,r,i){e.call(this,[],1,t.normalize(r),i,n)}return __extends(t,e),t.normalize=function(e){return e.length>0&&e.charCodeAt(0)===t._bom&&(e=e.substring(1)),e.replace(/\r\n/g,"\n")},t._bom=65279,t}(n.AbstractMirrorModel);t.RemoteModel=r;var i=function(e){function t(t,n,r){e.call(this,t,n,r)}return __extends(t,e),t}(r);t.DefaultLibModel=i}),define("vs/languages/lib/javascriptSnippets",["require","exports","vs/nls!vs/languages/typescript/typescriptWorker2"],function(e,t,n){t.snippets=[{type:"snippet",label:"define",codeSnippet:["define(["," 'require',"," '{{require}}'","], function(require, {{factory}}) {"," 'use strict';"," {{}}","});"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",0)},{type:"snippet",label:"for",codeSnippet:["for (var {{index}} = 0; {{index}} < {{array}}.length; {{index}}++) {"," var {{element}} = {{array}}[{{index}}];"," {{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",1)},{type:"snippet",label:"foreach",codeSnippet:["{{array}}.forEach(function({{element}}) {"," {{}}","}, this);"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",2)},{type:"snippet",label:"forin",codeSnippet:["for (var {{key}} in {{object}}) {"," if ({{object}}.hasOwnProperty({{key}})) {"," var {{element}} = {{object}}[{{key}}];"," {{}}"," }","}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",3)},{type:"snippet",label:"function",codeSnippet:["function {{name}}({{params}}) {"," {{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",4)},{type:"snippet",label:"if",codeSnippet:["if ({{condition}}) {"," {{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",5)},{type:"snippet",label:"ifelse",codeSnippet:["if ({{condition}}) {"," {{}}","} else {"," ","}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",6)},{type:"snippet",label:"new",codeSnippet:["var {{name}} = new {{type}}({{arguments}});{{}}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",7)},{type:"snippet",label:"switch",codeSnippet:["switch ({{key}}) {"," case {{value}}:"," {{}}"," break;",""," default:"," break;","}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",8)},{type:"snippet",label:"while",codeSnippet:["while ({{condition}}) {"," {{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",9)},{type:"snippet",label:"dowhile",codeSnippet:["do {"," {{}}","} while ({{condition}});"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",10)},{type:"snippet",label:"trycatch",codeSnippet:["try {"," {{}}","} catch ({{error}}) {"," ","}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",11)},{type:"snippet",label:"log",codeSnippet:["console.log({{message}});{{}}"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",12)},{type:"snippet",label:"settimeout",codeSnippet:["setTimeout(function() {"," {{}}","}, {{timeout}});"].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",13)},{type:"snippet",label:"reference",codeSnippet:['/// ',""].join("\n"),documentationLabel:n.localize("vs_languages_lib_javascriptSnippets",14)}]}),define("vs/languages/typescript/service/typescriptSnippets",["require","exports","vs/nls!vs/languages/typescript/typescriptWorker2"],function(e,t,n){t.snippets=[{type:"snippet",label:"foreach =>",codeSnippet:["{{array}}.forEach(({{element}}:{{type}}) => {"," {{}}","});"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_service_typescriptSnippets",0)},{type:"snippet",label:"jsdoc comment",codeSnippet:["/**"," * {{}}"," */"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_service_typescriptSnippets",1)},{type:"snippet",label:"ctor",codeSnippet:["/**"," *"," */","constructor() {"," super();"," {{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_service_typescriptSnippets",2)},{type:"snippet",label:"class",codeSnippet:["/**"," * {{name}}"," */","class {{name}} {"," constructor({{parameters}}) {"," {{}}"," }","}"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_service_typescriptSnippets",3)},{type:"snippet",label:"public method",codeSnippet:["/**"," * {{name}}"," */","public {{name}}() {"," {{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_service_typescriptSnippets",4)},{type:"snippet",label:"private method",codeSnippet:["private {{name}}() {"," {{}}","}"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_service_typescriptSnippets",5)},{type:"snippet",label:"import statement",codeSnippet:["import {{name}} = require('{{}}');"].join("\n"),documentationLabel:n.localize("vs_languages_typescript_service_typescriptSnippets",6)}]});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/service/outline",["require","exports","vs/base/strings","vs/base/arrays","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r,i){function s(e){switch(e){case 1:return"function";case 3:return"variable";case 8:return"enum";case 6:return"module";case 5:return"interface";case 4:return"class";case 2:return"constructor";case 7:return"property";case 0:return"method"}return"property"}function o(e,t){var n={type:null,label:null,range:null,children:[]};return e.accept(new a(n,t)),n.children}!function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Variable=3]="Variable",e[e.Class=4]="Class",e[e.Interface=5]="Interface",e[e.Module=6]="Module",e[e.Property=7]="Property",e[e.Enum=8]="Enum",e[e.Rule=9]="Rule",e[e.File=10]="File"}(t.Type||(t.Type={}));var a=(t.Type,function(e){function t(t,n){e.call(this),this.currentParent=t,this.range=n,this._parentStack=[]}return __extends(t,e),t.prototype.add=function(e,t,n){var r={label:n,type:s(e),range:this.range(this.position()+t.leadingTriviaWidth(),t.width())};return this.currentParent.children?this.currentParent.children.push(r):this.currentParent.children=[r],r},t.prototype.parent=function(e,t,n,r){var i=this.currentParent;this.currentParent=this.add(e,t,n);try{r()}finally{this.currentParent=i}},t.prototype.visitNode=function(t){this._parentStack.push(t),e.prototype.visitNode.call(this,t),this._parentStack.pop()},t.prototype._callSignatureText=function(e){return e.callSignature?e.callSignature.parameterList?e.callSignature.parameterList.fullText():n.empty:n.empty},t.prototype.visitClassDeclaration=function(t){var n=this;this.parent(4,t,t.identifier.valueText(),function(){e.prototype.visitClassDeclaration.call(n,t)})},t.prototype.visitInterfaceDeclaration=function(t){var n=this;this.parent(5,t,t.identifier.valueText(),function(){e.prototype.visitInterfaceDeclaration.call(n,t)})},t.prototype.visitMemberVariableDeclaration=function(t){this.add(7,t,t.variableDeclarator.propertyName.valueText()),e.prototype.skip.call(this,t)},t.prototype.visitGetAccessor=function(t){this.add(7,t,t.propertyName.valueText()),e.prototype.skip.call(this,t)},t.prototype.visitSetAccessor=function(t){this.add(7,t,t.propertyName.valueText()),e.prototype.skip.call(this,t)},t.prototype.visitMemberFunctionDeclaration=function(t){this.add(0,t,n.format("{0}{1}",t.propertyName.valueText(),this._callSignatureText(t))),e.prototype.skip.call(this,t)},t.prototype.visitMethodSignature=function(t){this.add(0,t,n.format("{0}{1}",t.propertyName.valueText(),this._callSignatureText(t))),e.prototype.skip.call(this,t)},t.prototype.visitIndexSignature=function(t){this.add(7,t,t.fullText()),e.prototype.skip.call(this,t)},t.prototype.visitPropertySignature=function(t){this.add(7,t,t.propertyName.valueText()),e.prototype.skip.call(this,t)},t.prototype.visitEnumDeclaration=function(t){var n=this;this.parent(8,t,t.identifier.valueText(),function(){e.prototype.visitEnumDeclaration.call(n,t)})},t.prototype.visitEnumElement=function(t){this.add(7,t,t.propertyName.valueText()),e.prototype.skip.call(this,t)},t.prototype.visitModuleDeclaration=function(t){var n;t.stringLiteral?n=t.stringLiteral.valueText():t.name&&(n=t.name.fullText()),n&&this.add(6,t,n),e.prototype.visitModuleDeclaration.call(this,t)},t.prototype.visitFunctionExpression=function(n){if(n.identifier&&this.add(1,n,n.identifier.valueText()),r.tail(this._parentStack,1)instanceof i.ArgumentListSyntax&&r.tail(this._parentStack,2)instanceof i.InvocationExpressionSyntax){var s=r.tail(this._parentStack,2),o=s.expression;if(11===o.kind()&&o.valueText()===t._define)return e.prototype.visitFunctionExpression.call(this,n)}e.prototype.skip.call(this,n)},t.prototype.visitFunctionDeclaration=function(t){this.add(1,t,n.format("{0}{1}",t.identifier.valueText(),this._callSignatureText(t))),e.prototype.skip.call(this,t)},t.prototype.visitVariableDeclarator=function(t){this.add(3,t,t.propertyName.valueText()),e.prototype.skip.call(this,t)},t.prototype.visitBinaryExpression=function(t){107===t.operatorToken.kind()&&222===t.right.kind()&&212===t.left.kind()&&this.add(7,t.left,t.left.name.valueText()),e.prototype.skip.call(this,t)},t._define="define",t}(i.PositionTrackingWalker));t.forSourceUnit=o});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/service/wordSuggestions",["require","exports","vs/languages/typescript/lib/typescriptServices","vs/base/collections"],function(e,t,n,r){function i(e,t,n){var i={};return e.accept(new s(i,t,n)),r.keys(i)}var s=function(e){function t(t,n,r){e.call(this),this._target=t,this._comments=n,this._identifiers=r}return __extends(t,e),t.prototype.visitToken=function(e){if(this._comments)for(var t=e.leadingTrivia().concat(e.trailingTrivia()),n=0,r=t.count();r>n;n++){var i=t.syntaxTriviaAt(n);i.isComment()&&this.wordenize(this._target,i.fullText())}else this._identifiers&&11===e.kind()&&(this._target[e.valueText()]=!0)},t.prototype.wordenize=function(e,t){for(var n,r=/(-?\d*\.\d\w*)|(\w+)/g;n=r.exec(t);)e[t.substr(n.index,n[0].length)]=!0},t}(n.SyntaxWalker);return i}),define("vs/languages/typescript/service/languageFacts",["require","exports","vs/languages/typescript/lib/typescriptServices"],function(e,t){function n(e,t,n){return e>t&&n>e}function r(e,t){var r=t.findToken(e,!0);if(er.end())for(var i=r.token().leadingTrivia().concat(r.token().trailingTrivia()),s=r.token().leadingTrivia().count(),o=r.fullStart(),a=0,l=i.count();l>a;a++){var c=i.syntaxTriviaAt(a);if(c.isComment()&&n(e,o,o+c.fullWidth()))return!0;o=s===a?r.start()+r.token().width():o+c.fullWidth()}return!1}t.isAtComment=r}),define("vs/languages/typescript/service/languageServiceAdapter",["require","exports","vs/base/collections","vs/languages/typescript/lint/lint","vs/base/strings","vs/base/severity","vs/base/filters","vs/editor/core/model/mirrorModel","vs/languages/typescript/service/textEdit","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/resources/remoteModels","vs/languages/lib/javascriptSnippets","vs/languages/typescript/service/typescriptSnippets","./outline","vs/languages/typescript/service/wordSuggestions","vs/languages/typescript/service/languageFacts"],function(e,t,n,r,i,s,o,a,l,c,u,p,h,d,m,f){var g=function(){function e(e,t,n,r){this._compilationSettings=e,this._suggestSettings=t,this._host=n,this._languageService=r,this._applyTypeScriptCompilationSettings()}return e.prototype._applyTypeScriptCompilationSettings=function(){var e=this._host.getCompilationSettings();e.useCaseSensitiveFileResolution=!1,e.noImplicitAny=this._compilationSettings.noImplicitAny,e.codeGenTarget=i.equalsIgnoreCase("ES3",this._compilationSettings.target)?0:1,e.moduleGenTarget=i.equalsIgnoreCase("commonjs",this._compilationSettings.module)?1:i.equalsIgnoreCase("amd",this._compilationSettings.module)?2:0},Object.defineProperty(e.prototype,"compilationSettings",{get:function(){return this._compilationSettings},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageService",{get:function(){return this._languageService},enumerable:!0,configurable:!0}),e.prototype.getExtraDiagnostics=function(e){if(!this._compilationSettings.semanticValidation)return[];var t=r.check(this._compilationSettings.lint,this._languageService,e);return t.map(function(e){return{code:0,type:"",severity:e.severity,range:e.range,text:e.message}})},e.prototype.getSyntacticDiagnostics=function(e){if(!this._compilationSettings.syntaxValidation)return[];var t=this._languageService.getSyntacticDiagnostics(e.toExternal());return this._toMarkers(e,t)},e.prototype.getSemanticDiagnostics=function(e){if(!this._compilationSettings.semanticValidation)return[];var t=this._languageService.getSemanticDiagnostics(e.toExternal());return this._toMarkers(e,t)},e.prototype._toMarkers=function(e,t){for(var n=[],r=0;rs.end())return null;var o=this._languageService.getDefinitionAtPosition(r,i);if(!o||0===o.length)return null;var a=o[0];if(!a.fileName)return null;var l=this._host.getScriptSnapshot(a.fileName).model;if(this.isBaseLibModel(l))return null;var c={resourceUrl:l.getAssociatedResource().toExternal(),range:this.rangeFromMinAndLim(a,l.getAssociatedResource(),!0),preview:this.preview(l,a.minChar,a.limChar)};return c},e.prototype.findTypeDeclaration=function(){return null},e.prototype.isExternallyVisibleSymbole=function(e,t){var n=this._host.getScriptSnapshotByUrl(e).model,r=n.getOffsetFromPosition(t),i=n.getAssociatedResource().toExternal(),s=this._languageService.getTypeAtPosition(i,r);if(!s)return!0;switch(s.kind){case c.Services.ScriptElementKind.localVariableElement:case c.Services.ScriptElementKind.localFunctionElement:case c.Services.ScriptElementKind.parameterElement:return!1}return!0},e.prototype.findReferences=function(e,t){var n=this,r=this._host.getScriptSnapshotByUrl(e).model,i=r.getOffsetFromPosition(t),s=r.getAssociatedResource().toExternal(),o=this._languageService.getReferencesAtPosition(s,i),a=o.filter(function(e){return!n.isBaseLibModel(n._host.getScriptSnapshot(e.fileName).model)}).map(function(e){var t=n._host.getScriptSnapshot(e.fileName).model,r={resourceUrl:t.getAssociatedResource().toExternal(),range:n.rangeFromMinAndLim(e,t.getAssociatedResource()),preview:n.preview(t,e.minChar,e.limChar)};return r});return a},e.prototype.getTypeInformationAtPosition=function(e,t){var n=this._host.getScriptSnapshotByUrl(e).model,r=n.getOffsetFromPosition(t),i=n.getAssociatedResource().toExternal(),s=this._languageService.getTypeAtPosition(i,r);if(!s)return null;var o=[{className:"type",text:s.memberName.toString()},{className:"documentation",text:s.docComment}],a={value:"",htmlContent:o,className:"typeInfo ts",range:this.rangeFromMinAndLim(s,e)};return a},e.prototype.getRangesToPosition=function(e,t){for(var n=this._host.getScriptSnapshotByUrl(e).model,r=n.getOffsetFromPosition(t),i=n.getAssociatedResource().toExternal(),s=this._languageService.getSyntaxTree(i),o=s.sourceUnit().findToken(r),a=[];null!==o;)a.unshift({type:"node",range:this.rangeFromMinAndLim({minChar:o.start(),limChar:o.end()},e)}),o=o.parent();return a},e.prototype.suggest=function(e,t){var r=this._host.getScriptSnapshotByUrl(e).model,i=e.toExternal(),s=r.getOffsetFromPosition(t),o=r.getWordUntilPosition(t),a=this._languageService.getSyntaxTree(i);if(f.isAtComment(s,a.sourceUnit())){var l={currentWord:o,suggestions:[]};return m(a.sourceUnit(),!0,!0).every(function(e){return l.suggestions.push({label:e,codeSnippet:e,type:"text"}),!0}),l}var c=s-o.length,u="."===r.getValue().charAt(c-1),d=this._languageService.getCompletionsAtPosition(i,c,u),g=new n.DelegateHashSet(function(e){return e.type+e.label+e.codeSnippet});if(d){u=d.isMemberCompletion;for(var v=0,y=d.entries.length;y>v;v++){var b=d.entries[v];g.add({label:b.name,codeSnippet:b.name,type:this.monacoTypeFromEntryKind(b.kind)})}}var _=!u,w=this._suggestSettings.alwaysAllWords||!d||0===d.entries.length;if(_){for(var v=0,y=p.snippets.length;y>v;v++)g.add(p.snippets[v]);for(var v=0,y=h.snippets.length;y>v;v++)g.add(h.snippets[v])}return w&&m(a.sourceUnit(),!1,!0).every(function(e){return g.add({label:e,codeSnippet:e,type:"text"}),!0}),{currentWord:o,suggestions:g.toArray()}},e.prototype.monacoTypeFromEntryKind=function(e){switch(e){case c.Services.ScriptElementKind.primitiveType:case c.Services.ScriptElementKind.keyword:return"keyword";case c.Services.ScriptElementKind.variableElement:case c.Services.ScriptElementKind.localVariableElement:case c.Services.ScriptElementKind.memberVariableElement:case c.Services.ScriptElementKind.memberGetAccessorElement:case c.Services.ScriptElementKind.memberSetAccessorElement:return"field";case c.Services.ScriptElementKind.functionElement:case c.Services.ScriptElementKind.memberFunctionElement:case c.Services.ScriptElementKind.constructSignatureElement:case c.Services.ScriptElementKind.callSignatureElement:return"function"}return e},e.prototype.getSuggestionDetails=function(e,t,n){var r=this._host.getScriptSnapshotByUrl(e).model,i=e.toExternal(),s=r.getOffsetFromPosition(t),o=this._languageService.getCompletionEntryDetails(i,s,n.label);if(!o)return n;if(n.documentationLabel=o.docComment,n.typeLabel=o.type,n.codeSnippet=o.name,this._suggestSettings.useCodeSnippetsOnMethodSuggest&&"function"===this.monacoTypeFromEntryKind(o.kind)){var a=this.parseMethodSignature(o.type),l=a.arguments.map(function(e){return"{{"+e.name.trim()+"}}"}),c=o.name;c+=l.length>0?"("+l.join(", ")+"){{}}":"()",n.codeSnippet=c}return n},e.prototype.quickFix=function(e,t){var n=this._host.getScriptSnapshotByUrl(e).model,r=n.getAssociatedResource().toExternal(),s=n.getOffsetFromPosition(t),o=n.getWordUntilPosition(t),a=s-o.length,l="."===n.getValue().charAt(a-1),c=this._languageService.getCompletionsAtPosition(r,a,l),u=[];return c.entries.forEach(function(e){var t=i.difference(o,e.name);tt;t++)if(r=e.charAt(t),")"===r&&l--,"("===r&&l++,1!==l||":"!==r)if(1!==l||","!==r){if(0===l&&")"===r){""!==s&&i.push({name:s,type:o});break}a?s+=r:o+=r}else i.push({name:s,type:o}),s="",o="",a=!0;else a=!1;return{arguments:i,flatArguments:e.substr(0,t+1),flatReturnType:e.substr(t+5)}},e.transformParameter=function(e){return{label:e.name,documentation:e.docComment,signatureLabelOffset:e.minChar,signatureLabelEnd:e.limChar}},e.transformSignature=function(t){return{label:t.signatureInfo,documentation:t.docComment,parameters:t.parameters.map(function(t){return e.transformParameter(t)})}},e.prototype.getParameterHints=function(t,n){var r=this._host.getScriptSnapshotByUrl(t).model,i=r.getOffsetFromPosition(n),s=r.getAssociatedResource().toExternal(),o=this._languageService.getSignatureAtPosition(s,i);if(!o)return null;var a={currentSignature:Math.max(0,o.activeFormal),currentParameter:Math.max(0,o.actual.currentParameter),signatures:o.formal.map(function(t){return e.transformSignature(t)})};return a},e.prototype.getEmitOutput=function(e,t){var n=this._languageService.getEmitOutput(e.toExternal()),r=n.outputFiles;if(!r)return null;for(var s=0,o=r.length;o>s;s++)if(i.endsWith(r[s].name,t))return r[s].text;return null},e.prototype.isBaseLibModel=function(e){return e instanceof u.DefaultLibModel},e.prototype.rangeFromMinAndLim=function(e,t,n){"undefined"==typeof n&&(n=!1);var r=this._host.getScriptSnapshotByUrl(t).model,i=e.minChar,s=Math.max(1,e.limChar-e.minChar);if(n){var o=r.getPositionFromOffset(i);return{startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:o.lineNumber,endColumn:o.column}}return r.getRangeFromOffsetAndLength(i,s)},e.prototype.preview=function(e,t,n,r){"undefined"==typeof r&&(r=200);for(var i,s=this._languageService.getSyntaxTree(e.getAssociatedResource().toExternal()),o=s.sourceUnit().findToken(t);o&&!i;)o.fullWidth()>r&&(i=o),o=o.parent();i||(i=s.sourceUnit().findToken(t).root());var l=e.getValue().substring(i.fullStart(),i.fullEnd()),c=new a.MirrorModel(0,l,"mock.mode.id"),u=t-i.fullStart(),p=n-t,h=c.getRangeFromOffsetAndLength(u,p);return c.dispose(),{text:l,range:h}},e.FILTER=o.or(o.matchesPrefix,o.matchesContiguousSubString,o.matchesCamelCase),e}();t.LanguageServiceAdapter=g});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/service/languageServiceHost2",["require","exports","vs/base/collections","vs/base/lifecycle","vs/base/errors","vs/platform/services","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/resources/remoteModels"],function(e,t,n,r,i,s,o,a){var l=function(){function e(){this.logger=console.warn}return e.prototype.information=function(){return this.logger=console.log,!0},e.prototype.debug=function(){return this.logger=console.log,!0},e.prototype.warning=function(){return this.logger=console.warn,!0},e.prototype.error=function(){return this.logger=console.error,!0},e.prototype.fatal=function(){return this.logger=console.error,!0},e.prototype.log=function(){},e}();t.ConsoleLogger=l;var c=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.getDiagnosticsObject=function(){return this},t.prototype.getLocalizedDiagnosticMessages=function(){return null},t.prototype.getScriptSnapshot=function(){throw i.notImplemented()},t.prototype.resolveRelativePath=function(){throw i.notImplemented()},t.prototype.fileExists=function(){throw i.notImplemented()},t.prototype.directoryExists=function(){throw i.notImplemented()},t.prototype.getParentDirectory=function(){throw i.notImplemented()},t}(l);t.AbstractLanguageServiceHost=c;var u=function(){function e(e){this._model=e,this._versionId=e.getVersionId(),this._open=!(e instanceof a.RemoteModel),this._value=e.getValue(),this._length=this._value.length}return Object.defineProperty(e.prototype,"model",{get:function(){return this._model},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"versionId",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"open",{get:function(){return this._open},enumerable:!0,configurable:!0}),e.prototype.getText=function(e,t){return this._value.substring(e,t)},e.prototype.getLength=function(){return this._length},e.prototype.getLineStartPositions=function(){if(!this._lineStarts){this._lineStarts=[];for(var e=0,t=this._model.getLineCount();t>e;e++)this._lineStarts.push(this._model.getLineStart(e+1))}return this._lineStarts},e.prototype.getTextChangeRangeSinceVersion=function(){return null},e}();t.MirrorModelSnapshot=u;var p=function(e){function t(t){var n=this;e.call(this),this._resourceService=t,this._compilationSettings=new o.CompilationSettings,this._resourceSet={},this._callOnDispose=[],this._callOnDispose.push(this._resourceService.addListener2(s.ResourceEvents.REMOVED,function(e){delete n._resourceSet[e.url.toExternal()]}))}return __extends(t,e),t.prototype.dispose=function(){r.disposeAll(this._callOnDispose)},t.prototype.updateResources=function(e){var t=this;e.every(function(e){return t._updateResource(e),!0})},t.prototype._updateResource=function(e){var t=e.toExternal(),r=this._resourceService.get(e);if(r){var i=r.getVersionId();n.contains(this._resourceSet,t)&&n.lookup(this._resourceSet,t).versionId===i||(this._resourceSet[t]=new u(r))}else console.warn(e.toExternal()+" NOT found"),delete this._resourceService[t]},t.prototype.isScriptFileName=function(e){return n.contains(this._resourceSet,e)},t.prototype.getCompilationSettings=function(){return this._compilationSettings},t.prototype.getScriptFileNames=function(){return Object.keys(this._resourceSet)},t.prototype.getScriptByteOrderMark=function(){return 1},t.prototype.getScriptVersion=function(e){return n.lookup(this._resourceSet,e).versionId},t.prototype.getScriptIsOpen=function(e){return n.lookup(this._resourceSet,e).open},t.prototype.getScriptSnapshot=function(e){return n.lookup(this._resourceSet,e)},t.prototype.getScriptSnapshotByUrl=function(e){return n.lookup(this._resourceSet,e.toExternal())},t}(c);t.LanguageServiceHost=p}),define("vs/base/paths",["require","exports"],function(e,t){function n(e,n){e=t.normalize(e),n=t.normalize(n);for(var r=e.split(t.sep),i=n.split(t.sep);r.length>0&&i.length>0&&r[0]===i[0];)r.shift(),i.shift();for(var s=0,o=r.length;o>s;s++)i.unshift("..");return i.join(t.sep)}function r(e){for(var n=e.split(/[\\\/]/),r=0,i=n.length;i>r;r++)"."===n[r]&&n[r+1]&&(n.splice(r,1),r--);return n.join(t.sep)}function i(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t||0===~t?".":e.substring(0,~t)}function s(e){var n=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===n?e:~n===e.length-1?t.basename(e.substring(0,e.length-1)):e.substr(~n+1)}function o(e){var t=~e.lastIndexOf(".");return t?e.substring(~t):""}function a(){for(var e=[],t=0;tr;r++)this.store.hasOwnProperty(t[r])&&(i=this.store[t[r]],delete s.outgoing[i.name],delete i.incoming[e])}},e.prototype.removeNode=function(e){var t=this;return this.store.hasOwnProperty(e)?(delete this.store[e],Object.keys(this.store).forEach(function(n){var r=t.store[n];delete r.incoming[e],delete r.outgoing[e]}),!0):!1},e.prototype.nodes=function(){var e=this;return Object.keys(this.store).map(function(t){return e.store[t]})},e.prototype.node=function(e){return this.store.hasOwnProperty(e)?this.store[e]:null},e.prototype.traverse=function(e,t,n){"undefined"==typeof n&&(n={});var r=this;if(this.store.hasOwnProperty(e)&&n[e]!==!0){n[e]=!0;var i=this.store[e];t(i),Object.keys(i.outgoing).forEach(function(e){r.traverse(e,t,n)})}},e.prototype.toJSON=function(){for(var e=Object.keys(this.store),t={},n={},r=[],i=0;io;o++)for(n=t.i[t.g[o]],r=t.g[++o];r>0;)i.insertEdge(n,t.i[t.g[++o]]),r-=1;return i},e}();t.Graph=p,t.buildDependencyGraph=a,t.fillGraph=l;var h=function(){function e(e,t,n){this.offset=e,this.length=t,this.path=n}return e}();t.Reference=h;var d=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.REGEXP=/^(\/\/\/\s*r;r++){var s=t.syntaxTriviaAt(r);this.add(s.kind(),this.offset,s.fullWidth(),s.fullText()),this.offset+=s.fullWidth()}this.add(e.kind(),this.offset,e.width(),e.valueText()),this.offset+=e.width();for(var r=0,i=n.count();i>r;r++){var s=n.syntaxTriviaAt(r);this.add(s.kind(),this.offset,s.fullWidth(),s.fullText()),this.offset+=s.fullWidth()}}return this.nextTokens.shift()},e.prototype.add=function(e,t,n,r){switch(e){case 4:case 5:return}this.nextTokens.push({kind:e,offset:t,length:n,text:r})},e}(),y=function(){function e(){this.references=[]}return e.prototype.consume=function(e){function t(e){"undefined"==typeof e&&(e=!0),r=n;do n=s.next();while(!e&&(7===n.kind||6===n.kind));return n}for(var n,r,i=this.references.length,s=new v(e);10!==t().kind;){var o=!1;if(7===n.kind){var a=n.text,l=n.offset,c=n.length,u=d.REGEXP.exec(a);u&&this.references.push(new d(l+u[1].length+u[2].length,u[3].length,u[3]))}else 49===n.kind&&(t(),11===n.kind&&(t(),107===n.kind&&(t(),o=!0)));if((o||!r||76!==r.kind)&&66===n.kind&&(t(),72===n.kind&&(t(),14===n.kind))){var p=n.text,l=n.offset,c=n.length;t(),73===n.kind&&(o?this.references.push(new m(l+1,-2+c,p)):this.references.push(new f(l+1,-2+c,p)))}if(11===n.kind&&"define"===n.text&&(t(),72===n.kind&&(t(!1),14===n.kind&&(t(!1),79===n.kind&&t(!1)),74===n.kind)))for(t(!1);14===n.kind;)"exports"!==n.text&&"require"!==n.text&&"module"!==n.text&&this.references.push(new f(n.offset+1,-2+n.length,n.text)),t(!1),79===n.kind&&t(!1)}return this.references.slice(i)},e}();t.ScannerBasedCollector=y,t.collect=c}),define("vs/languages/typescript/resources/dependencyResolver",["require","exports","vs/base/lib/winjs.base","vs/base/lifecycle","vs/base/hash","vs/base/collections","vs/platform/services","vs/editor/core/model/mirrorModel","vs/languages/typescript/service/references"],function(e,t,n,r,i,s,o,a,l){!function(e){e.OnReferencesChanged="onReferencesChanged"}(t.Events||(t.Events={}));var c=t.Events,u=function(){function e(){}return e.prototype.fetchDependencies=function(){return e._Empty},e.prototype.dispose=function(){},e._Empty=n.TPromise.as(s.EmptyIterable),e}();t.NullDependencyResolver=u;var p=function(){function e(e){this._delegates=e}return e.prototype.fetchDependencies=function(e){var t=this._delegates.map(function(t){return t.fetchDependencies(e)});return n.Promise.join(t).then(function(e){return s.combine(e)})},e.prototype.dispose=function(){r.disposeAll(this._delegates)},e}();t.CompositeDependencyResolver=p;var h=function(){function e(e){this._requestService=e.requestService,this._resourceService=e.resourceService}return e.prototype.dispose=function(){},e.prototype.fetchDependencies=function(t){return t&&this._requestService.getPath("root",t)?this._resourceService.get(t)instanceof a.MirrorModel?this._doFetchDependencies(t,this._resourceService.get(t)):e._Empty:e._Empty},e.prototype._doFetchDependencies=function(){return e._Empty},e._Empty=n.TPromise.as(s.EmptyIterable),e}();t.AbstractDependencyResolver=h;var d=function(){function e(e,t,n){var r=this;this._delegate=e,this._eventbus=t,this._resourceService=n,this._cache=new s.Dictionary,this._callOnDispose=new Array,this._callOnDispose.push(this._resourceService.addListener2(o.ResourceEvents.REMOVED,function(e){return r._cache.remove(e.url)}))}return e.prototype.dispose=function(){r.disposeAll(this._callOnDispose),this._cache.every(function(e){return e.value.listener.dispose(),!0}),this._cache.clear()},e.prototype.fetchDependencies=function(e){var t=this;if(!this._cache.containsKey(e)){var n=this._resourceService.get(e);this._cache.add(e,{stateId:this._computeState(n),request:this._delegate.fetchDependencies(e),listener:n.addListener2("changed",function(){return t._validateCache(n)})})}return this._cache.lookup(e).request},e.prototype._validateCache=function(e){var t=this,n=this._cache.lookup(e.getAssociatedResource());clearTimeout(n.scheduledUpdate),n.scheduledUpdate=setTimeout(function(){n.stateId!==t._computeState(e)&&(n.listener.dispose(),t._cache.remove(e.getAssociatedResource()),t._eventbus.emit(c.OnReferencesChanged,{resource:e.getAssociatedResource()}))},1500)},e.prototype._computeState=function(e){for(var t=l.collect(e.getValue()),n=11,r=0,s=t.length;s>r;r++)n=i.combine(i.computeMurmur2StringHashCode(t[r].path)+59*t[r].offset+61*t[r].length,n);return n},e}();t.CachingDependencyResolver=d});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/resources/dependencyResolverFiles",["require","exports","vs/base/lib/winjs.base","vs/base/network","vs/base/severity","vs/base/collections","vs/base/paths","./remoteModels","../service/references","./dependencyResolver","vs/platform/markers/markers"],function(e,t,n,r,i,s,o,a,l,c,u){function p(e,t){var n={resources:new Array,errors:{}};return e.traverse(t.toExternal(),function(t){var o=t.getName(),a=0===o.indexOf("error:");if(a){e.removeNode(o);var l=JSON.parse(o.substr(6));if(1===l.referenceType){var c=s.lookupOrInsert(n.errors,l.path,[]);c.push(u.createTextMarker(i.Severity.Error,1,l.message,l.offset,l.length))}}else n.resources.push(r.URL.fromValue(o))}),n}var h=function(){function e(e,t,n){this._resourceService=e,this._requestService=t,this._typescriptModeId=n}return e.prototype.load=function(e,t){var i=this;if(!(t instanceof l.TripleSlashReference))return n.Promise.wrapError("only triple slash references are supported");var s=new r.URL(o.join(o.dirname(e),o.normalize(t.path))),c=this._requestService.getPath("root",s),u=new r.URL(this._requestService.getRequestUrl("root",c,!0));if(this._resourceService.contains(u)){var p=this._resourceService.get(u);return n.Promise.as(new l.File(u.toExternal(),p.getValue()))}return this._requestService.makeRequest({url:u.toExternal()}).then(function(e){var t=new l.File(u.toExternal(),e.responseText),n=new a.RemoteModel(u,e.responseText,i._typescriptModeId);return i._resourceService.contains(u)||i._resourceService.insert(u,n),t})},e.prototype.dispose=function(){},e}(),d=function(e){function n(t,n){e.call(this,t),this._markerService=t.workerMarkerService,this._loader=new h(this._resourceService,this._requestService,n)}return __extends(n,e),n.prototype.dispose=function(){this._loader.dispose()},n.prototype._doFetchDependencies=function(e){var r=this,i=this._resourceService.get(e),o=new l.File(i.getAssociatedResource().toExternal(),i.getValue()),a=this._requestService.getPath("root",i.getAssociatedResource());return l.buildDependencyGraph(this._loader,[o],n._Options).then(function(n){var i=t.collectDependenciesAndErrors(n,e);return r._markerService.createPublisher().changeMarkers(e,function(e){s.lookup(i.errors,a,[]).forEach(function(t){return e.addMarker(t)})}),i.resources})},n._Options={nodeName:function(e){return e}},n}(c.AbstractDependencyResolver);t.FileBasedResolver=d,t.collectDependenciesAndErrors=p;var m=function(){function t(e,t,n,r,i){this._baselibs=e,this._resourceService=t,this._requestService=n,this._delegate=r,this._typescriptModeId=i}return t.prototype.dispose=function(){this._delegate.dispose()},t.prototype.fetchDependencies=function(){var e=this,t=new Array,r=[t];return n.TPromise.join(this._baselibs.map(function(n){return e._resolveBaseLibrary(n).then(function(n){return n&&t.push(n),e._delegate.fetchDependencies(n)}).then(function(e){r.push(e)})})).then(function(){return s.combine(r)})},t.prototype._resolveBaseLibrary=function(r){var i=this;return this._resourceService.contains(r)?n.TPromise.as(r):0===r.toExternal().indexOf(t.MODULE_PREFIX)?new n.TPromise(function(t,n){e([r.toExternal()],function(e){i._onResource(r,e),t(r)},n)}):this._requestService.makeRequest({url:r.toExternal()}).then(function(e){return i._onResource(r,e.responseText),r},function(){return console.warn("TS - "+r.toExternal()+" can not be loaded as base lib"),null})},t.prototype._onResource=function(e,t){var n=new a.DefaultLibModel(e,t,this._typescriptModeId);this._resourceService.insert(e,n)},t.MODULE_PREFIX="vs/text!",t}();t.BaselibDependencyResolver=m});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/resources/dependencyResolverGraph",["require","exports","vs/base/lib/winjs.base","vs/base/strings","vs/base/env","vs/base/collections","vs/base/network","./remoteModels","../service/references","./dependencyResolverFiles","./dependencyResolver"],function(e,t,n,r,i,s,o,a,l,c,u){var p;!function(e){function t(e){for(var t,n,r=0,i={};;){if(t=e.indexOf(":",r),n=e.indexOf("\n",t+1),0>t||0>n)break;i[e.substring(r,t).trim()]=e.substring(t+1,n).trim(),r=n+1}return i}function r(e,r){function s(e){if(p)return a("canceled"),void 0;var n=e.indexOf("\r\n\r\n",c);if(-1!==n){var r=t(e.substring(c,n)),i=Number(r["Content-Length"]);n+4+i>e.length||(u.push({header:r,body:e.substr(n+4,i)}),l(u[u.length-1]),c=n+4+i,s(e))}}var o,a,l,c=0,u=[],p=!1,h=new n.Promise(function(e,t,n){o=e,a=t,l=n},function(){p=!0});return e.makeRequest(r).then(function(e){s(e.responseText),o(u)},function(e){a(e)},function(e){i.browser.isIE10orEarlier||3===e.readyState&&s(e.responseText)}).done(null,function(e){a(e)}),h}e.parseHeader=t,e.fetchChunkedData=r}(p||(p={}));var h=function(e){function t(t,n,i,s){e.call(this,t),this._moduleType=n,this._basePath=i,this._typescriptModuleId=s,this._markerService=t.workerMarkerService,this._moduleType=this._moduleType||r.empty,this._basePath=this._basePath||r.empty}return __extends(t,e),t.prototype._doFetchDependencies=function(e){var t,r=this,i=this._requestUrl(e,"typeScriptDependencyGraph");return this._requestService.makeRequest({url:i}).then(function(t){var n=r._parseGraph(JSON.parse(t.responseText)),i=c.collectDependenciesAndErrors(n,e),o=r._requestService.getPath("root",e);return r._markerService.createPublisher().changeMarkers(e,function(e){s.lookup(i.errors,o,[]).forEach(function(t){return e.addMarker(t)})}),i.resources}).then(function(e){t=e;for(var i=[],s=0;s=7005&&7015>=n?r.Severity.Warning:r.Severity.Error},t.defaultLintSettings={emptyBlocksWithoutComment:"ignore",curlyBracketsMustNotBeOmitted:"ignore",comparisonOperatorsNotStrict:"ignore",missingSemicolon:"ignore",unknownTypeOfResults:"warning",semicolonsInsteadOfBlocks:"ignore",functionsInsideLoops:"ignore",functionsWithoutReturnType:"warning",tripleSlashReferenceAlike:"warning",unusedImports:"ignore",unusedVariables:"ignore",unusedFunctions:"ignore",unusedMembers:"ignore"},t.defaultValidationSettings={target:"ES5",baseUrl:"",module:"",lint:t.defaultLintSettings},t._internalDefaultValidationSettings={scope:"/",baseUrl:"",noImplicitAny:!1,noLib:!1,extraLibs:["vs/text!vs/languages/typescript/lib/lib.d.ts"],semanticValidation:!0,syntaxValidation:!0,target:"ES5",module:"",lint:t.defaultLintSettings,diagnosticClassifier:t.impilictAnyClassifier},t.defaultSuggestSettions={alwaysAllWords:!1,useCodeSnippetsOnMethodSuggest:!1};var a=function(){function e(e,t,r){if(this._raw=e,this._raw){if(this._raw.validationSettings){Array.isArray(this._raw.validationSettings)||(this._raw.validationSettings=[this._raw.validationSettings]);var s=this._raw.validationSettings;if(0===s.length)this._raw.validationSettings=[t];else{for(var o=!1,a=t,l=0,c=s.length;c>l;l++){var u=this._raw.validationSettings[l];u.module=u.module||u.moduleGenTarget||a.module,u.target=u.target||u.codeGenTarget||a.target,u=n.withDefaults(u,a),u.scope=i.normalize(u.scope),o=o||u.scope===i.sep,i.isAbsolute(u.scope)||(u.scope=i.sep+u.scope),u.baseUrl=i.normalize(u.baseUrl),i.isAbsolute(u.baseUrl)||(u.baseUrl=i.sep+u.baseUrl),-1===u.extraLibs.indexOf("vs/text!vs/languages/typescript/lib/lib.d.ts")&&u.extraLibs.unshift("vs/text!vs/languages/typescript/lib/lib.d.ts"),this._raw.validationSettings[l]=u,a=u}o||this._raw.validationSettings.unshift(t)}}else this._raw.validationSettings=[t];this._raw.suggestSettings=this._raw.suggestSettings?n.withDefaults(this._raw.suggestSettings,r):r}else this._raw={validationSettings:[t],suggestSettings:r}}return Object.defineProperty(e.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationSettings",{get:function(){return this._raw.validationSettings.slice(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"suggestSettings",{get:function(){return n.clone(this._raw.suggestSettings)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allowMultipleWorkers",{get:function(){return this._raw.allowMultipleWorkers},enumerable:!0,configurable:!0}),e}();t.sanitize=s,t.equal=o}),define("vs/languages/typescript/service/moduleLinkComputer",["require","exports","vs/base/lib/winjs.base","vs/base/paths","vs/base/network","vs/base/strings","vs/languages/typescript/service/references"],function(e,t,n,r,i,s,o){var a=function(){function e(e){this._requestService=e.requestService,this._resourceService=e.resourceService}return e.prototype.findLink=function(e,t,r){return this._requestService.getRequestUrl("typeScriptFileDependencies")?i.schemas.inMemory===e.getScheme()?n.TPromise.as(null):this._doFindLink(e,t,r,!0):n.TPromise.as(null)},e.prototype._doFindLink=function(e,t,r,s){var a=this,l=this._resourceService.get(e),c=new o.File(e.toExternal(),l.getValue());return this._requestService.makeRequest({url:this._requestUrl(e,c.fingerprint,r.baseUrl,r.module)}).then(function(e){for(var n=JSON.parse(e.responseText),r=l.getOffsetFromPosition(t),s=0,o=n.length;o>s;s++){var c=n[s];if(r>=c.offset&&r<=c.offset+c.length)return{resourceUrl:i.URL.fromEncoded(a._requestService.getRequestUrl("root",c.path,!0)).toExternal(),range:{startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1}}}return null},function(i){if(s&&404===i.status)return n.TPromise.timeout(1500).then(function(){return a._doFindLink(e,t,r,!1)});throw i})},e.prototype._requestUrl=function(e,t,n,i){var o=[];return o.push(r.join(this._requestService.getRequestUrl("typeScriptFileDependencies",this._requestService.getPath("root",e)),t)),o.push(s.format("?baseurl={0}",encodeURIComponent(n))),o.push(s.format("&type={0}",encodeURIComponent(i))),o.join(s.empty)},e}();t.ModuleLinkResolver=a});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/service/referenceSearch",["require","exports","vs/base/network","vs/platform/services","vs/languages/typescript/resources/remoteModels","vs/languages/typescript/resources/dependencyResolverFiles"],function(e,t,n,r,i,s){var o=function(e){function t(t,n,r,i){e.call(this,[],t.resourceService,t.requestService,n,i),this._contextData=r,this._typescriptModuleId=i,this._searchService=t.searchService}return __extends(t,e),t.prototype.fetchDependencies=function(t){var r=this;return this._searchService.search({type:2,contentPattern:{pattern:this._contextData.word,isCaseSensitive:!0,isWordMatch:!0},filePatterns:[{pattern:this._contextData.suffix}],includeFolders:"/"!==this._contextData.includeFolder?[this._contextData.includeFolder]:null}).then(function(i){return r._baselibs.length=0,i.fileMatches.every(function(e){return r._baselibs.push(n.URL.fromValue(r._requestService.getRequestUrl("root",e.filepath,!0))),!0}),e.prototype.fetchDependencies.call(r,t)})},t.prototype._onResource=function(e,t){this._resourceService.contains(e)||this._resourceService.insert(e,new i.RemoteModel(e,t,this._typescriptModuleId))},t}(s.BaselibDependencyResolver);t.FulltextDependenciesResolver=o});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/typescriptWorker2",["require","exports","vs/base/lib/winjs.base","vs/base/objects","vs/base/arrays","vs/base/network","vs/base/strings","vs/base/uuid","vs/base/errors","vs/base/collections","vs/base/eventEmitter","vs/base/lifecycle","vs/base/time/schedulers","vs/editor/worker/modesWorker","vs/editor/core/model/mirrorModel","vs/languages/typescript/service/languageServiceAdapter","vs/languages/typescript/service/languageServiceHost2","vs/languages/typescript/lib/typescriptServices","vs/languages/typescript/resources/dependencyResolverFiles","vs/languages/typescript/resources/dependencyResolver","vs/languages/typescript/resources/dependencyResolverFactory","vs/languages/typescript/typescript.configuration","vs/languages/typescript/service/moduleLinkComputer","vs/languages/typescript/service/referenceSearch"],function(e,t,n,r,i,s,o,a,l,c,u,p,h,d,m,f,g,v,y,b,_,w,S,T){var k;!function(e){e.StatusIdle="status.idle",e.StatusLoading="status.loading",e.StatusTypeScript="status.typescript",e.StatusError="status.error"}(k||(k={}));var x=function(){function e(e,t,n,r,i){this._compilationSettings=t,this._suggestSettings=n,this._eventBus=r,this._typescriptModuleId=i,this._callOnDispose=[],this._runCounter=0,this._resourceService=e.resourceService,this._requestService=e.requestService,this._markerService=e.workerMarkerService,this._telemetryService=e.telemetryService,this._moduleLinkComputer=e.instantiationService.createInstance(S.ModuleLinkResolver,this._compilationSettings),this._dependencyResolverFactory=e.instantiationService.createInstance(_.Factory)}return e.prototype.dispose=function(){p.disposeAll(this._callOnDispose),p.disposeAll([this._noDependencyResolver,this._fileDependencyResolver])},Object.defineProperty(e.prototype,"compilationSettings",{get:function(){return this._compilationSettings},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this._compilationSettings.scope},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"moduleLinkResolver",{get:function(){return this._moduleLinkComputer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dependencyResolverFactory",{get:function(){return this._dependencyResolverFactory},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._runCounter=0},e.prototype._init=function(){this._host=new g.LanguageServiceHost(this._resourceService),this._adapter=new f.LanguageServiceAdapter(this._compilationSettings,this._suggestSettings,this._host,new v.Services.LanguageService(this._host)),p.disposeAll([this._noDependencyResolver,this._fileDependencyResolver]),this._noDependencyResolver=new b.NullDependencyResolver,this._fileDependencyResolver=new b.CompositeDependencyResolver([new y.BaselibDependencyResolver(this._compilationSettings.extraLibs.map(function(e){return new s.URL(e)}),this._resourceService,this._requestService,this._dependencyResolverFactory.newResolver(this._compilationSettings,this._typescriptModuleId),this._typescriptModuleId),this._dependencyResolverFactory.newResolver(this._compilationSettings,this._typescriptModuleId)]),this._fileDependencyResolver=new b.CachingDependencyResolver(this._fileDependencyResolver,this._eventBus,this._resourceService)},e.prototype.withFileDependencies=function(e,t,n){return"undefined"==typeof n&&(n=null),0===this._runCounter++&&this._init(),this._doRun(e,this._fileDependencyResolver,t,n)},e.prototype.withNoDependencies=function(e,t,n){return"undefined"==typeof n&&(n=null),0===this._runCounter++&&this._init(),this._doRun(e,this._noDependencyResolver,t,n)},e.prototype.withDependencyResolver=function(e,t,n,r){return"undefined"==typeof r&&(r=null),0===this._runCounter++&&this._init(),this._doRun(t,e,n,r)},e.prototype._doRun=function(e,t,r,i){"undefined"==typeof i&&(i=null);var s,o=this,a=k.StatusIdle;return new n.Promise(function(n,l){o._eventBus.emit(k.StatusLoading),t.fetchDependencies(e).then(function(t){if(s)return l(s),void 0;e&&(t=c.combine([t,c.singleton(e)])),o._host.updateResources(t);var u=i;o._eventBus.emit(k.StatusTypeScript);try{u=r(o._adapter)}catch(p){o._handleError(p)&&(a=k.StatusError)}finally{o._eventBus.emit(a),n(u)}},function(e){l(e)})},function(){s=new Error("Canceled")})},e.prototype._handleError=function(e){return l.isPromiseCanceledError(e)?!1:(this._telemetryService.log("typescript.languageService.update.failure",{detail:l.toErrorMessage(e,!0)}),this.reset(),!0)},e.prototype.toString=function(){return o.format("langauge service for {0}",this._compilationSettings.scope)},e}();t.ScopedLanguageService=x;var C=function(){function e(){this._data={}}return e.prototype.dispose=function(){c.forEach(this._data,function(e,t){p.disposeAll(e.value),t()})},e.prototype.add=function(e,t,n){for(var r=c.lookupOrInsert(this._data,o.rtrim(e,"/"),[]),i=0,s=r.length;s>i;i++)if(r[i].scope===t)return!1;return r.push(n),r.sort(function(e,t){return t.scope.localeCompare(e.scope)}),!0},e.prototype.findLanguageService=function(e){var t,n=e.toExternal(),r=o.empty;c.forEach(this._data,function(e){o.startsWith(n,e.key)&&e.key.length>r.length&&(r=e.key)}),r||(r="inMemory://model");var s=c.lookup(this._data,r);if(!s)throw new Error("unkown prefix ("+e+") all ="+Object.keys(this._data));for(var a=n.substring(r.length),l=0,u=s.length;u>l;l++)if(o.startsWith(a,s[l].scope)){t=s[l];break}return t||(t=i.tail(s)),t},e.prototype.withFileDependencies=function(e,t,n){return"undefined"==typeof n&&(n=null),this.findLanguageService(e).withFileDependencies(e,t,n)},e.prototype.withNoDependencies=function(e,t,n){return"undefined"==typeof n&&(n=null),this.findLanguageService(e).withNoDependencies(e,t,n)},e.prototype.getAllLangaugeServices=function(e){return c.lookup(this._data,o.rtrim(e,"/"),[])},e}(),E=function(e){function t(n,i,s,o){var l=this;e.call(this,n,i,s),this.shouldEmitStatus=!1,this.validationQueue=[],this._instantiationService=n.instantiationService,this._telemetryService=n.telemetryService,this._requestService=n.requestService,this._extraData=r.withDefaults(o,t.defaultExtraData),this._callOnDispose=[],this._uuid=a.v4().asHex(),this._moduleLinkResolver=this._instantiationService.createInstance(S.ModuleLinkResolver),this._eventBus=new u.EventEmitter,this._callOnDispose.push(this._eventBus.addListener(b.Events.OnReferencesChanged,function(e){return l.validate(e.resource,!0)})),this._callOnDispose.push(this._eventBus.addListener(k.StatusIdle,function(){return l.emitStatus(0)})),this._callOnDispose.push(this._eventBus.addListener(k.StatusLoading,function(){return l.emitStatus(3)})),this._callOnDispose.push(this._eventBus.addListener(k.StatusTypeScript,function(){return l.emitStatus(1)})),this._callOnDispose.push(this._eventBus.addListener(k.StatusError,function(){return l.emitStatus(2)})),this.configure(null)}return __extends(t,e),t.prototype.dispose=function(){p.cAll(this._callOnDispose)},t.prototype.globalConfigure=function(e){return this._extraData=r.withDefaults(e,t.defaultExtraData),n.TPromise.as(!0)},t.prototype.configure=function(e){for(var t=w.sanitize(e,w._internalDefaultValidationSettings,w.defaultSuggestSettions),r=0,s=t.validationSettings.length;s>r;r++)this._extraData.semanticValidation||(t.validationSettings[r].semanticValidation=!1),this._extraData.syntacticValidation||(t.validationSettings[r].syntaxValidation=!1);if(this._options&&w.equal(this._options,t))return n.Promise.as(null);p.combinedDispose(this._languageServices),this._languageServices=new C,this._options=t;for(var a=i.coalesce([this._requestService.getRequestUrl("root",o.empty,!0),"inMemory://model/"]),r=0;ri;i++)n[i]instanceof m.MirrorModel&&(e&&e.equals(n[i].getAssociatedResource())||r.push(n[i]));r.sort(function(e,t){return t.getVersionId()-e.getVersionId()}),this.validationQueue.length=0;for(var i=0,s=r.length;s>i;i++)this._enqueValidateFunction(this._createValidateFunction(r[i].getAssociatedResource()));this.validationScheduler.schedule()},t.prototype._enqueValidateFunction=function(e){this.validationQueue.push(e)},t.prototype._createValidateFunction=function(e){var t=this;return function(){if(!t.resourceService.contains(e))return null;var r,i,s,a=!1,l=new Object;r=new n.Promise(function(e,t){i=e,s=t},function(){a=!0});var c=n.Promise.as(!1);return t._extraData.syntacticValidation&&(c=t._languageServices.withNoDependencies(e,function(n){if(a)throw l;var r=n.getSyntacticDiagnostics(e);return t._publishMarkersForResource(e,o.format("{0}/syntax",t._uuid),r)})),c.then(function(n){return t._languageServices.withFileDependencies(e,function(r){if(a)throw l;var i=[];n||(i.push.apply(i,r.getSemanticDiagnostics(e)),i.push.apply(i,r.getExtraDiagnostics(e))),t._publishMarkersForResource(e,o.format("{0}/semantic",t._uuid),i)})}).then(function(){if(a)throw l;return t._languageServices.withNoDependencies(e,function(n){t.markerService.createPublisher().batchChanges(function(r){t.triggerValidateParticipation(e,r,n.languageService.getSyntaxTree(e.toExternal()))})})}).then(function(){i(null)},function(e){e===l?i(null):s(e)}),r}},t.prototype._publishMarkersForResource=function(e,t,n){return this.markerService.createPublisher().batchChanges(function(r){r.changeMarkers(e,t,function(e){n.forEach(function(t){return e.addMarker(t)})})}),n.length>0},t.prototype.doSuggest=function(e,t){return this._languageServices.withFileDependencies(e,function(n){return n.suggest(e,t)},null)},t.prototype._getSuggestContext=function(e){return this._languageServices.withNoDependencies(e,function(t){return{syntaxTree:t.languageService.getSyntaxTree(e.toExternal()),compilationSettings:t.compilationSettings}})},t.prototype.getSuggestionDetails=function(e,t,n){return this._languageServices.withFileDependencies(e,function(r){return r.getSuggestionDetails(e,t,n)})},t.prototype.quickFix=function(e,t){return this._languageServices.withFileDependencies(e,function(n){return n.quickFix(e,t)},[])},t.prototype.getParameterHints=function(e,t){return this._languageServices.withFileDependencies(e,function(n){return n.getParameterHints(e,t)})},t.prototype.getEmitOutput=function(e,t){return this._languageServices.withNoDependencies(e,function(n){return n.getEmitOutput(e,t)})},t.prototype.format=function(e,t,n){return this._languageServices.withNoDependencies(e,function(r){return r.format(e,t,n)},null)},t.prototype.formatAfterKeystroke=function(e,t,n){return this._languageServices.withNoDependencies(e,function(r){return r.formatAfterKeystroke(e,t,n)},null)},t.prototype.getOutline=function(e){return this._languageServices.withNoDependencies(e,function(t){return t.getOutline(e)},[])},t.prototype.getNavigateToItems=function(e){var t=this._languageServices.getAllLangaugeServices(this._requestService.getRequestUrl("root",o.empty,!0)).map(function(t){return t.withNoDependencies(null,function(t){return t.getNavigateToItems(e)},[])});return n.TPromise.join(t).then(function(e){return i.merge(e)})},t.prototype.findOccurrences=function(e,t,n){return this._languageServices.withFileDependencies(e,function(r){return r.findOccurrences(e,t,n)},[])},t.prototype.findDeclaration=function(e,t){return n.TPromise.join([this._findTypeScriptDeclaration(e,t),this._findLinkTarget(e,t)]).then(function(e){return i.coalesce(e)[0]||null})},t.prototype._findTypeScriptDeclaration=function(e,t){return this._languageServices.withFileDependencies(e,function(n){return n.findDeclaration(e,t)})},t.prototype._findLinkTarget=function(e,t){return this._moduleLinkResolver.findLink(e,t,this._languageServices.findLanguageService(e).compilationSettings)},t.prototype.findTypeDeclaration=function(e,t){return this._languageServices.withFileDependencies(e,function(n){return n.findTypeDeclaration(e,t)})},t.prototype.findReferences=function(e,t){var r=this;return this._languageServices.withFileDependencies(e,function(i){return i.isExternallyVisibleSymbole(e,t)?r._findReferencesInAllFiles(e,t):n.TPromise.as(i.findReferences(e,t))},[])},t.prototype._findReferencesInAllFiles=function(e,t){var n=this.resourceService.get(e),r=n.getWordAtPosition(t),i=this._languageServices.findLanguageService(e),s=i.dependencyResolverFactory.newResolver(i.compilationSettings,this._getModeId()),o=this._instantiationService.createInstance(T.FulltextDependenciesResolver,s,{word:r,suffix:"*.ts",includeFolder:i.compilationSettings.scope},this._getModeId());return i.withDependencyResolver(o,e,function(n){return n.findReferences(e,t)})},t.prototype.computeInfo=function(e,t){return this._languageServices.withFileDependencies(e,function(n){return n.getTypeInformationAtPosition(e,t)})},t.prototype.getRangesToPosition=function(e,t){return this._languageServices.withFileDependencies(e,function(n){return n.getRangesToPosition(e,t)},[])},t.prototype.textReplace=function(e,t){var n=[["true","false"],["string","number","boolean","void","any"],["private","public"]];return this.valueSetsReplace(n,e,t)},t.defaultExtraData={validateAllFiles:!1,syntacticValidation:!0,semanticValidation:!0},t}(d.AbstractWorkerMode);t.TypeScriptWorker2=E});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/typescriptWorker2.nls",[],{vs_languages_typescript_lint_lint:["Don't spare curly brackets.","Empty block should have a comment.","Use '!==' and '===' instead of '!=' and '=='.","Missing semicolon.","Don't use reserved keywords.","Don't use a TypeScript specific language construct in JavaScript.","Unexpected output of the 'typeof'-operator.","Semicolon instead of block.","Function inside loop.","Function with lowercase name used as constructor.","Missing return type.","Did you mean '/// '?","Unused import.","Unused local variable.","Unused local function.","Unused private member.","Variable is used before it is declared."],vs_languages_lib_javascriptSnippets:["define module","For Loop","For-Each Loop","For-In Loop","Function Statement","If Statement","If-Else Statement","New Statement","Switch Statement","While Statement","Do-While Statement","Try-Catch Statement","Console Log","Set Timeout Function","Relative Reference to another File"],vs_languages_typescript_service_typescriptSnippets:["For-Each Loop using =>","jsdoc snippet","Constructor","Class Definition","Public Method Definition","Private Method Definition","Import external module."]});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/typescriptWorker2.nls.keys",[],{vs_languages_typescript_lint_lint:{path:"vs/languages/typescript/lint/lint.js",keys:["layout.curlyBracketsMustNotBeOmitted","layout.emptyblock","javascript.comparisonOperatorNotStrict","javascript.missingSemicolon","javascript.reservedKeyword","javascript.typescriptSpecific","javascript.typeofCannotBeCompared","javascript.semicolonInsteadOfBlock","javascript.functionInsideLoop","javascript.newOnLowercaseFunctions","typescript.missingReturnType","typescript.looksLikeTripleSlash","typescript.unusedImport","typescript.unusedLocalVariable","typescript.unusedFunction","typescript.unusedPrivateMember","typescript.variableUsedBeforeDeclared"]},vs_languages_lib_javascriptSnippets:{path:"vs/languages/lib/javascriptSnippets.js",keys:["define.snippet","for.snippet","foreach.snippet","forin.snippet","function.snippet","if.snippet","ifelse.snippet","new.snippet","switch.snippet","while.snippet","dowhile.snippet","trycatch.snippet","log.snippet","settimeout.snippet","tripleslashreference.snippet"]},vs_languages_typescript_service_typescriptSnippets:{path:"vs/languages/typescript/service/typescriptSnippets.js",keys:["foreach.snippet","jsdoc.snippet","constructor.snippet","class.snippet","publicmethod.snippet","privatemethod.snippet","importstatement.snippet"]}});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /*!----------------- TypeScript ThirdPartyNotices ------------------------------------------------------- The TypeScript software is based on or incorporates material and code from the projects listed below (collectively "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license, under which Microsoft received such Third Party Code, are set forth below. Such license and notices are provided for informational purposes only. Microsoft licenses the Third Party Code to you under the terms of the Apache 2.0 License. All Third Party Code licensed by Microsoft under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. --------------------------------------------- Third Party Code Components -------------------------------------------- ---- Mozilla Developer Code--------- The following Mozilla Developer Code is under Public Domain as updated after Aug. 20, 2012, see, https://developer.mozilla.org/en-US/docs/Project:Copyrights 1. Array filter Compatibility Method, Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/filter Any copyright is dedicated to the Public Domain. 2. Array forEach Compatibility Method, Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/forEach Any copyright is dedicated to the Public Domain. 3. Array indexOf Compatibility Method, Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf Any copyright is dedicated to the Public Domain. 4. Array map Compatibility Method, Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/map Any copyright is dedicated to the Public Domain. 5. Array Reduce Compatibility Method, Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/Reduce Any copyright is dedicated to the Public Domain. 6. String Trim Compatibility Method, Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim Any copyright is dedicated to the Public Domain. 7. Date now Compatibility Method, Available at https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/now Any copyright is dedicated to the Public Domain. ------------JSON2 Script------------------------ json2.js 2012-10-08 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See, http://www.JSON.org/js.html --------------r.js---------------------- Copyright (c) 2010-2011 Dojo Foundation. All Rights Reserved. Originally License under MIT License ------------------------------------------------------------------------- Provided for Informational Purposes Only MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------------- ------------- End of ThirdPartyNotices --------------------------------------------------- */ var TypeScript;!function(e){e.DiagnosticCode={error_TS_0_1:"error TS{0}: {1}",warning_TS_0_1:"warning TS{0}: {1}",Unrecognized_escape_sequence:"Unrecognized escape sequence.",Unexpected_character_0:"Unexpected character {0}.",Missing_close_quote_character:"Missing close quote character.",Identifier_expected:"Identifier expected.",_0_keyword_expected:"'{0}' keyword expected.",_0_expected:"'{0}' expected.",Identifier_expected_0_is_a_keyword:"Identifier expected; '{0}' is a keyword.",Automatic_semicolon_insertion_not_allowed:"Automatic semicolon insertion not allowed.",Unexpected_token_0_expected:"Unexpected token; '{0}' expected.",Trailing_separator_not_allowed:"Trailing separator not allowed.",AsteriskSlash_expected:"'*/' expected.",public_or_private_modifier_must_precede_static:"'public' or 'private' modifier must precede 'static'.",Unexpected_token:"Unexpected token.",Catch_clause_parameter_cannot_have_a_type_annotation:"Catch clause parameter cannot have a type annotation.",Rest_parameter_must_be_last_in_list:"Rest parameter must be last in list.",Parameter_cannot_have_question_mark_and_initializer:"Parameter cannot have question mark and initializer.",Required_parameter_cannot_follow_optional_parameter:"Required parameter cannot follow optional parameter.",Index_signatures_cannot_have_rest_parameters:"Index signatures cannot have rest parameters.",Index_signature_parameter_cannot_have_accessibility_modifiers:"Index signature parameter cannot have accessibility modifiers.",Index_signature_parameter_cannot_have_a_question_mark:"Index signature parameter cannot have a question mark.",Index_signature_parameter_cannot_have_an_initializer:"Index signature parameter cannot have an initializer.",Index_signature_must_have_a_type_annotation:"Index signature must have a type annotation.",Index_signature_parameter_must_have_a_type_annotation:"Index signature parameter must have a type annotation.",Index_signature_parameter_type_must_be_string_or_number:"Index signature parameter type must be 'string' or 'number'.",extends_clause_already_seen:"'extends' clause already seen.",extends_clause_must_precede_implements_clause:"'extends' clause must precede 'implements' clause.",Classes_can_only_extend_a_single_class:"Classes can only extend a single class.",implements_clause_already_seen:"'implements' clause already seen.",Accessibility_modifier_already_seen:"Accessibility modifier already seen.",_0_modifier_must_precede_1_modifier:"'{0}' modifier must precede '{1}' modifier.",_0_modifier_already_seen:"'{0}' modifier already seen.",_0_modifier_cannot_appear_on_a_class_element:"'{0}' modifier cannot appear on a class element.",Interface_declaration_cannot_have_implements_clause:"Interface declaration cannot have 'implements' clause.",super_invocation_cannot_have_type_arguments:"'super' invocation cannot have type arguments.",Only_ambient_modules_can_use_quoted_names:"Only ambient modules can use quoted names.",Statements_are_not_allowed_in_ambient_contexts:"Statements are not allowed in ambient contexts.",Implementations_are_not_allowed_in_ambient_contexts:"Implementations are not allowed in ambient contexts.",declare_modifier_not_allowed_for_code_already_in_an_ambient_context:"'declare' modifier not allowed for code already in an ambient context.",Initializers_are_not_allowed_in_ambient_contexts:"Initializers are not allowed in ambient contexts.",Parameter_property_declarations_can_only_be_used_in_constructors:"Parameter property declarations can only be used in constructors.",Function_implementation_expected:"Function implementation expected.",Constructor_implementation_expected:"Constructor implementation expected.",Function_overload_name_must_be_0:"Function overload name must be '{0}'.",_0_modifier_cannot_appear_on_a_module_element:"'{0}' modifier cannot appear on a module element.",declare_modifier_cannot_appear_on_an_interface_declaration:"'declare' modifier cannot appear on an interface declaration.",declare_modifier_required_for_top_level_element:"'declare' modifier required for top level element.",Rest_parameter_cannot_be_optional:"Rest parameter cannot be optional.",Rest_parameter_cannot_have_an_initializer:"Rest parameter cannot have an initializer.",set_accessor_must_have_one_and_only_one_parameter:"'set' accessor must have one and only one parameter.",set_accessor_parameter_cannot_be_optional:"'set' accessor parameter cannot be optional.",set_accessor_parameter_cannot_have_an_initializer:"'set' accessor parameter cannot have an initializer.",set_accessor_cannot_have_rest_parameter:"'set' accessor cannot have rest parameter.",get_accessor_cannot_have_parameters:"'get' accessor cannot have parameters.",Modifiers_cannot_appear_here:"Modifiers cannot appear here.",Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:"Accessors are only available when targeting ECMAScript 5 and higher.",Class_name_cannot_be_0:"Class name cannot be '{0}'.",Interface_name_cannot_be_0:"Interface name cannot be '{0}'.",Enum_name_cannot_be_0:"Enum name cannot be '{0}'.",Module_name_cannot_be_0:"Module name cannot be '{0}'.",Enum_member_must_have_initializer:"Enum member must have initializer.",Export_assignment_cannot_be_used_in_internal_modules:"Export assignment cannot be used in internal modules.",Export_assignment_not_allowed_in_module_with_exported_element:"Export assignment not allowed in module with exported element.",Module_cannot_have_multiple_export_assignments:"Module cannot have multiple export assignments.",Ambient_enum_elements_can_only_have_integer_literal_initializers:"Ambient enum elements can only have integer literal initializers.",module_class_interface_enum_import_or_statement:"module, class, interface, enum, import or statement",constructor_function_accessor_or_variable:"constructor, function, accessor or variable",statement:"statement",case_or_default_clause:"case or default clause",identifier:"identifier",call_construct_index_property_or_function_signature:"call, construct, index, property or function signature",expression:"expression",type_name:"type name",property_or_accessor:"property or accessor",parameter:"parameter",type:"type",type_parameter:"type parameter",declare_modifier_not_allowed_on_import_declaration:"'declare' modifier not allowed on import declaration.",Function_overload_must_be_static:"Function overload must be static.",Function_overload_must_not_be_static:"Function overload must not be static.",Parameter_property_declarations_cannot_be_used_in_an_ambient_context:"Parameter property declarations cannot be used in an ambient context.",Parameter_property_declarations_cannot_be_used_in_a_constructor_overload:"Parameter property declarations cannot be used in a constructor overload.",Invalid_reference_directive_syntax:"Invalid 'reference' directive syntax.",Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher:"Octal literals are not available when targeting ECMAScript 5 and higher.",Accessors_are_not_allowed_in_ambient_contexts:"Accessors are not allowed in ambient contexts.",_0_modifier_cannot_appear_on_a_constructor_declaration:"'{0}' modifier cannot appear on a constructor declaration.",_0_modifier_cannot_appear_on_a_parameter:"'{0}' modifier cannot appear on a parameter.",Duplicate_identifier_0:"Duplicate identifier '{0}'.",The_name_0_does_not_exist_in_the_current_scope:"The name '{0}' does not exist in the current scope.",The_name_0_does_not_refer_to_a_value:"The name '{0}' does not refer to a value.",super_can_only_be_used_inside_a_class_instance_method:"'super' can only be used inside a class instance method.",The_left_hand_side_of_an_assignment_expression_must_be_a_variable_property_or_indexer:"The left-hand side of an assignment expression must be a variable, property or indexer.",Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:"Value of type '{0}' is not callable. Did you mean to include 'new'?",Value_of_type_0_is_not_callable:"Value of type '{0}' is not callable.",Value_of_type_0_is_not_newable:"Value of type '{0}' is not newable.",Value_of_type_0_is_not_indexable_by_type_1:"Value of type '{0}' is not indexable by type '{1}'.",Operator_0_cannot_be_applied_to_types_1_and_2:"Operator '{0}' cannot be applied to types '{1}' and '{2}'.",Operator_0_cannot_be_applied_to_types_1_and_2_3:"Operator '{0}' cannot be applied to types '{1}' and '{2}': {3}",Cannot_convert_0_to_1:"Cannot convert '{0}' to '{1}'.",Cannot_convert_0_to_1_NL_2:"Cannot convert '{0}' to '{1}':{NL}{2}",Expected_var_class_interface_or_module:"Expected var, class, interface, or module.",Operator_0_cannot_be_applied_to_type_1:"Operator '{0}' cannot be applied to type '{1}'.",Getter_0_already_declared:"Getter '{0}' already declared.",Setter_0_already_declared:"Setter '{0}' already declared.",Exported_class_0_extends_private_class_1:"Exported class '{0}' extends private class '{1}'.",Exported_class_0_implements_private_interface_1:"Exported class '{0}' implements private interface '{1}'.",Exported_interface_0_extends_private_interface_1:"Exported interface '{0}' extends private interface '{1}'.",Exported_class_0_extends_class_from_inaccessible_module_1:"Exported class '{0}' extends class from inaccessible module {1}.",Exported_class_0_implements_interface_from_inaccessible_module_1:"Exported class '{0}' implements interface from inaccessible module {1}.",Exported_interface_0_extends_interface_from_inaccessible_module_1:"Exported interface '{0}' extends interface from inaccessible module {1}.",Public_static_property_0_of_exported_class_has_or_is_using_private_type_1:"Public static property '{0}' of exported class has or is using private type '{1}'.",Public_property_0_of_exported_class_has_or_is_using_private_type_1:"Public property '{0}' of exported class has or is using private type '{1}'.",Property_0_of_exported_interface_has_or_is_using_private_type_1:"Property '{0}' of exported interface has or is using private type '{1}'.",Exported_variable_0_has_or_is_using_private_type_1:"Exported variable '{0}' has or is using private type '{1}'.",Public_static_property_0_of_exported_class_is_using_inaccessible_module_1:"Public static property '{0}' of exported class is using inaccessible module {1}.",Public_property_0_of_exported_class_is_using_inaccessible_module_1:"Public property '{0}' of exported class is using inaccessible module {1}.",Property_0_of_exported_interface_is_using_inaccessible_module_1:"Property '{0}' of exported interface is using inaccessible module {1}.",Exported_variable_0_is_using_inaccessible_module_1:"Exported variable '{0}' is using inaccessible module {1}.",Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_type_1:"Parameter '{0}' of constructor from exported class has or is using private type '{1}'.",Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_type_1:"Parameter '{0}' of public static property setter from exported class has or is using private type '{1}'.",Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_type_1:"Parameter '{0}' of public property setter from exported class has or is using private type '{1}'.",Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1:"Parameter '{0}' of constructor signature from exported interface has or is using private type '{1}'.",Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_type_1:"Parameter '{0}' of call signature from exported interface has or is using private type '{1}'.",Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_type_1:"Parameter '{0}' of public static method from exported class has or is using private type '{1}'.",Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_type_1:"Parameter '{0}' of public method from exported class has or is using private type '{1}'.",Parameter_0_of_method_from_exported_interface_has_or_is_using_private_type_1:"Parameter '{0}' of method from exported interface has or is using private type '{1}'.",Parameter_0_of_exported_function_has_or_is_using_private_type_1:"Parameter '{0}' of exported function has or is using private type '{1}'.",Parameter_0_of_constructor_from_exported_class_is_using_inaccessible_module_1:"Parameter '{0}' of constructor from exported class is using inaccessible module {1}.",Parameter_0_of_public_static_property_setter_from_exported_class_is_using_inaccessible_module_1:"Parameter '{0}' of public static property setter from exported class is using inaccessible module {1}.",Parameter_0_of_public_property_setter_from_exported_class_is_using_inaccessible_module_1:"Parameter '{0}' of public property setter from exported class is using inaccessible module {1}.",Parameter_0_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_1:"Parameter '{0}' of constructor signature from exported interface is using inaccessible module {1}.",Parameter_0_of_call_signature_from_exported_interface_is_using_inaccessible_module_1:"Parameter '{0}' of call signature from exported interface is using inaccessible module {1}",Parameter_0_of_public_static_method_from_exported_class_is_using_inaccessible_module_1:"Parameter '{0}' of public static method from exported class is using inaccessible module {1}.",Parameter_0_of_public_method_from_exported_class_is_using_inaccessible_module_1:"Parameter '{0}' of public method from exported class is using inaccessible module {1}.",Parameter_0_of_method_from_exported_interface_is_using_inaccessible_module_1:"Parameter '{0}' of method from exported interface is using inaccessible module {1}.",Parameter_0_of_exported_function_is_using_inaccessible_module_1:"Parameter '{0}' of exported function is using inaccessible module {1}.",Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_type_0:"Return type of public static property getter from exported class has or is using private type '{0}'.",Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_type_0:"Return type of public property getter from exported class has or is using private type '{0}'.",Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_0:"Return type of constructor signature from exported interface has or is using private type '{0}'.",Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_type_0:"Return type of call signature from exported interface has or is using private type '{0}'.",Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_type_0:"Return type of index signature from exported interface has or is using private type '{0}'.",Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_type_0:"Return type of public static method from exported class has or is using private type '{0}'.",Return_type_of_public_method_from_exported_class_has_or_is_using_private_type_0:"Return type of public method from exported class has or is using private type '{0}'.",Return_type_of_method_from_exported_interface_has_or_is_using_private_type_0:"Return type of method from exported interface has or is using private type '{0}'.",Return_type_of_exported_function_has_or_is_using_private_type_0:"Return type of exported function has or is using private type '{0}'.",Return_type_of_public_static_property_getter_from_exported_class_is_using_inaccessible_module_0:"Return type of public static property getter from exported class is using inaccessible module {0}.",Return_type_of_public_property_getter_from_exported_class_is_using_inaccessible_module_0:"Return type of public property getter from exported class is using inaccessible module {0}.",Return_type_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_0:"Return type of constructor signature from exported interface is using inaccessible module {0}.",Return_type_of_call_signature_from_exported_interface_is_using_inaccessible_module_0:"Return type of call signature from exported interface is using inaccessible module {0}.",Return_type_of_index_signature_from_exported_interface_is_using_inaccessible_module_0:"Return type of index signature from exported interface is using inaccessible module {0}.",Return_type_of_public_static_method_from_exported_class_is_using_inaccessible_module_0:"Return type of public static method from exported class is using inaccessible module {0}.",Return_type_of_public_method_from_exported_class_is_using_inaccessible_module_0:"Return type of public method from exported class is using inaccessible module {0}.",Return_type_of_method_from_exported_interface_is_using_inaccessible_module_0:"Return type of method from exported interface is using inaccessible module {0}.",Return_type_of_exported_function_is_using_inaccessible_module_0:"Return type of exported function is using inaccessible module {0}.",new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead:"'new T[]' cannot be used to create an array. Use 'new Array()' instead.",A_parameter_list_must_follow_a_generic_type_argument_list_expected:"A parameter list must follow a generic type argument list. '(' expected.",Multiple_constructor_implementations_are_not_allowed:"Multiple constructor implementations are not allowed.",Unable_to_resolve_external_module_0:"Unable to resolve external module '{0}'.",Module_cannot_be_aliased_to_a_non_module_type:"Module cannot be aliased to a non-module type.",A_class_may_only_extend_another_class:"A class may only extend another class.",A_class_may_only_implement_another_class_or_interface:"A class may only implement another class or interface.",An_interface_may_only_extend_another_class_or_interface:"An interface may only extend another class or interface.",Unable_to_resolve_type:"Unable to resolve type.",Unable_to_resolve_type_of_0:"Unable to resolve type of '{0}'.",Unable_to_resolve_type_parameter_constraint:"Unable to resolve type parameter constraint.",Type_parameter_constraint_cannot_be_a_primitive_type:"Type parameter constraint cannot be a primitive type.",Supplied_parameters_do_not_match_any_signature_of_call_target:"Supplied parameters do not match any signature of call target.",Supplied_parameters_do_not_match_any_signature_of_call_target_NL_0:"Supplied parameters do not match any signature of call target:{NL}{0}",Invalid_new_expression:"Invalid 'new' expression.",Call_signatures_used_in_a_new_expression_must_have_a_void_return_type:"Call signatures used in a 'new' expression must have a 'void' return type.",Could_not_select_overload_for_new_expression:"Could not select overload for 'new' expression.",Type_0_does_not_satisfy_the_constraint_1_for_type_parameter_2:"Type '{0}' does not satisfy the constraint '{1}' for type parameter '{2}'.",Could_not_select_overload_for_call_expression:"Could not select overload for 'call' expression.",Cannot_invoke_an_expression_whose_type_lacks_a_call_signature:"Cannot invoke an expression whose type lacks a call signature.",Calls_to_super_are_only_valid_inside_a_class:"Calls to 'super' are only valid inside a class.",Generic_type_0_requires_1_type_argument_s:"Generic type '{0}' requires {1} type argument(s).",Type_of_array_literal_cannot_be_determined_Best_common_type_could_not_be_found_for_array_elements:"Type of array literal cannot be determined. Best common type could not be found for array elements.",Could_not_find_enclosing_symbol_for_dotted_name_0:"Could not find enclosing symbol for dotted name '{0}'.",The_property_0_does_not_exist_on_value_of_type_1:"The property '{0}' does not exist on value of type '{1}'.",Could_not_find_symbol_0:"Could not find symbol '{0}'.",get_and_set_accessor_must_have_the_same_type:"'get' and 'set' accessor must have the same type.",this_cannot_be_referenced_in_current_location:"'this' cannot be referenced in current location.",Static_methods_cannot_reference_class_type_parameters:"Static methods cannot reference class type parameters.",Class_0_is_recursively_referenced_as_a_base_type_of_itself:"Class '{0}' is recursively referenced as a base type of itself.",Interface_0_is_recursively_referenced_as_a_base_type_of_itself:"Interface '{0}' is recursively referenced as a base type of itself.",super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:"'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.",super_cannot_be_referenced_in_non_derived_classes:"'super' cannot be referenced in non-derived classes.",A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties:"A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.",Constructors_for_derived_classes_must_contain_a_super_call:"Constructors for derived classes must contain a 'super' call.",Super_calls_are_not_permitted_outside_constructors_or_in_local_functions_inside_constructors:"Super calls are not permitted outside constructors or in local functions inside constructors.",_0_1_is_inaccessible:"'{0}.{1}' is inaccessible.",this_cannot_be_referenced_within_module_bodies:"'this' cannot be referenced within module bodies.",Invalid_expression_types_not_known_to_support_the_addition_operator:"Invalid '+' expression - types not known to support the addition operator.",The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type:"The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.",The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type:"The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.",The_type_of_a_unary_arithmetic_operation_operand_must_be_of_type_any_number_or_an_enum_type:"The type of a unary arithmetic operation operand must be of type 'any', 'number' or an enum type.",Variable_declarations_of_a_for_statement_cannot_use_a_type_annotation:"Variable declarations of a 'for' statement cannot use a type annotation.",Variable_declarations_of_a_for_statement_must_be_of_types_string_or_any:"Variable declarations of a 'for' statement must be of types 'string' or 'any'.",The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter:"The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.",The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number:"The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'.",The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:"The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.",The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:"The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.",The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_a_subtype_of_the_Function_interface_type:"The right-hand side of an 'instanceof' expression must be of type 'any' or a subtype of the 'Function' interface type.",Setters_cannot_return_a_value:"Setters cannot return a value.",Tried_to_query_type_of_uninitialized_module_0:"Tried to query type of uninitialized module '{0}'.",Tried_to_set_variable_type_to_uninitialized_module_type_0:"Tried to set variable type to uninitialized module type '{0}'.",Function_0_declared_a_non_void_return_type_but_has_no_return_expression:"Function '{0}' declared a non-void return type, but has no return expression.",Getters_must_return_a_value:"Getters must return a value.",Getter_and_setter_accessors_do_not_agree_in_visibility:"Getter and setter accessors do not agree in visibility.",Invalid_left_hand_side_of_assignment_expression:"Invalid left-hand side of assignment expression.",Function_declared_a_non_void_return_type_but_has_no_return_expression:"Function declared a non-void return type, but has no return expression.",Cannot_resolve_return_type_reference:"Cannot resolve return type reference.",Constructors_cannot_have_a_return_type_of_void:"Constructors cannot have a return type of 'void'.",Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:"Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.",All_symbols_within_a_with_block_will_be_resolved_to_any:"All symbols within a with block will be resolved to 'any'.",Import_declarations_in_an_internal_module_cannot_reference_an_external_module:"Import declarations in an internal module cannot reference an external module.",Class_0_declares_interface_1_but_does_not_implement_it_NL_2:"Class {0} declares interface {1} but does not implement it:{NL}{2}",Class_0_declares_class_1_as_an_interface_but_does_not_implement_it_NL_2:"Class {0} declares class {1} as an interface but does not implement it:{NL}{2}",The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer:"The operand of an increment or decrement operator must be a variable, property or indexer.",this_cannot_be_referenced_in_static_initializers_in_a_class_body:"'this' cannot be referenced in static initializers in a class body.",Class_0_cannot_extend_class_1_NL_2:"Class '{0}' cannot extend class '{1}':{NL}{2}",Interface_0_cannot_extend_class_1_NL_2:"Interface '{0}' cannot extend class '{1}':{NL}{2}",Interface_0_cannot_extend_interface_1_NL_2:"Interface '{0}' cannot extend interface '{1}':{NL}{2}",Duplicate_overload_signature_for_0:"Duplicate overload signature for '{0}'.",Duplicate_constructor_overload_signature:"Duplicate constructor overload signature.",Duplicate_overload_call_signature:"Duplicate overload call signature.",Duplicate_overload_construct_signature:"Duplicate overload construct signature.",Overload_signature_is_not_compatible_with_function_definition:"Overload signature is not compatible with function definition.",Overload_signature_is_not_compatible_with_function_definition_NL_0:"Overload signature is not compatible with function definition:{NL}{0}",Overload_signatures_must_all_be_public_or_private:"Overload signatures must all be public or private.",Overload_signatures_must_all_be_exported_or_not_exported:"Overload signatures must all be exported or not exported.",Overload_signatures_must_all_be_ambient_or_non_ambient:"Overload signatures must all be ambient or non-ambient.",Overload_signatures_must_all_be_optional_or_required:"Overload signatures must all be optional or required.",Specialized_overload_signature_is_not_subtype_of_any_non_specialized_signature:"Specialized overload signature is not subtype of any non-specialized signature.",this_cannot_be_referenced_in_constructor_arguments:"'this' cannot be referenced in constructor arguments.",Instance_member_cannot_be_accessed_off_a_class:"Instance member cannot be accessed off a class.",Untyped_function_calls_may_not_accept_type_arguments:"Untyped function calls may not accept type arguments.",Non_generic_functions_may_not_accept_type_arguments:"Non-generic functions may not accept type arguments.",A_generic_type_may_not_reference_itself_with_a_wrapped_form_of_its_own_type_parameters:"A generic type may not reference itself with a wrapped form of its own type parameters.",Rest_parameters_must_be_array_types:"Rest parameters must be array types.",Overload_signature_implementation_cannot_use_specialized_type:"Overload signature implementation cannot use specialized type.",Export_assignments_may_only_be_used_at_the_top_level_of_external_modules:"Export assignments may only be used at the top-level of external modules.",Export_assignments_may_only_be_made_with_variables_functions_classes_interfaces_enums_and_internal_modules:"Export assignments may only be made with variables, functions, classes, interfaces, enums and internal modules.",Only_public_methods_of_the_base_class_are_accessible_via_the_super_keyword:"Only public methods of the base class are accessible via the 'super' keyword.",Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1:"Numeric indexer type '{0}' must be a subtype of string indexer type '{1}'.",Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1_NL_2:"Numeric indexer type '{0}' must be a subtype of string indexer type '{1}':{NL}{2}",All_numerically_named_properties_must_be_subtypes_of_numeric_indexer_type_0:"All numerically named properties must be subtypes of numeric indexer type '{0}'.",All_numerically_named_properties_must_be_subtypes_of_numeric_indexer_type_0_NL_1:"All numerically named properties must be subtypes of numeric indexer type '{0}':{NL}{1}",All_named_properties_must_be_subtypes_of_string_indexer_type_0:"All named properties must be subtypes of string indexer type '{0}'.",All_named_properties_must_be_subtypes_of_string_indexer_type_0_NL_1:"All named properties must be subtypes of string indexer type '{0}':{NL}{1}",Generic_type_references_must_include_all_type_arguments:"Generic type references must include all type arguments.",Default_arguments_are_not_allowed_in_an_overload_parameter:"Default arguments are not allowed in an overload parameter.",Overloads_cannot_differ_only_by_return_type:"Overloads cannot differ only by return type.",Function_expression_declared_a_non_void_return_type_but_has_no_return_expression:"Function expression declared a non-void return type, but has no return expression.",Import_declaration_referencing_identifier_from_internal_module_can_only_be_made_with_variables_functions_classes_interfaces_enums_and_internal_modules:"Import declaration referencing identifier from internal module can only be made with variables, functions, classes, interfaces, enums and internal modules.",Could_not_find_symbol_0_in_module_1:"Could not find symbol '{0}' in module '{1}'.",Unable_to_resolve_module_reference_0:"Unable to resolve module reference '{0}'.",Could_not_find_module_0_in_module_1:"Could not find module '{0}' in module '{1}'.",Exported_import_declaration_0_is_assigned_value_with_type_that_has_or_is_using_private_type_1:"Exported import declaration '{0}' is assigned value with type that has or is using private type '{1}'.",Exported_import_declaration_0_is_assigned_value_with_type_that_is_using_inaccessible_module_1:"Exported import declaration '{0}' is assigned value with type that is using inaccessible module '{1}'.",Exported_import_declaration_0_is_assigned_type_that_has_or_is_using_private_type_1:"Exported import declaration '{0}' is assigned type that has or is using private type '{1}'.",Exported_import_declaration_0_is_assigned_type_that_is_using_inaccessible_module_1:"Exported import declaration '{0}' is assigned type that is using inaccessible module '{1}'.",Exported_import_declaration_0_is_assigned_container_that_is_or_is_using_inaccessible_module_1:"Exported import declaration '{0}' is assigned container that is or is using inaccessible module '{1}'.",Type_reference_0_in_extends_clause_does_not_reference_constructor_function_for_1:"Type reference '{0}' in extends clause does not reference constructor function for '{1}'.",Internal_module_reference_0_in_import_declaration_does_not_reference_module_instance_for_1:"Internal module reference '{0}' in import declaration does not reference module instance for '{1}'.",Module_0_cannot_merge_with_previous_declaration_of_1_in_a_different_file_2:"Module '{0}' cannot merge with previous declaration of '{1}' in a different file '{2}'.",Interface_0_cannot_simultaneously_extend_types_1_and_2_NL_3:"Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':{NL}{3}",Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it:"Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.",Ambient_external_module_declaration_cannot_be_reopened:"Ambient external module declaration cannot be reopened.",All_declarations_of_merged_declaration_0_must_be_exported_or_not_exported:"All declarations of merged declaration '{0}' must be exported or not exported.",super_cannot_be_referenced_in_constructor_arguments:"'super' cannot be referenced in constructor arguments.",Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:"Return type of constructor signature must be assignable to the instance type of the class.",Ambient_external_module_declaration_must_be_defined_in_global_context:"Ambient external module declaration must be defined in global context.",Ambient_external_module_declaration_cannot_specify_relative_module_name:"Ambient external module declaration cannot specify relative module name.",Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name:"Import declaration in an ambient external module declaration cannot reference external module through relative external module name.",Could_not_find_the_best_common_type_of_types_of_all_return_statement_expressions:"Could not find the best common type of types of all return statement expressions.",Import_declaration_cannot_refer_to_external_module_reference_when_noResolve_option_is_set:"Import declaration cannot refer to external module reference when --noResolve option is set.",Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:"Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.",continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:"'continue' statement can only be used within an enclosing iteration statement.",break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:"'break' statement can only be used within an enclosing iteration or switch statement.",Jump_target_not_found:"Jump target not found.",Jump_target_cannot_cross_function_boundary:"Jump target cannot cross function boundary.",Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference:"Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.",Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:"Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.",Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:"Expression resolves to '_super' that compiler uses to capture base class reference.",TypeParameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1:"TypeParameter '{0}' of constructor signature from exported interface has or is using private type '{1}'.",TypeParameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_type_1:"TypeParameter '{0}' of call signature from exported interface has or is using private type '{1}'.",TypeParameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_type_1:"TypeParameter '{0}' of public static method from exported class has or is using private type '{1}'.",TypeParameter_0_of_public_method_from_exported_class_has_or_is_using_private_type_1:"TypeParameter '{0}' of public method from exported class has or is using private type '{1}'.",TypeParameter_0_of_method_from_exported_interface_has_or_is_using_private_type_1:"TypeParameter '{0}' of method from exported interface has or is using private type '{1}'.",TypeParameter_0_of_exported_function_has_or_is_using_private_type_1:"TypeParameter '{0}' of exported function has or is using private type '{1}'.",TypeParameter_0_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_1:"TypeParameter '{0}' of constructor signature from exported interface is using inaccessible module {1}.",TypeParameter_0_of_call_signature_from_exported_interface_is_using_inaccessible_module_1:"TypeParameter '{0}' of call signature from exported interface is using inaccessible module {1}",TypeParameter_0_of_public_static_method_from_exported_class_is_using_inaccessible_module_1:"TypeParameter '{0}' of public static method from exported class is using inaccessible module {1}.",TypeParameter_0_of_public_method_from_exported_class_is_using_inaccessible_module_1:"TypeParameter '{0}' of public method from exported class is using inaccessible module {1}.",TypeParameter_0_of_method_from_exported_interface_is_using_inaccessible_module_1:"TypeParameter '{0}' of method from exported interface is using inaccessible module {1}.",TypeParameter_0_of_exported_function_is_using_inaccessible_module_1:"TypeParameter '{0}' of exported function is using inaccessible module {1}.",TypeParameter_0_of_exported_class_has_or_is_using_private_type_1:"TypeParameter '{0}' of exported class has or is using private type '{1}'.",TypeParameter_0_of_exported_interface_has_or_is_using_private_type_1:"TypeParameter '{0}' of exported interface has or is using private type '{1}'.",TypeParameter_0_of_exported_class_is_using_inaccessible_module_1:"TypeParameter '{0}' of exported class is using inaccessible module {1}.",TypeParameter_0_of_exported_interface_is_using_inaccessible_module_1:"TypeParameter '{0}' of exported interface is using inaccessible module {1}.",Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter:"Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter.",Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.",Type_of_conditional_0_must_be_identical_to_1_or_2:"Type of conditional '{0}' must be identical to '{1}' or '{2}'.",Type_of_conditional_0_must_be_identical_to_1_2_or_3:"Type of conditional '{0}' must be identical to '{1}', '{2}' or '{3}'.",Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module:"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module.",Type_0_is_missing_property_1_from_type_2:"Type '{0}' is missing property '{1}' from type '{2}'.",Types_of_property_0_of_types_1_and_2_are_incompatible:"Types of property '{0}' of types '{1}' and '{2}' are incompatible.",Types_of_property_0_of_types_1_and_2_are_incompatible_NL_3:"Types of property '{0}' of types '{1}' and '{2}' are incompatible:{NL}{3}",Property_0_defined_as_private_in_type_1_is_defined_as_public_in_type_2:"Property '{0}' defined as private in type '{1}' is defined as public in type '{2}'.",Property_0_defined_as_public_in_type_1_is_defined_as_private_in_type_2:"Property '{0}' defined as public in type '{1}' is defined as private in type '{2}'.",Types_0_and_1_define_property_2_as_private:"Types '{0}' and '{1}' define property '{2}' as private.",Call_signatures_of_types_0_and_1_are_incompatible:"Call signatures of types '{0}' and '{1}' are incompatible.",Call_signatures_of_types_0_and_1_are_incompatible_NL_2:"Call signatures of types '{0}' and '{1}' are incompatible:{NL}{2}",Type_0_requires_a_call_signature_but_type_1_lacks_one:"Type '{0}' requires a call signature, but type '{1}' lacks one.",Construct_signatures_of_types_0_and_1_are_incompatible:"Construct signatures of types '{0}' and '{1}' are incompatible.",Construct_signatures_of_types_0_and_1_are_incompatible_NL_2:"Construct signatures of types '{0}' and '{1}' are incompatible:{NL}{2}",Type_0_requires_a_construct_signature_but_type_1_lacks_one:"Type '{0}' requires a construct signature, but type '{1}' lacks one.",Index_signatures_of_types_0_and_1_are_incompatible:"Index signatures of types '{0}' and '{1}' are incompatible.",Index_signatures_of_types_0_and_1_are_incompatible_NL_2:"Index signatures of types '{0}' and '{1}' are incompatible:{NL}{2}",Call_signature_expects_0_or_fewer_parameters:"Call signature expects {0} or fewer parameters.",Could_not_apply_type_0_to_argument_1_which_is_of_type_2:"Could not apply type '{0}' to argument {1} which is of type '{2}'.",Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:"Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.",Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:"Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.",Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:"Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.",Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property:"Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.",Types_of_static_property_0_of_class_1_and_class_2_are_incompatible:"Types of static property '{0}' of class '{1}' and class '{2}' are incompatible.",Types_of_static_property_0_of_class_1_and_class_2_are_incompatible_NL_3:"Types of static property '{0}' of class '{1}' and class '{2}' are incompatible:{NL}{3}",Type_reference_cannot_refer_to_container_0:"Type reference cannot refer to container '{0}'.",Type_reference_must_refer_to_type:"Type reference must refer to type.",Enums_with_multiple_declarations_must_provide_an_initializer_for_the_first_enum_element:"Enums with multiple declarations must provide an initializer for the first enum element.",_0_overload_s:" (+ {0} overload(s))",Variable_declaration_cannot_have_the_same_name_as_an_import_declaration:"Variable declaration cannot have the same name as an import declaration.",Signature_expected_0_type_arguments_got_1_instead:"Signature expected {0} type arguments, got {1} instead.",Property_0_defined_as_optional_in_type_1_but_is_required_in_type_2:"Property '{0}' defined as optional in type '{1}', but is required in type '{2}'.",Types_0_and_1_originating_in_inifinitely_expanding_type_reference_do_not_refer_to_same_named_type:"Types '{0}' and '{1}' originating in inifinitely expanding type reference do not refer to same named type.",Types_0_and_1_originating_in_inifinitely_expanding_type_reference_have_incompatible_type_arguments:"Types '{0}' and '{1}' originating in inifinitely expanding type reference have incompatible type arguments.",Types_0_and_1_originating_in_inifinitely_expanding_type_reference_have_incompatible_type_arguments_NL_2:"Types '{0}' and '{1}' originating in inifinitely expanding type reference have incompatible type arguments:{NL}{2}",Types_of_property_0_of_types_1_and_2_are_not_identical:"Types of property '{0}' of types '{1}' and '{2}' are not identical.",Types_of_string_indexer_of_types_0_and_1_are_not_identical:"Types of string indexer of types '{0}' and '{1}' are not identical.",Types_of_number_indexer_of_types_0_and_1_are_not_identical:"Types of number indexer of types '{0}' and '{1}' are not identical.",Type_of_number_indexer_in_type_0_is_not_a_subtype_of_string_indexer_type_in_type_1_NL_2:"Type of number indexer in type '{0}' is not a subtype of string indexer type in type '{1}'.{NL}{2}",Type_of_property_0_in_type_1_is_not_a_subtype_of_string_indexer_type_in_type_2_NL_3:"Type of property '{0}' in type '{1}' is not a subtype of string indexer type in type '{2}'.{NL}{3}",Type_of_property_0_in_type_1_is_not_a_subtype_of_number_indexer_type_in_type_2_NL_3:"Type of property '{0}' in type '{1}' is not a subtype of number indexer type in type '{2}'.{NL}{3}",Current_host_does_not_support_0_option:"Current host does not support '{0}' option.",ECMAScript_target_version_0_not_supported_Specify_a_valid_target_version_1_default_or_2:"ECMAScript target version '{0}' not supported. Specify a valid target version: '{1}' (default), or '{2}'",Module_code_generation_0_not_supported:"Module code generation '{0}' not supported.",Could_not_find_file_0:"Could not find file: '{0}'.",A_file_cannot_have_a_reference_to_itself:"A file cannot have a reference to itself.",Cannot_resolve_referenced_file_0:"Cannot resolve referenced file: '{0}'.",Cannot_find_the_common_subdirectory_path_for_the_input_files:"Cannot find the common subdirectory path for the input files.",Emit_Error_0:"Emit Error: {0}.",Cannot_read_file_0_1:"Cannot read file '{0}': {1}",Unsupported_file_encoding:"Unsupported file encoding.",Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:"Locale must be of the form or -. For example '{0}' or '{1}'.",Unsupported_locale_0:"Unsupported locale: '{0}'.",Execution_Failed_NL:"Execution Failed.{NL}",Invalid_call_to_up:"Invalid call to 'up'",Invalid_call_to_down:"Invalid call to 'down'",Base64_value_0_finished_with_a_continuation_bit:"Base64 value '{0}' finished with a continuation bit.",Unknown_option_0:"Unknown option '{0}'",Expected_0_arguments_to_message_got_1_instead:"Expected {0} arguments to message, got {1} instead.",Expected_the_message_0_to_have_1_arguments_but_it_had_2:"Expected the message '{0}' to have {1} arguments, but it had {2}",Could_not_delete_file_0:"Could not delete file '{0}'",Could_not_create_directory_0:"Could not create directory '{0}'",Error_while_executing_file_0:"Error while executing file '{0}': ",Cannot_compile_external_modules_unless_the_module_flag_is_provided:"Cannot compile external modules unless the '--module' flag is provided.",Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option:"Option mapRoot cannot be specified without specifying sourcemap option.",Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option:"Option sourceRoot cannot be specified without specifying sourcemap option.",Options_mapRoot_and_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option:"Options mapRoot and sourceRoot cannot be specified without specifying sourcemap option.",Option_0_specified_without_1:"Option '{0}' specified without '{1}'",codepage_option_not_supported_on_current_platform:"'codepage' option not supported on current platform.",Concatenate_and_emit_output_to_single_file:"Concatenate and emit output to single file.",Generates_corresponding_0_file:"Generates corresponding {0} file.",Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:"Specifies the location where debugger should locate map files instead of generated locations.",Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:"Specifies the location where debugger should locate TypeScript files instead of source locations.",Watch_input_files:"Watch input files.",Redirect_output_structure_to_the_directory:"Redirect output structure to the directory.",Do_not_emit_comments_to_output:"Do not emit comments to output.",Skip_resolution_and_preprocessing:"Skip resolution and preprocessing.",Specify_ECMAScript_target_version_0_default_or_1:"Specify ECMAScript target version: '{0}' (default), or '{1}'",Specify_module_code_generation_0_or_1:"Specify module code generation: '{0}' or '{1}'",Print_this_message:"Print this message.",Print_the_compiler_s_version_0:"Print the compiler's version: {0}",Allow_use_of_deprecated_0_keyword_when_referencing_an_external_module:"Allow use of deprecated '{0}' keyword when referencing an external module.",Specify_locale_for_errors_and_messages_For_example_0_or_1:"Specify locale for errors and messages. For example '{0}' or '{1}'",Syntax_0:"Syntax: {0}",options:"options",file1:"file",Examples:"Examples:",Options:"Options:",Insert_command_line_options_and_files_from_a_file:"Insert command line options and files from a file.",Version_0:"Version {0}",Use_the_0_flag_to_see_options:"Use the '{0}' flag to see options.",NL_Recompiling_0:"{NL}Recompiling ({0}):",STRING:"STRING",KIND:"KIND",file2:"FILE",VERSION:"VERSION",LOCATION:"LOCATION",DIRECTORY:"DIRECTORY",NUMBER:"NUMBER",Specify_the_codepage_to_use_when_opening_source_files:"Specify the codepage to use when opening source files.",This_version_of_the_Javascript_runtime_does_not_support_the_0_function:"This version of the Javascript runtime does not support the '{0}' function.",Unknown_rule:"Unknown rule.",Invalid_line_number_0:"Invalid line number ({0})",Warn_on_expressions_and_declarations_with_an_implied_any_type:"Warn on expressions and declarations with an implied 'any' type.",Variable_0_implicitly_has_an_any_type:"Variable '{0}' implicitly has an 'any' type.",Parameter_0_of_1_implicitly_has_an_any_type:"Parameter '{0}' of '{1}' implicitly has an 'any' type.",Parameter_0_of_function_type_implicitly_has_an_any_type:"Parameter '{0}' of function type implicitly has an 'any' type.",Member_0_of_object_type_implicitly_has_an_any_type:"Member '{0}' of object type implicitly has an 'any' type.",new_expression_which_lacks_a_constructor_signature_implicitly_has_an_any_type:"'new' expression, which lacks a constructor signature, implicitly has an 'any' type.",_0_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:"'{0}', which lacks return-type annotation, implicitly has an 'any' return type.",Function_expression_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:"Function expression, which lacks return-type annotation, implicitly has an 'any' return type.",Parameter_0_of_lambda_function_implicitly_has_an_any_type:"Parameter '{0}' of lambda function implicitly has an 'any' type.",Constructor_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:"Constructor signature, which lacks return-type annotation, implicitly has an 'any' return type.",Lambda_Function_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:"Lambda Function, which lacks return-type annotation, implicitly has an 'any' return type.",Array_Literal_implicitly_has_an_any_type_from_widening:"Array Literal implicitly has an 'any' type from widening.",_0_which_lacks_get_accessor_and_parameter_type_annotation_on_set_accessor_implicitly_has_an_any_type:"'{0}', which lacks 'get' accessor and parameter type annotation on 'set' accessor, implicitly has an 'any' type."} }(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(){}return t.isArray=function(e){return"[object Array]"===Object.prototype.toString.apply(e,[])},t.sequenceEquals=function(e,t,n){if(e===t)return!0;if(null===e||null===t)return!1;if(e.length!==t.length)return!1;for(var r=0,i=e.length;i>r;r++)if(!n(e[r],t[r]))return!1;return!0},t.contains=function(e,t){for(var n=0;nr;r++){var o=e[r],a=t(o),s=n[a]||[];s.push(o),n[a]=s}return n},t.distinct=function(e,t){for(var n=[],r=0,i=e.length;i>r;r++){for(var o=e[r],a=0;ai&&(n=i)}return n},t.max=function(e,t){for(var n=t(e[0]),r=1;rn&&(n=i)}return n},t.last=function(t){if(0===t.length)throw e.Errors.argumentOutOfRange("array");return t[t.length-1]},t.lastOrDefault=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(t(r,n))return r}return null},t.firstOrDefault=function(e,t){for(var n=0,r=e.length;r>n;n++){var i=e[n];if(t(i,n))return i}return null},t.first=function(t,n){for(var r=0,i=t.length;i>r;r++){var o=t[r];if(!n||n(o,r))return o}throw e.Errors.invalidOperation()},t.sum=function(e,t){for(var n=0,r=0,i=e.length;i>r;r++)n+=t(e[r]);return n},t.select=function(e,t){for(var n=new Array(e.length),r=0;rn;n++)if(t(e[n]))return!0;return!1},t.all=function(e,t){for(var n=0,r=e.length;r>n;n++)if(!t(e[n]))return!1;return!0},t.binarySearch=function(e,t){for(var n=0,r=e.length-1;r>=n;){var i=n+(r-n>>1),o=e[i];if(o===t)return i;o>t?r=i-1:n=i+1}return~n},t.createArray=function(e,t){for(var n=new Array(e),r=0;e>r;r++)n[r]=t;return n},t.grow=function(e,t,n){for(var r=t-e.length,i=0;r>i;i++)e.push(n)},t.copy=function(e,t,n,r,i){for(var o=0;i>o;o++)n[r+o]=e[t+o]},t.indexOf=function(e,t){for(var n=0,r=e.length;r>n;n++)if(t(e[n]))return n;return-1},t}();e.ArrayUtilities=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e){if(0===i.length)return new o(e);var t=i.pop();return t.isReleased=!1,t.allowUndefinedValues=e,t}var r,i=[];!function(e){e[e.MaxBitsPerEncodedNumber=30]="MaxBitsPerEncodedNumber",e[e.BitsPerEncodedBiStateValue=1]="BitsPerEncodedBiStateValue",e[e.BitsPerEncodedTriStateValue=2]="BitsPerEncodedTriStateValue",e[e.BiStateEncodedTrue=1]="BiStateEncodedTrue",e[e.BiStateClearBitsMask=1]="BiStateClearBitsMask",e[e.TriStateEncodedFalse=1]="TriStateEncodedFalse",e[e.TriStateEncodedTrue=2]="TriStateEncodedTrue",e[e.TriStateClearBitsMask=3]="TriStateClearBitsMask"}(r||(r={}));var o=function(){function t(e){this.allowUndefinedValues=e,this.isReleased=!1,this.bits=[]}return t.prototype.computeTriStateArrayIndex=function(e){var t=15;return e/t>>>0},t.prototype.computeBiStateArrayIndex=function(e){var t=30;return e/t>>>0},t.prototype.computeTriStateEncodedValueIndex=function(e){var t=15;return e%t*2},t.prototype.computeBiStateEncodedValueIndex=function(e){var t=30;return e%t*1},t.prototype.valueAt=function(t){if(e.Debug.assert(!this.isReleased,"Should not use a released bitvector"),this.allowUndefinedValues){var n=this.computeTriStateArrayIndex(t),r=this.bits[n];if(void 0===r)return void 0;var i=this.computeTriStateEncodedValueIndex(t);return r&2<=e},e.assert=function(e,t,n){if("undefined"==typeof t&&(t=""),"undefined"==typeof n&&(n=null),!e){var r="";throw n&&(r="\r\nVerbose Debug Information:"+n()),new Error("Debug Failure. False expression: "+t+r)}},e.fail=function(t){e.assert(!1,t)},e.currentAssertionLevel=0,e}());e.Debug=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(){return e.Environment?e.Environment.newLine:"\r\n"}function n(e){for(var t,n=-1,r=/\{(\d+)\}/g;null!=(t=r.exec(e));){var i=parseInt(t[1]);!isNaN(i)&&i>n&&(n=i)}return n}function r(t){var n=e.diagnosticInformationMap[t];return e.Debug.assert(n),n}function i(t,r){e.LocalizedDiagnosticMessages;var o=e.LocalizedDiagnosticMessages?e.LocalizedDiagnosticMessages[t]:t;e.Debug.assert(void 0!==o&&null!==o);var a=r?r.length:0,s=1+n(t);if(s!==a)throw new Error(i(e.DiagnosticCode.Expected_0_arguments_to_message_got_1_instead,[s,a]));var l=1+n(o);if(l!==s)throw new Error(i(e.DiagnosticCode.Expected_the_message_0_to_have_1_arguments_but_it_had_2,[o,s,l]));return o=o.replace(/{(\d+)}/g,function(e,t){return"undefined"!=typeof r[t]?r[t]:e}),o=o.replace(/{(NL)}/g,function(){return e.newLine()})}function o(t,n){var o,a=r(t),s=i(t,n);return o=1===a.category?i(e.DiagnosticCode.error_TS_0_1,[a.code,s]):0===a.category?i(e.DiagnosticCode.warning_TS_0_1,[a.code,s]):s}e.LocalizedDiagnosticMessages=null;var a=function(){function t(e,t,n,r,i,o){"undefined"==typeof o&&(o=null),this._diagnosticKey=i,this._arguments=o&&o.length>0?o:null,this._fileName=e,this._lineMap=t,this._start=n,this._length=r}return t.prototype.toJSON=function(){var e={};e.start=this.start(),e.length=this.length(),e.diagnosticCode=this._diagnosticKey;var t=this.arguments();return t&&t.length>0&&(e.arguments=t),e},t.prototype.fileName=function(){return this._fileName},t.prototype.line=function(){return this._lineMap?this._lineMap.getLineNumberFromPosition(this.start()):0},t.prototype.character=function(){return this._lineMap?this._lineMap.getLineAndCharacterFromPosition(this.start()).character():0},t.prototype.start=function(){return this._start},t.prototype.length=function(){return this._length},t.prototype.diagnosticKey=function(){return this._diagnosticKey},t.prototype.arguments=function(){return this._arguments},t.prototype.text=function(){return e.getLocalizedText(this._diagnosticKey,this._arguments)},t.prototype.message=function(){return e.getDiagnosticMessage(this._diagnosticKey,this._arguments)},t.prototype.additionalLocations=function(){return[]},t.equals=function(t,n){return t._fileName===n._fileName&&t._start===n._start&&t._length===n._length&&t._diagnosticKey===n._diagnosticKey&&e.ArrayUtilities.sequenceEquals(t._arguments,n._arguments,function(e,t){return e===t})},t.prototype.info=function(){return r(this.diagnosticKey())},t}();e.Diagnostic=a,e.newLine=t,e.getLocalizedText=i,e.getDiagnosticMessage=o}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){}return e.argument=function(e,t){return new Error("Invalid argument: "+e+". "+t)},e.argumentOutOfRange=function(e){return new Error("Argument out of range: "+e)},e.argumentNull=function(e){return new Error("Argument null: "+e)},e.abstract=function(){return new Error("Operation not implemented properly by subclass.")},e.notYetImplemented=function(){return new Error("Not yet implemented.")},e.invalidOperation=function(e){return new Error("Invalid operation: "+e)},e}();e.Errors=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(){}return t.computeFnv1aCharArrayHashCode=function(n,r,i){for(var o=t.FNV_BASE,a=r+i,s=r;a>s;s++)o=e.IntegerUtilities.integerMultiplyLow32Bits(o^n[s],t.FNV_PRIME);return o},t.computeSimple31BitCharArrayHashCode=function(e,t,n){for(var r=0,i=0;n>i;i++){var o=e[t+i];r=((r<<5)-r|0)+o|0}return 2147483647&r},t.computeSimple31BitStringHashCode=function(e){for(var t=0,n=0,r=e.length,i=0;r>i;i++){var o=e.charCodeAt(n+i);t=((t<<5)-t|0)+o|0}return 2147483647&t},t.computeMurmur2StringHashCode=function(t,n){for(var r=1540483477,i=24,o=t.length,a=Math.abs(n^o),s=0;o>=2;){var l=t.charCodeAt(s),c=t.charCodeAt(s+1),u=Math.abs(l|c<<16);u=e.IntegerUtilities.integerMultiplyLow32Bits(u,r),u^=u>>i,u=e.IntegerUtilities.integerMultiplyLow32Bits(u,r),a=e.IntegerUtilities.integerMultiplyLow32Bits(a,r),a^=u,s+=2,o-=2}return 1==o&&(a^=t.charCodeAt(s),a=e.IntegerUtilities.integerMultiplyLow32Bits(a,r)),a^=a>>13,a=e.IntegerUtilities.integerMultiplyLow32Bits(a,r),a^=a>>15},t.getPrime=function(n){for(var r=0;r=n)return i}throw e.Errors.notYetImplemented()},t.expandPrime=function(e){var n=e<<1;return n>2146435069&&2146435069>e?2146435069:t.getPrime(n)},t.combine=function(e,t){return(t<<5)+t+e&2147483647},t.FNV_BASE=2166136261,t.FNV_PRIME=16777619,t.primes=[3,7,11,17,23,29,37,47,59,71,89,107,131,163,197,239,293,353,431,521,631,761,919,1103,1327,1597,1931,2333,2801,3371,4049,4861,5839,7013,8419,10103,12143,14591,17519,21023,25229,30293,36353,43627,52361,62851,75431,90523,108631,130363,156437,187751,225307,270371,324449,389357,467237,560689,672827,807403,968897,1162687,1395263,1674319,2009191,2411033,2893249,3471899,4166287,4999559,5999471,7199369],t}();e.Hash=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e,n){return"undefined"==typeof e&&(e=t.DefaultHashTableCapacity),"undefined"==typeof n&&(n=null),new o(e,n)}function r(e){return void 0===e.__hash&&(e.__hash=a,a++),e.__hash}t.DefaultHashTableCapacity=1024;var i=function(){function e(e,t,n,r){this.Key=e,this.Value=t,this.HashCode=n,this.Next=r}return e}(),o=function(){function t(t,n){this.hash=n,this.count=0;var r=e.Hash.getPrime(t);this.entries=e.ArrayUtilities.createArray(r,null)}return t.prototype.set=function(e,t){this.addOrSet(e,t,!1)},t.prototype.add=function(e,t){this.addOrSet(e,t,!0)},t.prototype.containsKey=function(e){var t=this.computeHashCode(e),n=this.findEntry(e,t);return null!==n},t.prototype.get=function(e){var t=this.computeHashCode(e),n=this.findEntry(e,t);return null===n?null:n.Value},t.prototype.computeHashCode=function(t){var n=null===this.hash?t.hashCode:this.hash(t);return n=2147483647&n,e.Debug.assert(n>=0),n},t.prototype.addOrSet=function(t,n,r){var i=this.computeHashCode(t),o=this.findEntry(t,i);if(null!==o){if(r)throw e.Errors.argument("key","Key was already in table.");return o.Key=t,void(o.Value=n)}return this.addEntry(t,n,i)},t.prototype.findEntry=function(e,t){for(var n=this.entries[t%this.entries.length];null!==n;n=n.Next)if(n.HashCode===t&&e===n.Key)return n;return null},t.prototype.addEntry=function(e,t,n){var r=n%this.entries.length,o=new i(e,t,n,this.entries[r]);return this.entries[r]=o,this.count>=this.entries.length/2&&this.grow(),this.count++,o.Key},t.prototype.grow=function(){var t=e.Hash.expandPrime(this.entries.length),n=this.entries,r=e.ArrayUtilities.createArray(t,null);this.entries=r;for(var i=0;i0?a.pop():new ActiveXObject("ADODB.Stream")}function r(e){a.push(e)}try{var i=new ActiveXObject("Scripting.FileSystemObject")}catch(o){return null}for(var a=[],s=[],l=0;l>0}function n(e,t){var n=((4294901760&e)*t>>>0)+((65535&e)*t>>>0)>>>0;return n}function r(e,t){var n=65535&e,r=e>>>16,i=65535&t,o=t>>>16,a=r*o+((n*i>>>17)+n*o>>>15);return a}function i(e){return/^[0-9]+$/.test(e)}function o(e){return/^0(x|X)[0-9a-fA-F]+$/.test(e)}e.integerDivide=t,e.integerMultiplyLow32Bits=n,e.integerMultiplyHigh32Bits=r,e.isInteger=i,e.isHexInteger=o}(e.IntegerUtilities||(e.IntegerUtilities={}));e.IntegerUtilities}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(e,t){this._computeLineStarts=e,this.length=t,this._lineStarts=null}return t.prototype.toJSON=function(){return{lineStarts:this.lineStarts(),length:this.length}},t.prototype.equals=function(t){return this.length===t.length&&e.ArrayUtilities.sequenceEquals(this.lineStarts(),t.lineStarts(),function(e,t){return e===t})},t.prototype.lineStarts=function(){return null===this._lineStarts&&(this._lineStarts=this._computeLineStarts()),this._lineStarts},t.prototype.lineCount=function(){return this.lineStarts().length},t.prototype.getPosition=function(e,t){return this.lineStarts()[e]+t},t.prototype.getLineNumberFromPosition=function(t){if(0>t||t>this.length)throw e.Errors.argumentOutOfRange("position");if(t===this.length)return this.lineCount()-1;var n=e.ArrayUtilities.binarySearch(this.lineStarts(),t);return 0>n&&(n=~n-1),n},t.prototype.getLineStartPosition=function(e){return this.lineStarts()[e]},t.prototype.fillLineAndCharacterFromPosition=function(t,n){if(0>t||t>this.length)throw e.Errors.argumentOutOfRange("position");var r=this.getLineNumberFromPosition(t);n.line=r,n.character=t-this.lineStarts()[r]},t.prototype.getLineAndCharacterFromPosition=function(t){if(0>t||t>this.length)throw e.Errors.argumentOutOfRange("position");var n=this.getLineNumberFromPosition(t);return new e.LineAndCharacter(n,t-this.lineStarts()[n])},t.empty=new t(function(){return[0]},0),t}();e.LineMap=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(t,n){if(this._line=0,this._character=0,0>t)throw e.Errors.argumentOutOfRange("line");if(0>n)throw e.Errors.argumentOutOfRange("character");this._line=t,this._character=n}return t.prototype.line=function(){return this._line},t.prototype.character=function(){return this._character},t}();e.LineAndCharacter=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){}return e.max=function(e,t){return e>=t?e:t},e.min=function(e,t){return t>=e?e:t},e}();e.MathPrototype=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){t.DefaultStringTableCapacity=256;var n=function(){function e(e,t,n){this.Text=e,this.HashCode=t,this.Next=n}return e}(),r=function(){function t(t){this.count=0;var n=e.Hash.getPrime(t);this.entries=e.ArrayUtilities.createArray(n,null)}return t.prototype.addCharArray=function(t,n,r){var i=2147483647&e.Hash.computeSimple31BitCharArrayHashCode(t,n,r),o=this.findCharArrayEntry(t,n,r,i);if(null!==o)return o.Text;var a=t.slice(n,n+r);return this.addEntry(e.StringUtilities.fromCharCodeArray(a),i)},t.prototype.findCharArrayEntry=function(e,n,r,i){for(var o=this.entries[i%this.entries.length];null!==o;o=o.Next)if(o.HashCode===i&&t.textCharArrayEquals(o.Text,e,n,r))return o;return null},t.prototype.addEntry=function(e,t){var r=t%this.entries.length,i=new n(e,t,this.entries[r]);return this.entries[r]=i,this.count===this.entries.length&&this.grow(),this.count++,i.Text},t.prototype.grow=function(){var t=e.Hash.expandPrime(this.entries.length),n=this.entries,r=e.ArrayUtilities.createArray(t,null);this.entries=r;for(var i=0;io;o++){if(e.charCodeAt(o)!==t[i])return!1;i++}return!0},t}();t.StringTable=r,t.DefaultStringTable=new r(t.DefaultStringTableCapacity)}(e.Collections||(e.Collections={}));e.Collections}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){}return e.isString=function(e){return"[object String]"===Object.prototype.toString.apply(e,[])},e.fromCharCodeArray=function(e){return String.fromCharCode.apply(null,e)},e.endsWith=function(e,t){return e.substring(e.length-t.length,e.length)===t},e.startsWith=function(e,t){return e.substr(0,t.length)===t},e.copyTo=function(e,t,n,r,i){for(var o=0;i>o;o++)n[r+o]=e.charCodeAt(t+o)},e.repeat=function(e,t){return Array(t+1).join(e)},e.stringEquals=function(e,t){return e===t},e}();e.StringUtilities=t}(TypeScript||(TypeScript={}));var global=Function("return this").call(null),TypeScript;!function(e){var t;!function(e){e.now,e.resolution,"undefined"!=typeof WScript&&"undefined"!=typeof global.WScript.InitializeProjection?(global.WScript.InitializeProjection(),e.now=function(){return TestUtilities.QueryPerformanceCounter()},e.resolution=TestUtilities.QueryPerformanceFrequency()):(e.now=function(){return Date.now()},e.resolution=1e3)}(t||(t={}));var n=function(){function e(){this.time=0}return e.prototype.start=function(){this.time=0,this.startTime=t.now()},e.prototype.end=function(){this.time=t.now()-this.startTime},e}();e.Timer=n}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Message=2]="Message",e[e.NoPrefix=3]="NoPrefix"}(e.DiagnosticCategory||(e.DiagnosticCategory={}));e.DiagnosticCategory}(TypeScript||(TypeScript={}));var TypeScript;!function(e){e.diagnosticInformationMap={"error TS{0}: {1}":{code:0,category:3},"warning TS{0}: {1}":{code:1,category:3},"Unrecognized escape sequence.":{code:1e3,category:1},"Unexpected character {0}.":{code:1001,category:1},"Missing close quote character.":{code:1002,category:1},"Identifier expected.":{code:1003,category:1},"'{0}' keyword expected.":{code:1004,category:1},"'{0}' expected.":{code:1005,category:1},"Identifier expected; '{0}' is a keyword.":{code:1006,category:1},"Automatic semicolon insertion not allowed.":{code:1007,category:1},"Unexpected token; '{0}' expected.":{code:1008,category:1},"Trailing separator not allowed.":{code:1009,category:1},"'*/' expected.":{code:1010,category:1},"'public' or 'private' modifier must precede 'static'.":{code:1011,category:1},"Unexpected token.":{code:1012,category:1},"Catch clause parameter cannot have a type annotation.":{code:1013,category:1},"Rest parameter must be last in list.":{code:1014,category:1},"Parameter cannot have question mark and initializer.":{code:1015,category:1},"Required parameter cannot follow optional parameter.":{code:1016,category:1},"Index signatures cannot have rest parameters.":{code:1017,category:1},"Index signature parameter cannot have accessibility modifiers.":{code:1018,category:1},"Index signature parameter cannot have a question mark.":{code:1019,category:1},"Index signature parameter cannot have an initializer.":{code:1020,category:1},"Index signature must have a type annotation.":{code:1021,category:1},"Index signature parameter must have a type annotation.":{code:1022,category:1},"Index signature parameter type must be 'string' or 'number'.":{code:1023,category:1},"'extends' clause already seen.":{code:1024,category:1},"'extends' clause must precede 'implements' clause.":{code:1025,category:1},"Classes can only extend a single class.":{code:1026,category:1},"'implements' clause already seen.":{code:1027,category:1},"Accessibility modifier already seen.":{code:1028,category:1},"'{0}' modifier must precede '{1}' modifier.":{code:1029,category:1},"'{0}' modifier already seen.":{code:1030,category:1},"'{0}' modifier cannot appear on a class element.":{code:1031,category:1},"Interface declaration cannot have 'implements' clause.":{code:1032,category:1},"'super' invocation cannot have type arguments.":{code:1034,category:1},"Only ambient modules can use quoted names.":{code:1035,category:1},"Statements are not allowed in ambient contexts.":{code:1036,category:1},"Implementations are not allowed in ambient contexts.":{code:1037,category:1},"'declare' modifier not allowed for code already in an ambient context.":{code:1038,category:1},"Initializers are not allowed in ambient contexts.":{code:1039,category:1},"Parameter property declarations can only be used in constructors.":{code:1040,category:1},"Function implementation expected.":{code:1041,category:1},"Constructor implementation expected.":{code:1042,category:1},"Function overload name must be '{0}'.":{code:1043,category:1},"'{0}' modifier cannot appear on a module element.":{code:1044,category:1},"'declare' modifier cannot appear on an interface declaration.":{code:1045,category:1},"'declare' modifier required for top level element.":{code:1046,category:1},"Rest parameter cannot be optional.":{code:1047,category:1},"Rest parameter cannot have an initializer.":{code:1048,category:1},"'set' accessor must have one and only one parameter.":{code:1049,category:1},"'set' accessor parameter cannot be optional.":{code:1051,category:1},"'set' accessor parameter cannot have an initializer.":{code:1052,category:1},"'set' accessor cannot have rest parameter.":{code:1053,category:1},"'get' accessor cannot have parameters.":{code:1054,category:1},"Modifiers cannot appear here.":{code:1055,category:1},"Accessors are only available when targeting ECMAScript 5 and higher.":{code:1056,category:1},"Class name cannot be '{0}'.":{code:1057,category:1},"Interface name cannot be '{0}'.":{code:1058,category:1},"Enum name cannot be '{0}'.":{code:1059,category:1},"Module name cannot be '{0}'.":{code:1060,category:1},"Enum member must have initializer.":{code:1061,category:1},"Export assignment cannot be used in internal modules.":{code:1063,category:1},"Export assignment not allowed in module with exported element.":{code:1064,category:1},"Module cannot have multiple export assignments.":{code:1065,category:1},"Ambient enum elements can only have integer literal initializers.":{code:1066,category:1},"module, class, interface, enum, import or statement":{code:1067,category:3},"constructor, function, accessor or variable":{code:1068,category:3},statement:{code:1069,category:3},"case or default clause":{code:1070,category:3},identifier:{code:1071,category:3},"call, construct, index, property or function signature":{code:1072,category:3},expression:{code:1073,category:3},"type name":{code:1074,category:3},"property or accessor":{code:1075,category:3},parameter:{code:1076,category:3},type:{code:1077,category:3},"type parameter":{code:1078,category:3},"'declare' modifier not allowed on import declaration.":{code:1079,category:1},"Function overload must be static.":{code:1080,category:1},"Function overload must not be static.":{code:1081,category:1},"Parameter property declarations cannot be used in an ambient context.":{code:1082,category:1},"Parameter property declarations cannot be used in a constructor overload.":{code:1083,category:1},"Invalid 'reference' directive syntax.":{code:1084,category:1},"Octal literals are not available when targeting ECMAScript 5 and higher.":{code:1085,category:1},"Accessors are not allowed in ambient contexts.":{code:1086,category:1},"'{0}' modifier cannot appear on a constructor declaration.":{code:1089,category:1},"'{0}' modifier cannot appear on a parameter.":{code:1090,category:1},"Duplicate identifier '{0}'.":{code:2e3,category:1},"The name '{0}' does not exist in the current scope.":{code:2001,category:1},"The name '{0}' does not refer to a value.":{code:2002,category:1},"'super' can only be used inside a class instance method.":{code:2003,category:1},"The left-hand side of an assignment expression must be a variable, property or indexer.":{code:2004,category:1},"Value of type '{0}' is not callable. Did you mean to include 'new'?":{code:2161,category:1},"Value of type '{0}' is not callable.":{code:2006,category:1},"Value of type '{0}' is not newable.":{code:2007,category:1},"Value of type '{0}' is not indexable by type '{1}'.":{code:2008,category:1},"Operator '{0}' cannot be applied to types '{1}' and '{2}'.":{code:2009,category:1},"Operator '{0}' cannot be applied to types '{1}' and '{2}': {3}":{code:2010,category:1},"Cannot convert '{0}' to '{1}'.":{code:2011,category:1},"Cannot convert '{0}' to '{1}':{NL}{2}":{code:2012,category:1},"Expected var, class, interface, or module.":{code:2013,category:1},"Operator '{0}' cannot be applied to type '{1}'.":{code:2014,category:1},"Getter '{0}' already declared.":{code:2015,category:1},"Setter '{0}' already declared.":{code:2016,category:1},"Exported class '{0}' extends private class '{1}'.":{code:2018,category:1},"Exported class '{0}' implements private interface '{1}'.":{code:2019,category:1},"Exported interface '{0}' extends private interface '{1}'.":{code:2020,category:1},"Exported class '{0}' extends class from inaccessible module {1}.":{code:2021,category:1},"Exported class '{0}' implements interface from inaccessible module {1}.":{code:2022,category:1},"Exported interface '{0}' extends interface from inaccessible module {1}.":{code:2023,category:1},"Public static property '{0}' of exported class has or is using private type '{1}'.":{code:2024,category:1},"Public property '{0}' of exported class has or is using private type '{1}'.":{code:2025,category:1},"Property '{0}' of exported interface has or is using private type '{1}'.":{code:2026,category:1},"Exported variable '{0}' has or is using private type '{1}'.":{code:2027,category:1},"Public static property '{0}' of exported class is using inaccessible module {1}.":{code:2028,category:1},"Public property '{0}' of exported class is using inaccessible module {1}.":{code:2029,category:1},"Property '{0}' of exported interface is using inaccessible module {1}.":{code:2030,category:1},"Exported variable '{0}' is using inaccessible module {1}.":{code:2031,category:1},"Parameter '{0}' of constructor from exported class has or is using private type '{1}'.":{code:2032,category:1},"Parameter '{0}' of public static property setter from exported class has or is using private type '{1}'.":{code:2033,category:1},"Parameter '{0}' of public property setter from exported class has or is using private type '{1}'.":{code:2034,category:1},"Parameter '{0}' of constructor signature from exported interface has or is using private type '{1}'.":{code:2035,category:1},"Parameter '{0}' of call signature from exported interface has or is using private type '{1}'.":{code:2036,category:1},"Parameter '{0}' of public static method from exported class has or is using private type '{1}'.":{code:2037,category:1},"Parameter '{0}' of public method from exported class has or is using private type '{1}'.":{code:2038,category:1},"Parameter '{0}' of method from exported interface has or is using private type '{1}'.":{code:2039,category:1},"Parameter '{0}' of exported function has or is using private type '{1}'.":{code:2040,category:1},"Parameter '{0}' of constructor from exported class is using inaccessible module {1}.":{code:2041,category:1},"Parameter '{0}' of public static property setter from exported class is using inaccessible module {1}.":{code:2042,category:1},"Parameter '{0}' of public property setter from exported class is using inaccessible module {1}.":{code:2043,category:1},"Parameter '{0}' of constructor signature from exported interface is using inaccessible module {1}.":{code:2044,category:1},"Parameter '{0}' of call signature from exported interface is using inaccessible module {1}":{code:2045,category:1},"Parameter '{0}' of public static method from exported class is using inaccessible module {1}.":{code:2046,category:1},"Parameter '{0}' of public method from exported class is using inaccessible module {1}.":{code:2047,category:1},"Parameter '{0}' of method from exported interface is using inaccessible module {1}.":{code:2048,category:1},"Parameter '{0}' of exported function is using inaccessible module {1}.":{code:2049,category:1},"Return type of public static property getter from exported class has or is using private type '{0}'.":{code:2050,category:1},"Return type of public property getter from exported class has or is using private type '{0}'.":{code:2051,category:1},"Return type of constructor signature from exported interface has or is using private type '{0}'.":{code:2052,category:1},"Return type of call signature from exported interface has or is using private type '{0}'.":{code:2053,category:1},"Return type of index signature from exported interface has or is using private type '{0}'.":{code:2054,category:1},"Return type of public static method from exported class has or is using private type '{0}'.":{code:2055,category:1},"Return type of public method from exported class has or is using private type '{0}'.":{code:2056,category:1},"Return type of method from exported interface has or is using private type '{0}'.":{code:2057,category:1},"Return type of exported function has or is using private type '{0}'.":{code:2058,category:1},"Return type of public static property getter from exported class is using inaccessible module {0}.":{code:2059,category:1},"Return type of public property getter from exported class is using inaccessible module {0}.":{code:2060,category:1},"Return type of constructor signature from exported interface is using inaccessible module {0}.":{code:2061,category:1},"Return type of call signature from exported interface is using inaccessible module {0}.":{code:2062,category:1},"Return type of index signature from exported interface is using inaccessible module {0}.":{code:2063,category:1},"Return type of public static method from exported class is using inaccessible module {0}.":{code:2064,category:1},"Return type of public method from exported class is using inaccessible module {0}.":{code:2065,category:1},"Return type of method from exported interface is using inaccessible module {0}.":{code:2066,category:1},"Return type of exported function is using inaccessible module {0}.":{code:2067,category:1},"'new T[]' cannot be used to create an array. Use 'new Array()' instead.":{code:2068,category:1},"A parameter list must follow a generic type argument list. '(' expected.":{code:2069,category:1},"Multiple constructor implementations are not allowed.":{code:2070,category:1},"Unable to resolve external module '{0}'.":{code:2071,category:1},"Module cannot be aliased to a non-module type.":{code:2072,category:1},"A class may only extend another class.":{code:2073,category:1},"A class may only implement another class or interface.":{code:2074,category:1},"An interface may only extend another class or interface.":{code:2075,category:1},"Unable to resolve type.":{code:2077,category:1},"Unable to resolve type of '{0}'.":{code:2078,category:1},"Unable to resolve type parameter constraint.":{code:2079,category:1},"Type parameter constraint cannot be a primitive type.":{code:2080,category:1},"Supplied parameters do not match any signature of call target.":{code:2081,category:1},"Supplied parameters do not match any signature of call target:{NL}{0}":{code:2082,category:1},"Invalid 'new' expression.":{code:2083,category:1},"Call signatures used in a 'new' expression must have a 'void' return type.":{code:2084,category:1},"Could not select overload for 'new' expression.":{code:2085,category:1},"Type '{0}' does not satisfy the constraint '{1}' for type parameter '{2}'.":{code:2086,category:1},"Could not select overload for 'call' expression.":{code:2087,category:1},"Cannot invoke an expression whose type lacks a call signature.":{code:2088,category:1},"Calls to 'super' are only valid inside a class.":{code:2089,category:1},"Generic type '{0}' requires {1} type argument(s).":{code:2090,category:1},"Type of array literal cannot be determined. Best common type could not be found for array elements.":{code:2092,category:1},"Could not find enclosing symbol for dotted name '{0}'.":{code:2093,category:1},"The property '{0}' does not exist on value of type '{1}'.":{code:2094,category:1},"Could not find symbol '{0}'.":{code:2095,category:1},"'get' and 'set' accessor must have the same type.":{code:2096,category:1},"'this' cannot be referenced in current location.":{code:2097,category:1},"Static methods cannot reference class type parameters.":{code:2099,category:1},"Class '{0}' is recursively referenced as a base type of itself.":{code:2100,category:1},"Interface '{0}' is recursively referenced as a base type of itself.":{code:2101,category:1},"'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.":{code:2102,category:1},"'super' cannot be referenced in non-derived classes.":{code:2103,category:1},"A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.":{code:2104,category:1},"Constructors for derived classes must contain a 'super' call.":{code:2105,category:1},"Super calls are not permitted outside constructors or in local functions inside constructors.":{code:2106,category:1},"'{0}.{1}' is inaccessible.":{code:2107,category:1},"'this' cannot be referenced within module bodies.":{code:2108,category:1},"Invalid '+' expression - types not known to support the addition operator.":{code:2111,category:1},"The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.":{code:2112,category:1},"The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.":{code:2113,category:1},"The type of a unary arithmetic operation operand must be of type 'any', 'number' or an enum type.":{code:2114,category:1},"Variable declarations of a 'for' statement cannot use a type annotation.":{code:2115,category:1},"Variable declarations of a 'for' statement must be of types 'string' or 'any'.":{code:2116,category:1},"The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.":{code:2117,category:1},"The left-hand side of an 'in' expression must be of types 'any', 'string' or 'number'.":{code:2118,category:1},"The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.":{code:2119,category:1},"The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.":{code:2120,category:1},"The right-hand side of an 'instanceof' expression must be of type 'any' or a subtype of the 'Function' interface type.":{code:2121,category:1},"Setters cannot return a value.":{code:2122,category:1},"Tried to query type of uninitialized module '{0}'.":{code:2123,category:1},"Tried to set variable type to uninitialized module type '{0}'.":{code:2124,category:1},"Function '{0}' declared a non-void return type, but has no return expression.":{code:2125,category:1},"Getters must return a value.":{code:2126,category:1},"Getter and setter accessors do not agree in visibility.":{code:2127,category:1},"Invalid left-hand side of assignment expression.":{code:2130,category:1},"Function declared a non-void return type, but has no return expression.":{code:2131,category:1},"Cannot resolve return type reference.":{code:2132,category:1},"Constructors cannot have a return type of 'void'.":{code:2133,category:1},"Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.":{code:2134,category:1},"All symbols within a with block will be resolved to 'any'.":{code:2135,category:1},"Import declarations in an internal module cannot reference an external module.":{code:2136,category:1},"Class {0} declares interface {1} but does not implement it:{NL}{2}":{code:2137,category:1},"Class {0} declares class {1} as an interface but does not implement it:{NL}{2}":{code:2138,category:1},"The operand of an increment or decrement operator must be a variable, property or indexer.":{code:2139,category:1},"'this' cannot be referenced in static initializers in a class body.":{code:2140,category:1},"Class '{0}' cannot extend class '{1}':{NL}{2}":{code:2141,category:1},"Interface '{0}' cannot extend class '{1}':{NL}{2}":{code:2142,category:1},"Interface '{0}' cannot extend interface '{1}':{NL}{2}":{code:2143,category:1},"Duplicate overload signature for '{0}'.":{code:2144,category:1},"Duplicate constructor overload signature.":{code:2145,category:1},"Duplicate overload call signature.":{code:2146,category:1},"Duplicate overload construct signature.":{code:2147,category:1},"Overload signature is not compatible with function definition.":{code:2148,category:1},"Overload signature is not compatible with function definition:{NL}{0}":{code:2149,category:1},"Overload signatures must all be public or private.":{code:2150,category:1},"Overload signatures must all be exported or not exported.":{code:2151,category:1},"Overload signatures must all be ambient or non-ambient.":{code:2152,category:1},"Overload signatures must all be optional or required.":{code:2153,category:1},"Specialized overload signature is not subtype of any non-specialized signature.":{code:2154,category:1},"'this' cannot be referenced in constructor arguments.":{code:2155,category:1},"Instance member cannot be accessed off a class.":{code:2157,category:1},"Untyped function calls may not accept type arguments.":{code:2158,category:1},"Non-generic functions may not accept type arguments.":{code:2159,category:1},"A generic type may not reference itself with a wrapped form of its own type parameters.":{code:2160,category:1},"Rest parameters must be array types.":{code:2162,category:1},"Overload signature implementation cannot use specialized type.":{code:2163,category:1},"Export assignments may only be used at the top-level of external modules.":{code:2164,category:1},"Export assignments may only be made with variables, functions, classes, interfaces, enums and internal modules.":{code:2165,category:1},"Only public methods of the base class are accessible via the 'super' keyword.":{code:2166,category:1},"Numeric indexer type '{0}' must be a subtype of string indexer type '{1}'.":{code:2167,category:1},"Numeric indexer type '{0}' must be a subtype of string indexer type '{1}':{NL}{2}":{code:2168,category:1},"All numerically named properties must be subtypes of numeric indexer type '{0}'.":{code:2169,category:1},"All numerically named properties must be subtypes of numeric indexer type '{0}':{NL}{1}":{code:2170,category:1},"All named properties must be subtypes of string indexer type '{0}'.":{code:2171,category:1},"All named properties must be subtypes of string indexer type '{0}':{NL}{1}":{code:2172,category:1},"Generic type references must include all type arguments.":{code:2173,category:1},"Default arguments are not allowed in an overload parameter.":{code:2174,category:1},"Overloads cannot differ only by return type.":{code:2175,category:1},"Function expression declared a non-void return type, but has no return expression.":{code:2176,category:1},"Import declaration referencing identifier from internal module can only be made with variables, functions, classes, interfaces, enums and internal modules.":{code:2177,category:1},"Could not find symbol '{0}' in module '{1}'.":{code:2178,category:1},"Unable to resolve module reference '{0}'.":{code:2179,category:1},"Could not find module '{0}' in module '{1}'.":{code:2180,category:1},"Exported import declaration '{0}' is assigned value with type that has or is using private type '{1}'.":{code:2181,category:1},"Exported import declaration '{0}' is assigned value with type that is using inaccessible module '{1}'.":{code:2182,category:1},"Exported import declaration '{0}' is assigned type that has or is using private type '{1}'.":{code:2183,category:1},"Exported import declaration '{0}' is assigned type that is using inaccessible module '{1}'.":{code:2184,category:1},"Exported import declaration '{0}' is assigned container that is or is using inaccessible module '{1}'.":{code:2185,category:1},"Type reference '{0}' in extends clause does not reference constructor function for '{1}'.":{code:2186,category:1},"Internal module reference '{0}' in import declaration does not reference module instance for '{1}'.":{code:2187,category:1},"Module '{0}' cannot merge with previous declaration of '{1}' in a different file '{2}'.":{code:2188,category:1},"Interface '{0}' cannot simultaneously extend types '{1}' and '{2}':{NL}{3}":{code:2189,category:1},"Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.":{code:2190,category:1},"Ambient external module declaration cannot be reopened.":{code:2191,category:1},"All declarations of merged declaration '{0}' must be exported or not exported.":{code:2192,category:1},"'super' cannot be referenced in constructor arguments.":{code:2193,category:1},"Return type of constructor signature must be assignable to the instance type of the class.":{code:2194,category:1},"Ambient external module declaration must be defined in global context.":{code:2195,category:1},"Ambient external module declaration cannot specify relative module name.":{code:2196,category:1},"Import declaration in an ambient external module declaration cannot reference external module through relative external module name.":{code:2197,category:1},"Could not find the best common type of types of all return statement expressions.":{code:2198,category:1},"Import declaration cannot refer to external module reference when --noResolve option is set.":{code:2199,category:1},"Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.":{code:2200,category:1},"'continue' statement can only be used within an enclosing iteration statement.":{code:2201,category:1},"'break' statement can only be used within an enclosing iteration or switch statement.":{code:2202,category:1},"Jump target not found.":{code:2203,category:1},"Jump target cannot cross function boundary.":{code:2204,category:1},"Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.":{code:2205,category:1},"Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.":{code:2206,category:1},"Expression resolves to '_super' that compiler uses to capture base class reference.":{code:2207,category:1},"TypeParameter '{0}' of constructor signature from exported interface has or is using private type '{1}'.":{code:2208,category:1},"TypeParameter '{0}' of call signature from exported interface has or is using private type '{1}'.":{code:2209,category:1},"TypeParameter '{0}' of public static method from exported class has or is using private type '{1}'.":{code:2210,category:1},"TypeParameter '{0}' of public method from exported class has or is using private type '{1}'.":{code:2211,category:1},"TypeParameter '{0}' of method from exported interface has or is using private type '{1}'.":{code:2212,category:1},"TypeParameter '{0}' of exported function has or is using private type '{1}'.":{code:2213,category:1},"TypeParameter '{0}' of constructor signature from exported interface is using inaccessible module {1}.":{code:2214,category:1},"TypeParameter '{0}' of call signature from exported interface is using inaccessible module {1}":{code:2215,category:1},"TypeParameter '{0}' of public static method from exported class is using inaccessible module {1}.":{code:2216,category:1},"TypeParameter '{0}' of public method from exported class is using inaccessible module {1}.":{code:2217,category:1},"TypeParameter '{0}' of method from exported interface is using inaccessible module {1}.":{code:2218,category:1},"TypeParameter '{0}' of exported function is using inaccessible module {1}.":{code:2219,category:1},"TypeParameter '{0}' of exported class has or is using private type '{1}'.":{code:2220,category:1},"TypeParameter '{0}' of exported interface has or is using private type '{1}'.":{code:2221,category:1},"TypeParameter '{0}' of exported class is using inaccessible module {1}.":{code:2222,category:1},"TypeParameter '{0}' of exported interface is using inaccessible module {1}.":{code:2223,category:1},"Duplicate identifier '_i'. Compiler uses '_i' to initialize rest parameter.":{code:2224,category:1},"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.":{code:2225,category:1},"Type of conditional '{0}' must be identical to '{1}' or '{2}'.":{code:2226,category:1},"Type of conditional '{0}' must be identical to '{1}', '{2}' or '{3}'.":{code:2227,category:1},"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of an external module.":{code:2228,category:1},"Type '{0}' is missing property '{1}' from type '{2}'.":{code:4e3,category:3},"Types of property '{0}' of types '{1}' and '{2}' are incompatible.":{code:4001,category:3},"Types of property '{0}' of types '{1}' and '{2}' are incompatible:{NL}{3}":{code:4002,category:3},"Property '{0}' defined as private in type '{1}' is defined as public in type '{2}'.":{code:4003,category:3},"Property '{0}' defined as public in type '{1}' is defined as private in type '{2}'.":{code:4004,category:3},"Types '{0}' and '{1}' define property '{2}' as private.":{code:4005,category:3},"Call signatures of types '{0}' and '{1}' are incompatible.":{code:4006,category:3},"Call signatures of types '{0}' and '{1}' are incompatible:{NL}{2}":{code:4007,category:3},"Type '{0}' requires a call signature, but type '{1}' lacks one.":{code:4008,category:3},"Construct signatures of types '{0}' and '{1}' are incompatible.":{code:4009,category:3},"Construct signatures of types '{0}' and '{1}' are incompatible:{NL}{2}":{code:4010,category:3},"Type '{0}' requires a construct signature, but type '{1}' lacks one.":{code:4011,category:3},"Index signatures of types '{0}' and '{1}' are incompatible.":{code:4012,category:3},"Index signatures of types '{0}' and '{1}' are incompatible:{NL}{2}":{code:4013,category:3},"Call signature expects {0} or fewer parameters.":{code:4014,category:3},"Could not apply type '{0}' to argument {1} which is of type '{2}'.":{code:4015,category:3},"Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.":{code:4016,category:3},"Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.":{code:4017,category:3},"Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.":{code:4018,category:3},"Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.":{code:4019,category:3},"Types of static property '{0}' of class '{1}' and class '{2}' are incompatible.":{code:4020,category:3},"Types of static property '{0}' of class '{1}' and class '{2}' are incompatible:{NL}{3}":{code:4021,category:3},"Type reference cannot refer to container '{0}'.":{code:4022,category:1},"Type reference must refer to type.":{code:4023,category:1},"Enums with multiple declarations must provide an initializer for the first enum element.":{code:4024,category:1}," (+ {0} overload(s))":{code:4025,category:2},"Variable declaration cannot have the same name as an import declaration.":{code:4026,category:1},"Signature expected {0} type arguments, got {1} instead.":{code:4027,category:1},"Property '{0}' defined as optional in type '{1}', but is required in type '{2}'.":{code:4028,category:3},"Types '{0}' and '{1}' originating in inifinitely expanding type reference do not refer to same named type.":{code:4029,category:3},"Types '{0}' and '{1}' originating in inifinitely expanding type reference have incompatible type arguments.":{code:4030,category:3},"Types '{0}' and '{1}' originating in inifinitely expanding type reference have incompatible type arguments:{NL}{2}":{code:4031,category:3},"Types of property '{0}' of types '{1}' and '{2}' are not identical.":{code:4032,category:3},"Types of string indexer of types '{0}' and '{1}' are not identical.":{code:4033,category:3},"Types of number indexer of types '{0}' and '{1}' are not identical.":{code:4034,category:3},"Type of number indexer in type '{0}' is not a subtype of string indexer type in type '{1}'.{NL}{2}":{code:4035,category:3},"Type of property '{0}' in type '{1}' is not a subtype of string indexer type in type '{2}'.{NL}{3}":{code:4036,category:3},"Type of property '{0}' in type '{1}' is not a subtype of number indexer type in type '{2}'.{NL}{3}":{code:4037,category:3},"Current host does not support '{0}' option.":{code:5001,category:1},"ECMAScript target version '{0}' not supported. Specify a valid target version: '{1}' (default), or '{2}'":{code:5002,category:1},"Module code generation '{0}' not supported.":{code:5003,category:1},"Could not find file: '{0}'.":{code:5004,category:1},"A file cannot have a reference to itself.":{code:5006,category:1},"Cannot resolve referenced file: '{0}'.":{code:5007,category:1},"Cannot find the common subdirectory path for the input files.":{code:5009,category:1},"Emit Error: {0}.":{code:5011,category:1},"Cannot read file '{0}': {1}":{code:5012,category:1},"Unsupported file encoding.":{code:5013,category:3},"Locale must be of the form or -. For example '{0}' or '{1}'.":{code:5014,category:1},"Unsupported locale: '{0}'.":{code:5015,category:1},"Execution Failed.{NL}":{code:5016,category:1},"Invalid call to 'up'":{code:5019,category:1},"Invalid call to 'down'":{code:5020,category:1},"Base64 value '{0}' finished with a continuation bit.":{code:5021,category:1},"Unknown option '{0}'":{code:5023,category:1},"Expected {0} arguments to message, got {1} instead.":{code:5024,category:1},"Expected the message '{0}' to have {1} arguments, but it had {2}":{code:5025,category:1},"Could not delete file '{0}'":{code:5034,category:1},"Could not create directory '{0}'":{code:5035,category:1},"Error while executing file '{0}': ":{code:5036,category:1},"Cannot compile external modules unless the '--module' flag is provided.":{code:5037,category:1},"Option mapRoot cannot be specified without specifying sourcemap option.":{code:5038,category:1},"Option sourceRoot cannot be specified without specifying sourcemap option.":{code:5039,category:1},"Options mapRoot and sourceRoot cannot be specified without specifying sourcemap option.":{code:5040,category:1},"Option '{0}' specified without '{1}'":{code:5041,category:1},"'codepage' option not supported on current platform.":{code:5042,category:1},"Concatenate and emit output to single file.":{code:6001,category:2},"Generates corresponding {0} file.":{code:6002,category:2},"Specifies the location where debugger should locate map files instead of generated locations.":{code:6003,category:2},"Specifies the location where debugger should locate TypeScript files instead of source locations.":{code:6004,category:2},"Watch input files.":{code:6005,category:2},"Redirect output structure to the directory.":{code:6006,category:2},"Do not emit comments to output.":{code:6009,category:2},"Skip resolution and preprocessing.":{code:6010,category:2},"Specify ECMAScript target version: '{0}' (default), or '{1}'":{code:6015,category:2},"Specify module code generation: '{0}' or '{1}'":{code:6016,category:2},"Print this message.":{code:6017,category:2},"Print the compiler's version: {0}":{code:6019,category:2},"Allow use of deprecated '{0}' keyword when referencing an external module.":{code:6021,category:2},"Specify locale for errors and messages. For example '{0}' or '{1}'":{code:6022,category:2},"Syntax: {0}":{code:6023,category:2},options:{code:6024,category:2},file1:{code:6025,category:2},"Examples:":{code:6026,category:2},"Options:":{code:6027,category:2},"Insert command line options and files from a file.":{code:6030,category:2},"Version {0}":{code:6029,category:2},"Use the '{0}' flag to see options.":{code:6031,category:2},"{NL}Recompiling ({0}):":{code:6032,category:2},STRING:{code:6033,category:2},KIND:{code:6034,category:2},file2:{code:6035,category:2},VERSION:{code:6036,category:2},LOCATION:{code:6037,category:2},DIRECTORY:{code:6038,category:2},NUMBER:{code:6039,category:2},"Specify the codepage to use when opening source files.":{code:6040,category:2},"This version of the Javascript runtime does not support the '{0}' function.":{code:7e3,category:1},"Unknown rule.":{code:7002,category:1},"Invalid line number ({0})":{code:7003,category:1},"Warn on expressions and declarations with an implied 'any' type.":{code:7004,category:2},"Variable '{0}' implicitly has an 'any' type.":{code:7005,category:1},"Parameter '{0}' of '{1}' implicitly has an 'any' type.":{code:7006,category:1},"Parameter '{0}' of function type implicitly has an 'any' type.":{code:7007,category:1},"Member '{0}' of object type implicitly has an 'any' type.":{code:7008,category:1},"'new' expression, which lacks a constructor signature, implicitly has an 'any' type.":{code:7009,category:1},"'{0}', which lacks return-type annotation, implicitly has an 'any' return type.":{code:7010,category:1},"Function expression, which lacks return-type annotation, implicitly has an 'any' return type.":{code:7011,category:1},"Parameter '{0}' of lambda function implicitly has an 'any' type.":{code:7012,category:1},"Constructor signature, which lacks return-type annotation, implicitly has an 'any' return type.":{code:7013,category:1},"Lambda Function, which lacks return-type annotation, implicitly has an 'any' return type.":{code:7014,category:1},"Array Literal implicitly has an 'any' type from widening.":{code:7015,category:1},"'{0}', which lacks 'get' accessor and parameter type annotation on 'set' accessor, implicitly has an 'any' type.":{code:7016,category:1}} }(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._7=55]="_7",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.E=69]="E",e[e.F=70]="F",e[e.X=88]="X",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(e.CharacterCodes||(e.CharacterCodes={}));e.CharacterCodes}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e){return new r(e)}var r=function(){function t(e){this.text=e,this._lineStartPositions=null}return t.prototype.getText=function(e,t){return this.text.substring(e,t)},t.prototype.getLength=function(){return this.text.length},t.prototype.getLineStartPositions=function(){return this._lineStartPositions||(this._lineStartPositions=e.TextUtilities.parseLineStarts(this.text)),this._lineStartPositions},t.prototype.getTextChangeRangeSinceVersion=function(){throw e.Errors.notYetImplemented()},t}();t.fromString=n}(e.ScriptSnapshot||(e.ScriptSnapshot={}));e.ScriptSnapshot}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(t){return new e.LineMap(function(){return e.TextUtilities.parseLineStarts({charCodeAt:function(e){return t.charCodeAt(e)},length:t.length()})},t.length())}function r(t){return new e.LineMap(function(){return t.getLineStartPositions()},t.getLength())}function i(t){return new e.LineMap(function(){return e.TextUtilities.parseLineStarts(t)},t.length)}t.fromSimpleText=n,t.fromScriptSnapshot=r,t.fromString=i}(e.LineMap1||(e.LineMap1={}));e.LineMap1}(TypeScript||(TypeScript={}));var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n},TypeScript;!function(e){!function(t){function n(t,n,r){var i=t.charCodeAt(n);10===i?n>0&&13===t.charCodeAt(n-1)?(r.startPosition=n-1,r.length=2):(r.startPosition=n,r.length=1):e.TextUtilities.isAnyLineBreakCharacter(i)?(r.startPosition=n,r.length=1):(r.startPosition=n+1,r.length=0)}function r(e){return new l(e)}var i=function(){function e(e,t){this.startPosition=e,this.length=t}return e}(),o=function(){function t(t,n,r,i){if(this._text=null,this._textSpan=null,null===t)throw e.Errors.argumentNull("text");e.Debug.assert(r>=0),e.Debug.assert(i>=0),this._text=t,this._textSpan=n,this._lineBreakLength=r,this._lineNumber=i}return t.prototype.start=function(){return this._textSpan.start()},t.prototype.end=function(){return this._textSpan.end()},t.prototype.endIncludingLineBreak=function(){return this.end()+this._lineBreakLength},t.prototype.extent=function(){return this._textSpan},t.prototype.extentIncludingLineBreak=function(){return e.TextSpan.fromBounds(this.start(),this.endIncludingLineBreak())},t.prototype.toString=function(){return this._text.toString(this._textSpan)},t.prototype.lineNumber=function(){return this._lineNumber},t}(),a=function(){function t(){this.linebreakInfo=new i(0,0),this.lastLineFoundForPosition=null}return t.prototype.length=function(){throw e.Errors.abstract()},t.prototype.charCodeAt=function(){throw e.Errors.abstract()},t.prototype.checkSubSpan=function(t){if(t.start()<0||t.start()>this.length()||t.end()>this.length())throw e.Errors.argumentOutOfRange("span")},t.prototype.toString=function(t){throw"undefined"==typeof t&&(t=null),e.Errors.abstract()},t.prototype.subText=function(e){return this.checkSubSpan(e),new s(this,e)},t.prototype.substr=function(){throw e.Errors.abstract()},t.prototype.copyTo=function(){throw e.Errors.abstract()},t.prototype.lineCount=function(){return this._lineStarts().length},t.prototype.lines=function(){for(var e=[],t=this.lineCount(),n=0;t>n;++n)e[n]=this.getLineFromLineNumber(n);return e},t.prototype.lineMap=function(){var t=this;return new e.LineMap(function(){return t._lineStarts()},this.length())},t.prototype._lineStarts=function(){throw e.Errors.abstract()},t.prototype.getLineFromLineNumber=function(t){var r=this._lineStarts();if(0>t||t>=r.length)throw e.Errors.argumentOutOfRange("lineNumber");var i=r[t];return t===r.length-1?new o(this,new e.TextSpan(i,this.length()-i),0,t):(n(this,r[t+1]-1,this.linebreakInfo),new o(this,new e.TextSpan(i,this.linebreakInfo.startPosition-i),this.linebreakInfo.length,t))},t.prototype.getLineFromPosition=function(e){var t=this.lastLineFoundForPosition;if(null!==t&&t.start()<=e&&t.endIncludingLineBreak()>e)return t;var n=this.getLineNumberFromPosition(e),r=this.getLineFromLineNumber(n);return this.lastLineFoundForPosition=r,r},t.prototype.getLineNumberFromPosition=function(t){if(0>t||t>this.length())throw e.Errors.argumentOutOfRange("position");if(t===this.length())return this.lineCount()-1;var n=e.ArrayUtilities.binarySearch(this._lineStarts(),t);return 0>n&&(n=~n-1),n},t.prototype.getLinePosition=function(t){if(0>t||t>this.length())throw e.Errors.argumentOutOfRange("position");var n=this.getLineNumberFromPosition(t);return new e.LineAndCharacter(n,t-this._lineStarts()[n])},t}(),s=function(t){function n(n,r){if(t.call(this),this._lazyLineStarts=null,null===n)throw e.Errors.argumentNull("text");if(r.start()<0||r.start()>=n.length()||r.end()<0||r.end()>n.length())throw e.Errors.argument("span");this.text=n,this.span=r}return __extends(n,t),n.prototype.length=function(){return this.span.length()},n.prototype.charCodeAt=function(t){if(0>t||t>this.length())throw e.Errors.argumentOutOfRange("position");return this.text.charCodeAt(this.span.start()+t)},n.prototype.subText=function(e){return this.checkSubSpan(e),new n(this.text,this.getCompositeSpan(e.start(),e.length()))},n.prototype.copyTo=function(e,t,n,r){var i=this.getCompositeSpan(e,r);this.text.copyTo(i.start(),t,n,i.length())},n.prototype.substr=function(e,t,n){var r=this.span.start()+e;return this.text.substr(r,t,n)},n.prototype.getCompositeSpan=function(t,n){var r=e.MathPrototype.min(this.text.length(),this.span.start()+t),i=e.MathPrototype.min(this.text.length(),r+n);return new e.TextSpan(r,i-r)},n.prototype._lineStarts=function(){var t=this;return this._lazyLineStarts||(this._lazyLineStarts=e.TextUtilities.parseLineStarts({charCodeAt:function(e){return t.charCodeAt(e)},length:this.length()})),this._lazyLineStarts},n}(a),l=function(t){function n(n){if(t.call(this),this.source=null,this._lazyLineStarts=null,null===n)throw e.Errors.argumentNull("data");this.source=n}return __extends(n,t),n.prototype.length=function(){return this.source.length},n.prototype.charCodeAt=function(t){if(0>t||t>=this.source.length)throw e.Errors.argumentOutOfRange("position");return this.source.charCodeAt(t)},n.prototype.substr=function(e,t){return this.source.substr(e,t)},n.prototype.toString=function(t){return"undefined"==typeof t&&(t=null),null===t&&(t=new e.TextSpan(0,this.length())),this.checkSubSpan(t),0===t.start()&&t.length()===this.length()?this.source:this.source.substr(t.start(),t.length())},n.prototype.copyTo=function(t,n,r,i){e.StringUtilities.copyTo(this.source,t,n,r,i)},n.prototype._lineStarts=function(){return null===this._lazyLineStarts&&(this._lazyLineStarts=e.TextUtilities.parseLineStarts(this.source)),this._lazyLineStarts},n}(a);t.createText=r}(e.TextFactory||(e.TextFactory={}));e.TextFactory}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e){return new o(e)}function r(e){return new a(e)}var i=function(){function t(t,n){if(this.text=null,this.span=null,null===t)throw e.Errors.argumentNull("text");if(n.start()<0||n.start()>=t.length()||n.end()<0||n.end()>t.length())throw e.Errors.argument("span");this.text=t,this.span=n}return t.prototype.checkSubSpan=function(t){if(t.start()<0||t.start()>this.length()||t.end()>this.length())throw e.Errors.argumentOutOfRange("span")},t.prototype.checkSubPosition=function(t){if(0>t||t>=this.length())throw e.Errors.argumentOutOfRange("position")},t.prototype.length=function(){return this.span.length()},t.prototype.subText=function(e){return this.checkSubSpan(e),new t(this.text,this.getCompositeSpan(e.start(),e.length()))},t.prototype.copyTo=function(e,t,n,r){var i=this.getCompositeSpan(e,r);this.text.copyTo(i.start(),t,n,i.length())},t.prototype.substr=function(e,t,n){var r=this.getCompositeSpan(e,t);return this.text.substr(r.start(),r.length(),n)},t.prototype.getCompositeSpan=function(t,n){var r=e.MathPrototype.min(this.text.length(),this.span.start()+t),i=e.MathPrototype.min(this.text.length(),r+n);return new e.TextSpan(r,i-r)},t.prototype.charCodeAt=function(e){return this.checkSubPosition(e),this.text.charCodeAt(this.span.start()+e)},t.prototype.lineMap=function(){return e.LineMap1.fromSimpleText(this)},t}(),o=function(){function t(e){this.value=e,this._lineMap=null}return t.prototype.length=function(){return this.value.length},t.prototype.copyTo=function(t,n,r,i){e.StringUtilities.copyTo(this.value,t,n,r,i)},t.prototype.substr=function(n,r,i){if(i){var o=r<=t.charArray.length?t.charArray:e.ArrayUtilities.createArray(r,0);return this.copyTo(n,o,0,r),e.Collections.DefaultStringTable.addCharArray(o,0,r)}return this.value.substr(n,r)},t.prototype.subText=function(e){return new i(this,e)},t.prototype.charCodeAt=function(e){return this.value.charCodeAt(e)},t.prototype.lineMap=function(){return this._lineMap||(this._lineMap=e.LineMap1.fromString(this.value)),this._lineMap},t.charArray=e.ArrayUtilities.createArray(1024,0),t}(),a=function(){function t(e){this.scriptSnapshot=e}return t.prototype.charCodeAt=function(e){return this.scriptSnapshot.getText(e,e+1).charCodeAt(0)},t.prototype.length=function(){return this.scriptSnapshot.getLength()},t.prototype.copyTo=function(t,n,r,i){var o=this.scriptSnapshot.getText(t,t+i);e.StringUtilities.copyTo(o,0,n,r,i)},t.prototype.substr=function(e,t){return this.scriptSnapshot.getText(e,e+t)},t.prototype.subText=function(e){return new i(this,e)},t.prototype.lineMap=function(){var t=this;return new e.LineMap(function(){return t.scriptSnapshot.getLineStartPositions()},this.length())},t}();t.fromString=n,t.fromScriptSnapshot=r}(e.SimpleText||(e.SimpleText={}));e.SimpleText}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){function t(t){var n=t.length;if(0===n){var r=new Array;return r.push(0),r}for(var i=0,o=0,a=new Array,s=0;n>o;){var l,c=t.charCodeAt(o);c>13&&127>=c?o++:(l=13===c&&n>o+1&&10===t.charCodeAt(o+1)?2:10===c?1:e.getLengthOfLineBreak(t,o),0===l?o++:(a.push(i),o+=l,i=o,s++))}return a.push(i),a}function n(e,t,n){if(13===n){var r=t+1;return r13&&127>=r?0:n(e,t,r)}function i(e){return 10===e||13===e||133===e||8232===e||8233===e}e.parseLineStarts=t,e.getLengthOfLineBreakSlow=n,e.getLengthOfLineBreak=r,e.isAnyLineBreakCharacter=i}(e.TextUtilities||(e.TextUtilities={}));e.TextUtilities}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(t,n){0>t&&e.Errors.argument("start"),0>n&&e.Errors.argument("length"),this._start=t,this._length=n}return t.prototype.start=function(){return this._start},t.prototype.length=function(){return this._length},t.prototype.end=function(){return this._start+this._length},t.prototype.isEmpty=function(){return 0===this._length},t.prototype.containsPosition=function(e){return e>=this._start&&e=this._start&&e.end()<=this.end()},t.prototype.overlapsWith=function(t){var n=e.MathPrototype.max(this._start,t._start),r=e.MathPrototype.min(this.end(),t.end());return r>n},t.prototype.overlap=function(n){var r=e.MathPrototype.max(this._start,n._start),i=e.MathPrototype.min(this.end(),n.end());return i>r?t.fromBounds(r,i):null},t.prototype.intersectsWithTextSpan=function(e){return e._start<=this.end()&&e.end()>=this._start},t.prototype.intersectsWith=function(e,t){var n=e+t;return e<=this.end()&&n>=this._start},t.prototype.intersectsWithPosition=function(e){return e<=this.end()&&e>=this._start},t.prototype.intersection=function(n){var r=e.MathPrototype.max(this._start,n._start),i=e.MathPrototype.min(this.end(),n.end());return i>=r?t.fromBounds(r,i):null},t.fromBounds=function(n,r){return e.Debug.assert(n>=0),e.Debug.assert(r-n>=0),new t(n,r-n)},t}();e.TextSpan=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(t,n){if(0>n)throw e.Errors.argumentOutOfRange("newLength");this._span=t,this._newLength=n}return t.prototype.span=function(){return this._span},t.prototype.newLength=function(){return this._newLength},t.prototype.newSpan=function(){return new e.TextSpan(this.span().start(),this.newLength())},t.prototype.isUnchanged=function(){return this.span().isEmpty()&&0===this.newLength()},t.collapseChangesFromSingleVersion=function(n){for(var r=0,i=1073741823,o=0,a=0;ao&&(o=s.span().end())}if(i>o)return null;var l=e.TextSpan.fromBounds(i,o),c=l.length()+r;return new t(l,c)},t.collapseChangesAcrossMultipleVersions=function(n){if(0===n.length)return t.unchanged;if(1===n.length)return n[0];for(var r=n[0],i=r.span().start(),o=r.span().end(),a=i+r.newLength(),s=1;s=48&&57>=e},e.isOctalDigit=function(e){return e>=48&&55>=e},e.isHexDigit=function(t){return e.isDecimalDigit(t)||t>=65&&70>=t||t>=97&&102>=t},e.hexValue=function(t){return e.isDecimalDigit(t)?t-48:t>=65&&70>=t?t-65+10:t-97+10},e.isWhitespace=function(e){switch(e){case 32:case 160:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 12288:case 9:case 11:case 12:case 65279:return!0}return!1},e.isLineTerminator=function(e){switch(e){case 13:case 10:case 8233:case 8232:return!0}return!1},e}();e.CharacterInfo=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){e[e.TriviaNewLineMask=1]="TriviaNewLineMask",e[e.TriviaCommentMask=2]="TriviaCommentMask",e[e.TriviaFullWidthShift=2]="TriviaFullWidthShift",e[e.NodeDataComputed=1]="NodeDataComputed",e[e.NodeIncrementallyUnusableMask=2]="NodeIncrementallyUnusableMask",e[e.NodeParsedInStrictModeMask=4]="NodeParsedInStrictModeMask",e[e.NodeFullWidthShift=3]="NodeFullWidthShift",e[e.IsVariableWidthKeyword=1<<31]="IsVariableWidthKeyword"}(e.SyntaxConstants||(e.SyntaxConstants={}));e.SyntaxConstants}(TypeScript||(TypeScript={}));var FormattingOptions=function(){function e(e,t,n,r){this.useTabs=e,this.spacesPerTab=t,this.indentSpaces=n,this.newLineCharacter=r}return e.defaultOptions=new e(!1,4,4,"\r\n"),e}(),TypeScript;!function(e){!function(t){function n(e,t,n){return r(e,t,n)+e.width()}function r(e,t,n){for(var r=t.firstTokenInLineContainingToken(e),i=[],s=e;s!==r;)s=t.previousToken(s),s===r?(i.push(s.trailingTrivia().fullText()),i.push(s.text())):i.push(s.fullText());return o(r,i),a(i,n)}function i(e,t,n){var r=t.firstTokenInLineContainingToken(e),i=[];return o(r,i),a(i,n)}function o(t,n){for(var r=t.leadingTrivia(),i=r.count()-1;i>=0;i--){var o=r.syntaxTriviaAt(i);if(5===o.kind())break;if(6===o.kind()){var a=e.Syntax.splitMultiLineCommentTriviaIntoMultipleLines(o);if(n.push(e.ArrayUtilities.last(a)),a.length>0)break}n.push(o.fullText())}}function a(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];n=l(i,i.length,n,t)}return n}function s(e,t,n){return l(e,t,0,n)}function l(e,t,n,r){for(var i=n,o=r.spacesPerTab,a=0;t>a;a++){var s=e.charCodeAt(a);9===s?i+=o-i%o:i++}return i}function c(t,n){var r=0,i=e.MathPrototype.max(0,t);return n.useTabs&&(r=Math.floor(t/n.spacesPerTab),i-=r*n.spacesPerTab),e.StringUtilities.repeat(" ",r)+e.StringUtilities.repeat(" ",i)}function u(t,n){return e.Syntax.whitespace(this.indentationString(t,n))}function p(t){for(var n=0;n=0;r--){var i=t.syntaxTriviaAt(r);if(i.isSkippedToken())return new s(this,i.skippedToken(),n-i.fullWidth());n-=i.fullWidth()}var o=this.fullStart();return 0===o?null:this.root().node().findToken(o-1,e)},t.prototype.nextToken=function(e){if("undefined"==typeof e&&(e=!1),10===this.token().tokenKind)return null;var t=this.token().trailingTrivia();if(e&&t&&t.hasSkippedToken())for(var n=this.end(),r=0,i=t.count();i>r;r++){var o=t.syntaxTriviaAt(r);if(o.isSkippedToken())return new s(this,o.skippedToken(),n);n+=o.fullWidth()}return this.root().node().findToken(this.fullEnd(),e)},t}(n);e.PositionedToken=i;var o=function(e){function t(t,n,r){e.call(this,t,n,r)}return __extends(t,e),t.prototype.list=function(){return this.element()},t}(t);e.PositionedList=o;var a=function(e){function t(t,n,r){e.call(this,t,n,r)}return __extends(t,e),t.prototype.list=function(){return this.element()},t}(t);e.PositionedSeparatedList=a;var s=function(t){function n(e,n,r){t.call(this,e.parent(),n,r),this._parentToken=e}return __extends(n,t),n.prototype.parentToken=function(){return this._parentToken},n.prototype.previousToken=function(t){"undefined"==typeof t&&(t=!1);var n=this.fullStart();if(t){var r;if(n>=this.parentToken().end())return r=e.Syntax.findSkippedTokenInTrailingTriviaList(this.parentToken(),n-1),r?r:this.parentToken();if(r=e.Syntax.findSkippedTokenInLeadingTriviaList(this.parentToken(),n-1))return r}var n=this.parentToken().fullStart();return 0===n?null:this.root().node().findToken(n-1,t)},n.prototype.nextToken=function(t){if("undefined"==typeof t&&(t=!1),10===this.token().tokenKind)return null;if(t){var n,r=this.end();if(r<=this.parentToken().start())return n=e.Syntax.findSkippedTokenInLeadingTriviaList(this.parentToken(),r),n?n:this.parentToken();if(n=e.Syntax.findSkippedTokenInTrailingTriviaList(this.parentToken(),r))return n}return this.root().node().findToken(this.parentToken().fullEnd(),t)},n}(i);e.PositionedSkippedToken=s}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){e[e.None=0]="None",e[e.List=1]="List",e[e.SeparatedList=2]="SeparatedList",e[e.TriviaList=3]="TriviaList",e[e.WhitespaceTrivia=4]="WhitespaceTrivia",e[e.NewLineTrivia=5]="NewLineTrivia",e[e.MultiLineCommentTrivia=6]="MultiLineCommentTrivia",e[e.SingleLineCommentTrivia=7]="SingleLineCommentTrivia",e[e.SkippedTokenTrivia=8]="SkippedTokenTrivia",e[e.ErrorToken=9]="ErrorToken",e[e.EndOfFileToken=10]="EndOfFileToken",e[e.IdentifierName=11]="IdentifierName",e[e.RegularExpressionLiteral=12]="RegularExpressionLiteral",e[e.NumericLiteral=13]="NumericLiteral",e[e.StringLiteral=14]="StringLiteral",e[e.BreakKeyword=15]="BreakKeyword",e[e.CaseKeyword=16]="CaseKeyword",e[e.CatchKeyword=17]="CatchKeyword",e[e.ContinueKeyword=18]="ContinueKeyword",e[e.DebuggerKeyword=19]="DebuggerKeyword",e[e.DefaultKeyword=20]="DefaultKeyword",e[e.DeleteKeyword=21]="DeleteKeyword",e[e.DoKeyword=22]="DoKeyword",e[e.ElseKeyword=23]="ElseKeyword",e[e.FalseKeyword=24]="FalseKeyword",e[e.FinallyKeyword=25]="FinallyKeyword",e[e.ForKeyword=26]="ForKeyword",e[e.FunctionKeyword=27]="FunctionKeyword",e[e.IfKeyword=28]="IfKeyword",e[e.InKeyword=29]="InKeyword",e[e.InstanceOfKeyword=30]="InstanceOfKeyword",e[e.NewKeyword=31]="NewKeyword",e[e.NullKeyword=32]="NullKeyword",e[e.ReturnKeyword=33]="ReturnKeyword",e[e.SwitchKeyword=34]="SwitchKeyword",e[e.ThisKeyword=35]="ThisKeyword",e[e.ThrowKeyword=36]="ThrowKeyword",e[e.TrueKeyword=37]="TrueKeyword",e[e.TryKeyword=38]="TryKeyword",e[e.TypeOfKeyword=39]="TypeOfKeyword",e[e.VarKeyword=40]="VarKeyword",e[e.VoidKeyword=41]="VoidKeyword",e[e.WhileKeyword=42]="WhileKeyword",e[e.WithKeyword=43]="WithKeyword",e[e.ClassKeyword=44]="ClassKeyword",e[e.ConstKeyword=45]="ConstKeyword",e[e.EnumKeyword=46]="EnumKeyword",e[e.ExportKeyword=47]="ExportKeyword",e[e.ExtendsKeyword=48]="ExtendsKeyword",e[e.ImportKeyword=49]="ImportKeyword",e[e.SuperKeyword=50]="SuperKeyword",e[e.ImplementsKeyword=51]="ImplementsKeyword",e[e.InterfaceKeyword=52]="InterfaceKeyword",e[e.LetKeyword=53]="LetKeyword",e[e.PackageKeyword=54]="PackageKeyword",e[e.PrivateKeyword=55]="PrivateKeyword",e[e.ProtectedKeyword=56]="ProtectedKeyword",e[e.PublicKeyword=57]="PublicKeyword",e[e.StaticKeyword=58]="StaticKeyword",e[e.YieldKeyword=59]="YieldKeyword",e[e.AnyKeyword=60]="AnyKeyword",e[e.BooleanKeyword=61]="BooleanKeyword",e[e.ConstructorKeyword=62]="ConstructorKeyword",e[e.DeclareKeyword=63]="DeclareKeyword",e[e.GetKeyword=64]="GetKeyword",e[e.ModuleKeyword=65]="ModuleKeyword",e[e.RequireKeyword=66]="RequireKeyword",e[e.NumberKeyword=67]="NumberKeyword",e[e.SetKeyword=68]="SetKeyword",e[e.StringKeyword=69]="StringKeyword",e[e.OpenBraceToken=70]="OpenBraceToken",e[e.CloseBraceToken=71]="CloseBraceToken",e[e.OpenParenToken=72]="OpenParenToken",e[e.CloseParenToken=73]="CloseParenToken",e[e.OpenBracketToken=74]="OpenBracketToken",e[e.CloseBracketToken=75]="CloseBracketToken",e[e.DotToken=76]="DotToken",e[e.DotDotDotToken=77]="DotDotDotToken",e[e.SemicolonToken=78]="SemicolonToken",e[e.CommaToken=79]="CommaToken",e[e.LessThanToken=80]="LessThanToken",e[e.GreaterThanToken=81]="GreaterThanToken",e[e.LessThanEqualsToken=82]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=83]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=84]="EqualsEqualsToken",e[e.EqualsGreaterThanToken=85]="EqualsGreaterThanToken",e[e.ExclamationEqualsToken=86]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=87]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=88]="ExclamationEqualsEqualsToken",e[e.PlusToken=89]="PlusToken",e[e.MinusToken=90]="MinusToken",e[e.AsteriskToken=91]="AsteriskToken",e[e.PercentToken=92]="PercentToken",e[e.PlusPlusToken=93]="PlusPlusToken",e[e.MinusMinusToken=94]="MinusMinusToken",e[e.LessThanLessThanToken=95]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=96]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=97]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=98]="AmpersandToken",e[e.BarToken=99]="BarToken",e[e.CaretToken=100]="CaretToken",e[e.ExclamationToken=101]="ExclamationToken",e[e.TildeToken=102]="TildeToken",e[e.AmpersandAmpersandToken=103]="AmpersandAmpersandToken",e[e.BarBarToken=104]="BarBarToken",e[e.QuestionToken=105]="QuestionToken",e[e.ColonToken=106]="ColonToken",e[e.EqualsToken=107]="EqualsToken",e[e.PlusEqualsToken=108]="PlusEqualsToken",e[e.MinusEqualsToken=109]="MinusEqualsToken",e[e.AsteriskEqualsToken=110]="AsteriskEqualsToken",e[e.PercentEqualsToken=111]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=112]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=113]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=114]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=115]="AmpersandEqualsToken",e[e.BarEqualsToken=116]="BarEqualsToken",e[e.CaretEqualsToken=117]="CaretEqualsToken",e[e.SlashToken=118]="SlashToken",e[e.SlashEqualsToken=119]="SlashEqualsToken",e[e.SourceUnit=120]="SourceUnit",e[e.QualifiedName=121]="QualifiedName",e[e.ObjectType=122]="ObjectType",e[e.FunctionType=123]="FunctionType",e[e.ArrayType=124]="ArrayType",e[e.ConstructorType=125]="ConstructorType",e[e.GenericType=126]="GenericType",e[e.TypeQuery=127]="TypeQuery",e[e.InterfaceDeclaration=128]="InterfaceDeclaration",e[e.FunctionDeclaration=129]="FunctionDeclaration",e[e.ModuleDeclaration=130]="ModuleDeclaration",e[e.ClassDeclaration=131]="ClassDeclaration",e[e.EnumDeclaration=132]="EnumDeclaration",e[e.ImportDeclaration=133]="ImportDeclaration",e[e.ExportAssignment=134]="ExportAssignment",e[e.MemberFunctionDeclaration=135]="MemberFunctionDeclaration",e[e.MemberVariableDeclaration=136]="MemberVariableDeclaration",e[e.ConstructorDeclaration=137]="ConstructorDeclaration",e[e.IndexMemberDeclaration=138]="IndexMemberDeclaration",e[e.GetAccessor=139]="GetAccessor",e[e.SetAccessor=140]="SetAccessor",e[e.PropertySignature=141]="PropertySignature",e[e.CallSignature=142]="CallSignature",e[e.ConstructSignature=143]="ConstructSignature",e[e.IndexSignature=144]="IndexSignature",e[e.MethodSignature=145]="MethodSignature",e[e.Block=146]="Block",e[e.IfStatement=147]="IfStatement",e[e.VariableStatement=148]="VariableStatement",e[e.ExpressionStatement=149]="ExpressionStatement",e[e.ReturnStatement=150]="ReturnStatement",e[e.SwitchStatement=151]="SwitchStatement",e[e.BreakStatement=152]="BreakStatement",e[e.ContinueStatement=153]="ContinueStatement",e[e.ForStatement=154]="ForStatement",e[e.ForInStatement=155]="ForInStatement",e[e.EmptyStatement=156]="EmptyStatement",e[e.ThrowStatement=157]="ThrowStatement",e[e.WhileStatement=158]="WhileStatement",e[e.TryStatement=159]="TryStatement",e[e.LabeledStatement=160]="LabeledStatement",e[e.DoStatement=161]="DoStatement",e[e.DebuggerStatement=162]="DebuggerStatement",e[e.WithStatement=163]="WithStatement",e[e.PlusExpression=164]="PlusExpression",e[e.NegateExpression=165]="NegateExpression",e[e.BitwiseNotExpression=166]="BitwiseNotExpression",e[e.LogicalNotExpression=167]="LogicalNotExpression",e[e.PreIncrementExpression=168]="PreIncrementExpression",e[e.PreDecrementExpression=169]="PreDecrementExpression",e[e.DeleteExpression=170]="DeleteExpression",e[e.TypeOfExpression=171]="TypeOfExpression",e[e.VoidExpression=172]="VoidExpression",e[e.CommaExpression=173]="CommaExpression",e[e.AssignmentExpression=174]="AssignmentExpression",e[e.AddAssignmentExpression=175]="AddAssignmentExpression",e[e.SubtractAssignmentExpression=176]="SubtractAssignmentExpression",e[e.MultiplyAssignmentExpression=177]="MultiplyAssignmentExpression",e[e.DivideAssignmentExpression=178]="DivideAssignmentExpression",e[e.ModuloAssignmentExpression=179]="ModuloAssignmentExpression",e[e.AndAssignmentExpression=180]="AndAssignmentExpression",e[e.ExclusiveOrAssignmentExpression=181]="ExclusiveOrAssignmentExpression",e[e.OrAssignmentExpression=182]="OrAssignmentExpression",e[e.LeftShiftAssignmentExpression=183]="LeftShiftAssignmentExpression",e[e.SignedRightShiftAssignmentExpression=184]="SignedRightShiftAssignmentExpression",e[e.UnsignedRightShiftAssignmentExpression=185]="UnsignedRightShiftAssignmentExpression",e[e.ConditionalExpression=186]="ConditionalExpression",e[e.LogicalOrExpression=187]="LogicalOrExpression",e[e.LogicalAndExpression=188]="LogicalAndExpression",e[e.BitwiseOrExpression=189]="BitwiseOrExpression",e[e.BitwiseExclusiveOrExpression=190]="BitwiseExclusiveOrExpression",e[e.BitwiseAndExpression=191]="BitwiseAndExpression",e[e.EqualsWithTypeConversionExpression=192]="EqualsWithTypeConversionExpression",e[e.NotEqualsWithTypeConversionExpression=193]="NotEqualsWithTypeConversionExpression",e[e.EqualsExpression=194]="EqualsExpression",e[e.NotEqualsExpression=195]="NotEqualsExpression",e[e.LessThanExpression=196]="LessThanExpression",e[e.GreaterThanExpression=197]="GreaterThanExpression",e[e.LessThanOrEqualExpression=198]="LessThanOrEqualExpression",e[e.GreaterThanOrEqualExpression=199]="GreaterThanOrEqualExpression",e[e.InstanceOfExpression=200]="InstanceOfExpression",e[e.InExpression=201]="InExpression",e[e.LeftShiftExpression=202]="LeftShiftExpression",e[e.SignedRightShiftExpression=203]="SignedRightShiftExpression",e[e.UnsignedRightShiftExpression=204]="UnsignedRightShiftExpression",e[e.MultiplyExpression=205]="MultiplyExpression",e[e.DivideExpression=206]="DivideExpression",e[e.ModuloExpression=207]="ModuloExpression",e[e.AddExpression=208]="AddExpression",e[e.SubtractExpression=209]="SubtractExpression",e[e.PostIncrementExpression=210]="PostIncrementExpression",e[e.PostDecrementExpression=211]="PostDecrementExpression",e[e.MemberAccessExpression=212]="MemberAccessExpression",e[e.InvocationExpression=213]="InvocationExpression",e[e.ArrayLiteralExpression=214]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=215]="ObjectLiteralExpression",e[e.ObjectCreationExpression=216]="ObjectCreationExpression",e[e.ParenthesizedExpression=217]="ParenthesizedExpression",e[e.ParenthesizedArrowFunctionExpression=218]="ParenthesizedArrowFunctionExpression",e[e.SimpleArrowFunctionExpression=219]="SimpleArrowFunctionExpression",e[e.CastExpression=220]="CastExpression",e[e.ElementAccessExpression=221]="ElementAccessExpression",e[e.FunctionExpression=222]="FunctionExpression",e[e.OmittedExpression=223]="OmittedExpression",e[e.VariableDeclaration=224]="VariableDeclaration",e[e.VariableDeclarator=225]="VariableDeclarator",e[e.ArgumentList=226]="ArgumentList",e[e.ParameterList=227]="ParameterList",e[e.TypeArgumentList=228]="TypeArgumentList",e[e.TypeParameterList=229]="TypeParameterList",e[e.ExtendsHeritageClause=230]="ExtendsHeritageClause",e[e.ImplementsHeritageClause=231]="ImplementsHeritageClause",e[e.EqualsValueClause=232]="EqualsValueClause",e[e.CaseSwitchClause=233]="CaseSwitchClause",e[e.DefaultSwitchClause=234]="DefaultSwitchClause",e[e.ElseClause=235]="ElseClause",e[e.CatchClause=236]="CatchClause",e[e.FinallyClause=237]="FinallyClause",e[e.TypeParameter=238]="TypeParameter",e[e.Constraint=239]="Constraint",e[e.SimplePropertyAssignment=240]="SimplePropertyAssignment",e[e.FunctionPropertyAssignment=241]="FunctionPropertyAssignment",e[e.Parameter=242]="Parameter",e[e.EnumElement=243]="EnumElement",e[e.TypeAnnotation=244]="TypeAnnotation",e[e.ExternalModuleReference=245]="ExternalModuleReference",e[e.ModuleNameModuleReference=246]="ModuleNameModuleReference",e[e.Last=e.ModuleNameModuleReference]="Last",e[e.FirstStandardKeyword=e.BreakKeyword]="FirstStandardKeyword",e[e.LastStandardKeyword=e.WithKeyword]="LastStandardKeyword",e[e.FirstFutureReservedKeyword=e.ClassKeyword]="FirstFutureReservedKeyword",e[e.LastFutureReservedKeyword=e.SuperKeyword]="LastFutureReservedKeyword",e[e.FirstFutureReservedStrictKeyword=e.ImplementsKeyword]="FirstFutureReservedStrictKeyword",e[e.LastFutureReservedStrictKeyword=e.YieldKeyword]="LastFutureReservedStrictKeyword",e[e.FirstTypeScriptKeyword=e.AnyKeyword]="FirstTypeScriptKeyword",e[e.LastTypeScriptKeyword=e.StringKeyword]="LastTypeScriptKeyword",e[e.FirstKeyword=e.FirstStandardKeyword]="FirstKeyword",e[e.LastKeyword=e.LastTypeScriptKeyword]="LastKeyword",e[e.FirstToken=e.ErrorToken]="FirstToken",e[e.LastToken=e.SlashEqualsToken]="LastToken",e[e.FirstPunctuation=e.OpenBraceToken]="FirstPunctuation",e[e.LastPunctuation=e.SlashEqualsToken]="LastPunctuation",e[e.FirstFixedWidth=e.FirstKeyword]="FirstFixedWidth",e[e.LastFixedWidth=e.LastPunctuation]="LastFixedWidth",e[e.FirstTrivia=e.WhitespaceTrivia]="FirstTrivia",e[e.LastTrivia=e.SkippedTokenTrivia]="LastTrivia" }(e.SyntaxKind||(e.SyntaxKind={}));e.SyntaxKind}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){function t(e){return g.hasOwnProperty(e)?g[e]:0}function n(e){var t=v[e];return void 0!==t?t:null}function r(e){return e>=9&&119>=e}function i(e){return e>=15&&69>=e}function o(e){return e>=15&&43>=e}function a(e){return e>=44&&50>=e}function s(e){return e>=51&&59>=e}function l(e){return e>=70&&119>=e}function c(e){return 0!==p(e)}function u(e){return 0!==d(e)}function p(e){switch(e){case 89:return 164;case 90:return 165;case 102:return 166;case 101:return 167;case 93:return 168;case 94:return 169;default:return 0}}function h(e){switch(e){case 93:return 210;case 94:return 211;default:return 0}}function d(e){switch(e){case 91:return 205;case 118:return 206;case 92:return 207;case 89:return 208;case 90:return 209;case 95:return 202;case 96:return 203;case 97:return 204;case 80:return 196;case 81:return 197;case 82:return 198;case 83:return 199;case 30:return 200;case 29:return 201;case 84:return 192;case 86:return 193;case 87:return 194;case 88:return 195;case 98:return 191;case 100:return 190;case 99:return 189;case 103:return 188;case 104:return 187;case 116:return 182;case 115:return 180;case 117:return 181;case 112:return 183;case 113:return 184;case 114:return 185;case 108:return 175;case 109:return 176;case 110:return 177;case 119:return 178;case 111:return 179;case 107:return 174;case 79:return 173;default:return 0}}function m(e){switch(e){case 205:return 91;case 206:return 118;case 207:return 92;case 208:return 89;case 209:return 90;case 202:return 95;case 203:return 96;case 204:return 97;case 196:return 80;case 197:return 81;case 198:return 82;case 199:return 83;case 200:return 30;case 201:return 29;case 192:return 84;case 193:return 86;case 194:return 87;case 195:return 88;case 191:return 98;case 190:return 100;case 189:return 99;case 188:return 103;case 187:return 104;case 182:return 116;case 180:return 115;case 181:return 117;case 183:return 112;case 184:return 113;case 185:return 114;case 175:return 108;case 176:return 109;case 177:return 110;case 178:return 119;case 179:return 111;case 174:return 107;case 173:return 79;default:return 0}}function y(e){switch(e){case 118:case 119:return!0;default:return!1}}function f(e){switch(e){case 118:case 119:case 12:return!0;default:return!1}}var g={any:60,"boolean":61,"break":15,"case":16,"catch":17,"class":44,"continue":18,"const":45,constructor:62,"debugger":19,declare:63,"default":20,"delete":21,"do":22,"else":23,"enum":46,"export":47,"extends":48,"false":24,"finally":25,"for":26,"function":27,get:64,"if":28,"implements":51,"import":49,"in":29,"instanceof":30,"interface":52,let:53,module:65,"new":31,"null":32,number:67,"package":54,"private":55,"protected":56,"public":57,require:66,"return":33,set:68,"static":58,string:69,"super":50,"switch":34,"this":35,"throw":36,"true":37,"try":38,"typeof":39,"var":40,"void":41,"while":42,"with":43,"yield":59,"{":70,"}":71,"(":72,")":73,"[":74,"]":75,".":76,"...":77,";":78,",":79,"<":80,">":81,"<=":82,">=":83,"==":84,"=>":85,"!=":86,"===":87,"!==":88,"+":89,"-":90,"*":91,"%":92,"++":93,"--":94,"<<":95,">>":96,">>>":97,"&":98,"|":99,"^":100,"!":101,"~":102,"&&":103,"||":104,"?":105,":":106,"=":107,"+=":108,"-=":109,"*=":110,"%=":111,"<<=":112,">>=":113,">>>=":114,"&=":115,"|=":116,"^=":117,"/":118,"/=":119},v=new Array;for(var S in g)g.hasOwnProperty(S)&&(v[g[S]]=S);v[62]="constructor",e.getTokenKind=t,e.getText=n,e.isTokenKind=r,e.isAnyKeyword=i,e.isStandardKeyword=o,e.isFutureReservedKeyword=a,e.isFutureReservedStrictKeyword=s,e.isAnyPunctuation=l,e.isPrefixUnaryExpressionOperatorToken=c,e.isBinaryExpressionOperatorToken=u,e.getPrefixUnaryExpressionFromOperatorToken=p,e.getPostfixUnaryExpressionFromOperatorToken=h,e.getBinaryExpressionFromOperatorToken=d,e.getOperatorTokenFromBinaryExpression=m,e.isAnyDivideToken=y,e.isAnyDivideOrRegularExpressionToken=f}(e.SyntaxFacts||(e.SyntaxFacts={}));e.SyntaxFacts}(TypeScript||(TypeScript={}));var TypeScript;!function(e){for(var t=e.ArrayUtilities.createArray(127,!1),n=e.ArrayUtilities.createArray(127,!1),r=e.ArrayUtilities.createArray(127,!1),i=e.ArrayUtilities.createArray(127,!1),o=0;127>o;o++)o>=97&&122>=o?(n[o]=!0,r[o]=!0):o>=65&&90>=o||95===o||36===o?(n[o]=!0,r[o]=!0):o>=48&&57>=o&&(r[o]=!0,i[o]=!0);i[46]=!0;for(var a=15;69>=a;a++){var s=e.SyntaxFacts.getText(a);t[s.charCodeAt(0)]=!0}var l=function(){function o(t,n,r,i){"undefined"==typeof i&&(i=e.ArrayUtilities.createArray(2048,0)),this.slidingWindow=new e.SlidingWindow(this,i,0,n.length()),this.fileName=t,this.text=n,this._languageVersion=r}return o.prototype.languageVersion=function(){return this._languageVersion},o.prototype.fetchMoreItems=function(t,n,r,i,o){var a=this.text.length()-n,s=e.MathPrototype.min(a,o);return this.text.copyTo(n,r,i,s),s},o.prototype.currentCharCode=function(){return this.slidingWindow.currentItem(null)},o.prototype.absoluteIndex=function(){return this.slidingWindow.absoluteIndex()},o.prototype.setAbsoluteIndex=function(e){this.slidingWindow.setAbsoluteIndex(e)},o.prototype.scan=function(t,n){var r=t.length,i=this.slidingWindow.absoluteIndex(),o=this.scanTriviaInfo(t,!1),a=this.slidingWindow.absoluteIndex(),s=this.scanSyntaxToken(t,n),l=this.slidingWindow.absoluteIndex(),c=this.scanTriviaInfo(t,!0),u=0!==(-2147483648&s),p=2147483647&s,h=this.createToken(i,o,a,p,l,c,u);return r!==t.length?e.Syntax.realizeToken(h):h},o.prototype.createToken=function(t,n,r,i,o,a,s){if(!s&&i>=15)return 0===n?0===a?new e.Syntax.FixedWidthTokenWithNoTrivia(i):new e.Syntax.FixedWidthTokenWithTrailingTrivia(this.text,t,i,a):0===a?new e.Syntax.FixedWidthTokenWithLeadingTrivia(this.text,t,i,n):new e.Syntax.FixedWidthTokenWithLeadingAndTrailingTrivia(this.text,t,i,n,a);var l=o-r;return 0===n?0===a?new e.Syntax.VariableWidthTokenWithNoTrivia(this.text,t,i,l):new e.Syntax.VariableWidthTokenWithTrailingTrivia(this.text,t,i,l,a):0===a?new e.Syntax.VariableWidthTokenWithLeadingTrivia(this.text,t,i,n,l):new e.Syntax.VariableWidthTokenWithLeadingAndTrailingTrivia(this.text,t,i,n,l,a)},o.scanTrivia=function(t,n,r,i){var a=new o(null,t.subText(new e.TextSpan(n,r)),1,o.triviaWindow);return a.scanTrivia(t,n,i)},o.prototype.scanTrivia=function(t,n,r){for(var i=new Array;;){if(!this.slidingWindow.isAtEndOfSource()){var o=this.currentCharCode();switch(o){case 32:case 160:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 12288:case 9:case 11:case 12:case 65279:i.push(this.scanWhitespaceTrivia(t,n));continue;case 47:var a=this.slidingWindow.peekItemN(1);if(47===a){i.push(this.scanSingleLineCommentTrivia(t,n));continue}if(42===a){i.push(this.scanMultiLineCommentTrivia(t,n));continue}throw e.Errors.invalidOperation();case 13:case 10:case 8233:case 8232:if(i.push(this.scanLineTerminatorSequenceTrivia(o)),!r)continue;break;default:throw e.Errors.invalidOperation()}}return e.Syntax.triviaList(i)}},o.prototype.scanTriviaInfo=function(e,t){for(var n=0,r=0;;){var i=this.currentCharCode();switch(i){case 32:case 160:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 12288:case 9:case 11:case 12:case 65279:this.slidingWindow.moveToNextItem(),n++;continue;case 47:var o=this.slidingWindow.peekItemN(1);if(47===o){r|=2,n+=this.scanSingleLineCommentTriviaLength();continue}if(42===o){r|=2,n+=this.scanMultiLineCommentTriviaLength(e);continue}break;case 13:case 10:case 8233:case 8232:if(r|=1,n+=this.scanLineTerminatorSequenceLength(i),!t)continue}return n<<2|r}},o.prototype.isNewLineCharacter=function(e){switch(e){case 13:case 10:case 8233:case 8232:return!0;default:return!1}},o.prototype.scanWhitespaceTrivia=function(t,n){for(var r=this.absoluteIndex(),i=0;;){var o=this.currentCharCode();switch(o){case 32:case 160:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 12288:case 9:case 11:case 12:case 65279:this.slidingWindow.moveToNextItem(),i++;continue}break}return e.Syntax.deferredTrivia(4,t,n+r,i)},o.prototype.scanSingleLineCommentTrivia=function(t,n){var r=this.slidingWindow.absoluteIndex(),i=this.scanSingleLineCommentTriviaLength();return e.Syntax.deferredTrivia(7,t,n+r,i)},o.prototype.scanSingleLineCommentTriviaLength=function(){this.slidingWindow.moveToNextItem(),this.slidingWindow.moveToNextItem();for(var e=2;;){if(this.slidingWindow.isAtEndOfSource()||this.isNewLineCharacter(this.currentCharCode()))return e;this.slidingWindow.moveToNextItem(),e++}},o.prototype.scanMultiLineCommentTrivia=function(t,n){var r=this.absoluteIndex(),i=this.scanMultiLineCommentTriviaLength(null);return e.Syntax.deferredTrivia(6,t,n+r,i)},o.prototype.scanMultiLineCommentTriviaLength=function(t){this.slidingWindow.moveToNextItem(),this.slidingWindow.moveToNextItem();for(var n=2;;){if(this.slidingWindow.isAtEndOfSource())return null!==t&&t.push(new e.Diagnostic(this.fileName,this.text.lineMap(),this.slidingWindow.absoluteIndex(),0,e.DiagnosticCode.AsteriskSlash_expected,null)),n;var r=this.currentCharCode();if(42===r&&47===this.slidingWindow.peekItemN(1))return this.slidingWindow.moveToNextItem(),this.slidingWindow.moveToNextItem(),n+=2;this.slidingWindow.moveToNextItem(),n++}},o.prototype.scanLineTerminatorSequenceTrivia=function(t){var n=this.slidingWindow.getAndPinAbsoluteIndex(),r=this.scanLineTerminatorSequenceLength(t),i=this.substring(n,n+r,!1);return this.slidingWindow.releaseAndUnpinAbsoluteIndex(n),e.Syntax.trivia(5,i)},o.prototype.scanLineTerminatorSequenceLength=function(e){return this.slidingWindow.moveToNextItem(),13===e&&10===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),2):1},o.prototype.scanSyntaxToken=function(e,t){if(this.slidingWindow.isAtEndOfSource())return 10;var r=this.currentCharCode();switch(r){case 34:case 39:return this.scanStringLiteral(e);case 47:return this.scanSlashToken(t);case 46:return this.scanDotToken(e);case 45:return this.scanMinusToken();case 33:return this.scanExclamationToken();case 61:return this.scanEqualsToken();case 124:return this.scanBarToken();case 42:return this.scanAsteriskToken();case 43:return this.scanPlusToken();case 37:return this.scanPercentToken();case 38:return this.scanAmpersandToken();case 94:return this.scanCaretToken();case 60:return this.scanLessThanToken();case 62:return this.advanceAndSetTokenKind(81);case 44:return this.advanceAndSetTokenKind(79);case 58:return this.advanceAndSetTokenKind(106);case 59:return this.advanceAndSetTokenKind(78);case 126:return this.advanceAndSetTokenKind(102);case 40:return this.advanceAndSetTokenKind(72);case 41:return this.advanceAndSetTokenKind(73);case 123:return this.advanceAndSetTokenKind(70);case 125:return this.advanceAndSetTokenKind(71);case 91:return this.advanceAndSetTokenKind(74);case 93:return this.advanceAndSetTokenKind(75);case 63:return this.advanceAndSetTokenKind(105)}if(i[r])return this.scanNumericLiteral(e);if(n[r]){var o=this.tryFastScanIdentifierOrKeyword(r);if(0!==o)return o}return this.isIdentifierStart(this.peekCharOrUnicodeEscape())?this.slowScanIdentifierOrKeyword(e):this.scanDefaultCharacter(r,e)},o.prototype.isIdentifierStart=function(t){return n[t]?!0:t>127&&e.Unicode.isIdentifierStart(t,this._languageVersion)},o.prototype.isIdentifierPart=function(t){return r[t]?!0:t>127&&e.Unicode.isIdentifierPart(t,this._languageVersion)},o.prototype.tryFastScanIdentifierOrKeyword=function(n){for(var i=this.slidingWindow,o=i.window,a=i.currentRelativeItemIndex,s=i.windowCount,l=a,c=0;s>l&&(c=o[l],r[c]);)l++;if(l===s)return 0;if(92===c||c>127)return 0;var u,p=l-a;return u=t[n]?e.ScannerUtilities.identifierKind(o,a,p):11,i.setAbsoluteIndex(i.absoluteIndex()+p),u},o.prototype.slowScanIdentifierOrKeyword=function(t){var n=this.slidingWindow.absoluteIndex(),r=!1;do{var i=this.scanCharOrUnicodeEscape(t);r=r||i}while(this.isIdentifierPart(this.peekCharOrUnicodeEscape()));var o=this.slidingWindow.absoluteIndex()-n,a=this.text.substr(n,o,!1),s=e.Syntax.massageEscapes(a),l=e.SyntaxFacts.getTokenKind(s);return l>=15&&69>=l?r?-2147483648|l:l:11},o.prototype.scanNumericLiteral=function(e){return this.isHexNumericLiteral()?this.scanHexNumericLiteral():this.isOctalNumericLiteral()?this.scanOctalNumericLiteral(e):this.scanDecimalNumericLiteral(),13},o.prototype.isOctalNumericLiteral=function(){return 48===this.currentCharCode()&&e.CharacterInfo.isOctalDigit(this.slidingWindow.peekItemN(1))},o.prototype.scanOctalNumericLiteral=function(t){for(var n=this.absoluteIndex();e.CharacterInfo.isOctalDigit(this.currentCharCode());)this.slidingWindow.moveToNextItem();this.languageVersion()>=1&&t.push(new e.Diagnostic(this.fileName,this.text.lineMap(),n,this.absoluteIndex()-n,e.DiagnosticCode.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher,null))},o.prototype.scanDecimalDigits=function(){for(;e.CharacterInfo.isDecimalDigit(this.currentCharCode());)this.slidingWindow.moveToNextItem()},o.prototype.scanDecimalNumericLiteral=function(){this.scanDecimalDigits(),46===this.currentCharCode()&&this.slidingWindow.moveToNextItem(),this.scanDecimalDigits();var t=this.currentCharCode();if(101===t||69===t){var n=this.slidingWindow.peekItemN(1);if(e.CharacterInfo.isDecimalDigit(n))this.slidingWindow.moveToNextItem(),this.scanDecimalDigits();else if(45===n||43===n){var r=this.slidingWindow.peekItemN(2);e.CharacterInfo.isDecimalDigit(r)&&(this.slidingWindow.moveToNextItem(),this.slidingWindow.moveToNextItem(),this.scanDecimalDigits())}}},o.prototype.scanHexNumericLiteral=function(){for(this.slidingWindow.moveToNextItem(),this.slidingWindow.moveToNextItem();e.CharacterInfo.isHexDigit(this.currentCharCode());)this.slidingWindow.moveToNextItem()},o.prototype.isHexNumericLiteral=function(){if(48===this.currentCharCode()){var t=this.slidingWindow.peekItemN(1);if(120===t||88===t)return t=this.slidingWindow.peekItemN(2),e.CharacterInfo.isHexDigit(t)}return!1},o.prototype.advanceAndSetTokenKind=function(e){return this.slidingWindow.moveToNextItem(),e},o.prototype.scanLessThanToken=function(){return this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),82):60===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),112):95):80},o.prototype.scanBarToken=function(){return this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),116):124===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),104):99},o.prototype.scanCaretToken=function(){return this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),117):100},o.prototype.scanAmpersandToken=function(){this.slidingWindow.moveToNextItem();var e=this.currentCharCode();return 61===e?(this.slidingWindow.moveToNextItem(),115):38===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),103):98},o.prototype.scanPercentToken=function(){return this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),111):92},o.prototype.scanMinusToken=function(){this.slidingWindow.moveToNextItem();var e=this.currentCharCode();return 61===e?(this.slidingWindow.moveToNextItem(),109):45===e?(this.slidingWindow.moveToNextItem(),94):90},o.prototype.scanPlusToken=function(){this.slidingWindow.moveToNextItem();var e=this.currentCharCode();return 61===e?(this.slidingWindow.moveToNextItem(),108):43===e?(this.slidingWindow.moveToNextItem(),93):89},o.prototype.scanAsteriskToken=function(){return this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),110):91},o.prototype.scanEqualsToken=function(){this.slidingWindow.moveToNextItem();var e=this.currentCharCode();return 61===e?(this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),87):84):62===e?(this.slidingWindow.moveToNextItem(),85):107},o.prototype.isDotPrefixedNumericLiteral=function(){if(46===this.currentCharCode()){var t=this.slidingWindow.peekItemN(1);return e.CharacterInfo.isDecimalDigit(t)}return!1},o.prototype.scanDotToken=function(e){return this.isDotPrefixedNumericLiteral()?this.scanNumericLiteral(e):(this.slidingWindow.moveToNextItem(),46===this.currentCharCode()&&46===this.slidingWindow.peekItemN(1)?(this.slidingWindow.moveToNextItem(),this.slidingWindow.moveToNextItem(),77):76)},o.prototype.scanSlashToken=function(e){if(e){var t=this.tryScanRegularExpressionToken();if(0!==t)return t}return this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),119):118},o.prototype.tryScanRegularExpressionToken=function(){var e=this.slidingWindow.getAndPinAbsoluteIndex();this.slidingWindow.moveToNextItem();for(var t=!1,n=!1;;){var i=this.currentCharCode();if(this.isNewLineCharacter(i)||this.slidingWindow.isAtEndOfSource())return this.slidingWindow.rewindToPinnedIndex(e),this.slidingWindow.releaseAndUnpinAbsoluteIndex(e),0;this.slidingWindow.moveToNextItem();{if(!t){switch(i){case 92:t=!0;continue;case 91:n=!0;continue;case 93:n=!1;continue;case 47:if(n)continue;break;default:continue}break}t=!1}}for(;r[this.currentCharCode()];)this.slidingWindow.moveToNextItem();return this.slidingWindow.releaseAndUnpinAbsoluteIndex(e),12},o.prototype.scanExclamationToken=function(){return this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),61===this.currentCharCode()?(this.slidingWindow.moveToNextItem(),88):86):101},o.prototype.scanDefaultCharacter=function(t,n){var r=this.slidingWindow.absoluteIndex();this.slidingWindow.moveToNextItem();var i=String.fromCharCode(t),o=this.getErrorMessageText(i);return n.push(new e.Diagnostic(this.fileName,this.text.lineMap(),r,1,e.DiagnosticCode.Unexpected_character_0,[o])),9},o.prototype.getErrorMessageText=function(e){return"\\"===e?'"\\"':JSON.stringify(e)},o.prototype.skipEscapeSequence=function(e){var t=this.slidingWindow.getAndPinAbsoluteIndex();this.slidingWindow.moveToNextItem();var n=this.currentCharCode();switch(this.slidingWindow.moveToNextItem(),n){case 120:case 117:this.slidingWindow.rewindToPinnedIndex(t);{this.scanUnicodeOrHexEscape(e)}break;case 13:10===this.currentCharCode()&&this.slidingWindow.moveToNextItem()}this.slidingWindow.releaseAndUnpinAbsoluteIndex(t)},o.prototype.scanStringLiteral=function(t){var n=this.currentCharCode();for(this.slidingWindow.moveToNextItem();;){var r=this.currentCharCode();if(92===r)this.skipEscapeSequence(t);else{if(r===n){this.slidingWindow.moveToNextItem();break}if(this.isNewLineCharacter(r)||this.slidingWindow.isAtEndOfSource()){t.push(new e.Diagnostic(this.fileName,this.text.lineMap(),e.MathPrototype.min(this.slidingWindow.absoluteIndex(),this.text.length()),1,e.DiagnosticCode.Missing_close_quote_character,null));break}this.slidingWindow.moveToNextItem()}}return 14},o.prototype.isUnicodeEscape=function(e){if(92===e){var t=this.slidingWindow.peekItemN(1);if(117===t)return!0}return!1},o.prototype.peekCharOrUnicodeEscape=function(){var e=this.currentCharCode();return this.isUnicodeEscape(e)?this.peekUnicodeOrHexEscape():e},o.prototype.peekUnicodeOrHexEscape=function(){var e=this.slidingWindow.getAndPinAbsoluteIndex(),t=this.scanUnicodeOrHexEscape(null);return this.slidingWindow.rewindToPinnedIndex(e),this.slidingWindow.releaseAndUnpinAbsoluteIndex(e),t},o.prototype.scanCharOrUnicodeEscape=function(e){var t=this.currentCharCode();if(92===t){var n=this.slidingWindow.peekItemN(1);if(117===n)return this.scanUnicodeOrHexEscape(e),!0}return this.slidingWindow.moveToNextItem(),!1},o.prototype.scanUnicodeOrHexEscape=function(t){var n=this.slidingWindow.absoluteIndex(),r=this.currentCharCode();this.slidingWindow.moveToNextItem(),r=this.currentCharCode();var i=0;this.slidingWindow.moveToNextItem();for(var o=117===r?4:2,a=0;o>a;a++){var s=this.currentCharCode();if(!e.CharacterInfo.isHexDigit(s)){if(null!==t){var l=this.slidingWindow.absoluteIndex(),c=this.createIllegalEscapeDiagnostic(n,l);t.push(c)}break}i=(i<<4)+e.CharacterInfo.hexValue(s),this.slidingWindow.moveToNextItem()}return i},o.prototype.substring=function(t,n,r){var i=n-t,o=t-this.slidingWindow.windowAbsoluteStartIndex;return r?e.Collections.DefaultStringTable.addCharArray(this.slidingWindow.window,o,i):e.StringUtilities.fromCharCodeArray(this.slidingWindow.window.slice(o,o+i))},o.prototype.createIllegalEscapeDiagnostic=function(t,n){return new e.Diagnostic(this.fileName,this.text.lineMap(),t,n-t,e.DiagnosticCode.Unrecognized_escape_sequence,null)},o.isValidIdentifier=function(t,n){var r=new o(null,t,n,o.triviaWindow),i=new Array,a=r.scan(i,!1);return 0===i.length&&e.SyntaxFacts.isIdentifierNameOrAnyKeyword(a)&&a.width()===t.length()},o.triviaWindow=e.ArrayUtilities.createArray(2048,0),o}();e.Scanner=l}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){}return e.identifierKind=function(e,t,n){switch(n){case 2:switch(e[t]){case 100:return 111===e[t+1]?22:11;case 105:switch(e[t+1]){case 102:return 28;case 110:return 29;default:return 11}default:return 11}case 3:switch(e[t]){case 102:return 111===e[t+1]&&114===e[t+2]?26:11;case 110:return 101===e[t+1]&&119===e[t+2]?31:11;case 116:return 114===e[t+1]&&121===e[t+2]?38:11;case 118:return 97===e[t+1]&&114===e[t+2]?40:11;case 108:return 101===e[t+1]&&116===e[t+2]?53:11;case 97:return 110===e[t+1]&&121===e[t+2]?60:11;case 103:return 101===e[t+1]&&116===e[t+2]?64:11;case 115:return 101===e[t+1]&&116===e[t+2]?68:11;default:return 11}case 4:switch(e[t]){case 99:return 97===e[t+1]&&115===e[t+2]&&101===e[t+3]?16:11;case 101:switch(e[t+1]){case 108:return 115===e[t+2]&&101===e[t+3]?23:11;case 110:return 117===e[t+2]&&109===e[t+3]?46:11;default:return 11}case 110:return 117===e[t+1]&&108===e[t+2]&&108===e[t+3]?32:11;case 116:switch(e[t+1]){case 104:return 105===e[t+2]&&115===e[t+3]?35:11;case 114:return 117===e[t+2]&&101===e[t+3]?37:11;default:return 11}case 118:return 111===e[t+1]&&105===e[t+2]&&100===e[t+3]?41:11;case 119:return 105===e[t+1]&&116===e[t+2]&&104===e[t+3]?43:11;default:return 11}case 5:switch(e[t]){case 98:return 114===e[t+1]&&101===e[t+2]&&97===e[t+3]&&107===e[t+4]?15:11;case 99:switch(e[t+1]){case 97:return 116===e[t+2]&&99===e[t+3]&&104===e[t+4]?17:11;case 108:return 97===e[t+2]&&115===e[t+3]&&115===e[t+4]?44:11;case 111:return 110===e[t+2]&&115===e[t+3]&&116===e[t+4]?45:11;default:return 11}case 102:return 97===e[t+1]&&108===e[t+2]&&115===e[t+3]&&101===e[t+4]?24:11;case 116:return 104===e[t+1]&&114===e[t+2]&&111===e[t+3]&&119===e[t+4]?36:11;case 119:return 104===e[t+1]&&105===e[t+2]&&108===e[t+3]&&101===e[t+4]?42:11;case 115:return 117===e[t+1]&&112===e[t+2]&&101===e[t+3]&&114===e[t+4]?50:11;case 121:return 105===e[t+1]&&101===e[t+2]&&108===e[t+3]&&100===e[t+4]?59:11;default:return 11}case 6:switch(e[t]){case 100:return 101===e[t+1]&&108===e[t+2]&&101===e[t+3]&&116===e[t+4]&&101===e[t+5]?21:11;case 114:return 101===e[t+1]&&116===e[t+2]&&117===e[t+3]&&114===e[t+4]&&110===e[t+5]?33:11;case 115:switch(e[t+1]){case 119:return 105===e[t+2]&&116===e[t+3]&&99===e[t+4]&&104===e[t+5]?34:11;case 116:switch(e[t+2]){case 97:return 116===e[t+3]&&105===e[t+4]&&99===e[t+5]?58:11;case 114:return 105===e[t+3]&&110===e[t+4]&&103===e[t+5]?69:11;default:return 11}default:return 11}case 116:return 121===e[t+1]&&112===e[t+2]&&101===e[t+3]&&111===e[t+4]&&102===e[t+5]?39:11;case 101:return 120===e[t+1]&&112===e[t+2]&&111===e[t+3]&&114===e[t+4]&&116===e[t+5]?47:11;case 105:return 109===e[t+1]&&112===e[t+2]&&111===e[t+3]&&114===e[t+4]&&116===e[t+5]?49:11;case 112:return 117===e[t+1]&&98===e[t+2]&&108===e[t+3]&&105===e[t+4]&&99===e[t+5]?57:11;case 109:return 111===e[t+1]&&100===e[t+2]&&117===e[t+3]&&108===e[t+4]&&101===e[t+5]?65:11;case 110:return 117===e[t+1]&&109===e[t+2]&&98===e[t+3]&&101===e[t+4]&&114===e[t+5]?67:11;default:return 11}case 7:switch(e[t]){case 100:switch(e[t+1]){case 101:switch(e[t+2]){case 102:return 97===e[t+3]&&117===e[t+4]&&108===e[t+5]&&116===e[t+6]?20:11;case 99:return 108===e[t+3]&&97===e[t+4]&&114===e[t+5]&&101===e[t+6]?63:11;default:return 11}default:return 11}case 102:return 105===e[t+1]&&110===e[t+2]&&97===e[t+3]&&108===e[t+4]&&108===e[t+5]&&121===e[t+6]?25:11;case 101:return 120===e[t+1]&&116===e[t+2]&&101===e[t+3]&&110===e[t+4]&&100===e[t+5]&&115===e[t+6]?48:11;case 112:switch(e[t+1]){case 97:return 99===e[t+2]&&107===e[t+3]&&97===e[t+4]&&103===e[t+5]&&101===e[t+6]?54:11;case 114:return 105===e[t+2]&&118===e[t+3]&&97===e[t+4]&&116===e[t+5]&&101===e[t+6]?55:11;default:return 11}case 98:return 111===e[t+1]&&111===e[t+2]&&108===e[t+3]&&101===e[t+4]&&97===e[t+5]&&110===e[t+6]?61:11;case 114:return 101===e[t+1]&&113===e[t+2]&&117===e[t+3]&&105===e[t+4]&&114===e[t+5]&&101===e[t+6]?66:11;default:return 11}case 8:switch(e[t]){case 99:return 111===e[t+1]&&110===e[t+2]&&116===e[t+3]&&105===e[t+4]&&110===e[t+5]&&117===e[t+6]&&101===e[t+7]?18:11;case 100:return 101===e[t+1]&&98===e[t+2]&&117===e[t+3]&&103===e[t+4]&&103===e[t+5]&&101===e[t+6]&&114===e[t+7]?19:11;case 102:return 117===e[t+1]&&110===e[t+2]&&99===e[t+3]&&116===e[t+4]&&105===e[t+5]&&111===e[t+6]&&110===e[t+7]?27:11;default:return 11}case 9:switch(e[t]){case 105:return 110===e[t+1]&&116===e[t+2]&&101===e[t+3]&&114===e[t+4]&&102===e[t+5]&&97===e[t+6]&&99===e[t+7]&&101===e[t+8]?52:11;case 112:return 114===e[t+1]&&111===e[t+2]&&116===e[t+3]&&101===e[t+4]&&99===e[t+5]&&116===e[t+6]&&101===e[t+7]&&100===e[t+8]?56:11;default:return 11}case 10:switch(e[t]){case 105:switch(e[t+1]){case 110:return 115===e[t+2]&&116===e[t+3]&&97===e[t+4]&&110===e[t+5]&&99===e[t+6]&&101===e[t+7]&&111===e[t+8]&&102===e[t+9]?30:11;case 109:return 112===e[t+2]&&108===e[t+3]&&101===e[t+4]&&109===e[t+5]&&101===e[t+6]&&110===e[t+7]&&116===e[t+8]&&115===e[t+9]?51:11;default:return 11}default:return 11}case 11:return 99===e[t]&&111===e[t+1]&&110===e[t+2]&&115===e[t+3]&&116===e[t+4]&&114===e[t+5]&&117===e[t+6]&&99===e[t+7]&&116===e[t+8]&&111===e[t+9]&&114===e[t+10]?62:11;default:return 11}},e}();e.ScannerUtilities=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e){return r(e,!1)}function r(e,n){if(void 0===e||null===e||0===e.length)return t.emptySeparatedList;if(n)for(var r=0;rt;t++)e.push(this.nonSeparatorAt(t));return e},t.prototype.childAt=function(t){if(0>t||t>=this.elements.length)throw e.Errors.argumentOutOfRange("index");return this.elements[t]},t.prototype.nonSeparatorAt=function(t){var n=2*t;if(0>n||n>=this.elements.length)throw e.Errors.argumentOutOfRange("index");return this.elements[n]},t.prototype.separatorAt=function(t){var n=2*t+1;if(0>n||n>=this.elements.length)throw e.Errors.argumentOutOfRange("index");return this.elements[n]},t.prototype.firstToken=function(){for(var e,t=0,n=this.elements.length;n>t;t++)if(t%2===0){var r=this.elements[t];if(e=r.firstToken(),null!==e)return e}else if(e=this.elements[t],e.width()>0)return e;return null},t.prototype.lastToken=function(){for(var e,t=this.elements.length-1;t>=0;t--)if(t%2===0){var n=this.elements[t];if(e=n.lastToken(),null!==e)return e}else if(e=this.elements[t],e.width()>0)return e;return null},t.prototype.fullText=function(){var e=[];return this.collectTextElements(e),e.join("")},t.prototype.isTypeScriptSpecific=function(){for(var e=0,t=this.nonSeparatorCount();t>e;e++)if(this.nonSeparatorAt(e).isTypeScriptSpecific())return!0;return!1},t.prototype.isIncrementallyUnusable=function(){return 0!==(2&this.data())},t.prototype.fullWidth=function(){return this.data()>>>3},t.prototype.width=function(){var e=this.fullWidth();return e-this.leadingTriviaWidth()-this.trailingTriviaWidth()},t.prototype.leadingTrivia=function(){return this.firstToken().leadingTrivia() },t.prototype.trailingTrivia=function(){return this.lastToken().trailingTrivia()},t.prototype.leadingTriviaWidth=function(){return this.firstToken().leadingTriviaWidth()},t.prototype.trailingTriviaWidth=function(){return this.lastToken().trailingTriviaWidth()},t.prototype.computeData=function(){for(var e=0,t=!1,n=0,r=this.elements.length;r>n;n++){var i=this.elements[n],o=i.fullWidth();e+=o,t=t||i.isIncrementallyUnusable()}return e<<3|(t?2:0)|1},t.prototype.data=function(){return 0===(1&this._data)&&(this._data=this.computeData()),this._data},t.prototype.findTokenInternal=function(t,n,r){t=new e.PositionedSeparatedList(t,this,r);for(var i=0,o=this.elements.length;o>i;i++){var a=this.elements[i],s=a.fullWidth();if(s>n)return a.findTokenInternal(t,n,r);n-=s,r+=s}throw e.Errors.invalidOperation()},t.prototype.collectTextElements=function(e){for(var t=0,n=this.elements.length;n>t;t++){var r=this.elements[t];r.collectTextElements(e)}},t.prototype.insertChildrenInto=function(e,t){0===t?e.unshift.apply(e,this.elements):e.splice.apply(e,[t,0].concat(this.elements))},t}();t.separatedList=n}(e.Syntax||(e.Syntax={}));e.Syntax}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(e,t,n,r){"undefined"==typeof r&&(r=-1),this.source=e,this.window=t,this.defaultValue=n,this.sourceLength=r,this.windowCount=0,this.windowAbsoluteStartIndex=0,this.currentRelativeItemIndex=0,this._pinCount=0,this.firstPinnedAbsoluteIndex=-1}return t.prototype.windowAbsoluteEndIndex=function(){return this.windowAbsoluteStartIndex+this.windowCount},t.prototype.addMoreItemsToWindow=function(e){if(this.sourceLength>=0&&this.absoluteIndex()>=this.sourceLength)return!1;this.windowCount>=this.window.length&&this.tryShiftOrGrowWindow();var t=this.window.length-this.windowCount,n=this.source.fetchMoreItems(e,this.windowAbsoluteEndIndex(),this.window,this.windowCount,t);return this.windowCount+=n,n>0},t.prototype.tryShiftOrGrowWindow=function(){var t=this.currentRelativeItemIndex>this.window.length>>>1,n=-1===this.firstPinnedAbsoluteIndex||this.firstPinnedAbsoluteIndex>this.windowAbsoluteStartIndex;if(t&&n){var r=-1===this.firstPinnedAbsoluteIndex?this.currentRelativeItemIndex:this.firstPinnedAbsoluteIndex-this.windowAbsoluteStartIndex,i=this.windowCount-r;i>0&&e.ArrayUtilities.copy(this.window,r,this.window,0,i),this.windowAbsoluteStartIndex+=r,this.windowCount-=r,this.currentRelativeItemIndex-=r}else e.ArrayUtilities.grow(this.window,2*this.window.length,this.defaultValue)},t.prototype.absoluteIndex=function(){return this.windowAbsoluteStartIndex+this.currentRelativeItemIndex},t.prototype.isAtEndOfSource=function(){return this.absoluteIndex()>=this.sourceLength},t.prototype.getAndPinAbsoluteIndex=function(){var e=this.absoluteIndex(),t=this._pinCount++;return 0===t&&(this.firstPinnedAbsoluteIndex=e),e},t.prototype.releaseAndUnpinAbsoluteIndex=function(){this._pinCount--,0===this._pinCount&&(this.firstPinnedAbsoluteIndex=-1)},t.prototype.rewindToPinnedIndex=function(e){var t=e-this.windowAbsoluteStartIndex;this.currentRelativeItemIndex=t},t.prototype.currentItem=function(e){return this.currentRelativeItemIndex>=this.windowCount&&!this.addMoreItemsToWindow(e)?this.defaultValue:this.window[this.currentRelativeItemIndex]},t.prototype.peekItemN=function(e){for(;this.currentRelativeItemIndex+e>=this.windowCount;)if(!this.addMoreItemsToWindow(null))return this.defaultValue;return this.window[this.currentRelativeItemIndex+e]},t.prototype.moveToNextItem=function(){this.currentRelativeItemIndex++},t.prototype.disgardAllItemsFromCurrentIndexOnwards=function(){this.windowCount=this.currentRelativeItemIndex},t.prototype.setAbsoluteIndex=function(e){this.absoluteIndex()!==e&&(this._pinCount>0,e>=this.windowAbsoluteStartIndex&&ei;i++){var a=t.childAt(i);if(a===n)return r;null!==a&&(r+=a.fullWidth())}throw e.Errors.invalidOperation()}function s(e,t){for(var n=0,r=0;t>r;r++){var i=e.childAt(r);null!==i&&(n+=i.fullWidth())}return n}function l(t,n){for(var r=0,i=t.childCount();i>r;r++){var o=t.childAt(r);if(o===n)return r}throw e.Errors.invalidOperation()}function c(e,t){return null===e?null===t:e.structuralEquals(t)}function u(e,t){return e===t?!0:null===e||null===t?!1:e.isToken()?t.isToken()?p(e,t):!1:t.isNode()?c(e,t):!1}function p(t,n){return t===n?!0:null===t||null===n?!1:t.kind()===n.kind()&&t.width()===n.width()&&t.fullWidth()===n.fullWidth()&&t.text()===n.text()&&e.Syntax.triviaListStructuralEquals(t.leadingTrivia(),n.leadingTrivia())&&e.Syntax.triviaListStructuralEquals(t.trailingTrivia(),n.trailingTrivia())}function h(t,n){if(t.count()!==n.count())return!1;for(var r=0,i=t.count();i>r;r++)if(!e.Syntax.triviaStructuralEquals(t.syntaxTriviaAt(r),n.syntaxTriviaAt(r)))return!1;return!0}function d(e,t){return e.kind()===t.kind()&&e.fullWidth()===t.fullWidth()&&e.fullText()===t.fullText()}function m(t,n){if(t.childCount()!==n.childCount())return!1;for(var r=0,i=t.childCount();i>r;r++){var o=t.childAt(r),a=n.childAt(r);if(!e.Syntax.nodeOrTokenStructuralEquals(o,a))return!1}return!0}function y(t,n){if(t.childCount()!==n.childCount())return!1;for(var r=0,i=t.childCount();i>r;r++){var o=t.childAt(r),a=n.childAt(r);if(!e.Syntax.nodeOrTokenStructuralEquals(o,a))return!1}return!0}function f(t,n){if(t===n)return!0;if(null===t||null===n)return!1;if(n.kind()!==n.kind())return!1;if(t.isToken())return p(t,n);if(t.isNode())return c(t,n);if(t.isList())return m(t,n);if(t.isSeparatedList())return y(t,n);throw e.Errors.invalidOperation()}function g(t,n){return"undefined"==typeof n&&(n=null),e.Syntax.identifier(t)}function v(){return e.Syntax.token(37)}function S(){return e.Syntax.token(24)}function T(t){return e.Syntax.token(13,{text:t})}function b(t){return e.Syntax.token(14,{text:t})}function _(e){return 213===e.kind()&&50===e.expression.kind()}function E(e){return 149===e.kind()&&_(e.expression)}function C(e){return 212===e.kind()&&50===e.expression.kind()}function x(e){return 213===e.kind()&&C(e.expression)}function k(t,n,r){return e.Syntax.normalModeFactory.binaryExpression(174,t,n,r)}function w(e){for(var t=0;tt){var r=t+e.fullWidth();if(r>n)return!0;if(n===r)return 7===e.kind()||D(e)}return!1}function L(e,t){var n=e.findToken(t),r=n.fullStart(),i=null,o=null;if(10===n.kind()?n.token().hasLeadingTrivia()?i=n.token().leadingTrivia():(n=n.previousToken(),n&&n&&n.token().hasTrailingTrivia()&&(i=n.token().trailingTrivia(),r=n.end())):t<=r+n.token().leadingTriviaWidth()?i=n.token().leadingTrivia():t>=r+n.token().width()&&(i=n.token().trailingTrivia(),r=n.end()),i)for(var a=0,s=i.count();s>a;a++){var l=i.syntaxTriviaAt(a);if(r>=t)break;if(t<=r+l.fullWidth()&&l.isComment()){o=l;break}r+=l.fullWidth()}return o&&I(o,r,t)}function N(e,t){var n=e.findToken(t);if(n){if(10===n.kind())return n=n.previousToken(),n&&0===n.token().trailingTriviaWidth()&&A(n.token());if(t>n.start())return ta;a++){var l=o.syntaxTriviaAt(a),c=l.fullWidth();if(l.isSkippedToken()&&n>=i&&i+c>=n)return new e.PositionedSkippedToken(t,l.skippedToken(),i);i+=c}return null}function M(t,n,r){var i,o=null;if(r?(o=t.token().leadingTrivia(),i=t.fullStart()+o.fullWidth()):(o=t.token().trailingTrivia(),i=t.fullEnd()),o&&o.hasSkippedToken())for(var a=o.count()-1;a>=0;a--){var s=o.syntaxTriviaAt(a),l=s.fullWidth();if(s.isSkippedToken()&&n>=i)return new e.PositionedSkippedToken(t,s.skippedToken(),i-l);i-=l}return null}function O(e,t){return P(e,t,!0)}function F(e,t){return P(e,t,!1)}function R(e,t){var n=tt||t>=this.nodeOrTokens.length)throw e.Errors.argumentOutOfRange("index");return this.nodeOrTokens[t]},t.prototype.toArray=function(){return this.nodeOrTokens.slice(0)},t.prototype.collectTextElements=function(e){for(var t=0,n=this.nodeOrTokens.length;n>t;t++){var r=this.nodeOrTokens[t];r.collectTextElements(e)}},t.prototype.firstToken=function(){for(var e=0,t=this.nodeOrTokens.length;t>e;e++){var n=this.nodeOrTokens[e].firstToken();if(null!==n)return n}return null},t.prototype.lastToken=function(){for(var e=this.nodeOrTokens.length-1;e>=0;e--){var t=this.nodeOrTokens[e].lastToken();if(null!==t)return t}return null},t.prototype.fullText=function(){var e=new Array;return this.collectTextElements(e),e.join("")},t.prototype.isTypeScriptSpecific=function(){for(var e=0,t=this.nodeOrTokens.length;t>e;e++)if(this.nodeOrTokens[e].isTypeScriptSpecific())return!0; return!1},t.prototype.isIncrementallyUnusable=function(){return 0!==(2&this.data())},t.prototype.fullWidth=function(){return this.data()>>>3},t.prototype.width=function(){var e=this.fullWidth();return e-this.leadingTriviaWidth()-this.trailingTriviaWidth()},t.prototype.leadingTrivia=function(){return this.firstToken().leadingTrivia()},t.prototype.trailingTrivia=function(){return this.lastToken().trailingTrivia()},t.prototype.leadingTriviaWidth=function(){return this.firstToken().leadingTriviaWidth()},t.prototype.trailingTriviaWidth=function(){return this.lastToken().trailingTriviaWidth()},t.prototype.computeData=function(){for(var e=0,t=!1,n=0,r=this.nodeOrTokens.length;r>n;n++){var i=this.nodeOrTokens[n];e+=i.fullWidth(),t=t||i.isIncrementallyUnusable()}return e<<3|(t?2:0)|1},t.prototype.data=function(){return 0===(1&this._data)&&(this._data=this.computeData()),this._data},t.prototype.findTokenInternal=function(t,n,r){t=new e.PositionedList(t,this,r);for(var i=0,o=this.nodeOrTokens.length;o>i;i++){var a=this.nodeOrTokens[i],s=a.fullWidth();if(s>n)return a.findTokenInternal(t,n,r);n-=s,r+=s}throw e.Errors.invalidOperation()},t.prototype.insertChildrenInto=function(e,t){0===t?e.unshift.apply(e,this.nodeOrTokens):e.splice.apply(e,[t,0].concat(this.nodeOrTokens))},t}();t.list=n}(e.Syntax||(e.Syntax={}));e.Syntax}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(e){this._data=e?4:0}return t.prototype.isNode=function(){return!0},t.prototype.isToken=function(){return!1},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){throw e.Errors.abstract()},t.prototype.childCount=function(){throw e.Errors.abstract()},t.prototype.childAt=function(){throw e.Errors.abstract()},t.prototype.firstToken=function(){for(var e=0,t=this.childCount();t>e;e++){var n=this.childAt(e);if(null!==n&&(n.fullWidth()>0||10===n.kind()))return n.firstToken()}return null},t.prototype.lastToken=function(){for(var e=this.childCount()-1;e>=0;e--){var t=this.childAt(e);if(null!==t&&(t.fullWidth()>0||10===t.kind()))return t.lastToken()}return null},t.prototype.insertChildrenInto=function(t,n){for(var r=this.childCount()-1;r>=0;r--){var i=this.childAt(r);if(null!==i)if(i.isNode()||i.isToken())t.splice(n,0,i);else if(i.isList())i.insertChildrenInto(t,n);else{if(!i.isSeparatedList())throw e.Errors.invalidOperation();i.insertChildrenInto(t,n)}}},t.prototype.leadingTrivia=function(){var t=this.firstToken();return t?t.leadingTrivia():e.Syntax.emptyTriviaList},t.prototype.trailingTrivia=function(){var t=this.lastToken();return t?t.trailingTrivia():e.Syntax.emptyTriviaList},t.prototype.toJSON=function(){var t={kind:e.SyntaxKind[this.kind()],fullWidth:this.fullWidth()};this.isIncrementallyUnusable()&&(t.isIncrementallyUnusable=!0),this.parsedInStrictMode()&&(t.parsedInStrictMode=!0);for(var n=0,r=this.childCount();r>n;n++){var i=this.childAt(n);if(i)for(var o in this)if(i===this[o]){t[o]=i;break}}return t},t.prototype.accept=function(){throw e.Errors.abstract()},t.prototype.fullText=function(){var e=[];return this.collectTextElements(e),e.join("")},t.prototype.collectTextElements=function(e){for(var t=0,n=this.childCount();n>t;t++){var r=this.childAt(t);null!==r&&r.collectTextElements(e)}},t.prototype.replaceToken=function(t,n){return t===n?this:this.accept(new e.SyntaxTokenReplacer(t,n))},t.prototype.withLeadingTrivia=function(e){return this.replaceToken(this.firstToken(),this.firstToken().withLeadingTrivia(e))},t.prototype.withTrailingTrivia=function(e){return this.replaceToken(this.lastToken(),this.lastToken().withTrailingTrivia(e))},t.prototype.hasLeadingTrivia=function(){return this.lastToken().hasLeadingTrivia()},t.prototype.hasTrailingTrivia=function(){return this.lastToken().hasTrailingTrivia()},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0!==(2&this.data())},t.prototype.parsedInStrictMode=function(){return 0!==(4&this.data())},t.prototype.fullWidth=function(){return this.data()>>>3},t.prototype.computeData=function(){for(var e=this.childCount(),t=0,n=0,r=0!==(2&this._data)||0===e,i=0,o=e;o>i;i++){var a=this.childAt(i);null!==a&&(n=a.fullWidth(),t+=n,r||(r=a.isIncrementallyUnusable()))}return t<<3|(r?2:0)|1},t.prototype.data=function(){return 0===(1&this._data)&&(this._data|=this.computeData()),this._data},t.prototype.findToken=function(t,n){"undefined"==typeof n&&(n=!1);var r=this.tryGetEndOfFileAt(t);if(null!==r)return r;if(0>t||t>=this.fullWidth())throw e.Errors.argumentOutOfRange("position");var i=this.findTokenInternal(null,t,0);return n?e.Syntax.findSkippedTokenInPositionedToken(i,t)||i:i},t.prototype.tryGetEndOfFileAt=function(t){if(120===this.kind()&&t===this.fullWidth()){var n=this;return new e.PositionedToken(new e.PositionedNode(null,n,0),n.endOfFileToken,n.moduleElements.fullWidth())}return null},t.prototype.findTokenInternal=function(t,n,r){t=new e.PositionedNode(t,this,r);for(var i=0,o=this.childCount();o>i;i++){var a=this.childAt(i);if(null!==a){var s=a.fullWidth();if(s>n)return a.findTokenInternal(t,n,r);n-=s,r+=s}}throw e.Errors.invalidOperation()},t.prototype.findTokenOnLeft=function(t,n){"undefined"==typeof n&&(n=!1);var r=this.findToken(t,!1),i=r.start();return n&&(r=e.Syntax.findSkippedTokenOnLeft(r,t)||r),t>i?r:0===r.fullStart()?null:r.previousToken(n)},t.prototype.findCompleteTokenOnLeft=function(t,n){"undefined"==typeof n&&(n=!1);var r=this.findToken(t,!1);return n&&(r=e.Syntax.findSkippedTokenOnLeft(r,t)||r),r.token().width()>0&&t>=r.end()?r:r.previousToken(n)},t.prototype.isModuleElement=function(){return!1},t.prototype.isClassElement=function(){return!1},t.prototype.isTypeMember=function(){return!1},t.prototype.isStatement=function(){return!1},t.prototype.isExpression=function(){return!1},t.prototype.isSwitchClause=function(){return!1},t.prototype.structuralEquals=function(t){if(this===t)return!0;if(null===t)return!1;if(this.kind()!==t.kind())return!1;for(var n=0,r=this.childCount();r>n;n++){var i=this.childAt(n),o=t.childAt(n);if(!e.Syntax.elementStructuralEquals(i,o))return!1}return!0},t.prototype.width=function(){return this.fullWidth()-this.leadingTriviaWidth()-this.trailingTriviaWidth()},t.prototype.leadingTriviaWidth=function(){var e=this.firstToken();return null===e?0:e.leadingTriviaWidth()},t.prototype.trailingTriviaWidth=function(){var e=this.lastToken();return null===e?0:e.trailingTriviaWidth()},t}();e.SyntaxNode=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(t){function n(e,n,r){t.call(this,r),this.moduleElements=e,this.endOfFileToken=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitSourceUnit(this)},n.prototype.kind=function(){return 120},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.moduleElements;case 1:return this.endOfFileToken;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.moduleElements===e&&this.endOfFileToken===t?this:new n(e,t,this.parsedInStrictMode())},n.create=function(t){return new n(e.Syntax.emptyList,t,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModuleElements=function(e){return this.update(e,this.endOfFileToken)},n.prototype.withModuleElement=function(t){return this.withModuleElements(e.Syntax.list([t]))},n.prototype.withEndOfFileToken=function(e){return this.update(this.moduleElements,e)},n.prototype.isTypeScriptSpecific=function(){return this.moduleElements.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.SourceUnitSyntax=t;var n=function(t){function n(e,n,r,i,o){t.call(this,o),this.requireKeyword=e,this.openParenToken=n,this.stringLiteral=r,this.closeParenToken=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitExternalModuleReference(this)},n.prototype.kind=function(){return 245},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.requireKeyword;case 1:return this.openParenToken;case 2:return this.stringLiteral;case 3:return this.closeParenToken;default:throw e.Errors.invalidOperation()}},n.prototype.isModuleReference=function(){return!0},n.prototype.update=function(e,t,r,i){return this.requireKeyword===e&&this.openParenToken===t&&this.stringLiteral===r&&this.closeParenToken===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(66),e.Syntax.token(72),t,e.Syntax.token(73),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withRequireKeyword=function(e){return this.update(e,this.openParenToken,this.stringLiteral,this.closeParenToken)},n.prototype.withOpenParenToken=function(e){return this.update(this.requireKeyword,e,this.stringLiteral,this.closeParenToken)},n.prototype.withStringLiteral=function(e){return this.update(this.requireKeyword,this.openParenToken,e,this.closeParenToken)},n.prototype.withCloseParenToken=function(e){return this.update(this.requireKeyword,this.openParenToken,this.stringLiteral,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ExternalModuleReferenceSyntax=n;var r=function(t){function n(e,n){t.call(this,n),this.moduleName=e}return __extends(n,t),n.prototype.accept=function(e){return e.visitModuleNameModuleReference(this)},n.prototype.kind=function(){return 246},n.prototype.childCount=function(){return 1},n.prototype.childAt=function(t){switch(t){case 0:return this.moduleName;default:throw e.Errors.invalidOperation()}},n.prototype.isModuleReference=function(){return!0},n.prototype.update=function(e){return this.moduleName===e?this:new n(e,this.parsedInStrictMode())},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModuleName=function(e){return this.update(e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ModuleNameModuleReferenceSyntax=r;var i=function(t){function n(e,n,r,i,o,a,s){t.call(this,s),this.modifiers=e,this.importKeyword=n,this.identifier=r,this.equalsToken=i,this.moduleReference=o,this.semicolonToken=a}return __extends(n,t),n.prototype.accept=function(e){return e.visitImportDeclaration(this)},n.prototype.kind=function(){return 133},n.prototype.childCount=function(){return 6},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.importKeyword;case 2:return this.identifier;case 3:return this.equalsToken;case 4:return this.moduleReference;case 5:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a){return this.modifiers===e&&this.importKeyword===t&&this.identifier===r&&this.equalsToken===i&&this.moduleReference===o&&this.semicolonToken===a?this:new n(e,t,r,i,o,a,this.parsedInStrictMode())},n.create=function(t,r,i,o,a){return new n(e.Syntax.emptyList,t,r,i,o,a,!1)},n.create1=function(t,r){return new n(e.Syntax.emptyList,e.Syntax.token(49),t,e.Syntax.token(107),r,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.importKeyword,this.identifier,this.equalsToken,this.moduleReference,this.semicolonToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withImportKeyword=function(e){return this.update(this.modifiers,e,this.identifier,this.equalsToken,this.moduleReference,this.semicolonToken)},n.prototype.withIdentifier=function(e){return this.update(this.modifiers,this.importKeyword,e,this.equalsToken,this.moduleReference,this.semicolonToken)},n.prototype.withEqualsToken=function(e){return this.update(this.modifiers,this.importKeyword,this.identifier,e,this.moduleReference,this.semicolonToken)},n.prototype.withModuleReference=function(e){return this.update(this.modifiers,this.importKeyword,this.identifier,this.equalsToken,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.modifiers,this.importKeyword,this.identifier,this.equalsToken,this.moduleReference,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ImportDeclarationSyntax=i;var o=function(t){function n(e,n,r,i,o){t.call(this,o),this.exportKeyword=e,this.equalsToken=n,this.identifier=r,this.semicolonToken=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitExportAssignment(this)},n.prototype.kind=function(){return 134},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.exportKeyword;case 1:return this.equalsToken;case 2:return this.identifier;case 3:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i){return this.exportKeyword===e&&this.equalsToken===t&&this.identifier===r&&this.semicolonToken===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(47),e.Syntax.token(107),t,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withExportKeyword=function(e){return this.update(e,this.equalsToken,this.identifier,this.semicolonToken)},n.prototype.withEqualsToken=function(e){return this.update(this.exportKeyword,e,this.identifier,this.semicolonToken)},n.prototype.withIdentifier=function(e){return this.update(this.exportKeyword,this.equalsToken,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.exportKeyword,this.equalsToken,this.identifier,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ExportAssignmentSyntax=o;var a=function(t){function n(e,n,r,i,o,a,s,l,c){t.call(this,c),this.modifiers=e,this.classKeyword=n,this.identifier=r,this.typeParameterList=i,this.heritageClauses=o,this.openBraceToken=a,this.classElements=s,this.closeBraceToken=l}return __extends(n,t),n.prototype.accept=function(e){return e.visitClassDeclaration(this)},n.prototype.kind=function(){return 131},n.prototype.childCount=function(){return 8},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.classKeyword;case 2:return this.identifier;case 3:return this.typeParameterList;case 4:return this.heritageClauses;case 5:return this.openBraceToken;case 6:return this.classElements;case 7:return this.closeBraceToken;default:throw e.Errors.invalidOperation()}},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a,s,l){return this.modifiers===e&&this.classKeyword===t&&this.identifier===r&&this.typeParameterList===i&&this.heritageClauses===o&&this.openBraceToken===a&&this.classElements===s&&this.closeBraceToken===l?this:new n(e,t,r,i,o,a,s,l,this.parsedInStrictMode())},n.create=function(t,r,i,o){return new n(e.Syntax.emptyList,t,r,null,e.Syntax.emptyList,i,e.Syntax.emptyList,o,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,e.Syntax.token(44),t,null,e.Syntax.emptyList,e.Syntax.token(70),e.Syntax.emptyList,e.Syntax.token(71),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.classKeyword,this.identifier,this.typeParameterList,this.heritageClauses,this.openBraceToken,this.classElements,this.closeBraceToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withClassKeyword=function(e){return this.update(this.modifiers,e,this.identifier,this.typeParameterList,this.heritageClauses,this.openBraceToken,this.classElements,this.closeBraceToken)},n.prototype.withIdentifier=function(e){return this.update(this.modifiers,this.classKeyword,e,this.typeParameterList,this.heritageClauses,this.openBraceToken,this.classElements,this.closeBraceToken)},n.prototype.withTypeParameterList=function(e){return this.update(this.modifiers,this.classKeyword,this.identifier,e,this.heritageClauses,this.openBraceToken,this.classElements,this.closeBraceToken)},n.prototype.withHeritageClauses=function(e){return this.update(this.modifiers,this.classKeyword,this.identifier,this.typeParameterList,e,this.openBraceToken,this.classElements,this.closeBraceToken)},n.prototype.withHeritageClause=function(t){return this.withHeritageClauses(e.Syntax.list([t]))},n.prototype.withOpenBraceToken=function(e){return this.update(this.modifiers,this.classKeyword,this.identifier,this.typeParameterList,this.heritageClauses,e,this.classElements,this.closeBraceToken)},n.prototype.withClassElements=function(e){return this.update(this.modifiers,this.classKeyword,this.identifier,this.typeParameterList,this.heritageClauses,this.openBraceToken,e,this.closeBraceToken)},n.prototype.withClassElement=function(t){return this.withClassElements(e.Syntax.list([t]))},n.prototype.withCloseBraceToken=function(e){return this.update(this.modifiers,this.classKeyword,this.identifier,this.typeParameterList,this.heritageClauses,this.openBraceToken,this.classElements,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ClassDeclarationSyntax=a;var s=function(t){function n(e,n,r,i,o,a,s){t.call(this,s),this.modifiers=e,this.interfaceKeyword=n,this.identifier=r,this.typeParameterList=i,this.heritageClauses=o,this.body=a}return __extends(n,t),n.prototype.accept=function(e){return e.visitInterfaceDeclaration(this)},n.prototype.kind=function(){return 128},n.prototype.childCount=function(){return 6},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.interfaceKeyword;case 2:return this.identifier;case 3:return this.typeParameterList;case 4:return this.heritageClauses;case 5:return this.body;default:throw e.Errors.invalidOperation()}},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a){return this.modifiers===e&&this.interfaceKeyword===t&&this.identifier===r&&this.typeParameterList===i&&this.heritageClauses===o&&this.body===a?this:new n(e,t,r,i,o,a,this.parsedInStrictMode())},n.create=function(t,r,i){return new n(e.Syntax.emptyList,t,r,null,e.Syntax.emptyList,i,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,e.Syntax.token(52),t,null,e.Syntax.emptyList,x.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.interfaceKeyword,this.identifier,this.typeParameterList,this.heritageClauses,this.body)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withInterfaceKeyword=function(e){return this.update(this.modifiers,e,this.identifier,this.typeParameterList,this.heritageClauses,this.body)},n.prototype.withIdentifier=function(e){return this.update(this.modifiers,this.interfaceKeyword,e,this.typeParameterList,this.heritageClauses,this.body)},n.prototype.withTypeParameterList=function(e){return this.update(this.modifiers,this.interfaceKeyword,this.identifier,e,this.heritageClauses,this.body)},n.prototype.withHeritageClauses=function(e){return this.update(this.modifiers,this.interfaceKeyword,this.identifier,this.typeParameterList,e,this.body)},n.prototype.withHeritageClause=function(t){return this.withHeritageClauses(e.Syntax.list([t]))},n.prototype.withBody=function(e){return this.update(this.modifiers,this.interfaceKeyword,this.identifier,this.typeParameterList,this.heritageClauses,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.InterfaceDeclarationSyntax=s;var l=function(t){function n(e,n,r,i){t.call(this,i),this.extendsOrImplementsKeyword=n,this.typeNames=r,this._kind=e}return __extends(n,t),n.prototype.accept=function(e){return e.visitHeritageClause(this)},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.extendsOrImplementsKeyword;case 1:return this.typeNames;default:throw e.Errors.invalidOperation()}},n.prototype.kind=function(){return this._kind},n.prototype.update=function(e,t,r){return this._kind===e&&this.extendsOrImplementsKeyword===t&&this.typeNames===r?this:new n(e,t,r,this.parsedInStrictMode())},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withKind=function(e){return this.update(e,this.extendsOrImplementsKeyword,this.typeNames)},n.prototype.withExtendsOrImplementsKeyword=function(e){return this.update(this._kind,e,this.typeNames)},n.prototype.withTypeNames=function(e){return this.update(this._kind,this.extendsOrImplementsKeyword,e)},n.prototype.withTypeName=function(t){return this.withTypeNames(e.Syntax.separatedList([t]))},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.HeritageClauseSyntax=l;var c=function(t){function n(e,n,r,i,o,a,s,l){t.call(this,l),this.modifiers=e,this.moduleKeyword=n,this.name=r,this.stringLiteral=i,this.openBraceToken=o,this.moduleElements=a,this.closeBraceToken=s}return __extends(n,t),n.prototype.accept=function(e){return e.visitModuleDeclaration(this)},n.prototype.kind=function(){return 130},n.prototype.childCount=function(){return 7},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.moduleKeyword;case 2:return this.name;case 3:return this.stringLiteral;case 4:return this.openBraceToken;case 5:return this.moduleElements;case 6:return this.closeBraceToken;default:throw e.Errors.invalidOperation()}},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a,s){return this.modifiers===e&&this.moduleKeyword===t&&this.name===r&&this.stringLiteral===i&&this.openBraceToken===o&&this.moduleElements===a&&this.closeBraceToken===s?this:new n(e,t,r,i,o,a,s,this.parsedInStrictMode())},n.create=function(t,r,i){return new n(e.Syntax.emptyList,t,null,null,r,e.Syntax.emptyList,i,!1)},n.create1=function(){return new n(e.Syntax.emptyList,e.Syntax.token(65),null,null,e.Syntax.token(70),e.Syntax.emptyList,e.Syntax.token(71),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.moduleKeyword,this.name,this.stringLiteral,this.openBraceToken,this.moduleElements,this.closeBraceToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withModuleKeyword=function(e){return this.update(this.modifiers,e,this.name,this.stringLiteral,this.openBraceToken,this.moduleElements,this.closeBraceToken)},n.prototype.withName=function(e){return this.update(this.modifiers,this.moduleKeyword,e,this.stringLiteral,this.openBraceToken,this.moduleElements,this.closeBraceToken)},n.prototype.withStringLiteral=function(e){return this.update(this.modifiers,this.moduleKeyword,this.name,e,this.openBraceToken,this.moduleElements,this.closeBraceToken)},n.prototype.withOpenBraceToken=function(e){return this.update(this.modifiers,this.moduleKeyword,this.name,this.stringLiteral,e,this.moduleElements,this.closeBraceToken)},n.prototype.withModuleElements=function(e){return this.update(this.modifiers,this.moduleKeyword,this.name,this.stringLiteral,this.openBraceToken,e,this.closeBraceToken)},n.prototype.withModuleElement=function(t){return this.withModuleElements(e.Syntax.list([t]))},n.prototype.withCloseBraceToken=function(e){return this.update(this.modifiers,this.moduleKeyword,this.name,this.stringLiteral,this.openBraceToken,this.moduleElements,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ModuleDeclarationSyntax=c;var u=function(t){function n(e,n,r,i,o,a,s){t.call(this,s),this.modifiers=e,this.functionKeyword=n,this.identifier=r,this.callSignature=i,this.block=o,this.semicolonToken=a}return __extends(n,t),n.prototype.accept=function(e){return e.visitFunctionDeclaration(this)},n.prototype.kind=function(){return 129},n.prototype.childCount=function(){return 6},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.functionKeyword;case 2:return this.identifier;case 3:return this.callSignature;case 4:return this.block;case 5:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a){return this.modifiers===e&&this.functionKeyword===t&&this.identifier===r&&this.callSignature===i&&this.block===o&&this.semicolonToken===a?this:new n(e,t,r,i,o,a,this.parsedInStrictMode())},n.create=function(t,r,i){return new n(e.Syntax.emptyList,t,r,i,null,null,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,e.Syntax.token(27),t,U.create1(),null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.functionKeyword,this.identifier,this.callSignature,this.block,this.semicolonToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withFunctionKeyword=function(e){return this.update(this.modifiers,e,this.identifier,this.callSignature,this.block,this.semicolonToken)},n.prototype.withIdentifier=function(e){return this.update(this.modifiers,this.functionKeyword,e,this.callSignature,this.block,this.semicolonToken)},n.prototype.withCallSignature=function(e){return this.update(this.modifiers,this.functionKeyword,this.identifier,e,this.block,this.semicolonToken)},n.prototype.withBlock=function(e){return this.update(this.modifiers,this.functionKeyword,this.identifier,this.callSignature,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.modifiers,this.functionKeyword,this.identifier,this.callSignature,this.block,e)},n.prototype.isTypeScriptSpecific=function(){return this.modifiers.childCount()>0?!0:this.callSignature.isTypeScriptSpecific()?!0:null!==this.block&&this.block.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.FunctionDeclarationSyntax=u;var p=function(t){function n(e,n,r,i){t.call(this,i),this.modifiers=e,this.variableDeclaration=n,this.semicolonToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitVariableStatement(this)},n.prototype.kind=function(){return 148},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.variableDeclaration;case 2:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r){return this.modifiers===e&&this.variableDeclaration===t&&this.semicolonToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(e.Syntax.emptyList,t,r,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,t,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.variableDeclaration,this.semicolonToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withVariableDeclaration=function(e){return this.update(this.modifiers,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.modifiers,this.variableDeclaration,e)},n.prototype.isTypeScriptSpecific=function(){return this.modifiers.childCount()>0?!0:this.variableDeclaration.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.VariableStatementSyntax=p;var h=function(t){function n(e,n,r,i){t.call(this,r),this.varKeyword=e,this.variableDeclarators=n,this.tokenKind=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitVariableDeclaration(this)},n.prototype.kind=function(){return 224},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.varKeyword;case 1:return this.variableDeclarators;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.varKeyword===e&&this.variableDeclarators===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(40),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withVarKeyword=function(e){return this.update(e,this.variableDeclarators)},n.prototype.withVariableDeclarators=function(e){return this.update(this.varKeyword,e)},n.prototype.withVariableDeclarator=function(t){return this.withVariableDeclarators(e.Syntax.separatedList([t]))},n.prototype.isTypeScriptSpecific=function(){return this.variableDeclarators.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.VariableDeclarationSyntax=h;var d=function(t){function n(e,n,r,i){t.call(this,i),this.propertyName=e,this.typeAnnotation=n,this.equalsValueClause=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitVariableDeclarator(this)},n.prototype.kind=function(){return 225},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.propertyName;case 1:return this.typeAnnotation;case 2:return this.equalsValueClause;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t,r){return this.propertyName===e&&this.typeAnnotation===t&&this.equalsValueClause===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(e){return new n(e,null,null,!1)},n.create1=function(e){return new n(e,null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withPropertyName=function(e){return this.update(e,this.typeAnnotation,this.equalsValueClause)},n.prototype.withTypeAnnotation=function(e){return this.update(this.propertyName,e,this.equalsValueClause)},n.prototype.withEqualsValueClause=function(e){return this.update(this.propertyName,this.typeAnnotation,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.typeAnnotation?!0:null!==this.equalsValueClause&&this.equalsValueClause.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.VariableDeclaratorSyntax=d;var m=function(t){function n(e,n,r){t.call(this,r),this.equalsToken=e,this.value=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitEqualsValueClause(this)},n.prototype.kind=function(){return 232},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.equalsToken;case 1:return this.value;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.equalsToken===e&&this.value===t?this:new n(e,t,this.parsedInStrictMode()) },n.create1=function(t){return new n(e.Syntax.token(107),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withEqualsToken=function(e){return this.update(e,this.value)},n.prototype.withValue=function(e){return this.update(this.equalsToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.value.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.EqualsValueClauseSyntax=m;var y=function(t){function n(e,n,r,i){t.call(this,i),this.operatorToken=n,this.operand=r,this._kind=e}return __extends(n,t),n.prototype.accept=function(e){return e.visitPrefixUnaryExpression(this)},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.operatorToken;case 1:return this.operand;default:throw e.Errors.invalidOperation()}},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.kind=function(){return this._kind},n.prototype.update=function(e,t,r){return this._kind===e&&this.operatorToken===t&&this.operand===r?this:new n(e,t,r,this.parsedInStrictMode())},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withKind=function(e){return this.update(e,this.operatorToken,this.operand)},n.prototype.withOperatorToken=function(e){return this.update(this._kind,e,this.operand)},n.prototype.withOperand=function(e){return this.update(this._kind,this.operatorToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.operand.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.PrefixUnaryExpressionSyntax=y;var f=function(t){function n(e,n,r,i){t.call(this,i),this.openBracketToken=e,this.expressions=n,this.closeBracketToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitArrayLiteralExpression(this)},n.prototype.kind=function(){return 214},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.openBracketToken;case 1:return this.expressions;case 2:return this.closeBracketToken;default:throw e.Errors.invalidOperation()}},n.prototype.isPrimaryExpression=function(){return!0},n.prototype.isMemberExpression=function(){return!0},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r){return this.openBracketToken===e&&this.expressions===t&&this.closeBracketToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(t,e.Syntax.emptySeparatedList,r,!1)},n.create1=function(){return new n(e.Syntax.token(74),e.Syntax.emptySeparatedList,e.Syntax.token(75),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withOpenBracketToken=function(e){return this.update(e,this.expressions,this.closeBracketToken)},n.prototype.withExpressions=function(e){return this.update(this.openBracketToken,e,this.closeBracketToken)},n.prototype.withExpression=function(t){return this.withExpressions(e.Syntax.separatedList([t]))},n.prototype.withCloseBracketToken=function(e){return this.update(this.openBracketToken,this.expressions,e)},n.prototype.isTypeScriptSpecific=function(){return this.expressions.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ArrayLiteralExpressionSyntax=f;var g=function(t){function n(e){t.call(this,e)}return __extends(n,t),n.prototype.accept=function(e){return e.visitOmittedExpression(this)},n.prototype.kind=function(){return 223},n.prototype.childCount=function(){return 0},n.prototype.childAt=function(){throw e.Errors.invalidOperation()},n.prototype.isExpression=function(){return!0},n.prototype.update=function(){return this},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.isTypeScriptSpecific=function(){return!1},n}(e.SyntaxNode);e.OmittedExpressionSyntax=g;var v=function(t){function n(e,n,r,i){t.call(this,i),this.openParenToken=e,this.expression=n,this.closeParenToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitParenthesizedExpression(this)},n.prototype.kind=function(){return 217},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.openParenToken;case 1:return this.expression;case 2:return this.closeParenToken;default:throw e.Errors.invalidOperation()}},n.prototype.isPrimaryExpression=function(){return!0},n.prototype.isMemberExpression=function(){return!0},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r){return this.openParenToken===e&&this.expression===t&&this.closeParenToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(72),t,e.Syntax.token(73),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withOpenParenToken=function(e){return this.update(e,this.expression,this.closeParenToken)},n.prototype.withExpression=function(e){return this.update(this.openParenToken,e,this.closeParenToken)},n.prototype.withCloseParenToken=function(e){return this.update(this.openParenToken,this.expression,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ParenthesizedExpressionSyntax=v;var S=function(t){function n(e,n,r,i,o){t.call(this,o),this.identifier=e,this.equalsGreaterThanToken=n,this.block=r,this.expression=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitSimpleArrowFunctionExpression(this)},n.prototype.kind=function(){return 219},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.identifier;case 1:return this.equalsGreaterThanToken;case 2:return this.block;case 3:return this.expression;default:throw e.Errors.invalidOperation()}},n.prototype.isArrowFunctionExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r,i){return this.identifier===e&&this.equalsGreaterThanToken===t&&this.block===r&&this.expression===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create=function(e,t){return new n(e,t,null,null,!1)},n.create1=function(t){return new n(t,e.Syntax.token(85),null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withIdentifier=function(e){return this.update(e,this.equalsGreaterThanToken,this.block,this.expression)},n.prototype.withEqualsGreaterThanToken=function(e){return this.update(this.identifier,e,this.block,this.expression)},n.prototype.withBlock=function(e){return this.update(this.identifier,this.equalsGreaterThanToken,e,this.expression)},n.prototype.withExpression=function(e){return this.update(this.identifier,this.equalsGreaterThanToken,this.block,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.SimpleArrowFunctionExpressionSyntax=S;var T=function(t){function n(e,n,r,i,o){t.call(this,o),this.callSignature=e,this.equalsGreaterThanToken=n,this.block=r,this.expression=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitParenthesizedArrowFunctionExpression(this)},n.prototype.kind=function(){return 218},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.callSignature;case 1:return this.equalsGreaterThanToken;case 2:return this.block;case 3:return this.expression;default:throw e.Errors.invalidOperation()}},n.prototype.isArrowFunctionExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r,i){return this.callSignature===e&&this.equalsGreaterThanToken===t&&this.block===r&&this.expression===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create=function(e,t){return new n(e,t,null,null,!1)},n.create1=function(){return new n(U.create1(),e.Syntax.token(85),null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withCallSignature=function(e){return this.update(e,this.equalsGreaterThanToken,this.block,this.expression)},n.prototype.withEqualsGreaterThanToken=function(e){return this.update(this.callSignature,e,this.block,this.expression)},n.prototype.withBlock=function(e){return this.update(this.callSignature,this.equalsGreaterThanToken,e,this.expression)},n.prototype.withExpression=function(e){return this.update(this.callSignature,this.equalsGreaterThanToken,this.block,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ParenthesizedArrowFunctionExpressionSyntax=T;var b=function(t){function n(e,n,r,i){t.call(this,i),this.left=e,this.dotToken=n,this.right=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitQualifiedName(this)},n.prototype.kind=function(){return 121},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.left;case 1:return this.dotToken;case 2:return this.right;default:throw e.Errors.invalidOperation()}},n.prototype.isName=function(){return!0},n.prototype.isType=function(){return!0},n.prototype.update=function(e,t,r){return this.left===e&&this.dotToken===t&&this.right===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create1=function(t,r){return new n(t,e.Syntax.token(76),r,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withLeft=function(e){return this.update(e,this.dotToken,this.right)},n.prototype.withDotToken=function(e){return this.update(this.left,e,this.right)},n.prototype.withRight=function(e){return this.update(this.left,this.dotToken,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.QualifiedNameSyntax=b;var _=function(t){function n(e,n,r,i){t.call(this,i),this.lessThanToken=e,this.typeArguments=n,this.greaterThanToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitTypeArgumentList(this)},n.prototype.kind=function(){return 228},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.lessThanToken;case 1:return this.typeArguments;case 2:return this.greaterThanToken;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t,r){return this.lessThanToken===e&&this.typeArguments===t&&this.greaterThanToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(t,e.Syntax.emptySeparatedList,r,!1)},n.create1=function(){return new n(e.Syntax.token(80),e.Syntax.emptySeparatedList,e.Syntax.token(81),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withLessThanToken=function(e){return this.update(e,this.typeArguments,this.greaterThanToken)},n.prototype.withTypeArguments=function(e){return this.update(this.lessThanToken,e,this.greaterThanToken)},n.prototype.withTypeArgument=function(t){return this.withTypeArguments(e.Syntax.separatedList([t]))},n.prototype.withGreaterThanToken=function(e){return this.update(this.lessThanToken,this.typeArguments,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.TypeArgumentListSyntax=_;var E=function(t){function n(e,n,r,i,o,a){t.call(this,a),this.newKeyword=e,this.typeParameterList=n,this.parameterList=r,this.equalsGreaterThanToken=i,this.type=o}return __extends(n,t),n.prototype.accept=function(e){return e.visitConstructorType(this)},n.prototype.kind=function(){return 125},n.prototype.childCount=function(){return 5},n.prototype.childAt=function(t){switch(t){case 0:return this.newKeyword;case 1:return this.typeParameterList;case 2:return this.parameterList;case 3:return this.equalsGreaterThanToken;case 4:return this.type;default:throw e.Errors.invalidOperation()}},n.prototype.isType=function(){return!0},n.prototype.update=function(e,t,r,i,o){return this.newKeyword===e&&this.typeParameterList===t&&this.parameterList===r&&this.equalsGreaterThanToken===i&&this.type===o?this:new n(e,t,r,i,o,this.parsedInStrictMode())},n.create=function(e,t,r,i){return new n(e,null,t,r,i,!1)},n.create1=function(t){return new n(e.Syntax.token(31),null,W.create1(),e.Syntax.token(85),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withNewKeyword=function(e){return this.update(e,this.typeParameterList,this.parameterList,this.equalsGreaterThanToken,this.type)},n.prototype.withTypeParameterList=function(e){return this.update(this.newKeyword,e,this.parameterList,this.equalsGreaterThanToken,this.type)},n.prototype.withParameterList=function(e){return this.update(this.newKeyword,this.typeParameterList,e,this.equalsGreaterThanToken,this.type)},n.prototype.withEqualsGreaterThanToken=function(e){return this.update(this.newKeyword,this.typeParameterList,this.parameterList,e,this.type)},n.prototype.withType=function(e){return this.update(this.newKeyword,this.typeParameterList,this.parameterList,this.equalsGreaterThanToken,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ConstructorTypeSyntax=E;var C=function(t){function n(e,n,r,i,o){t.call(this,o),this.typeParameterList=e,this.parameterList=n,this.equalsGreaterThanToken=r,this.type=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitFunctionType(this)},n.prototype.kind=function(){return 123},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.typeParameterList;case 1:return this.parameterList;case 2:return this.equalsGreaterThanToken;case 3:return this.type;default:throw e.Errors.invalidOperation()}},n.prototype.isType=function(){return!0},n.prototype.update=function(e,t,r,i){return this.typeParameterList===e&&this.parameterList===t&&this.equalsGreaterThanToken===r&&this.type===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create=function(e,t,r){return new n(null,e,t,r,!1)},n.create1=function(t){return new n(null,W.create1(),e.Syntax.token(85),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withTypeParameterList=function(e){return this.update(e,this.parameterList,this.equalsGreaterThanToken,this.type)},n.prototype.withParameterList=function(e){return this.update(this.typeParameterList,e,this.equalsGreaterThanToken,this.type)},n.prototype.withEqualsGreaterThanToken=function(e){return this.update(this.typeParameterList,this.parameterList,e,this.type)},n.prototype.withType=function(e){return this.update(this.typeParameterList,this.parameterList,this.equalsGreaterThanToken,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.FunctionTypeSyntax=C;var x=function(t){function n(e,n,r,i){t.call(this,i),this.openBraceToken=e,this.typeMembers=n,this.closeBraceToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitObjectType(this)},n.prototype.kind=function(){return 122},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.openBraceToken;case 1:return this.typeMembers;case 2:return this.closeBraceToken;default:throw e.Errors.invalidOperation()}},n.prototype.isType=function(){return!0},n.prototype.update=function(e,t,r){return this.openBraceToken===e&&this.typeMembers===t&&this.closeBraceToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(t,e.Syntax.emptySeparatedList,r,!1)},n.create1=function(){return new n(e.Syntax.token(70),e.Syntax.emptySeparatedList,e.Syntax.token(71),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withOpenBraceToken=function(e){return this.update(e,this.typeMembers,this.closeBraceToken)},n.prototype.withTypeMembers=function(e){return this.update(this.openBraceToken,e,this.closeBraceToken)},n.prototype.withTypeMember=function(t){return this.withTypeMembers(e.Syntax.separatedList([t]))},n.prototype.withCloseBraceToken=function(e){return this.update(this.openBraceToken,this.typeMembers,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ObjectTypeSyntax=x;var k=function(t){function n(e,n,r,i){t.call(this,i),this.type=e,this.openBracketToken=n,this.closeBracketToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitArrayType(this)},n.prototype.kind=function(){return 124},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.type;case 1:return this.openBracketToken;case 2:return this.closeBracketToken;default:throw e.Errors.invalidOperation()}},n.prototype.isType=function(){return!0},n.prototype.update=function(e,t,r){return this.type===e&&this.openBracketToken===t&&this.closeBracketToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create1=function(t){return new n(t,e.Syntax.token(74),e.Syntax.token(75),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withType=function(e){return this.update(e,this.openBracketToken,this.closeBracketToken)},n.prototype.withOpenBracketToken=function(e){return this.update(this.type,e,this.closeBracketToken)},n.prototype.withCloseBracketToken=function(e){return this.update(this.type,this.openBracketToken,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ArrayTypeSyntax=k;var w=function(t){function n(e,n,r){t.call(this,r),this.name=e,this.typeArgumentList=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitGenericType(this)},n.prototype.kind=function(){return 126},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.name;case 1:return this.typeArgumentList;default:throw e.Errors.invalidOperation()}},n.prototype.isType=function(){return!0},n.prototype.update=function(e,t){return this.name===e&&this.typeArgumentList===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(e){return new n(e,_.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withName=function(e){return this.update(e,this.typeArgumentList)},n.prototype.withTypeArgumentList=function(e){return this.update(this.name,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.GenericTypeSyntax=w;var A=function(t){function n(e,n,r){t.call(this,r),this.typeOfKeyword=e,this.name=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitTypeQuery(this)},n.prototype.kind=function(){return 127},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.typeOfKeyword;case 1:return this.name;default:throw e.Errors.invalidOperation()}},n.prototype.isType=function(){return!0},n.prototype.update=function(e,t){return this.typeOfKeyword===e&&this.name===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(39),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withTypeOfKeyword=function(e){return this.update(e,this.name)},n.prototype.withName=function(e){return this.update(this.typeOfKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.TypeQuerySyntax=A;var D=function(t){function n(e,n,r){t.call(this,r),this.colonToken=e,this.type=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitTypeAnnotation(this)},n.prototype.kind=function(){return 244},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.colonToken;case 1:return this.type;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.colonToken===e&&this.type===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(106),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withColonToken=function(e){return this.update(e,this.type)},n.prototype.withType=function(e){return this.update(this.colonToken,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.TypeAnnotationSyntax=D;var I=function(t){function n(e,n,r,i){t.call(this,i),this.openBraceToken=e,this.statements=n,this.closeBraceToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitBlock(this)},n.prototype.kind=function(){return 146},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.openBraceToken;case 1:return this.statements;case 2:return this.closeBraceToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r){return this.openBraceToken===e&&this.statements===t&&this.closeBraceToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(t,e.Syntax.emptyList,r,!1)},n.create1=function(){return new n(e.Syntax.token(70),e.Syntax.emptyList,e.Syntax.token(71),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withOpenBraceToken=function(e){return this.update(e,this.statements,this.closeBraceToken)},n.prototype.withStatements=function(e){return this.update(this.openBraceToken,e,this.closeBraceToken)},n.prototype.withStatement=function(t){return this.withStatements(e.Syntax.list([t]))},n.prototype.withCloseBraceToken=function(e){return this.update(this.openBraceToken,this.statements,e)},n.prototype.isTypeScriptSpecific=function(){return this.statements.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.BlockSyntax=I;var L=function(t){function n(e,n,r,i,o,a,s){t.call(this,s),this.dotDotDotToken=e,this.modifiers=n,this.identifier=r,this.questionToken=i,this.typeAnnotation=o,this.equalsValueClause=a}return __extends(n,t),n.prototype.accept=function(e){return e.visitParameter(this)},n.prototype.kind=function(){return 242},n.prototype.childCount=function(){return 6},n.prototype.childAt=function(t){switch(t){case 0:return this.dotDotDotToken;case 1:return this.modifiers;case 2:return this.identifier;case 3:return this.questionToken;case 4:return this.typeAnnotation;case 5:return this.equalsValueClause;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t,r,i,o,a){return this.dotDotDotToken===e&&this.modifiers===t&&this.identifier===r&&this.questionToken===i&&this.typeAnnotation===o&&this.equalsValueClause===a?this:new n(e,t,r,i,o,a,this.parsedInStrictMode())},n.create=function(t){return new n(null,e.Syntax.emptyList,t,null,null,null,!1)},n.create1=function(t){return new n(null,e.Syntax.emptyList,t,null,null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withDotDotDotToken=function(e){return this.update(e,this.modifiers,this.identifier,this.questionToken,this.typeAnnotation,this.equalsValueClause)},n.prototype.withModifiers=function(e){return this.update(this.dotDotDotToken,e,this.identifier,this.questionToken,this.typeAnnotation,this.equalsValueClause)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withIdentifier=function(e){return this.update(this.dotDotDotToken,this.modifiers,e,this.questionToken,this.typeAnnotation,this.equalsValueClause)},n.prototype.withQuestionToken=function(e){return this.update(this.dotDotDotToken,this.modifiers,this.identifier,e,this.typeAnnotation,this.equalsValueClause)},n.prototype.withTypeAnnotation=function(e){return this.update(this.dotDotDotToken,this.modifiers,this.identifier,this.questionToken,e,this.equalsValueClause)},n.prototype.withEqualsValueClause=function(e){return this.update(this.dotDotDotToken,this.modifiers,this.identifier,this.questionToken,this.typeAnnotation,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.dotDotDotToken?!0:this.modifiers.isTypeScriptSpecific()?!0:null!==this.questionToken?!0:null!==this.typeAnnotation?!0:null!==this.equalsValueClause?!0:!1},n}(e.SyntaxNode);e.ParameterSyntax=L;var N=function(t){function n(e,n,r,i){t.call(this,i),this.expression=e,this.dotToken=n,this.name=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitMemberAccessExpression(this)},n.prototype.kind=function(){return 212},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.expression;case 1:return this.dotToken;case 2:return this.name;default:throw e.Errors.invalidOperation()}},n.prototype.isMemberExpression=function(){return!0},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r){return this.expression===e&&this.dotToken===t&&this.name===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create1=function(t,r){return new n(t,e.Syntax.token(76),r,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withExpression=function(e){return this.update(e,this.dotToken,this.name)},n.prototype.withDotToken=function(e){return this.update(this.expression,e,this.name)},n.prototype.withName=function(e){return this.update(this.expression,this.dotToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.MemberAccessExpressionSyntax=N;var P=function(t){function n(e,n,r,i){t.call(this,i),this.operand=n,this.operatorToken=r,this._kind=e}return __extends(n,t),n.prototype.accept=function(e){return e.visitPostfixUnaryExpression(this)},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.operand;case 1:return this.operatorToken;default:throw e.Errors.invalidOperation()}},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.kind=function(){return this._kind},n.prototype.update=function(e,t,r){return this._kind===e&&this.operand===t&&this.operatorToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withKind=function(e){return this.update(e,this.operand,this.operatorToken)},n.prototype.withOperand=function(e){return this.update(this._kind,e,this.operatorToken)},n.prototype.withOperatorToken=function(e){return this.update(this._kind,this.operand,e)},n.prototype.isTypeScriptSpecific=function(){return this.operand.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.PostfixUnaryExpressionSyntax=P;var M=function(t){function n(e,n,r,i,o){t.call(this,o),this.expression=e,this.openBracketToken=n,this.argumentExpression=r,this.closeBracketToken=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitElementAccessExpression(this)},n.prototype.kind=function(){return 221},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.expression;case 1:return this.openBracketToken;case 2:return this.argumentExpression;case 3:return this.closeBracketToken;default:throw e.Errors.invalidOperation()}},n.prototype.isMemberExpression=function(){return!0},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r,i){return this.expression===e&&this.openBracketToken===t&&this.argumentExpression===r&&this.closeBracketToken===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create1=function(t,r){return new n(t,e.Syntax.token(74),r,e.Syntax.token(75),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withExpression=function(e){return this.update(e,this.openBracketToken,this.argumentExpression,this.closeBracketToken)},n.prototype.withOpenBracketToken=function(e){return this.update(this.expression,e,this.argumentExpression,this.closeBracketToken)},n.prototype.withArgumentExpression=function(e){return this.update(this.expression,this.openBracketToken,e,this.closeBracketToken)},n.prototype.withCloseBracketToken=function(e){return this.update(this.expression,this.openBracketToken,this.argumentExpression,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:this.argumentExpression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ElementAccessExpressionSyntax=M;var O=function(t){function n(e,n,r){t.call(this,r),this.expression=e,this.argumentList=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitInvocationExpression(this)},n.prototype.kind=function(){return 213},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.expression;case 1:return this.argumentList;default:throw e.Errors.invalidOperation()}},n.prototype.isMemberExpression=function(){return!0},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t){return this.expression===e&&this.argumentList===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(e){return new n(e,F.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withExpression=function(e){return this.update(e,this.argumentList)},n.prototype.withArgumentList=function(e){return this.update(this.expression,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:this.argumentList.isTypeScriptSpecific()?!0:!1 },n}(e.SyntaxNode);e.InvocationExpressionSyntax=O;var F=function(t){function n(e,n,r,i,o){t.call(this,o),this.typeArgumentList=e,this.openParenToken=n,this.arguments=r,this.closeParenToken=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitArgumentList(this)},n.prototype.kind=function(){return 226},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.typeArgumentList;case 1:return this.openParenToken;case 2:return this.arguments;case 3:return this.closeParenToken;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t,r,i){return this.typeArgumentList===e&&this.openParenToken===t&&this.arguments===r&&this.closeParenToken===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create=function(t,r){return new n(null,t,e.Syntax.emptySeparatedList,r,!1)},n.create1=function(){return new n(null,e.Syntax.token(72),e.Syntax.emptySeparatedList,e.Syntax.token(73),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withTypeArgumentList=function(e){return this.update(e,this.openParenToken,this.arguments,this.closeParenToken)},n.prototype.withOpenParenToken=function(e){return this.update(this.typeArgumentList,e,this.arguments,this.closeParenToken)},n.prototype.withArguments=function(e){return this.update(this.typeArgumentList,this.openParenToken,e,this.closeParenToken)},n.prototype.withArgument=function(t){return this.withArguments(e.Syntax.separatedList([t]))},n.prototype.withCloseParenToken=function(e){return this.update(this.typeArgumentList,this.openParenToken,this.arguments,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.typeArgumentList&&this.typeArgumentList.isTypeScriptSpecific()?!0:this.arguments.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ArgumentListSyntax=F;var R=function(t){function n(e,n,r,i,o){t.call(this,o),this.left=n,this.operatorToken=r,this.right=i,this._kind=e}return __extends(n,t),n.prototype.accept=function(e){return e.visitBinaryExpression(this)},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.left;case 1:return this.operatorToken;case 2:return this.right;default:throw e.Errors.invalidOperation()}},n.prototype.isExpression=function(){return!0},n.prototype.kind=function(){return this._kind},n.prototype.update=function(e,t,r,i){return this._kind===e&&this.left===t&&this.operatorToken===r&&this.right===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withKind=function(e){return this.update(e,this.left,this.operatorToken,this.right)},n.prototype.withLeft=function(e){return this.update(this._kind,e,this.operatorToken,this.right)},n.prototype.withOperatorToken=function(e){return this.update(this._kind,this.left,e,this.right)},n.prototype.withRight=function(e){return this.update(this._kind,this.left,this.operatorToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.left.isTypeScriptSpecific()?!0:this.right.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.BinaryExpressionSyntax=R;var V=function(t){function n(e,n,r,i,o,a){t.call(this,a),this.condition=e,this.questionToken=n,this.whenTrue=r,this.colonToken=i,this.whenFalse=o}return __extends(n,t),n.prototype.accept=function(e){return e.visitConditionalExpression(this)},n.prototype.kind=function(){return 186},n.prototype.childCount=function(){return 5},n.prototype.childAt=function(t){switch(t){case 0:return this.condition;case 1:return this.questionToken;case 2:return this.whenTrue;case 3:return this.colonToken;case 4:return this.whenFalse;default:throw e.Errors.invalidOperation()}},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r,i,o){return this.condition===e&&this.questionToken===t&&this.whenTrue===r&&this.colonToken===i&&this.whenFalse===o?this:new n(e,t,r,i,o,this.parsedInStrictMode())},n.create1=function(t,r,i){return new n(t,e.Syntax.token(105),r,e.Syntax.token(106),i,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withCondition=function(e){return this.update(e,this.questionToken,this.whenTrue,this.colonToken,this.whenFalse)},n.prototype.withQuestionToken=function(e){return this.update(this.condition,e,this.whenTrue,this.colonToken,this.whenFalse)},n.prototype.withWhenTrue=function(e){return this.update(this.condition,this.questionToken,e,this.colonToken,this.whenFalse)},n.prototype.withColonToken=function(e){return this.update(this.condition,this.questionToken,this.whenTrue,e,this.whenFalse)},n.prototype.withWhenFalse=function(e){return this.update(this.condition,this.questionToken,this.whenTrue,this.colonToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.condition.isTypeScriptSpecific()?!0:this.whenTrue.isTypeScriptSpecific()?!0:this.whenFalse.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ConditionalExpressionSyntax=V;var B=function(t){function n(e,n,r){t.call(this,r),this.newKeyword=e,this.callSignature=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitConstructSignature(this)},n.prototype.kind=function(){return 143},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.newKeyword;case 1:return this.callSignature;default:throw e.Errors.invalidOperation()}},n.prototype.isTypeMember=function(){return!0},n.prototype.update=function(e,t){return this.newKeyword===e&&this.callSignature===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(){return new n(e.Syntax.token(31),U.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withNewKeyword=function(e){return this.update(e,this.callSignature)},n.prototype.withCallSignature=function(e){return this.update(this.newKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ConstructSignatureSyntax=B;var G=function(t){function n(e,n,r,i){t.call(this,i),this.propertyName=e,this.questionToken=n,this.callSignature=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitMethodSignature(this)},n.prototype.kind=function(){return 145},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.propertyName;case 1:return this.questionToken;case 2:return this.callSignature;default:throw e.Errors.invalidOperation()}},n.prototype.isTypeMember=function(){return!0},n.prototype.update=function(e,t,r){return this.propertyName===e&&this.questionToken===t&&this.callSignature===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(e,t){return new n(e,null,t,!1)},n.create1=function(e){return new n(e,null,U.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withPropertyName=function(e){return this.update(e,this.questionToken,this.callSignature)},n.prototype.withQuestionToken=function(e){return this.update(this.propertyName,e,this.callSignature)},n.prototype.withCallSignature=function(e){return this.update(this.propertyName,this.questionToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.callSignature.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.MethodSignatureSyntax=G;var H=function(t){function n(e,n,r,i,o){t.call(this,o),this.openBracketToken=e,this.parameter=n,this.closeBracketToken=r,this.typeAnnotation=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitIndexSignature(this)},n.prototype.kind=function(){return 144},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.openBracketToken;case 1:return this.parameter;case 2:return this.closeBracketToken;case 3:return this.typeAnnotation;default:throw e.Errors.invalidOperation()}},n.prototype.isTypeMember=function(){return!0},n.prototype.update=function(e,t,r,i){return this.openBracketToken===e&&this.parameter===t&&this.closeBracketToken===r&&this.typeAnnotation===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create=function(e,t,r){return new n(e,t,r,null,!1)},n.create1=function(t){return new n(e.Syntax.token(74),t,e.Syntax.token(75),null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withOpenBracketToken=function(e){return this.update(e,this.parameter,this.closeBracketToken,this.typeAnnotation)},n.prototype.withParameter=function(e){return this.update(this.openBracketToken,e,this.closeBracketToken,this.typeAnnotation)},n.prototype.withCloseBracketToken=function(e){return this.update(this.openBracketToken,this.parameter,e,this.typeAnnotation)},n.prototype.withTypeAnnotation=function(e){return this.update(this.openBracketToken,this.parameter,this.closeBracketToken,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.IndexSignatureSyntax=H;var K=function(t){function n(e,n,r,i){t.call(this,i),this.propertyName=e,this.questionToken=n,this.typeAnnotation=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitPropertySignature(this)},n.prototype.kind=function(){return 141},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.propertyName;case 1:return this.questionToken;case 2:return this.typeAnnotation;default:throw e.Errors.invalidOperation()}},n.prototype.isTypeMember=function(){return!0},n.prototype.update=function(e,t,r){return this.propertyName===e&&this.questionToken===t&&this.typeAnnotation===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(e){return new n(e,null,null,!1)},n.create1=function(e){return new n(e,null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withPropertyName=function(e){return this.update(e,this.questionToken,this.typeAnnotation)},n.prototype.withQuestionToken=function(e){return this.update(this.propertyName,e,this.typeAnnotation)},n.prototype.withTypeAnnotation=function(e){return this.update(this.propertyName,this.questionToken,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.PropertySignatureSyntax=K;var U=function(t){function n(e,n,r,i){t.call(this,i),this.typeParameterList=e,this.parameterList=n,this.typeAnnotation=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitCallSignature(this)},n.prototype.kind=function(){return 142},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.typeParameterList;case 1:return this.parameterList;case 2:return this.typeAnnotation;default:throw e.Errors.invalidOperation()}},n.prototype.isTypeMember=function(){return!0},n.prototype.update=function(e,t,r){return this.typeParameterList===e&&this.parameterList===t&&this.typeAnnotation===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(e){return new n(null,e,null,!1)},n.create1=function(){return new n(null,W.create1(),null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withTypeParameterList=function(e){return this.update(e,this.parameterList,this.typeAnnotation)},n.prototype.withParameterList=function(e){return this.update(this.typeParameterList,e,this.typeAnnotation)},n.prototype.withTypeAnnotation=function(e){return this.update(this.typeParameterList,this.parameterList,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.typeParameterList?!0:this.parameterList.isTypeScriptSpecific()?!0:null!==this.typeAnnotation?!0:!1},n}(e.SyntaxNode);e.CallSignatureSyntax=U;var W=function(t){function n(e,n,r,i){t.call(this,i),this.openParenToken=e,this.parameters=n,this.closeParenToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitParameterList(this)},n.prototype.kind=function(){return 227},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.openParenToken;case 1:return this.parameters;case 2:return this.closeParenToken;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t,r){return this.openParenToken===e&&this.parameters===t&&this.closeParenToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(t,e.Syntax.emptySeparatedList,r,!1)},n.create1=function(){return new n(e.Syntax.token(72),e.Syntax.emptySeparatedList,e.Syntax.token(73),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withOpenParenToken=function(e){return this.update(e,this.parameters,this.closeParenToken)},n.prototype.withParameters=function(e){return this.update(this.openParenToken,e,this.closeParenToken)},n.prototype.withParameter=function(t){return this.withParameters(e.Syntax.separatedList([t]))},n.prototype.withCloseParenToken=function(e){return this.update(this.openParenToken,this.parameters,e)},n.prototype.isTypeScriptSpecific=function(){return this.parameters.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ParameterListSyntax=W;var j=function(t){function n(e,n,r,i){t.call(this,i),this.lessThanToken=e,this.typeParameters=n,this.greaterThanToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitTypeParameterList(this)},n.prototype.kind=function(){return 229},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.lessThanToken;case 1:return this.typeParameters;case 2:return this.greaterThanToken;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t,r){return this.lessThanToken===e&&this.typeParameters===t&&this.greaterThanToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(t,e.Syntax.emptySeparatedList,r,!1)},n.create1=function(){return new n(e.Syntax.token(80),e.Syntax.emptySeparatedList,e.Syntax.token(81),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withLessThanToken=function(e){return this.update(e,this.typeParameters,this.greaterThanToken)},n.prototype.withTypeParameters=function(e){return this.update(this.lessThanToken,e,this.greaterThanToken)},n.prototype.withTypeParameter=function(t){return this.withTypeParameters(e.Syntax.separatedList([t]))},n.prototype.withGreaterThanToken=function(e){return this.update(this.lessThanToken,this.typeParameters,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.TypeParameterListSyntax=j;var q=function(t){function n(e,n,r){t.call(this,r),this.identifier=e,this.constraint=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitTypeParameter(this)},n.prototype.kind=function(){return 238},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.identifier;case 1:return this.constraint;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.identifier===e&&this.constraint===t?this:new n(e,t,this.parsedInStrictMode())},n.create=function(e){return new n(e,null,!1)},n.create1=function(e){return new n(e,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withIdentifier=function(e){return this.update(e,this.constraint)},n.prototype.withConstraint=function(e){return this.update(this.identifier,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.TypeParameterSyntax=q;var z=function(t){function n(e,n,r){t.call(this,r),this.extendsKeyword=e,this.type=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitConstraint(this)},n.prototype.kind=function(){return 239},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.extendsKeyword;case 1:return this.type;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.extendsKeyword===e&&this.type===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(48),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withExtendsKeyword=function(e){return this.update(e,this.type)},n.prototype.withType=function(e){return this.update(this.extendsKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ConstraintSyntax=z;var Y=function(t){function n(e,n,r){t.call(this,r),this.elseKeyword=e,this.statement=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitElseClause(this)},n.prototype.kind=function(){return 235},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.elseKeyword;case 1:return this.statement;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.elseKeyword===e&&this.statement===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(23),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withElseKeyword=function(e){return this.update(e,this.statement)},n.prototype.withStatement=function(e){return this.update(this.elseKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return this.statement.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ElseClauseSyntax=Y;var J=function(t){function n(e,n,r,i,o,a,s){t.call(this,s),this.ifKeyword=e,this.openParenToken=n,this.condition=r,this.closeParenToken=i,this.statement=o,this.elseClause=a}return __extends(n,t),n.prototype.accept=function(e){return e.visitIfStatement(this)},n.prototype.kind=function(){return 147},n.prototype.childCount=function(){return 6},n.prototype.childAt=function(t){switch(t){case 0:return this.ifKeyword;case 1:return this.openParenToken;case 2:return this.condition;case 3:return this.closeParenToken;case 4:return this.statement;case 5:return this.elseClause;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a){return this.ifKeyword===e&&this.openParenToken===t&&this.condition===r&&this.closeParenToken===i&&this.statement===o&&this.elseClause===a?this:new n(e,t,r,i,o,a,this.parsedInStrictMode())},n.create=function(e,t,r,i,o){return new n(e,t,r,i,o,null,!1)},n.create1=function(t,r){return new n(e.Syntax.token(28),e.Syntax.token(72),t,e.Syntax.token(73),r,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withIfKeyword=function(e){return this.update(e,this.openParenToken,this.condition,this.closeParenToken,this.statement,this.elseClause)},n.prototype.withOpenParenToken=function(e){return this.update(this.ifKeyword,e,this.condition,this.closeParenToken,this.statement,this.elseClause)},n.prototype.withCondition=function(e){return this.update(this.ifKeyword,this.openParenToken,e,this.closeParenToken,this.statement,this.elseClause)},n.prototype.withCloseParenToken=function(e){return this.update(this.ifKeyword,this.openParenToken,this.condition,e,this.statement,this.elseClause)},n.prototype.withStatement=function(e){return this.update(this.ifKeyword,this.openParenToken,this.condition,this.closeParenToken,e,this.elseClause)},n.prototype.withElseClause=function(e){return this.update(this.ifKeyword,this.openParenToken,this.condition,this.closeParenToken,this.statement,e)},n.prototype.isTypeScriptSpecific=function(){return this.condition.isTypeScriptSpecific()?!0:this.statement.isTypeScriptSpecific()?!0:null!==this.elseClause&&this.elseClause.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.IfStatementSyntax=J;var X=function(t){function n(e,n,r){t.call(this,r),this.expression=e,this.semicolonToken=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitExpressionStatement(this)},n.prototype.kind=function(){return 149},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.expression;case 1:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t){return this.expression===e&&this.semicolonToken===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(t,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withExpression=function(e){return this.update(e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.expression,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ExpressionStatementSyntax=X;var Q=function(t){function n(e,n,r,i,o,a){t.call(this,a),this.modifiers=e,this.constructorKeyword=n,this.parameterList=r,this.block=i,this.semicolonToken=o}return __extends(n,t),n.prototype.accept=function(e){return e.visitConstructorDeclaration(this)},n.prototype.kind=function(){return 137},n.prototype.childCount=function(){return 5},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.constructorKeyword;case 2:return this.parameterList;case 3:return this.block;case 4:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isClassElement=function(){return!0},n.prototype.update=function(e,t,r,i,o){return this.modifiers===e&&this.constructorKeyword===t&&this.parameterList===r&&this.block===i&&this.semicolonToken===o?this:new n(e,t,r,i,o,this.parsedInStrictMode())},n.create=function(t,r){return new n(e.Syntax.emptyList,t,r,null,null,!1)},n.create1=function(){return new n(e.Syntax.emptyList,e.Syntax.token(62),W.create1(),null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.constructorKeyword,this.parameterList,this.block,this.semicolonToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withConstructorKeyword=function(e){return this.update(this.modifiers,e,this.parameterList,this.block,this.semicolonToken)},n.prototype.withParameterList=function(e){return this.update(this.modifiers,this.constructorKeyword,e,this.block,this.semicolonToken)},n.prototype.withBlock=function(e){return this.update(this.modifiers,this.constructorKeyword,this.parameterList,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.modifiers,this.constructorKeyword,this.parameterList,this.block,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.ConstructorDeclarationSyntax=Q;var Z=function(t){function n(e,n,r,i,o,a){t.call(this,a),this.modifiers=e,this.propertyName=n,this.callSignature=r,this.block=i,this.semicolonToken=o}return __extends(n,t),n.prototype.accept=function(e){return e.visitMemberFunctionDeclaration(this)},n.prototype.kind=function(){return 135},n.prototype.childCount=function(){return 5},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.propertyName;case 2:return this.callSignature;case 3:return this.block;case 4:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isMemberDeclaration=function(){return!0},n.prototype.isClassElement=function(){return!0},n.prototype.update=function(e,t,r,i,o){return this.modifiers===e&&this.propertyName===t&&this.callSignature===r&&this.block===i&&this.semicolonToken===o?this:new n(e,t,r,i,o,this.parsedInStrictMode())},n.create=function(t,r){return new n(e.Syntax.emptyList,t,r,null,null,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,t,U.create1(),null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.propertyName,this.callSignature,this.block,this.semicolonToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withPropertyName=function(e){return this.update(this.modifiers,e,this.callSignature,this.block,this.semicolonToken)},n.prototype.withCallSignature=function(e){return this.update(this.modifiers,this.propertyName,e,this.block,this.semicolonToken)},n.prototype.withBlock=function(e){return this.update(this.modifiers,this.propertyName,this.callSignature,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.modifiers,this.propertyName,this.callSignature,this.block,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.MemberFunctionDeclarationSyntax=Z;var $=function(t){function n(e,n,r,i,o,a,s){t.call(this,s),this.modifiers=e,this.getKeyword=n,this.propertyName=r,this.parameterList=i,this.typeAnnotation=o,this.block=a}return __extends(n,t),n.prototype.accept=function(e){return e.visitGetAccessor(this)},n.prototype.kind=function(){return 139},n.prototype.childCount=function(){return 6},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.getKeyword;case 2:return this.propertyName;case 3:return this.parameterList;case 4:return this.typeAnnotation;case 5:return this.block;default:throw e.Errors.invalidOperation()}},n.prototype.isMemberDeclaration=function(){return!0},n.prototype.isPropertyAssignment=function(){return!0},n.prototype.isClassElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a){return this.modifiers===e&&this.getKeyword===t&&this.propertyName===r&&this.parameterList===i&&this.typeAnnotation===o&&this.block===a?this:new n(e,t,r,i,o,a,this.parsedInStrictMode())},n.create=function(t,r,i,o){return new n(e.Syntax.emptyList,t,r,i,null,o,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,e.Syntax.token(64),t,W.create1(),null,I.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.getKeyword,this.propertyName,this.parameterList,this.typeAnnotation,this.block)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withGetKeyword=function(e){return this.update(this.modifiers,e,this.propertyName,this.parameterList,this.typeAnnotation,this.block)},n.prototype.withPropertyName=function(e){return this.update(this.modifiers,this.getKeyword,e,this.parameterList,this.typeAnnotation,this.block)},n.prototype.withParameterList=function(e){return this.update(this.modifiers,this.getKeyword,this.propertyName,e,this.typeAnnotation,this.block)},n.prototype.withTypeAnnotation=function(e){return this.update(this.modifiers,this.getKeyword,this.propertyName,this.parameterList,e,this.block)},n.prototype.withBlock=function(e){return this.update(this.modifiers,this.getKeyword,this.propertyName,this.parameterList,this.typeAnnotation,e)},n.prototype.isTypeScriptSpecific=function(){return this.modifiers.childCount()>0?!0:this.parameterList.isTypeScriptSpecific()?!0:null!==this.typeAnnotation?!0:this.block.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.GetAccessorSyntax=$;var et=function(t){function n(e,n,r,i,o,a){t.call(this,a),this.modifiers=e,this.setKeyword=n,this.propertyName=r,this.parameterList=i,this.block=o}return __extends(n,t),n.prototype.accept=function(e){return e.visitSetAccessor(this)},n.prototype.kind=function(){return 140},n.prototype.childCount=function(){return 5},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.setKeyword;case 2:return this.propertyName;case 3:return this.parameterList;case 4:return this.block;default:throw e.Errors.invalidOperation()}},n.prototype.isMemberDeclaration=function(){return!0},n.prototype.isPropertyAssignment=function(){return!0},n.prototype.isClassElement=function(){return!0},n.prototype.update=function(e,t,r,i,o){return this.modifiers===e&&this.setKeyword===t&&this.propertyName===r&&this.parameterList===i&&this.block===o?this:new n(e,t,r,i,o,this.parsedInStrictMode())},n.create=function(t,r,i,o){return new n(e.Syntax.emptyList,t,r,i,o,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,e.Syntax.token(68),t,W.create1(),I.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.setKeyword,this.propertyName,this.parameterList,this.block)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withSetKeyword=function(e){return this.update(this.modifiers,e,this.propertyName,this.parameterList,this.block)},n.prototype.withPropertyName=function(e){return this.update(this.modifiers,this.setKeyword,e,this.parameterList,this.block)},n.prototype.withParameterList=function(e){return this.update(this.modifiers,this.setKeyword,this.propertyName,e,this.block)},n.prototype.withBlock=function(e){return this.update(this.modifiers,this.setKeyword,this.propertyName,this.parameterList,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.SetAccessorSyntax=et;var tt=function(t){function n(e,n,r,i){t.call(this,i),this.modifiers=e,this.variableDeclarator=n,this.semicolonToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitMemberVariableDeclaration(this)},n.prototype.kind=function(){return 136},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.variableDeclarator;case 2:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isMemberDeclaration=function(){return!0},n.prototype.isClassElement=function(){return!0},n.prototype.update=function(e,t,r){return this.modifiers===e&&this.variableDeclarator===t&&this.semicolonToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(e.Syntax.emptyList,t,r,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,t,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e) },n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.variableDeclarator,this.semicolonToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withVariableDeclarator=function(e){return this.update(this.modifiers,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.modifiers,this.variableDeclarator,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.MemberVariableDeclarationSyntax=tt;var nt=function(t){function n(e,n,r,i){t.call(this,i),this.modifiers=e,this.indexSignature=n,this.semicolonToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitIndexMemberDeclaration(this)},n.prototype.kind=function(){return 138},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.indexSignature;case 2:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isClassElement=function(){return!0},n.prototype.update=function(e,t,r){return this.modifiers===e&&this.indexSignature===t&&this.semicolonToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(e.Syntax.emptyList,t,r,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,t,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.indexSignature,this.semicolonToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withIndexSignature=function(e){return this.update(this.modifiers,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.modifiers,this.indexSignature,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.IndexMemberDeclarationSyntax=nt;var rt=function(t){function n(e,n,r,i){t.call(this,i),this.throwKeyword=e,this.expression=n,this.semicolonToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitThrowStatement(this)},n.prototype.kind=function(){return 157},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.throwKeyword;case 1:return this.expression;case 2:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r){return this.throwKeyword===e&&this.expression===t&&this.semicolonToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(36),t,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withThrowKeyword=function(e){return this.update(e,this.expression,this.semicolonToken)},n.prototype.withExpression=function(e){return this.update(this.throwKeyword,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.throwKeyword,this.expression,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ThrowStatementSyntax=rt;var it=function(t){function n(e,n,r,i){t.call(this,i),this.returnKeyword=e,this.expression=n,this.semicolonToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitReturnStatement(this)},n.prototype.kind=function(){return 150},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.returnKeyword;case 1:return this.expression;case 2:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r){return this.returnKeyword===e&&this.expression===t&&this.semicolonToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(e,t){return new n(e,null,t,!1)},n.create1=function(){return new n(e.Syntax.token(33),null,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withReturnKeyword=function(e){return this.update(e,this.expression,this.semicolonToken)},n.prototype.withExpression=function(e){return this.update(this.returnKeyword,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.returnKeyword,this.expression,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.expression&&this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ReturnStatementSyntax=it;var ot=function(t){function n(e,n,r,i){t.call(this,i),this.newKeyword=e,this.expression=n,this.argumentList=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitObjectCreationExpression(this)},n.prototype.kind=function(){return 216},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.newKeyword;case 1:return this.expression;case 2:return this.argumentList;default:throw e.Errors.invalidOperation()}},n.prototype.isMemberExpression=function(){return!0},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r){return this.newKeyword===e&&this.expression===t&&this.argumentList===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(e,t){return new n(e,t,null,!1)},n.create1=function(t){return new n(e.Syntax.token(31),t,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withNewKeyword=function(e){return this.update(e,this.expression,this.argumentList)},n.prototype.withExpression=function(e){return this.update(this.newKeyword,e,this.argumentList)},n.prototype.withArgumentList=function(e){return this.update(this.newKeyword,this.expression,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:null!==this.argumentList&&this.argumentList.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ObjectCreationExpressionSyntax=ot;var at=function(t){function n(e,n,r,i,o,a,s,l){t.call(this,l),this.switchKeyword=e,this.openParenToken=n,this.expression=r,this.closeParenToken=i,this.openBraceToken=o,this.switchClauses=a,this.closeBraceToken=s}return __extends(n,t),n.prototype.accept=function(e){return e.visitSwitchStatement(this)},n.prototype.kind=function(){return 151},n.prototype.childCount=function(){return 7},n.prototype.childAt=function(t){switch(t){case 0:return this.switchKeyword;case 1:return this.openParenToken;case 2:return this.expression;case 3:return this.closeParenToken;case 4:return this.openBraceToken;case 5:return this.switchClauses;case 6:return this.closeBraceToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a,s){return this.switchKeyword===e&&this.openParenToken===t&&this.expression===r&&this.closeParenToken===i&&this.openBraceToken===o&&this.switchClauses===a&&this.closeBraceToken===s?this:new n(e,t,r,i,o,a,s,this.parsedInStrictMode())},n.create=function(t,r,i,o,a,s){return new n(t,r,i,o,a,e.Syntax.emptyList,s,!1)},n.create1=function(t){return new n(e.Syntax.token(34),e.Syntax.token(72),t,e.Syntax.token(73),e.Syntax.token(70),e.Syntax.emptyList,e.Syntax.token(71),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withSwitchKeyword=function(e){return this.update(e,this.openParenToken,this.expression,this.closeParenToken,this.openBraceToken,this.switchClauses,this.closeBraceToken)},n.prototype.withOpenParenToken=function(e){return this.update(this.switchKeyword,e,this.expression,this.closeParenToken,this.openBraceToken,this.switchClauses,this.closeBraceToken)},n.prototype.withExpression=function(e){return this.update(this.switchKeyword,this.openParenToken,e,this.closeParenToken,this.openBraceToken,this.switchClauses,this.closeBraceToken)},n.prototype.withCloseParenToken=function(e){return this.update(this.switchKeyword,this.openParenToken,this.expression,e,this.openBraceToken,this.switchClauses,this.closeBraceToken)},n.prototype.withOpenBraceToken=function(e){return this.update(this.switchKeyword,this.openParenToken,this.expression,this.closeParenToken,e,this.switchClauses,this.closeBraceToken)},n.prototype.withSwitchClauses=function(e){return this.update(this.switchKeyword,this.openParenToken,this.expression,this.closeParenToken,this.openBraceToken,e,this.closeBraceToken)},n.prototype.withSwitchClause=function(t){return this.withSwitchClauses(e.Syntax.list([t]))},n.prototype.withCloseBraceToken=function(e){return this.update(this.switchKeyword,this.openParenToken,this.expression,this.closeParenToken,this.openBraceToken,this.switchClauses,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:this.switchClauses.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.SwitchStatementSyntax=at;var st=function(t){function n(e,n,r,i,o){t.call(this,o),this.caseKeyword=e,this.expression=n,this.colonToken=r,this.statements=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitCaseSwitchClause(this)},n.prototype.kind=function(){return 233},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.caseKeyword;case 1:return this.expression;case 2:return this.colonToken;case 3:return this.statements;default:throw e.Errors.invalidOperation()}},n.prototype.isSwitchClause=function(){return!0},n.prototype.update=function(e,t,r,i){return this.caseKeyword===e&&this.expression===t&&this.colonToken===r&&this.statements===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create=function(t,r,i){return new n(t,r,i,e.Syntax.emptyList,!1)},n.create1=function(t){return new n(e.Syntax.token(16),t,e.Syntax.token(106),e.Syntax.emptyList,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withCaseKeyword=function(e){return this.update(e,this.expression,this.colonToken,this.statements)},n.prototype.withExpression=function(e){return this.update(this.caseKeyword,e,this.colonToken,this.statements)},n.prototype.withColonToken=function(e){return this.update(this.caseKeyword,this.expression,e,this.statements)},n.prototype.withStatements=function(e){return this.update(this.caseKeyword,this.expression,this.colonToken,e)},n.prototype.withStatement=function(t){return this.withStatements(e.Syntax.list([t]))},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:this.statements.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.CaseSwitchClauseSyntax=st;var lt=function(t){function n(e,n,r,i){t.call(this,i),this.defaultKeyword=e,this.colonToken=n,this.statements=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitDefaultSwitchClause(this)},n.prototype.kind=function(){return 234},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.defaultKeyword;case 1:return this.colonToken;case 2:return this.statements;default:throw e.Errors.invalidOperation()}},n.prototype.isSwitchClause=function(){return!0},n.prototype.update=function(e,t,r){return this.defaultKeyword===e&&this.colonToken===t&&this.statements===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(t,r,e.Syntax.emptyList,!1)},n.create1=function(){return new n(e.Syntax.token(20),e.Syntax.token(106),e.Syntax.emptyList,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withDefaultKeyword=function(e){return this.update(e,this.colonToken,this.statements)},n.prototype.withColonToken=function(e){return this.update(this.defaultKeyword,e,this.statements)},n.prototype.withStatements=function(e){return this.update(this.defaultKeyword,this.colonToken,e)},n.prototype.withStatement=function(t){return this.withStatements(e.Syntax.list([t]))},n.prototype.isTypeScriptSpecific=function(){return this.statements.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.DefaultSwitchClauseSyntax=lt;var ct=function(t){function n(e,n,r,i){t.call(this,i),this.breakKeyword=e,this.identifier=n,this.semicolonToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitBreakStatement(this)},n.prototype.kind=function(){return 152},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.breakKeyword;case 1:return this.identifier;case 2:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r){return this.breakKeyword===e&&this.identifier===t&&this.semicolonToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(e,t){return new n(e,null,t,!1)},n.create1=function(){return new n(e.Syntax.token(15),null,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withBreakKeyword=function(e){return this.update(e,this.identifier,this.semicolonToken)},n.prototype.withIdentifier=function(e){return this.update(this.breakKeyword,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.breakKeyword,this.identifier,e)},n.prototype.isTypeScriptSpecific=function(){return!1},n}(e.SyntaxNode);e.BreakStatementSyntax=ct;var ut=function(t){function n(e,n,r,i){t.call(this,i),this.continueKeyword=e,this.identifier=n,this.semicolonToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitContinueStatement(this)},n.prototype.kind=function(){return 153},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.continueKeyword;case 1:return this.identifier;case 2:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r){return this.continueKeyword===e&&this.identifier===t&&this.semicolonToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(e,t){return new n(e,null,t,!1)},n.create1=function(){return new n(e.Syntax.token(18),null,e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withContinueKeyword=function(e){return this.update(e,this.identifier,this.semicolonToken)},n.prototype.withIdentifier=function(e){return this.update(this.continueKeyword,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.continueKeyword,this.identifier,e)},n.prototype.isTypeScriptSpecific=function(){return!1},n}(e.SyntaxNode);e.ContinueStatementSyntax=ut;var pt=function(t){function n(e,n,r,i,o,a,s,l,c,u,p){t.call(this,p),this.forKeyword=e,this.openParenToken=n,this.variableDeclaration=r,this.initializer=i,this.firstSemicolonToken=o,this.condition=a,this.secondSemicolonToken=s,this.incrementor=l,this.closeParenToken=c,this.statement=u}return __extends(n,t),n.prototype.accept=function(e){return e.visitForStatement(this)},n.prototype.kind=function(){return 154},n.prototype.childCount=function(){return 10},n.prototype.childAt=function(t){switch(t){case 0:return this.forKeyword;case 1:return this.openParenToken;case 2:return this.variableDeclaration;case 3:return this.initializer;case 4:return this.firstSemicolonToken;case 5:return this.condition;case 6:return this.secondSemicolonToken;case 7:return this.incrementor;case 8:return this.closeParenToken;case 9:return this.statement;default:throw e.Errors.invalidOperation()}},n.prototype.isIterationStatement=function(){return!0},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a,s,l,c,u){return this.forKeyword===e&&this.openParenToken===t&&this.variableDeclaration===r&&this.initializer===i&&this.firstSemicolonToken===o&&this.condition===a&&this.secondSemicolonToken===s&&this.incrementor===l&&this.closeParenToken===c&&this.statement===u?this:new n(e,t,r,i,o,a,s,l,c,u,this.parsedInStrictMode())},n.create=function(e,t,r,i,o,a){return new n(e,t,null,null,r,null,i,null,o,a,!1)},n.create1=function(t){return new n(e.Syntax.token(26),e.Syntax.token(72),null,null,e.Syntax.token(78),null,e.Syntax.token(78),null,e.Syntax.token(73),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withForKeyword=function(e){return this.update(e,this.openParenToken,this.variableDeclaration,this.initializer,this.firstSemicolonToken,this.condition,this.secondSemicolonToken,this.incrementor,this.closeParenToken,this.statement)},n.prototype.withOpenParenToken=function(e){return this.update(this.forKeyword,e,this.variableDeclaration,this.initializer,this.firstSemicolonToken,this.condition,this.secondSemicolonToken,this.incrementor,this.closeParenToken,this.statement)},n.prototype.withVariableDeclaration=function(e){return this.update(this.forKeyword,this.openParenToken,e,this.initializer,this.firstSemicolonToken,this.condition,this.secondSemicolonToken,this.incrementor,this.closeParenToken,this.statement)},n.prototype.withInitializer=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,e,this.firstSemicolonToken,this.condition,this.secondSemicolonToken,this.incrementor,this.closeParenToken,this.statement)},n.prototype.withFirstSemicolonToken=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.initializer,e,this.condition,this.secondSemicolonToken,this.incrementor,this.closeParenToken,this.statement)},n.prototype.withCondition=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.initializer,this.firstSemicolonToken,e,this.secondSemicolonToken,this.incrementor,this.closeParenToken,this.statement)},n.prototype.withSecondSemicolonToken=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.initializer,this.firstSemicolonToken,this.condition,e,this.incrementor,this.closeParenToken,this.statement)},n.prototype.withIncrementor=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.initializer,this.firstSemicolonToken,this.condition,this.secondSemicolonToken,e,this.closeParenToken,this.statement)},n.prototype.withCloseParenToken=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.initializer,this.firstSemicolonToken,this.condition,this.secondSemicolonToken,this.incrementor,e,this.statement)},n.prototype.withStatement=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.initializer,this.firstSemicolonToken,this.condition,this.secondSemicolonToken,this.incrementor,this.closeParenToken,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.variableDeclaration&&this.variableDeclaration.isTypeScriptSpecific()?!0:null!==this.initializer&&this.initializer.isTypeScriptSpecific()?!0:null!==this.condition&&this.condition.isTypeScriptSpecific()?!0:null!==this.incrementor&&this.incrementor.isTypeScriptSpecific()?!0:this.statement.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ForStatementSyntax=pt;var ht=function(t){function n(e,n,r,i,o,a,s,l,c){t.call(this,c),this.forKeyword=e,this.openParenToken=n,this.variableDeclaration=r,this.left=i,this.inKeyword=o,this.expression=a,this.closeParenToken=s,this.statement=l}return __extends(n,t),n.prototype.accept=function(e){return e.visitForInStatement(this)},n.prototype.kind=function(){return 155},n.prototype.childCount=function(){return 8},n.prototype.childAt=function(t){switch(t){case 0:return this.forKeyword;case 1:return this.openParenToken;case 2:return this.variableDeclaration;case 3:return this.left;case 4:return this.inKeyword;case 5:return this.expression;case 6:return this.closeParenToken;case 7:return this.statement;default:throw e.Errors.invalidOperation()}},n.prototype.isIterationStatement=function(){return!0},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a,s,l){return this.forKeyword===e&&this.openParenToken===t&&this.variableDeclaration===r&&this.left===i&&this.inKeyword===o&&this.expression===a&&this.closeParenToken===s&&this.statement===l?this:new n(e,t,r,i,o,a,s,l,this.parsedInStrictMode())},n.create=function(e,t,r,i,o,a){return new n(e,t,null,null,r,i,o,a,!1)},n.create1=function(t,r){return new n(e.Syntax.token(26),e.Syntax.token(72),null,null,e.Syntax.token(29),t,e.Syntax.token(73),r,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withForKeyword=function(e){return this.update(e,this.openParenToken,this.variableDeclaration,this.left,this.inKeyword,this.expression,this.closeParenToken,this.statement)},n.prototype.withOpenParenToken=function(e){return this.update(this.forKeyword,e,this.variableDeclaration,this.left,this.inKeyword,this.expression,this.closeParenToken,this.statement)},n.prototype.withVariableDeclaration=function(e){return this.update(this.forKeyword,this.openParenToken,e,this.left,this.inKeyword,this.expression,this.closeParenToken,this.statement)},n.prototype.withLeft=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,e,this.inKeyword,this.expression,this.closeParenToken,this.statement)},n.prototype.withInKeyword=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.left,e,this.expression,this.closeParenToken,this.statement)},n.prototype.withExpression=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.left,this.inKeyword,e,this.closeParenToken,this.statement)},n.prototype.withCloseParenToken=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.left,this.inKeyword,this.expression,e,this.statement)},n.prototype.withStatement=function(e){return this.update(this.forKeyword,this.openParenToken,this.variableDeclaration,this.left,this.inKeyword,this.expression,this.closeParenToken,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.variableDeclaration&&this.variableDeclaration.isTypeScriptSpecific()?!0:null!==this.left&&this.left.isTypeScriptSpecific()?!0:this.expression.isTypeScriptSpecific()?!0:this.statement.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ForInStatementSyntax=ht;var dt=function(t){function n(e,n,r,i,o,a){t.call(this,a),this.whileKeyword=e,this.openParenToken=n,this.condition=r,this.closeParenToken=i,this.statement=o}return __extends(n,t),n.prototype.accept=function(e){return e.visitWhileStatement(this)},n.prototype.kind=function(){return 158},n.prototype.childCount=function(){return 5},n.prototype.childAt=function(t){switch(t){case 0:return this.whileKeyword;case 1:return this.openParenToken;case 2:return this.condition;case 3:return this.closeParenToken;case 4:return this.statement;default:throw e.Errors.invalidOperation()}},n.prototype.isIterationStatement=function(){return!0},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o){return this.whileKeyword===e&&this.openParenToken===t&&this.condition===r&&this.closeParenToken===i&&this.statement===o?this:new n(e,t,r,i,o,this.parsedInStrictMode())},n.create1=function(t,r){return new n(e.Syntax.token(42),e.Syntax.token(72),t,e.Syntax.token(73),r,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withWhileKeyword=function(e){return this.update(e,this.openParenToken,this.condition,this.closeParenToken,this.statement)},n.prototype.withOpenParenToken=function(e){return this.update(this.whileKeyword,e,this.condition,this.closeParenToken,this.statement)},n.prototype.withCondition=function(e){return this.update(this.whileKeyword,this.openParenToken,e,this.closeParenToken,this.statement)},n.prototype.withCloseParenToken=function(e){return this.update(this.whileKeyword,this.openParenToken,this.condition,e,this.statement)},n.prototype.withStatement=function(e){return this.update(this.whileKeyword,this.openParenToken,this.condition,this.closeParenToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.condition.isTypeScriptSpecific()?!0:this.statement.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.WhileStatementSyntax=dt;var mt=function(t){function n(e,n,r,i,o,a){t.call(this,a),this.withKeyword=e,this.openParenToken=n,this.condition=r,this.closeParenToken=i,this.statement=o}return __extends(n,t),n.prototype.accept=function(e){return e.visitWithStatement(this)},n.prototype.kind=function(){return 163},n.prototype.childCount=function(){return 5},n.prototype.childAt=function(t){switch(t){case 0:return this.withKeyword;case 1:return this.openParenToken;case 2:return this.condition;case 3:return this.closeParenToken;case 4:return this.statement;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o){return this.withKeyword===e&&this.openParenToken===t&&this.condition===r&&this.closeParenToken===i&&this.statement===o?this:new n(e,t,r,i,o,this.parsedInStrictMode())},n.create1=function(t,r){return new n(e.Syntax.token(43),e.Syntax.token(72),t,e.Syntax.token(73),r,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withWithKeyword=function(e){return this.update(e,this.openParenToken,this.condition,this.closeParenToken,this.statement)},n.prototype.withOpenParenToken=function(e){return this.update(this.withKeyword,e,this.condition,this.closeParenToken,this.statement)},n.prototype.withCondition=function(e){return this.update(this.withKeyword,this.openParenToken,e,this.closeParenToken,this.statement)},n.prototype.withCloseParenToken=function(e){return this.update(this.withKeyword,this.openParenToken,this.condition,e,this.statement)},n.prototype.withStatement=function(e){return this.update(this.withKeyword,this.openParenToken,this.condition,this.closeParenToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.condition.isTypeScriptSpecific()?!0:this.statement.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.WithStatementSyntax=mt;var yt=function(t){function n(e,n,r,i,o,a,s){t.call(this,s),this.modifiers=e,this.enumKeyword=n,this.identifier=r,this.openBraceToken=i,this.enumElements=o,this.closeBraceToken=a}return __extends(n,t),n.prototype.accept=function(e){return e.visitEnumDeclaration(this)},n.prototype.kind=function(){return 132},n.prototype.childCount=function(){return 6},n.prototype.childAt=function(t){switch(t){case 0:return this.modifiers;case 1:return this.enumKeyword;case 2:return this.identifier;case 3:return this.openBraceToken;case 4:return this.enumElements;case 5:return this.closeBraceToken;default:throw e.Errors.invalidOperation()}},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a){return this.modifiers===e&&this.enumKeyword===t&&this.identifier===r&&this.openBraceToken===i&&this.enumElements===o&&this.closeBraceToken===a?this:new n(e,t,r,i,o,a,this.parsedInStrictMode())},n.create=function(t,r,i,o){return new n(e.Syntax.emptyList,t,r,i,e.Syntax.emptySeparatedList,o,!1)},n.create1=function(t){return new n(e.Syntax.emptyList,e.Syntax.token(46),t,e.Syntax.token(70),e.Syntax.emptySeparatedList,e.Syntax.token(71),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withModifiers=function(e){return this.update(e,this.enumKeyword,this.identifier,this.openBraceToken,this.enumElements,this.closeBraceToken)},n.prototype.withModifier=function(t){return this.withModifiers(e.Syntax.list([t]))},n.prototype.withEnumKeyword=function(e){return this.update(this.modifiers,e,this.identifier,this.openBraceToken,this.enumElements,this.closeBraceToken)},n.prototype.withIdentifier=function(e){return this.update(this.modifiers,this.enumKeyword,e,this.openBraceToken,this.enumElements,this.closeBraceToken)},n.prototype.withOpenBraceToken=function(e){return this.update(this.modifiers,this.enumKeyword,this.identifier,e,this.enumElements,this.closeBraceToken)},n.prototype.withEnumElements=function(e){return this.update(this.modifiers,this.enumKeyword,this.identifier,this.openBraceToken,e,this.closeBraceToken)},n.prototype.withEnumElement=function(t){return this.withEnumElements(e.Syntax.separatedList([t]))},n.prototype.withCloseBraceToken=function(e){return this.update(this.modifiers,this.enumKeyword,this.identifier,this.openBraceToken,this.enumElements,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.EnumDeclarationSyntax=yt;var ft=function(t){function n(e,n,r){t.call(this,r),this.propertyName=e,this.equalsValueClause=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitEnumElement(this)},n.prototype.kind=function(){return 243},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.propertyName;case 1:return this.equalsValueClause;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.propertyName===e&&this.equalsValueClause===t?this:new n(e,t,this.parsedInStrictMode())},n.create=function(e){return new n(e,null,!1)},n.create1=function(e){return new n(e,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withPropertyName=function(e){return this.update(e,this.equalsValueClause)},n.prototype.withEqualsValueClause=function(e){return this.update(this.propertyName,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.equalsValueClause&&this.equalsValueClause.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.EnumElementSyntax=ft;var gt=function(t){function n(e,n,r,i,o){t.call(this,o),this.lessThanToken=e,this.type=n,this.greaterThanToken=r,this.expression=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitCastExpression(this) },n.prototype.kind=function(){return 220},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.lessThanToken;case 1:return this.type;case 2:return this.greaterThanToken;case 3:return this.expression;default:throw e.Errors.invalidOperation()}},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r,i){return this.lessThanToken===e&&this.type===t&&this.greaterThanToken===r&&this.expression===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create1=function(t,r){return new n(e.Syntax.token(80),t,e.Syntax.token(81),r,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withLessThanToken=function(e){return this.update(e,this.type,this.greaterThanToken,this.expression)},n.prototype.withType=function(e){return this.update(this.lessThanToken,e,this.greaterThanToken,this.expression)},n.prototype.withGreaterThanToken=function(e){return this.update(this.lessThanToken,this.type,e,this.expression)},n.prototype.withExpression=function(e){return this.update(this.lessThanToken,this.type,this.greaterThanToken,e)},n.prototype.isTypeScriptSpecific=function(){return!0},n}(e.SyntaxNode);e.CastExpressionSyntax=gt;var vt=function(t){function n(e,n,r,i){t.call(this,i),this.openBraceToken=e,this.propertyAssignments=n,this.closeBraceToken=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitObjectLiteralExpression(this)},n.prototype.kind=function(){return 215},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.openBraceToken;case 1:return this.propertyAssignments;case 2:return this.closeBraceToken;default:throw e.Errors.invalidOperation()}},n.prototype.isPrimaryExpression=function(){return!0},n.prototype.isMemberExpression=function(){return!0},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r){return this.openBraceToken===e&&this.propertyAssignments===t&&this.closeBraceToken===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create=function(t,r){return new n(t,e.Syntax.emptySeparatedList,r,!1)},n.create1=function(){return new n(e.Syntax.token(70),e.Syntax.emptySeparatedList,e.Syntax.token(71),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withOpenBraceToken=function(e){return this.update(e,this.propertyAssignments,this.closeBraceToken)},n.prototype.withPropertyAssignments=function(e){return this.update(this.openBraceToken,e,this.closeBraceToken)},n.prototype.withPropertyAssignment=function(t){return this.withPropertyAssignments(e.Syntax.separatedList([t]))},n.prototype.withCloseBraceToken=function(e){return this.update(this.openBraceToken,this.propertyAssignments,e)},n.prototype.isTypeScriptSpecific=function(){return this.propertyAssignments.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.ObjectLiteralExpressionSyntax=vt;var St=function(t){function n(e,n,r,i){t.call(this,i),this.propertyName=e,this.colonToken=n,this.expression=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitSimplePropertyAssignment(this)},n.prototype.kind=function(){return 240},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.propertyName;case 1:return this.colonToken;case 2:return this.expression;default:throw e.Errors.invalidOperation()}},n.prototype.isPropertyAssignment=function(){return!0},n.prototype.update=function(e,t,r){return this.propertyName===e&&this.colonToken===t&&this.expression===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create1=function(t,r){return new n(t,e.Syntax.token(106),r,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withPropertyName=function(e){return this.update(e,this.colonToken,this.expression)},n.prototype.withColonToken=function(e){return this.update(this.propertyName,e,this.expression)},n.prototype.withExpression=function(e){return this.update(this.propertyName,this.colonToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.SimplePropertyAssignmentSyntax=St;var Tt=function(t){function n(e,n,r,i){t.call(this,i),this.propertyName=e,this.callSignature=n,this.block=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitFunctionPropertyAssignment(this)},n.prototype.kind=function(){return 241},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.propertyName;case 1:return this.callSignature;case 2:return this.block;default:throw e.Errors.invalidOperation()}},n.prototype.isPropertyAssignment=function(){return!0},n.prototype.update=function(e,t,r){return this.propertyName===e&&this.callSignature===t&&this.block===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create1=function(e){return new n(e,U.create1(),I.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withPropertyName=function(e){return this.update(e,this.callSignature,this.block)},n.prototype.withCallSignature=function(e){return this.update(this.propertyName,e,this.block)},n.prototype.withBlock=function(e){return this.update(this.propertyName,this.callSignature,e)},n.prototype.isTypeScriptSpecific=function(){return this.callSignature.isTypeScriptSpecific()?!0:this.block.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.FunctionPropertyAssignmentSyntax=Tt;var bt=function(t){function n(e,n,r,i,o){t.call(this,o),this.functionKeyword=e,this.identifier=n,this.callSignature=r,this.block=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitFunctionExpression(this)},n.prototype.kind=function(){return 222},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.functionKeyword;case 1:return this.identifier;case 2:return this.callSignature;case 3:return this.block;default:throw e.Errors.invalidOperation()}},n.prototype.isPrimaryExpression=function(){return!0},n.prototype.isMemberExpression=function(){return!0},n.prototype.isPostfixExpression=function(){return!0},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t,r,i){return this.functionKeyword===e&&this.identifier===t&&this.callSignature===r&&this.block===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create=function(e,t,r){return new n(e,null,t,r,!1)},n.create1=function(){return new n(e.Syntax.token(27),null,U.create1(),I.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withFunctionKeyword=function(e){return this.update(e,this.identifier,this.callSignature,this.block)},n.prototype.withIdentifier=function(e){return this.update(this.functionKeyword,e,this.callSignature,this.block)},n.prototype.withCallSignature=function(e){return this.update(this.functionKeyword,this.identifier,e,this.block)},n.prototype.withBlock=function(e){return this.update(this.functionKeyword,this.identifier,this.callSignature,e)},n.prototype.isTypeScriptSpecific=function(){return this.callSignature.isTypeScriptSpecific()?!0:this.block.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.FunctionExpressionSyntax=bt;var _t=function(t){function n(e,n){t.call(this,n),this.semicolonToken=e}return __extends(n,t),n.prototype.accept=function(e){return e.visitEmptyStatement(this)},n.prototype.kind=function(){return 156},n.prototype.childCount=function(){return 1},n.prototype.childAt=function(t){switch(t){case 0:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e){return this.semicolonToken===e?this:new n(e,this.parsedInStrictMode())},n.create1=function(){return new n(e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withSemicolonToken=function(e){return this.update(e)},n.prototype.isTypeScriptSpecific=function(){return!1},n}(e.SyntaxNode);e.EmptyStatementSyntax=_t;var Et=function(t){function n(e,n,r,i,o){t.call(this,o),this.tryKeyword=e,this.block=n,this.catchClause=r,this.finallyClause=i}return __extends(n,t),n.prototype.accept=function(e){return e.visitTryStatement(this)},n.prototype.kind=function(){return 159},n.prototype.childCount=function(){return 4},n.prototype.childAt=function(t){switch(t){case 0:return this.tryKeyword;case 1:return this.block;case 2:return this.catchClause;case 3:return this.finallyClause;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i){return this.tryKeyword===e&&this.block===t&&this.catchClause===r&&this.finallyClause===i?this:new n(e,t,r,i,this.parsedInStrictMode())},n.create=function(e,t){return new n(e,t,null,null,!1)},n.create1=function(){return new n(e.Syntax.token(38),I.create1(),null,null,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withTryKeyword=function(e){return this.update(e,this.block,this.catchClause,this.finallyClause)},n.prototype.withBlock=function(e){return this.update(this.tryKeyword,e,this.catchClause,this.finallyClause)},n.prototype.withCatchClause=function(e){return this.update(this.tryKeyword,this.block,e,this.finallyClause)},n.prototype.withFinallyClause=function(e){return this.update(this.tryKeyword,this.block,this.catchClause,e)},n.prototype.isTypeScriptSpecific=function(){return this.block.isTypeScriptSpecific()?!0:null!==this.catchClause&&this.catchClause.isTypeScriptSpecific()?!0:null!==this.finallyClause&&this.finallyClause.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.TryStatementSyntax=Et;var Ct=function(t){function n(e,n,r,i,o,a,s){t.call(this,s),this.catchKeyword=e,this.openParenToken=n,this.identifier=r,this.typeAnnotation=i,this.closeParenToken=o,this.block=a}return __extends(n,t),n.prototype.accept=function(e){return e.visitCatchClause(this)},n.prototype.kind=function(){return 236},n.prototype.childCount=function(){return 6},n.prototype.childAt=function(t){switch(t){case 0:return this.catchKeyword;case 1:return this.openParenToken;case 2:return this.identifier;case 3:return this.typeAnnotation;case 4:return this.closeParenToken;case 5:return this.block;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t,r,i,o,a){return this.catchKeyword===e&&this.openParenToken===t&&this.identifier===r&&this.typeAnnotation===i&&this.closeParenToken===o&&this.block===a?this:new n(e,t,r,i,o,a,this.parsedInStrictMode())},n.create=function(e,t,r,i,o){return new n(e,t,r,null,i,o,!1)},n.create1=function(t){return new n(e.Syntax.token(17),e.Syntax.token(72),t,null,e.Syntax.token(73),I.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withCatchKeyword=function(e){return this.update(e,this.openParenToken,this.identifier,this.typeAnnotation,this.closeParenToken,this.block)},n.prototype.withOpenParenToken=function(e){return this.update(this.catchKeyword,e,this.identifier,this.typeAnnotation,this.closeParenToken,this.block)},n.prototype.withIdentifier=function(e){return this.update(this.catchKeyword,this.openParenToken,e,this.typeAnnotation,this.closeParenToken,this.block)},n.prototype.withTypeAnnotation=function(e){return this.update(this.catchKeyword,this.openParenToken,this.identifier,e,this.closeParenToken,this.block)},n.prototype.withCloseParenToken=function(e){return this.update(this.catchKeyword,this.openParenToken,this.identifier,this.typeAnnotation,e,this.block)},n.prototype.withBlock=function(e){return this.update(this.catchKeyword,this.openParenToken,this.identifier,this.typeAnnotation,this.closeParenToken,e)},n.prototype.isTypeScriptSpecific=function(){return null!==this.typeAnnotation&&this.typeAnnotation.isTypeScriptSpecific()?!0:this.block.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.CatchClauseSyntax=Ct;var xt=function(t){function n(e,n,r){t.call(this,r),this.finallyKeyword=e,this.block=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitFinallyClause(this)},n.prototype.kind=function(){return 237},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.finallyKeyword;case 1:return this.block;default:throw e.Errors.invalidOperation()}},n.prototype.update=function(e,t){return this.finallyKeyword===e&&this.block===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(){return new n(e.Syntax.token(25),I.create1(),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withFinallyKeyword=function(e){return this.update(e,this.block)},n.prototype.withBlock=function(e){return this.update(this.finallyKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return this.block.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.FinallyClauseSyntax=xt;var kt=function(t){function n(e,n,r,i){t.call(this,i),this.identifier=e,this.colonToken=n,this.statement=r}return __extends(n,t),n.prototype.accept=function(e){return e.visitLabeledStatement(this)},n.prototype.kind=function(){return 160},n.prototype.childCount=function(){return 3},n.prototype.childAt=function(t){switch(t){case 0:return this.identifier;case 1:return this.colonToken;case 2:return this.statement;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r){return this.identifier===e&&this.colonToken===t&&this.statement===r?this:new n(e,t,r,this.parsedInStrictMode())},n.create1=function(t,r){return new n(t,e.Syntax.token(106),r,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withIdentifier=function(e){return this.update(e,this.colonToken,this.statement)},n.prototype.withColonToken=function(e){return this.update(this.identifier,e,this.statement)},n.prototype.withStatement=function(e){return this.update(this.identifier,this.colonToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.statement.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.LabeledStatementSyntax=kt;var wt=function(t){function n(e,n,r,i,o,a,s,l){t.call(this,l),this.doKeyword=e,this.statement=n,this.whileKeyword=r,this.openParenToken=i,this.condition=o,this.closeParenToken=a,this.semicolonToken=s}return __extends(n,t),n.prototype.accept=function(e){return e.visitDoStatement(this)},n.prototype.kind=function(){return 161},n.prototype.childCount=function(){return 7},n.prototype.childAt=function(t){switch(t){case 0:return this.doKeyword;case 1:return this.statement;case 2:return this.whileKeyword;case 3:return this.openParenToken;case 4:return this.condition;case 5:return this.closeParenToken;case 6:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isIterationStatement=function(){return!0},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t,r,i,o,a,s){return this.doKeyword===e&&this.statement===t&&this.whileKeyword===r&&this.openParenToken===i&&this.condition===o&&this.closeParenToken===a&&this.semicolonToken===s?this:new n(e,t,r,i,o,a,s,this.parsedInStrictMode())},n.create1=function(t,r){return new n(e.Syntax.token(22),t,e.Syntax.token(42),e.Syntax.token(72),r,e.Syntax.token(73),e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withDoKeyword=function(e){return this.update(e,this.statement,this.whileKeyword,this.openParenToken,this.condition,this.closeParenToken,this.semicolonToken)},n.prototype.withStatement=function(e){return this.update(this.doKeyword,e,this.whileKeyword,this.openParenToken,this.condition,this.closeParenToken,this.semicolonToken)},n.prototype.withWhileKeyword=function(e){return this.update(this.doKeyword,this.statement,e,this.openParenToken,this.condition,this.closeParenToken,this.semicolonToken)},n.prototype.withOpenParenToken=function(e){return this.update(this.doKeyword,this.statement,this.whileKeyword,e,this.condition,this.closeParenToken,this.semicolonToken)},n.prototype.withCondition=function(e){return this.update(this.doKeyword,this.statement,this.whileKeyword,this.openParenToken,e,this.closeParenToken,this.semicolonToken)},n.prototype.withCloseParenToken=function(e){return this.update(this.doKeyword,this.statement,this.whileKeyword,this.openParenToken,this.condition,e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.doKeyword,this.statement,this.whileKeyword,this.openParenToken,this.condition,this.closeParenToken,e)},n.prototype.isTypeScriptSpecific=function(){return this.statement.isTypeScriptSpecific()?!0:this.condition.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.DoStatementSyntax=wt;var At=function(t){function n(e,n,r){t.call(this,r),this.typeOfKeyword=e,this.expression=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitTypeOfExpression(this)},n.prototype.kind=function(){return 171},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.typeOfKeyword;case 1:return this.expression;default:throw e.Errors.invalidOperation()}},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t){return this.typeOfKeyword===e&&this.expression===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(39),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withTypeOfKeyword=function(e){return this.update(e,this.expression)},n.prototype.withExpression=function(e){return this.update(this.typeOfKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.TypeOfExpressionSyntax=At;var Dt=function(t){function n(e,n,r){t.call(this,r),this.deleteKeyword=e,this.expression=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitDeleteExpression(this)},n.prototype.kind=function(){return 170},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.deleteKeyword;case 1:return this.expression;default:throw e.Errors.invalidOperation()}},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t){return this.deleteKeyword===e&&this.expression===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(21),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withDeleteKeyword=function(e){return this.update(e,this.expression)},n.prototype.withExpression=function(e){return this.update(this.deleteKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.DeleteExpressionSyntax=Dt;var It=function(t){function n(e,n,r){t.call(this,r),this.voidKeyword=e,this.expression=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitVoidExpression(this)},n.prototype.kind=function(){return 172},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.voidKeyword;case 1:return this.expression;default:throw e.Errors.invalidOperation()}},n.prototype.isUnaryExpression=function(){return!0},n.prototype.isExpression=function(){return!0},n.prototype.update=function(e,t){return this.voidKeyword===e&&this.expression===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(t){return new n(e.Syntax.token(41),t,!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withVoidKeyword=function(e){return this.update(e,this.expression)},n.prototype.withExpression=function(e){return this.update(this.voidKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return this.expression.isTypeScriptSpecific()?!0:!1},n}(e.SyntaxNode);e.VoidExpressionSyntax=It;var Lt=function(t){function n(e,n,r){t.call(this,r),this.debuggerKeyword=e,this.semicolonToken=n}return __extends(n,t),n.prototype.accept=function(e){return e.visitDebuggerStatement(this)},n.prototype.kind=function(){return 162},n.prototype.childCount=function(){return 2},n.prototype.childAt=function(t){switch(t){case 0:return this.debuggerKeyword;case 1:return this.semicolonToken;default:throw e.Errors.invalidOperation()}},n.prototype.isStatement=function(){return!0},n.prototype.isModuleElement=function(){return!0},n.prototype.update=function(e,t){return this.debuggerKeyword===e&&this.semicolonToken===t?this:new n(e,t,this.parsedInStrictMode())},n.create1=function(){return new n(e.Syntax.token(19),e.Syntax.token(78),!1)},n.prototype.withLeadingTrivia=function(e){return t.prototype.withLeadingTrivia.call(this,e)},n.prototype.withTrailingTrivia=function(e){return t.prototype.withTrailingTrivia.call(this,e)},n.prototype.withDebuggerKeyword=function(e){return this.update(e,this.semicolonToken)},n.prototype.withSemicolonToken=function(e){return this.update(this.debuggerKeyword,e)},n.prototype.isTypeScriptSpecific=function(){return!1},n}(e.SyntaxNode);e.DebuggerStatementSyntax=Lt}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(){}return t.prototype.visitToken=function(e){return e},t.prototype.visitNode=function(e){return e.accept(this)},t.prototype.visitNodeOrToken=function(e){return e.isToken()?this.visitToken(e):this.visitNode(e)},t.prototype.visitList=function(t){for(var n=null,r=0,i=t.childCount();i>r;r++){var o=t.childAt(r),a=this.visitNodeOrToken(o);if(o!==a&&null===n){n=[];for(var s=0;r>s;s++)n.push(t.childAt(s))}n&&n.push(a)}return null===n?t:e.Syntax.list(n)},t.prototype.visitSeparatedList=function(t){for(var n=null,r=0,i=t.childCount();i>r;r++){var o=t.childAt(r),a=o.isToken()?this.visitToken(o):this.visitNode(o);if(o!==a&&null===n){n=[];for(var s=0;r>s;s++)n.push(t.childAt(s))}n&&n.push(a)}return null===n?t:e.Syntax.separatedList(n)},t.prototype.visitSourceUnit=function(e){return e.update(this.visitList(e.moduleElements),this.visitToken(e.endOfFileToken))},t.prototype.visitExternalModuleReference=function(e){return e.update(this.visitToken(e.requireKeyword),this.visitToken(e.openParenToken),this.visitToken(e.stringLiteral),this.visitToken(e.closeParenToken))},t.prototype.visitModuleNameModuleReference=function(e){return e.update(this.visitNodeOrToken(e.moduleName))},t.prototype.visitImportDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.importKeyword),this.visitToken(e.identifier),this.visitToken(e.equalsToken),this.visitNodeOrToken(e.moduleReference),this.visitToken(e.semicolonToken))},t.prototype.visitExportAssignment=function(e){return e.update(this.visitToken(e.exportKeyword),this.visitToken(e.equalsToken),this.visitToken(e.identifier),this.visitToken(e.semicolonToken))},t.prototype.visitClassDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.classKeyword),this.visitToken(e.identifier),null===e.typeParameterList?null:this.visitNode(e.typeParameterList),this.visitList(e.heritageClauses),this.visitToken(e.openBraceToken),this.visitList(e.classElements),this.visitToken(e.closeBraceToken))},t.prototype.visitInterfaceDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.interfaceKeyword),this.visitToken(e.identifier),null===e.typeParameterList?null:this.visitNode(e.typeParameterList),this.visitList(e.heritageClauses),this.visitNode(e.body))},t.prototype.visitHeritageClause=function(e){return e.update(e.kind(),this.visitToken(e.extendsOrImplementsKeyword),this.visitSeparatedList(e.typeNames))},t.prototype.visitModuleDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.moduleKeyword),null===e.name?null:this.visitNodeOrToken(e.name),null===e.stringLiteral?null:this.visitToken(e.stringLiteral),this.visitToken(e.openBraceToken),this.visitList(e.moduleElements),this.visitToken(e.closeBraceToken))},t.prototype.visitFunctionDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.functionKeyword),this.visitToken(e.identifier),this.visitNode(e.callSignature),null===e.block?null:this.visitNode(e.block),null===e.semicolonToken?null:this.visitToken(e.semicolonToken))},t.prototype.visitVariableStatement=function(e){return e.update(this.visitList(e.modifiers),this.visitNode(e.variableDeclaration),this.visitToken(e.semicolonToken))},t.prototype.visitVariableDeclaration=function(e){return e.update(this.visitToken(e.varKeyword),this.visitSeparatedList(e.variableDeclarators))},t.prototype.visitVariableDeclarator=function(e){return e.update(this.visitToken(e.propertyName),null===e.typeAnnotation?null:this.visitNode(e.typeAnnotation),null===e.equalsValueClause?null:this.visitNode(e.equalsValueClause))},t.prototype.visitEqualsValueClause=function(e){return e.update(this.visitToken(e.equalsToken),this.visitNodeOrToken(e.value))},t.prototype.visitPrefixUnaryExpression=function(e){return e.update(e.kind(),this.visitToken(e.operatorToken),this.visitNodeOrToken(e.operand))},t.prototype.visitArrayLiteralExpression=function(e){return e.update(this.visitToken(e.openBracketToken),this.visitSeparatedList(e.expressions),this.visitToken(e.closeBracketToken))},t.prototype.visitOmittedExpression=function(e){return e},t.prototype.visitParenthesizedExpression=function(e){return e.update(this.visitToken(e.openParenToken),this.visitNodeOrToken(e.expression),this.visitToken(e.closeParenToken))},t.prototype.visitSimpleArrowFunctionExpression=function(e){return e.update(this.visitToken(e.identifier),this.visitToken(e.equalsGreaterThanToken),null===e.block?null:this.visitNode(e.block),null===e.expression?null:this.visitNodeOrToken(e.expression))},t.prototype.visitParenthesizedArrowFunctionExpression=function(e){return e.update(this.visitNode(e.callSignature),this.visitToken(e.equalsGreaterThanToken),null===e.block?null:this.visitNode(e.block),null===e.expression?null:this.visitNodeOrToken(e.expression))},t.prototype.visitQualifiedName=function(e){return e.update(this.visitNodeOrToken(e.left),this.visitToken(e.dotToken),this.visitToken(e.right))},t.prototype.visitTypeArgumentList=function(e){return e.update(this.visitToken(e.lessThanToken),this.visitSeparatedList(e.typeArguments),this.visitToken(e.greaterThanToken))},t.prototype.visitConstructorType=function(e){return e.update(this.visitToken(e.newKeyword),null===e.typeParameterList?null:this.visitNode(e.typeParameterList),this.visitNode(e.parameterList),this.visitToken(e.equalsGreaterThanToken),this.visitNodeOrToken(e.type))},t.prototype.visitFunctionType=function(e){return e.update(null===e.typeParameterList?null:this.visitNode(e.typeParameterList),this.visitNode(e.parameterList),this.visitToken(e.equalsGreaterThanToken),this.visitNodeOrToken(e.type))},t.prototype.visitObjectType=function(e){return e.update(this.visitToken(e.openBraceToken),this.visitSeparatedList(e.typeMembers),this.visitToken(e.closeBraceToken))},t.prototype.visitArrayType=function(e){return e.update(this.visitNodeOrToken(e.type),this.visitToken(e.openBracketToken),this.visitToken(e.closeBracketToken))},t.prototype.visitGenericType=function(e){return e.update(this.visitNodeOrToken(e.name),this.visitNode(e.typeArgumentList))},t.prototype.visitTypeQuery=function(e){return e.update(this.visitToken(e.typeOfKeyword),this.visitNodeOrToken(e.name))},t.prototype.visitTypeAnnotation=function(e){return e.update(this.visitToken(e.colonToken),this.visitNodeOrToken(e.type))},t.prototype.visitBlock=function(e){return e.update(this.visitToken(e.openBraceToken),this.visitList(e.statements),this.visitToken(e.closeBraceToken))},t.prototype.visitParameter=function(e){return e.update(null===e.dotDotDotToken?null:this.visitToken(e.dotDotDotToken),this.visitList(e.modifiers),this.visitToken(e.identifier),null===e.questionToken?null:this.visitToken(e.questionToken),null===e.typeAnnotation?null:this.visitNode(e.typeAnnotation),null===e.equalsValueClause?null:this.visitNode(e.equalsValueClause))},t.prototype.visitMemberAccessExpression=function(e){return e.update(this.visitNodeOrToken(e.expression),this.visitToken(e.dotToken),this.visitToken(e.name))},t.prototype.visitPostfixUnaryExpression=function(e){return e.update(e.kind(),this.visitNodeOrToken(e.operand),this.visitToken(e.operatorToken))},t.prototype.visitElementAccessExpression=function(e){return e.update(this.visitNodeOrToken(e.expression),this.visitToken(e.openBracketToken),this.visitNodeOrToken(e.argumentExpression),this.visitToken(e.closeBracketToken))},t.prototype.visitInvocationExpression=function(e){return e.update(this.visitNodeOrToken(e.expression),this.visitNode(e.argumentList))},t.prototype.visitArgumentList=function(e){return e.update(null===e.typeArgumentList?null:this.visitNode(e.typeArgumentList),this.visitToken(e.openParenToken),this.visitSeparatedList(e.arguments),this.visitToken(e.closeParenToken))},t.prototype.visitBinaryExpression=function(e){return e.update(e.kind(),this.visitNodeOrToken(e.left),this.visitToken(e.operatorToken),this.visitNodeOrToken(e.right))},t.prototype.visitConditionalExpression=function(e){return e.update(this.visitNodeOrToken(e.condition),this.visitToken(e.questionToken),this.visitNodeOrToken(e.whenTrue),this.visitToken(e.colonToken),this.visitNodeOrToken(e.whenFalse))},t.prototype.visitConstructSignature=function(e){return e.update(this.visitToken(e.newKeyword),this.visitNode(e.callSignature))},t.prototype.visitMethodSignature=function(e){return e.update(this.visitToken(e.propertyName),null===e.questionToken?null:this.visitToken(e.questionToken),this.visitNode(e.callSignature))},t.prototype.visitIndexSignature=function(e){return e.update(this.visitToken(e.openBracketToken),this.visitNode(e.parameter),this.visitToken(e.closeBracketToken),null===e.typeAnnotation?null:this.visitNode(e.typeAnnotation))},t.prototype.visitPropertySignature=function(e){return e.update(this.visitToken(e.propertyName),null===e.questionToken?null:this.visitToken(e.questionToken),null===e.typeAnnotation?null:this.visitNode(e.typeAnnotation)) },t.prototype.visitCallSignature=function(e){return e.update(null===e.typeParameterList?null:this.visitNode(e.typeParameterList),this.visitNode(e.parameterList),null===e.typeAnnotation?null:this.visitNode(e.typeAnnotation))},t.prototype.visitParameterList=function(e){return e.update(this.visitToken(e.openParenToken),this.visitSeparatedList(e.parameters),this.visitToken(e.closeParenToken))},t.prototype.visitTypeParameterList=function(e){return e.update(this.visitToken(e.lessThanToken),this.visitSeparatedList(e.typeParameters),this.visitToken(e.greaterThanToken))},t.prototype.visitTypeParameter=function(e){return e.update(this.visitToken(e.identifier),null===e.constraint?null:this.visitNode(e.constraint))},t.prototype.visitConstraint=function(e){return e.update(this.visitToken(e.extendsKeyword),this.visitNodeOrToken(e.type))},t.prototype.visitElseClause=function(e){return e.update(this.visitToken(e.elseKeyword),this.visitNodeOrToken(e.statement))},t.prototype.visitIfStatement=function(e){return e.update(this.visitToken(e.ifKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.condition),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement),null===e.elseClause?null:this.visitNode(e.elseClause))},t.prototype.visitExpressionStatement=function(e){return e.update(this.visitNodeOrToken(e.expression),this.visitToken(e.semicolonToken))},t.prototype.visitConstructorDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.constructorKeyword),this.visitNode(e.parameterList),null===e.block?null:this.visitNode(e.block),null===e.semicolonToken?null:this.visitToken(e.semicolonToken))},t.prototype.visitMemberFunctionDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.propertyName),this.visitNode(e.callSignature),null===e.block?null:this.visitNode(e.block),null===e.semicolonToken?null:this.visitToken(e.semicolonToken))},t.prototype.visitGetAccessor=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.getKeyword),this.visitToken(e.propertyName),this.visitNode(e.parameterList),null===e.typeAnnotation?null:this.visitNode(e.typeAnnotation),this.visitNode(e.block))},t.prototype.visitSetAccessor=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.setKeyword),this.visitToken(e.propertyName),this.visitNode(e.parameterList),this.visitNode(e.block))},t.prototype.visitMemberVariableDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitNode(e.variableDeclarator),this.visitToken(e.semicolonToken))},t.prototype.visitIndexMemberDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitNode(e.indexSignature),this.visitToken(e.semicolonToken))},t.prototype.visitThrowStatement=function(e){return e.update(this.visitToken(e.throwKeyword),this.visitNodeOrToken(e.expression),this.visitToken(e.semicolonToken))},t.prototype.visitReturnStatement=function(e){return e.update(this.visitToken(e.returnKeyword),null===e.expression?null:this.visitNodeOrToken(e.expression),this.visitToken(e.semicolonToken))},t.prototype.visitObjectCreationExpression=function(e){return e.update(this.visitToken(e.newKeyword),this.visitNodeOrToken(e.expression),null===e.argumentList?null:this.visitNode(e.argumentList))},t.prototype.visitSwitchStatement=function(e){return e.update(this.visitToken(e.switchKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.expression),this.visitToken(e.closeParenToken),this.visitToken(e.openBraceToken),this.visitList(e.switchClauses),this.visitToken(e.closeBraceToken))},t.prototype.visitCaseSwitchClause=function(e){return e.update(this.visitToken(e.caseKeyword),this.visitNodeOrToken(e.expression),this.visitToken(e.colonToken),this.visitList(e.statements))},t.prototype.visitDefaultSwitchClause=function(e){return e.update(this.visitToken(e.defaultKeyword),this.visitToken(e.colonToken),this.visitList(e.statements))},t.prototype.visitBreakStatement=function(e){return e.update(this.visitToken(e.breakKeyword),null===e.identifier?null:this.visitToken(e.identifier),this.visitToken(e.semicolonToken))},t.prototype.visitContinueStatement=function(e){return e.update(this.visitToken(e.continueKeyword),null===e.identifier?null:this.visitToken(e.identifier),this.visitToken(e.semicolonToken))},t.prototype.visitForStatement=function(e){return e.update(this.visitToken(e.forKeyword),this.visitToken(e.openParenToken),null===e.variableDeclaration?null:this.visitNode(e.variableDeclaration),null===e.initializer?null:this.visitNodeOrToken(e.initializer),this.visitToken(e.firstSemicolonToken),null===e.condition?null:this.visitNodeOrToken(e.condition),this.visitToken(e.secondSemicolonToken),null===e.incrementor?null:this.visitNodeOrToken(e.incrementor),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement))},t.prototype.visitForInStatement=function(e){return e.update(this.visitToken(e.forKeyword),this.visitToken(e.openParenToken),null===e.variableDeclaration?null:this.visitNode(e.variableDeclaration),null===e.left?null:this.visitNodeOrToken(e.left),this.visitToken(e.inKeyword),this.visitNodeOrToken(e.expression),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement))},t.prototype.visitWhileStatement=function(e){return e.update(this.visitToken(e.whileKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.condition),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement))},t.prototype.visitWithStatement=function(e){return e.update(this.visitToken(e.withKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.condition),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement))},t.prototype.visitEnumDeclaration=function(e){return e.update(this.visitList(e.modifiers),this.visitToken(e.enumKeyword),this.visitToken(e.identifier),this.visitToken(e.openBraceToken),this.visitSeparatedList(e.enumElements),this.visitToken(e.closeBraceToken))},t.prototype.visitEnumElement=function(e){return e.update(this.visitToken(e.propertyName),null===e.equalsValueClause?null:this.visitNode(e.equalsValueClause))},t.prototype.visitCastExpression=function(e){return e.update(this.visitToken(e.lessThanToken),this.visitNodeOrToken(e.type),this.visitToken(e.greaterThanToken),this.visitNodeOrToken(e.expression))},t.prototype.visitObjectLiteralExpression=function(e){return e.update(this.visitToken(e.openBraceToken),this.visitSeparatedList(e.propertyAssignments),this.visitToken(e.closeBraceToken))},t.prototype.visitSimplePropertyAssignment=function(e){return e.update(this.visitToken(e.propertyName),this.visitToken(e.colonToken),this.visitNodeOrToken(e.expression))},t.prototype.visitFunctionPropertyAssignment=function(e){return e.update(this.visitToken(e.propertyName),this.visitNode(e.callSignature),this.visitNode(e.block))},t.prototype.visitFunctionExpression=function(e){return e.update(this.visitToken(e.functionKeyword),null===e.identifier?null:this.visitToken(e.identifier),this.visitNode(e.callSignature),this.visitNode(e.block))},t.prototype.visitEmptyStatement=function(e){return e.update(this.visitToken(e.semicolonToken))},t.prototype.visitTryStatement=function(e){return e.update(this.visitToken(e.tryKeyword),this.visitNode(e.block),null===e.catchClause?null:this.visitNode(e.catchClause),null===e.finallyClause?null:this.visitNode(e.finallyClause))},t.prototype.visitCatchClause=function(e){return e.update(this.visitToken(e.catchKeyword),this.visitToken(e.openParenToken),this.visitToken(e.identifier),null===e.typeAnnotation?null:this.visitNode(e.typeAnnotation),this.visitToken(e.closeParenToken),this.visitNode(e.block))},t.prototype.visitFinallyClause=function(e){return e.update(this.visitToken(e.finallyKeyword),this.visitNode(e.block))},t.prototype.visitLabeledStatement=function(e){return e.update(this.visitToken(e.identifier),this.visitToken(e.colonToken),this.visitNodeOrToken(e.statement))},t.prototype.visitDoStatement=function(e){return e.update(this.visitToken(e.doKeyword),this.visitNodeOrToken(e.statement),this.visitToken(e.whileKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.condition),this.visitToken(e.closeParenToken),this.visitToken(e.semicolonToken))},t.prototype.visitTypeOfExpression=function(e){return e.update(this.visitToken(e.typeOfKeyword),this.visitNodeOrToken(e.expression))},t.prototype.visitDeleteExpression=function(e){return e.update(this.visitToken(e.deleteKeyword),this.visitNodeOrToken(e.expression))},t.prototype.visitVoidExpression=function(e){return e.update(this.visitToken(e.voidKeyword),this.visitNodeOrToken(e.expression))},t.prototype.visitDebuggerStatement=function(e){return e.update(this.visitToken(e.debuggerKeyword),this.visitToken(e.semicolonToken))},t}();e.SyntaxRewriter=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(t){function n(e,n,r,i){t.call(this),this.dedentationAmount=n,this.minimumIndent=r,this.options=i,this.lastTriviaWasNewLine=e}return __extends(n,t),n.prototype.abort=function(){this.lastTriviaWasNewLine=!1,this.dedentationAmount=0},n.prototype.isAborted=function(){return 0===this.dedentationAmount},n.prototype.visitToken=function(e){if(0===e.width())return e;var t=e;return this.lastTriviaWasNewLine&&(t=e.withLeadingTrivia(this.dedentTriviaList(e.leadingTrivia()))),this.isAborted()?e:(this.lastTriviaWasNewLine=e.hasTrailingNewLine(),t)},n.prototype.dedentTriviaList=function(t){for(var n=[],r=!0,i=0,o=t.count();o>i&&!this.isAborted();i++){var a=t.syntaxTriviaAt(i),s=r;if(r=!1,s){if(4===a.kind()){var l=i=0);var a=e.Indentation.indentationString(o,this.options);return a+t.substring(r)},n.prototype.dedentWhitespace=function(t,n){var r=this.dedentSegment(t.fullText(),n);return e.Syntax.whitespace(r)},n.prototype.dedentMultiLineComment=function(t){var n=e.Syntax.splitMultiLineCommentTriviaIntoMultipleLines(t);if(1===n.length)return t;for(var r=1;ri;i++){var a=t.syntaxTriviaAt(i),s=r;switch(r=!1,a.kind()){case 6:this.indentMultiLineComment(a,s,n);continue;case 7:case 8:this.indentSingleLineOrSkippedText(a,s,n);continue;case 4:this.indentWhitespace(a,s,n);continue;case 5:n.push(a),r=!0;continue;default:throw e.Errors.invalidOperation()}}return r&&n.push(this.indentationTrivia),e.Syntax.triviaList(n)},n.prototype.indentSegment=function(t){var n=e.Indentation.firstNonWhitespacePosition(t);if(n>>2}function a(e){return 0!==(2&e)}function s(e){return 0!==(1&e)}var l=function(){function t(e,t,n,r){this._sourceText=e,this._fullStart=t,this.tokenKind=n,this._textOrWidth=r}return t.prototype.clone=function(){return new t(this._sourceText,this._fullStart,this.tokenKind,this._textOrWidth)},t.prototype.isNode=function(){return!1},t.prototype.isToken=function(){return!0},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){return this.tokenKind},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.fullWidth=function(){return this.width()},t.prototype.start=function(){return this._fullStart},t.prototype.end=function(){return this.start()+this.width()},t.prototype.width=function(){return"number"==typeof this._textOrWidth?this._textOrWidth:this._textOrWidth.length},t.prototype.text=function(){return"number"==typeof this._textOrWidth&&(this._textOrWidth=this._sourceText.substr(this.start(),this._textOrWidth,11===this.tokenKind)),this._textOrWidth},t.prototype.fullText=function(){return this._sourceText.substr(this._fullStart,this.fullWidth(),!1)},t.prototype.value=function(){return void 0===this._value&&(this._value=e.Syntax.value(this)),this._value},t.prototype.valueText=function(){return void 0===this._valueText&&(this._valueText=e.Syntax.valueText(this)),this._valueText},t.prototype.hasLeadingTrivia=function(){return!1},t.prototype.hasLeadingComment=function(){return!1},t.prototype.hasLeadingNewLine=function(){return!1},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return 0},t.prototype.leadingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.hasTrailingTrivia=function(){return!1},t.prototype.hasTrailingComment=function(){return!1},t.prototype.hasTrailingNewLine=function(){return!1},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.trailingTriviaWidth=function(){return 0},t.prototype.trailingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.hasSkippedToken=function(){return!1},t.prototype.toJSON=function(){return e.Syntax.tokenToJSON(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0===this.fullWidth()||e.SyntaxFacts.isAnyDivideOrRegularExpressionToken(this.tokenKind)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.realize=function(){return e.Syntax.realizeToken(this)},t.prototype.collectTextElements=function(e){n(this,e)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return e.Syntax.isExpression(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.VariableWidthTokenWithNoTrivia=l;var c=function(){function t(e,t,n,r,i){this._sourceText=e,this._fullStart=t,this.tokenKind=n,this._leadingTriviaInfo=r,this._textOrWidth=i}return t.prototype.clone=function(){return new t(this._sourceText,this._fullStart,this.tokenKind,this._leadingTriviaInfo,this._textOrWidth)},t.prototype.isNode=function(){return!1},t.prototype.isToken=function(){return!0},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){return this.tokenKind},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.fullWidth=function(){return o(this._leadingTriviaInfo)+this.width()},t.prototype.start=function(){return this._fullStart+o(this._leadingTriviaInfo)},t.prototype.end=function(){return this.start()+this.width()},t.prototype.width=function(){return"number"==typeof this._textOrWidth?this._textOrWidth:this._textOrWidth.length},t.prototype.text=function(){return"number"==typeof this._textOrWidth&&(this._textOrWidth=this._sourceText.substr(this.start(),this._textOrWidth,11===this.tokenKind)),this._textOrWidth},t.prototype.fullText=function(){return this._sourceText.substr(this._fullStart,this.fullWidth(),!1)},t.prototype.value=function(){return void 0===this._value&&(this._value=e.Syntax.value(this)),this._value},t.prototype.valueText=function(){return void 0===this._valueText&&(this._valueText=e.Syntax.valueText(this)),this._valueText},t.prototype.hasLeadingTrivia=function(){return!0},t.prototype.hasLeadingComment=function(){return a(this._leadingTriviaInfo)},t.prototype.hasLeadingNewLine=function(){return s(this._leadingTriviaInfo)},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return o(this._leadingTriviaInfo)},t.prototype.leadingTrivia=function(){return e.Scanner.scanTrivia(this._sourceText,this._fullStart,o(this._leadingTriviaInfo),!1)},t.prototype.hasTrailingTrivia=function(){return!1},t.prototype.hasTrailingComment=function(){return!1},t.prototype.hasTrailingNewLine=function(){return!1},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.trailingTriviaWidth=function(){return 0},t.prototype.trailingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.hasSkippedToken=function(){return!1},t.prototype.toJSON=function(){return e.Syntax.tokenToJSON(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0===this.fullWidth()||e.SyntaxFacts.isAnyDivideOrRegularExpressionToken(this.tokenKind)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.realize=function(){return e.Syntax.realizeToken(this)},t.prototype.collectTextElements=function(e){n(this,e)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return e.Syntax.isExpression(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.VariableWidthTokenWithLeadingTrivia=c;var u=function(){function t(e,t,n,r,i){this._sourceText=e,this._fullStart=t,this.tokenKind=n,this._textOrWidth=r,this._trailingTriviaInfo=i}return t.prototype.clone=function(){return new t(this._sourceText,this._fullStart,this.tokenKind,this._textOrWidth,this._trailingTriviaInfo)},t.prototype.isNode=function(){return!1},t.prototype.isToken=function(){return!0},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){return this.tokenKind},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.fullWidth=function(){return this.width()+o(this._trailingTriviaInfo)},t.prototype.start=function(){return this._fullStart},t.prototype.end=function(){return this.start()+this.width()},t.prototype.width=function(){return"number"==typeof this._textOrWidth?this._textOrWidth:this._textOrWidth.length},t.prototype.text=function(){return"number"==typeof this._textOrWidth&&(this._textOrWidth=this._sourceText.substr(this.start(),this._textOrWidth,11===this.tokenKind)),this._textOrWidth},t.prototype.fullText=function(){return this._sourceText.substr(this._fullStart,this.fullWidth(),!1)},t.prototype.value=function(){return void 0===this._value&&(this._value=e.Syntax.value(this)),this._value},t.prototype.valueText=function(){return void 0===this._valueText&&(this._valueText=e.Syntax.valueText(this)),this._valueText},t.prototype.hasLeadingTrivia=function(){return!1},t.prototype.hasLeadingComment=function(){return!1},t.prototype.hasLeadingNewLine=function(){return!1},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return 0},t.prototype.leadingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.hasTrailingTrivia=function(){return!0},t.prototype.hasTrailingComment=function(){return a(this._trailingTriviaInfo)},t.prototype.hasTrailingNewLine=function(){return s(this._trailingTriviaInfo)},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.trailingTriviaWidth=function(){return o(this._trailingTriviaInfo)},t.prototype.trailingTrivia=function(){return e.Scanner.scanTrivia(this._sourceText,this.end(),o(this._trailingTriviaInfo),!0)},t.prototype.hasSkippedToken=function(){return!1},t.prototype.toJSON=function(){return e.Syntax.tokenToJSON(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0===this.fullWidth()||e.SyntaxFacts.isAnyDivideOrRegularExpressionToken(this.tokenKind)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.realize=function(){return e.Syntax.realizeToken(this)},t.prototype.collectTextElements=function(e){n(this,e)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return e.Syntax.isExpression(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.VariableWidthTokenWithTrailingTrivia=u;var p=function(){function t(e,t,n,r,i,o){this._sourceText=e,this._fullStart=t,this.tokenKind=n,this._leadingTriviaInfo=r,this._textOrWidth=i,this._trailingTriviaInfo=o}return t.prototype.clone=function(){return new t(this._sourceText,this._fullStart,this.tokenKind,this._leadingTriviaInfo,this._textOrWidth,this._trailingTriviaInfo)},t.prototype.isNode=function(){return!1},t.prototype.isToken=function(){return!0},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){return this.tokenKind},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.fullWidth=function(){return o(this._leadingTriviaInfo)+this.width()+o(this._trailingTriviaInfo)},t.prototype.start=function(){return this._fullStart+o(this._leadingTriviaInfo)},t.prototype.end=function(){return this.start()+this.width()},t.prototype.width=function(){return"number"==typeof this._textOrWidth?this._textOrWidth:this._textOrWidth.length},t.prototype.text=function(){return"number"==typeof this._textOrWidth&&(this._textOrWidth=this._sourceText.substr(this.start(),this._textOrWidth,11===this.tokenKind)),this._textOrWidth},t.prototype.fullText=function(){return this._sourceText.substr(this._fullStart,this.fullWidth(),!1)},t.prototype.value=function(){return void 0===this._value&&(this._value=e.Syntax.value(this)),this._value},t.prototype.valueText=function(){return void 0===this._valueText&&(this._valueText=e.Syntax.valueText(this)),this._valueText},t.prototype.hasLeadingTrivia=function(){return!0},t.prototype.hasLeadingComment=function(){return a(this._leadingTriviaInfo)},t.prototype.hasLeadingNewLine=function(){return s(this._leadingTriviaInfo)},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return o(this._leadingTriviaInfo)},t.prototype.leadingTrivia=function(){return e.Scanner.scanTrivia(this._sourceText,this._fullStart,o(this._leadingTriviaInfo),!1)},t.prototype.hasTrailingTrivia=function(){return!0},t.prototype.hasTrailingComment=function(){return a(this._trailingTriviaInfo)},t.prototype.hasTrailingNewLine=function(){return s(this._trailingTriviaInfo)},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.trailingTriviaWidth=function(){return o(this._trailingTriviaInfo)},t.prototype.trailingTrivia=function(){return e.Scanner.scanTrivia(this._sourceText,this.end(),o(this._trailingTriviaInfo),!0)},t.prototype.hasSkippedToken=function(){return!1},t.prototype.toJSON=function(){return e.Syntax.tokenToJSON(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0===this.fullWidth()||e.SyntaxFacts.isAnyDivideOrRegularExpressionToken(this.tokenKind)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.realize=function(){return e.Syntax.realizeToken(this)},t.prototype.collectTextElements=function(e){n(this,e)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return e.Syntax.isExpression(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.VariableWidthTokenWithLeadingAndTrailingTrivia=p;var h=function(){function t(e){this.tokenKind=e}return t.prototype.clone=function(){return new t(this.tokenKind)},t.prototype.isNode=function(){return!1},t.prototype.isToken=function(){return!0},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){return this.tokenKind},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.fullWidth=function(){return this.width()},t.prototype.width=function(){return this.text().length},t.prototype.text=function(){return e.SyntaxFacts.getText(this.tokenKind)},t.prototype.fullText=function(){return this.text()},t.prototype.value=function(){return e.Syntax.value(this)},t.prototype.valueText=function(){return e.Syntax.valueText(this)},t.prototype.hasLeadingTrivia=function(){return!1},t.prototype.hasLeadingComment=function(){return!1},t.prototype.hasLeadingNewLine=function(){return!1},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return 0},t.prototype.leadingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.hasTrailingTrivia=function(){return!1},t.prototype.hasTrailingComment=function(){return!1},t.prototype.hasTrailingNewLine=function(){return!1},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.trailingTriviaWidth=function(){return 0},t.prototype.trailingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.hasSkippedToken=function(){return!1},t.prototype.toJSON=function(){return e.Syntax.tokenToJSON(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0===this.fullWidth()||e.SyntaxFacts.isAnyDivideOrRegularExpressionToken(this.tokenKind)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.realize=function(){return e.Syntax.realizeToken(this)},t.prototype.collectTextElements=function(e){n(this,e)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return e.Syntax.isExpression(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.FixedWidthTokenWithNoTrivia=h;var d=function(){function t(e,t,n,r){this._sourceText=e,this._fullStart=t,this.tokenKind=n,this._leadingTriviaInfo=r}return t.prototype.clone=function(){return new t(this._sourceText,this._fullStart,this.tokenKind,this._leadingTriviaInfo)},t.prototype.isNode=function(){return!1},t.prototype.isToken=function(){return!0},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){return this.tokenKind},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.fullWidth=function(){return o(this._leadingTriviaInfo)+this.width()},t.prototype.start=function(){return this._fullStart+o(this._leadingTriviaInfo)},t.prototype.end=function(){return this.start()+this.width()},t.prototype.width=function(){return this.text().length},t.prototype.text=function(){return e.SyntaxFacts.getText(this.tokenKind)},t.prototype.fullText=function(){return this._sourceText.substr(this._fullStart,this.fullWidth(),!1)},t.prototype.value=function(){return e.Syntax.value(this)},t.prototype.valueText=function(){return e.Syntax.valueText(this)},t.prototype.hasLeadingTrivia=function(){return!0},t.prototype.hasLeadingComment=function(){return a(this._leadingTriviaInfo)},t.prototype.hasLeadingNewLine=function(){return s(this._leadingTriviaInfo)},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return o(this._leadingTriviaInfo)},t.prototype.leadingTrivia=function(){return e.Scanner.scanTrivia(this._sourceText,this._fullStart,o(this._leadingTriviaInfo),!1)},t.prototype.hasTrailingTrivia=function(){return!1},t.prototype.hasTrailingComment=function(){return!1},t.prototype.hasTrailingNewLine=function(){return!1},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.trailingTriviaWidth=function(){return 0},t.prototype.trailingTrivia=function(){return e.Syntax.emptyTriviaList },t.prototype.hasSkippedToken=function(){return!1},t.prototype.toJSON=function(){return e.Syntax.tokenToJSON(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0===this.fullWidth()||e.SyntaxFacts.isAnyDivideOrRegularExpressionToken(this.tokenKind)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.realize=function(){return e.Syntax.realizeToken(this)},t.prototype.collectTextElements=function(e){n(this,e)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return e.Syntax.isExpression(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.FixedWidthTokenWithLeadingTrivia=d;var m=function(){function t(e,t,n,r){this._sourceText=e,this._fullStart=t,this.tokenKind=n,this._trailingTriviaInfo=r}return t.prototype.clone=function(){return new t(this._sourceText,this._fullStart,this.tokenKind,this._trailingTriviaInfo)},t.prototype.isNode=function(){return!1},t.prototype.isToken=function(){return!0},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){return this.tokenKind},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.fullWidth=function(){return this.width()+o(this._trailingTriviaInfo)},t.prototype.start=function(){return this._fullStart},t.prototype.end=function(){return this.start()+this.width()},t.prototype.width=function(){return this.text().length},t.prototype.text=function(){return e.SyntaxFacts.getText(this.tokenKind)},t.prototype.fullText=function(){return this._sourceText.substr(this._fullStart,this.fullWidth(),!1)},t.prototype.value=function(){return e.Syntax.value(this)},t.prototype.valueText=function(){return e.Syntax.valueText(this)},t.prototype.hasLeadingTrivia=function(){return!1},t.prototype.hasLeadingComment=function(){return!1},t.prototype.hasLeadingNewLine=function(){return!1},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return 0},t.prototype.leadingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.hasTrailingTrivia=function(){return!0},t.prototype.hasTrailingComment=function(){return a(this._trailingTriviaInfo)},t.prototype.hasTrailingNewLine=function(){return s(this._trailingTriviaInfo)},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.trailingTriviaWidth=function(){return o(this._trailingTriviaInfo)},t.prototype.trailingTrivia=function(){return e.Scanner.scanTrivia(this._sourceText,this.end(),o(this._trailingTriviaInfo),!0)},t.prototype.hasSkippedToken=function(){return!1},t.prototype.toJSON=function(){return e.Syntax.tokenToJSON(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0===this.fullWidth()||e.SyntaxFacts.isAnyDivideOrRegularExpressionToken(this.tokenKind)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.realize=function(){return e.Syntax.realizeToken(this)},t.prototype.collectTextElements=function(e){n(this,e)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return e.Syntax.isExpression(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.FixedWidthTokenWithTrailingTrivia=m;var y=function(){function t(e,t,n,r,i){this._sourceText=e,this._fullStart=t,this.tokenKind=n,this._leadingTriviaInfo=r,this._trailingTriviaInfo=i}return t.prototype.clone=function(){return new t(this._sourceText,this._fullStart,this.tokenKind,this._leadingTriviaInfo,this._trailingTriviaInfo)},t.prototype.isNode=function(){return!1},t.prototype.isToken=function(){return!0},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.kind=function(){return this.tokenKind},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.fullWidth=function(){return o(this._leadingTriviaInfo)+this.width()+o(this._trailingTriviaInfo)},t.prototype.start=function(){return this._fullStart+o(this._leadingTriviaInfo)},t.prototype.end=function(){return this.start()+this.width()},t.prototype.width=function(){return this.text().length},t.prototype.text=function(){return e.SyntaxFacts.getText(this.tokenKind)},t.prototype.fullText=function(){return this._sourceText.substr(this._fullStart,this.fullWidth(),!1)},t.prototype.value=function(){return e.Syntax.value(this)},t.prototype.valueText=function(){return e.Syntax.valueText(this)},t.prototype.hasLeadingTrivia=function(){return!0},t.prototype.hasLeadingComment=function(){return a(this._leadingTriviaInfo)},t.prototype.hasLeadingNewLine=function(){return s(this._leadingTriviaInfo)},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return o(this._leadingTriviaInfo)},t.prototype.leadingTrivia=function(){return e.Scanner.scanTrivia(this._sourceText,this._fullStart,o(this._leadingTriviaInfo),!1)},t.prototype.hasTrailingTrivia=function(){return!0},t.prototype.hasTrailingComment=function(){return a(this._trailingTriviaInfo)},t.prototype.hasTrailingNewLine=function(){return s(this._trailingTriviaInfo)},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.trailingTriviaWidth=function(){return o(this._trailingTriviaInfo)},t.prototype.trailingTrivia=function(){return e.Scanner.scanTrivia(this._sourceText,this.end(),o(this._trailingTriviaInfo),!0)},t.prototype.hasSkippedToken=function(){return!1},t.prototype.toJSON=function(){return e.Syntax.tokenToJSON(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return 0===this.fullWidth()||e.SyntaxFacts.isAnyDivideOrRegularExpressionToken(this.tokenKind)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.realize=function(){return e.Syntax.realizeToken(this)},t.prototype.collectTextElements=function(e){n(this,e)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return e.Syntax.isExpression(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.FixedWidthTokenWithLeadingAndTrailingTrivia=y,t.fixedWidthToken=r,t.variableWidthToken=i}(e.Syntax||(e.Syntax={}));e.Syntax}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e){switch(e.tokenKind){case 11:case 12:case 13:case 14:case 24:case 32:case 35:case 37:case 50:return!0}return!1}function r(e){return new S(e.tokenKind,e.leadingTrivia(),e.text(),e.value(),e.valueText(),e.trailingTrivia())}function i(t){return e.Debug.assert(e.SyntaxFacts.isAnyKeyword(t.tokenKind)),new S(11,t.leadingTrivia(),t.text(),t.text(),t.text(),t.trailingTrivia())}function o(t){var n={};for(var r in e.SyntaxKind)if(e.SyntaxKind[r]===t.kind()){n.kind=r;break}n.width=t.width(),t.fullWidth()!==t.width()&&(n.fullWidth=t.fullWidth()),n.text=t.text();var i=t.value();null!==i&&(n.value=i,n.valueText=t.valueText()),t.hasLeadingTrivia()&&(n.hasLeadingTrivia=!0),t.hasLeadingComment()&&(n.hasLeadingComment=!0),t.hasLeadingNewLine()&&(n.hasLeadingNewLine=!0),t.hasLeadingSkippedText()&&(n.hasLeadingSkippedText=!0),t.hasTrailingTrivia()&&(n.hasTrailingTrivia=!0),t.hasTrailingComment()&&(n.hasTrailingComment=!0),t.hasTrailingNewLine()&&(n.hasTrailingNewLine=!0),t.hasTrailingSkippedText()&&(n.hasTrailingSkippedText=!0);var o=t.leadingTrivia();return o.count()>0&&(n.leadingTrivia=o),o=t.trailingTrivia(),o.count()>0&&(n.trailingTrivia=o),n}function a(e){return u(e.tokenKind,e.text())}function s(t,n,r){for(var i=0,o=0;r>o;o++){var a=t.charCodeAt(n+o);if(!e.CharacterInfo.isHexDigit(a))break;i=(i<<4)+e.CharacterInfo.hexValue(a)}return i}function l(e){g.length=0;for(var t="",n=0,r=e.length;r>n;n++){var i=e.charCodeAt(n);if(92===i&&(n++,r>n))switch(i=e.charCodeAt(n)){case 48:g.push(0);continue;case 98:g.push(8);continue;case 102:g.push(12);continue;case 110:g.push(10);continue;case 114:g.push(13);continue;case 116:g.push(9);continue;case 118:g.push(11);continue;case 120:g.push(s(e,n+1,2)),n+=2;continue;case 117:g.push(s(e,n+1,4)),n+=4;continue;case 13:var o=n+1;o=0?l(e):e}function u(t,n){if(11===t)return c(n);switch(t){case 37:return!0;case 24:return!1;case 32:return null}if(e.SyntaxFacts.isAnyKeyword(t)||e.SyntaxFacts.isAnyPunctuation(t))return e.SyntaxFacts.getText(t);if(13===t)return e.IntegerUtilities.isHexInteger(n)?parseInt(n,16):parseFloat(n);if(14===t)return c(n.length>1&&n.charCodeAt(n.length-1)===n.charCodeAt(0)?n.substr(1,n.length-2):n.substr(1));if(12===t)return p(n);if(10===t||9===t)return null;throw e.Errors.invalidOperation()}function p(e){try{var t=e.lastIndexOf("/"),n=e.substring(1,t),r=e.substring(t+1);return new RegExp(n,r)}catch(i){return null}}function h(e,t){var n=u(e,t);return null===n?"":n.toString()}function d(e){var t=e.value();return null===t?"":t.toString()}function m(e){return new v(e)}function y(t,n){"undefined"==typeof n&&(n=null);var r=null!==n&&void 0!==n.text?n.text:e.SyntaxFacts.getText(t);return new S(t,e.Syntax.triviaList(null===n?null:n.leadingTrivia),r,u(t,r),h(t,r),e.Syntax.triviaList(null===n?null:n.trailingTrivia))}function f(e,t){return"undefined"==typeof t&&(t=null),t=t||{},t.text=e,y(11,t)}t.isExpression=n,t.realizeToken=r,t.convertToIdentifierName=i,t.tokenToJSON=o,t.value=a;var g=[];t.massageEscapes=c,t.valueText=d;var v=function(){function t(e){this.tokenKind=e}return t.prototype.clone=function(){return new t(this.tokenKind)},t.prototype.kind=function(){return this.tokenKind},t.prototype.isToken=function(){return!0},t.prototype.isNode=function(){return!1},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.toJSON=function(){return o(this)},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return!0},t.prototype.fullWidth=function(){return 0},t.prototype.width=function(){return 0},t.prototype.text=function(){return""},t.prototype.fullText=function(){return""},t.prototype.value=function(){return null},t.prototype.valueText=function(){return""},t.prototype.hasLeadingTrivia=function(){return!1},t.prototype.hasLeadingComment=function(){return!1},t.prototype.hasLeadingNewLine=function(){return!1},t.prototype.hasLeadingSkippedText=function(){return!1},t.prototype.leadingTriviaWidth=function(){return 0},t.prototype.hasTrailingTrivia=function(){return!1},t.prototype.hasTrailingComment=function(){return!1},t.prototype.hasTrailingNewLine=function(){return!1},t.prototype.hasTrailingSkippedText=function(){return!1},t.prototype.hasSkippedToken=function(){return!1},t.prototype.trailingTriviaWidth=function(){return 0},t.prototype.leadingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.trailingTrivia=function(){return e.Syntax.emptyTriviaList},t.prototype.realize=function(){return r(this)},t.prototype.collectTextElements=function(){},t.prototype.withLeadingTrivia=function(e){return this.realize().withLeadingTrivia(e)},t.prototype.withTrailingTrivia=function(e){return this.realize().withTrailingTrivia(e)},t.prototype.isExpression=function(){return n(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.emptyToken=m;var S=function(){function t(e,t,n,r,i,o){this.tokenKind=e,this._leadingTrivia=t,this._text=n,this._value=r,this._valueText=i,this._trailingTrivia=o}return t.prototype.clone=function(){return new t(this.tokenKind,this._leadingTrivia,this._text,this._value,this._valueText,this._trailingTrivia)},t.prototype.kind=function(){return this.tokenKind},t.prototype.toJSON=function(){return o(this)},t.prototype.firstToken=function(){return this},t.prototype.lastToken=function(){return this},t.prototype.isTypeScriptSpecific=function(){return!1},t.prototype.isIncrementallyUnusable=function(){return!0},t.prototype.accept=function(e){return e.visitToken(this)},t.prototype.childCount=function(){return 0},t.prototype.childAt=function(){throw e.Errors.argumentOutOfRange("index")},t.prototype.isToken=function(){return!0},t.prototype.isNode=function(){return!1},t.prototype.isList=function(){return!1},t.prototype.isSeparatedList=function(){return!1},t.prototype.isTrivia=function(){return!1},t.prototype.isTriviaList=function(){return!1},t.prototype.fullWidth=function(){return this._leadingTrivia.fullWidth()+this.width()+this._trailingTrivia.fullWidth()},t.prototype.width=function(){return this.text().length},t.prototype.text=function(){return this._text},t.prototype.fullText=function(){return this._leadingTrivia.fullText()+this.text()+this._trailingTrivia.fullText()},t.prototype.value=function(){return this._value},t.prototype.valueText=function(){return this._valueText},t.prototype.hasLeadingTrivia=function(){return this._leadingTrivia.count()>0},t.prototype.hasLeadingComment=function(){return this._leadingTrivia.hasComment()},t.prototype.hasLeadingNewLine=function(){return this._leadingTrivia.hasNewLine()},t.prototype.hasLeadingSkippedText=function(){return this._leadingTrivia.hasSkippedToken()},t.prototype.leadingTriviaWidth=function(){return this._leadingTrivia.fullWidth()},t.prototype.hasTrailingTrivia=function(){return this._trailingTrivia.count()>0},t.prototype.hasTrailingComment=function(){return this._trailingTrivia.hasComment()},t.prototype.hasTrailingNewLine=function(){return this._trailingTrivia.hasNewLine()},t.prototype.hasTrailingSkippedText=function(){return this._trailingTrivia.hasSkippedToken()},t.prototype.trailingTriviaWidth=function(){return this._trailingTrivia.fullWidth()},t.prototype.hasSkippedToken=function(){return this.hasLeadingSkippedText()||this.hasTrailingSkippedText()},t.prototype.leadingTrivia=function(){return this._leadingTrivia},t.prototype.trailingTrivia=function(){return this._trailingTrivia},t.prototype.findTokenInternal=function(t,n,r){return new e.PositionedToken(t,this,r)},t.prototype.collectTextElements=function(e){this.leadingTrivia().collectTextElements(e),e.push(this.text()),this.trailingTrivia().collectTextElements(e)},t.prototype.withLeadingTrivia=function(e){return new t(this.tokenKind,e,this._text,this._value,this._valueText,this._trailingTrivia)},t.prototype.withTrailingTrivia=function(e){return new t(this.tokenKind,this._leadingTrivia,this._text,this._value,this._valueText,e)},t.prototype.isExpression=function(){return n(this)},t.prototype.isPrimaryExpression=function(){return this.isExpression()},t.prototype.isMemberExpression=function(){return this.isExpression()},t.prototype.isPostfixExpression=function(){return this.isExpression()},t.prototype.isUnaryExpression=function(){return this.isExpression()},t}();t.token=y,t.identifier=f}(e.Syntax||(e.Syntax={}));e.Syntax}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(e){function t(t,n){e.call(this),this.token1=t,this.token2=n}return __extends(t,e),t.prototype.visitToken=function(e){if(e===this.token1){var t=this.token2;return this.token1=null,this.token2=null,t}return e},t.prototype.visitNode=function(t){return null===this.token1?t:e.prototype.visitNode.call(this,t)},t.prototype.visitList=function(t){return null===this.token1?t:e.prototype.visitList.call(this,t)},t.prototype.visitSeparatedList=function(t){return null===this.token1?t:e.prototype.visitSeparatedList.call(this,t)},t}(e.SyntaxRewriter);e.SyntaxTokenReplacer=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e,t,n,r){return new d(e,t,n,r)}function r(e,t){return new p(e,t)}function i(t){return e.Debug.assert(!t.hasLeadingTrivia()),e.Debug.assert(!t.hasTrailingTrivia()),e.Debug.assert(t.fullWidth()>0),new h(t)}function o(t){return r(4,e.StringUtilities.repeat(" ",t))}function a(e){return r(4,e)}function s(e){return r(6,e)}function l(e){return r(7,e)}function c(e){for(var t=[],n=e.fullText(),r=0,i=0;it||t>=this.trivia.length)throw e.Errors.argumentOutOfRange("index");return this.trivia[t]},t.prototype.last=function(){return this.trivia[this.trivia.length-1]},t.prototype.fullWidth=function(){return e.ArrayUtilities.sum(this.trivia,function(e){return e.fullWidth()})},t.prototype.fullText=function(){for(var e="",t=0,n=this.trivia.length;n>t;t++)e+=this.trivia[t].fullText();return e},t.prototype.hasComment=function(){for(var e=0;en;n++){var i=e.childAt(n);if(i.tokenKind===t)return i}return null},e.containsToken=function(t,n){return null!==e.getToken(t,n)},e.hasExportKeyword=function(t){return null!==e.getExportKeyword(t)},e.getExportKeyword=function(t){switch(t.kind()){case 130:case 131:case 129:case 148:case 132:case 128:case 133:return e.getToken(t.modifiers,47);default:return null}},e.isAmbientDeclarationSyntax=function(t){if(!t)return!1;var n=t.node();switch(n.kind()){case 130:case 131:case 129:case 148:case 132:if(e.containsToken(n.modifiers,63))return!0;case 133:case 137:case 135:case 139:case 140:case 136:if(n.isClassElement()||n.isModuleElement())return e.isAmbientDeclarationSyntax(t.containingNode());case 243:return e.isAmbientDeclarationSyntax(t.containingNode().containingNode());default:return e.isAmbientDeclarationSyntax(t.containingNode())}},e}();e.SyntaxUtilities=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){}return e.prototype.defaultVisit=function(){return null},e.prototype.visitToken=function(e){return this.defaultVisit(e)},e.prototype.visitSourceUnit=function(e){return this.defaultVisit(e)},e.prototype.visitExternalModuleReference=function(e){return this.defaultVisit(e)},e.prototype.visitModuleNameModuleReference=function(e){return this.defaultVisit(e)},e.prototype.visitImportDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitExportAssignment=function(e){return this.defaultVisit(e)},e.prototype.visitClassDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitInterfaceDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitHeritageClause=function(e){return this.defaultVisit(e)},e.prototype.visitModuleDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitFunctionDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitVariableStatement=function(e){return this.defaultVisit(e)},e.prototype.visitVariableDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitVariableDeclarator=function(e){return this.defaultVisit(e)},e.prototype.visitEqualsValueClause=function(e){return this.defaultVisit(e)},e.prototype.visitPrefixUnaryExpression=function(e){return this.defaultVisit(e)},e.prototype.visitArrayLiteralExpression=function(e){return this.defaultVisit(e)},e.prototype.visitOmittedExpression=function(e){return this.defaultVisit(e)},e.prototype.visitParenthesizedExpression=function(e){return this.defaultVisit(e)},e.prototype.visitSimpleArrowFunctionExpression=function(e){return this.defaultVisit(e)},e.prototype.visitParenthesizedArrowFunctionExpression=function(e){return this.defaultVisit(e)},e.prototype.visitQualifiedName=function(e){return this.defaultVisit(e)},e.prototype.visitTypeArgumentList=function(e){return this.defaultVisit(e)},e.prototype.visitConstructorType=function(e){return this.defaultVisit(e)},e.prototype.visitFunctionType=function(e){return this.defaultVisit(e)},e.prototype.visitObjectType=function(e){return this.defaultVisit(e)},e.prototype.visitArrayType=function(e){return this.defaultVisit(e)},e.prototype.visitGenericType=function(e){return this.defaultVisit(e)},e.prototype.visitTypeQuery=function(e){return this.defaultVisit(e)},e.prototype.visitTypeAnnotation=function(e){return this.defaultVisit(e)},e.prototype.visitBlock=function(e){return this.defaultVisit(e)},e.prototype.visitParameter=function(e){return this.defaultVisit(e)},e.prototype.visitMemberAccessExpression=function(e){return this.defaultVisit(e)},e.prototype.visitPostfixUnaryExpression=function(e){return this.defaultVisit(e)},e.prototype.visitElementAccessExpression=function(e){return this.defaultVisit(e)},e.prototype.visitInvocationExpression=function(e){return this.defaultVisit(e)},e.prototype.visitArgumentList=function(e){return this.defaultVisit(e)},e.prototype.visitBinaryExpression=function(e){return this.defaultVisit(e)},e.prototype.visitConditionalExpression=function(e){return this.defaultVisit(e)},e.prototype.visitConstructSignature=function(e){return this.defaultVisit(e)},e.prototype.visitMethodSignature=function(e){return this.defaultVisit(e)},e.prototype.visitIndexSignature=function(e){return this.defaultVisit(e)},e.prototype.visitPropertySignature=function(e){return this.defaultVisit(e)},e.prototype.visitCallSignature=function(e){return this.defaultVisit(e)},e.prototype.visitParameterList=function(e){return this.defaultVisit(e)},e.prototype.visitTypeParameterList=function(e){return this.defaultVisit(e)},e.prototype.visitTypeParameter=function(e){return this.defaultVisit(e)},e.prototype.visitConstraint=function(e){return this.defaultVisit(e)},e.prototype.visitElseClause=function(e){return this.defaultVisit(e)},e.prototype.visitIfStatement=function(e){return this.defaultVisit(e)},e.prototype.visitExpressionStatement=function(e){return this.defaultVisit(e)},e.prototype.visitConstructorDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitMemberFunctionDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitGetAccessor=function(e){return this.defaultVisit(e)},e.prototype.visitSetAccessor=function(e){return this.defaultVisit(e)},e.prototype.visitMemberVariableDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitIndexMemberDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitThrowStatement=function(e){return this.defaultVisit(e)},e.prototype.visitReturnStatement=function(e){return this.defaultVisit(e)},e.prototype.visitObjectCreationExpression=function(e){return this.defaultVisit(e)},e.prototype.visitSwitchStatement=function(e){return this.defaultVisit(e)},e.prototype.visitCaseSwitchClause=function(e){return this.defaultVisit(e)},e.prototype.visitDefaultSwitchClause=function(e){return this.defaultVisit(e)},e.prototype.visitBreakStatement=function(e){return this.defaultVisit(e)},e.prototype.visitContinueStatement=function(e){return this.defaultVisit(e)},e.prototype.visitForStatement=function(e){return this.defaultVisit(e)},e.prototype.visitForInStatement=function(e){return this.defaultVisit(e)},e.prototype.visitWhileStatement=function(e){return this.defaultVisit(e)},e.prototype.visitWithStatement=function(e){return this.defaultVisit(e)},e.prototype.visitEnumDeclaration=function(e){return this.defaultVisit(e)},e.prototype.visitEnumElement=function(e){return this.defaultVisit(e)},e.prototype.visitCastExpression=function(e){return this.defaultVisit(e)},e.prototype.visitObjectLiteralExpression=function(e){return this.defaultVisit(e)},e.prototype.visitSimplePropertyAssignment=function(e){return this.defaultVisit(e)},e.prototype.visitFunctionPropertyAssignment=function(e){return this.defaultVisit(e)},e.prototype.visitFunctionExpression=function(e){return this.defaultVisit(e)},e.prototype.visitEmptyStatement=function(e){return this.defaultVisit(e)},e.prototype.visitTryStatement=function(e){return this.defaultVisit(e)},e.prototype.visitCatchClause=function(e){return this.defaultVisit(e)},e.prototype.visitFinallyClause=function(e){return this.defaultVisit(e)},e.prototype.visitLabeledStatement=function(e){return this.defaultVisit(e)},e.prototype.visitDoStatement=function(e){return this.defaultVisit(e)},e.prototype.visitTypeOfExpression=function(e){return this.defaultVisit(e)},e.prototype.visitDeleteExpression=function(e){return this.defaultVisit(e)},e.prototype.visitVoidExpression=function(e){return this.defaultVisit(e)},e.prototype.visitDebuggerStatement=function(e){return this.defaultVisit(e)},e}();e.SyntaxVisitor=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){}return e.prototype.visitToken=function(){},e.prototype.visitNode=function(e){e.accept(this)},e.prototype.visitNodeOrToken=function(e){e.isToken()?this.visitToken(e):this.visitNode(e)},e.prototype.visitOptionalToken=function(e){null!==e&&this.visitToken(e)},e.prototype.visitOptionalNode=function(e){null!==e&&this.visitNode(e)},e.prototype.visitOptionalNodeOrToken=function(e){null!==e&&this.visitNodeOrToken(e)},e.prototype.visitList=function(e){for(var t=0,n=e.childCount();n>t;t++)this.visitNodeOrToken(e.childAt(t)) },e.prototype.visitSeparatedList=function(e){for(var t=0,n=e.childCount();n>t;t++){var r=e.childAt(t);this.visitNodeOrToken(r)}},e.prototype.visitSourceUnit=function(e){this.visitList(e.moduleElements),this.visitToken(e.endOfFileToken)},e.prototype.visitExternalModuleReference=function(e){this.visitToken(e.requireKeyword),this.visitToken(e.openParenToken),this.visitToken(e.stringLiteral),this.visitToken(e.closeParenToken)},e.prototype.visitModuleNameModuleReference=function(e){this.visitNodeOrToken(e.moduleName)},e.prototype.visitImportDeclaration=function(e){this.visitList(e.modifiers),this.visitToken(e.importKeyword),this.visitToken(e.identifier),this.visitToken(e.equalsToken),this.visitNodeOrToken(e.moduleReference),this.visitToken(e.semicolonToken)},e.prototype.visitExportAssignment=function(e){this.visitToken(e.exportKeyword),this.visitToken(e.equalsToken),this.visitToken(e.identifier),this.visitToken(e.semicolonToken)},e.prototype.visitClassDeclaration=function(e){this.visitList(e.modifiers),this.visitToken(e.classKeyword),this.visitToken(e.identifier),this.visitOptionalNode(e.typeParameterList),this.visitList(e.heritageClauses),this.visitToken(e.openBraceToken),this.visitList(e.classElements),this.visitToken(e.closeBraceToken)},e.prototype.visitInterfaceDeclaration=function(e){this.visitList(e.modifiers),this.visitToken(e.interfaceKeyword),this.visitToken(e.identifier),this.visitOptionalNode(e.typeParameterList),this.visitList(e.heritageClauses),this.visitNode(e.body)},e.prototype.visitHeritageClause=function(e){this.visitToken(e.extendsOrImplementsKeyword),this.visitSeparatedList(e.typeNames)},e.prototype.visitModuleDeclaration=function(e){this.visitList(e.modifiers),this.visitToken(e.moduleKeyword),this.visitOptionalNodeOrToken(e.name),this.visitOptionalToken(e.stringLiteral),this.visitToken(e.openBraceToken),this.visitList(e.moduleElements),this.visitToken(e.closeBraceToken)},e.prototype.visitFunctionDeclaration=function(e){this.visitList(e.modifiers),this.visitToken(e.functionKeyword),this.visitToken(e.identifier),this.visitNode(e.callSignature),this.visitOptionalNode(e.block),this.visitOptionalToken(e.semicolonToken)},e.prototype.visitVariableStatement=function(e){this.visitList(e.modifiers),this.visitNode(e.variableDeclaration),this.visitToken(e.semicolonToken)},e.prototype.visitVariableDeclaration=function(e){this.visitToken(e.varKeyword),this.visitSeparatedList(e.variableDeclarators)},e.prototype.visitVariableDeclarator=function(e){this.visitToken(e.propertyName),this.visitOptionalNode(e.typeAnnotation),this.visitOptionalNode(e.equalsValueClause)},e.prototype.visitEqualsValueClause=function(e){this.visitToken(e.equalsToken),this.visitNodeOrToken(e.value)},e.prototype.visitPrefixUnaryExpression=function(e){this.visitToken(e.operatorToken),this.visitNodeOrToken(e.operand)},e.prototype.visitArrayLiteralExpression=function(e){this.visitToken(e.openBracketToken),this.visitSeparatedList(e.expressions),this.visitToken(e.closeBracketToken)},e.prototype.visitOmittedExpression=function(){},e.prototype.visitParenthesizedExpression=function(e){this.visitToken(e.openParenToken),this.visitNodeOrToken(e.expression),this.visitToken(e.closeParenToken)},e.prototype.visitSimpleArrowFunctionExpression=function(e){this.visitToken(e.identifier),this.visitToken(e.equalsGreaterThanToken),this.visitOptionalNode(e.block),this.visitOptionalNodeOrToken(e.expression)},e.prototype.visitParenthesizedArrowFunctionExpression=function(e){this.visitNode(e.callSignature),this.visitToken(e.equalsGreaterThanToken),this.visitOptionalNode(e.block),this.visitOptionalNodeOrToken(e.expression)},e.prototype.visitQualifiedName=function(e){this.visitNodeOrToken(e.left),this.visitToken(e.dotToken),this.visitToken(e.right)},e.prototype.visitTypeArgumentList=function(e){this.visitToken(e.lessThanToken),this.visitSeparatedList(e.typeArguments),this.visitToken(e.greaterThanToken)},e.prototype.visitConstructorType=function(e){this.visitToken(e.newKeyword),this.visitOptionalNode(e.typeParameterList),this.visitNode(e.parameterList),this.visitToken(e.equalsGreaterThanToken),this.visitNodeOrToken(e.type)},e.prototype.visitFunctionType=function(e){this.visitOptionalNode(e.typeParameterList),this.visitNode(e.parameterList),this.visitToken(e.equalsGreaterThanToken),this.visitNodeOrToken(e.type)},e.prototype.visitObjectType=function(e){this.visitToken(e.openBraceToken),this.visitSeparatedList(e.typeMembers),this.visitToken(e.closeBraceToken)},e.prototype.visitArrayType=function(e){this.visitNodeOrToken(e.type),this.visitToken(e.openBracketToken),this.visitToken(e.closeBracketToken)},e.prototype.visitGenericType=function(e){this.visitNodeOrToken(e.name),this.visitNode(e.typeArgumentList)},e.prototype.visitTypeQuery=function(e){this.visitToken(e.typeOfKeyword),this.visitNodeOrToken(e.name)},e.prototype.visitTypeAnnotation=function(e){this.visitToken(e.colonToken),this.visitNodeOrToken(e.type)},e.prototype.visitBlock=function(e){this.visitToken(e.openBraceToken),this.visitList(e.statements),this.visitToken(e.closeBraceToken)},e.prototype.visitParameter=function(e){this.visitOptionalToken(e.dotDotDotToken),this.visitList(e.modifiers),this.visitToken(e.identifier),this.visitOptionalToken(e.questionToken),this.visitOptionalNode(e.typeAnnotation),this.visitOptionalNode(e.equalsValueClause)},e.prototype.visitMemberAccessExpression=function(e){this.visitNodeOrToken(e.expression),this.visitToken(e.dotToken),this.visitToken(e.name)},e.prototype.visitPostfixUnaryExpression=function(e){this.visitNodeOrToken(e.operand),this.visitToken(e.operatorToken)},e.prototype.visitElementAccessExpression=function(e){this.visitNodeOrToken(e.expression),this.visitToken(e.openBracketToken),this.visitNodeOrToken(e.argumentExpression),this.visitToken(e.closeBracketToken)},e.prototype.visitInvocationExpression=function(e){this.visitNodeOrToken(e.expression),this.visitNode(e.argumentList)},e.prototype.visitArgumentList=function(e){this.visitOptionalNode(e.typeArgumentList),this.visitToken(e.openParenToken),this.visitSeparatedList(e.arguments),this.visitToken(e.closeParenToken)},e.prototype.visitBinaryExpression=function(e){this.visitNodeOrToken(e.left),this.visitToken(e.operatorToken),this.visitNodeOrToken(e.right)},e.prototype.visitConditionalExpression=function(e){this.visitNodeOrToken(e.condition),this.visitToken(e.questionToken),this.visitNodeOrToken(e.whenTrue),this.visitToken(e.colonToken),this.visitNodeOrToken(e.whenFalse)},e.prototype.visitConstructSignature=function(e){this.visitToken(e.newKeyword),this.visitNode(e.callSignature)},e.prototype.visitMethodSignature=function(e){this.visitToken(e.propertyName),this.visitOptionalToken(e.questionToken),this.visitNode(e.callSignature)},e.prototype.visitIndexSignature=function(e){this.visitToken(e.openBracketToken),this.visitNode(e.parameter),this.visitToken(e.closeBracketToken),this.visitOptionalNode(e.typeAnnotation)},e.prototype.visitPropertySignature=function(e){this.visitToken(e.propertyName),this.visitOptionalToken(e.questionToken),this.visitOptionalNode(e.typeAnnotation)},e.prototype.visitCallSignature=function(e){this.visitOptionalNode(e.typeParameterList),this.visitNode(e.parameterList),this.visitOptionalNode(e.typeAnnotation)},e.prototype.visitParameterList=function(e){this.visitToken(e.openParenToken),this.visitSeparatedList(e.parameters),this.visitToken(e.closeParenToken)},e.prototype.visitTypeParameterList=function(e){this.visitToken(e.lessThanToken),this.visitSeparatedList(e.typeParameters),this.visitToken(e.greaterThanToken)},e.prototype.visitTypeParameter=function(e){this.visitToken(e.identifier),this.visitOptionalNode(e.constraint)},e.prototype.visitConstraint=function(e){this.visitToken(e.extendsKeyword),this.visitNodeOrToken(e.type)},e.prototype.visitElseClause=function(e){this.visitToken(e.elseKeyword),this.visitNodeOrToken(e.statement)},e.prototype.visitIfStatement=function(e){this.visitToken(e.ifKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.condition),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement),this.visitOptionalNode(e.elseClause)},e.prototype.visitExpressionStatement=function(e){this.visitNodeOrToken(e.expression),this.visitToken(e.semicolonToken)},e.prototype.visitConstructorDeclaration=function(e){this.visitList(e.modifiers),this.visitToken(e.constructorKeyword),this.visitNode(e.parameterList),this.visitOptionalNode(e.block),this.visitOptionalToken(e.semicolonToken)},e.prototype.visitMemberFunctionDeclaration=function(e){this.visitList(e.modifiers),this.visitToken(e.propertyName),this.visitNode(e.callSignature),this.visitOptionalNode(e.block),this.visitOptionalToken(e.semicolonToken)},e.prototype.visitGetAccessor=function(e){this.visitList(e.modifiers),this.visitToken(e.getKeyword),this.visitToken(e.propertyName),this.visitNode(e.parameterList),this.visitOptionalNode(e.typeAnnotation),this.visitNode(e.block)},e.prototype.visitSetAccessor=function(e){this.visitList(e.modifiers),this.visitToken(e.setKeyword),this.visitToken(e.propertyName),this.visitNode(e.parameterList),this.visitNode(e.block)},e.prototype.visitMemberVariableDeclaration=function(e){this.visitList(e.modifiers),this.visitNode(e.variableDeclarator),this.visitToken(e.semicolonToken)},e.prototype.visitIndexMemberDeclaration=function(e){this.visitList(e.modifiers),this.visitNode(e.indexSignature),this.visitToken(e.semicolonToken)},e.prototype.visitThrowStatement=function(e){this.visitToken(e.throwKeyword),this.visitNodeOrToken(e.expression),this.visitToken(e.semicolonToken)},e.prototype.visitReturnStatement=function(e){this.visitToken(e.returnKeyword),this.visitOptionalNodeOrToken(e.expression),this.visitToken(e.semicolonToken)},e.prototype.visitObjectCreationExpression=function(e){this.visitToken(e.newKeyword),this.visitNodeOrToken(e.expression),this.visitOptionalNode(e.argumentList)},e.prototype.visitSwitchStatement=function(e){this.visitToken(e.switchKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.expression),this.visitToken(e.closeParenToken),this.visitToken(e.openBraceToken),this.visitList(e.switchClauses),this.visitToken(e.closeBraceToken)},e.prototype.visitCaseSwitchClause=function(e){this.visitToken(e.caseKeyword),this.visitNodeOrToken(e.expression),this.visitToken(e.colonToken),this.visitList(e.statements)},e.prototype.visitDefaultSwitchClause=function(e){this.visitToken(e.defaultKeyword),this.visitToken(e.colonToken),this.visitList(e.statements)},e.prototype.visitBreakStatement=function(e){this.visitToken(e.breakKeyword),this.visitOptionalToken(e.identifier),this.visitToken(e.semicolonToken)},e.prototype.visitContinueStatement=function(e){this.visitToken(e.continueKeyword),this.visitOptionalToken(e.identifier),this.visitToken(e.semicolonToken)},e.prototype.visitForStatement=function(e){this.visitToken(e.forKeyword),this.visitToken(e.openParenToken),this.visitOptionalNode(e.variableDeclaration),this.visitOptionalNodeOrToken(e.initializer),this.visitToken(e.firstSemicolonToken),this.visitOptionalNodeOrToken(e.condition),this.visitToken(e.secondSemicolonToken),this.visitOptionalNodeOrToken(e.incrementor),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement)},e.prototype.visitForInStatement=function(e){this.visitToken(e.forKeyword),this.visitToken(e.openParenToken),this.visitOptionalNode(e.variableDeclaration),this.visitOptionalNodeOrToken(e.left),this.visitToken(e.inKeyword),this.visitNodeOrToken(e.expression),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement)},e.prototype.visitWhileStatement=function(e){this.visitToken(e.whileKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.condition),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement)},e.prototype.visitWithStatement=function(e){this.visitToken(e.withKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.condition),this.visitToken(e.closeParenToken),this.visitNodeOrToken(e.statement)},e.prototype.visitEnumDeclaration=function(e){this.visitList(e.modifiers),this.visitToken(e.enumKeyword),this.visitToken(e.identifier),this.visitToken(e.openBraceToken),this.visitSeparatedList(e.enumElements),this.visitToken(e.closeBraceToken)},e.prototype.visitEnumElement=function(e){this.visitToken(e.propertyName),this.visitOptionalNode(e.equalsValueClause)},e.prototype.visitCastExpression=function(e){this.visitToken(e.lessThanToken),this.visitNodeOrToken(e.type),this.visitToken(e.greaterThanToken),this.visitNodeOrToken(e.expression)},e.prototype.visitObjectLiteralExpression=function(e){this.visitToken(e.openBraceToken),this.visitSeparatedList(e.propertyAssignments),this.visitToken(e.closeBraceToken)},e.prototype.visitSimplePropertyAssignment=function(e){this.visitToken(e.propertyName),this.visitToken(e.colonToken),this.visitNodeOrToken(e.expression)},e.prototype.visitFunctionPropertyAssignment=function(e){this.visitToken(e.propertyName),this.visitNode(e.callSignature),this.visitNode(e.block)},e.prototype.visitFunctionExpression=function(e){this.visitToken(e.functionKeyword),this.visitOptionalToken(e.identifier),this.visitNode(e.callSignature),this.visitNode(e.block)},e.prototype.visitEmptyStatement=function(e){this.visitToken(e.semicolonToken)},e.prototype.visitTryStatement=function(e){this.visitToken(e.tryKeyword),this.visitNode(e.block),this.visitOptionalNode(e.catchClause),this.visitOptionalNode(e.finallyClause)},e.prototype.visitCatchClause=function(e){this.visitToken(e.catchKeyword),this.visitToken(e.openParenToken),this.visitToken(e.identifier),this.visitOptionalNode(e.typeAnnotation),this.visitToken(e.closeParenToken),this.visitNode(e.block)},e.prototype.visitFinallyClause=function(e){this.visitToken(e.finallyKeyword),this.visitNode(e.block)},e.prototype.visitLabeledStatement=function(e){this.visitToken(e.identifier),this.visitToken(e.colonToken),this.visitNodeOrToken(e.statement)},e.prototype.visitDoStatement=function(e){this.visitToken(e.doKeyword),this.visitNodeOrToken(e.statement),this.visitToken(e.whileKeyword),this.visitToken(e.openParenToken),this.visitNodeOrToken(e.condition),this.visitToken(e.closeParenToken),this.visitToken(e.semicolonToken)},e.prototype.visitTypeOfExpression=function(e){this.visitToken(e.typeOfKeyword),this.visitNodeOrToken(e.expression)},e.prototype.visitDeleteExpression=function(e){this.visitToken(e.deleteKeyword),this.visitNodeOrToken(e.expression)},e.prototype.visitVoidExpression=function(e){this.visitToken(e.voidKeyword),this.visitNodeOrToken(e.expression)},e.prototype.visitDebuggerStatement=function(e){this.visitToken(e.debuggerKeyword),this.visitToken(e.semicolonToken)},e}();e.SyntaxWalker=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(e){function t(){e.apply(this,arguments),this._position=0}return __extends(t,e),t.prototype.visitToken=function(e){this._position+=e.fullWidth()},t.prototype.position=function(){return this._position},t.prototype.skip=function(e){this._position+=e.fullWidth()},t}(e.SyntaxWalker);e.PositionTrackingWalker=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(t){function n(n,r){t.call(this),this.trackParents=n,this.trackPreviousToken=r,this.tokenToInformation=e.Collections.createHashTable(e.Collections.DefaultHashTableCapacity,e.Collections.identityHashCode),this.elementToPosition=e.Collections.createHashTable(e.Collections.DefaultHashTableCapacity,e.Collections.identityHashCode),this._previousToken=null,this._previousTokenInformation=null,this._currentPosition=0,this._elementToParent=e.Collections.createHashTable(e.Collections.DefaultHashTableCapacity,e.Collections.identityHashCode),this._parentStack=[],this._parentStack.push(null)}return __extends(n,t),n.create=function(e,t,r){var i=new n(t,r);return i.visitNode(e),i},n.prototype.visitNode=function(n){this.trackParents&&this._elementToParent.add(n,e.ArrayUtilities.last(this._parentStack)),this.elementToPosition.add(n,this._currentPosition),this.trackParents&&this._parentStack.push(n),t.prototype.visitNode.call(this,n),this.trackParents&&this._parentStack.pop()},n.prototype.visitToken=function(t){if(this.trackParents&&this._elementToParent.add(t,e.ArrayUtilities.last(this._parentStack)),this.trackPreviousToken){var n={previousToken:this._previousToken,nextToken:null};null!==this._previousTokenInformation&&(this._previousTokenInformation.nextToken=t),this._previousToken=t,this._previousTokenInformation=n,this.tokenToInformation.add(t,n)}this.elementToPosition.add(t,this._currentPosition),this._currentPosition+=t.fullWidth()},n.prototype.parent=function(e){return this._elementToParent.get(e)},n.prototype.fullStart=function(e){return this.elementToPosition.get(e)},n.prototype.start=function(e){return this.fullStart(e)+e.leadingTriviaWidth()},n.prototype.end=function(e){return this.start(e)+e.width()},n.prototype.previousToken=function(e){return this.tokenInformation(e).previousToken},n.prototype.tokenInformation=function(e){return this.tokenToInformation.get(e)},n.prototype.firstTokenInLineContainingToken=function(e){for(var t=e;;){var n=this.tokenInformation(t);if(this.isFirstTokenInLineWorker(n))break;t=n.previousToken}return t},n.prototype.isFirstTokenInLine=function(e){var t=this.tokenInformation(e);return this.isFirstTokenInLineWorker(t)},n.prototype.isFirstTokenInLineWorker=function(e){return null===e.previousToken||e.previousToken.hasTrailingNewLine()},n}(e.SyntaxWalker);e.SyntaxInformationMap=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(t){function n(){t.apply(this,arguments),this.tokenTable=e.Collections.createHashTable(e.Collections.DefaultHashTableCapacity,e.Collections.identityHashCode)}return __extends(n,t),n.checkInvariants=function(e){e.accept(new n)},n.prototype.visitToken=function(e){this.tokenTable.add(e,e)},n}(e.SyntaxWalker);e.SyntaxNodeInvariantsChecker=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(e){function t(t){e.call(this),this._depth=0,this._maximumDepth=0,this._maximumDepth=t}return __extends(t,e),t.prototype.visitNode=function(t){this._depth0?void this._index++:void this._elements.shift()},e.prototype.getAndPinCursorIndex=function(){return this._pinCount++,this._index},e.prototype.releaseAndUnpinCursorIndex=function(){this._pinCount--,0===this._pinCount},e.prototype.rewindToPinnedCursorIndex=function(e){this._index=e},e.prototype.pinCount=function(){return this._pinCount},e.prototype.moveToFirstToken=function(){for(var e;!this.isFinished();){e=this.currentElement();{if(!e.isNode())return;this.moveToFirstChild()}}},e.prototype.currentToken=function(){if(this.moveToFirstToken(),this.isFinished())return null;var e=this.currentElement();return e},e.prototype.peekToken=function(e){this.moveToFirstToken();for(var t=this.getAndPinCursorIndex(),n=0;e>n;n++)this.moveToNextSibling(),this.moveToFirstToken();var r=this.currentToken();return this.rewindToPinnedCursorIndex(t),this.releaseAndUnpinCursorIndex(t),r},e}(),s=function(){function t(t,n,r){this._previousToken=null,this._absolutePosition=0,this._tokenDiagnostics=[],this.rewindPointPool=[],this.rewindPointPoolCount=0,this.slidingWindow=new e.SlidingWindow(this,e.ArrayUtilities.createArray(32,null),null),this.scanner=new e.Scanner(t,n,r)}return t.prototype.currentNode=function(){return null},t.prototype.moveToNextNode=function(){throw e.Errors.invalidOperation()},t.prototype.absolutePosition=function(){return this._absolutePosition},t.prototype.previousToken=function(){return this._previousToken},t.prototype.tokenDiagnostics=function(){return this._tokenDiagnostics},t.prototype.getOrCreateRewindPoint=function(){if(0===this.rewindPointPoolCount)return{};this.rewindPointPoolCount--;var e=this.rewindPointPool[this.rewindPointPoolCount];return this.rewindPointPool[this.rewindPointPoolCount]=null,e},t.prototype.getRewindPoint=function(){var e=this.slidingWindow.getAndPinAbsoluteIndex(),t=this.getOrCreateRewindPoint();return t.slidingWindowIndex=e,t.previousToken=this._previousToken,t.absolutePosition=this._absolutePosition,t.pinCount=this.slidingWindow.pinCount(),t},t.prototype.isPinned=function(){return this.slidingWindow.pinCount()>0},t.prototype.rewind=function(e){this.slidingWindow.rewindToPinnedIndex(e.slidingWindowIndex),this._previousToken=e.previousToken,this._absolutePosition=e.absolutePosition},t.prototype.releaseRewindPoint=function(e){this.slidingWindow.releaseAndUnpinAbsoluteIndex(e.absoluteIndex),this.rewindPointPool[this.rewindPointPoolCount]=e,this.rewindPointPoolCount++},t.prototype.fetchMoreItems=function(e,t,n,r){return n[r]=this.scanner.scan(this._tokenDiagnostics,e),1},t.prototype.peekToken=function(e){return this.slidingWindow.peekItemN(e)},t.prototype.moveToNextToken=function(){var e=this.currentToken();this._absolutePosition+=e.fullWidth(),this._previousToken=e,this.slidingWindow.moveToNextItem()},t.prototype.currentToken=function(){return this.slidingWindow.currentItem(!1)},t.prototype.removeDiagnosticsOnOrAfterPosition=function(e){for(var t=this._tokenDiagnostics.length;t>0;){var n=this._tokenDiagnostics[t-1];if(!(n.start()>=e))break;t--}this._tokenDiagnostics.length=t},t.prototype.resetToPosition=function(e,t){this._absolutePosition=e,this._previousToken=t,this.removeDiagnosticsOnOrAfterPosition(e),this.slidingWindow.disgardAllItemsFromCurrentIndexOnwards(),this.scanner.setAbsoluteIndex(e)},t.prototype.currentTokenAllowingRegularExpression=function(){this.resetToPosition(this._absolutePosition,this._previousToken);var e=this.slidingWindow.currentItem(!0);return e},t}(),l=function(){function t(n,r,i){this._changeDelta=0;var o=n.sourceUnit();this._oldSourceUnitCursor=new a(o),this._changeRange=t.extendToAffectedRange(r,o),e.Debug.shouldAssert(2)&&e.Debug.assert(o.fullWidth()-this._changeRange.span().length()+this._changeRange.newLength()===i.length()),this._normalParserSource=new s(n.fileName(),i,n.parseOptions().languageVersion())}return t.extendToAffectedRange=function(t,n){for(var r=1,i=t.span().start(),o=0;i>0&&r>=o;o++){var a=n.findToken(i),s=a.fullStart();i=e.MathPrototype.max(0,s-1)}var l=e.TextSpan.fromBounds(i,t.span().end()),c=t.newLength()+(t.span().start()-i);return new e.TextChangeRange(l,c)},t.prototype.absolutePosition=function(){return this._normalParserSource.absolutePosition()},t.prototype.previousToken=function(){return this._normalParserSource.previousToken()},t.prototype.tokenDiagnostics=function(){return this._normalParserSource.tokenDiagnostics()},t.prototype.getRewindPoint=function(){var e=this._normalParserSource.getRewindPoint(),t=this._oldSourceUnitCursor.getAndPinCursorIndex();return e.changeDelta=this._changeDelta,e.changeRange=this._changeRange,e.oldSourceUnitCursorIndex=t,e},t.prototype.rewind=function(e){this._changeRange=e.changeRange,this._changeDelta=e.changeDelta,this._oldSourceUnitCursor.rewindToPinnedCursorIndex(e.oldSourceUnitCursorIndex),this._normalParserSource.rewind(e)},t.prototype.releaseRewindPoint=function(e){this._oldSourceUnitCursor.releaseAndUnpinCursorIndex(e.oldSourceUnitCursorIndex),this._normalParserSource.releaseRewindPoint(e)},t.prototype.canReadFromOldSourceUnit=function(){return this._normalParserSource.isPinned()?!1:null!==this._changeRange&&this._changeRange.newSpan().intersectsWithPosition(this.absolutePosition())?!1:(this.syncCursorToNewTextIfBehind(),0===this._changeDelta&&!this._oldSourceUnitCursor.isFinished())},t.prototype.currentNode=function(){return this.canReadFromOldSourceUnit()?this.tryGetNodeFromOldSourceUnit():null},t.prototype.currentToken=function(){if(this.canReadFromOldSourceUnit()){var e=this.tryGetTokenFromOldSourceUnit();if(null!==e)return e}return this._normalParserSource.currentToken()},t.prototype.currentTokenAllowingRegularExpression=function(){return this._normalParserSource.currentTokenAllowingRegularExpression()},t.prototype.syncCursorToNewTextIfBehind=function(){for(;;){if(this._oldSourceUnitCursor.isFinished())break;if(this._changeDelta>=0)break;var e=this._oldSourceUnitCursor.currentElement();e.isNode()&&e.fullWidth()>Math.abs(this._changeDelta)?this._oldSourceUnitCursor.moveToFirstChild():(this._oldSourceUnitCursor.moveToNextSibling(),this._changeDelta+=e.fullWidth())}},t.prototype.intersectsWithChangeRangeSpanInOriginalText=function(e,t){return null!==this._changeRange&&this._changeRange.span().intersectsWith(e,t)},t.prototype.tryGetNodeFromOldSourceUnit=function(){for(;;){var e=this._oldSourceUnitCursor.currentNode();if(null===e)return null;if(!this.intersectsWithChangeRangeSpanInOriginalText(this.absolutePosition(),e.fullWidth())&&!e.isIncrementallyUnusable())return e;this._oldSourceUnitCursor.moveToFirstChild()}},t.prototype.canReuseTokenFromOldSourceUnit=function(e,t){return null===t||this.intersectsWithChangeRangeSpanInOriginalText(e,t.fullWidth())||t.isIncrementallyUnusable()?!1:!0},t.prototype.tryGetTokenFromOldSourceUnit=function(){var e=this._oldSourceUnitCursor.currentToken();return this.canReuseTokenFromOldSourceUnit(this.absolutePosition(),e)?e:null},t.prototype.peekToken=function(e){if(this.canReadFromOldSourceUnit()){var t=this.tryPeekTokenFromOldSourceUnit(e);if(null!==t)return t}return this._normalParserSource.peekToken(e)},t.prototype.tryPeekTokenFromOldSourceUnit=function(e){for(var t=this.absolutePosition(),n=0;e>n;n++){var r=this._oldSourceUnitCursor.peekToken(n);if(!this.canReuseTokenFromOldSourceUnit(t,r))return null;t+=r.fullWidth()}var i=this._oldSourceUnitCursor.peekToken(e);return this.canReuseTokenFromOldSourceUnit(t,i)?i:null},t.prototype.moveToNextNode=function(){var e=(this._oldSourceUnitCursor.currentElement(),this._oldSourceUnitCursor.currentNode());this._oldSourceUnitCursor.moveToNextSibling();var t=this.absolutePosition()+e.fullWidth(),n=e.lastToken();this._normalParserSource.resetToPosition(t,n),null!==this._changeRange},t.prototype.moveToNextToken=function(){var e=this.currentToken();if(this._oldSourceUnitCursor.currentToken()===e){this._oldSourceUnitCursor.moveToNextSibling();var t=this.absolutePosition()+e.fullWidth(),n=e;this._normalParserSource.resetToPosition(t,n),null!==this._changeRange}else if(this._changeDelta-=e.fullWidth(),this._normalParserSource.moveToNextToken(),null!==this._changeRange){var r=this._changeRange.newSpan();this.absolutePosition()>=r.end()&&(this._changeDelta+=this._changeRange.newLength()-this._changeRange.span().length(),this._changeRange=null)}},t}(),c=function(){function t(t,n,r,i,o){this.newText_forDebuggingPurposesOnly=o,this.listParsingState=0,this.isInStrictMode=!1,this.diagnostics=[],this.factory=e.Syntax.normalModeFactory,this.mergeTokensStorage=[],this.arrayPool=[],this.fileName=t,this.lineMap=n,this.source=r,this.parseOptions=i}return t.prototype.getRewindPoint=function(){var e=this.source.getRewindPoint();return e.diagnosticsCount=this.diagnostics.length,e.isInStrictMode=this.isInStrictMode,e.listParsingState=this.listParsingState,e},t.prototype.rewind=function(e){this.source.rewind(e),this.diagnostics.length=e.diagnosticsCount},t.prototype.releaseRewindPoint=function(e){this.source.releaseRewindPoint(e)},t.prototype.currentTokenStart=function(){return this.source.absolutePosition()+this.currentToken().leadingTriviaWidth()},t.prototype.previousTokenStart=function(){return null===this.previousToken()?0:this.source.absolutePosition()-this.previousToken().fullWidth()+this.previousToken().leadingTriviaWidth()},t.prototype.previousTokenEnd=function(){return null===this.previousToken()?0:this.previousTokenStart()+this.previousToken().width()},t.prototype.currentNode=function(){var e=this.source.currentNode();return null===e||e.parsedInStrictMode()!==this.isInStrictMode?null:e},t.prototype.currentToken=function(){return this.source.currentToken()},t.prototype.currentTokenAllowingRegularExpression=function(){return this.source.currentTokenAllowingRegularExpression()},t.prototype.peekToken=function(e){return this.source.peekToken(e)},t.prototype.eatAnyToken=function(){var e=this.currentToken();return this.moveToNextToken(),e},t.prototype.moveToNextToken=function(){this.source.moveToNextToken()},t.prototype.previousToken=function(){return this.source.previousToken() },t.prototype.eatNode=function(){var e=this.source.currentNode();return this.source.moveToNextNode(),e},t.prototype.eatToken=function(e){var t=this.currentToken();return t.tokenKind===e?(this.moveToNextToken(),t):this.createMissingToken(e,t)},t.prototype.tryEatToken=function(e){return this.currentToken().tokenKind===e?this.eatToken(e):null},t.prototype.eatKeyword=function(e){var t=this.currentToken();return t.tokenKind===e?(this.moveToNextToken(),t):this.createMissingToken(e,t)},t.prototype.isIdentifier=function(e){var t=e.tokenKind;return 11===t?!0:t>=51?59>=t?!this.isInStrictMode:69>=t:!1},t.prototype.eatIdentifierNameToken=function(){var t=this.currentToken();return 11===t.tokenKind?(this.moveToNextToken(),t):e.SyntaxFacts.isAnyKeyword(t.tokenKind)?(this.moveToNextToken(),e.Syntax.convertToIdentifierName(t)):this.createMissingToken(11,t)},t.prototype.eatIdentifierToken=function(){var t=this.currentToken();return this.isIdentifier(t)?(this.moveToNextToken(),11===t.tokenKind?t:e.Syntax.convertToIdentifierName(t)):this.createMissingToken(11,t)},t.prototype.canEatAutomaticSemicolon=function(e){var t=this.currentToken();return 10===t.tokenKind?!0:71===t.tokenKind?!0:e?!0:null!==this.previousToken()&&this.previousToken().hasTrailingNewLine()?!0:!1},t.prototype.canEatExplicitOrAutomaticSemicolon=function(e){var t=this.currentToken();return 78===t.tokenKind?!0:this.canEatAutomaticSemicolon(e)},t.prototype.eatExplicitOrAutomaticSemicolon=function(t){var n=this.currentToken();if(78===n.tokenKind)return this.eatToken(78);if(this.canEatAutomaticSemicolon(t)){var r=e.Syntax.emptyToken(78);return this.parseOptions.allowAutomaticSemicolonInsertion()||this.addDiagnostic(new e.Diagnostic(this.fileName,this.lineMap,this.previousTokenEnd(),0,e.DiagnosticCode.Automatic_semicolon_insertion_not_allowed,null)),r}return this.eatToken(78)},t.prototype.isKeyword=function(e){if(e>=15){if(50>=e)return!0;if(this.isInStrictMode)return 59>=e}return!1},t.prototype.createMissingToken=function(t,n){var r=this.getExpectedTokenDiagnostic(t,n);return this.addDiagnostic(r),e.Syntax.emptyToken(t)},t.prototype.getExpectedTokenDiagnostic=function(t,n){var r=this.currentToken();return e.SyntaxFacts.isAnyKeyword(t)||e.SyntaxFacts.isAnyPunctuation(t)?new e.Diagnostic(this.fileName,this.lineMap,this.currentTokenStart(),r.width(),e.DiagnosticCode._0_expected,[e.SyntaxFacts.getText(t)]):null!==n&&e.SyntaxFacts.isAnyKeyword(n.tokenKind)?new e.Diagnostic(this.fileName,this.lineMap,this.currentTokenStart(),r.width(),e.DiagnosticCode.Identifier_expected_0_is_a_keyword,[e.SyntaxFacts.getText(n.tokenKind)]):new e.Diagnostic(this.fileName,this.lineMap,this.currentTokenStart(),r.width(),e.DiagnosticCode.Identifier_expected,null)},t.getPrecedence=function(t){switch(t){case 173:return 1;case 174:case 175:case 176:case 177:case 178:case 179:case 180:case 181:case 182:case 183:case 184:case 185:return 2;case 186:return 3;case 187:return 5;case 188:return 6;case 189:return 7;case 190:return 8;case 191:return 9;case 192:case 193:case 194:case 195:return 10;case 196:case 197:case 198:case 199:case 200:case 201:return 11;case 202:case 203:case 204:return 12;case 208:case 209:return 13;case 205:case 206:case 207:return 14;case 164:case 165:case 166:case 167:case 170:case 171:case 172:case 168:case 169:return 15}throw e.Errors.invalidOperation()},t.prototype.addSkippedTokenAfterNodeOrToken=function(t,n){if(t.isToken())return this.addSkippedTokenAfterToken(t,n);if(t.isNode())return this.addSkippedTokenAfterNode(t,n);throw e.Errors.invalidOperation()},t.prototype.addSkippedTokenAfterNode=function(e,t){var n=e.lastToken(),r=this.addSkippedTokenAfterToken(n,t);return e.replaceToken(n,r)},t.prototype.addSkippedTokensBeforeNode=function(e,t){if(t.length>0){var n=e.firstToken(),r=this.addSkippedTokensBeforeToken(n,t);return e.replaceToken(n,r)}return e},t.prototype.addSkippedTokensBeforeToken=function(t,n){for(var r=[],i=0,o=n.length;o>i;i++)this.addSkippedTokenToTriviaArray(r,n[i]);return this.addTriviaTo(t.leadingTrivia(),r),this.returnArray(n),t.withLeadingTrivia(e.Syntax.triviaList(r))},t.prototype.addSkippedTokensAfterToken=function(t,n){if(0===n.length)return this.returnArray(n),t;for(var r=t.trailingTrivia().toArray(),i=0,o=n.length;o>i;i++)this.addSkippedTokenToTriviaArray(r,n[i]);return this.returnArray(n),t.withTrailingTrivia(e.Syntax.triviaList(r))},t.prototype.addSkippedTokenAfterToken=function(t,n){var r=t.trailingTrivia().toArray();return this.addSkippedTokenToTriviaArray(r,n),t.withTrailingTrivia(e.Syntax.triviaList(r))},t.prototype.addSkippedTokenToTriviaArray=function(t,n){this.addTriviaTo(n.leadingTrivia(),t);var r=n.withLeadingTrivia(e.Syntax.emptyTriviaList).withTrailingTrivia(e.Syntax.emptyTriviaList);t.push(e.Syntax.skippedTokenTrivia(r)),this.addTriviaTo(n.trailingTrivia(),t)},t.prototype.addTriviaTo=function(e,t){for(var n=0,r=e.count();r>n;n++)t.push(e.syntaxTriviaAt(n))},t.prototype.parseSyntaxTree=function(t){var n=this.parseSourceUnit(),r=this.source.tokenDiagnostics().concat(this.diagnostics);return r.sort(function(e,t){return e.start()-t.start()}),new e.SyntaxTree(n,t,r,this.fileName,this.lineMap,this.parseOptions)},t.prototype.setStrictMode=function(t){this.isInStrictMode=t,this.factory=t?e.Syntax.strictModeFactory:e.Syntax.normalModeFactory},t.prototype.parseSourceUnit=function(){var n=this.isInStrictMode,r=this.parseSyntaxList(1,t.updateStrictModeState),i=r.list;this.setStrictMode(n);var o=this.factory.sourceUnit(i,this.currentToken());return o=this.addSkippedTokensBeforeNode(o,r.skippedTokens),e.Debug.shouldAssert(2)&&(e.Debug.assert(o.fullWidth()===this.newText_forDebuggingPurposesOnly.length()),e.Debug.shouldAssert(3)&&e.Debug.assert(o.fullText()===this.newText_forDebuggingPurposesOnly.substr(0,this.newText_forDebuggingPurposesOnly.length(),!1))),o},t.updateStrictModeState=function(t,n){if(!t.isInStrictMode){for(var r=0;r0&&49===this.peekToken(e).tokenKind?!0:49===this.currentToken().tokenKind&&this.isIdentifier(this.peekToken(1))},t.prototype.parseImportDeclaration=function(){var e=this.parseModifiers(),t=this.eatKeyword(49),n=this.eatIdentifierToken(),r=this.eatToken(107),i=this.parseModuleReference(),o=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.importDeclaration(e,t,n,r,i,o)},t.prototype.isExportAssignment=function(){return 47===this.currentToken().tokenKind&&107===this.peekToken(1).tokenKind},t.prototype.parseExportAssignment=function(){var e=this.eatKeyword(47),t=this.eatToken(107),n=this.eatIdentifierToken(),r=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.exportAssignment(e,t,n,r)},t.prototype.parseModuleReference=function(){return this.isExternalModuleReference()?this.parseExternalModuleReference():this.parseModuleNameModuleReference()},t.prototype.isExternalModuleReference=function(){var e=this.currentToken();return 66===e.tokenKind?72===this.peekToken(1).tokenKind:!1},t.prototype.parseExternalModuleReference=function(){var e=this.eatKeyword(66),t=this.eatToken(72),n=this.eatToken(14),r=this.eatToken(73);return this.factory.externalModuleReference(e,t,n,r)},t.prototype.parseModuleNameModuleReference=function(){var e=this.parseName();return this.factory.moduleNameModuleReference(e)},t.prototype.parseIdentifierName=function(){var e=this.eatIdentifierNameToken();return e},t.prototype.tryParseTypeArgumentList=function(e){if(80!==this.currentToken().kind())return null;var t,n,r,i;if(!e)return t=this.eatToken(80),r=this.parseSeparatedSyntaxList(262144),i=r.list,t=this.addSkippedTokensAfterToken(t,r.skippedTokens),n=this.eatToken(81),this.factory.typeArgumentList(t,i,n);var o=this.getRewindPoint();if(t=this.eatToken(80),r=this.parseSeparatedSyntaxList(262144),i=r.list,t=this.addSkippedTokensAfterToken(t,r.skippedTokens),n=this.eatToken(81),0!==n.fullWidth()&&this.canFollowTypeArgumentListInExpression(this.currentToken().kind())){this.releaseRewindPoint(o);var a=this.factory.typeArgumentList(t,i,n);return a}return this.rewind(o),this.releaseRewindPoint(o),null},t.prototype.canFollowTypeArgumentListInExpression=function(e){switch(e){case 72:case 76:case 73:case 75:case 106:case 78:case 79:case 105:case 84:case 87:case 86:case 88:case 103:case 104:case 100:case 98:case 99:case 71:case 10:return!0;default:return!1}},t.prototype.parseName=function(){for(var t=this.isIdentifier(this.currentToken()),n=this.eatIdentifierToken();t&&76===this.currentToken().tokenKind;){var r,i=this.eatToken(76),o=this.currentToken();r=e.SyntaxFacts.isAnyKeyword(o.tokenKind)&&this.previousToken().hasTrailingNewLine()&&!o.hasTrailingNewLine()&&e.SyntaxFacts.isIdentifierNameOrAnyKeyword(this.peekToken(1))?this.createMissingToken(11,o):this.eatIdentifierNameToken(),n=this.factory.qualifiedName(n,i,r),t=r.fullWidth()>0}return n},t.prototype.isEnumDeclaration=function(e){return e>0&&46===this.peekToken(e).tokenKind?!0:46===this.currentToken().tokenKind&&this.isIdentifier(this.peekToken(1))},t.prototype.parseEnumDeclaration=function(){var t=this.parseModifiers(),n=this.eatKeyword(46),r=this.eatIdentifierToken(),i=this.eatToken(70),o=e.Syntax.emptySeparatedList;if(i.width()>0){var a=this.parseSeparatedSyntaxList(256);o=a.list,i=this.addSkippedTokensAfterToken(i,a.skippedTokens)}var s=this.eatToken(71);return this.factory.enumDeclaration(t,n,r,i,o,s)},t.prototype.isEnumElement=function(e){return null!==this.currentNode()&&243===this.currentNode().kind()?!0:this.isPropertyName(this.currentToken(),e)},t.prototype.parseEnumElement=function(){if(null!==this.currentNode()&&243===this.currentNode().kind())return this.eatNode();var e=this.eatPropertyName(),t=null;return this.isEqualsValueClause(!1)&&(t=this.parseEqualsValueClause(!0)),this.factory.enumElement(e,t)},t.isModifier=function(e){switch(e.tokenKind){case 57:case 55:case 58:case 47:case 63:return!0;default:return!1}},t.prototype.modifierCount=function(){for(var e=0;;){if(!t.isModifier(this.peekToken(e)))break;e++}return e},t.prototype.parseModifiers=function(){for(var n=this.getArray();;){if(!t.isModifier(this.currentToken()))break;n.push(this.eatAnyToken())}var r=e.Syntax.list(n);return this.returnZeroOrOneLengthArray(n),r},t.prototype.isClassDeclaration=function(e){return e>0&&44===this.peekToken(e).tokenKind?!0:44===this.currentToken().tokenKind&&this.isIdentifier(this.peekToken(1))},t.prototype.parseHeritageClauses=function(){var t=e.Syntax.emptyList;if(this.isHeritageClause()){var n=this.parseSyntaxList(1024);t=n.list,e.Debug.assert(0===n.skippedTokens.length)}return t},t.prototype.parseClassDeclaration=function(){var t=this.parseModifiers(),n=this.eatKeyword(44),r=this.eatIdentifierToken(),i=this.parseOptionalTypeParameterList(!1),o=this.parseHeritageClauses(),a=this.eatToken(70),s=e.Syntax.emptyList;if(a.width()>0){var l=this.parseSyntaxList(2);s=l.list,a=this.addSkippedTokensAfterToken(a,l.skippedTokens)}var c=this.eatToken(71);return this.factory.classDeclaration(t,n,r,i,o,a,s,c)},t.isPublicOrPrivateKeyword=function(e){return 57===e.tokenKind||55===e.tokenKind},t.prototype.isAccessor=function(e){var t=this.modifierCount();return 64!==this.peekToken(t).tokenKind&&68!==this.peekToken(t).tokenKind?!1:(t++,this.isPropertyName(this.peekToken(t),e))},t.prototype.parseAccessor=function(t){var n=this.parseModifiers();if(64===this.currentToken().tokenKind)return this.parseGetMemberAccessorDeclaration(n,t);if(68===this.currentToken().tokenKind)return this.parseSetMemberAccessorDeclaration(n,t);throw e.Errors.invalidOperation()},t.prototype.parseGetMemberAccessorDeclaration=function(e,t){var n=this.eatKeyword(64),r=this.eatPropertyName(),i=this.parseParameterList(),o=this.parseOptionalTypeAnnotation(!1),a=this.parseBlock(!1,t);return this.factory.getAccessor(e,n,r,i,o,a)},t.prototype.parseSetMemberAccessorDeclaration=function(e,t){var n=this.eatKeyword(68),r=this.eatPropertyName(),i=this.parseParameterList(),o=this.parseBlock(!1,t);return this.factory.setAccessor(e,n,r,i,o)},t.prototype.isClassElement=function(e){return null!==this.currentNode()&&this.currentNode().isClassElement()?!0:this.isConstructorDeclaration()||this.isMemberFunctionDeclaration(e)||this.isAccessor(e)||this.isMemberVariableDeclaration(e)||this.isIndexMemberDeclaration()},t.prototype.parseClassElement=function(t){if(null!==this.currentNode()&&this.currentNode().isClassElement())return this.eatNode();if(this.isConstructorDeclaration())return this.parseConstructorDeclaration();if(this.isMemberFunctionDeclaration(t))return this.parseMemberFunctionDeclaration();if(this.isAccessor(t))return this.parseAccessor(!1);if(this.isMemberVariableDeclaration(t))return this.parseMemberVariableDeclaration();if(this.isIndexMemberDeclaration())return this.parseIndexMemberDeclaration();throw e.Errors.invalidOperation()},t.prototype.isConstructorDeclaration=function(){var e=this.modifierCount();return 62===this.peekToken(e).tokenKind&&72===this.peekToken(e+1).tokenKind},t.prototype.parseConstructorDeclaration=function(){var e=this.parseModifiers(),t=this.eatKeyword(62),n=this.parseParameterList(),r=null,i=null;return this.isBlock()?i=this.parseBlock(!1,!0):r=this.eatExplicitOrAutomaticSemicolon(!1),this.factory.constructorDeclaration(e,t,n,i,r)},t.prototype.isMemberFunctionDeclaration=function(e){for(var n=0;;){var r=this.peekToken(n);if(this.isPropertyName(r,e)&&this.isCallSignature(n+1))return!0;{if(!t.isModifier(r))return!1;n++}}},t.prototype.parseMemberFunctionDeclaration=function(){for(var n=this.getArray();;){var r=this.currentToken();if(this.isPropertyName(r,!1)&&this.isCallSignature(1))break;e.Debug.assert(t.isModifier(r)),n.push(this.eatAnyToken())}var i=e.Syntax.list(n);this.returnZeroOrOneLengthArray(n);var o=this.eatPropertyName(),a=this.parseCallSignature(!1),s=!1,l=this.tryAddUnexpectedEqualsGreaterThanToken(a);l!==a&&(s=!0,a=l);var c=null,u=null;return s||this.isBlock()?c=this.parseBlock(s,!0):u=this.eatExplicitOrAutomaticSemicolon(!1),this.factory.memberFunctionDeclaration(i,o,a,c,u)},t.prototype.isDefinitelyMemberVariablePropertyName=function(t){if(!e.SyntaxFacts.isAnyKeyword(this.peekToken(t).tokenKind))return!0;switch(this.peekToken(t+1).tokenKind){case 78:case 107:case 106:case 71:case 10:return!0;default:return!1}},t.prototype.isMemberVariableDeclaration=function(e){for(var n=0;;){var r=this.peekToken(n);if(this.isPropertyName(r,e)&&this.isDefinitelyMemberVariablePropertyName(n))return!0;{if(!t.isModifier(this.peekToken(n)))return!1;n++}}},t.prototype.parseMemberVariableDeclaration=function(){for(var n=this.getArray();;){var r=this.currentToken();if(this.isPropertyName(r,!1)&&this.isDefinitelyMemberVariablePropertyName(0))break;e.Debug.assert(t.isModifier(r)),n.push(this.eatAnyToken())}var i=e.Syntax.list(n);this.returnZeroOrOneLengthArray(n);var o=this.parseVariableDeclarator(!0,!0),a=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.memberVariableDeclaration(i,o,a)},t.prototype.isIndexMemberDeclaration=function(){var e=this.modifierCount();return this.isIndexSignature(e)},t.prototype.parseIndexMemberDeclaration=function(){var e=this.parseModifiers(),t=this.parseIndexSignature(),n=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.indexMemberDeclaration(e,t,n)},t.prototype.tryAddUnexpectedEqualsGreaterThanToken=function(t){var n=this.currentToken(),r=85===n.tokenKind;if(r&&t.lastToken()){var i=new e.Diagnostic(this.fileName,this.lineMap,this.currentTokenStart(),n.width(),e.DiagnosticCode.Unexpected_token_0_expected,[e.SyntaxFacts.getText(70)]);this.addDiagnostic(i);{this.eatAnyToken()}return this.addSkippedTokenAfterNode(t,n)}return t},t.prototype.isFunctionDeclaration=function(){var e=this.modifierCount();return 27===this.peekToken(e).tokenKind},t.prototype.parseFunctionDeclaration=function(){var e=this.parseModifiers(),t=this.eatKeyword(27),n=this.eatIdentifierToken(),r=this.parseCallSignature(!1),i=!1,o=this.tryAddUnexpectedEqualsGreaterThanToken(r);o!==r&&(i=!0,r=o);var a=null,s=null;return i||this.isBlock()?s=this.parseBlock(i,!0):a=this.eatExplicitOrAutomaticSemicolon(!1),this.factory.functionDeclaration(e,t,n,r,s,a)},t.prototype.isModuleDeclaration=function(e){if(e>0&&65===this.peekToken(e).tokenKind)return!0;if(65===this.currentToken().tokenKind){var t=this.peekToken(1);return this.isIdentifier(t)||14===t.tokenKind}return!1},t.prototype.parseModuleDeclaration=function(){var t=this.parseModifiers(),n=this.eatKeyword(65),r=null,i=null;14===this.currentToken().tokenKind?i=this.eatToken(14):r=this.parseName();var o=this.eatToken(70),a=e.Syntax.emptyList;if(o.width()>0){var s=this.parseSyntaxList(4);a=s.list,o=this.addSkippedTokensAfterToken(o,s.skippedTokens)}var l=this.eatToken(71);return this.factory.moduleDeclaration(t,n,r,i,o,a,l)},t.prototype.isInterfaceDeclaration=function(e){return e>0&&52===this.peekToken(e).tokenKind?!0:52===this.currentToken().tokenKind&&this.isIdentifier(this.peekToken(1))},t.prototype.parseInterfaceDeclaration=function(){var e=this.parseModifiers(),t=this.eatKeyword(52),n=this.eatIdentifierToken(),r=this.parseOptionalTypeParameterList(!1),i=this.parseHeritageClauses(),o=this.parseObjectType();return this.factory.interfaceDeclaration(e,t,n,r,i,o)},t.prototype.parseObjectType=function(){var t=this.eatToken(70),n=e.Syntax.emptySeparatedList;if(t.width()>0){var r=this.parseSeparatedSyntaxList(512);n=r.list,t=this.addSkippedTokensAfterToken(t,r.skippedTokens)}var i=this.eatToken(71);return this.factory.objectType(t,n,i)},t.prototype.isTypeMember=function(e){return null!==this.currentNode()&&this.currentNode().isTypeMember()?!0:this.isCallSignature(0)||this.isConstructSignature()||this.isIndexSignature(0)||this.isMethodSignature(e)||this.isPropertySignature(e)},t.prototype.parseTypeMember=function(t){if(null!==this.currentNode()&&this.currentNode().isTypeMember())return this.eatNode();if(this.isCallSignature(0))return this.parseCallSignature(!1);if(this.isConstructSignature())return this.parseConstructSignature();if(this.isIndexSignature(0))return this.parseIndexSignature();if(this.isMethodSignature(t))return this.parseMethodSignature();if(this.isPropertySignature(t))return this.parsePropertySignature();throw e.Errors.invalidOperation()},t.prototype.parseConstructSignature=function(){var e=this.eatKeyword(31),t=this.parseCallSignature(!1);return this.factory.constructSignature(e,t)},t.prototype.parseIndexSignature=function(){var e=this.eatToken(74),t=this.parseParameter(),n=this.eatToken(75),r=this.parseOptionalTypeAnnotation(!1);return this.factory.indexSignature(e,t,n,r)},t.prototype.parseMethodSignature=function(){var e=this.eatPropertyName(),t=this.tryEatToken(105),n=this.parseCallSignature(!1);return this.factory.methodSignature(e,t,n)},t.prototype.parsePropertySignature=function(){var e=this.eatPropertyName(),t=this.tryEatToken(105),n=this.parseOptionalTypeAnnotation(!1);return this.factory.propertySignature(e,t,n)},t.prototype.isCallSignature=function(e){var t=this.peekToken(e).tokenKind;return 72===t||80===t},t.prototype.isConstructSignature=function(){if(31!==this.currentToken().tokenKind)return!1;var e=this.peekToken(1);return 80===e.tokenKind||72===e.tokenKind},t.prototype.isIndexSignature=function(e){return 74===this.peekToken(e).tokenKind},t.prototype.isMethodSignature=function(e){if(this.isPropertyName(this.currentToken(),e)){if(this.isCallSignature(1))return!0;if(105===this.peekToken(1).tokenKind&&this.isCallSignature(2))return!0}return!1},t.prototype.isPropertySignature=function(e){var n=this.currentToken();return t.isModifier(n)&&!n.hasTrailingNewLine()&&this.isPropertyName(this.peekToken(1),e)?!1:this.isPropertyName(n,e)},t.prototype.isHeritageClause=function(){var e=this.currentToken();return 48===e.tokenKind||51===e.tokenKind},t.prototype.isNotHeritageClauseTypeName=function(){return 51===this.currentToken().tokenKind||48===this.currentToken().tokenKind?this.isIdentifier(this.peekToken(1)):!1},t.prototype.isHeritageClauseTypeName=function(){return this.isIdentifier(this.currentToken())?!this.isNotHeritageClauseTypeName():!1},t.prototype.parseHeritageClause=function(){var t=this.eatAnyToken();e.Debug.assert(48===t.tokenKind||51===t.tokenKind);var n=this.parseSeparatedSyntaxList(2048),r=n.list;return t=this.addSkippedTokensAfterToken(t,n.skippedTokens),this.factory.heritageClause(48===t.tokenKind?230:231,t,r)},t.prototype.isStatement=function(t){if(null!==this.currentNode()&&this.currentNode().isStatement())return!0;var n=this.currentToken(),r=n.tokenKind;switch(r){case 57:case 55:case 58:var i=this.peekToken(1);if(e.SyntaxFacts.isIdentifierNameOrAnyKeyword(i))return!1;break;case 28:case 70:case 33:case 34:case 36:case 15:case 18:case 26:case 42:case 43:case 22:case 38:case 19:return!0}return this.isInterfaceDeclaration(0)||this.isClassDeclaration(0)||this.isEnumDeclaration(0)||this.isModuleDeclaration(0)?!1:this.isLabeledStatement(n)||this.isVariableStatement()||this.isFunctionDeclaration()||this.isEmptyStatement(n,t)||this.isExpressionStatement(n)},t.prototype.parseStatement=function(e){if(null!==this.currentNode()&&this.currentNode().isStatement())return this.eatNode();var t=this.currentToken(),n=t.tokenKind;switch(n){case 28:return this.parseIfStatement();case 70:return this.parseBlock(!1,!1);case 33:return this.parseReturnStatement();case 34:return this.parseSwitchStatement();case 36:return this.parseThrowStatement();case 15:return this.parseBreakStatement();case 18:return this.parseContinueStatement();case 26:return this.parseForOrForInStatement();case 42:return this.parseWhileStatement();case 43:return this.parseWithStatement();case 22:return this.parseDoStatement();case 38:return this.parseTryStatement();case 19:return this.parseDebuggerStatement()}return this.isVariableStatement()?this.parseVariableStatement():this.isLabeledStatement(t)?this.parseLabeledStatement():this.isFunctionDeclaration()?this.parseFunctionDeclaration():this.isEmptyStatement(t,e)?this.parseEmptyStatement():this.parseExpressionStatement()},t.prototype.parseDebuggerStatement=function(){var e=this.eatKeyword(19),t=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.debuggerStatement(e,t)},t.prototype.parseDoStatement=function(){var e=this.eatKeyword(22),t=this.parseStatement(!1),n=this.eatKeyword(42),r=this.eatToken(72),i=this.parseExpression(!0),o=this.eatToken(73),a=this.eatExplicitOrAutomaticSemicolon(!0);return this.factory.doStatement(e,t,n,r,i,o,a)},t.prototype.isLabeledStatement=function(e){return this.isIdentifier(e)&&106===this.peekToken(1).tokenKind},t.prototype.parseLabeledStatement=function(){var e=this.eatIdentifierToken(),t=this.eatToken(106),n=this.parseStatement(!1);return this.factory.labeledStatement(e,t,n)},t.prototype.parseTryStatement=function(){var e=this.eatKeyword(38),t=this.listParsingState;this.listParsingState|=64;var n=this.parseBlock(!1,!1);this.listParsingState=t;var r=null;this.isCatchClause()&&(r=this.parseCatchClause());var i=null;return(null===r||this.isFinallyClause())&&(i=this.parseFinallyClause()),this.factory.tryStatement(e,n,r,i)},t.prototype.isCatchClause=function(){return 17===this.currentToken().tokenKind},t.prototype.parseCatchClause=function(){var e=this.eatKeyword(17),t=this.eatToken(72),n=this.eatIdentifierToken(),r=this.parseOptionalTypeAnnotation(!1),i=this.eatToken(73),o=this.listParsingState;this.listParsingState|=128;var a=this.parseBlock(!1,!1);return this.listParsingState=o,this.factory.catchClause(e,t,n,r,i,a)},t.prototype.isFinallyClause=function(){return 25===this.currentToken().tokenKind},t.prototype.parseFinallyClause=function(){var e=this.eatKeyword(25),t=this.parseBlock(!1,!1);return this.factory.finallyClause(e,t)},t.prototype.parseWithStatement=function(){var e=this.eatKeyword(43),t=this.eatToken(72),n=this.parseExpression(!0),r=this.eatToken(73),i=this.parseStatement(!1);return this.factory.withStatement(e,t,n,r,i)},t.prototype.parseWhileStatement=function(){var e=this.eatKeyword(42),t=this.eatToken(72),n=this.parseExpression(!0),r=this.eatToken(73),i=this.parseStatement(!1);return this.factory.whileStatement(e,t,n,r,i)},t.prototype.isEmptyStatement=function(e,t){return t?!1:78===e.tokenKind},t.prototype.parseEmptyStatement=function(){var e=this.eatToken(78);return this.factory.emptyStatement(e)},t.prototype.parseForOrForInStatement=function(){var e=this.eatKeyword(26),t=this.eatToken(72),n=this.currentToken();return 40===n.tokenKind?this.parseForOrForInStatementWithVariableDeclaration(e,t):78===n.tokenKind?this.parseForStatementWithNoVariableDeclarationOrInitializer(e,t):this.parseForOrForInStatementWithInitializer(e,t)},t.prototype.parseForOrForInStatementWithVariableDeclaration=function(e,t){var n=this.parseVariableDeclaration(!1);return 29===this.currentToken().tokenKind?this.parseForInStatementWithVariableDeclarationOrInitializer(e,t,n,null):this.parseForStatementWithVariableDeclarationOrInitializer(e,t,n,null)},t.prototype.parseForInStatementWithVariableDeclarationOrInitializer=function(e,t,n,r){var i=this.eatKeyword(29),o=this.parseExpression(!0),a=this.eatToken(73),s=this.parseStatement(!1);return this.factory.forInStatement(e,t,n,r,i,o,a,s)},t.prototype.parseForOrForInStatementWithInitializer=function(e,t){var n=this.parseExpression(!1);return 29===this.currentToken().tokenKind?this.parseForInStatementWithVariableDeclarationOrInitializer(e,t,null,n):this.parseForStatementWithVariableDeclarationOrInitializer(e,t,null,n)},t.prototype.parseForStatementWithNoVariableDeclarationOrInitializer=function(e,t){return this.parseForStatementWithVariableDeclarationOrInitializer(e,t,null,null)},t.prototype.parseForStatementWithVariableDeclarationOrInitializer=function(e,t,n,r){var i=this.eatToken(78),o=null;78!==this.currentToken().tokenKind&&73!==this.currentToken().tokenKind&&10!==this.currentToken().tokenKind&&(o=this.parseExpression(!0));var a=this.eatToken(78),s=null;73!==this.currentToken().tokenKind&&10!==this.currentToken().tokenKind&&(s=this.parseExpression(!0));var l=this.eatToken(73),c=this.parseStatement(!1);return this.factory.forStatement(e,t,n,r,i,o,a,s,l,c)},t.prototype.parseBreakStatement=function(){var e=this.eatKeyword(15),t=null;this.canEatExplicitOrAutomaticSemicolon(!1)||this.isIdentifier(this.currentToken())&&(t=this.eatIdentifierToken());var n=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.breakStatement(e,t,n)},t.prototype.parseContinueStatement=function(){var e=this.eatKeyword(18),t=null;this.canEatExplicitOrAutomaticSemicolon(!1)||this.isIdentifier(this.currentToken())&&(t=this.eatIdentifierToken());var n=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.continueStatement(e,t,n)},t.prototype.parseSwitchStatement=function(){var t=this.eatKeyword(34),n=this.eatToken(72),r=this.parseExpression(!0),i=this.eatToken(73),o=this.eatToken(70),a=e.Syntax.emptyList;if(o.width()>0){var s=this.parseSyntaxList(8);a=s.list,o=this.addSkippedTokensAfterToken(o,s.skippedTokens)}var l=this.eatToken(71);return this.factory.switchStatement(t,n,r,i,o,a,l)},t.prototype.isCaseSwitchClause=function(){return 16===this.currentToken().tokenKind},t.prototype.isDefaultSwitchClause=function(){return 20===this.currentToken().tokenKind},t.prototype.isSwitchClause=function(){return null!==this.currentNode()&&this.currentNode().isSwitchClause()?!0:this.isCaseSwitchClause()||this.isDefaultSwitchClause()},t.prototype.parseSwitchClause=function(){if(null!==this.currentNode()&&this.currentNode().isSwitchClause())return this.eatNode();if(this.isCaseSwitchClause())return this.parseCaseSwitchClause();if(this.isDefaultSwitchClause())return this.parseDefaultSwitchClause();throw e.Errors.invalidOperation()},t.prototype.parseCaseSwitchClause=function(){var t=this.eatKeyword(16),n=this.parseExpression(!0),r=this.eatToken(106),i=e.Syntax.emptyList;if(r.fullWidth()>0){var o=this.parseSyntaxList(16);i=o.list,r=this.addSkippedTokensAfterToken(r,o.skippedTokens)}return this.factory.caseSwitchClause(t,n,r,i)},t.prototype.parseDefaultSwitchClause=function(){var t=this.eatKeyword(20),n=this.eatToken(106),r=e.Syntax.emptyList;if(n.fullWidth()>0){var i=this.parseSyntaxList(16);r=i.list,n=this.addSkippedTokensAfterToken(n,i.skippedTokens)}return this.factory.defaultSwitchClause(t,n,r)},t.prototype.parseThrowStatement=function(){var e=this.eatKeyword(36),t=null;if(this.canEatExplicitOrAutomaticSemicolon(!1)){var n=this.createMissingToken(11,null);t=n}else t=this.parseExpression(!0);var r=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.throwStatement(e,t,r)},t.prototype.parseReturnStatement=function(){var e=this.eatKeyword(33),t=null;this.canEatExplicitOrAutomaticSemicolon(!1)||(t=this.parseExpression(!0));var n=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.returnStatement(e,t,n)},t.prototype.isExpressionStatement=function(e){var t=e.tokenKind;return 70===t||27===t?!1:this.isExpression(e)},t.prototype.isAssignmentOrOmittedExpression=function(){var e=this.currentToken();return 79===e.tokenKind?!0:this.isExpression(e)},t.prototype.parseAssignmentOrOmittedExpression=function(){return 79===this.currentToken().tokenKind?this.factory.omittedExpression():this.parseAssignmentExpression(!0)},t.prototype.isExpression=function(e){switch(e.tokenKind){case 13:case 14:case 12:case 74:case 72:case 80:case 93:case 94:case 89:case 90:case 102:case 101:case 70:case 85:case 118:case 119:case 50:case 35:case 37:case 24:case 32:case 31:case 21:case 41:case 39:case 27:return!0}return this.isIdentifier(e)},t.prototype.parseExpressionStatement=function(){var e=this.parseExpression(!0),t=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.expressionStatement(e,t)},t.prototype.parseIfStatement=function(){var e=this.eatKeyword(28),t=this.eatToken(72),n=this.parseExpression(!0),r=this.eatToken(73),i=this.parseStatement(!1),o=null;return this.isElseClause()&&(o=this.parseElseClause()),this.factory.ifStatement(e,t,n,r,i,o)},t.prototype.isElseClause=function(){return 23===this.currentToken().tokenKind},t.prototype.parseElseClause=function(){var e=this.eatKeyword(23),t=this.parseStatement(!1);return this.factory.elseClause(e,t)},t.prototype.isVariableStatement=function(){var e=this.modifierCount();return 40===this.peekToken(e).tokenKind||53===this.peekToken(e).tokenKind||45===this.peekToken(e).tokenKind},t.prototype.parseVariableStatement=function(){var e=this.parseModifiers(),t=this.parseVariableDeclaration(!0),n=this.eatExplicitOrAutomaticSemicolon(!1);return this.factory.variableStatement(e,t,n)},t.prototype.parseVariableDeclaration=function(e){var t,n=this.currentToken().tokenKind;t=this.eatKeyword(53===n?53:45===n?45:40);var r=e?4096:8192,i=this.parseSeparatedSyntaxList(r),o=i.list;return t=this.addSkippedTokensAfterToken(t,i.skippedTokens),this.factory.variableDeclaration(t,o,n)},t.prototype.isVariableDeclarator=function(){return null!==this.currentNode()&&225===this.currentNode().kind()?!0:this.isIdentifier(this.currentToken()) },t.prototype.canReuseVariableDeclaratorNode=function(e){if(null===e||225!==e.kind())return!1;var t=e;return null===t.equalsValueClause},t.prototype.parseVariableDeclarator=function(e,t){if(this.canReuseVariableDeclaratorNode(this.currentNode()))return this.eatNode();var n=t?this.eatPropertyName():this.eatIdentifierToken(),r=null,i=null;return n.width()>0&&(i=this.parseOptionalTypeAnnotation(!1),this.isEqualsValueClause(!1)&&(r=this.parseEqualsValueClause(e))),this.factory.variableDeclarator(n,i,r)},t.prototype.isColonValueClause=function(){return 106===this.currentToken().tokenKind},t.prototype.isEqualsValueClause=function(e){var t=this.currentToken();return 107===t.tokenKind?!0:this.previousToken().hasTrailingNewLine()?!1:85===t.tokenKind?!1:70===t.tokenKind&&e?!1:this.isExpression(t)},t.prototype.parseEqualsValueClause=function(e){var t=this.eatToken(107),n=this.parseAssignmentExpression(e);return this.factory.equalsValueClause(t,n)},t.prototype.parseExpression=function(e){return this.parseSubExpression(0,e)},t.prototype.parseAssignmentExpression=function(e){return this.parseSubExpression(2,e)},t.prototype.parseUnaryExpressionOrLower=function(){var t=this.currentToken().tokenKind;if(e.SyntaxFacts.isPrefixUnaryExpressionOperatorToken(t)){var n=e.SyntaxFacts.getPrefixUnaryExpressionFromOperatorToken(t),r=this.eatAnyToken(),i=this.parseUnaryExpressionOrLower();return this.factory.prefixUnaryExpression(n,r,i)}return 39===t?this.parseTypeOfExpression():41===t?this.parseVoidExpression():21===t?this.parseDeleteExpression():80===t?this.parseCastExpression():this.parsePostfixExpressionOrLower()},t.prototype.parseSubExpression=function(e,t){if(2>=e){if(this.isSimpleArrowFunctionExpression())return this.parseSimpleArrowFunctionExpression();var n=this.tryParseParenthesizedArrowFunctionExpression();if(null!==n)return n}var r=this.parseUnaryExpressionOrLower();return this.parseBinaryOrConditionalExpressions(e,t,r)},t.prototype.parseBinaryOrConditionalExpressions=function(n,r,i){for(;;){var o=this.currentToken(),a=o.tokenKind;if(e.SyntaxFacts.isBinaryExpressionOperatorToken(a)){if(29===a&&!r)break;var s=this.tryMergeBinaryExpressionTokens(),l=null===s?a:s.syntaxKind,c=e.SyntaxFacts.getBinaryExpressionFromOperatorToken(l),u=t.getPrecedence(c);if(n>u)break;if(u===n&&!this.isRightAssociative(c))break;for(var p=null===s?o:e.Syntax.token(s.syntaxKind).withLeadingTrivia(o.leadingTrivia()).withTrailingTrivia(this.peekToken(s.tokenCount-1).trailingTrivia()),h=null===s?1:s.tokenCount,d=0;h>d;d++)this.eatAnyToken();i=this.factory.binaryExpression(c,i,p,this.parseSubExpression(u,r))}else{if(!(105===a&&3>=n))break;var m=this.eatToken(105),y=this.parseAssignmentExpression(r),f=this.eatToken(106),g=this.parseAssignmentExpression(r);i=this.factory.conditionalExpression(i,m,y,f,g)}}return i},t.prototype.tryMergeBinaryExpressionTokens=function(){var e=this.currentToken();if(81===e.tokenKind&&!e.hasTrailingTrivia()){var t=this.mergeTokensStorage;t[0]=0,t[1]=0,t[2]=0;for(var n=0;n0){var i=this.parseSeparatedSyntaxList(16384);r=i.list,n=this.addSkippedTokensAfterToken(n,i.skippedTokens)}var o=this.eatToken(73);return this.factory.argumentList(t,n,r,o)},t.prototype.parseElementAccessExpression=function(t,n){var r,i=this.currentTokenStart(),o=this.eatToken(74);if(75===this.currentToken().tokenKind&&n){var a=this.currentTokenStart()+this.currentToken().width(),s=new e.Diagnostic(this.fileName,this.lineMap,i,a-i,e.DiagnosticCode.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead,null);this.addDiagnostic(s),r=e.Syntax.emptyToken(11)}else r=this.parseExpression(!0);var l=this.eatToken(75);return this.factory.elementAccessExpression(t,o,r,l)},t.prototype.parsePrimaryExpression=function(){var e=this.currentToken();if(this.isIdentifier(e))return this.eatIdentifierToken();var t=e.tokenKind;switch(t){case 35:return this.parseThisExpression();case 37:case 24:return this.parseLiteralExpression();case 32:return this.parseLiteralExpression();case 27:return this.parseFunctionExpression();case 13:return this.parseLiteralExpression();case 12:return this.parseLiteralExpression();case 14:return this.parseLiteralExpression();case 74:return this.parseArrayLiteralExpression();case 70:return this.parseObjectLiteralExpression();case 72:return this.parseParenthesizedExpression();case 118:case 119:var n=this.tryReparseDivideAsRegularExpression();if(null!==n)return n}return null},t.prototype.tryReparseDivideAsRegularExpression=function(){var t=this.currentToken();if(null!==this.previousToken()){var n=this.previousToken().tokenKind;switch(n){case 11:return null;case 35:case 37:case 24:return null;case 14:case 13:case 12:case 93:case 94:case 75:return null}}if(t=this.currentTokenAllowingRegularExpression(),118===t.tokenKind||119===t.tokenKind)return null;if(12===t.tokenKind)return this.parseLiteralExpression();throw e.Errors.invalidOperation()},t.prototype.parseTypeOfExpression=function(){var e=this.eatKeyword(39),t=this.parseUnaryExpressionOrLower();return this.factory.typeOfExpression(e,t)},t.prototype.parseDeleteExpression=function(){var e=this.eatKeyword(21),t=this.parseUnaryExpressionOrLower();return this.factory.deleteExpression(e,t)},t.prototype.parseVoidExpression=function(){var e=this.eatKeyword(41),t=this.parseUnaryExpressionOrLower();return this.factory.voidExpression(e,t)},t.prototype.parseFunctionExpression=function(){var e=this.eatKeyword(27),t=null;this.isIdentifier(this.currentToken())&&(t=this.eatIdentifierToken());var n=this.parseCallSignature(!1),r=this.parseBlock(!1,!0);return this.factory.functionExpression(e,t,n,r)},t.prototype.parseObjectCreationExpression=function(){var e=this.eatKeyword(31),t=this.parseObjectCreationExpressionOrLower(!0),n=this.tryParseArgumentList(),r=this.factory.objectCreationExpression(e,t,n);return this.parseMemberExpressionRest(r,!0,!1)},t.prototype.parseObjectCreationExpressionOrLower=function(e){return 31===this.currentToken().tokenKind?this.parseObjectCreationExpression():this.parseMemberExpressionOrLower(e)},t.prototype.parseCastExpression=function(){var e=this.eatToken(80),t=this.parseType(),n=this.eatToken(81),r=this.parseUnaryExpressionOrLower();return this.factory.castExpression(e,t,n,r)},t.prototype.parseParenthesizedExpression=function(){var e=this.eatToken(72),t=this.parseExpression(!0),n=this.eatToken(73);return this.factory.parenthesizedExpression(e,t,n)},t.prototype.tryParseParenthesizedArrowFunctionExpression=function(){var e=this.currentToken().tokenKind;if(72!==e&&80!==e)return null;if(this.isDefinitelyArrowFunctionExpression())return this.parseParenthesizedArrowFunctionExpression(!1);if(!this.isPossiblyArrowFunctionExpression())return null;var t=this.getRewindPoint(),n=this.parseParenthesizedArrowFunctionExpression(!0);return null===n&&this.rewind(t),this.releaseRewindPoint(t),n},t.prototype.parseParenthesizedArrowFunctionExpression=function(e){var t=(this.currentToken(),this.parseCallSignature(!0));if(e&&85!==this.currentToken().tokenKind)return null;var n=this.eatToken(85),r=this.tryParseArrowFunctionBlock(),i=null;return null===r&&(i=this.parseAssignmentExpression(!0)),this.factory.parenthesizedArrowFunctionExpression(t,n,r,i)},t.prototype.tryParseArrowFunctionBlock=function(){return this.isBlock()?this.parseBlock(!1,!1):!this.isStatement(!1)||this.isExpressionStatement(this.currentToken())||this.isFunctionDeclaration()?null:this.parseBlock(!0,!1)},t.prototype.isSimpleArrowFunctionExpression=function(){return 85===this.currentToken().tokenKind?!0:this.isIdentifier(this.currentToken())&&85===this.peekToken(1).tokenKind},t.prototype.parseSimpleArrowFunctionExpression=function(){var e=this.eatIdentifierToken(),t=this.eatToken(85),n=this.tryParseArrowFunctionBlock(),r=null;return null===n&&(r=this.parseAssignmentExpression(!0)),this.factory.simpleArrowFunctionExpression(e,t,n,r)},t.prototype.isBlock=function(){return 70===this.currentToken().tokenKind},t.prototype.isDefinitelyArrowFunctionExpression=function(){var e=this.currentToken();if(72!==e.tokenKind)return!1;var t,n=this.peekToken(1);if(73===n.tokenKind)return t=this.peekToken(2),106===t.tokenKind||85===t.tokenKind||70===t.tokenKind;if(77===n.tokenKind)return!0;if(t=this.peekToken(2),(57===n.tokenKind||55===n.tokenKind)&&this.isIdentifier(t))return!0;if(!this.isIdentifier(n))return!1;if(106===t.tokenKind)return!0;var r=this.peekToken(3);return 105!==t.tokenKind||106!==r.tokenKind&&73!==r.tokenKind&&79!==r.tokenKind?73===t.tokenKind&&85===r.tokenKind?!0:!1:!0},t.prototype.isPossiblyArrowFunctionExpression=function(){var e=this.currentToken();if(72!==e.tokenKind)return!0;var t=this.peekToken(1);if(!this.isIdentifier(t))return!1;var n=this.peekToken(2);if(107===n.tokenKind)return!0;if(79===n.tokenKind)return!0;if(73===n.tokenKind){var r=this.peekToken(3);if(106===r.tokenKind)return!0}return!1},t.prototype.parseObjectLiteralExpression=function(){var e=this.eatToken(70),t=this.parseSeparatedSyntaxList(32768),n=t.list;e=this.addSkippedTokensAfterToken(e,t.skippedTokens);var r=this.eatToken(71);return this.factory.objectLiteralExpression(e,n,r)},t.prototype.parsePropertyAssignment=function(t){if(this.isAccessor(t))return this.parseAccessor(!0);if(this.isFunctionPropertyAssignment(t))return this.parseFunctionPropertyAssignment();if(this.isSimplePropertyAssignment(t))return this.parseSimplePropertyAssignment();throw e.Errors.invalidOperation()},t.prototype.isPropertyAssignment=function(e){return this.isAccessor(e)||this.isFunctionPropertyAssignment(e)||this.isSimplePropertyAssignment(e)},t.prototype.eatPropertyName=function(){return e.SyntaxFacts.isIdentifierNameOrAnyKeyword(this.currentToken())?this.eatIdentifierNameToken():this.eatAnyToken()},t.prototype.isFunctionPropertyAssignment=function(e){return this.isPropertyName(this.currentToken(),e)&&this.isCallSignature(1)},t.prototype.parseFunctionPropertyAssignment=function(){var e=this.eatPropertyName(),t=this.parseCallSignature(!1),n=this.parseBlock(!1,!0);return this.factory.functionPropertyAssignment(e,t,n)},t.prototype.isSimplePropertyAssignment=function(e){return this.isPropertyName(this.currentToken(),e)},t.prototype.parseSimplePropertyAssignment=function(){var e=this.eatPropertyName(),t=this.eatToken(106),n=this.parseAssignmentExpression(!0);return this.factory.simplePropertyAssignment(e,t,n)},t.prototype.isPropertyName=function(t,n){if(e.SyntaxFacts.isIdentifierNameOrAnyKeyword(t))return n?this.isIdentifier(t):!0;switch(t.tokenKind){case 14:case 13:return!0;default:return!1}},t.prototype.parseArrayLiteralExpression=function(){var e=this.eatToken(74),t=this.parseSeparatedSyntaxList(65536),n=t.list;e=this.addSkippedTokensAfterToken(e,t.skippedTokens);var r=this.eatToken(75);return this.factory.arrayLiteralExpression(e,n,r)},t.prototype.parseLiteralExpression=function(){return this.eatAnyToken()},t.prototype.parseThisExpression=function(){return this.eatKeyword(35)},t.prototype.parseBlock=function(n,r){var i=this.eatToken(70),o=e.Syntax.emptyList;if(n||i.width()>0){var a=this.isInStrictMode,s=r?t.updateStrictModeState:null,l=this.parseSyntaxList(32,s);o=l.list,i=this.addSkippedTokensAfterToken(i,l.skippedTokens),this.setStrictMode(a)}var c=this.eatToken(71);return this.factory.block(i,o,c)},t.prototype.parseCallSignature=function(e){var t=this.parseOptionalTypeParameterList(e),n=this.parseParameterList(),r=this.parseOptionalTypeAnnotation(!1);return this.factory.callSignature(t,n,r)},t.prototype.parseOptionalTypeParameterList=function(e){if(80!==this.currentToken().tokenKind)return null;var t=this.getRewindPoint(),n=this.eatToken(80),r=this.parseSeparatedSyntaxList(524288),i=r.list;n=this.addSkippedTokensAfterToken(n,r.skippedTokens);var o=this.eatToken(81);if(e&&0===o.fullWidth())return this.rewind(t),this.releaseRewindPoint(t),null;this.releaseRewindPoint(t);var a=this.factory.typeParameterList(n,i,o);return a},t.prototype.isTypeParameter=function(){return this.isIdentifier(this.currentToken())},t.prototype.parseTypeParameter=function(){var e=this.eatIdentifierToken(),t=this.parseOptionalConstraint();return this.factory.typeParameter(e,t)},t.prototype.parseOptionalConstraint=function(){if(48!==this.currentToken().kind())return null;var e=this.eatKeyword(48),t=this.parseType();return this.factory.constraint(e,t)},t.prototype.parseParameterList=function(){var t=this.eatToken(72),n=e.Syntax.emptySeparatedList;if(t.width()>0){var r=this.parseSeparatedSyntaxList(131072);n=r.list,t=this.addSkippedTokensAfterToken(t,r.skippedTokens)}var i=this.eatToken(73);return this.factory.parameterList(t,n,i)},t.prototype.isTypeAnnotation=function(){return 106===this.currentToken().tokenKind},t.prototype.parseOptionalTypeAnnotation=function(e){return this.isTypeAnnotation()?this.parseTypeAnnotation(e):null},t.prototype.parseTypeAnnotation=function(e){var t=this.eatToken(106),n=e&&14===this.currentToken().tokenKind?this.eatToken(14):this.parseType();return this.factory.typeAnnotation(t,n)},t.prototype.isType=function(){var e=this.currentToken(),t=e.tokenKind;switch(t){case 39:case 60:case 67:case 61:case 69:case 41:case 70:case 72:case 80:case 31:return!0}return this.isIdentifier(e)},t.prototype.parseType=function(){var e=this.currentToken(),t=e.tokenKind;if(39===t)return this.parseTypeQuery();for(var n=this.parseNonArrayType(e);74===this.currentToken().tokenKind;){var r=this.eatToken(74),i=this.eatToken(75);n=this.factory.arrayType(n,r,i)}return n},t.prototype.isTypeQuery=function(){return 39===this.currentToken().tokenKind},t.prototype.parseTypeQuery=function(){var e=this.eatToken(39),t=this.parseName();return this.factory.typeQuery(e,t)},t.prototype.parseNonArrayType=function(e){var t=e.tokenKind;switch(t){case 60:case 67:case 61:case 69:case 41:return this.eatAnyToken();case 70:return this.parseObjectType();case 72:case 80:return this.parseFunctionType();case 31:return this.parseConstructorType()}return this.parseNameOrGenericType()},t.prototype.parseNameOrGenericType=function(){var e=this.parseName(),t=this.tryParseTypeArgumentList(!1);return null===t?e:this.factory.genericType(e,t)},t.prototype.parseFunctionType=function(){var e=this.parseOptionalTypeParameterList(!1),t=this.parseParameterList(),n=this.eatToken(85),r=this.parseType();return this.factory.functionType(e,t,n,r)},t.prototype.parseConstructorType=function(){var e=this.eatKeyword(31),t=this.parseOptionalTypeParameterList(!1),n=this.parseParameterList(),r=this.eatToken(85),i=this.parseType();return this.factory.constructorType(e,t,n,r,i)},t.prototype.isParameter=function(){if(null!==this.currentNode()&&242===this.currentNode().kind())return!0;var e=this.currentToken(),n=e.tokenKind;return 77===n?!0:t.isModifier(e)&&!this.isModifierUsedAsParameterIdentifier(e)?!0:this.isIdentifier(e)},t.prototype.isModifierUsedAsParameterIdentifier=function(e){if(this.isIdentifier(e)){var t=this.peekToken(1).tokenKind;switch(t){case 73:case 106:case 107:case 79:case 105:return!0}}return!1},t.prototype.parseParameter=function(){if(null!==this.currentNode()&&242===this.currentNode().kind())return this.eatNode();for(var n=this.tryEatToken(77),r=this.getArray();;){var i=this.currentToken();{if(!t.isModifier(i)||this.isModifierUsedAsParameterIdentifier(i))break;r.push(this.eatAnyToken())}}var o=e.Syntax.list(r);this.returnZeroOrOneLengthArray(r);var a=this.eatIdentifierToken(),s=this.tryEatToken(105),l=this.parseOptionalTypeAnnotation(!0),c=null;return this.isEqualsValueClause(!0)&&(c=this.parseEqualsValueClause(!0)),this.factory.parameter(n,o,a,s,l,c)},t.prototype.parseSyntaxList=function(e,t){"undefined"==typeof t&&(t=null);var n=this.listParsingState;this.listParsingState|=e;var r=this.parseSyntaxListWorker(e,t);return this.listParsingState=n,r},t.prototype.parseSeparatedSyntaxList=function(e){var t=this.listParsingState;this.listParsingState|=e;var n=this.parseSeparatedSyntaxListWorker(e);return this.listParsingState=t,n},t.prototype.abortParsingListOrMoveToNextToken=function(e,t,n){this.reportUnexpectedTokenDiagnostic(e);for(var r=262144;r>=1;r>>=1)if(0!==(this.listParsingState&r)&&(this.isExpectedListTerminator(r)||this.isExpectedListItem(r,!0)))return!0;var i=this.currentToken();return this.moveToNextToken(),this.addSkippedTokenToList(t,n,i),!1},t.prototype.addSkippedTokenToList=function(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r],o=i.lastToken();if(o.fullWidth()>0)return void(e[r]=this.addSkippedTokenAfterNodeOrToken(i,n))}t.push(n)},t.prototype.tryParseExpectedListItem=function(e,t,n,r){if(this.isExpectedListItem(e,t)){var i=this.parseExpectedListItem(e,t);n.push(i),null!==r&&r(this,n)}},t.prototype.listIsTerminated=function(e){return this.isExpectedListTerminator(e)||10===this.currentToken().tokenKind},t.prototype.getArray=function(){return this.arrayPool.length>0?this.arrayPool.pop():[]},t.prototype.returnZeroOrOneLengthArray=function(e){e.length<=1&&this.returnArray(e)},t.prototype.returnArray=function(e){e.length=0,this.arrayPool.push(e)},t.prototype.parseSyntaxListWorker=function(t,n){for(var r=this.getArray(),i=this.getArray();;){var o=r.length;this.tryParseExpectedListItem(t,!1,r,n);var a=r.length;if(a===o){if(this.listIsTerminated(t))break;var s=this.abortParsingListOrMoveToNextToken(t,r,i);if(s)break}}var l=e.Syntax.list(r);return this.returnZeroOrOneLengthArray(r),{skippedTokens:i,list:l}},t.prototype.parseSeparatedSyntaxListWorker=function(t){var n=this.getArray(),r=this.getArray();e.Debug.assert(0===n.length),e.Debug.assert(0===r.length),e.Debug.assert(r!==n);for(var i=this.separatorKind(t),o=78===i,a=!1,s=!1;;){var l=n.length;this.tryParseExpectedListItem(t,a,n,null);var c=n.length;if(c!==l){a=!1;var u=this.currentToken();if(u.tokenKind!==i&&79!==u.tokenKind){if(this.listIsTerminated(t)){s=!0;break}o&&this.canEatAutomaticSemicolon(!1)?n.push(this.eatExplicitOrAutomaticSemicolon(!1)):(n.push(this.eatToken(i)),a=!0)}else n.push(this.eatAnyToken())}else{if(this.listIsTerminated(t)){s=!0;break}var p=this.abortParsingListOrMoveToNextToken(t,n,r);if(p)break;a=!0}}var h=e.Syntax.separatedList(n);return this.returnZeroOrOneLengthArray(n),{skippedTokens:r,list:h}},t.prototype.separatorKind=function(t){switch(t){case 2048:case 16384:case 256:case 4096:case 8192:case 32768:case 131072:case 65536:case 262144:case 524288:return 79;case 512:return 78;case 1:case 1024:case 2:case 4:case 8:case 16:case 32:default:throw e.Errors.notYetImplemented()}},t.prototype.reportUnexpectedTokenDiagnostic=function(t){var n=this.currentToken(),r=new e.Diagnostic(this.fileName,this.lineMap,this.currentTokenStart(),n.width(),e.DiagnosticCode.Unexpected_token_0_expected,[this.getExpectedListElementType(t)]);this.addDiagnostic(r)},t.prototype.addDiagnostic=function(e){this.diagnostics.length>0&&this.diagnostics[this.diagnostics.length-1].start()===e.start()||this.diagnostics.push(e)},t.prototype.isExpectedListTerminator=function(t){switch(t){case 1:return this.isExpectedSourceUnit_ModuleElementsTerminator();case 1024:return this.isExpectedClassOrInterfaceDeclaration_HeritageClausesTerminator();case 2:return this.isExpectedClassDeclaration_ClassElementsTerminator();case 4:return this.isExpectedModuleDeclaration_ModuleElementsTerminator();case 8:return this.isExpectedSwitchStatement_SwitchClausesTerminator();case 16:return this.isExpectedSwitchClause_StatementsTerminator();case 32:return this.isExpectedBlock_StatementsTerminator();case 64:return this.isExpectedTryBlock_StatementsTerminator();case 128:return this.isExpectedCatchBlock_StatementsTerminator();case 256:return this.isExpectedEnumDeclaration_EnumElementsTerminator();case 512:return this.isExpectedObjectType_TypeMembersTerminator();case 16384:return this.isExpectedArgumentList_AssignmentExpressionsTerminator();case 2048:return this.isExpectedHeritageClause_TypeNameListTerminator();case 4096:return this.isExpectedVariableDeclaration_VariableDeclarators_AllowInTerminator();case 8192:return this.isExpectedVariableDeclaration_VariableDeclarators_DisallowInTerminator();case 32768:return this.isExpectedObjectLiteralExpression_PropertyAssignmentsTerminator();case 131072:return this.isExpectedParameterList_ParametersTerminator();case 262144:return this.isExpectedTypeArgumentList_TypesTerminator();case 524288:return this.isExpectedTypeParameterList_TypeParametersTerminator();case 65536:return this.isExpectedLiteralExpression_AssignmentExpressionsTerminator();default:throw e.Errors.invalidOperation()}},t.prototype.isExpectedSourceUnit_ModuleElementsTerminator=function(){return 10===this.currentToken().tokenKind},t.prototype.isExpectedEnumDeclaration_EnumElementsTerminator=function(){return 71===this.currentToken().tokenKind},t.prototype.isExpectedModuleDeclaration_ModuleElementsTerminator=function(){return 71===this.currentToken().tokenKind},t.prototype.isExpectedObjectType_TypeMembersTerminator=function(){return 71===this.currentToken().tokenKind},t.prototype.isExpectedObjectLiteralExpression_PropertyAssignmentsTerminator=function(){return 71===this.currentToken().tokenKind},t.prototype.isExpectedLiteralExpression_AssignmentExpressionsTerminator=function(){return 75===this.currentToken().tokenKind},t.prototype.isExpectedTypeArgumentList_TypesTerminator=function(){var e=this.currentToken();return 81===e.tokenKind?!0:this.canFollowTypeArgumentListInExpression(e.tokenKind)?!0:!1},t.prototype.isExpectedTypeParameterList_TypeParametersTerminator=function(){var e=this.currentToken();return 81===e.tokenKind?!0:72===e.tokenKind||70===e.tokenKind||48===e.tokenKind||51===e.tokenKind?!0:!1},t.prototype.isExpectedParameterList_ParametersTerminator=function(){var e=this.currentToken();return 73===e.tokenKind?!0:70===e.tokenKind?!0:85===e.tokenKind?!0:!1},t.prototype.isExpectedVariableDeclaration_VariableDeclarators_DisallowInTerminator=function(){return 78===this.currentToken().tokenKind||73===this.currentToken().tokenKind?!0:29===this.currentToken().tokenKind?!0:!1},t.prototype.isExpectedVariableDeclaration_VariableDeclarators_AllowInTerminator=function(){return 79===this.previousToken().tokenKind?!1:85===this.currentToken().tokenKind?!0:this.canEatExplicitOrAutomaticSemicolon(!1)},t.prototype.isExpectedClassOrInterfaceDeclaration_HeritageClausesTerminator=function(){var e=this.currentToken();return 70===e.tokenKind||71===e.tokenKind?!0:!1},t.prototype.isExpectedHeritageClause_TypeNameListTerminator=function(){var e=this.currentToken();return 48===e.tokenKind||51===e.tokenKind?!0:this.isExpectedClassOrInterfaceDeclaration_HeritageClausesTerminator()?!0:!1},t.prototype.isExpectedArgumentList_AssignmentExpressionsTerminator=function(){var e=this.currentToken();return 73===e.tokenKind||78===e.tokenKind},t.prototype.isExpectedClassDeclaration_ClassElementsTerminator=function(){return 71===this.currentToken().tokenKind},t.prototype.isExpectedSwitchStatement_SwitchClausesTerminator=function(){return 71===this.currentToken().tokenKind},t.prototype.isExpectedSwitchClause_StatementsTerminator=function(){return 71===this.currentToken().tokenKind||this.isSwitchClause()},t.prototype.isExpectedBlock_StatementsTerminator=function(){return 71===this.currentToken().tokenKind},t.prototype.isExpectedTryBlock_StatementsTerminator=function(){return 17===this.currentToken().tokenKind||25===this.currentToken().tokenKind},t.prototype.isExpectedCatchBlock_StatementsTerminator=function(){return 25===this.currentToken().tokenKind},t.prototype.isExpectedListItem=function(t,n){switch(t){case 1:return this.isModuleElement(n);case 1024:return this.isHeritageClause();case 2:return this.isClassElement(n);case 4:return this.isModuleElement(n);case 8:return this.isSwitchClause();case 16:return this.isStatement(n);case 32:return this.isStatement(n);case 64:case 128:return!1;case 256:return this.isEnumElement(n);case 4096:case 8192:return this.isVariableDeclarator();case 512:return this.isTypeMember(n);case 16384:return this.isExpectedArgumentList_AssignmentExpression();case 2048:return this.isHeritageClauseTypeName();case 32768:return this.isPropertyAssignment(n);case 131072:return this.isParameter();case 262144:return this.isType();case 524288:return this.isTypeParameter();case 65536:return this.isAssignmentOrOmittedExpression();default:throw e.Errors.invalidOperation()}},t.prototype.isExpectedArgumentList_AssignmentExpression=function(){var e=this.currentToken();return this.isExpression(e)?!0:79===e.tokenKind?!0:!1},t.prototype.parseExpectedListItem=function(t,n){switch(t){case 1:return this.parseModuleElement(n);case 1024:return this.parseHeritageClause();case 2:return this.parseClassElement(n);case 4:return this.parseModuleElement(n);case 8:return this.parseSwitchClause();case 16:return this.parseStatement(n);case 32:return this.parseStatement(n);case 256:return this.parseEnumElement();case 512:return this.parseTypeMember(n);case 16384:return this.parseAssignmentExpression(!0);case 2048:return this.parseNameOrGenericType();case 4096:return this.parseVariableDeclarator(!0,!1);case 8192:return this.parseVariableDeclarator(!1,!1);case 32768:return this.parsePropertyAssignment(n);case 65536:return this.parseAssignmentOrOmittedExpression();case 131072:return this.parseParameter();case 262144:return this.parseType();case 524288:return this.parseTypeParameter();default:throw e.Errors.invalidOperation()}},t.prototype.getExpectedListElementType=function(t){switch(t){case 1:return e.getLocalizedText(e.DiagnosticCode.module_class_interface_enum_import_or_statement,null);case 1024:return"{";case 2:return e.getLocalizedText(e.DiagnosticCode.constructor_function_accessor_or_variable,null);case 4:return e.getLocalizedText(e.DiagnosticCode.module_class_interface_enum_import_or_statement,null);case 8:return e.getLocalizedText(e.DiagnosticCode.case_or_default_clause,null);case 16:return e.getLocalizedText(e.DiagnosticCode.statement,null);case 32:return e.getLocalizedText(e.DiagnosticCode.statement,null);case 4096:case 8192:return e.getLocalizedText(e.DiagnosticCode.identifier,null);case 256:return e.getLocalizedText(e.DiagnosticCode.identifier,null);case 512:return e.getLocalizedText(e.DiagnosticCode.call_construct_index_property_or_function_signature,null);case 16384:return e.getLocalizedText(e.DiagnosticCode.expression,null);case 2048:return e.getLocalizedText(e.DiagnosticCode.type_name,null);case 32768:return e.getLocalizedText(e.DiagnosticCode.property_or_accessor,null);case 131072:return e.getLocalizedText(e.DiagnosticCode.parameter,null);case 262144:return e.getLocalizedText(e.DiagnosticCode.type,null);case 524288:return e.getLocalizedText(e.DiagnosticCode.type_parameter,null);case 65536:return e.getLocalizedText(e.DiagnosticCode.expression,null);default:throw e.Errors.invalidOperation()}},t}();t.parse=n,t.incrementalParse=r}(e.Parser||(e.Parser={}));e.Parser}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(e,t,n,r,i,o){this._allDiagnostics=null,this._sourceUnit=e,this._isDeclaration=t,this._parserDiagnostics=n,this._fileName=r,this._lineMap=i,this._parseOptions=o}return t.prototype.toJSON=function(){var t={};return t.isDeclaration=this._isDeclaration,t.languageVersion=e.LanguageVersion[this._parseOptions.languageVersion()],t.parseOptions=this._parseOptions,this.diagnostics().length>0&&(t.diagnostics=this.diagnostics()),t.sourceUnit=this._sourceUnit,t.lineMap=this._lineMap,t},t.prototype.sourceUnit=function(){return this._sourceUnit},t.prototype.isDeclaration=function(){return this._isDeclaration},t.prototype.computeDiagnostics=function(){if(this._parserDiagnostics.length>0)return this._parserDiagnostics;var e=[];return this.sourceUnit().accept(new n(this,e)),e},t.prototype.diagnostics=function(){return null===this._allDiagnostics&&(this._allDiagnostics=this.computeDiagnostics()),this._allDiagnostics},t.prototype.fileName=function(){return this._fileName},t.prototype.lineMap=function(){return this._lineMap},t.prototype.parseOptions=function(){return this._parseOptions},t.prototype.structuralEquals=function(t){return e.ArrayUtilities.sequenceEquals(this.diagnostics(),t.diagnostics(),e.Diagnostic.equals)&&this.sourceUnit().structuralEquals(t.sourceUnit())},t}();e.SyntaxTree=t;var n=function(t){function n(e,n){t.call(this),this.syntaxTree=e,this.diagnostics=n,this.inAmbientDeclaration=!1,this.inBlock=!1,this.inObjectLiteralExpression=!1,this.currentConstructor=null}return __extends(n,t),n.prototype.childFullStart=function(t,n){return this.position()+e.Syntax.childOffset(t,n)},n.prototype.childStart=function(e,t){return this.childFullStart(e,t)+t.leadingTriviaWidth()},n.prototype.pushDiagnostic=function(t,n,r,i){"undefined"==typeof i&&(i=null),this.diagnostics.push(new e.Diagnostic(this.syntaxTree.fileName(),this.syntaxTree.lineMap(),t,n,r,i))},n.prototype.pushDiagnostic1=function(t,n,r,i){"undefined"==typeof i&&(i=null),this.diagnostics.push(new e.Diagnostic(this.syntaxTree.fileName(),this.syntaxTree.lineMap(),t+n.leadingTriviaWidth(),n.width(),r,i)) },n.prototype.visitCatchClause=function(n){n.typeAnnotation&&this.pushDiagnostic(this.childStart(n,n.typeAnnotation),n.typeAnnotation.width(),e.DiagnosticCode.Catch_clause_parameter_cannot_have_a_type_annotation),t.prototype.visitCatchClause.call(this,n)},n.prototype.checkParameterListOrder=function(t){for(var n=this.childFullStart(t,t.parameters),r=!1,i=t.parameters.nonSeparatorCount(),o=0,a=t.parameters.childCount();a>o;o++){var s=t.parameters.childAt(o);if(o%2===0){var l=o/2,c=t.parameters.childAt(o);if(c.dotDotDotToken){if(l!==i-1)return this.pushDiagnostic1(n,c,e.DiagnosticCode.Rest_parameter_must_be_last_in_list),!0;if(c.questionToken)return this.pushDiagnostic1(n,c,e.DiagnosticCode.Rest_parameter_cannot_be_optional),!0;if(c.equalsValueClause)return this.pushDiagnostic1(n,c,e.DiagnosticCode.Rest_parameter_cannot_have_an_initializer),!0}else if(c.questionToken||c.equalsValueClause){if(r=!0,c.questionToken&&c.equalsValueClause)return this.pushDiagnostic1(n,c,e.DiagnosticCode.Parameter_cannot_have_question_mark_and_initializer),!0}else if(r)return this.pushDiagnostic1(n,c,e.DiagnosticCode.Required_parameter_cannot_follow_optional_parameter),!0}n+=s.fullWidth()}return!1},n.prototype.checkParameterListAcessibilityModifiers=function(e){for(var t=this.childFullStart(e,e.parameters),n=0,r=e.parameters.childCount();r>n;n++){var i=e.parameters.childAt(n);if(n%2===0){var o=e.parameters.childAt(n);if(this.checkParameterAccessibilityModifiers(e,o,t))return!0}t+=i.fullWidth()}return!1},n.prototype.checkParameterAccessibilityModifiers=function(t,n,r){if(n.modifiers.childCount()>0)for(var i=n.modifiers,o=r+e.Syntax.childOffset(n,i),a=0,s=i.childCount();s>a;a++){var l=i.childAt(a);if(this.checkParameterAccessibilityModifier(t,l,o,a))return!0;o+=l.fullWidth()}return!1},n.prototype.checkParameterAccessibilityModifier=function(t,n,r,i){return 57!==n.tokenKind&&55!==n.tokenKind?(this.pushDiagnostic1(r,n,e.DiagnosticCode._0_modifier_cannot_appear_on_a_parameter,[n.text()]),!0):i>0?(this.pushDiagnostic1(r,n,e.DiagnosticCode.Accessibility_modifier_already_seen),!0):this.inAmbientDeclaration?(this.pushDiagnostic1(r,n,e.DiagnosticCode.Parameter_property_declarations_cannot_be_used_in_an_ambient_context),!0):this.currentConstructor&&!this.currentConstructor.block&&this.currentConstructor.parameterList===t?(this.pushDiagnostic1(r,n,e.DiagnosticCode.Parameter_property_declarations_cannot_be_used_in_a_constructor_overload),!0):null===this.currentConstructor||this.currentConstructor.parameterList!==t?(this.pushDiagnostic1(r,n,e.DiagnosticCode.Parameter_property_declarations_can_only_be_used_in_constructors),!0):!1},n.prototype.checkForTrailingSeparator=function(t,n){if(0===n.childCount()||n.childCount()%2===1)return!1;for(var r=this.childFullStart(t,n),i=0,o=n.childCount();o>i;i++){var a=n.childAt(i);i===o-1&&this.pushDiagnostic1(r,a,e.DiagnosticCode.Trailing_separator_not_allowed),r+=a.fullWidth()}return!0},n.prototype.checkForAtLeastOneElement=function(t,n,r){if(n.childCount()>0)return!1;var i=this.childFullStart(t,n),o=this.syntaxTree.sourceUnit().findToken(i);return this.pushDiagnostic1(i,o.token(),e.DiagnosticCode.Unexpected_token_0_expected,[r]),!0},n.prototype.visitParameterList=function(e){return this.checkParameterListAcessibilityModifiers(e)||this.checkParameterListOrder(e)||this.checkForTrailingSeparator(e,e.parameters)?void this.skip(e):void t.prototype.visitParameterList.call(this,e)},n.prototype.visitHeritageClause=function(n){return this.checkForTrailingSeparator(n,n.typeNames)||this.checkForAtLeastOneElement(n,n.typeNames,e.getLocalizedText(e.DiagnosticCode.type_name,null))?void this.skip(n):void t.prototype.visitHeritageClause.call(this,n)},n.prototype.visitArgumentList=function(e){return this.checkForTrailingSeparator(e,e.arguments)?void this.skip(e):void t.prototype.visitArgumentList.call(this,e)},n.prototype.visitVariableDeclaration=function(n){return this.checkForTrailingSeparator(n,n.variableDeclarators)||this.checkForAtLeastOneElement(n,n.variableDeclarators,e.getLocalizedText(e.DiagnosticCode.identifier,null))?void this.skip(n):void t.prototype.visitVariableDeclaration.call(this,n)},n.prototype.visitTypeArgumentList=function(n){return this.checkForTrailingSeparator(n,n.typeArguments)||this.checkForAtLeastOneElement(n,n.typeArguments,e.getLocalizedText(e.DiagnosticCode.identifier,null))?void this.skip(n):void t.prototype.visitTypeArgumentList.call(this,n)},n.prototype.visitTypeParameterList=function(n){return this.checkForTrailingSeparator(n,n.typeParameters)||this.checkForAtLeastOneElement(n,n.typeParameters,e.getLocalizedText(e.DiagnosticCode.identifier,null))?void this.skip(n):void t.prototype.visitTypeParameterList.call(this,n)},n.prototype.checkIndexSignatureParameter=function(t){var n=this.childFullStart(t,t.parameter),r=t.parameter;return r.dotDotDotToken?(this.pushDiagnostic1(n,r,e.DiagnosticCode.Index_signatures_cannot_have_rest_parameters),!0):r.modifiers.childCount()>0?(this.pushDiagnostic1(n,r,e.DiagnosticCode.Index_signature_parameter_cannot_have_accessibility_modifiers),!0):r.questionToken?(this.pushDiagnostic1(n,r,e.DiagnosticCode.Index_signature_parameter_cannot_have_a_question_mark),!0):r.equalsValueClause?(this.pushDiagnostic1(n,r,e.DiagnosticCode.Index_signature_parameter_cannot_have_an_initializer),!0):r.typeAnnotation?69!==r.typeAnnotation.type.kind()&&67!==r.typeAnnotation.type.kind()?(this.pushDiagnostic1(n,r,e.DiagnosticCode.Index_signature_parameter_type_must_be_string_or_number),!0):!1:(this.pushDiagnostic1(n,r,e.DiagnosticCode.Index_signature_parameter_must_have_a_type_annotation),!0)},n.prototype.visitIndexSignature=function(n){return this.checkIndexSignatureParameter(n)?void this.skip(n):n.typeAnnotation?void t.prototype.visitIndexSignature.call(this,n):(this.pushDiagnostic1(this.position(),n,e.DiagnosticCode.Index_signature_must_have_a_type_annotation),void this.skip(n))},n.prototype.checkClassDeclarationHeritageClauses=function(t){for(var n=this.childFullStart(t,t.heritageClauses),r=!1,i=!1,o=0,a=t.heritageClauses.childCount();a>o;o++){e.Debug.assert(2>=o);var s=t.heritageClauses.childAt(o);if(48===s.extendsOrImplementsKeyword.tokenKind){if(r)return this.pushDiagnostic1(n,s,e.DiagnosticCode.extends_clause_already_seen),!0;if(i)return this.pushDiagnostic1(n,s,e.DiagnosticCode.extends_clause_must_precede_implements_clause),!0;if(s.typeNames.nonSeparatorCount()>1)return this.pushDiagnostic1(n,s,e.DiagnosticCode.Classes_can_only_extend_a_single_class),!0;r=!0}else{if(e.Debug.assert(51===s.extendsOrImplementsKeyword.tokenKind),i)return this.pushDiagnostic1(n,s,e.DiagnosticCode.implements_clause_already_seen),!0;i=!0}n+=s.fullWidth()}return!1},n.prototype.checkForDisallowedDeclareModifier=function(t){if(this.inAmbientDeclaration){var n=e.SyntaxUtilities.getToken(t,63);if(n)return this.pushDiagnostic1(this.childFullStart(t,n),n,e.DiagnosticCode.declare_modifier_not_allowed_for_code_already_in_an_ambient_context),!0}return!1},n.prototype.checkForRequiredDeclareModifier=function(t,n,r){return this.inAmbientDeclaration||!this.syntaxTree.isDeclaration()||e.SyntaxUtilities.containsToken(r,63)?void 0:(this.pushDiagnostic1(this.childFullStart(t,n),n.firstToken(),e.DiagnosticCode.declare_modifier_required_for_top_level_element),!0)},n.prototype.checkFunctionOverloads=function(t,n){if(!this.inAmbientDeclaration&&!this.syntaxTree.isDeclaration())for(var r=this.childFullStart(t,n),i=!1,o=null,a=0,s=n.childCount();s>a;a++){var l=n.childAt(a),c=a===s-1;if(i){if(129!==l.kind())return this.pushDiagnostic1(r,l.firstToken(),e.DiagnosticCode.Function_implementation_expected),!0;var u=l;if(u.identifier.valueText()!==o){var p=r+e.Syntax.childOffset(l,u.identifier);return this.pushDiagnostic1(p,u.identifier,e.DiagnosticCode.Function_overload_name_must_be_0,[o]),!0}}if(129===l.kind())if(u=l,e.SyntaxUtilities.containsToken(u.modifiers,63))i=!1,o="";else if(i=null===u.block,o=u.identifier.valueText(),c&&i)return this.pushDiagnostic1(r,l.firstToken(),e.DiagnosticCode.Function_implementation_expected),!0;r+=l.fullWidth()}return!1},n.prototype.checkClassOverloads=function(t){if(!this.inAmbientDeclaration&&!e.SyntaxUtilities.containsToken(t.modifiers,63))for(var n=this.childFullStart(t,t.classElements),r=!1,i=!1,o=null,a=null,s=null,l=0,c=t.classElements.childCount();c>l;l++){var u=t.classElements.childAt(l),p=l===c-1,h=null;if(r){if(135!==u.kind())return this.pushDiagnostic1(n,u.firstToken(),e.DiagnosticCode.Function_implementation_expected),!0;if(s=u,s.propertyName.valueText()!==o){var d=n+e.Syntax.childOffset(u,s.propertyName);return this.pushDiagnostic1(d,s.propertyName,e.DiagnosticCode.Function_overload_name_must_be_0,[o]),!0}if(h=e.SyntaxUtilities.containsToken(s.modifiers,58),h!==a){d=n+e.Syntax.childOffset(u,s.propertyName);var m=a?e.DiagnosticCode.Function_overload_must_be_static:e.DiagnosticCode.Function_overload_must_not_be_static;return this.pushDiagnostic1(d,s.propertyName,m,null),!0}}else if(i&&137!==u.kind())return this.pushDiagnostic1(n,u.firstToken(),e.DiagnosticCode.Constructor_implementation_expected),!0;if(135===u.kind()){if(s=u,r=null===s.block,o=s.propertyName.valueText(),a=e.SyntaxUtilities.containsToken(s.modifiers,58),p&&r)return this.pushDiagnostic1(n,u.firstToken(),e.DiagnosticCode.Function_implementation_expected),!0}else if(137===u.kind()){var y=u;if(i=null===y.block,p&&i)return this.pushDiagnostic1(n,u.firstToken(),e.DiagnosticCode.Constructor_implementation_expected),!0}n+=u.fullWidth()}return!1},n.prototype.checkForReservedName=function(t,n,r){for(var i,o,a=this.childFullStart(t,n),s=n;null!==s;){if(121===s.kind()){var l=s;i=l.right,o=a+this.childFullStart(l,i),s=l.left}else e.Debug.assert(11===s.kind()),i=s,o=a,s=null;switch(i.valueText()){case"any":case"number":case"boolean":case"string":case"void":return this.pushDiagnostic(o+i.leadingTriviaWidth(),i.width(),r,[i.valueText()]),!0}}return!1},n.prototype.visitClassDeclaration=function(n){if(this.checkForReservedName(n,n.identifier,e.DiagnosticCode.Class_name_cannot_be_0)||this.checkForDisallowedDeclareModifier(n.modifiers)||this.checkForRequiredDeclareModifier(n,n.classKeyword,n.modifiers)||this.checkModuleElementModifiers(n.modifiers)||this.checkClassDeclarationHeritageClauses(n)||this.checkClassOverloads(n))return void this.skip(n);var r=this.inAmbientDeclaration;this.inAmbientDeclaration=this.inAmbientDeclaration||this.syntaxTree.isDeclaration()||e.SyntaxUtilities.containsToken(n.modifiers,63),t.prototype.visitClassDeclaration.call(this,n),this.inAmbientDeclaration=r},n.prototype.checkInterfaceDeclarationHeritageClauses=function(t){for(var n=this.childFullStart(t,t.heritageClauses),r=!1,i=0,o=t.heritageClauses.childCount();o>i;i++){e.Debug.assert(1>=i);var a=t.heritageClauses.childAt(i);if(48!==a.extendsOrImplementsKeyword.tokenKind)return e.Debug.assert(51===a.extendsOrImplementsKeyword.tokenKind),this.pushDiagnostic1(n,a,e.DiagnosticCode.Interface_declaration_cannot_have_implements_clause),!0;if(r)return this.pushDiagnostic1(n,a,e.DiagnosticCode.extends_clause_already_seen),!0;r=!0,n+=a.fullWidth()}return!1},n.prototype.checkInterfaceModifiers=function(t){for(var n=this.position(),r=0,i=t.childCount();i>r;r++){var o=t.childAt(r);if(63===o.tokenKind)return this.pushDiagnostic1(n,o,e.DiagnosticCode.declare_modifier_cannot_appear_on_an_interface_declaration),!0;n+=o.fullWidth()}return!1},n.prototype.visitInterfaceDeclaration=function(n){return this.checkForReservedName(n,n.identifier,e.DiagnosticCode.Interface_name_cannot_be_0)||this.checkInterfaceModifiers(n.modifiers)||this.checkModuleElementModifiers(n.modifiers)||this.checkInterfaceDeclarationHeritageClauses(n)?void this.skip(n):void t.prototype.visitInterfaceDeclaration.call(this,n)},n.prototype.checkClassElementModifiers=function(t){for(var n=this.position(),r=!1,i=!1,o=0,a=t.childCount();a>o;o++){var s=t.childAt(o);if(57===s.tokenKind||55===s.tokenKind){if(r)return this.pushDiagnostic1(n,s,e.DiagnosticCode.Accessibility_modifier_already_seen),!0;if(i){var l=t.childAt(o-1);return this.pushDiagnostic1(n,s,e.DiagnosticCode._0_modifier_must_precede_1_modifier,[s.text(),l.text()]),!0}r=!0}else{if(58!==s.tokenKind)return this.pushDiagnostic1(n,s,e.DiagnosticCode._0_modifier_cannot_appear_on_a_class_element,[s.text()]),!0;if(i)return this.pushDiagnostic1(n,s,e.DiagnosticCode._0_modifier_already_seen,[s.text()]),!0;i=!0}n+=s.fullWidth()}return!1},n.prototype.visitMemberVariableDeclaration=function(e){return this.checkClassElementModifiers(e.modifiers)?void this.skip(e):void t.prototype.visitMemberVariableDeclaration.call(this,e)},n.prototype.visitMemberFunctionDeclaration=function(e){return this.checkClassElementModifiers(e.modifiers)?void this.skip(e):void t.prototype.visitMemberFunctionDeclaration.call(this,e)},n.prototype.checkGetAccessorParameter=function(t,n,r){var i=this.childFullStart(t,n);return 0!==r.parameters.childCount()?(this.pushDiagnostic1(i,n,e.DiagnosticCode.get_accessor_cannot_have_parameters),!0):!1},n.prototype.visitIndexMemberDeclaration=function(e){return this.checkIndexMemberModifiers(e)?void this.skip(e):void t.prototype.visitIndexMemberDeclaration.call(this,e)},n.prototype.checkIndexMemberModifiers=function(t){if(t.modifiers.childCount()>0){var n=this.childFullStart(t,t.modifiers);return this.pushDiagnostic1(n,t.modifiers.childAt(0),e.DiagnosticCode.Modifiers_cannot_appear_here),!0}return!1},n.prototype.checkEcmaScriptVersionIsAtLeast=function(e,t,n,r){if(this.syntaxTree.parseOptions().languageVersion()i;i++){var a=t.enumElements.childAt(i);if(i%2===0){var s=a;if(!s.equalsValueClause&&r)return this.pushDiagnostic1(n,s,e.DiagnosticCode.Enum_member_must_have_initializer,null),!0;if(s.equalsValueClause){var l=s.equalsValueClause.value;e.Syntax.isIntegerLiteral(l)||(r=!0)}}n+=a.fullWidth()}return!1},n.prototype.visitEnumElement=function(n){if(this.inAmbientDeclaration&&n.equalsValueClause){var r=n.equalsValueClause.value;if(!e.Syntax.isIntegerLiteral(r))return this.pushDiagnostic1(this.childFullStart(n,n.equalsValueClause),n.equalsValueClause.firstToken(),e.DiagnosticCode.Ambient_enum_elements_can_only_have_integer_literal_initializers),void this.skip(n)}t.prototype.visitEnumElement.call(this,n)},n.prototype.visitInvocationExpression=function(n){50===n.expression.kind()&&null!==n.argumentList.typeArgumentList&&this.pushDiagnostic1(this.position(),n,e.DiagnosticCode.super_invocation_cannot_have_type_arguments),t.prototype.visitInvocationExpression.call(this,n)},n.prototype.checkModuleElementModifiers=function(t){for(var n=this.position(),r=!1,i=!1,o=0,a=t.childCount();a>o;o++){var s=t.childAt(o);if(57===s.tokenKind||55===s.tokenKind||58===s.tokenKind)return this.pushDiagnostic1(n,s,e.DiagnosticCode._0_modifier_cannot_appear_on_a_module_element,[s.text()]),!0;if(63===s.tokenKind){if(i)return void this.pushDiagnostic1(n,s,e.DiagnosticCode.Accessibility_modifier_already_seen);i=!0}else if(47===s.tokenKind){if(r)return void this.pushDiagnostic1(n,s,e.DiagnosticCode._0_modifier_already_seen,[s.text()]);if(i)return void this.pushDiagnostic1(n,s,e.DiagnosticCode._0_modifier_must_precede_1_modifier,[e.SyntaxFacts.getText(47),e.SyntaxFacts.getText(63)]);r=!0}n+=s.fullWidth()}return!1},n.prototype.checkForDisallowedImportDeclaration=function(t){for(var n=this.childFullStart(t,t.moduleElements),r=0,i=t.moduleElements.childCount();i>r;r++){var o=t.moduleElements.childAt(r);if(133===o.kind()){var a=o;245===a.moduleReference.kind()&&null===t.stringLiteral&&this.pushDiagnostic1(n,a,e.DiagnosticCode.Import_declarations_in_an_internal_module_cannot_reference_an_external_module,null)}n+=o.fullWidth()}return!1},n.prototype.checkForDisallowedDeclareModifierOnImportDeclaration=function(t){var n=e.SyntaxUtilities.getToken(t,63);return n?(this.pushDiagnostic1(this.childFullStart(t,n),n,e.DiagnosticCode.declare_modifier_not_allowed_on_import_declaration),!0):void 0},n.prototype.visitImportDeclaration=function(e){return this.checkForDisallowedDeclareModifierOnImportDeclaration(e.modifiers)||this.checkModuleElementModifiers(e.modifiers)?void this.skip(e):void t.prototype.visitImportDeclaration.call(this,e)},n.prototype.visitModuleDeclaration=function(n){if(this.checkForReservedName(n,n.name,e.DiagnosticCode.Module_name_cannot_be_0)||this.checkForDisallowedDeclareModifier(n.modifiers)||this.checkForRequiredDeclareModifier(n,n.moduleKeyword,n.modifiers)||this.checkModuleElementModifiers(n.modifiers)||this.checkForDisallowedImportDeclaration(n)||this.checkForDisallowedExports(n,n.moduleElements)||this.checkForMultipleExportAssignments(n,n.moduleElements))return void this.skip(n);if(!e.SyntaxUtilities.containsToken(n.modifiers,63)&&this.checkFunctionOverloads(n,n.moduleElements))return void this.skip(n);if(n.stringLiteral&&!this.inAmbientDeclaration&&!e.SyntaxUtilities.containsToken(n.modifiers,63)){var r=this.childFullStart(n,n.stringLiteral);return this.pushDiagnostic1(r,n.stringLiteral,e.DiagnosticCode.Only_ambient_modules_can_use_quoted_names),void this.skip(n)}if(!n.stringLiteral&&this.checkForDisallowedExportAssignment(n))return void this.skip(n);var i=this.inAmbientDeclaration;this.inAmbientDeclaration=this.inAmbientDeclaration||this.syntaxTree.isDeclaration()||e.SyntaxUtilities.containsToken(n.modifiers,63),t.prototype.visitModuleDeclaration.call(this,n),this.inAmbientDeclaration=i},n.prototype.checkForDisallowedExports=function(t,n){for(var r=!1,i=0,o=n.childCount();o>i;i++){var a=n.childAt(i);if(e.SyntaxUtilities.hasExportKeyword(a)){r=!0;break}}var s=this.childFullStart(t,n);if(r)for(var i=0,o=n.childCount();o>i;i++){var a=n.childAt(i);if(134===a.kind())return this.pushDiagnostic1(s,a,e.DiagnosticCode.Export_assignment_not_allowed_in_module_with_exported_element),!0;s+=a.fullWidth()}return!1},n.prototype.checkForMultipleExportAssignments=function(t,n){for(var r=this.childFullStart(t,n),i=!1,o=!1,a=0,s=n.childCount();s>a;a++){var l=n.childAt(a);134===l.kind()&&(i&&(this.pushDiagnostic1(r,l,e.DiagnosticCode.Module_cannot_have_multiple_export_assignments),o=!0),i=!0),r+=l.fullWidth()}return o},n.prototype.checkForDisallowedExportAssignment=function(t){for(var n=this.childFullStart(t,t.moduleElements),r=0,i=t.moduleElements.childCount();i>r;r++){var o=t.moduleElements.childAt(r);if(134===o.kind())return this.pushDiagnostic1(n,o,e.DiagnosticCode.Export_assignment_cannot_be_used_in_internal_modules),!0;n+=o.fullWidth()}return!1},n.prototype.visitBlock=function(n){if(this.inAmbientDeclaration||this.syntaxTree.isDeclaration())return this.pushDiagnostic1(this.position(),n.firstToken(),e.DiagnosticCode.Implementations_are_not_allowed_in_ambient_contexts),void this.skip(n);if(this.checkFunctionOverloads(n,n.statements))return void this.skip(n);var r=this.inBlock;this.inBlock=!0,t.prototype.visitBlock.call(this,n),this.inBlock=r},n.prototype.checkForStatementInAmbientContxt=function(t){return this.inAmbientDeclaration||this.syntaxTree.isDeclaration()?(this.pushDiagnostic1(this.position(),t.firstToken(),e.DiagnosticCode.Statements_are_not_allowed_in_ambient_contexts),!0):!1},n.prototype.visitBreakStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitBreakStatement.call(this,e)},n.prototype.visitContinueStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitContinueStatement.call(this,e)},n.prototype.visitDebuggerStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitDebuggerStatement.call(this,e)},n.prototype.visitDoStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitDoStatement.call(this,e)},n.prototype.visitEmptyStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitEmptyStatement.call(this,e)},n.prototype.visitExpressionStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitExpressionStatement.call(this,e)},n.prototype.visitForInStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitForInStatement.call(this,e)},n.prototype.visitForStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitForStatement.call(this,e)},n.prototype.visitIfStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitIfStatement.call(this,e)},n.prototype.visitLabeledStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitLabeledStatement.call(this,e)},n.prototype.visitReturnStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitReturnStatement.call(this,e)},n.prototype.visitSwitchStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitSwitchStatement.call(this,e)},n.prototype.visitThrowStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitThrowStatement.call(this,e)},n.prototype.visitTryStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitTryStatement.call(this,e)},n.prototype.visitWhileStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitWhileStatement.call(this,e)},n.prototype.visitWithStatement=function(e){return this.checkForStatementInAmbientContxt(e)?void this.skip(e):void t.prototype.visitWithStatement.call(this,e)},n.prototype.checkForDisallowedModifiers=function(t,n){if((this.inBlock||this.inObjectLiteralExpression)&&n.childCount()>0){var r=this.childFullStart(t,n);return this.pushDiagnostic1(r,n.childAt(0),e.DiagnosticCode.Modifiers_cannot_appear_here),!0}return!1},n.prototype.visitFunctionDeclaration=function(n){if(this.checkForDisallowedDeclareModifier(n.modifiers)||this.checkForDisallowedModifiers(n,n.modifiers)||this.checkForRequiredDeclareModifier(n,n.functionKeyword,n.modifiers)||this.checkModuleElementModifiers(n.modifiers))return void this.skip(n);var r=this.inAmbientDeclaration;this.inAmbientDeclaration=this.inAmbientDeclaration||this.syntaxTree.isDeclaration()||e.SyntaxUtilities.containsToken(n.modifiers,63),t.prototype.visitFunctionDeclaration.call(this,n),this.inAmbientDeclaration=r},n.prototype.visitVariableStatement=function(n){if(this.checkForDisallowedDeclareModifier(n.modifiers)||this.checkForDisallowedModifiers(n,n.modifiers)||this.checkForRequiredDeclareModifier(n,n.variableDeclaration,n.modifiers)||this.checkModuleElementModifiers(n.modifiers))return void this.skip(n);var r=this.inAmbientDeclaration;this.inAmbientDeclaration=this.inAmbientDeclaration||this.syntaxTree.isDeclaration()||e.SyntaxUtilities.containsToken(n.modifiers,63),t.prototype.visitVariableStatement.call(this,n),this.inAmbientDeclaration=r},n.prototype.checkListSeparators=function(t,n,r){for(var i=this.childFullStart(t,n),o=0,a=n.childCount();a>o;o++){var s=n.childAt(o);o%2===1&&s.kind()!==r&&this.pushDiagnostic1(i,s,e.DiagnosticCode._0_expected,[e.SyntaxFacts.getText(r)]),i+=s.fullWidth()}return!1},n.prototype.visitObjectType=function(e){if(this.checkListSeparators(e,e.typeMembers,78))return void this.skip(e);var n=this.inAmbientDeclaration;this.inAmbientDeclaration=!0,t.prototype.visitObjectType.call(this,e),this.inAmbientDeclaration=n},n.prototype.visitArrayType=function(e){var n=this.inAmbientDeclaration;this.inAmbientDeclaration=!0,t.prototype.visitArrayType.call(this,e),this.inAmbientDeclaration=n},n.prototype.visitFunctionType=function(e){var n=this.inAmbientDeclaration;this.inAmbientDeclaration=!0,t.prototype.visitFunctionType.call(this,e),this.inAmbientDeclaration=n},n.prototype.visitConstructorType=function(e){var n=this.inAmbientDeclaration;this.inAmbientDeclaration=!0,t.prototype.visitConstructorType.call(this,e),this.inAmbientDeclaration=n},n.prototype.visitVariableDeclarator=function(n){return this.inAmbientDeclaration&&n.equalsValueClause?(this.pushDiagnostic1(this.childFullStart(n,n.equalsValueClause),n.equalsValueClause.firstToken(),e.DiagnosticCode.Initializers_are_not_allowed_in_ambient_contexts),void this.skip(n)):void t.prototype.visitVariableDeclarator.call(this,n)},n.prototype.visitConstructorDeclaration=function(e){if(this.checkClassElementModifiers(e.modifiers)||this.checkConstructorModifiers(e.modifiers))return void this.skip(e);var n=this.currentConstructor;this.currentConstructor=e,t.prototype.visitConstructorDeclaration.call(this,e),this.currentConstructor=n},n.prototype.checkConstructorModifiers=function(t){for(var n=this.position(),r=0,i=t.childCount();i>r;r++){var o=t.childAt(r);if(57!==o.kind())return this.pushDiagnostic1(n,o,e.DiagnosticCode._0_modifier_cannot_appear_on_a_constructor_declaration,[e.SyntaxFacts.getText(o.kind())]),!0;n+=o.fullWidth()}return!1},n.prototype.visitSourceUnit=function(e){return this.checkFunctionOverloads(e,e.moduleElements)||this.checkForDisallowedExports(e,e.moduleElements)||this.checkForMultipleExportAssignments(e,e.moduleElements)?void this.skip(e):void t.prototype.visitSourceUnit.call(this,e)},n}(e.PositionTrackingWalker)}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(){}return t.lookupInUnicodeMap=function(e,t){if(er+1;){if(n=r+(i-r)/2,n-=n%2,t[n]<=e&&e<=t[n+1])return!0;ea;a++){var l=i[a],c=this.getAmdDependency(l.fullText());c&&o.push(c)}this._amdDependencies=o},t.prototype.getLeadingComments=function(e){var t=e.firstToken(),n=[];if(t.hasLeadingComment())for(var r=t.leadingTrivia(),i=0,o=r.count();o>i;i++){var a=r.syntaxTriviaAt(i);a.isComment()&&n.push(a)}return n},t.prototype.getAmdDependency=function(e){var t=/^\/\/\/\s*t;t++){var r=e[t];if(this.getImplicitImport(r.fullText()))return!0}return!1},t.prototype.getImplicitImport=function(e){var t=/^(\/\/\/\s*/gim,n=t.exec(e);return n?!0:!1},t.prototype.hasTopLevelImportOrExport=function(e){for(var t,n=0,r=e.moduleElements.childCount();r>n;n++){var i=e.moduleElements.childAt(n);if(t=i.firstToken(),null!==t&&47===t.tokenKind)return!0;if(133===i.kind()){var o=i;if(245===o.moduleReference.kind())return!0}}return!1},t.prototype.sourceUnit=function(){if(!this._sourceUnit){var t=(new Date).getTime(),n=this.syntaxTree();this._sourceUnit=e.SyntaxTreeToAstVisitor.visit(n,this.fileName,this._compiler.compilationSettings(),this.isOpen),e.astTranslationTime+=(new Date).getTime()-t,this.isOpen||(this._syntaxTree=null)}return this._sourceUnit},t.prototype.diagnostics=function(){return null===this._diagnostics&&(this.syntaxTree(),e.Debug.assert(this._diagnostics)),this._diagnostics},t.prototype.lineMap=function(){return null===this._lineMap&&(this.syntaxTree(),e.Debug.assert(this._lineMap)),this._lineMap},t.prototype.isExternalModule=function(){return void 0===this._isExternalModule&&(this.syntaxTree(),e.Debug.assert(void 0!==this._isExternalModule)),this._isExternalModule},t.prototype.amdDependencies=function(){return void 0===this._amdDependencies&&(this.syntaxTree(),e.Debug.assert(void 0!==this._amdDependencies)),this._amdDependencies},t.prototype.syntaxTree=function(){var t=this._syntaxTree;if(!t){var n=(new Date).getTime();t=e.Parser.parse(this.fileName,e.SimpleText.fromScriptSnapshot(this._scriptSnapshot),e.isDTSFile(this.fileName),e.getParseOptions(this._compiler.compilationSettings())),e.syntaxTreeParseTime+=(new Date).getTime()-n,(this.isOpen||!this._sourceUnit)&&(this._syntaxTree=t)}return this.cacheSyntaxTreeInfo(t),t},t.prototype.bloomFilter=function(){if(!this._bloomFilter){var t=e.createIntrinsicsObject(),n=function(n){if(e.isValidAstNode(n)&&11===n.kind()){var r=n.valueText();t[r]=!0}};e.getAstWalkerFactory().simpleWalk(this.sourceUnit(),n,null,t);var r=0;for(var i in t)t[i]&&r++;this._bloomFilter=new e.BloomFilter(r),this._bloomFilter.addKeys(t)}return this._bloomFilter},t.prototype.emitToOwnOutputFile=function(){return!this._compiler.compilationSettings().outFileOption()||this.isExternalModule()},t.prototype.update=function(n,r,i,o){var a=this._syntaxTree;if(null!==o&&e.Debug.shouldAssert(1)){var s=this._scriptSnapshot,l=n;if(e.Debug.assert(s.getLength()-o.span().length()+o.newLength()===l.getLength()),e.Debug.shouldAssert(3)){var c=s.getText(0,o.span().start()),u=l.getText(0,o.span().start());e.Debug.assert(c===u);var p=s.getText(o.span().end(),s.getLength()),h=l.getText(o.newSpan().end(),l.getLength());e.Debug.assert(p===h)}}var d=e.SimpleText.fromScriptSnapshot(n),m=null===o||null===a?e.Parser.parse(this.fileName,d,e.isDTSFile(this.fileName),e.getParseOptions(this._compiler.compilationSettings())):e.Parser.incrementalParse(a,o,d);return new t(this._compiler,this._semanticInfoChain,this.fileName,this.referencedFiles,n,this.byteOrderMark,r,i,m,null)},t.create=function(e,n,r,i,o,a,s,l){return new t(e,n,r,l,i,o,a,s,null,null)},t.prototype.topLevelDecl=function(){return null===this._topLevelDecl&&(this._topLevelDecl=e.DeclarationCreator.create(this,this._semanticInfoChain,this._compiler.compilationSettings())),this._topLevelDecl},t.prototype._getDeclForAST=function(e){return this.topLevelDecl(),this._astDeclMap[e.syntaxID()]},t.prototype.getEnclosingDecl=function(e){if(120===e.kind())return this._getDeclForAST(e);e=e.parent;for(var t=null;e&&!(t=this._getDeclForAST(e));)e=e.parent;return t._getEnclosingDeclFromParentDecl()},t.prototype._setDeclForAST=function(t,n){e.Debug.assert(n.fileName()===this.fileName),this._astDeclMap[t.syntaxID()]=n},t.prototype._getASTForDecl=function(e){return this._declASTMap[e.declID]},t.prototype._setASTForDecl=function(t,n){e.Debug.assert(t.fileName()===this.fileName),this._declASTMap[t.declID]=n},t}();e.Document=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(e,t){return 0!==(e&t)}e.hasFlag=t,function(e){e[e.SuccessfulComparison=0]="SuccessfulComparison",e[e.RequiredPropertyIsMissing=2]="RequiredPropertyIsMissing",e[e.IncompatibleSignatures=4]="IncompatibleSignatures",e[e.SourceSignatureHasTooManyParameters=3]="SourceSignatureHasTooManyParameters",e[e.IncompatibleReturnTypes=16]="IncompatibleReturnTypes",e[e.IncompatiblePropertyTypes=32]="IncompatiblePropertyTypes",e[e.IncompatibleParameterTypes=64]="IncompatibleParameterTypes",e[e.InconsistantPropertyAccesibility=128]="InconsistantPropertyAccesibility"}(e.TypeRelationshipFlags||(e.TypeRelationshipFlags={}));e.TypeRelationshipFlags;!function(e){e[e.Unspecified=0]="Unspecified",e[e.Synchronous=1]="Synchronous",e[e.Asynchronous=2]="Asynchronous"}(e.ModuleGenTarget||(e.ModuleGenTarget={}));e.ModuleGenTarget}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(){return new r}var n="__proto__",r=function(){function e(){this.prototype=void 0,this.toString=void 0,this.toLocaleString=void 0,this.valueOf=void 0,this.hasOwnProperty=void 0,this.propertyIsEnumerable=void 0,this.isPrototypeOf=void 0,this.constructor=void 0,this[n]=null,this[n]=void 0}return e}();e.createIntrinsicsObject=t;var i=function(){function e(){this.itemCount=0,this.table=t()}return e.prototype.getAllKeys=function(){var e=[];for(var t in this.table)void 0!==this.table[t]&&e.push(t);return e},e.prototype.add=function(e,t){return void 0!==this.table[e]?!1:(this.table[e]=t,this.itemCount++,!0)},e.prototype.addOrUpdate=function(e,t){return void 0!==this.table[e]?(this.table[e]=t,!1):(this.table[e]=t,this.itemCount++,!0)},e.prototype.map=function(e,t){for(var n in this.table){var r=this.table[n];void 0!==r&&e(n,this.table[n],t)}},e.prototype.every=function(e,t){for(var n in this.table){var r=this.table[n];if(void 0!==r&&!e(n,this.table[n],t))return!1}return!0},e.prototype.some=function(e,t){for(var n in this.table){var r=this.table[n];if(void 0!==r&&e(n,this.table[n],t))return!0}return!1},e.prototype.count=function(){return this.itemCount},e.prototype.lookup=function(e){var t=this.table[e];return void 0===t?null:t},e.prototype.remove=function(e){void 0!==this.table[e]&&(this.table[e]=void 0,this.itemCount--)},e}();e.StringHashTable=i;var o=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.getAllKeys=function(){var t=[];return e.prototype.map.call(this,function(e,n){void 0!==n&&t.push(e.substring(1))},null),t},t.prototype.add=function(t,n){return e.prototype.add.call(this,"#"+t,n)},t.prototype.addOrUpdate=function(t,n){return e.prototype.addOrUpdate.call(this,"#"+t,n)},t.prototype.map=function(t,n){return e.prototype.map.call(this,function(e,n,r){return t(e.substring(1),n,r)},n)},t.prototype.every=function(t,n){return e.prototype.every.call(this,function(e,n,r){return t(e.substring(1),n,r)},n)},t.prototype.some=function(t,n){return e.prototype.some.call(this,function(e,n,r){return t(e.substring(1),n,r)},n)},t.prototype.lookup=function(t){return e.prototype.lookup.call(this,"#"+t)},t}(i);e.IdentiferNameHashTable=o}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(t){return e.isDTSFile(t.fileName())||r(t.moduleElements)}function n(t){return e.hasModifier(t.modifiers,8)||r(t.moduleElements)}function r(e){for(var t=0,r=e.childCount();r>t;t++){var i=e.childAt(t);if(130===i.kind()){if(!n(i))return!1}else if(128!==i.kind())return!1}return!0}function i(t){return e.hasModifier(t.modifiers,8)?!0:!1}function o(t,n,r){"undefined"==typeof r&&(r=null);var i=245===t.moduleReference.kind(),o=n.getDeclForAST(t),a=e.hasFlag(o.flags,1),s=r&&2==r.moduleGenTarget();if(!i||a||!s){var l=o.getSymbol();if(245!==t.moduleReference.kind()){if(l.getExportAssignedValueSymbol())return!0;var c=l.getExportAssignedContainerSymbol();if(c&&c.getInstanceSymbol())return!0}return l.isUsedAsValue()}return!1}function a(e){return e?-1===e.start()||-1===e.end()?!1:!0:!1}function s(t,n,r,i){"undefined"==typeof r&&(r=!0),"undefined"==typeof i&&(i=!1);var o=null,s=function(e,s){if(a(e)){var l=149===e.kind()&&0===e.width();if(l)s.options.goChildren=!1;else{var c=i||11===e.kind()||212===e.kind()||121===e.kind()||224===e.kind()||225===e.kind()||213===e.kind()||n===t.end()+t.trailingTriviaWidth(),u=e.start(),p=e.end()+(r?e.trailingTriviaWidth():0)+(c?1:0);n>=u&&p>n&&(1!==e.kind()&&2!==e.kind()||e.end()>e.start())&&(null===o?o=e:e.start()>=o.start()&&e.end()+(r?e.trailingTriviaWidth():0)<=o.end()+(r?o.trailingTriviaWidth():0)&&(0!==o.width()||0!==e.width())&&(o=e)),s.options.goChildren=n>=u&&p>=n}}};return e.getAstWalkerFactory().walk(t,s),o}function l(e){return e?e.firstOrDefault(function(e){return e.typeNames.nonSeparatorCount()>0&&230===e.kind()}):null}function c(e){return e?e.firstOrDefault(function(e){return e.typeNames.nonSeparatorCount()>0&&231===e.kind()}):null}function u(e){return e&&213===e.kind()||e&&216===e.kind()}function p(e){if(!e)return!1;for(var t=e;t&&t.parent&&212===t.parent.kind()&&t.parent.name===t;)t=t.parent;return t&&t.parent&&(213===t.parent.kind()||216===t.parent.kind())?t===t.parent.expression:!1}function h(e){if(null===e||null===e.parent)return!1;if(11!==e.kind())return!1;switch(e.parent.kind()){case 131:return e.parent.identifier===e;case 128:return e.parent.identifier===e;case 132:return e.parent.identifier===e;case 130:return e.parent.name===e||e.parent.stringLiteral===e;case 225:return e.parent.propertyName===e;case 129:return e.parent.identifier===e;case 135:return e.parent.propertyName===e;case 242:return e.parent.identifier===e;case 238:return e.parent.identifier===e;case 240:return e.parent.propertyName===e;case 241:return e.parent.propertyName===e;case 243:return e.parent.propertyName===e;case 133:return e.parent.identifier===e}return!1}function d(e){return h(e)||v(e)}function m(e){return e&&e.parent&&11===e.kind()&&129===e.parent.kind()&&e.parent.identifier===e}function y(e){return e&&e.parent&&11===e.kind()&&135===e.parent.kind()&&e.parent.propertyName===e}function f(e){return e&&e.parent&&212===e.parent.kind()&&e.parent.name===e?!0:!1}function g(e){return e&&e.parent&&121===e.parent.kind()&&e.parent.right===e?!0:!1}function v(e){switch(e.kind()){case 225:return null!==E(e);case 133:case 131:case 128:case 242:case 219:case 218:case 144:case 129:case 130:case 124:case 122:case 238:case 137:case 135:case 139:case 140:case 136:case 138:case 132:case 243:case 240:case 241:case 222:case 142:case 143:case 145:case 141:return!0;default:return!1}}function S(t){if(v(t)){var n=225===t.kind()?E(t).preComments():t.preComments();if(n&&n.length>0){for(var r=n.length,i=new Array,o=r-1;o>=0&&T(n[o]);o--)i.push(n[o]);return i.reverse()}}return e.sentinelEmptyArray}function T(e){if(6===e.kind()){var t=e.fullText();return"*"===t.charAt(2)&&"/"!==t.charAt(3)}return!1}function b(e){if(e)switch(e.kind()){case 137:return e.parameterList;case 129:return b(e.callSignature);case 218:return b(e.callSignature);case 143:return b(e.callSignature);case 135:return b(e.callSignature);case 241:return b(e.callSignature);case 222:return b(e.callSignature);case 145:return b(e.callSignature);case 125:return e.parameterList;case 123:return e.parameterList;case 142:return e.parameterList;case 139:return e.parameterList;case 140:return e.parameterList}return null}function _(e){if(e)switch(e.kind()){case 129:return _(e.callSignature);case 218:return _(e.callSignature);case 143:return _(e.callSignature);case 135:return _(e.callSignature);case 241:return _(e.callSignature);case 222:return _(e.callSignature);case 145:return _(e.callSignature);case 142:return _(e.typeAnnotation);case 144:return _(e.typeAnnotation);case 141:return _(e.typeAnnotation);case 139:return _(e.typeAnnotation);case 242:return _(e.typeAnnotation);case 136:return _(e.variableDeclarator);case 225:return _(e.typeAnnotation);case 236:return _(e.typeAnnotation);case 125:return e.type;case 123:return e.type;case 244:return e.type}return null}function E(e){return e&&e.parent&&e.parent.parent&&e.parent.parent.parent&&2===e.parent.kind()&&224===e.parent.parent.kind()&&148===e.parent.parent.parent.kind()?e.parent.parent.parent:null}function C(t){var n=E(t);return n?n.modifiers:e.sentinelEmptyArray}function x(t){if(t)switch(t.kind()){case 164:case 165:return t=t.operand,13===t.kind()&&e.IntegerUtilities.isInteger(t.text());case 13:var n=t.text();return e.IntegerUtilities.isInteger(n)||e.IntegerUtilities.isHexInteger(n)}return!1}function k(e){for(;e;){if(130===e.kind())return e;e=e.parent}return null}function w(t,n){if(t){if(t.stringLiteral)return n===t.stringLiteral;var r=e.getModuleNames(t.name),i=r.indexOf(n);return i===r.length-1}return!1}function A(t,n){if(t){if(t.stringLiteral)return t.stringLiteral===n;var r=e.getModuleNames(t.name),i=r.indexOf(n);return i>=0}return!1}e.scriptIsElided=t,e.moduleIsElided=n,e.enumIsElided=i,e.importDeclarationIsElided=o,e.isValidAstNode=a,e.getAstAtPosition=s,e.getExtendsHeritageClause=l,e.getImplementsHeritageClause=c,e.isCallExpression=u,e.isCallExpressionTarget=p,e.isDeclarationASTOrDeclarationNameAST=d,e.isNameOfFunction=m,e.isNameOfMemberFunction=y,e.isNameOfMemberAccessExpression=f,e.isRightSideOfQualifiedName=g,function(t){function n(e){return{length:1,lastParameterIsRest:function(){return!1},ast:e,astAt:function(){return e},identifierAt:function(){return e},typeAt:function(){return null},initializerAt:function(){return null},isOptionalAt:function(){return!1}}}function r(t){return{length:1,lastParameterIsRest:function(){return null!==t.dotDotDotToken},ast:t,astAt:function(){return t},identifierAt:function(){return t.identifier},typeAt:function(){return e.getType(t)},initializerAt:function(){return t.equalsValueClause},isOptionalAt:function(){return i(t)}}}function i(e){return null!==e.questionToken||null!==e.equalsValueClause}function o(t){return{length:t.parameters.nonSeparatorCount(),lastParameterIsRest:function(){return e.lastParameterIsRest(t)},ast:t.parameters,astAt:function(e){return t.parameters.nonSeparatorAt(e)},identifierAt:function(e){return t.parameters.nonSeparatorAt(e).identifier},typeAt:function(n){return e.getType(t.parameters.nonSeparatorAt(n))},initializerAt:function(e){return t.parameters.nonSeparatorAt(e).equalsValueClause},isOptionalAt:function(e){return i(t.parameters.nonSeparatorAt(e))}}}t.fromIdentifier=n,t.fromParameter=r,t.fromParameterList=o}(e.Parameters||(e.Parameters={}));e.Parameters;e.isDeclarationAST=v,e.docComments=S,e.getParameterList=b,e.getType=_,e.getVariableDeclaratorModifiers=C,e.isIntegerLiteralAST=x,e.getEnclosingModuleDeclaration=k,e.isLastNameOfModule=w,e.isAnyNameOfModule=A}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(e,t){for(var n=0,r=e.childCount();r>n;n++)t.walk(e.childAt(n))}function n(e,t){t.walk(e.expression)}function r(e,t){t.walk(e.operand)}function i(e,t){t.walk(e.operand)}function o(e,t){t.walk(e.expression)}function a(e,t){t.walk(e.typeArguments)}function s(e,t){t.walk(e.expression)}function l(e,t){t.walk(e.expression)}function c(e,t){t.walk(e.typeArgumentList),t.walk(e.arguments)}function u(e,t){t.walk(e.expressions)}function p(e,t){t.walk(e.propertyName),t.walk(e.expression)}function h(e,t){t.walk(e.propertyName),t.walk(e.callSignature),t.walk(e.block)}function d(e,t){t.walk(e.propertyName),t.walk(e.parameterList),t.walk(e.typeAnnotation),t.walk(e.block)}function m(e,t){for(var n=0,r=e.nonSeparatorCount();r>n;n++)t.walk(e.nonSeparatorAt(n))}function y(e,t){t.walk(e.propertyName),t.walk(e.parameterList),t.walk(e.block)}function f(e,t){t.walk(e.propertyAssignments)}function g(e,t){t.walk(e.type),t.walk(e.expression)}function v(e,t){t.walk(e.expression)}function S(e,t){t.walk(e.expression),t.walk(e.argumentExpression)}function T(e,t){t.walk(e.expression),t.walk(e.name)}function b(e,t){t.walk(e.left),t.walk(e.right)}function _(e,t){t.walk(e.left),t.walk(e.right)}function E(e,t){t.walk(e.value)}function C(e,t){t.walk(e.identifier),t.walk(e.constraint)}function x(e,t){t.walk(e.typeParameters)}function k(e,t){t.walk(e.name),t.walk(e.typeArgumentList)}function w(e,t){t.walk(e.type)}function A(e,t){t.walk(e.name)}function D(e,t){t.walk(e.expression),t.walk(e.argumentList)}function I(e,t){t.walk(e.expression),t.walk(e.argumentList)}function L(e,t){t.walk(e.condition),t.walk(e.whenTrue),t.walk(e.whenFalse)}function N(e,t){t.walk(e.identifier),t.walk(e.callSignature),t.walk(e.block)}function P(e,t){t.walk(e.typeParameterList),t.walk(e.parameterList),t.walk(e.type)}function M(e,t){t.walk(e.callSignature),t.walk(e.block),t.walk(e.expression)}function O(e,t){t.walk(e.identifier),t.walk(e.block),t.walk(e.expression)}function F(e,t){t.walk(e.propertyName),t.walk(e.callSignature),t.walk(e.block)}function R(e,t){t.walk(e.identifier),t.walk(e.callSignature),t.walk(e.block)}function V(e,t){t.walk(e.indexSignature)}function B(e,t){t.walk(e.parameter),t.walk(e.typeAnnotation)}function G(e,t){t.walk(e.typeParameterList),t.walk(e.parameterList),t.walk(e.typeAnnotation)}function H(e,t){t.walk(e.type)}function K(e,t){t.walk(e.parameterList),t.walk(e.block)}function U(e,t){t.walk(e.typeParameterList),t.walk(e.parameterList),t.walk(e.type)}function W(e,t){t.walk(e.callSignature)}function j(e,t){t.walk(e.identifier),t.walk(e.typeAnnotation),t.walk(e.equalsValueClause)}function q(e,t){t.walk(e.parameters)}function z(e,t){t.walk(e.propertyName),t.walk(e.typeAnnotation)}function Y(e,t){t.walk(e.propertyName),t.walk(e.typeAnnotation),t.walk(e.equalsValueClause)}function J(e,t){t.walk(e.variableDeclarator)}function X(e,t){t.walk(e.propertyName),t.walk(e.callSignature)}function Q(e,t){t.walk(e.expression)}function Z(e,t){t.walk(e.variableDeclaration),t.walk(e.initializer),t.walk(e.condition),t.walk(e.incrementor),t.walk(e.statement)}function $(e,t){t.walk(e.variableDeclaration),t.walk(e.left),t.walk(e.expression),t.walk(e.statement)}function et(e,t){t.walk(e.condition),t.walk(e.statement),t.walk(e.elseClause)}function tt(e,t){t.walk(e.statement)}function nt(e,t){t.walk(e.condition),t.walk(e.statement)}function rt(e,t){t.walk(e.condition),t.walk(e.statement)}function it(e,t){t.walk(e.statements)}function ot(e,t){t.walk(e.declarators)}function at(e,t){t.walk(e.expression),t.walk(e.statements)}function st(e,t){t.walk(e.statements)}function lt(e,t){t.walk(e.expression),t.walk(e.switchClauses)}function ct(e,t){t.walk(e.block),t.walk(e.catchClause),t.walk(e.finallyClause)}function ut(e,t){t.walk(e.identifier),t.walk(e.typeAnnotation),t.walk(e.block)}function pt(e,t){t.walk(e.stringLiteral)}function ht(e,t){t.walk(e.block)}function dt(e,t){t.walk(e.identifier),t.walk(e.typeParameterList),t.walk(e.heritageClauses),t.walk(e.classElements)}function mt(e,t){t.walk(e.moduleElements)}function yt(e,t){t.walk(e.typeNames)}function ft(e,t){t.walk(e.identifier),t.walk(e.typeParameterList),t.walk(e.heritageClauses),t.walk(e.body)}function gt(e,t){t.walk(e.typeMembers)}function vt(e,t){t.walk(e.type)}function St(e,t){t.walk(e.name),t.walk(e.stringLiteral),t.walk(e.moduleElements)}function Tt(e,t){t.walk(e.moduleName)}function bt(e,t){t.walk(e.identifier),t.walk(e.enumElements)}function _t(e,t){t.walk(e.propertyName),t.walk(e.equalsValueClause)}function Et(e,t){t.walk(e.identifier),t.walk(e.moduleReference)}function Ct(e,t){t.walk(e.identifier)}function xt(e,t){t.walk(e.condition),t.walk(e.statement)}function kt(e,t){t.walk(e.expression)}function wt(e,t){t.walk(e.identifier),t.walk(e.statement)}function At(e,t){t.walk(e.declaration)}function Dt(){return Bt}for(var It=new Array(247),Lt=9,Nt=119;Nt>=Lt;Lt++)It[Lt]=null;for(var Lt=4,Nt=8;Nt>=Lt;Lt++)It[Lt]=null;It[175]=_,It[208]=_,It[180]=_,It[60]=null,It[226]=c,It[214]=u,It[124]=vt,It[219]=O,It[218]=M,It[174]=_,It[191]=_,It[190]=_,It[166]=r,It[189]=_,It[146]=it,It[61]=null,It[152]=null,It[142]=G,It[233]=at,It[220]=g,It[236]=ut,It[131]=dt,It[173]=_,It[186]=L,It[239]=H,It[137]=K,It[143]=W,It[153]=null,It[125]=U,It[162]=null,It[234]=st,It[170]=o,It[178]=_,It[206]=_,It[161]=rt,It[221]=S,It[235]=tt,It[156]=null,It[132]=bt,It[243]=_t,It[194]=_,It[232]=E,It[192]=_,It[181]=_,It[134]=Ct,It[149]=kt,It[230]=yt,It[245]=pt,It[24]=null,It[237]=ht,It[155]=$,It[154]=Z,It[129]=R,It[222]=N,It[241]=h,It[123]=P,It[126]=k,It[139]=d,It[197]=_,It[199]=_,It[147]=et,It[231]=yt,It[133]=Et,It[138]=V,It[144]=B,It[201]=_,It[200]=_,It[128]=ft,It[213]=D,It[160]=wt,It[183]=_,It[202]=_,It[196]=_,It[198]=_,It[1]=t,It[188]=_,It[167]=r,It[187]=_,It[212]=T,It[135]=F,It[136]=J,It[145]=X,It[130]=St,It[246]=Tt,It[179]=_,It[207]=_,It[177]=_,It[205]=_,It[11]=null,It[165]=r,It[0]=null,It[195]=_,It[193]=_,It[32]=null,It[67]=null,It[13]=null,It[216]=I,It[215]=f,It[122]=gt,It[223]=null,It[182]=_,It[242]=j,It[227]=q,It[217]=v,It[164]=r,It[211]=i,It[210]=i,It[169]=r,It[168]=r,It[141]=z,It[121]=b,It[12]=null,It[150]=Q,It[120]=mt,It[2]=m,It[140]=y,It[184]=_,It[203]=_,It[240]=p,It[14]=null,It[69]=null,It[176]=_,It[209]=_,It[50]=null,It[151]=lt,It[35]=null,It[157]=n,It[3]=null,It[37]=null,It[159]=ct,It[244]=w,It[228]=a,It[171]=s,It[238]=C,It[229]=x,It[127]=A,It[185]=_,It[204]=_,It[224]=ot,It[225]=Y,It[148]=At,It[172]=l,It[41]=null,It[158]=nt,It[163]=xt;for(var Pt in e.SyntaxKind)e.SyntaxKind.hasOwnProperty(Pt)&&e.StringUtilities.isString(e.SyntaxKind[Pt])&&e.Debug.assert(void 0!==It[Pt],"Fix initWalkers: "+e.SyntaxKind[Pt]);var Mt=function(){function e(){this.goChildren=!0,this.stopWalking=!1}return e}();e.AstWalkOptions=Mt;var Ot=function(){function e(e,t){this.pre=e,this.state=t,this.options=new Mt}return e.prototype.walk=function(e){if(e){this.pre(e,this.state);var t=It[e.kind()];t&&t(e,this)}},e}(),Ft=function(){function e(e,t,n){this.pre=e,this.post=t,this.state=n,this.options=new Mt}return e.prototype.walk=function(e){if(e){this.pre(e,this.state);var t=It[e.kind()];t&&t(e,this),this.post(e,this.state)}},e}(),Rt=function(){function e(e,t,n){this.pre=e,this.post=t,this.state=n,this.options=new Mt}return e.prototype.walk=function(e){if(e&&!this.options.stopWalking&&(this.pre(e,this),!this.options.stopWalking)){if(this.options.goChildren){var t=It[e.kind()];t&&t(e,this)}else this.options.goChildren=!0;this.post&&this.post(e,this)}},e}(),Vt=function(){function e(){}return e.prototype.walk=function(e,t,n,r){new Rt(t,n,r).walk(e)},e.prototype.simpleWalk=function(e,t,n,r){n?new Ft(t,n,r).walk(e):new Ot(t,r).walk(e)},e}();e.AstWalkerFactory=Vt;var Bt=new Vt;e.getAstWalkerFactory=Dt}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){}return e.encode=function(t){if(64>t)return e.encodedValues.charAt(t);throw TypeError(t+": not a 64 based value")},e.decodeChar=function(t){if(1===t.length)return e.encodedValues.indexOf(t);throw TypeError('"'+t+'" must have length 1')},e.encodedValues="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e}(),n=function(){function n(){}return n.encode=function(e){0>e?e=(-e<<1)+1:e<<=1;var n="";do{var r=31&e;e>>=5,e>0&&(r=32|r),n+=t.encode(r)}while(e>0);return n},n.decode=function(n){for(var r=0,i=!1,o=0,a=0;a>1&15):r|=(31&s)<0,"Mapping level should never be less than 0. This suggests a missing start call.");var n=this.mappingLevel.pop(),r=n.kind?e.SyntaxKind[n.kind()]:[n.start(),n.end()],i=t.kind?e.SyntaxKind[t.kind()]:[t.start(),t.end()];e.Debug.assert(t===n,"Provided ast is not the expected AST, Expected: "+r+" Given: "+i)},t.prototype.setNewSourceFile=function(e,t){var n=[];this.allSourceMappings.push(n),this.currentMappings=[n],this.currentNameIndex=[],this.setNewSourceFilePath(e,t)},t.prototype.setSourceMapOptions=function(n,r,i,o){var a=e.getPrettyName(r,!1,!0),s=a+t.MapFileExtension;this.jsFileName=a,i.sourceMapRootDirectory()?(this.sourceMapDirectory=i.sourceMapRootDirectory(),n.emitToOwnOutputFile()&&(this.sourceMapDirectory=this.sourceMapDirectory+e.switchToForwardSlashes(e.getRootFilePath(n.fileName).replace(i.commonDirectoryPath(),""))),e.isRelative(this.sourceMapDirectory)?(this.sourceMapDirectory=i.commonDirectoryPath()+this.sourceMapDirectory,this.sourceMapDirectory=e.convertToDirectoryPath(e.switchToForwardSlashes(o(this.sourceMapDirectory))),this.sourceMapPath=e.getRelativePathToFixedPath(e.getRootFilePath(r),this.sourceMapDirectory+s)):this.sourceMapPath=this.sourceMapDirectory+s):(this.sourceMapPath=s,this.sourceMapDirectory=e.getRootFilePath(r)),this.sourceRoot=i.sourceRootDirectory()},t.prototype.setNewSourceFilePath=function(t,n){var r=e.switchToForwardSlashes(t.fileName);r=n.sourceRootDirectory()?e.getRelativePathToFixedPath(n.commonDirectoryPath(),r):e.getRelativePathToFixedPath(this.sourceMapDirectory,r),this.tsFilePaths.push(r)},t.prototype.emitSourceMapping=function(){var t=this;e.Debug.assert(0===this.mappingLevel.length,"Mapping level is not 0. This suggest a missing end call. Value: "+this.mappingLevel.map(function(t){return["Node of type",e.SyntaxKind[t.kind()],"at",t.start(),"to",t.end()].join(" ")}).join(", ")),this.jsFile.WriteLine("//# sourceMappingURL="+this.sourceMapPath);for(var n="",i=0,o=0,a=0,s=0,l=0,c=0,u=!1,p=null,h=0;h=0?t.names[m]:void 0)),n+=e.Base64VLQFormat.encode(d.emittedColumn-i),i=d.emittedColumn,n+=e.Base64VLQFormat.encode(h-l),l=h,n+=e.Base64VLQFormat.encode(d.sourceLine-1-s),s=d.sourceLine-1,n+=e.Base64VLQFormat.encode(d.sourceColumn-a),a=d.sourceColumn,m>=0&&(n+=e.Base64VLQFormat.encode(m-c),c=m),u=!0,p=d}},m=function(e){for(var t=0;t0&&null!==t.nonSeparatorAt(t.nonSeparatorCount()-1).dotDotDotToken}function n(e){return e.classElements.lastOrDefault(function(e){return 137===e.kind()})}function r(e){return 6===e.kind()?e.fullText().split("\n").map(function(e){return e.trim()}):[e.fullText().trim()]}!function(e){e[e.Prog=0]="Prog",e[e.Module=1]="Module",e[e.DynamicModule=2]="DynamicModule",e[e.Class=3]="Class",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Args=6]="Args",e[e.Interface=7]="Interface"}(e.EmitContainer||(e.EmitContainer={}));var i=(e.EmitContainer,function(){function e(){this.column=0,this.line=0,this.container=0}return e}());e.EmitState=i;var o=function(){function t(t,n){this.resolvePath=n,this._diagnostic=null,this._settings=null,this._commonDirectoryPath="",this._sharedOutputFile="",this._sourceRootDirectory="",this._sourceMapRootDirectory="",this._outputDirectory="";var r=t.compilationSettings();if(this._settings=r,0===r.moduleGenTarget()&&t._isDynamicModuleCompilation())return void(this._diagnostic=new e.Diagnostic(null,null,0,0,e.DiagnosticCode.Cannot_compile_external_modules_unless_the_module_flag_is_provided,null));if(!r.mapSourceFiles()){if(r.mapRoot())return r.sourceRoot()?void(this._diagnostic=new e.Diagnostic(null,null,0,0,e.DiagnosticCode.Options_mapRoot_and_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option,null)):void(this._diagnostic=new e.Diagnostic(null,null,0,0,e.DiagnosticCode.Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option,null));if(r.sourceRoot())return void(this._diagnostic=new e.Diagnostic(null,null,0,0,e.DiagnosticCode.Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option,null))}this._sourceMapRootDirectory=e.convertToDirectoryPath(e.switchToForwardSlashes(r.mapRoot())),this._sourceRootDirectory=e.convertToDirectoryPath(e.switchToForwardSlashes(r.sourceRoot())),(r.outFileOption()||r.outDirOption()||r.mapRoot()||r.sourceRoot())&&(r.outFileOption()&&(this._sharedOutputFile=e.switchToForwardSlashes(n(r.outFileOption()))),r.outDirOption()&&(this._outputDirectory=e.convertToDirectoryPath(e.switchToForwardSlashes(n(r.outDirOption())))),(this._outputDirectory||this._sourceMapRootDirectory||this.sourceRootDirectory)&&this.determineCommonDirectoryPath(t)) }return t.prototype.diagnostic=function(){return this._diagnostic},t.prototype.commonDirectoryPath=function(){return this._commonDirectoryPath},t.prototype.sharedOutputFile=function(){return this._sharedOutputFile},t.prototype.sourceRootDirectory=function(){return this._sourceRootDirectory},t.prototype.sourceMapRootDirectory=function(){return this._sourceMapRootDirectory},t.prototype.outputDirectory=function(){return this._outputDirectory},t.prototype.compilationSettings=function(){return this._settings},t.prototype.determineCommonDirectoryPath=function(t){for(var n=[],r=-1,i=t.fileNames(),o=0,a=i.length;a>o;o++){{var s=i[o],l=t.getDocument(i[o]);l.sourceUnit()}if(!l.isDeclareFile()){var c=e.filePathComponents(s);if(-1===r)n=c,r=n.length;else{for(var u=!1,p=0;r>p&&p0?this.declStack[e-1]:null;return t},t.prototype.setExportAssignmentIdentifier=function(e){this.exportAssignmentIdentifier=e},t.prototype.getExportAssignmentIdentifier=function(){return this.exportAssignmentIdentifier},t.prototype.setDocument=function(e){this.document=e},t.prototype.shouldEmitImportDeclaration=function(t){return e.importDeclarationIsElided(t,this.semanticInfoChain,this.emitOptions.compilationSettings())},t.prototype.emitImportDeclaration=function(t){var n=245===t.moduleReference.kind(),r=this.semanticInfoChain.getDeclForAST(t),i=e.hasFlag(r.flags,1),o=2==this.emitOptions.compilationSettings().moduleGenTarget();this.emitComments(t,!0);var a,s=r.getSymbol(),l=s.getContainer(),c=l?l.kind:0,u=l?l.getAssociatedContainerType():null,p=u?u.kind:0,h=!1,d=!1;if(i&&(4==c||32===c||4===p||32===p)){if(s.getExportAssignedTypeSymbol()||s.getExportAssignedContainerSymbol())h=!0;else{var m=s.getExportAssignedValueSymbol();!m||65536!=m.kind&&16384!=m.kind?d=!0:h=!0}a=2===this.emitState.container?"exports.":this.moduleName+"."}if(o&&n)h=!0;else{this.recordSourceMappingStart(t),this.writeToOutput(d?a:"var "),this.writeToOutput(t.identifier.text()+" = ");var y=t.moduleReference;n?this.writeToOutput("require("+y.stringLiteral.text()+")"):this.emitJavascript(y.moduleName,!1),this.recordSourceMappingEnd(t),this.writeToOutput(";"),h&&(this.writeLineToOutput(""),this.emitIndent())}h&&(this.writeToOutputWithSourceMapRecord(a+t.identifier.text()+" = "+t.identifier.text(),t),this.writeToOutput(";")),this.emitComments(t,!1)},t.prototype.createSourceMapper=function(t,n,r,i,o){this.sourceMapper=new e.SourceMapper(r,i,t,n,this.emitOptions,o)},t.prototype.setSourceMapperNewSourceFile=function(e){this.sourceMapper.setNewSourceFile(e,this.emitOptions)},t.prototype.updateLineAndColumn=function(t){var n=e.TextUtilities.parseLineStarts(t);n.length>1?(this.emitState.line+=n.length-1,this.emitState.column=t.length-n[n.length-1]):this.emitState.column+=t.length},t.prototype.writeToOutputWithSourceMapRecord=function(e,t){this.recordSourceMappingStart(t),this.writeToOutput(e),this.recordSourceMappingEnd(t)},t.prototype.writeToOutput=function(e){this.outfile.Write(e),this.updateLineAndColumn(e)},t.prototype.writeLineToOutput=function(e,t){"undefined"==typeof t&&(t=!1),(t||""!==e||0!==this.emitState.column)&&(this.outfile.WriteLine(e),this.updateLineAndColumn(e),this.emitState.column=0,this.emitState.line++)},t.prototype.writeCaptureThisStatement=function(e){this.emitIndent(),this.writeToOutputWithSourceMapRecord(this.captureThisStmtString,e),this.writeLineToOutput("")},t.prototype.setContainer=function(e){var t=this.emitState.container;return this.emitState.container=e,t},t.prototype.getIndentString=function(){return this.indenter.getIndent()},t.prototype.emitIndent=function(){this.writeToOutput(this.getIndentString())},t.prototype.emitComment=function(e,t,n){if(!this.emitOptions.compilationSettings().removeComments()){var i=r(e),o=this.emitState.column;if(0===o?this.emitIndent():t&&n&&this.writeToOutput(" "),6===e.kind()){if(this.recordSourceMappingStart(e),this.writeToOutput(i[0]),!(i.length>1||e.endsLine))return this.recordSourceMappingEnd(e),void this.writeToOutput(" ");for(var a=1;an;n++)this.emitComment(e[n],t,0===n)},t.prototype.emitObjectLiteralExpression=function(e){this.recordSourceMappingStart(e),this.writeToOutput("{"),this.emitCommaSeparatedList(e,e.propertyAssignments," ",!0),this.writeToOutput("}"),this.recordSourceMappingEnd(e)},t.prototype.emitArrayLiteralExpression=function(e){this.recordSourceMappingStart(e),this.writeToOutput("["),this.emitCommaSeparatedList(e,e.expressions,"",!0),this.writeToOutput("]"),this.recordSourceMappingEnd(e)},t.prototype.emitObjectCreationExpression=function(e){this.recordSourceMappingStart(e),this.writeToOutput("new ");var t=e.expression;this.emit(t),e.argumentList&&(this.recordSourceMappingStart(e.argumentList),this.writeToOutput("("),this.emitCommaSeparatedList(e.argumentList,e.argumentList.arguments,"",!1),this.writeToOutputWithSourceMapRecord(")",e.argumentList.closeParenToken),this.recordSourceMappingEnd(e.argumentList)),this.recordSourceMappingEnd(e)},t.prototype.getConstantDecl=function(e){var t=this.semanticInfoChain.getSymbolForAST(e);if(t&&67108864===t.kind){var n=t.getDeclarations();if(1===n.length){var r=n[0];if(67108864===r.kind)return r}}return null},t.prototype.tryEmitConstant=function(e){var t=e.name,n=this.getConstantDecl(e);if(n){var r=n.constantValue;if(null!==r){this.recordSourceMappingStart(e),this.writeToOutput(r.toString());var i=" /* ";return i+=t.text(),i+=" */",this.writeToOutput(i),this.recordSourceMappingEnd(e),!0}}return!1},t.prototype.emitInvocationExpression=function(e){this.recordSourceMappingStart(e);var t=e.expression,n=e.argumentList.arguments;212===t.kind()&&50===t.expression.kind()?(this.emit(t),this.writeToOutput(".call"),this.recordSourceMappingStart(n),this.writeToOutput("("),this.emitThis(),n&&n.nonSeparatorCount()>0&&(this.writeToOutput(", "),this.emitCommaSeparatedList(e.argumentList,n,"",!1))):(50===e.expression.kind()&&4===this.emitState.container?this.writeToOutput("_super.call"):this.emitJavascript(t,!1),this.recordSourceMappingStart(n),this.writeToOutput("("),50===e.expression.kind()&&4===this.emitState.container&&(this.writeToOutput("this"),n&&n.nonSeparatorCount()>0&&this.writeToOutput(", ")),this.emitCommaSeparatedList(e.argumentList,n,"",!1)),this.writeToOutputWithSourceMapRecord(")",e.argumentList.closeParenToken),this.recordSourceMappingEnd(n),this.recordSourceMappingEnd(e)},t.prototype.emitParameterList=function(t){this.writeToOutput("("),this.emitCommentsArray(t.openParenTrailingComments,!0),this.emitFunctionParameters(e.Parameters.fromParameterList(t)),this.writeToOutput(")")},t.prototype.emitFunctionParameters=function(e){var t=0;if(e){this.emitComments(e.ast,!0);var n=this.setContainer(6);t=e.length;var r=t;e.lastParameterIsRest()&&r--;for(var i=0;r>i;i++){var o=e.astAt(i);this.emit(o),r-1>i&&this.writeToOutput(", ")}this.setContainer(n),this.emitComments(e.ast,!1)}},t.prototype.emitFunctionBodyStatements=function(e,t,n,r,i){this.writeLineToOutput(" {"),e&&this.recordSourceMappingNameStart(e),this.indenter.increaseIndent(),n&&(this.emitDefaultValueAssignments(n),this.emitRestParameterInitializer(n)),this.shouldCaptureThis(t)&&this.writeCaptureThisStatement(t),r?(this.emitList(r.statements),this.emitCommentsArray(r.closeBraceLeadingComments,!1)):(this.emitIndent(),this.emitCommentsArray(i.preComments(),!1),this.writeToOutput("return "),this.emit(i),this.writeLineToOutput(";"),this.emitCommentsArray(i.postComments(),!0)),this.indenter.decreaseIndent(),this.emitIndent(),r?this.writeToOutputWithSourceMapRecord("}",r.closeBraceToken):this.writeToOutputWithSourceMapRecord("}",i),e&&this.recordSourceMappingNameEnd()},t.prototype.emitDefaultValueAssignments=function(e){var t=e.length;e.lastParameterIsRest()&&t--;for(var n=0;t>n;n++){var r=e.astAt(n),i=e.identifierAt(n),o=e.initializerAt(n);o&&(this.emitIndent(),this.recordSourceMappingStart(r),this.writeToOutput("if (typeof "+i.text()+' === "undefined") { '),this.writeToOutputWithSourceMapRecord(i.text(),i),this.emitJavascript(o,!1),this.writeLineToOutput("; }"),this.recordSourceMappingEnd(r))}},t.prototype.emitRestParameterInitializer=function(e){if(e.lastParameterIsRest()){var t=e.length,n=e.astAt(t-1),r=e.identifierAt(t-1);this.emitIndent(),this.recordSourceMappingStart(n),this.writeToOutput("var "),this.writeToOutputWithSourceMapRecord(r.text(),r),this.writeLineToOutput(" = [];"),this.recordSourceMappingEnd(n),this.emitIndent(),this.writeToOutput("for ("),this.writeToOutputWithSourceMapRecord("var _i = 0;",n),this.writeToOutput(" "),this.writeToOutputWithSourceMapRecord("_i < (arguments.length - "+(t-1)+")",n),this.writeToOutput("; "),this.writeToOutputWithSourceMapRecord("_i++",n),this.writeLineToOutput(") {"),this.indenter.increaseIndent(),this.emitIndent(),this.writeToOutputWithSourceMapRecord(r.text()+"[_i] = arguments[_i + "+(t-1)+"];",n),this.writeLineToOutput(""),this.indenter.decreaseIndent(),this.emitIndent(),this.writeLineToOutput("}")}},t.prototype.getImportDecls=function(){for(var e=this.semanticInfoChain.topLevelDecl(this.document.fileName),t=[],n=e.getChildDecls()[0],r=n.getChildDecls(),i=0,o=r.length;o>i;i++){var a=r[i];if(128&a.kind){var s=this.semanticInfoChain.getASTForDecl(a);if(245===s.moduleReference.kind()){var l=a.getSymbol(),c=l&&l.type;c&&c!==this.semanticInfoChain.anyTypeSymbol&&!c.isError()&&t.push(a)}}}return t},t.prototype.getModuleImportAndDependencyList=function(){var e="",t="",n=this.getImportDecls(this.document.fileName);if(n.length)for(var r=0;r=0),r?this.emitList(t.moduleElements):(this.emitIndent(),this.emitSingleModuleDeclaration(t,l[c+1]),this.writeLineToOutput(""))}this.moduleName=n.text(),this.indenter.decreaseIndent(),this.emitIndent();var u=2===a;if(this.recordSourceMappingStart(t.endingToken),0===a&&s)this.writeToOutput("}"),this.recordSourceMappingNameEnd(),this.recordSourceMappingEnd(t.endingToken),this.writeToOutput(")(this."+this.moduleName+" || (this."+this.moduleName+" = {}));");else if(s||0===a){var p=""!==o?(u?"exports":o)+".":o;this.writeToOutput("}"),this.recordSourceMappingNameEnd(),this.recordSourceMappingEnd(t.endingToken),this.writeToOutput(")("+p+this.moduleName+" || ("+p+this.moduleName+" = {}));")}else s||0===a?(this.writeToOutput("}"),this.recordSourceMappingNameEnd(),this.recordSourceMappingEnd(t.endingToken),this.writeToOutput(")();")):(this.writeToOutput("}"),this.recordSourceMappingNameEnd(),this.recordSourceMappingEnd(t.endingToken),this.writeToOutput(")("+this.moduleName+" || ("+this.moduleName+" = {}));"));this.recordSourceMappingEnd(t),0!==a&&s&&(this.recordSourceMappingStart(t),u?(this.writeLineToOutput(""),this.emitIndent(),this.writeToOutput("var "+this.moduleName+" = exports."+this.moduleName+";")):(this.writeLineToOutput(""),this.emitIndent(),this.writeToOutput("var "+this.moduleName+" = "+o+"."+this.moduleName+";")),this.recordSourceMappingEnd(t)),this.setContainer(a),this.moduleName=o,this.popDecl(i),r&&this.emitComments(t,!1)},t.prototype.emitEnumElement=function(t){var n=this.semanticInfoChain.getDeclForAST(t);e.Debug.assert(n&&67108864===n.kind),this.emitComments(t,!0),this.recordSourceMappingStart(t);var r=t.propertyName.text(),i=e.isQuoted(r);this.writeToOutput(this.moduleName),this.writeToOutput("["),this.writeToOutput(this.moduleName),this.writeToOutput("["),this.writeToOutput(i?r:'"'+r+'"'),this.writeToOutput("]"),t.equalsValueClause?this.emit(t.equalsValueClause):null!==n.constantValue?(this.writeToOutput(" = "),this.writeToOutput(n.constantValue.toString())):this.writeToOutput(" = null"),this.writeToOutput("] = "),this.writeToOutput(i?r:'"'+r+'"'),this.recordSourceMappingEnd(t),this.emitComments(t,!1),this.writeToOutput(";")},t.prototype.emitElementAccessExpression=function(e){this.recordSourceMappingStart(e),this.emit(e.expression),this.writeToOutput("["),this.emit(e.argumentExpression),this.writeToOutput("]"),this.recordSourceMappingEnd(e)},t.prototype.emitSimpleArrowFunctionExpression=function(t){this.emitAnyArrowFunctionExpression(t,null,e.Parameters.fromIdentifier(t.identifier),t.block,t.expression)},t.prototype.emitParenthesizedArrowFunctionExpression=function(t){this.emitAnyArrowFunctionExpression(t,null,e.Parameters.fromParameterList(t.callSignature.parameterList),t.block,t.expression)},t.prototype.emitAnyArrowFunctionExpression=function(e,t,n,r,i){var o=this.inArrowFunction;this.inArrowFunction=!0;var a=this.setContainer(5);this.recordSourceMappingStart(e);var s=this.semanticInfoChain.getDeclForAST(e);this.pushDecl(s),this.emitComments(e,!0),this.recordSourceMappingStart(e),this.writeToOutput("function "),this.writeToOutput("("),this.emitFunctionParameters(n),this.writeToOutput(")"),this.emitFunctionBodyStatements(t,e,n,r,i),this.recordSourceMappingEnd(e),this.recordSourceMappingEnd(e),this.emitComments(e,!1),this.popDecl(s),this.setContainer(a),this.inArrowFunction=o},t.prototype.emitConstructor=function(t){if(t.block){var n=this.setContainer(4);this.recordSourceMappingStart(t);var r=this.semanticInfoChain.getDeclForAST(t);this.pushDecl(r),this.emitComments(t,!0),this.recordSourceMappingStart(t),this.writeToOutput("function "),this.writeToOutput(this.thisClassNode.identifier.text()),this.writeToOutput("(");var i=e.Parameters.fromParameterList(t.parameterList);this.emitFunctionParameters(i),this.writeLineToOutput(") {"),this.recordSourceMappingNameStart("constructor"),this.indenter.increaseIndent(),this.emitDefaultValueAssignments(i),this.emitRestParameterInitializer(i),this.shouldCaptureThis(t)&&this.writeCaptureThisStatement(t),this.emitConstructorStatements(t),this.emitCommentsArray(t.block.closeBraceLeadingComments,!1),this.indenter.decreaseIndent(),this.emitIndent(),this.writeToOutputWithSourceMapRecord("}",t.block.closeBraceToken),this.recordSourceMappingNameEnd(),this.recordSourceMappingEnd(t),this.recordSourceMappingEnd(t),this.emitComments(t,!1),this.popDecl(r),this.setContainer(n)}},t.prototype.emitGetAccessor=function(t){this.recordSourceMappingStart(t),this.writeToOutput("get ");var n=this.setContainer(5);this.recordSourceMappingStart(t);var r=this.semanticInfoChain.getDeclForAST(t);this.pushDecl(r),this.recordSourceMappingStart(t);this.recordSourceMappingNameStart(t.propertyName.text()),this.writeToOutput(t.propertyName.text()),this.writeToOutput("("),this.writeToOutput(")"),this.emitFunctionBodyStatements(null,t,e.Parameters.fromParameterList(t.parameterList),t.block,null),this.recordSourceMappingEnd(t),this.recordSourceMappingEnd(t),this.popDecl(r),this.setContainer(n),this.recordSourceMappingEnd(t)},t.prototype.emitSetAccessor=function(t){this.recordSourceMappingStart(t),this.writeToOutput("set ");var n=this.setContainer(5);this.recordSourceMappingStart(t);var r=this.semanticInfoChain.getDeclForAST(t);this.pushDecl(r),this.recordSourceMappingStart(t);this.recordSourceMappingNameStart(t.propertyName.text()),this.writeToOutput(t.propertyName.text()),this.writeToOutput("(");var a=e.Parameters.fromParameterList(t.parameterList);this.emitFunctionParameters(a),this.writeToOutput(")"),this.emitFunctionBodyStatements(null,t,a,t.block,null),this.recordSourceMappingEnd(t),this.recordSourceMappingEnd(t),this.popDecl(r),this.setContainer(n),this.recordSourceMappingEnd(t)},t.prototype.emitFunctionExpression=function(t){var n=this.inArrowFunction;this.inArrowFunction=!1;var r=this.setContainer(5),i=t.identifier?t.identifier.text():null;this.recordSourceMappingStart(t);var o=this.semanticInfoChain.getDeclForAST(t);this.pushDecl(o),this.recordSourceMappingStart(t),this.writeToOutput("function "),t.identifier&&(this.recordSourceMappingStart(t.identifier),this.writeToOutput(t.identifier.text()),this.recordSourceMappingEnd(t.identifier)),this.writeToOutput("(");var a=e.Parameters.fromParameterList(t.callSignature.parameterList);this.emitFunctionParameters(a),this.writeToOutput(")"),this.emitFunctionBodyStatements(i,t,a,t.block,null),this.recordSourceMappingEnd(t),this.recordSourceMappingEnd(t),this.emitComments(t,!1),this.popDecl(o),this.setContainer(r),this.inArrowFunction=n},t.prototype.emitFunction=function(t){if(null!==t.block){var n=this.inArrowFunction;this.inArrowFunction=!1;var r=this.setContainer(5),i=t.identifier.text();this.recordSourceMappingStart(t);var o=null!==t.identifier,a=this.semanticInfoChain.getDeclForAST(t);if(this.pushDecl(a),this.emitComments(t,!0),this.recordSourceMappingStart(t),this.writeToOutput("function "),o){var s=t.identifier.text();s&&(t.identifier&&this.recordSourceMappingStart(t.identifier),this.writeToOutput(s),t.identifier&&this.recordSourceMappingEnd(t.identifier))}this.emitParameterList(t.callSignature.parameterList);var l=e.Parameters.fromParameterList(t.callSignature.parameterList);if(this.emitFunctionBodyStatements(t.identifier.text(),t,l,t.block,null),this.recordSourceMappingEnd(t),this.recordSourceMappingEnd(t),this.emitComments(t,!1),this.popDecl(a),this.setContainer(r),this.inArrowFunction=n,t.block){var c=this.semanticInfoChain.getDeclForAST(t);if((1===this.emitState.container||2===this.emitState.container)&&c&&e.hasFlag(c.flags,1)){this.writeLineToOutput(""),this.emitIndent();var u=1===this.emitState.container?this.moduleName:"exports";this.recordSourceMappingStart(t),this.writeToOutput(u+"."+i+" = "+i+";"),this.recordSourceMappingEnd(t)}}}},t.prototype.emitAmbientVarDecl=function(e){this.recordSourceMappingStart(this.currentVariableDeclaration),e.equalsValueClause&&(this.emitComments(e,!0),this.recordSourceMappingStart(e),this.writeToOutputWithSourceMapRecord(e.propertyName.text(),e.propertyName),this.emitJavascript(e.equalsValueClause,!1),this.recordSourceMappingEnd(e),this.emitComments(e,!1))},t.prototype.emitVarDeclVar=function(){this.currentVariableDeclaration&&this.writeToOutput(53===this.currentVariableDeclaration.tokenKind?"let ":45===this.currentVariableDeclaration.tokenKind?"const ":"var ")},t.prototype.emitVariableDeclaration=function(t){{var n=t.declarators.nonSeparatorAt(0),r=this.semanticInfoChain.getSymbolForAST(n),i=r?r.getContainer():null;i?i.kind:0}this.emitComments(t,!0);var o=this.semanticInfoChain.getDeclForAST(n),a=o&&e.hasFlag(o.flags,8)&&null===n.equalsValueClause;if(!a){var s=this.currentVariableDeclaration;this.currentVariableDeclaration=t;for(var l=0,c=t.declarators.nonSeparatorCount();c>l;l++){var u=t.declarators.nonSeparatorAt(l);l>0&&this.writeToOutput(", "),this.emit(u)}this.currentVariableDeclaration=s,this.recordSourceMappingEnd(t)}this.emitComments(t,!1)},t.prototype.emitMemberVariableDeclaration=function(t){e.Debug.assert(!e.hasModifier(t.modifiers,16)&&t.variableDeclarator.equalsValueClause);var n=this.semanticInfoChain.getDeclForAST(t);this.pushDecl(n),this.emitComments(t,!0),this.recordSourceMappingStart(t);{var r=t.variableDeclarator.propertyName.text(),i=e.isQuoted(r)||11!==t.variableDeclarator.propertyName.kind(),o=this.semanticInfoChain.getSymbolForAST(t);o?o.getContainer():null,n&&n.getParentDecl()}if(this.writeToOutput(i?"this[":"this."),this.writeToOutputWithSourceMapRecord(t.variableDeclarator.propertyName.text(),t.variableDeclarator.propertyName),i&&this.writeToOutput("]"),t.variableDeclarator.equalsValueClause){var a=this.currentVariableDeclaration;this.emit(t.variableDeclarator.equalsValueClause),this.currentVariableDeclaration=a}6!==this.emitState.container&&this.writeToOutput(";"),this.recordSourceMappingEnd(t),this.emitComments(t,!1),this.popDecl(n)},t.prototype.emitVariableDeclarator=function(t){var n=this.semanticInfoChain.getDeclForAST(t);if(this.pushDecl(n),n&&8===(8&n.flags))this.emitAmbientVarDecl(t);else{this.emitComments(t,!0),this.recordSourceMappingStart(this.currentVariableDeclaration),this.recordSourceMappingStart(t);var r=(t.propertyName.text(),this.semanticInfoChain.getSymbolForAST(t)),i=(r?r.getContainer():null,n&&n.getParentDecl()),o=i&&102400&i.flags;if(o&&e.hasFlag(n.flags,1)?this.writeToOutput(2===this.emitState.container?"exports.":this.moduleName+"."):this.emitVarDeclVar(),this.writeToOutputWithSourceMapRecord(t.propertyName.text(),t.propertyName),t.equalsValueClause){var a=this.currentVariableDeclaration;this.emit(t.equalsValueClause),this.currentVariableDeclaration=a}this.recordSourceMappingEnd(t),this.emitComments(t,!1)}this.currentVariableDeclaration=void 0,this.popDecl(n)},t.prototype.symbolIsUsedInItsEnclosingContainer=function(e,t){"undefined"==typeof t&&(t=!1);var n=e.getDeclarations();if(n.length){var r=this.getEnclosingDecl();if(r){var i=n[0].getParentDecl();if(i){for(var o=i,a=r;o&&o.kind!==(t?32:4);)o=o.getParentDecl();if(o)for(;a&&a.kind!==(t?32:4);)a=a.getParentDecl();if(o&&a){var s=o===a;return!s&&e.anyDeclHasFlag(32768)&&(s=o===a.getParentDecl()),s}}}}return!1},t.prototype.getPotentialDeclPathInfoForEmit=function(e){var t=e.getDeclarations()[0],n=t.getParentDecl(),r=n?n.getParentPath():[],i=this.declStack,o=-1;if(i.length)for(var a=r.length-1;a>=0;a--){for(var s=r[a],l=i.length-1;l>=0;l--){var c=i[l];if(s===c){o=a;break}}if(o>=0)break}for(var u=r.length-1,a=u-1;a>o&&1&r[a+1].flags;a--)u=a;return{potentialPath:r,startingIndex:u}},t.prototype.emitDottedNameFromDeclPath=function(e,t,n){for(var r=t;n>=r;r++)this.writeToOutput(32===e[r].kind||65536&e[r].flags?"exports.":this.getModuleName(e[r],!0)+".")},t.prototype.emitSymbolContainerNameInEnclosingContext=function(e){var t=this.getPotentialDeclPathInfoForEmit(e),n=t.potentialPath,r=t.startingIndex;this.emitDottedNameFromDeclPath(n,r,n.length-1)},t.prototype.getSymbolForEmit=function(t){var n=this.semanticInfoChain.getSymbolForAST(t),r=this.semanticInfoChain.getAliasSymbolForAST(t);if(n&&r){var i=e.isTypesOnlyLocation(t)?r.getExportAssignedTypeSymbol():r.getExportAssignedValueSymbol();n==i&&(n=r,r=null)}return{symbol:n,aliasSymbol:r}},t.prototype.emitName=function(t,n){if(this.emitComments(t,!0),this.recordSourceMappingStart(t),t.text().length>0){var r=this.getSymbolForEmit(t),i=r.symbol;i||(i=this.semanticInfoChain.anyTypeSymbol);var o=r.aliasSymbol,a=i.kind,s=o&&o.getDeclarations()[0].getParentDecl()==this.getEnclosingDecl();if(n&&6!==this.emitState.container&&i){var l=i.getContainer();if(l){var c=l.kind;8===c?i.anyDeclHasFlag(16)?this.emitSymbolContainerNameInEnclosingContext(i):4096===a&&(this.emitThis(),this.writeToOutput(".")):e.PullHelpers.symbolIsModule(l)||64===c||l.anyDeclHasFlag(36864)?4096===a||67108864===a?this.emitSymbolContainerNameInEnclosingContext(i):i.anyDeclHasFlag(1)&&512===a&&!i.anyDeclHasFlag(36864)?this.emitSymbolContainerNameInEnclosingContext(i):i.anyDeclHasFlag(1)&&!this.symbolIsUsedInItsEnclosingContainer(i)&&this.emitSymbolContainerNameInEnclosingContext(i):(32===c||l.anyDeclHasFlag(65536))&&(4096===a?this.writeToOutput("exports."):!i.anyDeclHasFlag(1)||s||i.anyDeclHasFlag(118784)||32768===i.kind||8===i.kind||64===i.kind||this.writeToOutput("exports."))}}this.writeToOutput(t.text())}this.recordSourceMappingEnd(t),this.emitComments(t,!1)},t.prototype.recordSourceMappingNameStart=function(e){if(this.sourceMapper){var t=-1;if(e){if(this.sourceMapper.currentNameIndex.length>0){var n=this.sourceMapper.currentNameIndex[this.sourceMapper.currentNameIndex.length-1];-1!=n&&(e=this.sourceMapper.names[n]+"."+e)}var t=this.sourceMapper.names.length-1;for(t;t>=0&&this.sourceMapper.names[t]!=e;t--);-1==t&&(t=this.sourceMapper.names.length,this.sourceMapper.names.push(e))}this.sourceMapper.currentNameIndex.push(t)}},t.prototype.recordSourceMappingNameEnd=function(){this.sourceMapper&&this.sourceMapper.currentNameIndex.pop()},t.prototype.recordSourceMappingStart=function(t){if(this.sourceMapper&&e.isValidAstNode(t)){var n={line:-1,character:-1},r=new e.SourceMapping;r.start.emittedColumn=this.emitState.column,r.start.emittedLine=this.emitState.line;var i=this.document.lineMap();i.fillLineAndCharacterFromPosition(t.start(),n),r.start.sourceColumn=n.character,r.start.sourceLine=n.line+1,i.fillLineAndCharacterFromPosition(t.end(),n),r.end.sourceColumn=n.character,r.end.sourceLine=n.line+1,e.Debug.assert(!isNaN(r.start.emittedColumn)),e.Debug.assert(!isNaN(r.start.emittedLine)),e.Debug.assert(!isNaN(r.start.sourceColumn)),e.Debug.assert(!isNaN(r.start.sourceLine)),e.Debug.assert(!isNaN(r.end.sourceColumn)),e.Debug.assert(!isNaN(r.end.sourceLine)),this.sourceMapper.currentNameIndex.length>0&&(r.nameIndex=this.sourceMapper.currentNameIndex[this.sourceMapper.currentNameIndex.length-1]);var o=this.sourceMapper.currentMappings[this.sourceMapper.currentMappings.length-1];o.push(r),this.sourceMapper.currentMappings.push(r.childMappings),this.sourceMapper.increaseMappingLevel(t)}},t.prototype.recordSourceMappingEnd=function(t){if(this.sourceMapper&&e.isValidAstNode(t)){this.sourceMapper.currentMappings.pop();var n=this.sourceMapper.currentMappings[this.sourceMapper.currentMappings.length-1],r=n[n.length-1];r.end.emittedColumn=this.emitState.column,r.end.emittedLine=this.emitState.line,e.Debug.assert(!isNaN(r.end.emittedColumn)),e.Debug.assert(!isNaN(r.end.emittedLine)),this.sourceMapper.decreaseMappingLevel(t) }},t.prototype.getOutputFiles=function(){var e=[];return null!==this.sourceMapper&&(this.sourceMapper.emitSourceMapping(),e.push(this.sourceMapper.getOutputFile())),e.push(this.outfile.getOutputFile()),e},t.prototype.emitParameterPropertyAndMemberVariableAssignments=function(){var t=n(this.thisClassNode);if(t&&t.parameterList)for(var r=0,i=t.parameterList.parameters.nonSeparatorCount();i>r;r++){var o=t.parameterList.parameters.nonSeparatorAt(r),a=this.semanticInfoChain.getDeclForAST(o);e.hasFlag(a.flags,8388608)&&(this.emitIndent(),this.recordSourceMappingStart(o),this.writeToOutputWithSourceMapRecord("this."+o.identifier.text(),o.identifier),this.writeToOutput(" = "),this.writeToOutputWithSourceMapRecord(o.identifier.text(),o.identifier),this.writeLineToOutput(";"),this.recordSourceMappingEnd(o))}for(var r=0,i=this.thisClassNode.classElements.childCount();i>r;r++)if(136===this.thisClassNode.classElements.childAt(r).kind()){var s=this.thisClassNode.classElements.childAt(r);!e.hasModifier(s.modifiers,16)&&s.variableDeclarator.equalsValueClause&&(this.emitIndent(),this.emitMemberVariableDeclaration(s),this.writeLineToOutput(""))}},t.prototype.isOnSameLine=function(e,t){var n=this.document.lineMap();return n.getLineNumberFromPosition(e)===n.getLineNumberFromPosition(t)},t.prototype.emitCommaSeparatedList=function(e,t,n,r){if(null!==t&&0!==t.nonSeparatorCount()){var i=r&&!this.isOnSameLine(e.end(),t.nonSeparatorAt(0).end());r&&this.indenter.increaseIndent(),i?this.writeLineToOutput(""):this.writeToOutput(n);for(var o=0,a=t.nonSeparatorCount();a>o;o++){var s=t.nonSeparatorAt(o);this.emitJavascript(s,i),a-1>o&&(i=r&&!this.isOnSameLine(s.end(),t.nonSeparatorAt(o+1).start()),i?this.writeLineToOutput(","):this.writeToOutput(", "))}r&&this.indenter.decreaseIndent(),r&&!this.isOnSameLine(e.end(),t.nonSeparatorAt(t.nonSeparatorCount()-1).end())?(this.writeLineToOutput(""),this.emitIndent()):this.writeToOutput(n)}},t.prototype.emitList=function(e,t,n,r){if("undefined"==typeof t&&(t=!0),"undefined"==typeof n&&(n=0),"undefined"==typeof r&&(r=e.childCount()),null!==e){this.emitComments(e,!0);for(var i=null,o=n;r>o;o++){var a=e.childAt(o);this.shouldEmit(a)&&(this.emitSpaceBetweenConstructs(i,a),this.emitJavascript(a,!0),t&&this.writeLineToOutput(""),i=a)}this.emitComments(e,!1)}},t.prototype.emitSeparatedList=function(e,t,n,r){if("undefined"==typeof t&&(t=!0),"undefined"==typeof n&&(n=0),"undefined"==typeof r&&(r=e.nonSeparatorCount()),null!==e){this.emitComments(e,!0);for(var i=null,o=n;r>o;o++){var a=e.nonSeparatorAt(o);this.shouldEmit(a)&&(this.emitSpaceBetweenConstructs(i,a),this.emitJavascript(a,!0),t&&this.writeLineToOutput(""),i=a)}this.emitComments(e,!1)}},t.prototype.isDirectivePrologueElement=function(e){if(149===e.kind()){var t=e;return 14===t.expression.kind()}return!1},t.prototype.emitSpaceBetweenConstructs=function(e,t){if(null!==e&&null!==t&&-1!==e.start()&&-1!==e.end()&&-1!==t.start()&&-1!==t.end()){var n=this.document.lineMap(),r=n.getLineNumberFromPosition(e.end()),i=n.getLineNumberFromPosition(t.start());i-r>1&&this.writeLineToOutput("",!0)}},t.prototype.getCopyrightComments=function(){var t=this.copyrightElement.preComments();if(t){for(var n=this.document.lineMap(),r=[],i=null,o=0,a=t.length;a>o;o++){var s=t[o];if(i){var l=n.getLineNumberFromPosition(i.end()),c=n.getLineNumberFromPosition(s.start());if(c>=l+2)return r}r.push(s),i=s}var l=n.getLineNumberFromPosition(e.ArrayUtilities.last(r).end()),u=n.getLineNumberFromPosition(this.copyrightElement.start());if(u>=l+2)return r}return[]},t.prototype.emitPossibleCopyrightHeaders=function(e){var t=e.moduleElements;if(t.childCount()>0){var n=t.childAt(0);this.copyrightElement=n,this.emitCommentsArray(this.getCopyrightComments(),!1)}},t.prototype.emitScriptElements=function(t){var n=t.moduleElements;this.emitPossibleCopyrightHeaders(t);for(var r=0,i=n.childCount();i>r;r++){var o=n.childAt(r);if(!this.isDirectivePrologueElement(o))break;this.emitJavascript(o,!0),this.writeLineToOutput("")}this.emitPrologue(t);var a=this.document.isExternalModule(),s=a&&!e.scriptIsElided(t);if(s&&(this.recordSourceMappingStart(t),2===this.emitOptions.compilationSettings().moduleGenTarget())){var l='["require", "exports"',c="require, exports",u=this.getModuleImportAndDependencyList(t);c+=u.importList,l+=u.dependencyList+"]",this.writeLineToOutput("define("+l+", function("+c+") {")}if(a){var p=this.setContainer(2),h=this.moduleName;this.moduleName=t.fileName(),e.isTSFile(this.moduleName)&&(this.moduleName=this.moduleName.substring(0,this.moduleName.length-".ts".length)),this.setExportAssignmentIdentifier(null),2===this.emitOptions.compilationSettings().moduleGenTarget()&&this.indenter.increaseIndent();var d=this.semanticInfoChain.getDeclForAST(this.document.sourceUnit());e.hasFlag(d.flags,262144)&&this.writeCaptureThisStatement(t),this.pushDecl(d)}if(this.emitList(n,!0,r,i),a){if(2===this.emitOptions.compilationSettings().moduleGenTarget()&&this.indenter.decreaseIndent(),s){var m=this.getExportAssignmentIdentifier(),y=d.getSymbol().getExportAssignedValueSymbol();2===this.emitOptions.compilationSettings().moduleGenTarget()?(!m||!y||58720272&y.kind||(this.indenter.increaseIndent(),this.emitIndent(),this.writeLineToOutput("return "+m+";"),this.indenter.decreaseIndent()),this.writeToOutput("});")):!m||!y||58720272&y.kind||(this.emitIndent(),this.writeToOutput("module.exports = "+m+";")),this.recordSourceMappingEnd(t),this.writeLineToOutput("")}this.setContainer(p),this.moduleName=h,this.popDecl(d)}},t.prototype.emitConstructorStatements=function(t){var n=t.block.statements;if(null!==n){this.emitComments(n,!0);for(var r=null!==e.getExtendsHeritageClause(this.thisClassNode.heritageClauses),i=r?1:0,o=null,a=0,s=n.childCount();s>a;a++){a===i&&this.emitParameterPropertyAndMemberVariableAssignments();var l=n.childAt(a);this.shouldEmit(l)&&(this.emitSpaceBetweenConstructs(o,l),this.emitJavascript(l,!0),this.writeLineToOutput(""),o=l)}a===i&&this.emitParameterPropertyAndMemberVariableAssignments(),this.emitComments(n,!1)}},t.prototype.emitJavascript=function(e,t){null!==e&&(t&&this.indenter.indentAmt>0&&this.emitIndent(),this.emit(e))},t.prototype.emitAccessorMemberDeclaration=function(t,n,r,i){if(139!==t.kind()){var o=e.PullHelpers.getAccessorSymbol(t,this.semanticInfoChain);if(o.getGetter())return}this.emitIndent(),this.recordSourceMappingStart(t),this.writeToOutput("Object.defineProperty("+r),this.writeToOutput(i?".prototype, ":", ");var a=n.text();this.writeToOutput(e.isQuoted(a)?a:'"'+a+'"'),this.writeLineToOutput(", {"),this.indenter.increaseIndent();var s=e.PullHelpers.getGetterAndSetterFunction(t,this.semanticInfoChain);s.getter&&(this.emitIndent(),this.recordSourceMappingStart(s.getter),this.emitComments(s.getter,!0),this.writeToOutput("get: "),this.emitAccessorBody(s.getter,s.getter.parameterList,s.getter.block),this.writeLineToOutput(",")),s.setter&&(this.emitIndent(),this.recordSourceMappingStart(s.setter),this.emitComments(s.setter,!0),this.writeToOutput("set: "),this.emitAccessorBody(s.setter,s.setter.parameterList,s.setter.block),this.writeLineToOutput(",")),this.emitIndent(),this.writeLineToOutput("enumerable: true,"),this.emitIndent(),this.writeLineToOutput("configurable: true"),this.indenter.decreaseIndent(),this.emitIndent(),this.writeLineToOutput("});"),this.recordSourceMappingEnd(t)},t.prototype.emitAccessorBody=function(t,n,r){var i=this.semanticInfoChain.getDeclForAST(t);this.pushDecl(i),this.recordSourceMappingStart(t),this.writeToOutput("function "),this.writeToOutput("(");var o=e.Parameters.fromParameterList(n);this.emitFunctionParameters(o),this.writeToOutput(")"),this.emitFunctionBodyStatements(null,t,o,r,null),this.recordSourceMappingEnd(t),this.recordSourceMappingEnd(t),this.popDecl(i)},t.prototype.emitClass=function(t){var r=this.semanticInfoChain.getDeclForAST(t);this.pushDecl(r);var i=this.thisClassNode;this.thisClassNode=t;var o=t.identifier.text();this.emitComments(t,!0);var a=this.setContainer(3);this.recordSourceMappingStart(t),this.writeToOutput("var "+o);var s=null!==e.getExtendsHeritageClause(t.heritageClauses),l=null;this.writeLineToOutput(s?" = (function (_super) {":" = (function () {"),this.recordSourceMappingNameStart(o),this.indenter.increaseIndent(),s&&(l=e.getExtendsHeritageClause(t.heritageClauses).typeNames.nonSeparatorAt(0),this.emitIndent(),this.writeLineToOutput("__extends("+o+", _super);")),this.emitIndent();var c=n(t);if(c?(this.emit(c),this.writeLineToOutput("")):(this.recordSourceMappingStart(t),this.indenter.increaseIndent(),this.writeLineToOutput("function "+t.identifier.text()+"() {"),this.recordSourceMappingNameStart("constructor"),s&&(this.emitIndent(),this.writeLineToOutput("_super.apply(this, arguments);")),this.shouldCaptureThis(t)&&this.writeCaptureThisStatement(t),this.emitParameterPropertyAndMemberVariableAssignments(),this.indenter.decreaseIndent(),this.emitIndent(),this.writeLineToOutput("}"),this.recordSourceMappingNameEnd(),this.recordSourceMappingEnd(t)),this.emitClassMembers(t),this.emitIndent(),this.writeToOutputWithSourceMapRecord("return "+o+";",t.closeBraceToken),this.writeLineToOutput(""),this.indenter.decreaseIndent(),this.emitIndent(),this.writeToOutputWithSourceMapRecord("}",t.closeBraceToken),this.recordSourceMappingNameEnd(),this.recordSourceMappingStart(t),this.writeToOutput(")("),s&&this.emitJavascript(l,!1),this.writeToOutput(");"),this.recordSourceMappingEnd(t),(1===a||2===a)&&e.hasFlag(r.flags,1)){this.writeLineToOutput(""),this.emitIndent();var u=1===a?this.moduleName:"exports";this.writeToOutputWithSourceMapRecord(u+"."+o+" = "+o+";",t)}this.recordSourceMappingEnd(t),this.emitComments(t,!1),this.setContainer(a),this.thisClassNode=i,this.popDecl(r)},t.prototype.emitClassMembers=function(t){for(var n=null,r=0,i=t.classElements.childCount();i>r;r++){var o=t.classElements.childAt(r);if(139===o.kind()){this.emitSpaceBetweenConstructs(n,o);var a=o;this.emitAccessorMemberDeclaration(a,a.propertyName,t.identifier.text(),!e.hasModifier(a.modifiers,16)),n=o}else if(140===o.kind()){this.emitSpaceBetweenConstructs(n,o);var s=o;this.emitAccessorMemberDeclaration(s,s.propertyName,t.identifier.text(),!e.hasModifier(s.modifiers,16)),n=o}else if(135===o.kind()){var l=o;l.block&&(this.emitSpaceBetweenConstructs(n,o),this.emitClassMemberFunctionDeclaration(t,l),n=o)}}for(var r=0,i=t.classElements.childCount();i>r;r++){var o=t.classElements.childAt(r);if(136===o.kind()){var c=o;if(e.hasModifier(c.modifiers,16)&&c.variableDeclarator.equalsValueClause){this.emitSpaceBetweenConstructs(n,c),this.emitIndent(),this.recordSourceMappingStart(c);var u=c.variableDeclarator.propertyName.text();this.writeToOutput(e.isQuoted(u)||11!==c.variableDeclarator.propertyName.kind()?t.identifier.text()+"["+u+"]":t.identifier.text()+"."+u),this.emit(c.variableDeclarator.equalsValueClause),this.recordSourceMappingEnd(c),this.writeLineToOutput(";"),n=c}}}},t.prototype.emitClassMemberFunctionDeclaration=function(t,n){this.emitIndent(),this.recordSourceMappingStart(n),this.emitComments(n,!0);var r=n.propertyName.text();this.writeToOutput(t.identifier.text()),e.hasModifier(n.modifiers,16)||this.writeToOutput(".prototype"),this.writeToOutput(e.isQuoted(r)||11!==n.propertyName.kind()?"["+r+"] = ":"."+r+" = ");var i=this.semanticInfoChain.getDeclForAST(n);this.pushDecl(i),this.recordSourceMappingStart(n),this.writeToOutput("function "),this.emitParameterList(n.callSignature.parameterList);var o=e.Parameters.fromParameterList(n.callSignature.parameterList);this.emitFunctionBodyStatements(n.propertyName.text(),n,o,n.block,null),this.recordSourceMappingEnd(n),this.emitComments(n,!1),this.recordSourceMappingEnd(n),this.popDecl(i),this.writeLineToOutput(";")},t.prototype.requiresExtendsBlock=function(t){for(var n=0,r=t.childCount();r>n;n++){var i=t.childAt(n);if(130===i.kind()){var o=i;if(!e.hasModifier(o.modifiers,8)&&this.requiresExtendsBlock(o.moduleElements))return!0}else if(131===i.kind()){var a=i;if(!e.hasModifier(a.modifiers,8)&&null!==e.getExtendsHeritageClause(a.heritageClauses))return!0}}return!1},t.prototype.emitPrologue=function(e){this.extendsPrologueEmitted||this.requiresExtendsBlock(e.moduleElements)&&(this.extendsPrologueEmitted=!0,this.writeLineToOutput("var __extends = this.__extends || function (d, b) {"),this.writeLineToOutput(" for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];"),this.writeLineToOutput(" function __() { this.constructor = d; }"),this.writeLineToOutput(" __.prototype = b.prototype;"),this.writeLineToOutput(" d.prototype = new __();"),this.writeLineToOutput("};")),this.globalThisCapturePrologueEmitted||this.shouldCaptureThis(e)&&(this.globalThisCapturePrologueEmitted=!0,this.writeLineToOutput(this.captureThisStmtString))},t.prototype.emitThis=function(){this.writeToOutput(!this.inWithBlock&&this.inArrowFunction?"_this":"this")},t.prototype.emitBlockOrStatement=function(e){146===e.kind()?this.emit(e):(this.writeLineToOutput(""),this.indenter.increaseIndent(),this.emitJavascript(e,!0),this.indenter.decreaseIndent())},t.prototype.emitLiteralExpression=function(t){switch(t.kind()){case 32:this.writeToOutputWithSourceMapRecord("null",t);break;case 24:this.writeToOutputWithSourceMapRecord("false",t);break;case 37:this.writeToOutputWithSourceMapRecord("true",t);break;default:throw e.Errors.abstract()}},t.prototype.emitThisExpression=function(e){!this.inWithBlock&&this.inArrowFunction?this.writeToOutputWithSourceMapRecord("_this",e):this.writeToOutputWithSourceMapRecord("this",e)},t.prototype.emitSuperExpression=function(e){this.writeToOutputWithSourceMapRecord("_super.prototype",e)},t.prototype.emitParenthesizedExpression=function(e){220===e.expression.kind()&&null===e.openParenTrailingComments?this.emit(e.expression):(this.recordSourceMappingStart(e),this.writeToOutput("("),this.emitCommentsArray(e.openParenTrailingComments,!1),this.emit(e.expression),this.writeToOutput(")"),this.recordSourceMappingEnd(e))},t.prototype.emitCastExpression=function(e){this.emit(e.expression)},t.prototype.emitPrefixUnaryExpression=function(t){var n=t.kind();switch(this.recordSourceMappingStart(t),n){case 167:this.writeToOutput("!"),this.emit(t.operand);break;case 166:this.writeToOutput("~"),this.emit(t.operand);break;case 165:this.writeToOutput("-"),(165===t.operand.kind()||169===t.operand.kind())&&this.writeToOutput(" "),this.emit(t.operand);break;case 164:this.writeToOutput("+"),(164===t.operand.kind()||168===t.operand.kind())&&this.writeToOutput(" "),this.emit(t.operand);break;case 168:this.writeToOutput("++"),this.emit(t.operand);break;case 169:this.writeToOutput("--"),this.emit(t.operand);break;default:throw e.Errors.abstract()}this.recordSourceMappingEnd(t)},t.prototype.emitPostfixUnaryExpression=function(t){var n=t.kind();switch(this.recordSourceMappingStart(t),n){case 210:this.emit(t.operand),this.writeToOutput("++");break;case 211:this.emit(t.operand),this.writeToOutput("--");break;default:throw e.Errors.abstract()}this.recordSourceMappingEnd(t)},t.prototype.emitTypeOfExpression=function(e){this.recordSourceMappingStart(e),this.writeToOutput("typeof "),this.emit(e.expression),this.recordSourceMappingEnd(e)},t.prototype.emitDeleteExpression=function(e){this.recordSourceMappingStart(e),this.writeToOutput("delete "),this.emit(e.expression),this.recordSourceMappingEnd(e)},t.prototype.emitVoidExpression=function(e){this.recordSourceMappingStart(e),this.writeToOutput("void "),this.emit(e.expression),this.recordSourceMappingEnd(e)},t.prototype.canEmitDottedNameMemberAccessExpression=function(t){var n=t.expression.kind();if(11==n||212==n){var r=this.getSymbolForEmit(t).symbol,i=this.getSymbolForEmit(t.expression).symbol;if(r&&i&&!this.semanticInfoChain.getAliasSymbolForAST(t.expression)&&(e.PullHelpers.symbolIsModule(i)||64===i.kind||i.anyDeclHasFlag(36864))){var o=r.kind;if(4096===o||67108864===o||r.anyDeclHasFlag(1)&&512===o&&!r.anyDeclHasFlag(36864)||r.anyDeclHasFlag(1)&&!this.symbolIsUsedInItsEnclosingContainer(r))return 212==n?this.canEmitDottedNameMemberAccessExpression(t.expression):!0}}return!1},t.prototype.emitDottedNameMemberAccessExpressionWorker=function(e,t,n,r){this.recordSourceMappingStart(e),212==e.expression.kind()?this.emitDottedNameMemberAccessExpressionRecurse(e.expression,t,n,r-1):(this.emitComments(e.expression,!0),this.recordSourceMappingStart(e.expression),this.emitDottedNameFromDeclPath(t,n,r-2),this.writeToOutput(e.expression.text()),this.recordSourceMappingEnd(e.expression),this.emitComments(e.expression,!1)),this.writeToOutput("."),this.emitName(e.name,!1),this.recordSourceMappingEnd(e)},t.prototype.emitDottedNameMemberAccessExpressionRecurse=function(t,n,r,i){this.emitComments(t,!0),1>i-r&&(r=i-1,e.Debug.assert(r>=0)),this.emitDottedNameMemberAccessExpressionWorker(t,n,r,i),this.emitComments(t,!1)},t.prototype.emitDottedNameMemberAccessExpression=function(e){var t=this.getSymbolForEmit(e).symbol,n=this.getPotentialDeclPathInfoForEmit(t);this.emitDottedNameMemberAccessExpressionWorker(e,n.potentialPath,n.startingIndex,n.potentialPath.length)},t.prototype.emitMemberAccessExpression=function(e){this.tryEmitConstant(e)||(this.canEmitDottedNameMemberAccessExpression(e)?this.emitDottedNameMemberAccessExpression(e):(this.recordSourceMappingStart(e),this.emit(e.expression),this.writeToOutput("."),this.emitName(e.name,!1),this.recordSourceMappingEnd(e)))},t.prototype.emitQualifiedName=function(e){this.recordSourceMappingStart(e),this.emit(e.left),this.writeToOutput("."),this.emitName(e.right,!1),this.recordSourceMappingEnd(e)},t.prototype.emitBinaryExpression=function(t){switch(this.recordSourceMappingStart(t),t.kind()){case 173:this.emit(t.left),this.writeToOutput(", "),this.emit(t.right);break;default:this.emit(t.left);var n=e.SyntaxFacts.getText(e.SyntaxFacts.getOperatorTokenFromBinaryExpression(t.kind()));this.writeToOutput("instanceof"===n?" instanceof ":"in"===n?" in ":" "+n+" "),this.emit(t.right)}this.recordSourceMappingEnd(t)},t.prototype.emitSimplePropertyAssignment=function(e){this.recordSourceMappingStart(e),this.emit(e.propertyName),this.writeToOutput(": "),this.emit(e.expression),this.recordSourceMappingEnd(e)},t.prototype.emitFunctionPropertyAssignment=function(t){this.recordSourceMappingStart(t),this.emit(t.propertyName),this.writeToOutput(": ");var n=(this.semanticInfoChain.getDeclForAST(t),this.inArrowFunction);this.inArrowFunction=!1;var r=this.setContainer(5),i=(t.propertyName,this.semanticInfoChain.getDeclForAST(t));this.pushDecl(i),this.recordSourceMappingStart(t),this.writeToOutput("function "),this.writeToOutput("(");var o=e.Parameters.fromParameterList(t.callSignature.parameterList);this.emitFunctionParameters(o),this.writeToOutput(")"),this.emitFunctionBodyStatements(t.propertyName.text(),t,o,t.block,null),this.recordSourceMappingEnd(t),this.recordSourceMappingEnd(t),this.emitComments(t,!1),this.popDecl(i),this.setContainer(r),this.inArrowFunction=n,this.recordSourceMappingEnd(t)},t.prototype.emitConditionalExpression=function(e){this.emit(e.condition),this.writeToOutput(" ? "),this.emit(e.whenTrue),this.writeToOutput(" : "),this.emit(e.whenFalse)},t.prototype.emitThrowStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("throw "),this.emit(e.expression),this.recordSourceMappingEnd(e),this.writeToOutput(";")},t.prototype.emitExpressionStatement=function(e){var t=219===e.expression.kind()||218===e.expression.kind();this.recordSourceMappingStart(e),t&&this.writeToOutput("("),this.emit(e.expression),t&&this.writeToOutput(")"),this.recordSourceMappingEnd(e),this.writeToOutput(";")},t.prototype.emitLabeledStatement=function(e){this.writeToOutputWithSourceMapRecord(e.identifier.text(),e.identifier),this.writeLineToOutput(":"),this.emitJavascript(e.statement,!0)},t.prototype.emitBlock=function(e){this.recordSourceMappingStart(e),this.writeLineToOutput(" {"),this.indenter.increaseIndent(),e.statements&&this.emitList(e.statements),this.emitCommentsArray(e.closeBraceLeadingComments,!1),this.indenter.decreaseIndent(),this.emitIndent(),this.writeToOutput("}"),this.recordSourceMappingEnd(e)},t.prototype.emitBreakStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("break"),e.identifier&&this.writeToOutput(" "+e.identifier.text()),this.recordSourceMappingEnd(e),this.writeToOutput(";")},t.prototype.emitContinueStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("continue"),e.identifier&&this.writeToOutput(" "+e.identifier.text()),this.recordSourceMappingEnd(e),this.writeToOutput(";")},t.prototype.emitWhileStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("while ("),this.emit(e.condition),this.writeToOutput(")"),this.emitBlockOrStatement(e.statement),this.recordSourceMappingEnd(e)},t.prototype.emitDoStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("do"),this.emitBlockOrStatement(e.statement),this.writeToOutputWithSourceMapRecord(" while",e.whileKeyword),this.writeToOutput("("),this.emit(e.condition),this.writeToOutput(")"),this.recordSourceMappingEnd(e),this.writeToOutput(";")},t.prototype.emitIfStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("if ("),this.emit(e.condition),this.writeToOutput(")"),this.emitBlockOrStatement(e.statement),e.elseClause&&(146!==e.statement.kind()?(this.writeLineToOutput(""),this.emitIndent()):this.writeToOutput(" "),this.emit(e.elseClause)),this.recordSourceMappingEnd(e)},t.prototype.emitElseClause=function(e){147===e.statement.kind()?(this.writeToOutput("else "),this.emit(e.statement)):(this.writeToOutput("else"),this.emitBlockOrStatement(e.statement))},t.prototype.emitReturnStatement=function(e){this.recordSourceMappingStart(e),e.expression?(this.writeToOutput("return "),this.emit(e.expression)):this.writeToOutput("return"),this.recordSourceMappingEnd(e),this.writeToOutput(";")},t.prototype.emitForInStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("for ("),this.emit(e.left?e.left:e.variableDeclaration),this.writeToOutput(" in "),this.emit(e.expression),this.writeToOutput(")"),this.emitBlockOrStatement(e.statement),this.recordSourceMappingEnd(e)},t.prototype.emitForStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("for ("),e.variableDeclaration?this.emit(e.variableDeclaration):e.initializer&&this.emit(e.initializer),this.writeToOutput("; "),this.emitJavascript(e.condition,!1),this.writeToOutput(";"),e.incrementor&&(this.writeToOutput(" "),this.emitJavascript(e.incrementor,!1)),this.writeToOutput(")"),this.emitBlockOrStatement(e.statement),this.recordSourceMappingEnd(e)},t.prototype.emitWithStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("with ("),e.condition&&this.emit(e.condition),this.writeToOutput(")");var t=this.inWithBlock;this.inWithBlock=!0,this.emitBlockOrStatement(e.statement),this.inWithBlock=t,this.recordSourceMappingEnd(e)},t.prototype.emitSwitchStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("switch ("),this.emit(e.expression),this.recordSourceMappingStart(e.closeParenToken),this.writeToOutput(")"),this.recordSourceMappingEnd(e.closeParenToken),this.writeLineToOutput(" {"),this.indenter.increaseIndent(),this.emitList(e.switchClauses,!1),this.indenter.decreaseIndent(),this.emitIndent(),this.writeToOutput("}"),this.recordSourceMappingEnd(e)},t.prototype.emitCaseSwitchClause=function(e){this.recordSourceMappingStart(e),this.writeToOutput("case "),this.emit(e.expression),this.writeToOutput(":"),this.emitSwitchClauseBody(e.statements),this.recordSourceMappingEnd(e)},t.prototype.emitSwitchClauseBody=function(e){1===e.childCount()&&146===e.childAt(0).kind()?(this.emit(e.childAt(0)),this.writeLineToOutput("")):(this.writeLineToOutput(""),this.indenter.increaseIndent(),this.emit(e),this.indenter.decreaseIndent())},t.prototype.emitDefaultSwitchClause=function(e){this.recordSourceMappingStart(e),this.writeToOutput("default:"),this.emitSwitchClauseBody(e.statements),this.recordSourceMappingEnd(e)},t.prototype.emitTryStatement=function(e){this.recordSourceMappingStart(e),this.writeToOutput("try "),this.emit(e.block),this.emitJavascript(e.catchClause,!1),e.finallyClause&&this.emit(e.finallyClause),this.recordSourceMappingEnd(e)},t.prototype.emitCatchClause=function(e){this.writeToOutput(" "),this.recordSourceMappingStart(e),this.writeToOutput("catch ("),this.emit(e.identifier),this.writeToOutput(")"),this.emit(e.block),this.recordSourceMappingEnd(e)},t.prototype.emitFinallyClause=function(e){this.writeToOutput(" finally"),this.emit(e.block)},t.prototype.emitDebuggerStatement=function(e){this.writeToOutputWithSourceMapRecord("debugger",e),this.writeToOutput(";")},t.prototype.emitNumericLiteral=function(e){this.writeToOutputWithSourceMapRecord(e.text(),e)},t.prototype.emitRegularExpressionLiteral=function(e){this.writeToOutputWithSourceMapRecord(e.text(),e)},t.prototype.emitStringLiteral=function(e){this.writeToOutputWithSourceMapRecord(e.text(),e)},t.prototype.emitEqualsValueClause=function(e){this.writeToOutput(" = "),this.emit(e.value)},t.prototype.emitParameter=function(e){this.writeToOutputWithSourceMapRecord(e.identifier.text(),e)},t.prototype.emitConstructorDeclaration=function(e){e.block?this.emitConstructor(e):this.emitComments(e,!0,!0)},t.prototype.shouldEmitFunctionDeclaration=function(t){return null!==t.preComments()||!e.hasModifier(t.modifiers,8)&&null!==t.block},t.prototype.emitFunctionDeclaration=function(t){e.hasModifier(t.modifiers,8)||null===t.block?this.emitComments(t,!0,!0):this.emitFunction(t)},t.prototype.emitSourceUnit=function(e){if(!this.document.isDeclareFile()){var t=this.semanticInfoChain.getDeclForAST(e);this.pushDecl(t),this.emitScriptElements(e),this.popDecl(t)}},t.prototype.shouldEmitEnumDeclaration=function(t){return null!==t.preComments()||!e.enumIsElided(t)},t.prototype.emitEnumDeclaration=function(t){e.enumIsElided(t)?this.emitComments(t,!0,!0):(this.emitComments(t,!0),this.emitEnum(t),this.emitComments(t,!1))},t.prototype.shouldEmitModuleDeclaration=function(t){return null!==t.preComments()||!e.moduleIsElided(t)},t.prototype.emitModuleDeclaration=function(t){e.moduleIsElided(t)?this.emitComments(t,!0,!0):this.emitModuleDeclarationWorker(t)},t.prototype.shouldEmitClassDeclaration=function(t){return null!==t.preComments()||!e.hasModifier(t.modifiers,8)},t.prototype.emitClassDeclaration=function(t){e.hasModifier(t.modifiers,8)?this.emitComments(t,!0,!0):this.emitClass(t)},t.prototype.shouldEmitInterfaceDeclaration=function(e){return null!==e.preComments()},t.prototype.emitInterfaceDeclaration=function(e){this.emitComments(e,!0,!0)},t.prototype.firstVariableDeclarator=function(e){return e.declaration.declarators.nonSeparatorAt(0)},t.prototype.isNotAmbientOrHasInitializer=function(t){return!e.hasModifier(t.modifiers,8)||null!==this.firstVariableDeclarator(t).equalsValueClause},t.prototype.shouldEmitVariableStatement=function(e){return null!==e.preComments()||this.isNotAmbientOrHasInitializer(e)},t.prototype.emitVariableStatement=function(e){this.isNotAmbientOrHasInitializer(e)?(this.emitComments(e,!0),this.emit(e.declaration),this.writeToOutput(";"),this.emitComments(e,!1)):this.emitComments(e,!0,!0)},t.prototype.emitGenericType=function(e){this.emit(e.name)},t.prototype.shouldEmit=function(e){if(!e)return!1;switch(e.kind()){case 133:return this.shouldEmitImportDeclaration(e);case 131:return this.shouldEmitClassDeclaration(e);case 128:return this.shouldEmitInterfaceDeclaration(e);case 129:return this.shouldEmitFunctionDeclaration(e);case 130:return this.shouldEmitModuleDeclaration(e);case 148:return this.shouldEmitVariableStatement(e);case 223:return!1;case 132:return this.shouldEmitEnumDeclaration(e)}return!0},t.prototype.emit=function(e){if(e){switch(e.kind()){case 2:return this.emitSeparatedList(e);case 1:return this.emitList(e);case 120:return this.emitSourceUnit(e);case 133:return this.emitImportDeclaration(e);case 134:return this.setExportAssignmentIdentifier(e.identifier.text());case 131:return this.emitClassDeclaration(e);case 128:return this.emitInterfaceDeclaration(e);case 11:return this.emitName(e,!0);case 225:return this.emitVariableDeclarator(e);case 219:return this.emitSimpleArrowFunctionExpression(e);case 218:return this.emitParenthesizedArrowFunctionExpression(e);case 129:return this.emitFunctionDeclaration(e);case 130:return this.emitModuleDeclaration(e);case 224:return this.emitVariableDeclaration(e);case 126:return this.emitGenericType(e);case 137:return this.emitConstructorDeclaration(e);case 132:return this.emitEnumDeclaration(e);case 243:return this.emitEnumElement(e);case 222:return this.emitFunctionExpression(e);case 148:return this.emitVariableStatement(e)}this.emitComments(e,!0),this.emitWorker(e),this.emitComments(e,!1)}},t.prototype.emitWorker=function(e){if(e)switch(e.kind()){case 13:return this.emitNumericLiteral(e);case 12:return this.emitRegularExpressionLiteral(e);case 14:return this.emitStringLiteral(e);case 24:case 32:case 37:return this.emitLiteralExpression(e);case 35:return this.emitThisExpression(e);case 50:return this.emitSuperExpression(e);case 217:return this.emitParenthesizedExpression(e);case 214:return this.emitArrayLiteralExpression(e);case 211:case 210:return this.emitPostfixUnaryExpression(e);case 167:case 166:case 165:case 164:case 168:case 169:return this.emitPrefixUnaryExpression(e);case 213:return this.emitInvocationExpression(e);case 221:return this.emitElementAccessExpression(e);case 212:return this.emitMemberAccessExpression(e);case 121:return this.emitQualifiedName(e);case 173:case 174:case 175:case 176:case 177:case 178:case 179:case 180:case 181:case 182:case 183:case 184:case 185:case 187:case 188:case 189:case 190:case 191:case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 208:case 209:return this.emitBinaryExpression(e);case 186:return this.emitConditionalExpression(e);case 232:return this.emitEqualsValueClause(e);case 242:return this.emitParameter(e);case 146:return this.emitBlock(e);case 235:return this.emitElseClause(e);case 147:return this.emitIfStatement(e);case 149:return this.emitExpressionStatement(e);case 139:return this.emitGetAccessor(e);case 140:return this.emitSetAccessor(e);case 157:return this.emitThrowStatement(e);case 150:return this.emitReturnStatement(e);case 216:return this.emitObjectCreationExpression(e);case 151:return this.emitSwitchStatement(e);case 233:return this.emitCaseSwitchClause(e);case 234:return this.emitDefaultSwitchClause(e);case 152:return this.emitBreakStatement(e);case 153:return this.emitContinueStatement(e);case 154:return this.emitForStatement(e);case 155:return this.emitForInStatement(e);case 158:return this.emitWhileStatement(e);case 163:return this.emitWithStatement(e);case 220:return this.emitCastExpression(e);case 215:return this.emitObjectLiteralExpression(e);case 240:return this.emitSimplePropertyAssignment(e);case 241:return this.emitFunctionPropertyAssignment(e);case 156:return this.writeToOutputWithSourceMapRecord(";",e);case 159:return this.emitTryStatement(e);case 236:return this.emitCatchClause(e);case 237:return this.emitFinallyClause(e);case 160:return this.emitLabeledStatement(e);case 161:return this.emitDoStatement(e);case 171:return this.emitTypeOfExpression(e);case 170:return this.emitDeleteExpression(e);case 172:return this.emitVoidExpression(e);case 162:return this.emitDebuggerStatement(e)}},t}();e.Emitter=s,e.getLastConstructor=n,e.getTrimmedTextLines=r}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){this.prefix="",this.suffix=""}return e.prototype.isString=function(){return!1},e.prototype.isArray=function(){return!1},e.prototype.isMarker=function(){return!this.isString()&&!this.isArray()},e.prototype.toString=function(){return e.memberNameToString(this)},e.memberNameToString=function(t,n,r){"undefined"==typeof r&&(r=0);var i=t.prefix; if(t.isString())i+=t.text;else if(t.isArray())for(var o=t,a=0;a=2&&t===e.charCodeAt(e.length-1)&&(39===t||34===t)?e.substring(1,e.length-1):e}function n(e){return e&&e.length>=2&&e.charCodeAt(0)===e.charCodeAt(e.length-1)&&39===e.charCodeAt(0)}function r(e){return e&&e.length>=2&&e.charCodeAt(0)===e.charCodeAt(e.length-1)&&34===e.charCodeAt(0)}function i(e){return r(e)||n(e)}function o(e){return'"'+e+'"'}function a(e){return e.replace(E,"/")}function s(e){return e.length>5&&".d.ts"===e.substring(e.length-5,e.length)?e.substring(0,e.length-5):e.length>3&&".ts"===e.substring(e.length-3,e.length)?e.substring(0,e.length-3):e.length>3&&".js"===e.substring(e.length-3,e.length)?e.substring(0,e.length-3):e}function l(e){return y(u(e)?e:e)}function c(e,t){var n=e.toLocaleUpperCase(),r=t.toLocaleUpperCase(),i=r.length;return n.length>i&&n.substring(n.length-i,n.length)===r}function u(e){return c(e,".ts")}function p(e){return c(e,".d.ts")}function h(e,n,r){"undefined"==typeof n&&(n=!0),"undefined"==typeof r&&(r=!1);var i=r?a(e):s(t(e)),l=this.getPathComponents(i);return l.length?n?o(l[l.length-1]):l[l.length-1]:e}function d(e){return e.split("/")}function m(e,t,n){"undefined"==typeof n&&(n=!0),t=a(t);for(var r=this.getPathComponents(t),i=this.getPathComponents(e),o=0;o0&&"."===e.charAt(0)}function g(e){return e.length>0&&("\\"===e.charAt(0)||"/"===e.charAt(0)||-1!==e.indexOf(":\\")||-1!==e.indexOf(":/"))}function v(e){if(""===e)return e;var t=-1!==e.indexOf("/");return t?T(e):""}function S(e){e=a(e);var t=d(e);return t.slice(0,t.length-1)}function T(e){var t=S(e);return t.join("/")+"/"}function b(e){return e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e}function _(t){C.test(t)&&(t="file:"+t);for(var n=this.getPathComponents(a(t)),r=[],i=0;i0&&".."!==e.ArrayUtilities.last(r)&&".."===o?r.pop():r.push(o))}return r.join("/")}e.stripStartAndEndQuotes=t,e.isSingleQuoted=n,e.isDoubleQuoted=r,e.isQuoted=i,e.quoteStr=o;var E=/\\/g;e.switchToForwardSlashes=a,e.trimModName=s,e.getDeclareFilePath=l,e.isTSFile=u,e.isDTSFile=p,e.getPrettyName=h,e.getPathComponents=d,e.getRelativePathToFixedPath=m,e.changePathToDTS=y,e.isRelative=f,e.isRooted=g,e.getRootFilePath=v,e.filePathComponents=S,e.filePath=T,e.convertToDirectoryPath=b;var C=/^\\\\[^\\]/;e.normalizePath=_}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(e){var t=/^(\/\/\/\s*/gim;return t.exec(e)}function n(n,r,i,o,a){var s=/^\/\/\/\s*=7&&"true"===u[6];return d&&e.CompilerDiagnostics.debugPrint(p+" is resident"),{line:0,character:0,position:0,length:0,path:e.switchToForwardSlashes(h),isResident:d}}a.push(new e.Diagnostic(n,r,i,o.length,e.DiagnosticCode.Invalid_reference_directive_syntax))}}return null}function r(t,n,r,i){for(var o=0,a={line:-1,character:-1},s=(new Date).getTime();10!==r.tokenKind;){if(49===r.tokenKind){var l=o+r.leadingTriviaWidth();if(r=n.scan(c,!1),e.SyntaxFacts.isIdentifierNameOrAnyKeyword(r)&&(r=n.scan(c,!1),107===r.tokenKind&&(r=n.scan(c,!1),(65===r.tokenKind||66===r.tokenKind)&&(r=n.scan(c,!1),72===r.tokenKind)))){var u=n.absoluteIndex();if(r=n.scan(c,!1),t.fillLineAndCharacterFromPosition(l,a),14===r.tokenKind){var p={line:a.line,character:a.character,position:u+r.leadingTriviaWidth(),length:r.width(),path:e.stripStartAndEndQuotes(e.switchToForwardSlashes(r.text())),isResident:!1};i.push(p)}}}o=n.absoluteIndex(),r=n.scan(c,!1)}var h=(new Date).getTime()-s;e.fileResolutionScanImportsTime+=h}function i(e,r,i){for(var o=i.leadingTrivia(),a=0,s={line:-1,character:-1},l=!1,c=[],u=[],p=0,h=o.count();h>p;p++){var d=o.syntaxTriviaAt(p);if(7===d.kind()){var m=d.fullText(),y=n(e,r,a,m,c);y&&(r.fillLineAndCharacterFromPosition(a,s),y.position=a,y.length=d.fullWidth(),y.line=s.line,y.character=s.character,u.push(y));var f=t(m);f&&(l="true"===f[3])}a+=d.fullWidth()}return{noDefaultLib:l,diagnostics:c,referencedFiles:u}}function o(t,n,o){"undefined"==typeof o&&(o=!0);var a=e.SimpleText.fromScriptSnapshot(n),s=new e.Scanner(t,a,1,l),u=s.scan(c,!1),p=[];o&&r(a.lineMap(),s,u,p);var h=i(t,a.lineMap(),u);return c.length=0,{referencedFiles:h.referencedFiles,importedFiles:p,isLibFile:h.noDefaultLib,diagnostics:h.diagnostics}}function a(t){return new e.ParseOptions(t.codeGenTarget(),t.allowAutomaticSemicolonInsertion())}function s(e,t){return o(e,t,!1).referencedFiles}e.tripleSlashReferenceRegExp=/^(\/\/\/\s*/;var l=e.ArrayUtilities.createArray(2048,0),c=[];e.preProcessFile=o,e.getParseOptions=a,e.getReferencedFiles=s}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function e(){this.resolvedFiles=[],this.diagnostics=[],this.seenNoDefaultLibTag=!1}return e}();e.ReferenceResolutionResult=t;var n=function(){function e(e,t,n,r,i){this.filePath=e,this.lineMap=t,this.position=n,this.length=r,this.isImported=i}return e}(),r=function(){function r(e,t,n){this.useCaseSensitiveFileResolution=n,this.inputFileNames=e,this.host=t,this.visited={}}return r.resolve=function(e,t,n){var i=new r(e,t,n);return i.resolveInputFiles()},r.prototype.resolveInputFiles=function(){var e=this,r=new t;if(!this.inputFileNames||this.inputFileNames.length<=0)return r;var i=new n(null,null,0,0,!1);return this.inputFileNames.forEach(function(t){return e.resolveIncludedFile(t,i,r)}),r},r.prototype.resolveIncludedFile=function(t,n,r){var i=this.getNormalizedFilePath(t,n.filePath);if(this.isSameFile(i,n.filePath))return n.isImported||r.diagnostics.push(new e.Diagnostic(n.filePath,n.lineMap,n.position,n.length,e.DiagnosticCode.A_file_cannot_have_a_reference_to_itself,null)),i;if(!e.isTSFile(i)&&!e.isDTSFile(i)){var o=i+".d.ts",a=i+".ts";i=this.host.fileExists(o)?o:a}return this.host.fileExists(i)?this.resolveFile(i,r):(n.isImported||r.diagnostics.push(new e.Diagnostic(n.filePath,n.lineMap,n.position,n.length,e.DiagnosticCode.Cannot_resolve_referenced_file_0,[t])),i)},r.prototype.resolveImportedFile=function(t,n,r){var i=e.isRelative(t),o=i?!1:e.isRooted(t);if(i||o)return this.resolveIncludedFile(t,n,r);var a=this.host.getParentDirectory(n.filePath),s=null,l=t+".d.ts",c=t+".ts",u=(new Date).getTime();do{var p=this.host.resolveRelativePath(l,a);if(this.host.fileExists(p)){s=p;break}if(p=this.host.resolveRelativePath(c,a),this.host.fileExists(p)){s=p;break}a=this.host.getParentDirectory(a)}while(a);return e.fileResolutionImportFileSearchTime+=(new Date).getTime()-u,s?this.resolveFile(s,r):t},r.prototype.resolveFile=function(t,r){var i=this,o=this.isVisited(t);if(o)t=o;else{this.recordVisitedFile(t);var a=(new Date).getTime(),s=this.host.getScriptSnapshot(t),l=(new Date).getTime()-a;e.fileResolutionIOTime+=l;var c=e.LineMap1.fromScriptSnapshot(s),u=e.preProcessFile(t,s);r.diagnostics.push.apply(r.diagnostics,u.diagnostics),u.isLibFile&&(r.seenNoDefaultLibTag=!0);var p=[];u.referencedFiles.forEach(function(e){var o=new n(t,c,e.position,e.length,!1),a=i.resolveIncludedFile(e.path,o,r);p.push(a)});for(var h=[],d=0;dt;t++)this.emitDeclarationsForAST(e.childAt(t))},n.prototype.emitSeparatedList=function(e){for(var t=0,n=e.nonSeparatorCount();n>t;t++)this.emitDeclarationsForAST(e.nonSeparatorAt(t))},n.prototype.emitDeclarationsForAST=function(e){switch(e.kind()){case 148:return this.emitDeclarationsForVariableStatement(e);case 141:return this.emitPropertySignature(e);case 225:return this.emitVariableDeclarator(e,!0,!0);case 136:return this.emitDeclarationsForMemberVariableDeclaration(e);case 137:return this.emitDeclarationsForConstructorDeclaration(e);case 139:return this.emitDeclarationsForGetAccessor(e);case 140:return this.emitDeclarationsForSetAccessor(e);case 138:return this.emitIndexMemberDeclaration(e);case 144:return this.emitIndexSignature(e);case 142:return this.emitCallSignature(e);case 143:return this.emitConstructSignature(e);case 145:return this.emitMethodSignature(e);case 129:return this.emitDeclarationsForFunctionDeclaration(e);case 135:return this.emitMemberFunctionDeclaration(e);case 131:return this.emitDeclarationsForClassDeclaration(e);case 128:return this.emitDeclarationsForInterfaceDeclaration(e);case 133:return this.emitDeclarationsForImportDeclaration(e);case 130:return this.emitDeclarationsForModuleDeclaration(e);case 132:return this.emitDeclarationsForEnumDeclaration(e);case 134:return this.emitDeclarationsForExportAssignment(e)}},n.prototype.getIndentString=function(e){return"undefined"==typeof e&&(e=!1),this.indenter.getIndent()},n.prototype.emitIndent=function(){this.declFile.Write(this.getIndentString())},n.prototype.canEmitDeclarations=function(t){var n=this.getEnclosingContainer(t);if(130===n.kind()||120===n.kind()){var r=this.semanticInfoChain.getDeclForAST(t);if(!e.hasFlag(r.flags,1)){var i=(new Date).getTime(),o=this.semanticInfoChain.getSymbolForAST(t),a=o&&o.isExternallyVisible();return e.declarationEmitIsExternallyVisibleTime+=(new Date).getTime()-i,a}}return!0},n.prototype.getDeclFlagsString=function(t,n){var r=this.getIndentString(),i=t.flags;if(e.hasFlag(i,16))e.hasFlag(i,2)&&(r+="private "),r+="static ";else if(e.hasFlag(i,2))r+="private ";else if(e.hasFlag(i,4))r+="public ";else{var o=!e.hasFlag(i,1),a=this.semanticInfoChain.getASTForDecl(t),s=this.getEnclosingContainer(a);130===s.kind()&&e.isAnyNameOfModule(s,a)&&(s=this.getEnclosingContainer(s));var l=120===s.kind()&&this.document.isExternalModule();l&&e.hasFlag(i,1)&&(r+="export ",o=!0),(l||120==s.kind())&&o&&"interface"!==n&&"import"!=n&&(r+="declare "),r+=n+" "}return r},n.prototype.emitDeclFlags=function(e,t){this.declFile.Write(this.getDeclFlagsString(this.semanticInfoChain.getDeclForAST(e),t))},n.prototype.emitTypeNamesMember=function(e,t){if("undefined"==typeof t&&(t=!1),"{ "===e.prefix?(t&&this.emitIndent(),this.declFile.WriteLine("{"),this.indenter.increaseIndent(),t=!0):""!==e.prefix&&(t&&this.emitIndent(),this.declFile.Write(e.prefix),t=!1),e.isString())t&&this.emitIndent(),this.declFile.Write(e.text);else if(e.isArray())for(var n=e,r=0;r0){for(var n=0;nn;n++)this.emitVariableDeclarator(e.declarators.nonSeparatorAt(n),0==n,n==t-1)},n.prototype.emitArgDecl=function(e,t,n,r){this.indenter.increaseIndent(),this.emitDeclarationComments(e,!1),this.declFile.Write(t.text()),n&&this.declFile.Write("?"),this.indenter.decreaseIndent(),r||this.emitTypeOfVariableDeclaratorOrParameter(e)},n.prototype.isOverloadedCallSignature=function(t){var n=(new Date).getTime(),r=this.semanticInfoChain.getDeclForAST(t),i=r.getSymbol();e.declarationEmitIsOverloadedCallSignatureTime+=(new Date).getTime()-n;var o=i.type,a=o.getCallSignatures(),s=a&&a.length>1;return s},n.prototype.emitDeclarationsForConstructorDeclaration=function(t){var n=(new Date).getTime(),r=this.semanticInfoChain.getSymbolForAST(t);e.declarationEmitFunctionDeclarationGetSymbolTime+=(new Date).getTime()-n;var i=r.type;if(t.block){var o=i.getConstructSignatures();if(o&&o.length>1)return}{var a=this.semanticInfoChain.getDeclForAST(t);a.getSignatureSymbol()}this.emitDeclarationComments(t),this.emitIndent(),this.declFile.Write("constructor"),this.declFile.Write("("),this.emitParameters(!1,e.Parameters.fromParameterList(t.parameterList)),this.declFile.Write(")"),this.declFile.WriteLine(";")},n.prototype.emitParameterList=function(t,n){this.declFile.Write("("),this.emitParameters(t,e.Parameters.fromParameterList(n)),this.declFile.Write(")")},n.prototype.emitParameters=function(e,t){var n=t.lastParameterIsRest(),r=t.length;n&&r--;for(var i=0;r>i;i++)this.emitArgDecl(t.astAt(i),t.identifierAt(i),t.isOptionalAt(i),e),r-1>i&&this.declFile.Write(", ");if(n){this.declFile.Write(t.length>1?", ...":"...");var o=t.length-1;this.emitArgDecl(t.astAt(o),t.identifierAt(o),t.isOptionalAt(o),e)}},n.prototype.emitMemberFunctionDeclaration=function(t){var n=(new Date).getTime(),r=this.semanticInfoChain.getSymbolForAST(t);e.declarationEmitFunctionDeclarationGetSymbolTime+=(new Date).getTime()-n;var i=r.type;if(t.block){var o=i.getConstructSignatures();if(o&&o.length>1)return;if(this.isOverloadedCallSignature(t))return}else if(e.hasModifier(t.modifiers,2)&&this.isOverloadedCallSignature(t)){var a=i.getCallSignatures();e.Debug.assert(a&&a.length>1);var s=a[0].isDefinition()?a[1]:a[0],l=s.getDeclarations()[0],c=this.semanticInfoChain.getASTForDecl(l);if(c!==t)return}if(this.canEmitDeclarations(t)){var u=this.semanticInfoChain.getDeclForAST(t),p=u.getSignatureSymbol();this.emitDeclarationComments(t),this.emitDeclFlags(t,"function");var h=t.propertyName.text();this.declFile.Write(h),this.emitTypeParameters(t.callSignature.typeParameterList,p);var d=e.hasModifier(t.modifiers,2);if(this.emitParameterList(d,t.callSignature.parameterList),!d){var m=p.returnType;this.declFile.Write(": "),this.emitTypeSignature(t,m)}this.declFile.WriteLine(";")}},n.prototype.emitCallSignature=function(t){var n=this.semanticInfoChain.getDeclForAST(t);this.emitDeclarationComments(t);var r=n.getSignatureSymbol();this.emitTypeParameters(t.typeParameterList,r),this.emitIndent(),this.declFile.Write("("),this.emitParameters(!1,e.Parameters.fromParameterList(t.parameterList)),this.declFile.Write(")");var i=r.returnType;this.declFile.Write(": "),i?this.emitTypeSignature(t,i):this.declFile.Write("any"),this.declFile.WriteLine(";")},n.prototype.emitConstructSignature=function(t){{var n=this.semanticInfoChain.getDeclForAST(t),r=(new Date).getTime();this.semanticInfoChain.getSymbolForAST(t)}e.declarationEmitFunctionDeclarationGetSymbolTime+=(new Date).getTime()-r,this.emitDeclarationComments(t),this.emitIndent(),this.declFile.Write("new");var i=n.getSignatureSymbol();this.emitTypeParameters(t.callSignature.typeParameterList,i),this.declFile.Write("("),this.emitParameters(!1,e.Parameters.fromParameterList(t.callSignature.parameterList)),this.declFile.Write(")");var o=i.returnType;this.declFile.Write(": "),o?this.emitTypeSignature(t,o):this.declFile.Write("any"),this.declFile.WriteLine(";")},n.prototype.emitMethodSignature=function(t){{var n=this.semanticInfoChain.getDeclForAST(t),r=(new Date).getTime();this.semanticInfoChain.getSymbolForAST(t)}e.declarationEmitFunctionDeclarationGetSymbolTime+=(new Date).getTime()-r,this.emitDeclarationComments(t),this.emitIndent(),this.declFile.Write(t.propertyName.text()),t.questionToken&&this.declFile.Write("? ");var i=n.getSignatureSymbol();this.emitTypeParameters(t.callSignature.typeParameterList,i),this.declFile.Write("("),this.emitParameters(!1,e.Parameters.fromParameterList(t.callSignature.parameterList)),this.declFile.Write(")");var o=i.returnType;this.declFile.Write(": "),o?this.emitTypeSignature(t,o):this.declFile.Write("any"),this.declFile.WriteLine(";")},n.prototype.emitDeclarationsForFunctionDeclaration=function(t){var n=this.semanticInfoChain.getDeclForAST(t),r=(new Date).getTime(),i=this.semanticInfoChain.getSymbolForAST(t);if(e.declarationEmitFunctionDeclarationGetSymbolTime+=(new Date).getTime()-r,t.block){var o=i.type,a=o.getConstructSignatures();if(a&&a.length>1)return;if(this.isOverloadedCallSignature(t))return}if(this.canEmitDeclarations(t)){this.emitDeclarationComments(t);var s=t.identifier.text();this.emitDeclFlags(t,"function"),""!==s||!t.identifier||t.identifier.text().length>0?this.declFile.Write(s):2097152===n.kind&&this.declFile.Write("new");var l=n.getSignatureSymbol();this.emitTypeParameters(t.callSignature.typeParameterList,l),this.declFile.Write("("),this.emitParameters(!1,e.Parameters.fromParameterList(t.callSignature.parameterList)),this.declFile.Write(")");var c=l.returnType;this.declFile.Write(": "),c?this.emitTypeSignature(t,c):this.declFile.Write("any"),this.declFile.WriteLine(";")}},n.prototype.emitIndexMemberDeclaration=function(e){this.emitDeclarationsForAST(e.indexSignature)},n.prototype.emitIndexSignature=function(t){if(this.canEmitDeclarations(t)){this.emitDeclarationComments(t),this.emitIndent(),this.declFile.Write("["),this.emitParameters(!1,e.Parameters.fromParameter(t.parameter)),this.declFile.Write("]");var n=this.semanticInfoChain.getDeclForAST(t),r=n.getSignatureSymbol(),i=r.returnType;this.declFile.Write(": "),this.emitTypeSignature(t,i),this.declFile.WriteLine(";")}},n.prototype.emitBaseList=function(e,t){if(e&&e.nonSeparatorCount()>0){var n=t?"extends":"implements";this.declFile.Write(" "+n+" ");for(var r=e.nonSeparatorCount(),i=0;r>i;i++){i>0&&this.declFile.Write(", ");var o=e.nonSeparatorAt(i),a=this.semanticInfoChain.getSymbolForAST(o);this.emitTypeSignature(o,a)}}},n.prototype.emitAccessorDeclarationComments=function(t){if(!this.emitOptions.compilationSettings().removeComments()){var n=((new Date).getTime(),e.PullHelpers.getGetterAndSetterFunction(t,this.semanticInfoChain));e.declarationEmitGetAccessorFunctionTime+=(new Date).getTime();var r=[];n.getter&&(r=r.concat(e.docComments(n.getter))),n.setter&&(r=r.concat(e.docComments(n.setter))),this.writeDeclarationComments(r)}},n.prototype.emitDeclarationsForGetAccessor=function(e){this.emitMemberAccessorDeclaration(e,e.modifiers,e.propertyName)},n.prototype.emitDeclarationsForSetAccessor=function(e){this.emitMemberAccessorDeclaration(e,e.modifiers,e.propertyName)},n.prototype.emitMemberAccessorDeclaration=function(t,n,r){var i=((new Date).getTime(),e.PullHelpers.getAccessorSymbol(t,this.semanticInfoChain));if(e.declarationEmitGetAccessorFunctionTime+=(new Date).getTime(),140!==t.kind()||!i.getGetter()){var o=e.hasModifier(n,2);if(this.emitAccessorDeclarationComments(t),this.declFile.Write(this.getIndentString()),this.emitClassElementModifiers(n),this.declFile.Write(r.text()),!o){this.declFile.Write(" : ");var a=i.type;this.emitTypeSignature(t,a)}this.declFile.WriteLine(";")}},n.prototype.emitClassMembersFromConstructorDefinition=function(t){if(t.parameterList){var n=t.parameterList.parameters.nonSeparatorCount();e.lastParameterIsRest(t.parameterList)&&n--;for(var r=0;n>r;r++){var i=t.parameterList.parameters.nonSeparatorAt(r),o=this.semanticInfoChain.getDeclForAST(i);if(e.hasFlag(o.flags,8388608)){{this.semanticInfoChain.getDeclForAST(t)}this.emitDeclarationComments(i),this.declFile.Write(this.getIndentString()),this.emitClassElementModifiers(i.modifiers),this.declFile.Write(i.identifier.text()),e.hasModifier(i.modifiers,2)||this.emitTypeOfVariableDeclaratorOrParameter(i),this.declFile.WriteLine(";")}}}},n.prototype.emitDeclarationsForClassDeclaration=function(t){if(this.canEmitDeclarations(t)){var n=t.identifier.text();this.emitDeclarationComments(t);{this.semanticInfoChain.getDeclForAST(t)}this.emitDeclFlags(t,"class"),this.declFile.Write(n),this.emitTypeParameters(t.typeParameterList),this.emitHeritageClauses(t.heritageClauses),this.declFile.WriteLine(" {"),this.indenter.increaseIndent();var r=e.getLastConstructor(t);r&&this.emitClassMembersFromConstructorDefinition(r),this.emitDeclarationsForList(t.classElements),this.indenter.decreaseIndent(),this.emitIndent(),this.declFile.WriteLine("}")}},n.prototype.emitHeritageClauses=function(e){if(e)for(var t=0,n=e.childCount();n>t;t++)this.emitHeritageClause(e.childAt(t))},n.prototype.emitHeritageClause=function(e){this.emitBaseList(e.typeNames,230===e.kind())},n.prototype.getEnclosingContainer=function(e){for(e=e.parent;e;){if(131===e.kind()||128===e.kind()||130===e.kind()||120===e.kind())return e;e=e.parent}return null},n.prototype.emitTypeParameters=function(t,n){if(t&&t.typeParameters.nonSeparatorCount()){this.declFile.Write("<");var r=this.getEnclosingContainer(t),i=(new Date).getTime(),o=this.semanticInfoChain.getDeclForAST(r),a=o.getSymbol();e.declarationEmitGetTypeParameterSymbolTime+=(new Date).getTime()-i;var s;s=n?n.getTypeParameters():a.getTypeArgumentsOrTypeParameters();for(var l=0;l")}},n.prototype.emitDeclarationsForInterfaceDeclaration=function(e){if(this.canEmitDeclarations(e)){var t=e.identifier.text();this.emitDeclarationComments(e);{this.semanticInfoChain.getDeclForAST(e)}this.emitDeclFlags(e,"interface"),this.declFile.Write(t),this.emitTypeParameters(e.typeParameterList),this.emitHeritageClauses(e.heritageClauses),this.declFile.WriteLine(" {"),this.indenter.increaseIndent(),this.emitSeparatedList(e.body.typeMembers),this.indenter.decreaseIndent(),this.emitIndent(),this.declFile.WriteLine("}")}},n.prototype.emitDeclarationsForImportDeclaration=function(t){var n=this.semanticInfoChain.getDeclForAST(t),r=n.getSymbol(),i=e.hasModifier(t.modifiers,1);(i||r.typeUsedExternally()||e.PullContainerSymbol.usedAsSymbol(r.getContainer(),r))&&(this.emitDeclarationComments(t),this.emitIndent(),i&&this.declFile.Write("export "),this.declFile.Write("import "),this.declFile.Write(t.identifier.text()+" = "),this.declFile.WriteLine(245===t.moduleReference.kind()?"require("+t.moduleReference.stringLiteral.text()+");":this.getFullName(t.moduleReference.moduleName)+";"))},n.prototype.getFullName=function(e){if(11===e.kind())return e.text();var t=e;return this.getFullName(t.left)+"."+this.getFullName(t.right)},n.prototype.emitDeclarationsForEnumDeclaration=function(e){if(this.canEmitDeclarations(e)){this.emitDeclarationComments(e);{this.semanticInfoChain.getDeclForAST(e)}this.emitDeclFlags(e,"enum"),this.declFile.WriteLine(e.identifier.text()+" {"),this.indenter.increaseIndent();for(var t=e.enumElements.nonSeparatorCount(),n=0;t>n;n++){var r=e.enumElements.nonSeparatorAt(n),i=r,o=this.semanticInfoChain.getDeclForAST(i);this.emitDeclarationComments(i),this.emitIndent(),this.declFile.Write(i.propertyName.text()),null!=o.constantValue&&this.declFile.Write(" = "+o.constantValue),this.declFile.WriteLine(",")}this.indenter.decreaseIndent(),this.emitIndent(),this.declFile.WriteLine("}")}},n.prototype.emitDeclarationsForModuleDeclaration=function(t){if(this.canEmitDeclarations(t)){{this.semanticInfoChain.getDeclForAST(t)}this.emitDeclarationComments(t);var n=t.stringLiteral||e.ArrayUtilities.first(e.getModuleNames(t.name));this.emitDeclFlags(n,"module"),this.declFile.Write(t.stringLiteral?t.stringLiteral.text():this.getFullName(t.name)),this.declFile.WriteLine(" {"),this.indenter.increaseIndent(),this.emitDeclarationsForList(t.moduleElements),this.indenter.decreaseIndent(),this.emitIndent(),this.declFile.WriteLine("}")}},n.prototype.emitDeclarationsForExportAssignment=function(e){this.emitIndent(),this.declFile.Write("export = "),this.declFile.Write(e.identifier.text()),this.declFile.WriteLine(";")},n.prototype.resolveScriptReference=function(t,n){if(!this.emitOptions.compilationSettings().noResolve()||e.isRooted(n))return n;var r=e.convertToDirectoryPath(e.switchToForwardSlashes(e.getRootFilePath(t.fileName))),i=this.emitOptions.resolvePath(r+n);return i},n.prototype.emitReferencePaths=function(){if(!this.emittedReferencePaths){var t=[];if(this.document.emitToOwnOutputFile())for(var n=this.document.referencedFiles,r=!1,i=0;i')}this.emittedReferencePaths=!0}},n.prototype.emitDeclarationsForSourceUnit=function(e){this.emitReferencePaths(e),this.emitDeclarationsForList(e.moduleElements)},n}();e.DeclarationEmitter=n}(TypeScript||(TypeScript={}));var TypeScript;!function(e){var t=function(){function t(e){var n=Math.max(1,t.computeM(e)),r=Math.max(1,t.computeK(e)),i=n+7&-8;this.bitArray=[];for(var o=0,a=i;a>o;o++)this.bitArray[o]=!1;this.hashFunctionCount=r}return t.computeM=function(e){var n=t.falsePositiveProbability,r=e,i=r*Math.log(n),o=Math.log(1/Math.pow(2,Math.log(2)));return Math.ceil(i/o)},t.computeK=function(e){var n=e,r=t.computeM(e),i=Math.log(2)*r/n;return Math.round(i)},t.prototype.computeHash=function(t,n){return e.Hash.computeMurmur2StringHashCode(t,n)},t.prototype.addKeys=function(e){for(var t in e)e[t]&&this.add(t)},t.prototype.add=function(e){for(var t=0;tr;r++)if(e.hasFlag(t[r],n))return!0;return!1}!function(e){e[e.None=0]="None",e[e.Exported=1]="Exported",e[e.Private=2]="Private",e[e.Public=4]="Public",e[e.Ambient=8]="Ambient",e[e.Static=16]="Static",e[e.Optional=128]="Optional",e[e.Signature=2048]="Signature",e[e.Enum=4096]="Enum",e[e.ArrowFunction=8192]="ArrowFunction",e[e.ClassConstructorVariable=16384]="ClassConstructorVariable",e[e.InitializedModule=32768]="InitializedModule",e[e.InitializedDynamicModule=65536]="InitializedDynamicModule",e[e.MustCaptureThis=1<<18]="MustCaptureThis",e[e.DeclaredInAWithBlock=1<<21]="DeclaredInAWithBlock",e[e.HasReturnStatement=1<<22]="HasReturnStatement",e[e.PropertyParameter=1<<23]="PropertyParameter",e[e.IsAnnotatedWithAny=1<<24]="IsAnnotatedWithAny",e[e.HasDefaultArgs=1<<25]="HasDefaultArgs",e[e.ConstructorParameter=1<<26]="ConstructorParameter",e[e.ImplicitVariable=e.ClassConstructorVariable|e.InitializedModule|e.InitializedDynamicModule|e.Enum]="ImplicitVariable",e[e.SomeInitializedModule=e.InitializedModule|e.InitializedDynamicModule|e.Enum]="SomeInitializedModule"}(e.PullElementFlags||(e.PullElementFlags={}));e.PullElementFlags;e.hasModifier=t,function(e){e[e.None=0]="None",e[e.Global=0]="Global",e[e.Script=1]="Script",e[e.Primitive=2]="Primitive",e[e.Container=4]="Container",e[e.Class=8]="Class",e[e.Interface=16]="Interface",e[e.DynamicModule=32]="DynamicModule",e[e.Enum=64]="Enum",e[e.TypeAlias=128]="TypeAlias",e[e.ObjectLiteral=256]="ObjectLiteral",e[e.Variable=512]="Variable",e[e.CatchVariable=1024]="CatchVariable",e[e.Parameter=2048]="Parameter",e[e.Property=4096]="Property",e[e.TypeParameter=8192]="TypeParameter",e[e.Function=16384]="Function",e[e.ConstructorMethod=32768]="ConstructorMethod",e[e.Method=65536]="Method",e[e.FunctionExpression=1<<17]="FunctionExpression",e[e.GetAccessor=1<<18]="GetAccessor",e[e.SetAccessor=1<<19]="SetAccessor",e[e.CallSignature=1<<20]="CallSignature",e[e.ConstructSignature=1<<21]="ConstructSignature",e[e.IndexSignature=1<<22]="IndexSignature",e[e.ObjectType=1<<23]="ObjectType",e[e.FunctionType=1<<24]="FunctionType",e[e.ConstructorType=1<<25]="ConstructorType",e[e.EnumMember=1<<26]="EnumMember",e[e.WithBlock=1<<27]="WithBlock",e[e.CatchBlock=1<<28]="CatchBlock",e[e.All=e.Script|e.Global|e.Primitive|e.Container|e.Class|e.Interface|e.DynamicModule|e.Enum|e.TypeAlias|e.ObjectLiteral|e.Variable|e.Parameter|e.Property|e.TypeParameter|e.Function|e.ConstructorMethod|e.Method|e.FunctionExpression|e.GetAccessor|e.SetAccessor|e.CallSignature|e.ConstructSignature|e.IndexSignature|e.ObjectType|e.FunctionType|e.ConstructorType|e.EnumMember|e.WithBlock|e.CatchBlock]="All",e[e.SomeFunction=e.Function|e.ConstructorMethod|e.Method|e.FunctionExpression|e.GetAccessor|e.SetAccessor]="SomeFunction",e[e.SomeValue=e.Variable|e.Parameter|e.Property|e.EnumMember|e.SomeFunction]="SomeValue",e[e.SomeType=e.Script|e.Global|e.Primitive|e.Class|e.Interface|e.Enum|e.ObjectType|e.FunctionType|e.ConstructorType|e.TypeParameter]="SomeType",e[e.AcceptableAlias=e.Variable|e.SomeFunction|e.Class|e.Interface|e.Enum|e.Container|e.ObjectType|e.FunctionType|e.ConstructorType]="AcceptableAlias",e[e.SomeContainer=e.Container|e.DynamicModule|e.TypeAlias]="SomeContainer",e[e.SomeSignature=e.CallSignature|e.ConstructSignature|e.IndexSignature]="SomeSignature",e[e.SomeTypeReference=e.Interface|e.ObjectType|e.FunctionType|e.ConstructorType]="SomeTypeReference",e[e.SomeInstantiatableType=e.Class|e.Interface|e.TypeParameter]="SomeInstantiatableType"}(e.PullElementKind||(e.PullElementKind={}));e.PullElementKind}(TypeScript||(TypeScript={}));var TypeScript;!function(e){e.pullDeclID=0;var t=[],n=function(){function n(t,n,r,i,o){this.declID=e.pullDeclID++,this.flags=0,this.declGroups=null,this.childDecls=null,this.typeParameters=null,this.synthesizedValDecl=null,this.childDeclTypeCache=null,this.childDeclValueCache=null,this.childDeclNamespaceCache=null,this.childDeclTypeParameterCache=null,this.name=t,this.kind=r,this.flags=i,this.span=o,n!==this.name&&(this.declDisplayName=n)}return n.prototype.fileName=function(){throw e.Errors.abstract()},n.prototype.getParentPath=function(){throw e.Errors.abstract()},n.prototype.getParentDecl=function(){throw e.Errors.abstract()},n.prototype.semanticInfoChain=function(){throw e.Errors.abstract()},n.prototype.isExternalModule=function(){throw e.Errors.abstract()},n.prototype.getEnclosingDecl=function(){throw e.Errors.abstract()},n.prototype._getEnclosingDeclFromParentDecl=function(){for(var t=this;t;){switch(t.kind){default:return t;case 512:case 8192:case 2048:case 128:case 67108864:}t=t.getParentDecl()}e.Debug.fail()},n.prototype.getDisplayName=function(){return void 0===this.declDisplayName?this.name:this.declDisplayName},n.prototype.setSymbol=function(e){this.semanticInfoChain().setSymbolForDecl(this,e)},n.prototype.ensureSymbolIsBound=function(e){if("undefined"==typeof e&&(e=!1),!(e&&this.hasSignatureSymbol()||this.hasSymbol())&&1!=this.kind){var t=this.semanticInfoChain().getBinder();t.bindDeclToPullSymbol(this)}},n.prototype.getSymbol=function(){return 1==this.kind?null:(this.ensureSymbolIsBound(),this.semanticInfoChain().getSymbolForDecl(this))},n.prototype.hasSymbol=function(){var e=this.semanticInfoChain().getSymbolForDecl(this);return!!e},n.prototype.setSignatureSymbol=function(e){this.semanticInfoChain().setSignatureSymbolForDecl(this,e)},n.prototype.getSignatureSymbol=function(){return this.ensureSymbolIsBound(!0),this.semanticInfoChain().getSignatureSymbolForDecl(this)},n.prototype.hasSignatureSymbol=function(){var e=this.semanticInfoChain().getSignatureSymbolForDecl(this);return!!e},n.prototype.setFlags=function(e){this.flags=e},n.prototype.setFlag=function(e){this.flags|=e},n.prototype.getSpan=function(){return this.span},n.prototype.setValueDecl=function(e){this.synthesizedValDecl=e},n.prototype.getValueDecl=function(){return this.synthesizedValDecl},n.prototype.isEqual=function(e){return this.name===e.name&&this.kind===e.kind&&this.flags===e.flags&&this.fileName()===e.fileName()&&this.span.start()===e.span.start()&&this.span.end()===e.span.end()},n.prototype.getChildDeclCache=function(t){return 8192===t?(this.childDeclTypeParameterCache||(this.childDeclTypeParameterCache=e.createIntrinsicsObject()),this.childDeclTypeParameterCache):e.hasFlag(t,164)?(this.childDeclNamespaceCache||(this.childDeclNamespaceCache=e.createIntrinsicsObject()),this.childDeclNamespaceCache):e.hasFlag(t,58728539)?(this.childDeclTypeCache||(this.childDeclTypeCache=e.createIntrinsicsObject()),this.childDeclTypeCache):(this.childDeclValueCache||(this.childDeclValueCache=e.createIntrinsicsObject()),this.childDeclValueCache)},n.prototype.addChildDecl=function(e){8192===e.kind?(this.typeParameters||(this.typeParameters=[]),this.typeParameters[this.typeParameters.length]=e):(this.childDecls||(this.childDecls=[]),this.childDecls[this.childDecls.length]=e);var t=e.name;if(!(7340032&e.kind)){var n=this.getChildDeclCache(e.kind),r=n[t];r||(r=[]),r.push(e),n[t]=r}},n.prototype.searchChildDecls=function(e,n){var r=null;return r=58728539&n?this.childDeclTypeCache?this.childDeclTypeCache[e]:null:164&n?this.childDeclNamespaceCache?this.childDeclNamespaceCache[e]:null:this.childDeclValueCache?this.childDeclValueCache[e]:null,r?r:58728539&n&&(r=this.childDeclTypeParameterCache?this.childDeclTypeParameterCache[e]:null)?r:t},n.prototype.getChildDecls=function(){return this.childDecls?this.childDecls:t},n.prototype.getTypeParameters=function(){return this.typeParameters?this.typeParameters:t},n.prototype.addVariableDeclToGroup=function(t){this.declGroups||(this.declGroups=e.createIntrinsicsObject());var n=this.declGroups[t.name];n?n.addDecl(t):(n=new l(t.name),n.addDecl(t),this.declGroups[t.name]=n)},n.prototype.getVariableDeclGroups=function(){var e=null;if(this.declGroups)for(var n in this.declGroups)this.declGroups[n]&&(null===e&&(e=[]),e.push(this.declGroups[n].getDecls()));return e?e:t},n.prototype.hasBeenBound=function(){return this.hasSymbol()||this.hasSignatureSymbol()},n.prototype.isSynthesized=function(){return!1},n.prototype.ast=function(){var e=this.semanticInfoChain();return e?e.getASTForDecl(this):null},n}();e.PullDecl=n;var r=function(e){function t(t,n,r,i,o,a,s){e.call(this,t,t,r,i,o),this._semanticInfoChain=a,this._isExternalModule=s,this._fileName=n}return __extends(t,e),t.prototype.fileName=function(){return this._fileName},t.prototype.getParentPath=function(){return[this]},t.prototype.getParentDecl=function(){return null},t.prototype.semanticInfoChain=function(){return this._semanticInfoChain},t.prototype.isExternalModule=function(){return this._isExternalModule},t.prototype.getEnclosingDecl=function(){return this},t}(n);e.RootPullDecl=r;var i=function(e){function t(t,n,r,i,o,a,s){"undefined"==typeof s&&(s=!0),e.call(this,t,n,r,i,a),this.parentDecl=null,this.parentPath=null,this.parentDecl=o,s&&o.addChildDecl(this)}return __extends(t,e),t.prototype.fileName=function(){return this.parentDecl?this.parentDecl.fileName():""},t.prototype.getParentDecl=function(){return this.parentDecl},t.prototype.getParentPath=function(){if(!this.parentPath){for(var e=[this],t=this.parentDecl;t;)!t||e[e.length-1]==t||256&t.kind||e.unshift(t),t=t.getParentDecl();this.parentPath=e}return this.parentPath},t.prototype.semanticInfoChain=function(){var e=this.getParentDecl();return e?e.semanticInfoChain():null},t.prototype.isExternalModule=function(){return!1},t.prototype.getEnclosingDecl=function(){return this.parentDecl&&this.parentDecl._getEnclosingDeclFromParentDecl()},t}(n);e.NormalPullDecl=i;var o=function(e){function t(t,n,r,i){e.call(this,t,n,67108864,4,r,i),this.constantValue=null}return __extends(t,e),t}(i);e.PullEnumElementDecl=o;var a=function(e){function t(t,n,r,i,o){"undefined"==typeof o&&(o=""),e.call(this,"",o,131072,n,r,i),this.functionExpressionName=t}return __extends(t,e),t.prototype.getFunctionExpressionName=function(){return this.functionExpressionName},t}(i);e.PullFunctionExpressionDecl=a;var s=function(e){function t(t,n,r,i,o,a,s){e.call(this,t,n,r,i,o,a,!1),this._semanticInfoChain=s}return __extends(t,e),t.prototype.semanticInfoChain=function(){return this._semanticInfoChain},t.prototype.isSynthesized=function(){return!0},t}(i);e.PullSynthesizedDecl=s;var l=function(){function e(e){this.name=e,this._decls=[]}return e.prototype.addDecl=function(e){e.name===this.name&&(this._decls[this._decls.length]=e)},e.prototype.getDecls=function(){return this._decls},e}();e.PullDeclGroup=l}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(e){for(var t="",r=0;rs;s++)a=a+"."+n(o[s]);return t(o[0])+a}return null},t.prototype._getResolver=function(){return e.Debug.assert(this._declarations&&this._declarations.length>0),this._declarations[0].semanticInfoChain().getResolver()},t.prototype._resolveDeclaredSymbol=function(){return this._getResolver().resolveDeclaredSymbol(this)},t.prototype.getName=function(e,t){var n=this.getAliasSymbolName(e,function(n){return n.getName(e,t)},function(e){return e.getName()});return null!=n?n:this.name},t.prototype.getDisplayName=function(e,t,n){var r=this.getAliasSymbolName(e,function(n){return n.getDisplayName(e,t)},function(e){return e.getDisplayName()},n);if(null!=r)return r;var i=this.getDeclarations(),o=i.length&&i[0].getDisplayName();return o&&o.length?o:this.name},t.prototype.getIsSpecialized=function(){return!1},t.prototype.getRootSymbol=function(){return this.rootSymbol?this.rootSymbol:this},t.prototype.setRootSymbol=function(e){this.rootSymbol=e},t.prototype.setIsSynthesized=function(e){"undefined"==typeof e&&(e=!0),this.isSynthesized=e},t.prototype.getIsSynthesized=function(){return this.isSynthesized},t.prototype.setEnclosingSignature=function(e){this._enclosingSignature=e},t.prototype.getEnclosingSignature=function(){return this._enclosingSignature},t.prototype.addDeclaration=function(t){e.Debug.assert(!!t),this.rootSymbol||(this._declarations?this._declarations[this._declarations.length]=t:this._declarations=[t])},t.prototype.getDeclarations=function(){return this.rootSymbol?this.rootSymbol.getDeclarations():(this._declarations||(this._declarations=[]),this._declarations)},t.prototype.hasDeclaration=function(t){return this._declarations?e.ArrayUtilities.any(this._declarations,function(e){return e===t}):!1},t.prototype.setContainer=function(e){this.rootSymbol||(this._container=e)},t.prototype.getContainer=function(){return this.rootSymbol?this.rootSymbol.getContainer():this._container},t.prototype.setResolved=function(){this.isResolved=!0,this.inResolution=!1},t.prototype.startResolving=function(){this.inResolution=!0},t.prototype.setUnresolved=function(){this.isResolved=!1,this.inResolution=!1},t.prototype.anyDeclHasFlag=function(t){for(var n=this.getDeclarations(),r=0,i=n.length;i>r;r++)if(e.hasFlag(n[r].flags,t))return!0;return!1},t.prototype.allDeclsHaveFlag=function(t){for(var n=this.getDeclarations(),r=0,i=n.length;i>r;r++)if(!e.hasFlag(n[r].flags,t))return!1;return!0},t.prototype.pathToRoot=function(){for(var e=[],t=this;t;){if(t.isType()){var n=t.getAssociatedContainerType();n&&(t=n)}e[e.length]=t;var r=t.kind;if(2048==r)break;t=t.getContainer()}return e},t.prototype.findCommonAncestorPath=function(e){var t=this.pathToRoot();if(1===t.length)return t;var n;if(!e)return t;n=e.pathToRoot();for(var r=-1,i=0,o=t.length;o>i;i++){for(var a=t[i],s=0,l=n.length;l>s;s++){var c=n[s];if(a===c){var u=null;if(i>0){var p=t[i-1].getDeclarations();p.length&&(u=p[0].getParentDecl())}var h=null;if(s>0){var p=n[s-1].getDeclarations();p.length&&(h=p[0].getParentDecl())}if(!u||!h||u==h){r=i;break}}}if(r>=0)break}return r>=0?t.slice(0,r):t},t.prototype.toString=function(e){var t=this.getNameAndTypeName(e);return t},t.prototype.getNamePartForFullName=function(){return this.getDisplayName(null,!0)},t.prototype.fullName=function(t){var n=this.pathToRoot(),r="",i=this.getAliasSymbolName(t,function(e){return e.fullName(t)},function(e){return e.getNamePartForFullName()});if(null!=i)return i;for(var o=1;o"))}return o},t.getIsExternallyVisible=function(t,n,r){if(r){for(var i=0;i0&&(r=d[0].getSymbol()._docComments||"",p=!1)}}if(p&&(r=this.getDocCommentText(this.getDocCommentArray(this)),""==r&&1048576==this.kind)){var m=this.functionType;m&&1==m.getCallSignatures().length&&(r=m.docComments())}}this._docComments=r}return this._docComments},t.prototype.getParameterDocCommentText=function(e,t){if(0===t.length||6!==t[0].kind())return"";for(var n=0;n=0;i=r.indexOf("@param",i))if(i+=6,this.isSpaceChar(r,i)){if(i=this.consumeLeadingSpace(r,i),-1===i)break;if(123===r.charCodeAt(i)){i++;for(var o=0,a=1;is?r.length:s),c=void 0,u=r.substring(0,i).lastIndexOf("\n")+1;0!==u&&i>u&&"\r"===r.charAt(u+1)&&u++;var p=this.consumeLeadingSpace(r,u);return p!==i&&"*"===r.charAt(p)&&(c=i-p-1),this.cleanJSDocComment(l,c)}}return""},t.prototype.cleanJSDocComment=function(e,t){var n=new Array;e=e.replace("/**",""),e.length>=2&&"/"===e.charAt(e.length-1)&&"*"===e.charAt(e.length-2)&&(e=e.substring(0,e.length-2));for(var r=e.split("\n"),i=!1,o=0;o=0&&un;n++){var o=t.charCodeAt(n);if(32!==o&&9!==o)return n}return i!==t.length?i:-1},t.prototype.isSpaceChar=function(e,t){var n=e.length;if(n>t){var r=e.charCodeAt(t);return 32===r||9===r}return t===n},t.prototype.cleanDocCommentLine=function(e,t,n){var r=this.consumeLeadingSpace(e,0);if(-1!==r){var i=r;if(t&&"*"===e.charAt(r)){var o=r+1;if(r=this.consumeLeadingSpace(e,o,n),-1===r)return null;i=r-o}return{start:r,end:"\r"===e.charAt(e.length-1)?e.length-1:e.length,jsDocSpacesRemoved:i}}return null},t}();e.PullSymbol=i;var o=function(t){function n(n){t.call(this,"",n),this._memberTypeParameterNameCache=null,this._stringConstantOverload=void 0,this.parameters=e.sentinelEmptyArray,this.typeParameters=null,this.returnType=null,this.functionType=null,this.hasOptionalParam=!1,this.nonOptionalParamCount=0,this.hasVarArgs=!1,this.hasAGenericParameter=!1,this.hasBeenChecked=!1,this.inWrapCheck=!1}return __extends(n,t),n.prototype.isDefinition=function(){return!1},n.prototype.isGeneric=function(){return this.hasAGenericParameter||this.typeParameters&&0!=this.typeParameters.length},n.prototype.addParameter=function(t,n){"undefined"==typeof n&&(n=!1),this.parameters==e.sentinelEmptyArray&&(this.parameters=[]),this.parameters[this.parameters.length]=t,this.hasOptionalParam=n,t.getEnclosingSignature()||t.setEnclosingSignature(this),n||this.nonOptionalParamCount++},n.prototype.addTypeParameter=function(t){this.typeParameters||(this.typeParameters=[]),this._memberTypeParameterNameCache||(this._memberTypeParameterNameCache=e.createIntrinsicsObject()),this.typeParameters[this.typeParameters.length]=t,this._memberTypeParameterNameCache[t.getName()]=t},n.prototype.getTypeParameters=function(){return this.typeParameters||(this.typeParameters=[]),this.typeParameters},n.prototype.findTypeParameter=function(t){var n;if(!this._memberTypeParameterNameCache&&(this._memberTypeParameterNameCache=e.createIntrinsicsObject(),this.typeParameters))for(var r=0;r1&&(r=!1);var u=!1;s&&s.isDefinition()&&c>1&&(s=null);for(var p=0;c>p;p++)if(c>1&&t[p].isDefinition())u=!0;else{var h=t[p];if(a&&s&&(h=s),l.push(h.getSignatureTypeNameEx(n,r,i,o)),a)break}if(a&&l.length&&c>1){for(var d=l[l.length-1],p=p+1;c>p;p++)if(t[p].isDefinition()){u=!0;break}var m=e.getLocalizedText(e.DiagnosticCode._0_overload_s,[u?c-2:c-1]);d.add(e.MemberName.create(m))}return l},n.prototype.toString=function(e,t){var n=this.getSignatureTypeNameEx(this.getScopedNameEx().toString(),!1,!1,e,void 0,t).toString();return n},n.prototype.getSignatureTypeNameEx=function(t,n,r,o,a,s){var l=new e.MemberNameArray;l.add(i.getTypeParameterStringEx(this.getTypeParameters(),o,s,!0)),l.add(r?e.MemberName.create("["):e.MemberName.create("("));var c=new e.MemberNameArray;c.prefix=t,s?(c.prefix=t,c.addAll(l.entries)):c.prefix=t+l.toString();for(var u=this.parameters,p=u.length,h=0;p>h;h++){var d=u[h].type,m=d?": ":"",y=u[h].isVarArg,f=y?"...":"",g=!y&&u[h].isOptional?"?":"";a&&c.add(new e.MemberName),c.add(e.MemberName.create(f+u[h].getScopedNameEx(o).toString()+g+m)),d&&c.add(d.getScopedNameEx(o)),a&&c.add(new e.MemberName),p-1>h&&c.add(e.MemberName.create(", "))}return c.add(n?r?e.MemberName.create("] => "):e.MemberName.create(") => "):r?e.MemberName.create("]: "):e.MemberName.create("): ")),c.add(this.returnType?this.returnType.getScopedNameEx(o):e.MemberName.create("any")),c},n.prototype.wrapsSomeTypeParameter=function(e){var t=this;if(t.inWrapCheck)return!1;t.inWrapCheck=!0;var n=!1;if(t.returnType&&t.returnType.wrapsSomeTypeParameter(e)&&(n=!0),!n)for(var r=t.parameters,i=0;i0||this._hasGenericSignature||this._hasGenericMember||this.isArrayNamedTypeReference()},r.prototype.canUseSimpleInstantiationCache=function(e){return 1===e.length&&8388608!==e[0].kind},r.prototype.addSpecialization=function(n,r){r&&r.length&&(this.canUseSimpleInstantiationCache(r)?(this._simpleInstantiationCache||(this._simpleInstantiationCache=[]),this._simpleInstantiationCache[r[0].pullSymbolID]=n):(this._complexInstantiationCache||(this._complexInstantiationCache=e.createIntrinsicsObject()),this._complexInstantiationCache[t(r)]=n),this._specializedVersionsOfThisType||(this._specializedVersionsOfThisType=[]),this._specializedVersionsOfThisType.push(n))},r.prototype.getSpecialization=function(e){if(!e||!e.length)return null;if(this.canUseSimpleInstantiationCache(e)){if(!this._simpleInstantiationCache)return null;var n=this._simpleInstantiationCache[e[0].pullSymbolID];return n?n:null}if(!this._complexInstantiationCache)return null;var n=this._complexInstantiationCache[t(e)];return n?n:null},r.prototype.getKnownSpecializations=function(){return this._specializedVersionsOfThisType?this._specializedVersionsOfThisType:e.sentinelEmptyArray},r.prototype.getTypeArguments=function(){return null},r.prototype.getTypeArgumentsOrTypeParameters=function(){return this.getTypeParameters()},r.prototype.addCallSignature=function(e){this._callSignatures||(this._callSignatures=[]),this._callSignatures[this._callSignatures.length]=e,e.isGeneric()&&(this._hasGenericSignature=!0),e.functionType=this},r.prototype.addConstructSignature=function(e){this._constructSignatures||(this._constructSignatures=[]),this._constructSignatures[this._constructSignatures.length]=e,e.isGeneric()&&(this._hasGenericSignature=!0),e.functionType=this},r.prototype.addIndexSignature=function(e){this._indexSignatures||(this._indexSignatures=[]),this._indexSignatures[this._indexSignatures.length]=e,e.isGeneric()&&(this._hasGenericSignature=!0),e.functionType=this},r.prototype.addUnhiddenSignaturesFromBaseType=function(t,n,r){if(!t)return void r.push.apply(r,n);for(var i=this._getResolver(),o=0;oi;i++){var a=this._members[i];a.kind&t&&(2!==n||!a.anyDeclHasFlag(2))&&(r[r.length]=a)}if(this._extendedTypes)for(var s=0!==n?2:0,i=0,o=this._extendedTypes.length;o>i;i++)for(var l=this._extendedTypes[i].getAllMembers(t,s),c=0,u=l.length;u>c;c++){var p=l[c];this._memberNameCache&&this._memberNameCache[p.name]||(r[r.length]=p)}if(this.isContainer()){if(this._enclosedMemberTypes)for(var i=0;i1},r.prototype.getTypeOfSymbol=function(){var t=this.getAssociatedContainerType();if(t&&t.isNamedTypeSymbol())return t;var n=this.getFunctionSymbol();return n&&16384==n.kind&&!e.PullHelpers.isSymbolLocal(n)?n:null},r.prototype.getMemberTypeNameEx=function(t,n,r){var i=this.getMembers(),a=this.getCallSignatures(),s=this.getConstructSignatures(),l=this.getIndexSignatures();if(i.length>0||a.length>0||s.length>0||l.length>0){var c=this.getTypeOfSymbol();if(c){var u=c.getScopedNameEx(n,!0);return e.MemberName.create(u,"typeof ","")}if(this._inMemberTypeNameEx)return e.MemberName.create("any");this._inMemberTypeNameEx=!0;for(var p=new e.MemberNameArray,h=!t||0!=l.length,d="; ",m=0;m0&&(S=o.getSignaturesTypeNameEx(a,"",_,!1,n,T),p.addAll(S)),s.length>0&&(S=o.getSignaturesTypeNameEx(s,"new",_,!1,n),p.addAll(S)),l.length>0&&(S=o.getSignaturesTypeNameEx(l,"",_,!0,n),p.addAll(S)),h||!T&&b>1&&t?(p.prefix="{ ",p.suffix="}",p.delim=d):p.entries.length>1&&(p.delim=d),this._inMemberTypeNameEx=!1,p}return e.MemberName.create("{}")},r.prototype.getGenerativeTypeClassification=function(){return 2},r.prototype.wrapsSomeTypeParameter=function(e){var t=this,n=!1;if(t.isTypeParameter()){if(e[t.pullSymbolID])return!0;var r=t.getConstraint();return r&&r.wrapsSomeTypeParameter(e)?!0:!1}if(t.inWrapCheck)return n;if(t.inWrapCheck=!0,!n){var i=t.getTypeArguments();if(t.isGeneric()&&!i&&(i=t.getTypeParameters()),i)for(var o=0;o=0,"invalid inference argument position"),this.fixedParameterTypes&&t=0&&(!this.contextStack[n].substitutions||!(t=this.contextStack[n].substitutions[e.pullSymbolID]));n--);return t},t.prototype.getContextualType=function(){var e=this.contextStack.length?this.contextStack[this.contextStack.length-1]:null;if(e){var t=e.contextualType;if(!t)return null;t.isTypeParameter()&&t.getConstraint()&&(t=t.getConstraint());var n=this.findSubstitution(t);return n?n:t}return null},t.prototype.inProvisionalResolution=function(){return this.contextStack.length?this.contextStack[this.contextStack.length-1].provisional:!1},t.prototype.isInBaseTypeResolution=function(){return this.inBaseTypeResolution},t.prototype.startBaseTypeResolution=function(){var e=this.inBaseTypeResolution;return this.inBaseTypeResolution=!0,e},t.prototype.doneBaseTypeResolution=function(e){this.inBaseTypeResolution=e},t.prototype.setTypeInContext=function(e,t){var n=this.findSubstitution(t);e.type=n?n:t,this.contextStack.length&&this.inProvisionalResolution()&&this.contextStack[this.contextStack.length-1].recordProvisionallyTypedSymbol(e)},t.prototype.postDiagnostic=function(e){e&&(this.inProvisionalResolution()?this.contextStack[this.contextStack.length-1].hasProvisionalErrors=!0:this.inTypeCheck&&this.resolver&&this.resolver.semanticInfoChain.addDiagnostic(e))},t.prototype.typeCheck=function(){return this.inTypeCheck&&!this.inProvisionalResolution()},t.prototype.setSymbolForAST=function(e,t){this.contextStack[this.contextStack.length-1].setSymbolForAST(e,t)},t.prototype.getSymbolForAST=function(e){for(var t=this.contextStack.length-1;t>=0;t--){var n=this.contextStack[t];if(!n.provisional)break;var r=n.getSymbolForAST(e);if(r)return r}return null},t}();e.PullTypeResolutionContext=i}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(e){var t=e.valueText(),n=s[t];return s[n]?n:void 0}function n(t){if(11===t.kind())return{actualText:t.text(),memberName:t.valueText()};if(14===t.kind())return{actualText:t.text(),memberName:t.valueText()};if(13===t.kind())return{actualText:t.text(),memberName:t.valueText()};throw e.Errors.invalidOperation()}function r(e){for(;e&&e.parent;){switch(e.parent.kind()){case 244:return!0;case 127:return!1;case 125:var t=e.parent;if(t.type===e)return!0;break;case 123:var n=e.parent;if(n.type===e)return!0;break;case 239:var r=e.parent;if(r.type===e)return!0;break;case 220:var i=e.parent;return i.type===e;case 230:case 231:return!0;case 228:return!0;case 131:case 128:case 130:case 129:case 145:case 212:case 242:return!1}e=e.parent}return!1}var i;!function(e){e[e.NotAssignable=0]="NotAssignable",e[e.AssignableButWithProvisionalErrors=1]="AssignableButWithProvisionalErrors",e[e.AssignableWithNoProvisionalErrors=2]="AssignableWithNoProvisionalErrors",e[e.Subtype=3]="Subtype"}(i||(i={}));var o=function(){function e(){this.targetSymbol=null,this.resolvedSignatures=null,this.candidateSignature=null,this.actualParametersContextTypeSymbols=null,this.diagnosticsFromOverloadResolution=[]}return e}();e.PullAdditionalCallResolutionData=o;var a=function(){function e(){this.membersContextTypeSymbols=null}return e}();e.PullAdditionalObjectLiteralResolutionData=a;var s,l=function(){function e(e,t){this.memberSymbol=e,this.baseOrigin=t}return e}(),c=function(){function e(e,t){this.signature=e,this.baseOrigin=t}return e}(),u=function(){function e(){}return e}();!function(e){e[e._this=1]="_this",e[e._super=2]="_super",e[e.arguments=3]="arguments",e[e._i=4]="_i",e[e.require=5]="require",e[e.exports=6]="exports"}(s||(s={}));var p=function(){function i(t,n){this.compilationSettings=t,this.semanticInfoChain=n,this._cachedArrayInterfaceType=null,this._cachedNumberInterfaceType=null,this._cachedStringInterfaceType=null,this._cachedBooleanInterfaceType=null,this._cachedObjectInterfaceType=null,this._cachedFunctionInterfaceType=null,this._cachedIArgumentsInterfaceType=null,this._cachedRegExpInterfaceType=null,this._cachedAnyTypeArgs=null,this.typeCheckCallBacks=[],this.postTypeCheckWorkitems=[],this._cachedFunctionArgumentsSymbol=null,this.assignableCache=e.BitMatrix.getBitMatrix(!0),this.subtypeCache=e.BitMatrix.getBitMatrix(!0),this.identicalCache=e.BitMatrix.getBitMatrix(!0)}return i.prototype.cachedArrayInterfaceType=function(){return this._cachedArrayInterfaceType||(this._cachedArrayInterfaceType=this.getSymbolFromDeclPath("Array",[],16)),this._cachedArrayInterfaceType||(this._cachedArrayInterfaceType=this.semanticInfoChain.anyTypeSymbol),this._cachedArrayInterfaceType.isResolved||this.resolveDeclaredSymbol(this._cachedArrayInterfaceType,new e.PullTypeResolutionContext(this)),this._cachedArrayInterfaceType},i.prototype.getArrayNamedType=function(){return this.cachedArrayInterfaceType()},i.prototype.cachedNumberInterfaceType=function(){return this._cachedNumberInterfaceType||(this._cachedNumberInterfaceType=this.getSymbolFromDeclPath("Number",[],16)),this._cachedNumberInterfaceType&&!this._cachedNumberInterfaceType.isResolved&&this.resolveDeclaredSymbol(this._cachedNumberInterfaceType,new e.PullTypeResolutionContext(this)),this._cachedNumberInterfaceType},i.prototype.cachedStringInterfaceType=function(){return this._cachedStringInterfaceType||(this._cachedStringInterfaceType=this.getSymbolFromDeclPath("String",[],16)),this._cachedStringInterfaceType&&!this._cachedStringInterfaceType.isResolved&&this.resolveDeclaredSymbol(this._cachedStringInterfaceType,new e.PullTypeResolutionContext(this)),this._cachedStringInterfaceType},i.prototype.cachedBooleanInterfaceType=function(){return this._cachedBooleanInterfaceType||(this._cachedBooleanInterfaceType=this.getSymbolFromDeclPath("Boolean",[],16)),this._cachedBooleanInterfaceType&&!this._cachedBooleanInterfaceType.isResolved&&this.resolveDeclaredSymbol(this._cachedBooleanInterfaceType,new e.PullTypeResolutionContext(this)),this._cachedBooleanInterfaceType},i.prototype.cachedObjectInterfaceType=function(){return this._cachedObjectInterfaceType||(this._cachedObjectInterfaceType=this.getSymbolFromDeclPath("Object",[],16)),this._cachedObjectInterfaceType||(this._cachedObjectInterfaceType=this.semanticInfoChain.anyTypeSymbol),this._cachedObjectInterfaceType.isResolved||this.resolveDeclaredSymbol(this._cachedObjectInterfaceType,new e.PullTypeResolutionContext(this)),this._cachedObjectInterfaceType},i.prototype.cachedFunctionInterfaceType=function(){return this._cachedFunctionInterfaceType||(this._cachedFunctionInterfaceType=this.getSymbolFromDeclPath("Function",[],16)),this._cachedFunctionInterfaceType&&!this._cachedFunctionInterfaceType.isResolved&&this.resolveDeclaredSymbol(this._cachedFunctionInterfaceType,new e.PullTypeResolutionContext(this)),this._cachedFunctionInterfaceType},i.prototype.cachedIArgumentsInterfaceType=function(){return this._cachedIArgumentsInterfaceType||(this._cachedIArgumentsInterfaceType=this.getSymbolFromDeclPath("IArguments",[],16)),this._cachedIArgumentsInterfaceType&&!this._cachedIArgumentsInterfaceType.isResolved&&this.resolveDeclaredSymbol(this._cachedIArgumentsInterfaceType,new e.PullTypeResolutionContext(this)),this._cachedIArgumentsInterfaceType},i.prototype.cachedRegExpInterfaceType=function(){return this._cachedRegExpInterfaceType||(this._cachedRegExpInterfaceType=this.getSymbolFromDeclPath("RegExp",[],16)),this._cachedRegExpInterfaceType&&!this._cachedRegExpInterfaceType.isResolved&&this.resolveDeclaredSymbol(this._cachedRegExpInterfaceType,new e.PullTypeResolutionContext(this)),this._cachedRegExpInterfaceType},i.prototype.cachedFunctionArgumentsSymbol=function(){if(!this._cachedFunctionArgumentsSymbol){this._cachedFunctionArgumentsSymbol=new e.PullSymbol("arguments",512),this._cachedFunctionArgumentsSymbol.type=this.cachedIArgumentsInterfaceType()?this.cachedIArgumentsInterfaceType():this.semanticInfoChain.anyTypeSymbol,this._cachedFunctionArgumentsSymbol.setResolved();var t=new e.PullSynthesizedDecl("arguments","arguments",2048,0,null,new e.TextSpan(0,0),this.semanticInfoChain);t.setSymbol(this._cachedFunctionArgumentsSymbol),this._cachedFunctionArgumentsSymbol.addDeclaration(t)}return this._cachedFunctionArgumentsSymbol},i.prototype.setTypeChecked=function(e,t){t.setTypeChecked(e)},i.prototype.canTypeCheckAST=function(e,t){return t.canTypeCheckAST(e)},i.prototype.setSymbolForAST=function(e,t,n){n&&n.inProvisionalResolution()?n.setSymbolForAST(e,t):this.semanticInfoChain.setSymbolForAST(e,t)},i.prototype.getSymbolForAST=function(e,t){var n=this.semanticInfoChain.getSymbolForAST(e);return n||t&&t.inProvisionalResolution()&&(n=t.getSymbolForAST(e)),n},i.prototype.getASTForDecl=function(e){return this.semanticInfoChain.getASTForDecl(e)},i.prototype.getNewErrorTypeSymbol=function(t){return"undefined"==typeof t&&(t=null),new e.PullErrorTypeSymbol(this.semanticInfoChain.anyTypeSymbol,t)},i.prototype.getEnclosingDecl=function(e){var t=e.getParentPath();return t.length>1&&t[t.length-1]===e?t[t.length-2]:t[t.length-1]},i.prototype.getExportedMemberSymbol=function(e,t){if(!(69632&e.kind)){var n=0!=(36&t.kind),r=n?t:t.getAssociatedContainerType();if(n&&r)return e.anyDeclHasFlag(1)?e:null}return e},i.prototype.getMemberSymbol=function(e,t,n){var r=null;if(68147712&t?r=n.findMember(e,!0):58728539&t?r=n.findNestedType(e):164&t&&(r=n.findNestedContainer(e)),r)return this.getExportedMemberSymbol(r,n);var i=n.getAssociatedContainerType();if(i){if(i.isClass())return null;if(n=i,68147712&t?r=n.findMember(e,!0):58728539&t?r=n.findNestedType(e):164&t&&(r=n.findNestedContainer(e)),r)return this.getExportedMemberSymbol(r,n)}if(164&n.kind)for(var o=n.getDeclarations(),a=null,s=0;s=0;h--){if(a=t[h],i=a.kind,2097152&a.flags)return this.semanticInfoChain.anyTypeSymbol;if(36&i){if(r=a.searchChildDecls(e,n),r.length)return r[0].getSymbol();if(68147712&n){if(c=a.getSymbol().getInstanceSymbol(),r=a.searchChildDecls(e,128),r.length){var d=r[0].getSymbol();if(d.isAlias())return d}if(c&&(u=c.type,p=this.getMemberSymbol(e,n,u),p&&p.kind&n&&!p.anyDeclHasFlag(16)))return p;l=a.getValueDecl(),l&&(a=l)}s=a.getSymbol().type;var p=this.getMemberSymbol(e,n,s);if(p&&p.kind&n&&!p.anyDeclHasFlag(16))return p}else if(58728703&n||!(8&i)){var m=null;if(131072===i&&e===a.getFunctionExpressionName()&&(m=a.getSymbol()),r=a.searchChildDecls(e,n),r.length)return 1032192&a.kind&&a.ensureSymbolIsBound(),r[0].getSymbol();if(m)return m;if(68147712&n&&(r=a.searchChildDecls(e,128),r.length)){var d=r[0].getSymbol();if(d.isAlias())return d}}}return o=this.semanticInfoChain.findSymbol([e],n)},i.prototype.getVisibleDeclsFromDeclPath=function(e,t){for(var n,r=[],i=null,o=e.length-1;o>=0;o--){i=e[o],n=i.kind;var a=i.kind;switch(8!==a&&16!==a&&this.addFilteredDecls(i.getChildDecls(),t,r),a){case 4:case 32:for(var s=this.semanticInfoChain.findDeclsFromPath(e.slice(0,o+1),164),l=0,c=s.length;c>l;l++){var u=s[l];if(u!==i)for(var p=u.getChildDecls(),h=0,d=p.length;d>h;h++){var m=p[h];1&m.flags&&m.kind&t&&r.push(m)}}break;case 8:case 16:var y=i.getTypeParameters();y&&y.length&&this.addFilteredDecls(y,t,r);break;case 131072:var f=i.getFunctionExpressionName();f&&r.push(i);case 16384:case 32768:case 65536:var y=i.getTypeParameters();y&&y.length&&this.addFilteredDecls(y,t,r)}}for(var g=this.semanticInfoChain.topLevelDecls(),o=0,v=g.length;v>o;o++){var S=g[o];e.length>0&&S.fileName()===e[0].fileName()||S.isExternalModule()||this.addFilteredDecls(S.getChildDecls(),t,r)}return r},i.prototype.addFilteredDecls=function(e,t,n){if(e.length)for(var r=0,i=e.length;i>r;r++){var o=e[r];o.kind&t&&n.push(o)}},i.prototype.getVisibleDecls=function(e){var t=e.getParentPath(),n=126876415;return this.getVisibleDeclsFromDeclPath(t,n)},i.prototype.getVisibleContextSymbols=function(e,t){var n=t.getContextualType();if(!n||this.isAnyOrEquivalent(n))return null;for(var r=126876415,i=n.getAllMembers(r,2),o=0;op;p++){var d=u[p];if(e.ArrayUtilities.contains(c,d)){s=1;break}}}var m=126876415,y=[];if(a.isContainer()){var f=a.getExportAssignedContainerSymbol();f&&(a=f)}if(a.isTypeParameter()){var g=a.getConstraint();g&&(a=g,y=a.getAllMembers(m,2))}else{if(67108864==o.kind&&(a=this.semanticInfoChain.numberTypeSymbol),a===this.semanticInfoChain.numberTypeSymbol&&this.cachedNumberInterfaceType()?a=this.cachedNumberInterfaceType():a===this.semanticInfoChain.stringTypeSymbol&&this.cachedStringInterfaceType()?a=this.cachedStringInterfaceType():a===this.semanticInfoChain.booleanTypeSymbol&&this.cachedBooleanInterfaceType()&&(a=this.cachedBooleanInterfaceType()),!a.isResolved){var v=this.resolveDeclaredSymbol(a,i);v!=a&&(o.isType()||i.setTypeInContext(o,v),a=v)}if(y=a.getAllMembers(m,s),a.isContainer()){var S=a.getInstanceSymbol();if(S){var T=S.type;this.resolveDeclaredSymbol(T,i);var b=T.getAllMembers(m,s);y=y.concat(b)}var _=a.getExportAssignedContainerSymbol();if(_){var E=_.getAllMembers(m,s);y=y.concat(E)}}else if(!a.isConstructor()){var C=a.getAssociatedContainerType();if(C){var x=C.type;this.resolveDeclaredSymbol(x,i);var k=x.getAllMembers(m,s);y=y.concat(k)}}}return(a.getCallSignatures().length||a.getConstructSignatures().length)&&this.cachedFunctionInterfaceType()&&(y=y.concat(this.cachedFunctionInterfaceType().getAllMembers(m,2))),y},i.prototype.isAnyOrEquivalent=function(e){return e===this.semanticInfoChain.anyTypeSymbol||e.isError()},i.prototype.resolveExternalModuleReference=function(t,n){var r=t,i=null;if(e.isRelative(r)){var o=e.getRootFilePath(e.switchToForwardSlashes(n));i=this.semanticInfoChain.findExternalModule(o+t)}else if(t=r,i=this.semanticInfoChain.findAmbientExternalModuleInGlobalContext(e.quoteStr(r)),!i)for(var o=e.getRootFilePath(e.switchToForwardSlashes(n));null===i&&""!=o;)i=this.semanticInfoChain.findExternalModule(o+t),null===i&&("/"===o?o="":(o=e.normalizePath(o+".."),o=o&&"/"!=o?o+"/":o));return i},i.prototype.resolveDeclaredSymbol=function(t,n){return!t||t.isResolved||t.isTypeReference()?t:(n||(n=new e.PullTypeResolutionContext(this)),this.resolveDeclaredSymbolWorker(t,n))},i.prototype.resolveDeclaredSymbolWorker=function(t,n){if(!t||t.isResolved)return t;if(t.inResolution)return t.type||t.isType()||(t.type=this.semanticInfoChain.anyTypeSymbol),t;for(var r=t.getDeclarations(),i=0;io;o++)r=this.resolveSingleModuleDeclaration(t,i[o],n);return this.canTypeCheckAST(t,n)&&this.typeCheckModuleDeclaration(t,n),r},i.prototype.ensureAllSymbolsAreBound=function(e){if(e)for(var t=e.getDeclarations(),n=0;nn;n++){var i=e.childAt(n);if(134==i.kind())return void this.resolveExportAssignmentStatement(i,t)}},i.prototype.resolveSingleModuleDeclaration=function(e,t,n){var r=this.semanticInfoChain.getDeclForAST(t),i=r.getSymbol();return this.resolveModuleSymbol(i,n,e,t,null)},i.prototype.typeCheckModuleDeclaration=function(t,n){if(t.stringLiteral)this.typeCheckSingleModuleDeclaration(t,t.stringLiteral,n);else for(var r=e.getModuleNames(t.name),i=0,o=r.length;o>i;i++)this.typeCheckSingleModuleDeclaration(t,r[i],n)},i.prototype.typeCheckSingleModuleDeclaration=function(t,n,r){this.setTypeChecked(t,r),e.isLastNameOfModule(t,n)&&this.resolveAST(t.moduleElements,!1,r);var i=this.semanticInfoChain.getDeclForAST(n);this.validateVariableDeclarationGroups(i,r),t.stringLiteral&&e.isRelative(t.stringLiteral.valueText())&&this.semanticInfoChain.addDiagnosticFromAST(t.stringLiteral,e.DiagnosticCode.Ambient_external_module_declaration_cannot_specify_relative_module_name),e.moduleIsElided(t)||t.stringLiteral||this.checkNameForCompilerGeneratedDeclarationCollision(n,!0,n,r)},i.prototype.postTypeCheckModuleDeclaration=function(e,t){this.checkThisCaptureVariableCollides(e,!0,t)},i.prototype.isTypeRefWithoutTypeArgs=function(e){if(11==e.kind())return!0;if(121==e.kind()){var t=e;if(11==t.right.kind())return!0}return!1},i.prototype.createInstantiatedType=function(t,n){if(!t.isGeneric())return t;for(var r=t.getTypeArgumentsOrTypeParameters(),i=[],o=0;o=0&&p-T0){var h=this.getSymbolFromDeclPath(u,o,4);s=this.filterSymbol(h,4,r,i),s?(this.semanticInfoChain.setSymbolForAST(n,s),h.isAlias()&&this.semanticInfoChain.setAliasSymbolForAST(n,h)):this.semanticInfoChain.addDiagnosticFromAST(n,e.DiagnosticCode.Unable_to_resolve_module_reference_0,[u])}}return s},i.prototype.resolveInternalModuleReference=function(t,n){var r=this.semanticInfoChain.getDeclForAST(t),i=this.getEnclosingDecl(r),o=t.moduleReference,a=245===o.kind()?o.stringLiteral:o.moduleName,s=i.getParentPath(),l=null;if(11===a.kind()||14===a.kind()){var c=this.resolveModuleReference(r,a,i,n,s);if(c){if(l=c.type,this.semanticInfoChain.setAliasSymbolForAST(o,this.semanticInfoChain.getAliasSymbolForAST(a)),l.anyDeclHasFlag(32768)){var u=(11===a.kind(),a.valueText()),p=this.getSymbolFromDeclPath(u,s,68147712),h=l.getInstanceSymbol();if(!p||h==p&&p.type!=l){var d=r.getSymbol();d.setAssignedValueSymbol(p)}else{var m=(11===a.kind(),a.text());n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(a,e.DiagnosticCode.Internal_module_reference_0_in_import_declaration_does_not_reference_module_instance_for_1,[m,c.type.toString(i?i.getSymbol():null)]))}}}else l=this.semanticInfoChain.anyTypeSymbol}else if(121==a.kind()){var d=r.getSymbol(),y=a,c=this.resolveModuleReference(r,y.left,i,n,s);if(c){var f=this.resolveIdentifierOfInternalModuleReference(r,y.right,c,i,n);if(f)return d.setAssignedValueSymbol(f.valueSymbol),d.setAssignedTypeSymbol(f.typeSymbol),d.setAssignedContainerSymbol(f.containerSymbol),this.semanticInfoChain.setAliasSymbolForAST(o,f.aliasSymbol),f.valueSymbol&&d.setIsUsedAsValue(!0),null}d.setAssignedTypeSymbol(this.semanticInfoChain.anyTypeSymbol)}return l},i.prototype.resolveImportDeclaration=function(t,n){var r=this.semanticInfoChain.getDeclForAST(t),i=this.getEnclosingDecl(r),o=r.getSymbol(),a=null;if(o.isResolved)return o;if(o.startResolving(),245===t.moduleReference.kind()){{var s=t.moduleReference.stringLiteral.valueText();i.getParentPath()}if(a=this.resolveExternalModuleReference(s,r.fileName()),!a){var l=t.moduleReference.stringLiteral.text();this.semanticInfoChain.addDiagnosticFromAST(t,e.DiagnosticCode.Unable_to_resolve_external_module_0,[l]),a=this.semanticInfoChain.anyTypeSymbol}}else a=this.resolveInternalModuleReference(t,n);return a&&(a.isContainer()?a.getExportAssignedValueSymbol()&&o.setIsUsedAsValue(!0):(this.semanticInfoChain.addDiagnosticFromAST(t,e.DiagnosticCode.Module_cannot_be_aliased_to_a_non_module_type),a=this.semanticInfoChain.anyTypeSymbol),a.isContainer()&&o.setAssignedContainerSymbol(a),o.setAssignedTypeSymbol(a),this.setSymbolForAST(t.moduleReference,a,null)),o.setResolved(),this.resolveDeclaredSymbol(o.assignedValue(),n),this.resolveDeclaredSymbol(o.assignedType(),n),this.resolveDeclaredSymbol(o.assignedContainer(),n),this.canTypeCheckAST(t,n)&&this.typeCheckImportDeclaration(t,n),o },i.prototype.typeCheckImportDeclaration=function(n,r){var i=this;this.setTypeChecked(n,r);var o=this.semanticInfoChain.getDeclForAST(n),a=this.getEnclosingDecl(o),s=o.getSymbol();if(245===n.moduleReference.kind()){this.compilationSettings.noResolve()&&r.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(n,e.DiagnosticCode.Import_declaration_cannot_refer_to_external_module_reference_when_noResolve_option_is_set,null));var l=n.moduleReference.stringLiteral.valueText();if(32===a.kind){var c=e.getEnclosingModuleDeclaration(this.getASTForDecl(a));c&&130===c.kind()&&e.isRelative(l)&&r.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(n,e.DiagnosticCode.Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name))}}var u;if(245===n.moduleReference.kind()){var p=s.getExportAssignedContainerSymbol(),h=p?p.getContainer():null;h&&32==h.kind&&(u=!0)}else u=!0;if(u){var d=s.getExportAssignedTypeSymbol(),p=s.getExportAssignedContainerSymbol(),m=s.getExportAssignedValueSymbol();this.checkSymbolPrivacy(s,p,function(t){var o=e.DiagnosticCode.Exported_import_declaration_0_is_assigned_container_that_is_or_is_using_inaccessible_module_1,l=[s.getScopedName(a?a.getSymbol():null),t.getScopedName(a?a.getSymbol():null,!1,!1,!0)];r.postDiagnostic(i.semanticInfoChain.diagnosticFromAST(n,o,l))}),d!=p&&this.checkSymbolPrivacy(s,d,function(t){var o=t.isContainer()&&!t.isEnum()?e.DiagnosticCode.Exported_import_declaration_0_is_assigned_type_that_is_using_inaccessible_module_1:e.DiagnosticCode.Exported_import_declaration_0_is_assigned_type_that_has_or_is_using_private_type_1,l=[s.getScopedName(a?a.getSymbol():null),t.getScopedName(a?a.getSymbol():null,!1,!1,!0)];r.postDiagnostic(i.semanticInfoChain.diagnosticFromAST(n,o,l))}),m&&this.checkSymbolPrivacy(s,m.type,function(t){var o=t.isContainer()&&!t.isEnum()?e.DiagnosticCode.Exported_import_declaration_0_is_assigned_value_with_type_that_is_using_inaccessible_module_1:e.DiagnosticCode.Exported_import_declaration_0_is_assigned_value_with_type_that_has_or_is_using_private_type_1,l=[s.getScopedName(a?a.getSymbol():null),t.getScopedName(a?a.getSymbol():null,!1,!1,!0)];r.postDiagnostic(i.semanticInfoChain.diagnosticFromAST(n,o,l))})}t(n.identifier)&&this.postTypeCheckWorkitems.push(n)},i.prototype.postTypeCheckImportDeclaration=function(t,n){e.importDeclarationIsElided(t,this.semanticInfoChain)&&this.checkNameForCompilerGeneratedDeclarationCollision(t,!0,t.identifier,n,!0)},i.prototype.resolveExportAssignmentStatement=function(t,n){var r=t.identifier.valueText();if(0===r.length)return this.semanticInfoChain.anyTypeSymbol;var i=null,o=null,a=null,s=this.getEnclosingDeclForAST(t),l=s.getSymbol();if(!l.isType()&&l.isContainer())return this.semanticInfoChain.addDiagnosticFromAST(t,e.DiagnosticCode.Export_assignments_may_only_be_used_at_the_top_level_of_external_modules),this.semanticInfoChain.anyTypeSymbol;var c=null!==s?[s]:[];a=this.getSymbolFromDeclPath(r,c,164);var u=!0;if(a&&(u=0!=(59753052&a.kind)),!u&&a&&128==a.kind){this.resolveDeclaredSymbol(a,n);var p=a,h=p.getExportAssignedValueSymbol(),d=p.getExportAssignedTypeSymbol(),m=p.getExportAssignedContainerSymbol();(h||d||m)&&(i=h,o=d,a=m,p.setTypeUsedExternally(!0),u=!0)}return u?(i||(i=this.getSymbolFromDeclPath(r,c,68147712)),o||(o=this.getSymbolFromDeclPath(r,c,58728539)),i||o||a?(i&&l.setExportAssignedValueSymbol(i),o&&l.setExportAssignedTypeSymbol(o),a&&l.setExportAssignedContainerSymbol(a),this.resolveDeclaredSymbol(i,n),this.resolveDeclaredSymbol(o,n),this.resolveDeclaredSymbol(a,n),this.semanticInfoChain.voidTypeSymbol):(n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Could_not_find_symbol_0,[r])),this.semanticInfoChain.voidTypeSymbol)):(this.semanticInfoChain.addDiagnosticFromAST(t,e.DiagnosticCode.Export_assignments_may_only_be_made_with_variables_functions_classes_interfaces_enums_and_internal_modules),this.semanticInfoChain.voidTypeSymbol)},i.prototype.resolveAnyFunctionTypeSignature=function(t,n,r,i,o){var a=this.semanticInfoChain.getDeclForAST(t);e.Debug.assert(a);var s=a.getSymbol(),l=33554432===s.kind?s.getConstructSignatures()[0]:s.getCallSignatures()[0];if(i&&(l.returnType=this.resolveTypeReference(i,o)),n)for(var c=0;c=0;l--){var i=s[l],c=i.kind;if(!(131072===c&&e.hasFlag(i.flags,8192)||16384!==c&&65536!==c&&32768!==c&&262144!==c&&524288!==c&&131072!==c&&8!==c&&4!==c&&32!==c&&1!==c)){e.hasFlag(i.flags,262144)&&r.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,n?e.DiagnosticCode.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:e.DiagnosticCode.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference));break}}},i.prototype.postTypeCheckVariableDeclaratorOrParameter=function(e,t){this.checkThisCaptureVariableCollides(e,!0,t)},i.prototype.resolveTypeParameterDeclaration=function(e,t){var n=this.semanticInfoChain.getDeclForAST(e),r=n.getSymbol();if(r.isResolved||r.inResolution)return r.isResolved&&this.canTypeCheckAST(e,t)&&this.typeCheckTypeParameterDeclaration(e,t),r;if(r.startResolving(),e.constraint){var i=this.resolveTypeReference(e.constraint.type,t);i&&r.setConstraint(i)}return r.setResolved(),this.canTypeCheckAST(e,t)&&this.setTypeChecked(e,t),r},i.prototype.typeCheckTypeParameterDeclaration=function(e,t){this.setTypeChecked(e,t),this.resolveAST(e.constraint,!1,t)},i.prototype.resolveConstraint=function(e,t){return this.canTypeCheckAST(e,t)&&this.setTypeChecked(e,t),this.resolveTypeReference(e.type,t)},i.prototype.resolveFunctionBodyReturnTypes=function(t,n,r,i,o,a,s){var l=this,c=[],u=[a],p=function(e,t){var n=!0;switch(e.kind()){case 129:case 219:case 218:case 222:n=!1;break;case 150:var r=e;a.setFlag(4194304),c.push({expression:r.expression,enclosingDecl:u[u.length-1]}),n=!1;break;case 236:case 163:u[u.length]=l.semanticInfoChain.getDeclForAST(e)}return t.options.goChildren=n,e},d=function(e,t){switch(e.kind()){case 236:case 163:u.length--}return t.options.goChildren=!0,e};if(n?e.getAstWalkerFactory().walk(n,p,d):(c.push({expression:r,enclosingDecl:a}),a.setFlag(4194304)),c.length){for(var m=[],y=[],f=0;f0&&157===s.statements.childAt(0).kind())){var y=u.getDisplayName();y=y?y:"expression",l.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(a,e.DiagnosticCode.Function_0_declared_a_non_void_return_type_but_has_no_return_expression,[y]))}}16384===u.kind&&this.checkNameForCompilerGeneratedDeclarationCollision(t,!0,r,l),this.typeCheckCallBacks.push(function(e){c.typeCheckFunctionOverloads(t,e)})},i.prototype.typeCheckIndexSignature=function(t,n){var r=this;this.setTypeChecked(t,n);var i=this.semanticInfoChain.getDeclForAST(t);this.resolveAST(t.parameter,!1,n);this.getEnclosingDecl(i);this.resolveReturnTypeAnnotationOfFunctionDeclaration(t,e.getType(t),n),this.validateVariableDeclarationGroups(i,n),this.checkFunctionTypePrivacy(t,!1,null,e.Parameters.fromParameter(t.parameter),e.getType(t),null,n);var o=i.getSignatureSymbol();this.typeCheckCallBacks.push(function(n){var a=i.getSignatureSymbol().getContainer(),s=r.getBothKindsOfIndexSignatures(a,n),l=s.stringSignature,c=s.numericSignature,u=c===o;if(c&&l&&(u||l.getDeclarations()[0].getParentDecl()!==c.getDeclarations()[0].getParentDecl())){var p=new h;if(!r.sourceIsSubtypeOfTarget(c.returnType,l.returnType,t,n,p)){var d=r.getEnclosingSymbolForAST(t);n.postDiagnostic(p.message?r.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1_NL_2,[c.returnType.toString(d),l.returnType.toString(d),p.message]):r.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Numeric_indexer_type_0_must_be_a_subtype_of_string_indexer_type_1,[c.returnType.toString(d),l.returnType.toString(d)]))}}for(var m=a.type.getAllMembers(536869887,0),y=0;y0){var i=t.parameterList.parameters.nonSeparatorAt(0);return this.resolveTypeReference(e.getType(i),r)}return null},i.prototype.resolveAccessorDeclaration=function(t,n){var r=this.semanticInfoChain.getDeclForAST(t),i=r.getSymbol();if(i.inResolution)return i.type=this.semanticInfoChain.anyTypeSymbol,i.setResolved(),i;if(i.isResolved)i.type||(i.type=this.semanticInfoChain.anyTypeSymbol);else{var o=i.getGetter(),a=o?o.getDeclarations()[0].ast():null,s=null!==o,l=i.getSetter(),c=l?l.getDeclarations()[0].ast():null,u=null!==l,p=this.resolveGetterReturnTypeAnnotation(a,r,n),h=null!==p,d=this.resolveSetterArgumentTypeAnnotation(c,r,n),m=null!==d;if(i.startResolving(),s&&(o=this.resolveGetAccessorDeclaration(a,a.parameterList,e.getType(a),a.block,d,n)),u&&(l=this.resolveSetAccessorDeclaration(c,c.parameterList,n)),s&&u){var y=l.type.getCallSignatures()[0],f=y.parameters,g=f.length>0,v=o.type.getCallSignatures()[0],S=g?f[0].type:null,T=v.returnType;m&&!h?(T=S,v.returnType=S):(h&&!m||!h&&!m)&&(S=T,g&&(f[0].type=T)),i.type=this.typesAreIdentical(S,T)?T:this.getNewErrorTypeSymbol()}else if(u){var y=l.type.getCallSignatures()[0],f=y.parameters,g=f.length>0;i.type=g?f[0].type:this.semanticInfoChain.anyTypeSymbol}else{var v=o.type.getCallSignatures()[0];i.type=v.returnType}i.setResolved()}return this.canTypeCheckAST(t,n)&&this.typeCheckAccessorDeclaration(t,n),i},i.prototype.typeCheckAccessorDeclaration=function(e,t){this.setTypeChecked(e,t);var n=this.semanticInfoChain.getDeclForAST(e),r=n.getSymbol(),i=r.getGetter(),o=(r.getSetter(),139==e.kind());if(o){var a=e;t.pushContextualType(i.type,t.inProvisionalResolution(),null),this.typeCheckGetAccessorDeclaration(a,t),t.popContextualType()}else{var s=e;this.typeCheckSetAccessorDeclaration(s,t)}},i.prototype.resolveGetAccessorDeclaration=function(e,t,n,r,i,o){var a=this.semanticInfoChain.getDeclForAST(e),s=a.getSymbol(),l=s.getGetter(),c=l.type,u=c.getCallSignatures()[0],p=!1;if(u){if(u.isResolved)return l;if(u.inResolution)return u.returnType=this.semanticInfoChain.anyTypeSymbol,u.setResolved(),l;if(u.startResolving(),n){var h=this.resolveReturnTypeAnnotationOfFunctionDeclaration(e,n,o);h?u.returnType=h:(u.returnType=this.getNewErrorTypeSymbol(),p=!0)}else i?u.returnType=i:this.resolveFunctionBodyReturnTypes(e,r,null,u,!1,a,o);p||u.setResolved()}return l},i.prototype.checkIfGetterAndSetterTypeMatch=function(t,n){var r=this.semanticInfoChain.getDeclForAST(t),o=r.getSymbol(),a=o.getGetter(),s=o.getSetter();if(a&&s){var l=a.getDeclarations()[0].ast(),c=s.getDeclarations()[0].ast();if(l.typeAnnotation&&i.hasSetAccessorParameterTypeAnnotation(c)){var u=s.type.getCallSignatures()[0],p=u.parameters,a=o.getGetter(),h=a.type.getCallSignatures()[0],d=p[0].type,m=h.returnType;this.typesAreIdentical(d,m)||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.get_and_set_accessor_must_have_the_same_type))}}},i.prototype.typeCheckGetAccessorDeclaration=function(t,n){var r=this.semanticInfoChain.getDeclForAST(t),i=r.getSymbol();this.resolveReturnTypeAnnotationOfFunctionDeclaration(t,e.getType(t),n),this.resolveAST(t.block,!1,n),this.validateVariableDeclarationGroups(r,n);var o=(this.getEnclosingDecl(r),0!=(4196352&r.flags)),a=t.propertyName;o||t.block.statements.childCount()>0&&157===t.block.statements.childAt(0).kind()||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(a,e.DiagnosticCode.Getters_must_return_a_value));var s=i.getSetter();if(s){var l=s.getDeclarations()[0],c=e.hasFlag(l.flags,2),u=e.hasModifier(t.modifiers,2);u!=c&&n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(a,e.DiagnosticCode.Getter_and_setter_accessors_do_not_agree_in_visibility)),this.checkIfGetterAndSetterTypeMatch(t,n)}this.checkFunctionTypePrivacy(t,e.hasModifier(t.modifiers,16),null,e.Parameters.fromParameterList(t.parameterList),e.getType(t),t.block,n)},i.hasSetAccessorParameterTypeAnnotation=function(e){return e.parameterList&&e.parameterList.parameters.nonSeparatorCount()>0&&null!=e.parameterList.parameters.nonSeparatorAt(0).typeAnnotation},i.prototype.resolveSetAccessorDeclaration=function(e,t,n){var r=this.semanticInfoChain.getDeclForAST(e),i=r.getSymbol(),o=i.getSetter(),a=o.type,s=r.getSignatureSymbol(),l=!1;if(s){if(s.isResolved)return o;if(s.inResolution)return s.returnType=this.semanticInfoChain.voidTypeSymbol,s.setResolved(),o;if(s.startResolving(),t)for(var c=0;cn;n++)this.resolveAST(e.childAt(n),!1,t)}return this.semanticInfoChain.voidTypeSymbol},i.prototype.resolveSeparatedList=function(e,t){if(this.canTypeCheckAST(e,t)){this.setTypeChecked(e,t);for(var n=0,r=e.nonSeparatorCount();r>n;n++)this.resolveAST(e.nonSeparatorAt(n),!1,t)}return this.semanticInfoChain.voidTypeSymbol},i.prototype.resolveVoidExpression=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.expression,!1,t)),this.semanticInfoChain.undefinedTypeSymbol},i.prototype.resolveLogicalOperation=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckLogicalOperation(e,t),this.semanticInfoChain.booleanTypeSymbol},i.prototype.typeCheckLogicalOperation=function(t,n){this.setTypeChecked(t,n);var r=this.resolveAST(t.left,!1,n).type,i=this.resolveAST(t.right,!1,n).type,o=new h;if(!this.sourceIsAssignableToTarget(r,i,t,n,o)&&!this.sourceIsAssignableToTarget(i,r,t,n,o)){var a=this.getEnclosingSymbolForAST(t);n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,[e.SyntaxFacts.getText(e.SyntaxFacts.getOperatorTokenFromBinaryExpression(t.kind())),r.toString(a),i.toString(a)]))}},i.prototype.resolveLogicalNotExpression=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.operand,!1,t)),this.semanticInfoChain.booleanTypeSymbol},i.prototype.resolveUnaryArithmeticOperation=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckUnaryArithmeticOperation(e,t),this.semanticInfoChain.numberTypeSymbol},i.prototype.resolvePostfixUnaryExpression=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckPostfixUnaryExpression(e,t),this.semanticInfoChain.numberTypeSymbol},i.prototype.isAnyOrNumberOrEnum=function(t){return this.isAnyOrEquivalent(t)||t===this.semanticInfoChain.numberTypeSymbol||e.PullHelpers.symbolIsEnum(t)},i.prototype.typeCheckUnaryArithmeticOperation=function(t,n){this.setTypeChecked(t,n);var r=t.kind(),i=this.resolveAST(t.operand,!1,n);if(164!=r&&165!=r&&166!=r){e.Debug.assert(168===r||169===r);var o=i.type;this.isAnyOrNumberOrEnum(o)||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.operand,e.DiagnosticCode.The_type_of_a_unary_arithmetic_operation_operand_must_be_of_type_any_number_or_an_enum_type)),this.isReference(t.operand,i)||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.operand,e.DiagnosticCode.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer))}},i.prototype.typeCheckPostfixUnaryExpression=function(t,n){this.setTypeChecked(t,n);var r=t.kind(),i=this.resolveAST(t.operand,!1,n);e.Debug.assert(210===r||211===r);var o=i.type;this.isAnyOrNumberOrEnum(o)||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.operand,e.DiagnosticCode.The_type_of_a_unary_arithmetic_operation_operand_must_be_of_type_any_number_or_an_enum_type)),this.isReference(t.operand,i)||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.operand,e.DiagnosticCode.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer))},i.prototype.resolveBinaryArithmeticExpression=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckBinaryArithmeticExpression(e,t),this.semanticInfoChain.numberTypeSymbol},i.prototype.typeCheckBinaryArithmeticExpression=function(t,n){this.setTypeChecked(t,n);var r=this.resolveAST(t.left,!1,n),i=r.type,o=this.resolveAST(t.right,!1,n).type;(i===this.semanticInfoChain.nullTypeSymbol||i===this.semanticInfoChain.undefinedTypeSymbol)&&(i=o),(o===this.semanticInfoChain.nullTypeSymbol||o===this.semanticInfoChain.undefinedTypeSymbol)&&(o=i);var a=this.isAnyOrNumberOrEnum(i),s=this.isAnyOrNumberOrEnum(o);if(s||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.right,e.DiagnosticCode.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type)),a||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.left,e.DiagnosticCode.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type)),a&&s)switch(t.kind()){case 183:case 184:case 185:case 176:case 177:case 178:case 179:case 182:case 180:case 181:this.isReference(t.left,r)||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.left,e.DiagnosticCode.Invalid_left_hand_side_of_assignment_expression)),this.checkAssignability(t.left,o,i,n)}},i.prototype.resolveTypeOfExpression=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.expression,!1,t)),this.semanticInfoChain.stringTypeSymbol},i.prototype.resolveThrowStatement=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.expression,!1,t)),this.semanticInfoChain.voidTypeSymbol},i.prototype.resolveDeleteExpression=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.expression,!1,t)),this.semanticInfoChain.booleanTypeSymbol},i.prototype.resolveInstanceOfExpression=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckInstanceOfExpression(e,t),this.semanticInfoChain.booleanTypeSymbol},i.prototype.typeCheckInstanceOfExpression=function(t,n){this.setTypeChecked(t,n);var r=this.resolveAST(t.left,!1,n).type,i=this.resolveAST(t.right,!1,n).type,o=(this.getEnclosingSymbolForAST(t),this.isAnyOrEquivalent(r)||r.isObject()||r.isTypeParameter()),a=this.isAnyOrEquivalent(i)||this.typeIsSubtypeOfFunction(i,t,n);o||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.left,e.DiagnosticCode.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter)),a||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.right,e.DiagnosticCode.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_a_subtype_of_the_Function_interface_type))},i.prototype.resolveCommaExpression=function(e,t){this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.left,!1,t));this.resolveAST(e.right,!1,t).type;return this.resolveAST(e.right,!1,t).type},i.prototype.resolveInExpression=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckInExpression(e,t),this.semanticInfoChain.booleanTypeSymbol},i.prototype.typeCheckInExpression=function(t,n){this.setTypeChecked(t,n);var r=this.resolveAST(t.left,!1,n).type,i=this.resolveAST(t.right,!1,n).type,o=this.isAnyOrEquivalent(r.type)||r.type===this.semanticInfoChain.stringTypeSymbol||r.type===this.semanticInfoChain.numberTypeSymbol,a=this.isAnyOrEquivalent(i)||i.isObject()||i.isTypeParameter();o||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.left,e.DiagnosticCode.The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number)),a||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.left,e.DiagnosticCode.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter))},i.prototype.resolveForStatement=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.variableDeclaration,!1,t),this.resolveAST(e.initializer,!1,t),this.resolveAST(e.condition,!1,t),this.resolveAST(e.incrementor,!1,t),this.resolveAST(e.statement,!1,t)),this.semanticInfoChain.voidTypeSymbol},i.prototype.resolveForInStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckForInStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckForInStatement=function(t,n){this.setTypeChecked(t,n);var r=this.resolveAST(t.expression,!1,n).type,i=t.variableDeclaration||t.left,o=this.resolveAST(i,!1,n);if(t.variableDeclaration){var a=t.variableDeclaration,s=a.declarators.nonSeparatorAt(0);s.typeAnnotation&&n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(i,e.DiagnosticCode.Variable_declarations_of_a_for_statement_cannot_use_a_type_annotation));var o=this.getSymbolForAST(s,n)}var l=o.type===this.semanticInfoChain.stringTypeSymbol||this.isAnyOrEquivalent(o.type),c=r&&(this.isAnyOrEquivalent(r)||!r.isPrimitive());l||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(i,e.DiagnosticCode.Variable_declarations_of_a_for_statement_must_be_of_types_string_or_any)),c||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.expression,e.DiagnosticCode.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter)),this.resolveAST(t.statement,!1,n)},i.prototype.resolveWhileStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckWhileStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckWhileStatement=function(e,t){this.setTypeChecked(e,t),this.resolveAST(e.condition,!1,t),this.resolveAST(e.statement,!1,t)},i.prototype.resolveDoStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckDoStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckDoStatement=function(e,t){this.setTypeChecked(e,t),this.resolveAST(e.condition,!1,t),this.resolveAST(e.statement,!1,t)},i.prototype.resolveIfStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckIfStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckIfStatement=function(e,t){this.setTypeChecked(e,t),this.resolveAST(e.condition,!1,t),this.resolveAST(e.statement,!1,t),this.resolveAST(e.elseClause,!1,t)},i.prototype.resolveElseClause=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckElseClause(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckElseClause=function(e,t){this.setTypeChecked(e,t),this.resolveAST(e.statement,!1,t)},i.prototype.resolveBlock=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.statements,!1,t)),this.semanticInfoChain.voidTypeSymbol},i.prototype.resolveVariableStatement=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.declaration,!1,t)),this.semanticInfoChain.voidTypeSymbol},i.prototype.resolveVariableDeclarationList=function(e,t){return this.canTypeCheckAST(e,t)&&(this.setTypeChecked(e,t),this.resolveAST(e.declarators,!1,t)),this.semanticInfoChain.voidTypeSymbol},i.prototype.resolveWithStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckWithStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckWithStatement=function(t,n){this.setTypeChecked(t,n);var r=t;n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(r.condition,e.DiagnosticCode.All_symbols_within_a_with_block_will_be_resolved_to_any))},i.prototype.resolveTryStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckTryStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckTryStatement=function(e,t){this.setTypeChecked(e,t);var n=e;this.resolveAST(n.block,!1,t),this.resolveAST(n.catchClause,!1,t),this.resolveAST(n.finallyClause,!1,t)},i.prototype.resolveCatchClause=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckCatchClause(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckCatchClause=function(e,t){this.setTypeChecked(e,t),this.resolveAST(e.block,!1,t);var n=this.semanticInfoChain.getDeclForAST(e);this.validateVariableDeclarationGroups(n,t)},i.prototype.resolveFinallyClause=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckFinallyClause(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckFinallyClause=function(e,t){this.setTypeChecked(e,t),this.resolveAST(e.block,!1,t)},i.prototype.getEnclosingFunctionDeclaration=function(e){for(var t=this.getEnclosingDeclForAST(e);t;){if(1032192&t.kind)return t;t=t.getParentDecl()}return null},i.prototype.resolveReturnExpression=function(t,n,r){n&&n.setFlag(4194304);var i=!1;if(n){var o=this.getASTForDecl(n),a=e.getType(o);if(a){var s=this.resolveTypeReference(a,r);s&&(i=!0,r.pushContextualType(s,r.inProvisionalResolution(),null))}else{var l=r.getContextualType();if(l&&l.isFunction()){var c=l.getDeclarations(),u=c&&c.length>0?c[0].getSignatureSymbol():l.getCallSignatures()[0],p=u.returnType;p&&(i=!0,r.pushContextualType(p,r.inProvisionalResolution(),null))}}}var h=this.resolveAST(t,i,r).type;return i&&r.popContextualType(),h},i.prototype.typeCheckReturnExpression=function(t,n,r,i){if(r&&32768===r.kind){var o=r.getParentDecl();if(o){var a=o.getSymbol();this.resolveDeclaredSymbol(a,i);var s=new h,l=this.sourceIsAssignableToTarget(n,a.type,t,i,s);l||i.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class))}}if(r&&524288===r.kind&&i.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Setters_cannot_return_a_value)),r){var c=this.getASTForDecl(r),u=e.getType(c);if(u||262144===r.kind){var p=r.getSignatureSymbol(),d=p.returnType;if(n&&d){var s=new h,m=null;n.isTypeParameter()&&(m=n.getConstraint(),m&&(n=m)),d.isTypeParameter()&&(m=d.getConstraint(),m&&(d=m)),this.resolveDeclaredSymbol(n,i),this.resolveDeclaredSymbol(d,i);var l=this.sourceIsAssignableToTarget(n,d,t,i,s);if(!l){var y=this.getEnclosingSymbolForAST(t);i.postDiagnostic(s.message?this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Cannot_convert_0_to_1_NL_2,[n.toString(y),d.toString(y),s.message]):this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Cannot_convert_0_to_1,[n.toString(y),d.toString(y)]))}}}}},i.prototype.resolveReturnStatement=function(e,t){var n=this.getEnclosingFunctionDeclaration(e);n&&n.setFlag(4194304);var r=this.getSymbolForAST(e,t),i=this.canTypeCheckAST(e,t);if(!r||i){var o=e.expression,a=null===o?this.semanticInfoChain.voidTypeSymbol:this.resolveReturnExpression(o,n,t);r||(r=a,this.setSymbolForAST(e,a,t)),o&&i&&(this.setTypeChecked(o,t),this.typeCheckReturnExpression(o,a,n,t))}return r},i.prototype.resolveSwitchStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckSwitchStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckSwitchStatement=function(t,n){this.setTypeChecked(t,n);for(var r=this.resolveAST(t.expression,!1,n).type,i=0,o=t.switchClauses.childCount();o>i;i++){var a=t.switchClauses.childAt(i);if(233===a.kind()){var s=a,l=this.resolveAST(s.expression,!1,n).type;this.resolveAST(s.statements,!1,n);var c=new h;if(!this.sourceIsAssignableToTarget(r,l,s.expression,n,c)&&!this.sourceIsAssignableToTarget(l,r,s.expression,n,c)){var u=this.getEnclosingSymbolForAST(s.expression);n.postDiagnostic(c.message?this.semanticInfoChain.diagnosticFromAST(s.expression,e.DiagnosticCode.Cannot_convert_0_to_1_NL_2,[l.toString(u),r.toString(u),c.message]):this.semanticInfoChain.diagnosticFromAST(s.expression,e.DiagnosticCode.Cannot_convert_0_to_1,[l.toString(u),r.toString(u)]))}}else{var p=a;this.resolveAST(p.statements,!1,n)}}},i.prototype.resolveLabeledStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckLabeledStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckLabeledStatement=function(t,n){this.setTypeChecked(t,n);var r=t.identifier.valueText(),i=this.getEnclosingLabels(t,!0,!1);e.ArrayUtilities.contains(i,r)&&n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t.identifier,e.DiagnosticCode.Duplicate_identifier_0,[r])),this.resolveAST(t.statement,!1,n)},i.prototype.labelIsOnContinuableConstruct=function(e){switch(e.kind()){case 160:return this.labelIsOnContinuableConstruct(e.statement);case 158:case 154:case 155:case 161:return!0;default:return!1}},i.prototype.resolveContinueStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckContinueStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.isIterationStatement=function(e){switch(e.kind()){case 154:case 155:case 158:case 161:return!0}return!1},i.prototype.isAnyFunctionExpressionOrDeclaration=function(e){switch(e.kind()){case 219:case 218:case 222:case 129:case 135:case 241:case 137:case 139:case 140:return!0}return!1},i.prototype.inSwitchStatement=function(e){for(;e;){if(151===e.kind())return!0;if(this.isAnyFunctionExpressionOrDeclaration(e))return!1;e=e.parent}return!1},i.prototype.inIterationStatement=function(e){for(;e;){if(this.isIterationStatement(e))return!0;if(this.isAnyFunctionExpressionOrDeclaration(e))return!1;e=e.parent}return!1},i.prototype.getEnclosingLabels=function(e,t,n){var r=[];for(e=e.parent;e;){if(160===e.kind()){var i=e;t?r.push(i.identifier.valueText()):this.labelIsOnContinuableConstruct(i.statement)&&r.push(i.identifier.valueText())}if(!n&&this.isAnyFunctionExpressionOrDeclaration(e))break;e=e.parent}return r},i.prototype.typeCheckContinueStatement=function(t,n){if(this.setTypeChecked(t,n),this.inIterationStatement(t)){if(t.identifier){var r=this.getEnclosingLabels(t,!1,!1);if(!e.ArrayUtilities.contains(r,t.identifier.valueText())){var r=this.getEnclosingLabels(t,!1,!0);n.postDiagnostic(e.ArrayUtilities.contains(r,t.identifier.valueText())?this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Jump_target_cannot_cross_function_boundary):this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Jump_target_not_found))}}}else n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.continue_statement_can_only_be_used_within_an_enclosing_iteration_statement))},i.prototype.resolveBreakStatement=function(e,t){return this.canTypeCheckAST(e,t)&&this.typeCheckBreakStatement(e,t),this.semanticInfoChain.voidTypeSymbol},i.prototype.typeCheckBreakStatement=function(t,n){if(this.setTypeChecked(t,n),t.identifier){var r=this.getEnclosingLabels(t,!0,!1);if(!e.ArrayUtilities.contains(r,t.identifier.valueText())){var r=this.getEnclosingLabels(t,!0,!0);n.postDiagnostic(e.ArrayUtilities.contains(r,t.identifier.valueText())?this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Jump_target_cannot_cross_function_boundary):this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Jump_target_not_found))}}else this.inIterationStatement(t)||this.inSwitchStatement(t)||n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement))},i.prototype.resolveAST=function(e,t,n){if(e){var i=this.getSymbolForAST(e,n); if(i&&i.isResolved)return this.typeCheckAST(e,t,n),i;var o=e.kind();switch(o){case 124:case 126:case 122:case 127:case 125:case 123:return this.resolveTypeReference(e,n);case 1:return this.resolveList(e,n);case 2:return this.resolveSeparatedList(e,n);case 120:return this.resolveSourceUnit(e,n);case 132:return this.resolveEnumDeclaration(e,n);case 130:return this.resolveModuleDeclaration(e,n);case 128:return this.resolveInterfaceDeclaration(e,n);case 131:return this.resolveClassDeclaration(e,n);case 224:return this.resolveVariableDeclarationList(e,n);case 136:return this.resolveMemberVariableDeclaration(e,n);case 225:return this.resolveVariableDeclarator(e,n);case 141:return this.resolvePropertySignature(e,n);case 227:return this.resolveParameterList(e,n);case 242:return this.resolveParameter(e,n);case 243:return this.resolveEnumElement(e,n);case 232:return this.resolveEqualsValueClause(e,t,n);case 238:return this.resolveTypeParameterDeclaration(e,n);case 239:return this.resolveConstraint(e,n);case 133:return this.resolveImportDeclaration(e,n);case 215:return this.resolveObjectLiteralExpression(e,t,n);case 240:return this.resolveSimplePropertyAssignment(e,t,n);case 241:return this.resolveFunctionPropertyAssignment(e,t,n);case 11:return r(e)?this.resolveTypeNameExpression(e,n):this.resolveNameExpression(e,n);case 212:return this.resolveMemberAccessExpression(e,n);case 121:return this.resolveQualifiedName(e,n);case 137:return this.resolveConstructorDeclaration(e,n);case 139:case 140:return this.resolveAccessorDeclaration(e,n);case 138:return this.resolveIndexMemberDeclaration(e,n);case 144:return this.resolveIndexSignature(e,n);case 135:return this.resolveMemberFunctionDeclaration(e,n);case 142:return this.resolveCallSignature(e,n);case 143:return this.resolveConstructSignature(e,n);case 145:return this.resolveMethodSignature(e,n);case 129:return this.resolveAnyFunctionDeclaration(e,n);case 222:return this.resolveFunctionExpression(e,t,n);case 219:return this.resolveSimpleArrowFunctionExpression(e,t,n);case 218:return this.resolveParenthesizedArrowFunctionExpression(e,t,n);case 214:return this.resolveArrayLiteralExpression(e,t,n);case 35:return this.resolveThisExpression(e,n);case 50:return this.resolveSuperExpression(e,n);case 213:return this.resolveInvocationExpression(e,n);case 216:return this.resolveObjectCreationExpression(e,n);case 220:return this.resolveCastExpression(e,n);case 244:return this.resolveTypeAnnotation(e,n);case 134:return this.resolveExportAssignmentStatement(e,n);case 13:return this.semanticInfoChain.numberTypeSymbol;case 14:return this.semanticInfoChain.stringTypeSymbol;case 32:return this.semanticInfoChain.nullTypeSymbol;case 37:case 24:return this.semanticInfoChain.booleanTypeSymbol;case 172:return this.resolveVoidExpression(e,n);case 174:return this.resolveAssignmentExpression(e,n);case 167:return this.resolveLogicalNotExpression(e,n);case 193:case 192:case 194:case 195:case 196:case 198:case 199:case 197:return this.resolveLogicalOperation(e,n);case 208:case 175:return this.resolveBinaryAdditionOperation(e,n);case 164:case 165:case 166:case 168:case 169:return this.resolveUnaryArithmeticOperation(e,n);case 210:case 211:return this.resolvePostfixUnaryExpression(e,n);case 209:case 205:case 206:case 207:case 189:case 191:case 202:case 203:case 204:case 190:case 181:case 183:case 184:case 185:case 176:case 177:case 178:case 179:case 182:case 180:return this.resolveBinaryArithmeticExpression(e,n);case 221:return this.resolveElementAccessExpression(e,n);case 187:return this.resolveLogicalOrExpression(e,t,n);case 188:return this.resolveLogicalAndExpression(e,n);case 171:return this.resolveTypeOfExpression(e,n);case 157:return this.resolveThrowStatement(e,n);case 170:return this.resolveDeleteExpression(e,n);case 186:return this.resolveConditionalExpression(e,t,n);case 12:return this.resolveRegularExpressionLiteral();case 217:return this.resolveParenthesizedExpression(e,n);case 149:return this.resolveExpressionStatement(e,n);case 200:return this.resolveInstanceOfExpression(e,n);case 173:return this.resolveCommaExpression(e,n);case 201:return this.resolveInExpression(e,n);case 154:return this.resolveForStatement(e,n);case 155:return this.resolveForInStatement(e,n);case 158:return this.resolveWhileStatement(e,n);case 161:return this.resolveDoStatement(e,n);case 147:return this.resolveIfStatement(e,n);case 235:return this.resolveElseClause(e,n);case 146:return this.resolveBlock(e,n);case 148:return this.resolveVariableStatement(e,n);case 163:return this.resolveWithStatement(e,n);case 159:return this.resolveTryStatement(e,n);case 236:return this.resolveCatchClause(e,n);case 237:return this.resolveFinallyClause(e,n);case 150:return this.resolveReturnStatement(e,n);case 151:return this.resolveSwitchStatement(e,n);case 153:return this.resolveContinueStatement(e,n);case 152:return this.resolveBreakStatement(e,n);case 160:return this.resolveLabeledStatement(e,n)}return this.semanticInfoChain.anyTypeSymbol}},i.prototype.typeCheckAST=function(t,n,i){if(this.canTypeCheckAST(t,i)){var o=t.kind();switch(o){case 120:return void this.typeCheckSourceUnit(t,i);case 132:return void this.typeCheckEnumDeclaration(t,i);case 130:return void this.typeCheckModuleDeclaration(t,i);case 128:return void this.typeCheckInterfaceDeclaration(t,i);case 131:return void this.typeCheckClassDeclaration(t,i);case 243:return void this.typeCheckEnumElement(t,i);case 136:return void this.typeCheckMemberVariableDeclaration(t,i);case 225:return void this.typeCheckVariableDeclarator(t,i);case 141:return void this.typeCheckPropertySignature(t,i);case 242:return void this.typeCheckParameter(t,i);case 133:return void this.typeCheckImportDeclaration(t,i);case 215:return void this.resolveObjectLiteralExpression(t,n,i);case 241:return void this.typeCheckFunctionPropertyAssignment(t,n,i);case 11:return void(r(t)?this.resolveTypeNameExpression(t,i):this.resolveNameExpression(t,i));case 212:return void this.resolveMemberAccessExpression(t,i);case 121:return void this.resolveQualifiedName(t,i);case 222:this.typeCheckFunctionExpression(t,i);break;case 144:this.typeCheckIndexSignature(t,i);break;case 142:this.typeCheckCallSignature(t,i);break;case 143:this.typeCheckConstructSignature(t,i);break;case 129:var a=t;return void this.typeCheckFunctionDeclaration(a,e.hasModifier(a.modifiers,16),a.identifier,a.callSignature.typeParameterList,a.callSignature.parameterList,e.getType(a),a.block,i);case 219:return void this.typeCheckSimpleArrowFunctionExpression(t,i);case 218:return void this.typeCheckParenthesizedArrowFunctionExpression(t,i);case 214:return void this.resolveArrayLiteralExpression(t,n,i);case 213:return void this.typeCheckInvocationExpression(t,i);case 216:return void this.typeCheckObjectCreationExpression(t,i);case 150:return void this.resolveReturnStatement(t,i);default:e.Debug.assert(!1,"Failure nodeType: "+e.SyntaxKind[t.kind()]+". Implement typeCheck when symbol is set for the ast as part of resolution.")}}},i.prototype.processPostTypeCheckWorkItems=function(e){for(;this.postTypeCheckWorkitems.length;){var t=this.postTypeCheckWorkitems.pop();this.postTypeCheck(t,e)}},i.prototype.postTypeCheck=function(t,n){var r=t.kind();switch(r){case 242:case 225:return void this.postTypeCheckVariableDeclaratorOrParameter(t,n);case 131:return void this.postTypeCheckClassDeclaration(t,n);case 129:return void this.postTypeCheckFunctionDeclaration(t,n);case 130:return void this.postTypeCheckModuleDeclaration(t,n);case 132:return void this.postTypeCheckEnumDeclaration(t,n);case 133:return void this.postTypeCheckImportDeclaration(t,n);case 11:return void this.postTypeCheckNameExpression(t,n);default:e.Debug.assert(!1,"Implement postTypeCheck clause to handle the postTypeCheck work, nodeType: "+e.SyntaxKind[t.kind()])}},i.prototype.resolveRegularExpressionLiteral=function(){return this.cachedRegExpInterfaceType()?this.cachedRegExpInterfaceType():this.semanticInfoChain.anyTypeSymbol},i.prototype.postTypeCheckNameExpression=function(e,t){this.checkThisCaptureVariableCollides(e,!1,t)},i.prototype.typeCheckNameExpression=function(e,t){this.setTypeChecked(e,t),this.checkNameForCompilerGeneratedDeclarationCollision(e,!1,e,t)},i.prototype.resolveNameExpression=function(e,t){var n=this.getSymbolForAST(e,t),r=null!=n;return(!r||this.canTypeCheckAST(e,t))&&(this.canTypeCheckAST(e,t)&&this.typeCheckNameExpression(e,t),n=this.computeNameExpression(e,t,!0)),this.resolveDeclaredSymbol(n,t),n&&(n.type!=this.semanticInfoChain.anyTypeSymbol||n.anyDeclHasFlag(16777217))&&this.setSymbolForAST(e,n,t),n},i.prototype.isSomeFunctionScope=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t];if(1032192&n.kind)return!0}return!1},i.prototype.computeNameExpression=function(t,n,r){var i=t.valueText();if(0===i.length)return this.semanticInfoChain.anyTypeSymbol;var o=null,a=this.getEnclosingDeclForAST(t);e.isDeclarationASTOrDeclarationNameAST(t)&&(o=this.semanticInfoChain.getDeclForAST(t.parent).getSymbol());var s=a.getParentPath();if(!o)var o=this.getSymbolFromDeclPath(i,s,68147712);if(!o&&"arguments"===i&&this.isSomeFunctionScope(s)&&(o=this.cachedFunctionArgumentsSymbol(),this.resolveDeclaredSymbol(this.cachedIArgumentsInterfaceType(),n)),o||(o=this.getSymbolFromDeclPath(i,s,128),o&&!o.isAlias()&&(o=null)),!o)return r?(n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Could_not_find_symbol_0,[t.text()])),this.getNewErrorTypeSymbol(i)):null;var l=o.getDeclarations()[0],c=l.getParentDecl();if(c&&1032192&c.kind&&33554432&c.flags){var u=this.semanticInfoChain.getASTForDecl(c),p=this.getCurrentParameterIndexForFunction(t,u),h=e.getParameterList(u);if(p>=0){var d=!1;if(h)for(var m=0;p>=m;m++){var y=h.parameters.nonSeparatorAt(m);y&&y.identifier.valueText()===i&&(d=!0)}if(!d)return n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it,[h.parameters.nonSeparatorAt(p).identifier.text(),t.text()])),this.getNewErrorTypeSymbol(i)}}var f=null;if(o.isType()&&o.isAlias()){f=o,this.inTypeQuery(t)||f.setIsUsedAsValue(!0),this.resolveDeclaredSymbol(o,n),this.resolveDeclaredSymbol(f.assignedValue(),n),this.resolveDeclaredSymbol(f.assignedContainer(),n);var g=o.getExportAssignedValueSymbol();g?o=g:f=null}return f&&this.semanticInfoChain.setAliasSymbolForAST(t,f),o},i.prototype.getCurrentParameterIndexForFunction=function(t,n){var r=e.getParameterList(n);if(r)for(;t&&t.parent;){if(t.parent.parent===r)return r.parameters.nonSeparatorIndexOf(t);t=t.parent}return-1},i.prototype.resolveMemberAccessExpression=function(e,t){return this.resolveDottedNameExpression(e,e.expression,e.name,t)},i.prototype.resolveDottedNameExpression=function(e,t,n,r){var i=this.getSymbolForAST(e,r),o=null!=i;if(!o||this.canTypeCheckAST(e,r)){var a=this.canTypeCheckAST(e,r);a&&this.setTypeChecked(e,r),i=this.computeDottedNameExpression(t,n,r,a)}return this.resolveDeclaredSymbol(i,r),i&&(i.type!=this.semanticInfoChain.anyTypeSymbol||i.anyDeclHasFlag(16777217))&&(this.setSymbolForAST(e,i,r),this.setSymbolForAST(n,i,r)),i},i.prototype.computeDottedNameExpression=function(t,n,r,i){var o=n.valueText();if(0===o.length)return this.semanticInfoChain.anyTypeSymbol;var a=this.resolveAST(t,!1,r),s=a.type;if(a.isAlias()&&(this.inTypeQuery(t)||a.setIsUsedAsValue(!0),s=a.getExportAssignedTypeSymbol()),this.isAnyOrEquivalent(s))return s;if(s.isAlias()&&(s=s.getExportAssignedTypeSymbol()),!s)return r.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(n,e.DiagnosticCode.Could_not_find_enclosing_symbol_for_dotted_name_0,[n.text()])),this.getNewErrorTypeSymbol();if(!s.isResolved){var l=this.resolveDeclaredSymbol(s,r);l!=s&&(a.isType()||r.setTypeInContext(a,l),s=l)}if(s.isContainer()&&!s.isAlias()&&!s.isEnum()){var c=s.getInstanceSymbol();c&&(s=c.type)}s.isTypeParameter()&&(s=this.substituteUpperBoundForType(s)),(s===this.semanticInfoChain.numberTypeSymbol||s.isEnum())&&this.cachedNumberInterfaceType()?s=this.cachedNumberInterfaceType():s===this.semanticInfoChain.stringTypeSymbol&&this.cachedStringInterfaceType()?s=this.cachedStringInterfaceType():s===this.semanticInfoChain.booleanTypeSymbol&&this.cachedBooleanInterfaceType()&&(s=this.cachedBooleanInterfaceType());var u=this.getMemberSymbol(o,68147712,s);if(!u){if((s.getCallSignatures().length||s.getConstructSignatures().length)&&this.cachedFunctionInterfaceType())u=this.getMemberSymbol(o,68147712,this.cachedFunctionInterfaceType());else if(32===s.kind){var p=s,h=p.getInstanceSymbol();if(h){var d=h.type;u=this.getMemberSymbol(o,68147712,d)}}else{var m=s.getAssociatedContainerType();m&&!m.isClass()&&(u=this.getMemberSymbol(o,68147712,m))}if(u||s.isPrimitive()||!this.cachedObjectInterfaceType()||(u=this.getMemberSymbol(o,68147712,this.cachedObjectInterfaceType())),!u){var y=this.getEnclosingDeclForAST(t);return r.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(n,e.DiagnosticCode.The_property_0_does_not_exist_on_value_of_type_1,[n.text(),s.toString(y?y.getSymbol():null)])),this.getNewErrorTypeSymbol(o)}}return i&&(this.checkForSuperMemberAccess(t,n,u,r)||this.checkForPrivateMemberAccess(n,s,u,r)),u},i.prototype.resolveTypeNameExpression=function(e,t){var n=this.getSymbolForAST(e,t);return n&&n.isType()&&!this.canTypeCheckAST(e,t)||(this.canTypeCheckAST(e,t)&&this.setTypeChecked(e,t),n=this.computeTypeNameExpression(e,t),this.setSymbolForAST(e,n,t)),this.resolveDeclaredSymbol(n,t),n},i.prototype.computeTypeNameExpression=function(t,n){var r=t.valueText();if(0===r.length)return this.semanticInfoChain.anyTypeSymbol;var i=this.getEnclosingDeclForAST(t),o=i.getParentPath(),a=this.isLeftSideOfQualifiedName(t),s=a?164:58728539,l=a?58728539:164,c=this.getSymbolFromDeclPath(r,o,s);if(c||(c=this.getSymbolFromDeclPath(r,o,l)),!c)return n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Could_not_find_symbol_0,[t.text()])),this.getNewErrorTypeSymbol(r);var u=null;if(c.isAlias()){u=c,this.resolveDeclaredSymbol(c,n);var p=u.getExportAssignedTypeSymbol();this.resolveDeclaredSymbol(p,n)}if(c.isTypeParameter()&&i&&1032192&i.kind&&16&i.flags){var h=c.getDeclarations()[0].getParentDecl();if(8==h.kind)return n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Static_methods_cannot_reference_class_type_parameters)),this.getNewErrorTypeSymbol()}return c.isGeneric()||!c.isClass()&&!c.isInterface()||(c=e.PullTypeReferenceSymbol.createTypeReference(c)),c},i.prototype.isLeftSideOfQualifiedName=function(e){return e&&e.parent&&121===e.parent.kind()&&e.parent.left===e},i.prototype.resolveGenericTypeReference=function(t,n){var r=this.resolveAST(t.name,!1,n).type;if(r.isError())return r;r.inResolution||r.isResolved||this.resolveDeclaredSymbol(r,n),r.isAlias()&&(r=r.getExportAssignedTypeSymbol());var i=[];if(t.typeArgumentList&&t.typeArgumentList.typeArguments.nonSeparatorCount())for(var o=0;o0)return!1;if(r)return!1;if(n)for(var o=0,a=n.length;a>o;o++)if(n.typeAt(o))return!1;var s=i.getContextualType();if(s){this.resolveDeclaredSymbol(s,i);var l=s.getCallSignatures(),c=l&&1==l.length;if(!c)return!1;var u=l[0].typeParameters&&l[0].typeParameters.length>0;return!u}return!1},i.prototype.resolveAnyFunctionExpression=function(t,n,r,i,o,a,s,l){var c=null,u=this.semanticInfoChain.getDeclForAST(t);if(e.Debug.assert(u),u&&u.hasSymbol()&&(c=u.getSymbol(),c.isResolved||c.inResolution))return c;c=u.getSymbol(),e.Debug.assert(c);var p=c.type,h=p.getCallSignatures()[0];if(c.startResolving(),n)for(var d=0;dd;d++){var v=d===g-1&&r.lastParameterIsRest(),S=null,T=null;f>d?S=y[d]:f&&y[f-1].isVarArg&&(S=y[f-1]),S&&(S.isVarArg===v?T=S.type:S.isVarArg&&(T=S.type.getElementType())),this.resolveFunctionExpressionParameter(r.astAt(d),r.identifierAt(d),r.typeAt(d),r.initializerAt(d),T,u,l)}}if(i)h.returnType=this.resolveTypeReference(i,l);else if(m){var b=m.returnType;if(b)l.pushContextualType(b,l.inProvisionalResolution(),null),this.resolveFunctionBodyReturnTypes(t,o,a,h,!0,u,l),l.popContextualType();else if(h.returnType=this.semanticInfoChain.anyTypeSymbol,this.compilationSettings.noImplicitAny()){var _=u.getFunctionExpressionName();l.postDiagnostic(""!=_?this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode._0_which_lacks_return_type_annotation_implicitly_has_an_any_return_type,[_]):this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_any_return_type))}}else this.resolveFunctionBodyReturnTypes(t,o,a,h,!1,u,l);return l.setTypeInContext(c,p),c.setResolved(),this.canTypeCheckAST(t,l)&&this.typeCheckAnyFunctionExpression(t,n,i,o,a,l),c},i.prototype.typeCheckSimpleArrowFunctionExpression=function(e,t){return this.typeCheckAnyFunctionExpression(e,null,null,e.block,e.expression,t)},i.prototype.typeCheckParenthesizedArrowFunctionExpression=function(t,n){return this.typeCheckAnyFunctionExpression(t,t.callSignature.typeParameterList,e.getType(t),t.block,t.expression,n)},i.prototype.typeCheckAnyFunctionExpression=function(t,n,r,i,o,a){var s=this;this.setTypeChecked(t,a);var l=this.semanticInfoChain.getDeclForAST(t),c=l.getSymbol(),u=c.type,p=u.getCallSignatures()[0],h=p.returnType;if(n)for(var d=0;d0&&157===i.statements.childAt(0).kind())){var g=l.getDisplayName();g=g?"'"+g+"'":"expression",a.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(r,e.DiagnosticCode.Function_0_declared_a_non_void_return_type_but_has_no_return_expression,[g]))}}this.validateVariableDeclarationGroups(l,a),this.typeCheckCallBacks.push(function(e){s.typeCheckFunctionOverloads(t,e)})},i.prototype.resolveThisExpression=function(e,t){var n=this.getEnclosingDeclForAST(e),r=this.getContextualClassSymbolForEnclosingDecl(e,n)||this.semanticInfoChain.anyTypeSymbol;return this.canTypeCheckAST(e,t)&&this.typeCheckThisExpression(e,t,n),r},i.prototype.inTypeArgumentList=function(e){for(var t=null,n=e;n;){switch(n.kind()){case 126:var r=n;if(r.typeArgumentList===t)return!0;break;case 226:var i=n;return i.typeArgumentList===t}t=n,n=n.parent}return!1},i.prototype.inClassExtendsHeritageClause=function(e){for(;e;){switch(e.kind()){case 230:var t=e;return 131===t.parent.parent.kind();case 137:case 131:case 130:return!1}e=e.parent}return!1},i.prototype.inTypeQuery=function(e){for(;e;){switch(e.kind()){case 127:return!0;case 129:case 213:case 137:case 131:case 130:return!1}e=e.parent}return!1},i.prototype.inArgumentListOfSuperInvocation=function(e){for(var t=null,n=e;n;){switch(n.kind()){case 213:var r=n;if(t===r.argumentList&&50===r.expression.kind())return!0;break;case 137:case 131:case 130:return!1}t=n,n=n.parent}return!1},i.prototype.inConstructorParameterList=function(e){for(var t=null,n=e;n;){switch(n.kind()){case 137:var r=n;return t===r.parameterList;case 131:case 130:return!1}t=n,n=n.parent}return!1},i.prototype.isFunctionOrNonArrowFunctionExpression=function(t){return 16384===t.kind?!0:131072!==t.kind||e.hasFlag(t.flags,8192)?!1:!0},i.prototype.typeCheckThisExpression=function(t,n,r){if(this.checkForThisCaptureInArrowFunction(t),this.inConstructorParameterList(t))return void n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.this_cannot_be_referenced_in_constructor_arguments));for(var i=r;null!==i;i=i.getParentDecl()){if(this.isFunctionOrNonArrowFunctionExpression(i))return;if(4===i.kind||32===i.kind)return null===i.getParentDecl()?void 0:void n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.this_cannot_be_referenced_within_module_bodies));if(32768===i.kind)return void(this.inArgumentListOfSuperInvocation(t)&&this.superCallMustBeFirstStatementInConstructor(i)&&n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.this_cannot_be_referenced_in_current_location)));if(8===i.kind)return void(this.inStaticMemberVariableDeclaration(t)&&n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.this_cannot_be_referenced_in_static_initializers_in_a_class_body)))}},i.prototype.getContextualClassSymbolForEnclosingDecl=function(t,n){var r=n.getParentPath();if(r.length)for(var i=!1,o=r.length-1;o>=0;o--){var a=r[o],s=a.kind,l=a.flags;if(16&l)i=!0;else{if(131072===s&&!e.hasFlag(l,8192))return null;if(16384===s)return null;if(8===s){if(this.inStaticMemberVariableDeclaration(t))return this.getNewErrorTypeSymbol();var c=a.getSymbol();if(i){var u=c.getConstructorMethod();return u.type}return c}}}return null},i.prototype.inStaticMemberVariableDeclaration=function(t){for(;t;){if(136===t.kind()&&e.hasModifier(t.modifiers,16))return!0;t=t.parent}return!1},i.prototype.resolveSuperExpression=function(e,t){var n=this.getEnclosingDeclForAST(e),r=this.semanticInfoChain.anyTypeSymbol,i=this.getContextualClassSymbolForEnclosingDecl(e,n);if(i){this.resolveDeclaredSymbol(i,t);var o=i.getExtendedTypes();o.length&&(r=o[0])}return this.canTypeCheckAST(e,t)&&this.typeCheckSuperExpression(e,t,n),r},i.prototype.typeCheckSuperExpression=function(t,n,r){this.setTypeChecked(t,n),this.checkForThisCaptureInArrowFunction(t);var i=213===t.parent.kind(),o=212===t.parent.kind();if(e.Debug.assert(i||o),o){for(var a=r;null!==a&&!this.isFunctionOrNonArrowFunctionExpression(a);a=a.getParentDecl())if(8===a.kind){if(!this.enclosingClassIsDerived(a))return void n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.super_cannot_be_referenced_in_non_derived_classes));if(this.inConstructorParameterList(t))return void n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.super_cannot_be_referenced_in_constructor_arguments));if(this.inStaticMemberVariableDeclaration(t))break;return}return void n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class))}for(var a=r;null!==a&&!this.isFunctionOrNonArrowFunctionExpression(a);a=a.getParentDecl())if(32768===a.kind){var s=a.getParentDecl();if(!this.enclosingClassIsDerived(s))return void n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.super_cannot_be_referenced_in_non_derived_classes));if(this.inConstructorParameterList(t))return void n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.super_cannot_be_referenced_in_constructor_arguments));return}n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Super_calls_are_not_permitted_outside_constructors_or_in_local_functions_inside_constructors))},i.prototype.resolveSimplePropertyAssignment=function(e,t,n){return this.resolveAST(e.expression,t,n)},i.prototype.resolveFunctionPropertyAssignment=function(t,n,r){return this.resolveAnyFunctionExpression(t,t.callSignature.typeParameterList,e.Parameters.fromParameterList(t.callSignature.parameterList),e.getType(t),t.block,null,n,r)},i.prototype.typeCheckFunctionPropertyAssignment=function(t,n,r){this.typeCheckAnyFunctionExpression(t,t.callSignature.typeParameterList,e.getType(t),t.block,null,r)},i.prototype.resolveObjectLiteralExpression=function(e,t,n,r){var i=this.getSymbolForAST(e,n);return(!i||r||this.canTypeCheckAST(e,n))&&(this.canTypeCheckAST(e,n)&&this.setTypeChecked(e,n),i=this.computeObjectLiteralExpression(e,t,n,r),this.setSymbolForAST(e,i,n)),i},i.prototype.bindObjectLiteralMembers=function(t,r,i,o,a){for(var s,l=[],c=0,u=i.nonSeparatorCount();u>c;c++){var p=i.nonSeparatorAt(c),h=this.getPropertyAssignmentName(p),d=n(h),m=139===p.kind()||140===p.kind(),y=this.semanticInfoChain.getDeclForAST(p);e.Debug.assert(y),240==p.kind()?o?s=y.getSymbol():(s=new e.PullSymbol(d.memberName,4096),s.addDeclaration(y),y.setSymbol(s)):241===p.kind()?s=y.getSymbol():(e.Debug.assert(m),s=y.getSymbol()),o||m||(r.findMember(s.name,!0)&&a.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(p,e.DiagnosticCode.Duplicate_identifier_0,[d.actualText])),r.addMember(s)),l.push(s)}return l},i.prototype.resolveObjectLiteralMembers=function(t,n,r,i,o,a,s,l,c,u,p,h){for(var d=0,m=i.nonSeparatorCount();m>d;d++){var y=i.nonSeparatorAt(d),f=!1,g=null,v=this.getPropertyAssignmentName(y),S=c[d];if(r&&(g=this.getMemberSymbol(S.name,68147712,r),g||(a&&e.PullHelpers.isNameNumeric(S.name)?g=a:o&&(g=o)),g)){this.resolveDeclaredSymbol(g,p);var T=4194304===g.kind?g.returnType:g.type;p.pushContextualType(T,p.inProvisionalResolution(),null),f=!0,h&&(h.membersContextTypeSymbols[d]=T)}var b=this.resolveAST(y,null!=T,p),_=this.widenType(b.type,y,p);_.type&&(_.type.isGeneric()&&n.setHasGenericMember(),o&&s.push(_.type),a&&e.PullHelpers.isNameNumeric(S.name)&&l.push(_.type)),f&&p.popContextualType();var E=140===y.kind()||139===y.kind();u||(E?this.setSymbolForAST(v,_,p):(p.setTypeInContext(S,_.type),S.setResolved(),this.setSymbolForAST(v,S,p)))}},i.prototype.computeObjectLiteralExpression=function(t,n,r,i){var o=this.semanticInfoChain.getDeclForAST(t);e.Debug.assert(o);var a=this.getSymbolForAST(t,r),s=!!a;a||(a=new e.PullTypeSymbol("",16),a.addDeclaration(o),this.setSymbolForAST(t,a,r),o.setSymbol(a));var l=t.propertyAssignments,c=null;n&&(c=r.getContextualType(),this.resolveDeclaredSymbol(c,r));var u=null,p=null,h=null,d=null;if(c){var m=this.getBothKindsOfIndexSignatures(c,r);u=m.stringSignature,p=m.numericSignature,u&&(h=[u.returnType]),p&&(d=[p.returnType])}if(l){i&&(i.membersContextTypeSymbols=[]);var y=this.bindObjectLiteralMembers(o,a,l,s,r);this.resolveObjectLiteralMembers(o,a,c,l,u,p,h,d,y,s,r,i),s||(this.stampObjectLiteralWithIndexSignature(a,h,u,r),this.stampObjectLiteralWithIndexSignature(a,d,p,r))}return a.setResolved(),a},i.prototype.getPropertyAssignmentName=function(t){return 240===t.kind()?t.propertyName:241===t.kind()?t.propertyName:139===t.kind()?t.propertyName:140===t.kind()?t.propertyName:void e.Debug.assert(!1)},i.prototype.stampObjectLiteralWithIndexSignature=function(e,t,n,r){if(n){var i={getLength:function(){return t.length},getTypeAtIndex:function(e){return t[e]}},o=e.getDeclarations()[0],a=this.widenType(this.findBestCommonType(i,r));a==n.returnType?e.addIndexSignature(n):this.semanticInfoChain.addSyntheticIndexSignature(o,e,this.getASTForDecl(o),n.parameters[0].name,n.parameters[0].type,a)}},i.prototype.resolveArrayLiteralExpression=function(e,t,n){var r=this.getSymbolForAST(e,n);return(!r||this.canTypeCheckAST(e,n))&&(this.canTypeCheckAST(e,n)&&this.setTypeChecked(e,n),r=this.computeArrayLiteralExpressionSymbol(e,t,n),this.setSymbolForAST(e,r,n)),r},i.prototype.computeArrayLiteralExpressionSymbol=function(e,t,n){var r=e.expressions,i=null,o=[],a=new h,s=null;if(a.onlyCaptureFirstError=!0,t){var l=n.getContextualType();if(this.resolveDeclaredSymbol(l,n),l){var c=this.getBothKindsOfIndexSignatures(l,n);c.numericSignature&&(s=c.numericSignature.returnType)}}if(r){s&&n.pushContextualType(s,n.inProvisionalResolution(),null);for(var u=0,p=r.nonSeparatorCount();p>u;u++)o.push(this.resolveAST(r.nonSeparatorAt(u),null!==s,n).type);s&&n.popContextualType()}o.length&&(i=o[0]);var d;s?(i||(i=s),d={getLength:function(){return r.nonSeparatorCount()+1},getTypeAtIndex:function(e){return 0===e?s:o[e-1]}}):d={getLength:function(){return r.nonSeparatorCount()},getTypeAtIndex:function(e){return o[e]}},i=i?this.findBestCommonType(d,n,a):i,i||(i=this.semanticInfoChain.undefinedTypeSymbol);var m=i.getArrayType();return m||(m=this.createInstantiatedType(this.cachedArrayInterfaceType(),[i]),m||(m=this.semanticInfoChain.anyTypeSymbol),i.setArrayType(m)),m},i.prototype.resolveElementAccessExpression=function(e,t){var n=this.computeElementAccessExpressionSymbolAndDiagnostic(e,t);return this.canTypeCheckAST(e,t)&&this.typeCheckElementAccessExpression(e,t,n),n.symbol},i.prototype.typeCheckElementAccessExpression=function(e,t,n){this.setTypeChecked(e,t),t.postDiagnostic(n.diagnostic)},i.prototype.computeElementAccessExpressionSymbolAndDiagnostic=function(t,n){var r=this.resolveAST(t.expression,!1,n),i=this.resolveAST(t.argumentExpression,!1,n).type,o=r.type;if(this.isAnyOrEquivalent(o))return{symbol:o};var a=o.getElementType(),s=i===this.semanticInfoChain.numberTypeSymbol||e.PullHelpers.symbolIsEnum(i);if(a&&s)return{symbol:a};if(14===t.argumentExpression.kind()||13===t.argumentExpression.kind()){var l=14===t.argumentExpression.kind()?e.stripStartAndEndQuotes(t.argumentExpression.text()):t.argumentExpression.valueText(),c=this.getMemberSymbol(l,68147712,o); if(c)return this.resolveDeclaredSymbol(c,n),{symbol:c.type}}o==this.semanticInfoChain.stringTypeSymbol&&this.cachedStringInterfaceType()&&(o=this.cachedStringInterfaceType());var u=this.getBothKindsOfIndexSignatures(o,n),p=u.stringSignature,h=u.numericSignature;return h&&(s||i===this.semanticInfoChain.anyTypeSymbol)?{symbol:h.returnType||this.semanticInfoChain.anyTypeSymbol}:p&&(s||i===this.semanticInfoChain.anyTypeSymbol||i===this.semanticInfoChain.stringTypeSymbol)?{symbol:p.returnType||this.semanticInfoChain.anyTypeSymbol}:s||i===this.semanticInfoChain.anyTypeSymbol||i===this.semanticInfoChain.stringTypeSymbol?{symbol:this.semanticInfoChain.anyTypeSymbol}:{symbol:this.getNewErrorTypeSymbol(),diagnostic:this.semanticInfoChain.diagnosticFromAST(t,e.DiagnosticCode.Value_of_type_0_is_not_indexable_by_type_1,[o.toString(),i.toString()])}},i.prototype.getBothKindsOfIndexSignatures=function(e,t){for(var n,r,i=e.getIndexSignatures(),o=null,a=null,s=null,l=0;li;i++){var o=n.actualParametersContextTypeSymbols?n.actualParametersContextTypeSymbols[i]:null;o&&t.pushContextualType(o,t.inProvisionalResolution(),null),this.resolveAST(e.argumentList.arguments.nonSeparatorAt(i),null!=o,t),o&&(t.popContextualType(),o=null)}for(var i=0;ig;g++)F.length&&(gi;i++){var o=n.actualParametersContextTypeSymbols?n.actualParametersContextTypeSymbols[i]:null;o&&t.pushContextualType(o,t.inProvisionalResolution(),null),this.resolveAST(e.argumentList.arguments.nonSeparatorAt(i),null!=o,t),o&&(t.popContextualType(),o=null)}for(var i=0;ig;g++)P.length&&(gr;r++){var i=e.getTypeAtIndex(r);if(this.typeIsBestCommonTypeCandidate(i,e,t))return i}return this.semanticInfoChain.emptyTypeSymbol},i.prototype.typeIsBestCommonTypeCandidate=function(e,t,n){for(var r=0;r1,h=e.length>1,d=0;dp)return s&&(s.flags|=3,s.addMessage(e.getDiagnosticMessage(e.DiagnosticCode.Call_signature_expects_0_or_fewer_parameters,[p]))),!1;if(t.isGeneric()){if(t=this.instantiateSignatureInContext(t,n,a),!t)return!1;c=t.parameters}i.setValueAt(t.pullSymbolID,n.pullSymbolID,!1);var d=t.returnType,m=n.returnType;if(m!=this.semanticInfoChain.voidTypeSymbol&&!this.sourceIsRelatableToTargetInEnclosingTypes(d,m,t.functionType,n.functionType,r,i,o,a,s,l))return s&&(s.flags|=16),!1;var y=p>h&&(t.hasVarArgs||c.length>h)?p:h;y||(y=c.lengthT;T++,b++)if(TT)?(f=c[T].type,v=c[T].name):T===h&&(f=c[T].type,f.isArrayNamedTypeReference()&&(f=f.getElementType()),v=c[T].name),bb)?(g=u[b].type,S=u[b].name):n.hasVarArgs&&b===p&&(g=u[b].type,g.isArrayNamedTypeReference()&&(g=g.getElementType()),S=u[b].name),!this.sourceIsRelatableToTargetInEnclosingTypes(f,g,t.functionType,n.functionType,r,i,o,a,s,l)&&!this.sourceIsRelatableToTargetInEnclosingTypes(g,f,n.functionType,t.functionType,r,i,o,a,s,l))return s&&(s.flags|=64),!1;return!0},i.prototype.resolveOverloads=function(t,n,r,i,o){for(var a=this,s=n.length>1,l=new h,c=t.argumentList?t.argumentList.arguments:null,u=e.ArrayUtilities.where(n,function(e){return s&&e.isDefinition()?!1:r&&!e.isGeneric()?!1:a.overloadHasCorrectArity(e,c)}),p=null,d=null,m=0;me.parameters.length?!1:!0},i.prototype.overloadIsApplicable=function(e,t,n,r){if(null===t)return 3;for(var i=!1,o=e.parameters,a=null,s=3,l=0;lc&&!(c>=o.length);c++){s=o[c].type,e.hasVarArgs&&c>=e.nonOptionalParamCount-1&&s.isArrayNamedTypeReference()&&(s=s.getElementType());var u=t.getInferenceCandidates();if(u.length)for(var p=0;p-1},i.prototype.relateTypeToTypeParametersInEnclosingType=function(e,t,n,r,i,o,a){if(e&&t){var s=n?e.getGenerativeTypeClassification(n):0,l=r?t.getGenerativeTypeClassification(r):0;if(3==s||3==l)return void this.relateInifinitelyExpandingTypeToTypeParameters(e,t,i,o,a)}this.relateTypeToTypeParameters(e,t,i,o,a)},i.prototype.relateTypeToTypeParameters=function(e,t,n,r,i){if(e&&t){if(e.isError()&&(e=this.semanticInfoChain.anyTypeSymbol),t.isTypeParameter())return void r.addCandidateForInference(t,e,n);var o=t.getDeclarations(),a=e.getDeclarations();return!t.isArrayNamedTypeReference()&&o.length&&a.length&&!t.isTypeParameter()&&!e.isTypeParameter()&&(o[0].isEqual(a[0])||e.isGeneric()&&t.isGeneric()&&this.sourceIsSubtypeOfTarget(this.instantiateTypeToAny(e,i),this.instantiateTypeToAny(t,i),null,i,null))&&e.isGeneric()&&this.relateTypeArgumentsOfTypeToTypeParameters(e,t,n,r,i),e.isArrayNamedTypeReference()&&t.isArrayNamedTypeReference()?void this.relateArrayTypeToTypeParameters(e,t,n,r,i):void this.relateObjectTypeToTypeParameters(e,t,n,r,i)}},i.prototype.relateTypeArgumentsOfTypeToTypeParameters=function(e,t,n,r,i){var o=t.getTypeArgumentsOrTypeParameters(),a=e.getTypeArguments();if(a||(o=t.getTypeArguments(),a=e.getTypeArgumentsOrTypeParameters()),o&&a&&o.length===a.length)for(var s=0;sc;c++)this.relateTypeToTypeParametersInEnclosingType(i[c].type,a[c].type,e.functionType,t.functionType,!0,n,r);this.relateTypeToTypeParametersInEnclosingType(o,s,e.functionType,t.functionType,!1,n,r)},i.prototype.relateObjectTypeToTypeParameters=function(e,t,n,r,i){var o,a,s,l=t.getMembers();if(!r.alreadyRelatingTypes(e,t)){var c=e.getTypeArguments(),u=t.getTypeParameters();if(c)if(c.length===u.length)for(var p=0;p=s[0].nonOptionalParamCount&&this.relateFunctionSignatureToTypeParameters(s[0],o[0],r,i),o=t.getConstructSignatures(),s=e.getConstructSignatures(),1==o.length&&1==s.length&&!s[0].isGeneric()&&o[0].nonOptionalParamCount>=s[0].nonOptionalParamCount&&this.relateFunctionSignatureToTypeParameters(s[0],o[0],r,i);var h=this.getBothKindsOfIndexSignatures(t,i),d=this.getBothKindsOfIndexSignatures(e,i);h.stringSignature&&d.stringSignature&&this.relateFunctionSignatureToTypeParameters(d.stringSignature,h.stringSignature,r,i),h.numericSignature&&d.numericSignature&&this.relateFunctionSignatureToTypeParameters(d.numericSignature,h.numericSignature,r,i)}},i.prototype.relateArrayTypeToTypeParameters=function(e,t,n,r,i){var o=e.getElementType(),a=t.getElementType();this.relateTypeToTypeParameters(o,a,n,r,i)},i.prototype.instantiateTypeToAny=function(e){var t=e.getTypeParameters();if(!t.length)return e;var n=null;if(this._cachedAnyTypeArgs||(this._cachedAnyTypeArgs=[[this.semanticInfoChain.anyTypeSymbol],[this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol],[this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol],[this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol],[this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol,this.semanticInfoChain.anyTypeSymbol]]),t.lengtho;o++){var s=i[o];128===s.kind&&(r=r||e.createIntrinsicsObject(),r[s.name]=!0)}for(var l=t.getVariableDeclGroups(),o=0,c=l.length;c>o;o++){var u=null,p=null;if(1===t.kind&&l[o].length){var h=l[o][0].name,d=this.semanticInfoChain.findTopLevelSymbol(h,512,t);d&&d.isResolved&&(d.anyDeclHasFlag(118784)||(u=d,p=d.type));var m=this.semanticInfoChain.findTopLevelSymbol(h,128,null);m&&m.isAlias()&&(r=r||e.createIntrinsicsObject())}for(var y=0,f=l[o].length;f>y;y++){var g=l[o][y],v=this.semanticInfoChain.getASTForDecl(g),h=g.name;if(r&&r[h])n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(v,e.DiagnosticCode.Variable_declaration_cannot_have_the_same_name_as_an_import_declaration));else{var S=g.getSymbol(),T=S.type;0!==y||u?T&&p&&T!==p&&!this.typesAreIdentical(T,p)&&n.postDiagnostic(this.semanticInfoChain.diagnosticFromAST(v,e.DiagnosticCode.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,[S.getScopedName(),p.toString(),T.toString()])):(u=S,p=T)}}}},i.prototype.typeCheckFunctionOverloads=function(t,n,r,i){if(!r){var o=e.PullHelpers.getSignatureForFuncDecl(this.semanticInfoChain.getDeclForAST(t));r=o.signature,i=o.allSignatures}for(var a=this.semanticInfoChain.getDeclForAST(t),s=a.getSymbol(),l=null,c=i.length-1;c>=0;c--)if(i[c].isDefinition()){l=i[c];break}if(!r.isDefinition())for(var c=0;c=0;s--){var d=u[s].getExternalAliasedSymbols(h);if(d){c=!0,d[0].setTypeUsedExternally(!0);break}}t=u[u.length-1]}}else if(128==t.kind){var m=t;c=!0,m.setTypeUsedExternally(!0)}c||n(t)}}},i.prototype.checkTypePrivacyOfSignatures=function(e,t,n){for(var r=0;r1&&i.isDefinition())){for(var o=i.getTypeParameters(),a=0;a0},i.prototype.isSuperInvocationExpression=function(e){if(213===e.kind()){var t=e;if(50===t.expression.kind())return!0}return!1},i.prototype.isSuperInvocationExpressionStatement=function(e){if(e&&149===e.kind()){var t=e;if(this.isSuperInvocationExpression(t.expression))return!0}return!1},i.prototype.getFirstStatementOfBlockOrNull=function(e){return e&&e.statements&&e.statements.childCount()>0?e.statements.childAt(0):null},i.prototype.superCallMustBeFirstStatementInConstructor=function(t){if(e.Debug.assert(32768===t.kind),t){var n=t.getParentDecl(),r=n.getSymbol();if(0===r.getExtendedTypes().length)return!1;for(var i=r.getMembers(),o=0,a=i.length;a>o;o++){var s=i[o];if(4096===s.kind)for(var l=s.getDeclarations(),c=0,u=l.length;u>c;c++){var p=l[c],h=this.semanticInfoChain.getASTForDecl(p);if(242===h.kind())return!0;if(136===h.kind()){var d=h;if(d.variableDeclarator.equalsValueClause)return!0}}}}return!1},i.prototype.checkForThisCaptureInArrowFunction=function(t){var n=this.getEnclosingDeclForAST(t),r=n.getParentPath();if(r.length)for(var i=!1,o=r.length-1;o>=0;o--){var a=r[o],s=a.kind,l=a.flags;if(131072===s&&e.hasFlag(l,8192))i=!0;else if(i){if(16384===s||65536===s||32768===s||262144===s||524288===s||131072===s||8===s||4===s||32===s||1===s){if(a.setFlags(262144|a.flags),8===s)for(var c=a.getSymbol().getConstructorMethod(),u=c.getDeclarations(),o=0;o1){var p=e.ArrayUtilities.firstOrDefault(i.getDeclarations(),function(e){return null!==e.ast().heritageClauses}).ast();t===p&&this.typeCheckCallBacks.push(function(e){s.checkTypeCompatibilityBetweenBases(t.identifier,i,e)})}}},i.prototype.checkTypeCompatibilityBetweenBases=function(t,n,r){var i=(n.getOwnIndexSignatures(),e.createIntrinsicsObject()),o=new u,a=!1,s=!1;if(n.hasOwnIndexSignatures())for(var l=n.getOwnIndexSignatures(),c=0;cr?this.documents.push(t):this.documents[r]=t,this.fileNameToDocument[n]=t,this.invalidate()},t.prototype.removeDocument=function(t){e.Debug.assert(""!==t,"Can't remove the semantic info for the global decl.");var n=e.ArrayUtilities.indexOf(this.documents,function(e){return e.fileName===t});n>0&&(this.fileNameToDocument[t]=void 0,this.documents.splice(n,1),this.invalidate())},t.prototype.getDeclPathCacheID=function(e,t){for(var n="",r=0;ro;o++){var s=this.documents[o].topLevelDecl(),i=this.findTopLevelSymbolInDecl(s,e,t,n);if(i)break;if(n&&s.name==n.fileName())return null}i&&(this.symbolCache[r]=i)}return i},t.prototype.findTopLevelSymbolInDecl=function(e,t,n,r){for(var i=r&&r.fileName()===e.fileName()?r.ast().start():-1,o=e.searchChildDecls(t,n),a=0;ai)break;var l=o[a].getSymbol();if(l)return l}return null},t.prototype.findExternalModule=function(t){t=e.normalizePath(t);var n=t+".d.ts",r=this.getDeclPathCacheID([n],32),i=this.symbolCache[r];if(i)return i;var o=t+".ts",a=this.getDeclPathCacheID([o],32);if(i=this.symbolCache[a],void 0!=i)return i;var s=t+".js",l=this.getDeclPathCacheID([s],32);if(i=this.symbolCache[l],void 0!=i)return i;i=null;for(var c=0;cr;r++)1&e[r].kind||n.push(e[r].name);return this.findDecls(n,t)},t.prototype.findSymbol=function(t,n){var r=this.getDeclPathCacheID(t,n);if(t.length){var i=this.symbolCache[r];if(i)return e.symbolCacheHit++,i}e.symbolCacheMiss++;var o=this.findDecls(t,n),a=null;if(o.length){var s=o[0];if(e.hasFlag(n,164)){var l=s.getValueDecl();l&&l.ensureSymbolIsBound()}a=s.getSymbol(),a&&(this.symbolCache[r]=a)}return a},t.prototype.cacheGlobalSymbol=function(e,t){var n=this.getDeclPathCacheID([e.name],t),r=this.getDeclPathCacheID([e.name],e.kind);this.symbolCache[n]||(this.symbolCache[n]=e),this.symbolCache[r]||(this.symbolCache[r]=e)},t.prototype.invalidate=function(t,n){"undefined"==typeof t&&(t=null),"undefined"==typeof n&&(n=null),e.PullTypeResolver.globalTypeCheckPhase++;(new Date).getTime();if(this.astSymbolMap.length=0,this.astAliasSymbolMap.length=0,this.astCallResolutionDataMap.length=0,this.declCache=e.createIntrinsicsObject(),this.symbolCache=e.createIntrinsicsObject(),this.fileNameToDiagnostics=e.createIntrinsicsObject(),this._binder=null,this._resolver=null,this._topLevelDecls=null,this._fileNames=null,this.declSymbolMap.length=0,this.declSignatureSymbolMap.length=0,t&&n&&this.settingsChangeAffectsSyntax(t,n))for(var r=1,i=this.documents.length;i>r;r++)this.documents[r].invalidate();e.pullSymbolID=0,e.globalTyvarID=0,this.resetGlobalSymbols();(new Date).getTime()},t.prototype.settingsChangeAffectsSyntax=function(e,t){return e.allowAutomaticSemicolonInsertion()!==t.allowAutomaticSemicolonInsertion()||e.codeGenTarget()!==t.codeGenTarget()||e.propagateEnumConstants()!=t.propagateEnumConstants()},t.prototype.setSymbolForAST=function(e,t){this.astSymbolMap[e.syntaxID()]=t},t.prototype.getSymbolForAST=function(e){return this.astSymbolMap[e.syntaxID()]},t.prototype.setAliasSymbolForAST=function(e,t){this.astAliasSymbolMap[e.syntaxID()]=t},t.prototype.getAliasSymbolForAST=function(e){return this.astAliasSymbolMap[e.syntaxID()]},t.prototype.getCallResolutionDataForAST=function(e){return this.astCallResolutionDataMap[e.syntaxID()]},t.prototype.setCallResolutionDataForAST=function(e,t){t&&(this.astCallResolutionDataMap[e.syntaxID()]=t)},t.prototype.setSymbolForDecl=function(e,t){this.declSymbolMap[e.declID]=t},t.prototype.getSymbolForDecl=function(e){return this.declSymbolMap[e.declID]},t.prototype.setSignatureSymbolForDecl=function(e,t){this.declSignatureSymbolMap[e.declID]=t},t.prototype.getSignatureSymbolForDecl=function(e){return this.declSignatureSymbolMap[e.declID] },t.prototype.addDiagnostic=function(e){var t=e.fileName(),n=this.fileNameToDiagnostics[t];n||(n=[],this.fileNameToDiagnostics[t]=n),n.push(e)},t.prototype.getDiagnostics=function(e){var t=this.fileNameToDiagnostics[e];return t?t:[]},t.prototype.getBinder=function(){return this._binder||(this._binder=new e.PullSymbolBinder(this)),this._binder},t.prototype.getResolver=function(){return this._resolver||(this._resolver=new e.PullTypeResolver(this.compiler.compilationSettings(),this)),this._resolver},t.prototype.addSyntheticIndexSignature=function(t,n,r,i,o,a){var s=new e.PullSignatureSymbol(4194304),l=new e.PullSymbol(i,2048);l.type=o,s.addParameter(l),s.returnType=a,s.setResolved(),l.setResolved(),n.addIndexSignature(s);var c=e.TextSpan.fromBounds(r.start(),r.end()),u=new e.PullSynthesizedDecl("","",4194304,2048,t,c,t.semanticInfoChain()),p=new e.PullSynthesizedDecl(i,i,2048,0,u,c,t.semanticInfoChain());u.setSignatureSymbol(s),p.setSymbol(l),s.addDeclaration(u),l.addDeclaration(p)},t.prototype.getDeclForAST=function(e){var t=this.getDocument(e.fileName());return t?t._getDeclForAST(e):null},t.prototype.getEnclosingDecl=function(e){return this.getDocument(e.fileName()).getEnclosingDecl(e)},t.prototype.setDeclForAST=function(e,t){this.getDocument(t.fileName())._setDeclForAST(e,t)},t.prototype.getASTForDecl=function(e){var t=this.getDocument(e.fileName());return t?t._getASTForDecl(e):null},t.prototype.setASTForDecl=function(e,t){this.getDocument(e.fileName())._setASTForDecl(e,t)},t.prototype.topLevelDecl=function(e){var t=this.getDocument(e);return t?t.topLevelDecl():null},t.prototype.topLevelDecls=function(){return this._topLevelDecls||(this._topLevelDecls=e.ArrayUtilities.select(this.documents,function(e){return e.topLevelDecl()})),this._topLevelDecls},t.prototype.addDiagnosticFromAST=function(e,t,n){"undefined"==typeof n&&(n=null),this.addDiagnostic(this.diagnosticFromAST(e,t,n))},t.prototype.diagnosticFromAST=function(t,n,r){return"undefined"==typeof r&&(r=null),new e.Diagnostic(t.fileName(),this.lineMap(t.fileName()),t.start(),t.width(),n,r)},t}();e.SemanticInfoChain=t}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(e){for(e=e.parent;e;){if(130===e.kind()){var t=e;return t.moduleElements.any(function(e){return 134===e.kind()})}if(120===e.kind()){var n=e;return n.moduleElements.any(function(e){return 134===e.kind()})}e=e.parent}return!1}function n(t){for(t=t.parent;t;){if(130===t.kind()&&e.hasModifier(t.modifiers,8))return!0;t=t.parent}return!1}function r(n,r){var i=n,o=0,a=e.TextSpan.fromBounds(i.start(),i.end()),s=r.getParent();e.hasModifier(i.modifiers,1)&&!t(n)&&(o|=1);var l=new e.NormalPullDecl(i.identifier.valueText(),i.identifier.text(),128,o,s,a);r.semanticInfoChain.setDeclForAST(n,l),r.semanticInfoChain.setASTForDecl(l,n)}function i(t,n){var r=e.TextSpan.fromBounds(t.start(),t.end()),i=t.fileName(),o=n.document.isExternalModule(),a=new e.RootPullDecl(i,i,1,0,r,n.semanticInfoChain,o);if(n.semanticInfoChain.setDeclForAST(t,a),n.semanticInfoChain.setASTForDecl(a,t),n.isDeclareFile=n.document.isDeclareFile(),n.pushParent(a),o){var s=1;e.isDTSFile(i)&&(s|=8);var l=u(t.moduleElements),p=32,r=e.TextSpan.fromBounds(t.start(),t.end()),h=e.quoteStr(i),a=new e.NormalPullDecl(h,i,p,s,n.getParent(),r);n.semanticInfoChain.setASTForDecl(a,t),n.semanticInfoChain.setDeclForAST(t,a),l&&c(a,t,n),n.pushParent(a)}}function o(r,i){var o=0,a=r.identifier.valueText(),s=4;!e.hasModifier(r.modifiers,1)&&!n(r,i)||t(r)||(o|=1),(e.hasModifier(r.modifiers,8)||n(r,i)||i.isDeclareFile)&&(o|=8),o|=4096,s=64;var l=e.TextSpan.fromBounds(r.start(),r.end()),c=new e.NormalPullDecl(a,r.identifier.text(),s,o,i.getParent(),l);i.semanticInfoChain.setDeclForAST(r,c),i.semanticInfoChain.setASTForDecl(c,r);var u=new e.NormalPullDecl("","",4194304,2048,c,l),p=(new e.NormalPullDecl("x","x",2048,0,u,l),new e.NormalPullDecl(c.name,c.getDisplayName(),512,c.flags,i.getParent(),c.getSpan()));c.setValueDecl(p),i.semanticInfoChain.setASTForDecl(p,r),i.pushParent(c)}function a(t,n){var r=n.getParent(),i=e.TextSpan.fromBounds(t.start(),t.end()),o=new e.PullEnumElementDecl(t.propertyName.valueText(),t.propertyName.text(),r,i);n.semanticInfoChain.setDeclForAST(t,o),n.semanticInfoChain.setASTForDecl(o,t)}function s(r,i){var o=0,a=u(r.moduleElements),s=null!==r.stringLiteral;!e.hasModifier(r.modifiers,1)&&!n(r,i)||t(r)||(o|=1),(e.hasModifier(r.modifiers,8)||n(r,i)||i.isDeclareFile)&&(o|=8);var p=s?32:4,h=e.TextSpan.fromBounds(r.start(),r.end());if(r.stringLiteral){var d=e.quoteStr(r.stringLiteral.valueText()),m=r.stringLiteral.text(),y=new e.NormalPullDecl(d,m,p,o,i.getParent(),h);i.semanticInfoChain.setDeclForAST(r,y),i.semanticInfoChain.setDeclForAST(r.stringLiteral,y),i.semanticInfoChain.setASTForDecl(y,r.stringLiteral),a&&c(y,r.stringLiteral,i),i.pushParent(y)}else for(var f=l(r.name),g=0,v=f.length;v>g;g++){var S=f[g],T=o;g>0&&(T|=1);var y=new e.NormalPullDecl(S.valueText(),S.text(),p,T,i.getParent(),h);i.semanticInfoChain.setDeclForAST(r,y),i.semanticInfoChain.setDeclForAST(S,y),i.semanticInfoChain.setASTForDecl(y,S),a&&c(y,S,i),i.pushParent(y)}}function l(e,t){return t=t||[],121===e.kind()?(l(e.left,t),t.push(e.right)):t.push(e),t}function c(t,n,r){t.setFlags(t.flags|B(t));var i=new e.NormalPullDecl(t.name,t.getDisplayName(),512,t.flags,r.getParent(),t.getSpan());t.setValueDecl(i),r.semanticInfoChain.setASTForDecl(i,n)}function u(e){for(var t=0,n=e.childCount();n>t;t++){var r=e.childAt(t);if(130===r.kind()){var i=r;if(u(i.moduleElements))return!0}else if(128!==r.kind()&&133!==r.kind())return!0}return!1}function p(r,i){var o=0,a=512;!e.hasModifier(r.modifiers,1)&&!n(r,i)||t(r)||(o|=1),(e.hasModifier(r.modifiers,8)||n(r,i)||i.isDeclareFile)&&(o|=8);var s=e.TextSpan.fromBounds(r.start(),r.end()),l=i.getParent(),c=new e.NormalPullDecl(r.identifier.valueText(),r.identifier.text(),8,o,l,s),u=new e.NormalPullDecl(r.identifier.valueText(),r.identifier.text(),a,16384|o,l,s);c.setValueDecl(u),i.semanticInfoChain.setDeclForAST(r,c),i.semanticInfoChain.setASTForDecl(c,r),i.semanticInfoChain.setASTForDecl(u,r),i.pushParent(c)}function h(t,n){if(128!==t.parent.kind()){var r=0,i=e.TextSpan.fromBounds(t.start(),t.end()),o=n.getParent();o&&(134217728===o.kind||2097152&o.flags)&&(r|=2097152);var a=new e.NormalPullDecl("","",8388608,r,o,i);n.semanticInfoChain.setDeclForAST(t,a),n.semanticInfoChain.setASTForDecl(a,t),n.pushParent(a)}}function d(r,i){var o=0;!e.hasModifier(r.modifiers,1)&&!n(r,i)||t(r)||(o|=1);var a=e.TextSpan.fromBounds(r.start(),r.end()),s=i.getParent(),l=new e.NormalPullDecl(r.identifier.valueText(),r.identifier.text(),16,o,s,a);i.semanticInfoChain.setDeclForAST(r,l),i.semanticInfoChain.setASTForDecl(l,r),i.pushParent(l)}function m(t,n){var r=0;r|=e.hasModifier(t.modifiers,2)?2:4,(null!==t.questionToken||null!==t.equalsValueClause||null!==t.dotDotDotToken)&&(r|=128);var i=n.getParent();i&&(134217728===i.kind||2097152&i.flags)&&(r|=2097152);var o=e.TextSpan.fromBounds(t.start(),t.end()),a=new e.NormalPullDecl(t.identifier.valueText(),t.identifier.text(),2048,r,i,o);t.equalsValueClause&&(i.flags|=33554432),32768==i.kind&&a.setFlag(67108864);var s=e.hasModifier(t.modifiers,6),l=32768===i.kind;if(s&&l){var c=n.parentChain[n.parentChain.length-2],u=new e.NormalPullDecl(t.identifier.valueText(),t.identifier.text(),4096,r,c,o);u.setValueDecl(a),a.setFlag(8388608),u.setFlag(8388608),32768==i.kind&&u.setFlag(67108864),n.semanticInfoChain.setASTForDecl(a,t),n.semanticInfoChain.setASTForDecl(u,t),n.semanticInfoChain.setDeclForAST(t,u)}else n.semanticInfoChain.setASTForDecl(a,t),n.semanticInfoChain.setDeclForAST(t,a);i.addVariableDeclToGroup(a)}function y(t,n){var r=0,i=e.TextSpan.fromBounds(t.start(),t.end()),o=n.getParent();o&&(134217728===o.kind||2097152&o.flags)&&(r|=2097152);var a=new e.NormalPullDecl(t.identifier.valueText(),t.identifier.text(),8192,r,o,i);n.semanticInfoChain.setASTForDecl(a,t),n.semanticInfoChain.setDeclForAST(t,a)}function f(t,n){var r=4,i=n.getParent(),o=4096;null!==t.questionToken&&(r|=128);var a=e.TextSpan.fromBounds(t.start(),t.end()),s=new e.NormalPullDecl(t.propertyName.valueText(),t.propertyName.text(),o,r,i,a);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t)}function g(t,n){var r=0,i=4096;r|=e.hasModifier(t.modifiers,2)?2:4,e.hasModifier(t.modifiers,16)&&(r|=16);var o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent(),s=new e.NormalPullDecl(t.variableDeclarator.propertyName.valueText(),t.variableDeclarator.propertyName.text(),i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setDeclForAST(t.variableDeclarator,s),n.semanticInfoChain.setASTForDecl(s,t)}function v(r,i){var o=0,a=512,s=e.getVariableDeclaratorModifiers(r);!e.hasModifier(s,1)&&!n(r,i)||t(r)||(o|=1),(e.hasModifier(s,8)||n(r,i)||i.isDeclareFile)&&(o|=8);var l=e.TextSpan.fromBounds(r.start(),r.end()),c=i.getParent();c&&(134217728===c.kind||2097152&c.flags)&&(o|=2097152);var u=new e.NormalPullDecl(r.propertyName.valueText(),r.propertyName.text(),a,o,c,l);i.semanticInfoChain.setDeclForAST(r,u),i.semanticInfoChain.setASTForDecl(u,r),c&&c.addVariableDeclToGroup(u)}function S(e,t){if(136!==e.parent.kind()){var n=e;v(n,t)}}function T(t,n){var r=2048,i=16777216,o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent();a&&(134217728===a.kind||2097152&a.flags)&&(r|=2097152);var s=new e.NormalPullDecl("","",i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function b(t,n){var r=0,i=33554432,o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent();a&&(134217728===a.kind||2097152&a.flags)&&(r|=2097152);var s=new e.NormalPullDecl("","",i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function _(r,i){var o=0,a=16384;!e.hasModifier(r.modifiers,1)&&!n(r,i)||t(r)||(o|=1),(e.hasModifier(r.modifiers,8)||n(r,i)||i.isDeclareFile)&&(o|=8),r.block||(o|=2048);var s=e.TextSpan.fromBounds(r.start(),r.end()),l=i.getParent();l&&(134217728===l.kind||2097152&l.flags)&&(o|=2097152);var c=new e.NormalPullDecl(r.identifier.valueText(),r.identifier.text(),a,o,l,s);i.semanticInfoChain.setDeclForAST(r,c),i.semanticInfoChain.setASTForDecl(c,r),i.pushParent(c)}function E(t,n,r,i){"undefined"==typeof i&&(i=null);var o=0;(219===t.kind()||218===t.kind())&&(o|=8192);var a=e.TextSpan.fromBounds(t.start(),t.end()),s=r.getParent();s&&(134217728===s.kind||2097152&s.flags)&&(o|=2097152);var l=n?n.text():"",c=i?i.text():"",u=new e.PullFunctionExpressionDecl(l,o,s,a,c);if(r.semanticInfoChain.setDeclForAST(t,u),r.semanticInfoChain.setASTForDecl(u,t),r.pushParent(u),219===t.kind()){var p=t,o=4,s=r.getParent();e.hasFlag(s.flags,2097152)&&(o|=2097152);var a=e.TextSpan.fromBounds(p.identifier.start(),p.identifier.end()),u=new e.NormalPullDecl(p.identifier.valueText(),p.identifier.text(),2048,o,s,a);r.semanticInfoChain.setASTForDecl(u,p.identifier),r.semanticInfoChain.setDeclForAST(p.identifier,u),s.addVariableDeclToGroup(u)}}function C(t,n){var r=0,i=65536;e.hasModifier(t.modifiers,16)&&(r|=16),r|=e.hasModifier(t.modifiers,2)?2:4,t.block||(r|=2048);var o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent(),s=new e.NormalPullDecl(t.propertyName.valueText(),t.propertyName.text(),i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function x(t,n){var r=2048,i=4194304,o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent(),s=new e.NormalPullDecl("","",i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function k(t,n){var r=t.parent&&t.parent.parent&&2===t.parent.kind()&&122===t.parent.parent.kind();if(r){var i=2048,o=1048576,a=e.TextSpan.fromBounds(t.start(),t.end()),s=n.getParent();s&&(134217728===s.kind||2097152&s.flags)&&(i|=2097152);var l=new e.NormalPullDecl("","",o,i,s,a);n.semanticInfoChain.setDeclForAST(t,l),n.semanticInfoChain.setASTForDecl(l,t),n.pushParent(l)}}function w(t,n){var r=0,i=65536;r|=4,r|=2048,null!==t.questionToken&&(r|=128);var o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent(),s=new e.NormalPullDecl(t.propertyName.valueText(),t.propertyName.text(),i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function A(t,n){var r=2048,i=2097152,o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent();a&&(134217728===a.kind||2097152&a.flags)&&(r|=2097152);var s=new e.NormalPullDecl("","",i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function D(t,n){var r=0,i=32768;t.block||(r|=2048);var o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent();if(a){var s=a.flags;1&s&&(r|=1)}var l=new e.NormalPullDecl(a.name,a.getDisplayName(),i,r,a,o);n.semanticInfoChain.setDeclForAST(t,l),n.semanticInfoChain.setASTForDecl(l,t),n.pushParent(l)}function I(t,n){var r=4,i=262144;e.hasModifier(t.modifiers,16)&&(r|=16),r|=e.hasModifier(t.modifiers,2)?2:4;var o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent();a&&(134217728===a.kind||2097152&a.flags)&&(r|=2097152);var s=new e.NormalPullDecl(t.propertyName.valueText(),t.propertyName.text(),i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function L(e,t){E(e,e.identifier,t)}function N(t,n){var r=4,i=524288;e.hasModifier(t.modifiers,16)&&(r|=16),r|=e.hasModifier(t.modifiers,2)?2:4;var o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent();a&&(134217728===a.kind||2097152&a.flags)&&(r|=2097152);var s=new e.NormalPullDecl(t.propertyName.valueText(),t.propertyName.text(),i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function P(t,n){var r=0,i=268435456,o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent();a&&(134217728===a.kind||2097152&a.flags)&&(r|=2097152);var s=new e.NormalPullDecl("","",i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s);var r=0,i=1024,o=e.TextSpan.fromBounds(t.identifier.start(),t.identifier.end()),a=n.getParent();e.hasFlag(a.flags,2097152)&&(r|=2097152);var s=new e.NormalPullDecl(t.identifier.valueText(),t.identifier.text(),i,r,a,o);n.semanticInfoChain.setDeclForAST(t.identifier,s),n.semanticInfoChain.setASTForDecl(s,t.identifier),a&&a.addVariableDeclToGroup(s)}function M(t,n){var r=0,i=134217728,o=e.TextSpan.fromBounds(t.start(),t.end()),a=n.getParent(),s=new e.NormalPullDecl("","",i,r,a,o);n.semanticInfoChain.setDeclForAST(t,s),n.semanticInfoChain.setASTForDecl(s,t),n.pushParent(s)}function O(t,n){var r=e.TextSpan.fromBounds(t.start(),t.end()),i=new e.NormalPullDecl("","",256,0,n.getParent(),r);n.semanticInfoChain.setDeclForAST(t,i),n.semanticInfoChain.setASTForDecl(i,t),n.pushParent(i)}function F(t,n){var r=e.getPropertyAssignmentNameTextFromIdentifier(t.propertyName),i=e.TextSpan.fromBounds(t.start(),t.end()),o=new e.NormalPullDecl(r.memberName,r.actualText,4096,4,n.getParent(),i);n.semanticInfoChain.setDeclForAST(t,o),n.semanticInfoChain.setASTForDecl(o,t)}function R(t,n){var r=e.getPropertyAssignmentNameTextFromIdentifier(t.propertyName),i=e.TextSpan.fromBounds(t.start(),t.end()),o=new e.NormalPullDecl(r.memberName,r.actualText,4096,4,n.getParent(),i);n.semanticInfoChain.setDeclForAST(t,o),n.semanticInfoChain.setASTForDecl(o,t),E(t,t.propertyName,n,t.propertyName)}function V(e,t){switch(e.kind()){case 120:i(e,t);break;case 132:o(e,t);break;case 243:a(e,t);break;case 130:s(e,t);break;case 131:p(e,t);break;case 128:d(e,t);break;case 122:h(e,t);break;case 242:m(e,t);break;case 136:g(e,t);break;case 141:f(e,t);break;case 225:S(e,t);break;case 137:D(e,t);break;case 139:I(e,t);break;case 140:N(e,t);break;case 222:L(e,t);break;case 135:C(e,t);break;case 144:x(e,t);break;case 123:T(e,t);break;case 125:b(e,t);break;case 142:k(e,t);break;case 143:A(e,t);break;case 145:w(e,t);break;case 129:_(e,t);break;case 219:case 218:E(e,null,t);break;case 133:r(e,t);break;case 238:y(e,t);break;case 236:P(e,t);break;case 163:M(e,t);break;case 215:O(e,t);break;case 240:F(e,t);break;case 241:R(e,t)}}function B(e){return 4&e.kind?32768:32&e.kind?65536:0}function G(t,n){var r=n.getParent();if(11!==t.kind()&&14!==t.kind()||4!==r.kind&&32!==r.kind){if(130===t.kind()){var i=t;if(i.stringLiteral)e.Debug.assert(r.ast()===i.stringLiteral),n.popParent();else for(var o=l(i.name),a=o.length-1;a>=0;a--){var s=o[a];e.Debug.assert(r.ast()===s),n.popParent(),r=n.getParent()}}for(132===t.kind()&&H(t,r,n);r.getParentDecl()&&r.ast()===t;)n.popParent(),r=n.getParent()}}function H(t,n,r){e.Debug.assert(64===n.kind);for(var i=e.hasFlag(n.flags,8),o=!i,a=0,s=n.getChildDecls(),l=0,c=t.enumElements.nonSeparatorCount();c>l;l++){var u=t.enumElements.nonSeparatorAt(l),p=e.ArrayUtilities.first(s,function(e){return r.semanticInfoChain.getASTForDecl(e)===u});e.Debug.assert(67108864===p.kind),null===u.equalsValueClause?o&&(p.constantValue=a,a++):(p.constantValue=K(u.equalsValueClause.value,s,r),null===p.constantValue||i?o=!1:(o=!0,a=p.constantValue+1)),e.Debug.assert(void 0!==p.constantValue)}}function K(t,n,r){if(e.Debug.assert(t),e.isIntegerLiteralAST(t)){var i;switch(t.kind()){case 164:case 165:i=t.operand;break;default:i=t}var o=i.value();return o&&165===t.kind()?-o:o}if(r.propagateEnumConstants){switch(t.kind()){case 11:var a=t,s=e.ArrayUtilities.firstOrDefault(n,function(e){return e.name===a.valueText()});return s?s.constantValue:null;case 202:var l=t,c=K(l.left,n,r),u=K(l.right,n,r);return null===c||null===u?null:c<1&&u.enumElements.nonSeparatorCount()>0){var b=e.ArrayUtilities.where(T,function(e){return 64===e.kind}).length>1;if(b){var _=u.enumElements.nonSeparatorAt(0);_.equalsValueClause||this.semanticInfoChain.addDiagnosticFromAST(_,e.DiagnosticCode.Enums_with_multiple_declarations_must_provide_an_initializer_for_the_first_enum_element,null)}}d&&s&&(1&t.flags?s.addEnclosedMemberType(r):s.addEnclosedNonMemberType(r)),this.bindEnumIndexerDeclsToPullSymbols(t,r);var E=t.getValueDecl();E&&E.ensureSymbolIsBound();var C=this.findDeclsInContext(t,t.kind,!0);if(C&&C.length)for(var S=0;Sa;a++){var l=n.astAt(a),c=n.identifierAt(a),u=this.semanticInfoChain.getDeclForAST(l),p=e.hasFlag(u.flags,8388608),h=new e.PullSymbol(c.valueText(),2048);if(a===s-1&&n.lastParameterIsRest()&&(h.isVarArg=!0),128&u.flags&&(h.isOptional=!0),o[c.valueText()]?this.semanticInfoChain.addDiagnosticFromAST(l,e.DiagnosticCode.Duplicate_identifier_0,[c.text()]):o[c.valueText()]=!0,u)if(p){u.ensureSymbolIsBound();var d=u.getValueDecl();d&&(d.setSymbol(h),h.addDeclaration(d))}else h.addDeclaration(u),u.setSymbol(h);i.addParameter(h,h.isOptional),i.isDefinition()&&r.addEnclosedNonMember(h)}},t.prototype.bindFunctionDeclarationToPullSymbol=function(t){var n=(t.kind,t.flags),r=this.semanticInfoChain.getASTForDecl(t),i=0!==(1&n),o=t.name,a=0!==(2048&n),s=this.getParent(t,!0),l=(t.getParentDecl(),!1),c=null,u=null;if(c=this.getExistingSymbol(t,68147712,s)){var p=c.allDeclsHaveFlag(8),h=p||8&t.flags,d=16384===c.kind&&(a||c.allDeclsHaveFlag(2048))||c.allDeclsHaveFlag(32768)&&h;d||(this.semanticInfoChain.addDiagnosticFromAST(r,e.DiagnosticCode.Duplicate_identifier_0,[t.getDisplayName()]),c.type=this.semanticInfoChain.getResolver().getNewErrorTypeSymbol(o))}c&&(u=c.type,l=!0),c||(c=new e.PullSymbol(o,16384)),u||(u=new e.PullTypeSymbol("",16777216),c.type=u,u.setFunctionSymbol(c)),t.setSymbol(c),c.addDeclaration(t),u.addDeclaration(t),this.semanticInfoChain.setSymbolForAST(r.identifier,c),this.semanticInfoChain.setSymbolForAST(r,c),s&&!l&&(i?s.addMember(c):s.addEnclosedNonMember(c));var m=a?new e.PullSignatureSymbol(1048576):new e.PullDefinitionSignatureSymbol(1048576);m.addDeclaration(t),t.setSignatureSymbol(m),e.lastParameterIsRest(r.callSignature.parameterList)&&(m.hasVarArgs=!0);var y=this.semanticInfoChain.getASTForDecl(t);this.bindParameterSymbols(y,e.Parameters.fromParameterList(y.callSignature.parameterList),u,m);for(var f,g=t.getTypeParameters(),v=0;v=0)){switch(this.declsBeingBound.push(t.declID),t.kind){case 1:for(var n=t.getChildDecls(),r=0;rt;t++){var r=this.getDocument(e[t]);if(!r.isDeclareFile()&&r.isExternalModule())return!0}return!1},r.prototype.mapOutputFileName=function(e,t,n){if(e.emitToOwnOutputFile()){var r=e.fileName;return""!==t.outputDirectory()&&(r=e.fileName.replace(t.commonDirectoryPath(),""),r=t.outputDirectory()+r),n(r,!1)}return n(t.sharedOutputFile(),!0)},r.prototype.writeByteOrderMarkForDocument=function(t){var n=!1;if(t.emitToOwnOutputFile()){var r=0!==t.byteOrderMark;return n&&e.Environment.standardOut.WriteLine("Emitting byte order mark because of: "+t.fileName),r}for(var i=this.fileNames(),r=!1,o=0,a=i.length;a>o;o++){var t=this.getDocument(i[o]);if(!t.isExternalModule()&&0!==t.byteOrderMark){if(!n)return!0;e.Environment.standardOut.WriteLine("Emitting byte order mark because of: "+t.fileName),r=!0}}return r},r.mapToDTSFileName=function(t){return e.getDeclareFilePath(t)},r.prototype._shouldEmit=function(e){return!e.isDeclareFile()},r.prototype._shouldEmitDeclarations=function(e){return this.compilationSettings().generateDeclarationFiles()?this._shouldEmit(e):!1},r.prototype.emitDocumentDeclarationsWorker=function(t,n,i){var o=t.sourceUnit();if(e.Debug.assert(this._shouldEmitDeclarations(t)),i)i.document=t;else{var a=this.mapOutputFileName(t,n,r.mapToDTSFileName);i=new e.DeclarationEmitter(a,t,this,n,this.semanticInfoChain)}return i.emitDeclarations(o),i},r.prototype._emitDocumentDeclarations=function(e,t,n,r){if(this._shouldEmitDeclarations(e))if(e.emitToOwnOutputFile()){var i=this.emitDocumentDeclarationsWorker(e,t);i&&n(i.getOutputFile())}else r=this.emitDocumentDeclarationsWorker(e,t,r);return r},r.prototype.emitAllDeclarations=function(t){var r=(new Date).getTime(),i=new n,o=new e.EmitOptions(this,t);if(o.diagnostic())return i.diagnostics.push(o.diagnostic()),i;for(var a=null,s=this.fileNames(),l=0,c=s.length;c>l;l++){var u=(s[l],this.getDocument(s[l]));a=this._emitDocumentDeclarations(u,o,function(e){return i.outputFiles.push(e)},a)}return a&&i.outputFiles.push(a.getOutputFile()),e.declarationEmitTime+=(new Date).getTime()-r,i},r.prototype.emitDeclarations=function(t,r){t=e.switchToForwardSlashes(t);var i=new n,o=new e.EmitOptions(this,r);if(o.diagnostic())return i.diagnostics.push(o.diagnostic()),i;var a=this.getDocument(t);return a.emitToOwnOutputFile()?(this._emitDocumentDeclarations(a,o,function(e){return i.outputFiles.push(e)},null),i):this.emitAllDeclarations(r)},r.mapToFileNameExtension=function(e,t,n){if(n)return t;var r=t.split(".");return r.pop(),r.join(".")+e},r.mapToJSFileName=function(e,t){return r.mapToFileNameExtension(".js",e,t)},r.prototype.emitDocumentWorker=function(t,n,i){var o=t.sourceUnit();e.Debug.assert(this._shouldEmit(t));t.fileName;if(i)this.compilationSettings().mapSourceFiles()&&i.setSourceMapperNewSourceFile(t);else{var a=this.mapOutputFileName(t,n,r.mapToJSFileName),s=new e.TextWriter(a,this.writeByteOrderMarkForDocument(t),0);if(i=new e.Emitter(a,s,n,this.semanticInfoChain),this.compilationSettings().mapSourceFiles()){var l=new e.TextWriter(a+e.SourceMapper.MapFileExtension,!1,1);i.createSourceMapper(t,a,s,l,n.resolvePath)}}return i.setDocument(t),i.emitJavascript(o,!1),i},r.prototype._emitDocument=function(e,t,n,r){if(this._shouldEmit(e))if(e.emitToOwnOutputFile()){var i=this.emitDocumentWorker(e,t);i&&n(i.getOutputFiles())}else r=this.emitDocumentWorker(e,t,r);return r},r.prototype.emitAll=function(t){var r=(new Date).getTime(),i=new n,o=new e.EmitOptions(this,t);if(o.diagnostic())return i.diagnostics.push(o.diagnostic()),i;for(var a=this.fileNames(),s=null,l=0,c=a.length;c>l;l++){var u=a[l],p=this.getDocument(u);s=this._emitDocument(p,o,function(e){return i.outputFiles.push.apply(i.outputFiles,e)},s)}return s&&i.outputFiles.push.apply(i.outputFiles,s.getOutputFiles()),e.emitTime+=(new Date).getTime()-r,i},r.prototype.emit=function(t,r){t=e.switchToForwardSlashes(t);var i=new n,o=new e.EmitOptions(this,r);if(o.diagnostic())return i.diagnostics.push(o.diagnostic()),i;var a=this.getDocument(t);return a.emitToOwnOutputFile()?(this._emitDocument(a,o,function(e){return i.outputFiles.push.apply(i.outputFiles,e)},null),i):this.emitAll(r)},r.prototype.compile=function(e,t){return"undefined"==typeof t&&(t=!1),new s(this,e,t)},r.prototype.getSyntacticDiagnostics=function(t){return t=e.switchToForwardSlashes(t),this.getDocument(t).diagnostics()},r.prototype.getSyntaxTree=function(e){return this.getDocument(e).syntaxTree()},r.prototype.getSourceUnit=function(e){return this.getDocument(e).sourceUnit()},r.prototype.getSemanticDiagnostics=function(t){t=e.switchToForwardSlashes(t);var n=this.getDocument(t),r=(new Date).getTime();e.PullTypeResolver.typeCheck(this.compilationSettings(),this.semanticInfoChain,n);var i=(new Date).getTime();e.typeCheckTime+=i-r;var o=this.semanticInfoChain.getDiagnostics(t);return o=e.ArrayUtilities.distinct(o,e.Diagnostic.equals),o.sort(function(t,n){if(t.fileName()n.fileName())return 1;if(t.start()n.start())return 1;var r=e.diagnosticInformationMap[t.diagnosticKey()].code,i=e.diagnosticInformationMap[n.diagnosticKey()].code;return i>r?-1:r>i?1:0}),o},r.prototype.resolveAllFiles=function(){for(var e=this.fileNames(),t=0,n=e.length;n>t;t++)this.getSemanticDiagnostics(e[t])},r.prototype.getSymbolOfDeclaration=function(t){if(!t)return null;var n=this.semanticInfoChain.getResolver(),r=this.semanticInfoChain.getASTForDecl(t);if(!r)return null;var i=n.getEnclosingDecl(t);return 139===r.kind()||140===r.kind()?this.getSymbolOfDeclaration(i):n.resolveAST(r,!1,new e.PullTypeResolutionContext(n))},r.prototype.extractResolutionContextFromAST=function(t,n,r,i){var o=(r.fileName,null),a=null,s=!1,l=!1,c=new e.PullTypeResolutionContext(t);if(!n)return null;for(var u=this.getASTPath(n),p=0,h=u.length;h>p;p++){var d=u[p];switch(d.kind()){case 222:case 219:case 218:i&&t.resolveAST(d,!0,c);break;case 136:var m=d;s=null!==m.variableDeclarator.typeAnnotation,this.extractResolutionContextForVariable(s,i,t,c,o,m,m.variableDeclarator.equalsValueClause);break;case 225:var y=d;s=null!==y.typeAnnotation,this.extractResolutionContextForVariable(s,i,t,c,o,y,y.equalsValueClause);break;case 213:case 216:if(i){var f=216===d.kind(),g=d,v=null;if(h>p+2&&g.argumentList===u[p+1]&&g.argumentList.arguments===u[p+2]){var S=(g.argumentList.arguments,new e.PullAdditionalCallResolutionData);if(f?t.resolveObjectCreationExpression(g,c,S):t.resolveInvocationExpression(g,c,S),S.actualParametersContextTypeSymbols){var T=u[p+3];if(T)for(var b=0,_=g.argumentList.arguments.nonSeparatorCount();_>b;b++)if(g.argumentList.arguments.nonSeparatorAt(b)===T){var E=S.actualParametersContextTypeSymbols[b];if(E){v=E;break}}}}else f?t.resolveObjectCreationExpression(g,c):t.resolveInvocationExpression(g,c);c.pushContextualType(v,!1,null)}break;case 214:if(i){var v=null,C=c.getContextualType();C&&C.isArrayNamedTypeReference()&&(v=C.getElementType()),c.pushContextualType(v,!1,null)}break;case 215:if(i){var x=d,k=new e.PullAdditionalObjectLiteralResolutionData;t.resolveObjectLiteralExpression(x,s,c,k);var w=u[p+1]&&2===u[p+1].kind()?u[p+2]:u[p+1];if(w){var v=null,A=x.propertyAssignments;if(A&&k.membersContextTypeSymbols)for(var b=0,_=A.nonSeparatorCount();_>b;b++)if(A.nonSeparatorAt(b)===w){var D=k.membersContextTypeSymbols[b];if(D){v=D;break}}c.pushContextualType(v,!1,null)}}break;case 174:if(i){var I=d,v=null;if(u[p+1]&&u[p+1]===I.right){var L=t.resolveAST(I.left,s,c).type;L&&(s=!0,v=L)}c.pushContextualType(v,!1,null)}break;case 150:if(i){var v=null;if(o&&1032192&o.kind){var N=e.getType(a);if(N){var P=t.resolveTypeReference(N,c);P&&(s=!0,v=P)}else{var C=c.getContextualType();if(C&&C.isFunction()){var M=C.getDeclarations()[0].getSignatureSymbol(),O=M.returnType;O&&(s=!0,v=O)}}}c.pushContextualType(v,!1,null)}break;case 122:i&&e.isTypesOnlyLocation(d)&&t.resolveAST(d,!1,c);break;case 163:l=!0}var F=this.semanticInfoChain.getDeclForAST(d);F&&(o=F,a=d)}return n&&n.parent&&11===n.kind()&&(212===n.parent.kind()?n.parent.name===n&&(n=n.parent):121===n.parent.kind()&&n.parent.right===n&&(n=n.parent)),{ast:n,enclosingDecl:o,resolutionContext:c,inContextuallyTypedAssignment:s,inWithBlock:l}},r.prototype.extractResolutionContextForVariable=function(e,t,n,r,i,o,a){if(e&&t){n.resolveAST(o,!1,r);var s=this.semanticInfoChain.getSymbolForAST(o),l=null;s&&e&&(l=s.type),r.pushContextualType(l,!1,null),a&&n.resolveAST(a,e,r)}},r.prototype.getASTPath=function(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t},r.prototype.pullGetSymbolInformationFromAST=function(t,n){var r=this.semanticInfoChain.getResolver(),i=this.extractResolutionContextFromAST(r,t,n,!0);if(!i||i.inWithBlock)return null;t=i.ast;var o=r.resolveAST(t,i.inContextuallyTypedAssignment,i.resolutionContext);if(!o)return e.Debug.assert(120==t.kind(),"No symbol was found for ast and ast was not source unit. Ast Kind: "+e.SyntaxKind[t.kind()]),null;o.isTypeReference()&&(o=o.getReferencedTypeSymbol());var a=this.semanticInfoChain.getAliasSymbolForAST(t);return{symbol:o,aliasSymbol:a,ast:t,enclosingScopeSymbol:this.getSymbolOfDeclaration(i.enclosingDecl)}},r.prototype.pullGetCallInformationFromAST=function(t,n){if(213!==t.kind()&&216!==t.kind())return null;var r=216===t.kind(),i=this.semanticInfoChain.getResolver(),o=this.extractResolutionContextFromAST(i,t,n,!0);if(!o||o.inWithBlock)return null;var a=new e.PullAdditionalCallResolutionData;return r?i.resolveObjectCreationExpression(t,o.resolutionContext,a):i.resolveInvocationExpression(t,o.resolutionContext,a),{targetSymbol:a.targetSymbol,resolvedSignatures:a.resolvedSignatures,candidateSignature:a.candidateSignature,ast:t,enclosingScopeSymbol:this.getSymbolOfDeclaration(o.enclosingDecl),isConstructorCall:r}},r.prototype.pullGetVisibleMemberSymbolsFromAST=function(e,t){var n=this.semanticInfoChain.getResolver(),r=this.extractResolutionContextFromAST(n,e,t,!0);if(!r||r.inWithBlock)return null;var i=n.getVisibleMembersFromExpression(e,r.enclosingDecl,r.resolutionContext);return i?{symbols:i,enclosingScopeSymbol:this.getSymbolOfDeclaration(r.enclosingDecl)}:null},r.prototype.pullGetVisibleDeclsFromAST=function(e,t){var n=this.semanticInfoChain.getResolver(),r=this.extractResolutionContextFromAST(n,e,t,!1);return!r||r.inWithBlock?null:n.getVisibleDecls(r.enclosingDecl)},r.prototype.pullGetContextualMembersFromAST=function(e,t){if(215!==e.kind())return null;var n=this.semanticInfoChain.getResolver(),r=this.extractResolutionContextFromAST(n,e,t,!0);if(!r||r.inWithBlock)return null;var i=n.getVisibleContextSymbols(r.enclosingDecl,r.resolutionContext);return{symbols:i,enclosingScopeSymbol:this.getSymbolOfDeclaration(r.enclosingDecl)} },r.prototype.pullGetDeclInformation=function(e,t,n){var r=this.semanticInfoChain.getResolver(),i=this.extractResolutionContextFromAST(r,t,n,!0);if(!i||i.inWithBlock)return null;var o=e.ast();if(!o)return null;var a=this.extractResolutionContextFromAST(r,o,this.getDocument(o.fileName()),!0);if(!a)return null;var s=e.getSymbol();return r.resolveDeclaredSymbol(s,i.resolutionContext),s.setUnresolved(),{symbol:s,aliasSymbol:null,ast:t,enclosingScopeSymbol:this.getSymbolOfDeclaration(i.enclosingDecl)}},r.prototype.topLevelDeclaration=function(e){return this.semanticInfoChain.topLevelDecl(e)},r.prototype.getDeclForAST=function(e){return this.semanticInfoChain.getDeclForAST(e)},r.prototype.fileNames=function(){return this.semanticInfoChain.fileNames()},r.prototype.topLevelDecl=function(e){return this.semanticInfoChain.topLevelDecl(e)},r}();e.TypeScriptCompiler=o;var a;!function(e){e[e.Syntax=0]="Syntax",e[e.Semantics=1]="Semantics",e[e.EmitOptionsValidation=2]="EmitOptionsValidation",e[e.Emit=3]="Emit",e[e.DeclarationEmit=4]="DeclarationEmit"}(a||(a={}));var s=function(){function t(e,t,n,r){"undefined"==typeof r&&(r=0),this.compiler=e,this.resolvePath=t,this.continueOnDiagnostics=n,this.index=-1,this.fileNames=null,this._current=null,this._emitOptions=null,this._sharedEmitter=null,this._sharedDeclarationEmitter=null,this.hadSyntacticDiagnostics=!1,this.hadSemanticDiagnostics=!1,this.hadEmitDiagnostics=!1,this.fileNames=e.fileNames(),this.compilerPhase=r}return t.prototype.current=function(){return this._current},t.prototype.moveNext=function(){for(this._current=null;this.moveNextInternal();)if(this._current)return!0;return!1},t.prototype.moveNextInternal=function(){for(this.index++;this.shouldMoveToNextPhase();)this.index=0,this.compilerPhase++;if(this.compilerPhase>4)return!1;switch(this.compilerPhase){case 0:return this.moveNextSyntaxPhase();case 1:return this.moveNextSemanticsPhase();case 2:return this.moveNextEmitOptionsValidationPhase();case 3:return this.moveNextEmitPhase();case 4:return this.moveNextDeclarationEmitPhase()}},t.prototype.shouldMoveToNextPhase=function(){switch(this.compilerPhase){case 2:return 1===this.index;case 0:case 1:return this.index==this.fileNames.length;case 3:case 4:return this.index==this.fileNames.length+1}return!1},t.prototype.moveNextSyntaxPhase=function(){e.Debug.assert(this.index>=0&&this.index=0&&this.index=0&&this.index<=this.fileNames.length),this.index=0&&this.index<=this.fileNames.length),this.index0)for(var r=0;ri;i++)r[i]=t.childAt(i).accept(this);var a=new e.ISyntaxList2(this.fileName,r);return this.setSpan(a,n,t),a},t.prototype.visitSeparatedSyntaxList=function(t){for(var n=this.position,r=new Array(t.nonSeparatorCount()),i=0,o=t.childCount();o>i;i++)if(i%2===0)r[i/2]=t.childAt(i).accept(this),this.previousTokenTrailingComments=null;else{var a=t.childAt(i);this.previousTokenTrailingComments=this.convertTokenTrailingComments(a,this.position+a.leadingTriviaWidth()+a.width()),this.movePast(a)}var s=new e.ISeparatedSyntaxList2(this.fileName,r,t.separatorCount());return this.setSpan(s,n,t),s.setPostComments(this.previousTokenTrailingComments),this.previousTokenTrailingComments=null,s},t.prototype.convertComment=function(t,n,r){var i=new e.Comment(t,r,n,n+t.fullWidth());return i},t.prototype.convertComments=function(e,t){for(var n=[],r=0,i=e.count();i>r;r++){var o=e.syntaxTriviaAt(r);if(o.isComment()){var a=i>r+1&&e.syntaxTriviaAt(r+1).isNewLine();n.push(this.convertComment(o,t,a))}t+=o.fullWidth()}return n},t.prototype.mergeComments=function(e,t){return null===e?t:null===t?e:e.concat(t)},t.prototype.convertTokenLeadingComments=function(e,t){if(null===e)return null;var n=e.hasLeadingComment()?this.convertComments(e.leadingTrivia(),t):null,r=this.previousTokenTrailingComments;return this.previousTokenTrailingComments=null,this.mergeComments(r,n)},t.prototype.convertTokenTrailingComments=function(e,t){return null===e||!e.hasTrailingComment()||e.hasTrailingNewLine()?null:this.convertComments(e.trailingTrivia(),t)},t.prototype.convertNodeTrailingComments=function(e,t,n){return null===t||!t.hasTrailingComment()||t.hasTrailingNewLine()?null:this.convertComments(t.trailingTrivia(),n+e.fullWidth()-t.trailingTriviaWidth())},t.prototype.visitIdentifier=function(e){return this.visitToken(e)},t.prototype.visitToken=function(e){var t=this.position,n=this.visitTokenWorker(e);this.movePast(e);var r=t+e.leadingTriviaWidth();return this.setSpanExplicit(n,r,r+e.width()),n},t.prototype.visitTokenWorker=function(t){switch(t.tokenKind){case 60:return new e.BuiltInType(60,t.text(),t.valueText());case 61:return new e.BuiltInType(61,t.text(),t.valueText());case 67:return new e.BuiltInType(67,t.text(),t.valueText());case 69:return new e.BuiltInType(69,t.text(),t.valueText());case 41:return new e.BuiltInType(41,t.text(),t.valueText());case 35:return new e.ThisExpression(t.text(),t.valueText());case 50:return new e.SuperExpression(t.text(),t.valueText());case 37:return new e.LiteralExpression(37,t.text(),t.valueText());case 24:return new e.LiteralExpression(24,t.text(),t.valueText());case 32:return new e.LiteralExpression(32,t.text(),t.valueText());case 14:return new e.StringLiteral(t.text(),t.valueText());case 12:return new e.RegularExpressionLiteral(t.text(),t.valueText());case 13:var n=this.position,r=this.convertTokenLeadingComments(t,n),i=new e.NumericLiteral(t.value(),t.text(),t.valueText());return i.setPreComments(r),i;case 11:return new e.Identifier(t.text());default:throw e.Errors.invalidOperation()}},t.prototype.visitSourceUnit=function(t){var n=this.position;e.Debug.assert(0===n);var r=this.visitSyntaxList(t.moduleElements),i=new e.SourceUnit(r,this.fileName);return this.setSpanExplicit(i,n,n+t.fullWidth()),i},t.prototype.visitExternalModuleReference=function(t){var n=this.position;this.moveTo(t,t.stringLiteral);var r=t.stringLiteral.accept(this);this.movePast(t.closeParenToken);var i=new e.ExternalModuleReference(r);return this.setSpan(i,n,t),i},t.prototype.visitModuleNameModuleReference=function(t){var n=this.position,r=t.moduleName.accept(this),i=new e.ModuleNameModuleReference(r);return this.setSpan(i,n,t),i},t.prototype.visitClassDeclaration=function(t){var n=this.position;this.moveTo(t,t.identifier);var r=this.visitIdentifier(t.identifier),i=this.visitTypeParameterList(t.typeParameterList),o=t.heritageClauses?this.visitSyntaxList(t.heritageClauses):null;this.movePast(t.openBraceToken);var a=this.visitSyntaxList(t.classElements),s=this.createTokenSpan(this.position,t.closeBraceToken);this.movePast(t.closeBraceToken);var l=this.visitModifiers(t.modifiers),c=new e.ClassDeclaration(l,r,i,o,a,s);return this.setCommentsAndSpan(c,n,t),c},t.prototype.visitModifiers=function(t){var n=null;return e.SyntaxUtilities.containsToken(t,47)&&(n=n||[],n.push(1)),e.SyntaxUtilities.containsToken(t,63)&&(n=n||[],n.push(8)),e.SyntaxUtilities.containsToken(t,58)&&(n=n||[],n.push(16)),e.SyntaxUtilities.containsToken(t,57)&&(n=n||[],n.push(4)),e.SyntaxUtilities.containsToken(t,55)&&(n=n||[],n.push(2)),n||e.sentinelEmptyArray},t.prototype.visitInterfaceDeclaration=function(t){var n=this.position;this.moveTo(t,t.identifier);var r=this.visitIdentifier(t.identifier),i=this.visitTypeParameterList(t.typeParameterList),o=t.heritageClauses?this.visitSyntaxList(t.heritageClauses):null,a=this.visitObjectType(t.body),s=this.visitModifiers(t.modifiers),l=new e.InterfaceDeclaration(s,r,i,o,a);return this.setCommentsAndSpan(l,n,t),l},t.prototype.visitHeritageClause=function(t){var n=this.position;this.movePast(t.extendsOrImplementsKeyword);var r=this.visitSeparatedSyntaxList(t.typeNames),i=new e.HeritageClause(48===t.extendsOrImplementsKeyword.tokenKind?230:231,r);return this.setSpan(i,n,t),i},t.prototype.visitModuleDeclaration=function(t){var n=this.position,r=this.visitModifiers(t.modifiers);this.moveTo(t,t.moduleKeyword),this.movePast(t.moduleKeyword);var i=t.name?t.name.accept(this):null,o=t.stringLiteral?t.stringLiteral.accept(this):null;this.movePast(t.openBraceToken);var a=this.visitSyntaxList(t.moduleElements),s=this.createTokenSpan(this.position,t.closeBraceToken);this.movePast(t.closeBraceToken);var l=new e.ModuleDeclaration(r,i,o,a,s);return this.setCommentsAndSpan(l,n,t),l},t.prototype.visitFunctionDeclaration=function(t){var n=this.position;this.moveTo(t,t.identifier);var r=this.visitIdentifier(t.identifier),i=this.visitCallSignature(t.callSignature),o=t.block?this.visitBlock(t.block):null;this.movePast(t.semicolonToken);var a=new e.FunctionDeclaration(this.visitModifiers(t.modifiers),r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitEnumDeclaration=function(t){var n=this.position;this.moveTo(t,t.identifier);var r=this.visitIdentifier(t.identifier);this.movePast(t.openBraceToken);var i=this.visitSeparatedSyntaxList(t.enumElements);this.movePast(t.closeBraceToken);var o=new e.EnumDeclaration(this.visitModifiers(t.modifiers),r,i);return this.setCommentsAndSpan(o,n,t),o},t.prototype.visitEnumElement=function(t){var n=this.position,r=this.visitToken(t.propertyName),i=null!==t.equalsValueClause?this.visitEqualsValueClause(t.equalsValueClause):null,o=new e.EnumElement(r,i);return this.setCommentsAndSpan(o,n,t),o},t.prototype.visitImportDeclaration=function(t){var n=this.position;this.moveTo(t,t.identifier);var r=this.visitIdentifier(t.identifier);this.movePast(t.equalsToken);var i=t.moduleReference.accept(this);this.movePast(t.semicolonToken);var o=this.visitModifiers(t.modifiers),a=new e.ImportDeclaration(o,r,i);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitExportAssignment=function(t){var n=this.position;this.moveTo(t,t.identifier);var r=this.visitIdentifier(t.identifier);this.movePast(t.semicolonToken);var i=new e.ExportAssignment(r);return this.setSpan(i,n,t),i},t.prototype.visitVariableStatement=function(t){var n=this.position; this.moveTo(t,t.variableDeclaration);var r=t.variableDeclaration.accept(this);this.movePast(t.semicolonToken);var i=this.visitModifiers(t.modifiers),o=new e.VariableStatement(i,r);return this.setCommentsAndSpan(o,n,t),o},t.prototype.visitVariableDeclaration=function(t){var n=this.position;this.moveTo(t,t.variableDeclarators);var r=this.visitSeparatedSyntaxList(t.variableDeclarators),i=new e.VariableDeclaration(r,t.tokenKind);return this.setSpan(i,n,t),i},t.prototype.visitVariableDeclarator=function(t){var n=this.position,r=this.visitToken(t.propertyName),i=this.visitTypeAnnotation(t.typeAnnotation),o=t.equalsValueClause?this.visitEqualsValueClause(t.equalsValueClause):null,a=new e.VariableDeclarator(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitEqualsValueClause=function(t){var n=this.position,r=this.convertTokenTrailingComments(t.equalsToken,this.position+t.equalsToken.leadingTriviaWidth()+t.equalsToken.width());this.movePast(t.equalsToken);var i=t.value.accept(this);i.setPreComments(this.mergeComments(r,i.preComments()));var o=new e.EqualsValueClause(i);return this.setSpan(o,n,t),o},t.prototype.visitPrefixUnaryExpression=function(t){var n=this.position;this.movePast(t.operatorToken);var r=t.operand.accept(this),i=new e.PrefixUnaryExpression(t.kind(),r);return this.setSpan(i,n,t),i},t.prototype.visitArrayLiteralExpression=function(t){{var n=this.position;this.position+t.openBracketToken.leadingTriviaWidth()}this.movePast(t.openBracketToken);{var r=this.visitSeparatedSyntaxList(t.expressions);this.position+t.closeBracketToken.leadingTriviaWidth()}this.movePast(t.closeBracketToken);var i=new e.ArrayLiteralExpression(r);return this.setSpan(i,n,t),i},t.prototype.visitOmittedExpression=function(t){var n=this.position,r=new e.OmittedExpression;return this.setSpan(r,n,t),r},t.prototype.visitParenthesizedExpression=function(t){var n=this.position,r=t.openParenToken,i=this.convertTokenTrailingComments(r,n+r.leadingTriviaWidth()+r.width());this.movePast(r);var o=t.expression.accept(this);this.movePast(t.closeParenToken);var a=new e.ParenthesizedExpression(i,o);return this.setSpan(a,n,t),a},t.prototype.visitSimpleArrowFunctionExpression=function(t){var n=this.position,r=t.identifier.accept(this);this.movePast(t.equalsGreaterThanToken);var i=t.block?this.visitBlock(t.block):null,o=t.expression?t.expression.accept(this):null,a=new e.SimpleArrowFunctionExpression(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitParenthesizedArrowFunctionExpression=function(t){var n=this.position,r=this.visitCallSignature(t.callSignature);this.movePast(t.equalsGreaterThanToken);var i=t.block?this.visitBlock(t.block):null,o=t.expression?t.expression.accept(this):null,a=new e.ParenthesizedArrowFunctionExpression(r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitType=function(e){return e?e.accept(this):null},t.prototype.visitTypeQuery=function(t){var n=this.position;this.movePast(t.typeOfKeyword);var r=t.name.accept(this),i=new e.TypeQuery(r);return this.setSpan(i,n,t),i},t.prototype.visitQualifiedName=function(t){var n=this.position,r=this.visitType(t.left);this.movePast(t.dotToken);var i=this.visitIdentifier(t.right),o=new e.QualifiedName(r,i);return this.setSpan(o,n,t),o},t.prototype.visitTypeArgumentList=function(t){if(null===t)return null;var n=this.position;this.movePast(t.lessThanToken);var r=this.visitSeparatedSyntaxList(t.typeArguments);this.movePast(t.greaterThanToken);var i=new e.TypeArgumentList(r);return this.setSpan(i,n,t),i},t.prototype.visitConstructorType=function(t){var n=this.position;this.movePast(t.newKeyword);var r=this.visitTypeParameterList(t.typeParameterList),i=this.visitParameterList(t.parameterList);this.movePast(t.equalsGreaterThanToken);var o=this.visitType(t.type),a=new e.ConstructorType(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitFunctionType=function(t){var n=this.position,r=this.visitTypeParameterList(t.typeParameterList),i=this.visitParameterList(t.parameterList);this.movePast(t.equalsGreaterThanToken);var o=this.visitType(t.type),a=new e.FunctionType(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitObjectType=function(t){var n=this.position;this.movePast(t.openBraceToken);var r=this.visitSeparatedSyntaxList(t.typeMembers);this.movePast(t.closeBraceToken);var i=new e.ObjectType(r);return this.setSpan(i,n,t),i},t.prototype.visitArrayType=function(t){var n=this.position,r=this.visitType(t.type);this.movePast(t.openBracketToken),this.movePast(t.closeBracketToken);var i=new e.ArrayType(r);return this.setSpan(i,n,t),i},t.prototype.visitGenericType=function(t){var n=this.position,r=this.visitType(t.name),i=this.visitTypeArgumentList(t.typeArgumentList),o=new e.GenericType(r,i);return this.setSpan(o,n,t),o},t.prototype.visitTypeAnnotation=function(t){if(!t)return null;var n=this.position;this.movePast(t.colonToken);var r=this.visitType(t.type),i=new e.TypeAnnotation(r);return this.setSpan(i,n,t),i},t.prototype.visitBlock=function(t){if(!t)return null;var n=this.position;this.movePast(t.openBraceToken);var r=this.visitSyntaxList(t.statements),i=(this.position,this.convertTokenLeadingComments(t.closeBraceToken,this.position)),o=this.createTokenSpan(this.position,t.closeBraceToken);this.movePast(t.closeBraceToken);var a=new e.Block(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitParameter=function(t){var n=this.position,r=this.createTokenSpan(this.position,t.dotDotDotToken);this.moveTo(t,t.identifier);var i=this.visitIdentifier(t.identifier),o=this.createTokenSpan(this.position,t.questionToken);this.movePast(t.questionToken);var a=this.visitTypeAnnotation(t.typeAnnotation),s=t.equalsValueClause?t.equalsValueClause.accept(this):null,l=this.visitModifiers(t.modifiers),c=new e.Parameter(r,l,i,o,a,s);return this.setCommentsAndSpan(c,n,t),c},t.prototype.visitMemberAccessExpression=function(t){var n=this.position,r=t.expression.accept(this);this.movePast(t.dotToken);var i=this.visitIdentifier(t.name),o=new e.MemberAccessExpression(r,i);return this.setSpan(o,n,t),o},t.prototype.visitPostfixUnaryExpression=function(t){var n=this.position,r=t.operand.accept(this);this.movePast(t.operatorToken);var i=new e.PostfixUnaryExpression(210===t.kind()?210:211,r);return this.setSpan(i,n,t),i},t.prototype.visitElementAccessExpression=function(t){var n=this.position,r=t.expression.accept(this);this.movePast(t.openBracketToken);var i=t.argumentExpression.accept(this);this.movePast(t.closeBracketToken);var o=new e.ElementAccessExpression(r,i);return this.setSpan(o,n,t),o},t.prototype.visitInvocationExpression=function(t){var n=this.position,r=t.expression.accept(this),i=this.visitArgumentList(t.argumentList),o=new e.InvocationExpression(r,i);return this.setSpan(o,n,t),o},t.prototype.visitArgumentList=function(t){if(null===t)return null;var n=this.position,r=this.visitTypeArgumentList(t.typeArgumentList);this.movePast(t.openParenToken);var i=this.visitSeparatedSyntaxList(t.arguments);if(0===t.arguments.fullWidth()&&0===t.closeParenToken.fullWidth()){var o=n+t.openParenToken.leadingTriviaWidth()+t.openParenToken.width();this.setSpanExplicit(i,o,o+t.openParenToken.trailingTriviaWidth())}var a=this.createTokenSpan(this.position,t.closeParenToken);this.movePast(t.closeParenToken);var s=new e.ArgumentList(r,i,a);return this.setSpan(s,n,t),s},t.prototype.visitBinaryExpression=function(t){var n=this.position,r=t.left.accept(this);this.movePast(t.operatorToken);var i=t.right.accept(this),o=new e.BinaryExpression(t.kind(),r,i);return this.setSpan(o,n,t),o},t.prototype.visitConditionalExpression=function(t){var n=this.position,r=t.condition.accept(this);this.movePast(t.questionToken);var i=t.whenTrue.accept(this);this.movePast(t.colonToken);var o=t.whenFalse.accept(this),a=new e.ConditionalExpression(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitConstructSignature=function(t){var n=this.position;this.movePast(t.newKeyword);var r=this.visitCallSignature(t.callSignature),i=new e.ConstructSignature(r);return this.setCommentsAndSpan(i,n,t),i},t.prototype.visitMethodSignature=function(t){var n=this.position,r=this.visitToken(t.propertyName),i=this.createTokenSpan(this.position,t.questionToken);this.movePast(t.questionToken);var o=this.visitCallSignature(t.callSignature),a=new e.MethodSignature(r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitIndexSignature=function(t){var n=this.position;this.movePast(t.openBracketToken);var r=t.parameter.accept(this);this.movePast(t.closeBracketToken);var i=this.visitTypeAnnotation(t.typeAnnotation),o=new e.IndexSignature(r,i);return this.setCommentsAndSpan(o,n,t),o},t.prototype.visitPropertySignature=function(t){var n=this.position,r=this.visitToken(t.propertyName),i=this.createTokenSpan(this.position,t.questionToken);this.movePast(t.questionToken);var o=this.visitTypeAnnotation(t.typeAnnotation),a=new e.PropertySignature(r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitParameterList=function(t){if(!t)return null;var n=this.position,r=t.openParenToken;this.previousTokenTrailingComments=this.convertTokenTrailingComments(r,n+r.leadingTriviaWidth()+r.width());var i=null;0===t.parameters.childCount()&&(i=this.previousTokenTrailingComments,this.previousTokenTrailingComments=null),this.movePast(t.openParenToken);var o=this.visitSeparatedSyntaxList(t.parameters);this.movePast(t.closeParenToken);var a=new e.ParameterList(i,o);return this.setSpan(a,n,t),a},t.prototype.visitCallSignature=function(t){var n=this.position,r=this.visitTypeParameterList(t.typeParameterList),i=this.visitParameterList(t.parameterList),o=this.visitTypeAnnotation(t.typeAnnotation),a=new e.CallSignature(r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitTypeParameterList=function(t){if(!t)return null;var n=this.position;this.movePast(t.lessThanToken);var r=this.visitSeparatedSyntaxList(t.typeParameters);this.movePast(t.greaterThanToken);var i=new e.TypeParameterList(r);return this.setSpan(i,n,t),i},t.prototype.visitTypeParameter=function(t){var n=this.position,r=this.visitIdentifier(t.identifier),i=t.constraint?t.constraint.accept(this):null,o=new e.TypeParameter(r,i);return this.setSpan(o,n,t),o},t.prototype.visitConstraint=function(t){var n=this.position;this.movePast(t.extendsKeyword);var r=this.visitType(t.type),i=new e.Constraint(r);return this.setSpan(i,n,t),i},t.prototype.visitIfStatement=function(t){var n=this.position;this.moveTo(t,t.condition);var r=t.condition.accept(this);this.movePast(t.closeParenToken);var i=t.statement.accept(this),o=t.elseClause?t.elseClause.accept(this):null,a=new e.IfStatement(r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitElseClause=function(t){var n=this.position;this.movePast(t.elseKeyword);var r=t.statement.accept(this),i=new e.ElseClause(r);return this.setSpan(i,n,t),i},t.prototype.visitExpressionStatement=function(t){var n=this.position,r=this.convertTokenLeadingComments(t.firstToken(),n),i=t.expression.accept(this),o=(this.position,this.convertComments(t.semicolonToken.trailingTrivia(),this.position+t.semicolonToken.leadingTriviaWidth()+t.semicolonToken.width()));this.movePast(t.semicolonToken);var a=new e.ExpressionStatement(i);return this.setSpan(a,n,t),a.setPreComments(r),a.setPostComments(o),a},t.prototype.visitConstructorDeclaration=function(t){var n=this.position;this.moveTo(t,t.parameterList);var r=this.visitParameterList(t.parameterList),i=t.block?t.block.accept(this):null;this.movePast(t.semicolonToken);var o=new e.ConstructorDeclaration(r,i);return this.setCommentsAndSpan(o,n,t),o},t.prototype.visitIndexMemberDeclaration=function(t){var n=this.position;this.moveTo(t,t.indexSignature);var r=t.indexSignature.accept(this);this.movePast(t.semicolonToken);var i=new e.IndexMemberDeclaration(r);return this.setSpan(i,n,t),i},t.prototype.visitMemberFunctionDeclaration=function(t){var n=this.position;this.moveTo(t,t.propertyName);var r=this.visitToken(t.propertyName),i=this.visitCallSignature(t.callSignature),o=t.block?this.visitBlock(t.block):null;this.movePast(t.semicolonToken);var a=new e.MemberFunctionDeclaration(this.visitModifiers(t.modifiers),r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitGetAccessor=function(t){var n=this.position;this.moveTo(t,t.propertyName);var r=this.visitToken(t.propertyName),i=this.visitParameterList(t.parameterList),o=this.visitTypeAnnotation(t.typeAnnotation),a=t.block?t.block.accept(this):null,s=new e.GetAccessor(this.visitModifiers(t.modifiers),r,i,o,a);return this.setCommentsAndSpan(s,n,t),s},t.prototype.visitSetAccessor=function(t){var n=this.position;this.moveTo(t,t.propertyName);var r=this.visitToken(t.propertyName),i=this.visitParameterList(t.parameterList),o=t.block?t.block.accept(this):null,a=new e.SetAccessor(this.visitModifiers(t.modifiers),r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitMemberVariableDeclaration=function(t){var n=this.position;this.moveTo(t,t.variableDeclarator);var r=t.variableDeclarator.accept(this);this.movePast(t.semicolonToken);var i=this.visitModifiers(t.modifiers),o=new e.MemberVariableDeclaration(i,r);return this.setCommentsAndSpan(o,n,t),o},t.prototype.visitThrowStatement=function(t){var n=this.position;this.movePast(t.throwKeyword);var r=t.expression.accept(this);this.movePast(t.semicolonToken);var i=new e.ThrowStatement(r);return this.setSpan(i,n,t),i},t.prototype.visitReturnStatement=function(t){var n=this.position;this.movePast(t.returnKeyword);var r=t.expression?t.expression.accept(this):null;this.movePast(t.semicolonToken);var i=new e.ReturnStatement(r);return this.setCommentsAndSpan(i,n,t),i},t.prototype.visitObjectCreationExpression=function(t){var n=this.position;this.movePast(t.newKeyword);var r=t.expression.accept(this),i=this.visitArgumentList(t.argumentList),o=new e.ObjectCreationExpression(r,i);return this.setSpan(o,n,t),o},t.prototype.visitSwitchStatement=function(t){var n=this.position;this.movePast(t.switchKeyword),this.movePast(t.openParenToken);var r=t.expression.accept(this),i=this.createTokenSpan(this.position,t.closeParenToken);this.movePast(t.closeParenToken),this.movePast(t.openBraceToken);var o=this.visitSyntaxList(t.switchClauses);this.movePast(t.closeBraceToken);var a=new e.SwitchStatement(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitCaseSwitchClause=function(t){var n=this.position;this.movePast(t.caseKeyword);var r=t.expression.accept(this);this.movePast(t.colonToken);var i=this.visitSyntaxList(t.statements),o=new e.CaseSwitchClause(r,i);return this.setSpan(o,n,t),o},t.prototype.visitDefaultSwitchClause=function(t){var n=this.position;this.movePast(t.defaultKeyword),this.movePast(t.colonToken);var r=this.visitSyntaxList(t.statements),i=new e.DefaultSwitchClause(r);return this.setSpan(i,n,t),i},t.prototype.visitBreakStatement=function(t){var n=this.position;this.movePast(t.breakKeyword);var r=t.identifier?t.identifier.accept(this):null;this.movePast(t.semicolonToken);var i=new e.BreakStatement(r);return this.setSpan(i,n,t),i},t.prototype.visitContinueStatement=function(t){var n=this.position;this.movePast(t.continueKeyword);var r=t.identifier?t.identifier.accept(this):null;this.movePast(t.semicolonToken);var i=new e.ContinueStatement(r);return this.setSpan(i,n,t),i},t.prototype.visitForStatement=function(t){var n=this.position;this.movePast(t.forKeyword),this.movePast(t.openParenToken);var r=t.variableDeclaration?t.variableDeclaration.accept(this):null,i=t.initializer?t.initializer.accept(this):null;this.movePast(t.firstSemicolonToken);var o=t.condition?t.condition.accept(this):null;this.movePast(t.secondSemicolonToken);var a=t.incrementor?t.incrementor.accept(this):null;this.movePast(t.closeParenToken);var s=t.statement.accept(this),l=new e.ForStatement(r,i,o,a,s);return this.setSpan(l,n,t),l},t.prototype.visitForInStatement=function(t){var n=this.position;this.movePast(t.forKeyword),this.movePast(t.openParenToken);var r=t.variableDeclaration?t.variableDeclaration.accept(this):null,i=t.left?t.left.accept(this):null;this.movePast(t.inKeyword);var o=t.expression.accept(this);this.movePast(t.closeParenToken);var a=t.statement.accept(this),s=new e.ForInStatement(r,i,o,a);return this.setSpan(s,n,t),s},t.prototype.visitWhileStatement=function(t){var n=this.position;this.moveTo(t,t.condition);var r=t.condition.accept(this);this.movePast(t.closeParenToken);var i=t.statement.accept(this),o=new e.WhileStatement(r,i);return this.setSpan(o,n,t),o},t.prototype.visitWithStatement=function(t){var n=this.position;this.moveTo(t,t.condition);var r=t.condition.accept(this);this.movePast(t.closeParenToken);var i=t.statement.accept(this),o=new e.WithStatement(r,i);return this.setSpan(o,n,t),o},t.prototype.visitCastExpression=function(t){var n=this.position;this.movePast(t.lessThanToken);var r=this.visitType(t.type);this.movePast(t.greaterThanToken);var i=t.expression.accept(this),o=new e.CastExpression(r,i);return this.setSpan(o,n,t),o},t.prototype.visitObjectLiteralExpression=function(t){{var n=this.position;this.position+t.openBraceToken.leadingTriviaWidth()}this.movePast(t.openBraceToken);{var r=this.visitSeparatedSyntaxList(t.propertyAssignments);this.position+t.closeBraceToken.leadingTriviaWidth()}this.movePast(t.closeBraceToken);var i=new e.ObjectLiteralExpression(r);return this.setCommentsAndSpan(i,n,t),i},t.prototype.visitSimplePropertyAssignment=function(t){var n=this.position,r=this.convertTokenLeadingComments(t.firstToken(),n),i=this.convertNodeTrailingComments(t,t.lastToken(),n),o=t.propertyName.accept(this),a=this.convertTokenTrailingComments(t.colonToken,this.position+t.colonToken.leadingTriviaWidth()+t.colonToken.width());this.movePast(t.colonToken);var s=t.expression.accept(this);s.setPreComments(this.mergeComments(a,s.preComments()));var l=new e.SimplePropertyAssignment(o,s);return this.setSpan(l,n,t),l.setPreComments(r),l.setPostComments(i),l},t.prototype.visitFunctionPropertyAssignment=function(t){var n=this.position,r=t.propertyName.accept(this),i=this.visitCallSignature(t.callSignature),o=this.visitBlock(t.block),a=new e.FunctionPropertyAssignment(r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitFunctionExpression=function(t){var n=this.position;this.movePast(t.functionKeyword);var r=null===t.identifier?null:this.visitIdentifier(t.identifier),i=this.visitCallSignature(t.callSignature),o=t.block?t.block.accept(this):null,a=new e.FunctionExpression(r,i,o);return this.setCommentsAndSpan(a,n,t),a},t.prototype.visitEmptyStatement=function(t){var n=this.position;this.movePast(t.semicolonToken);var r=new e.EmptyStatement;return this.setSpan(r,n,t),r},t.prototype.visitTryStatement=function(t){var n=this.position;this.movePast(t.tryKeyword);var r=t.block.accept(this),i=null;null!==t.catchClause&&(i=t.catchClause.accept(this));var o=null;null!==t.finallyClause&&(o=t.finallyClause.accept(this));var a=new e.TryStatement(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitCatchClause=function(t){var n=this.position;this.movePast(t.catchKeyword),this.movePast(t.openParenToken);var r=this.visitIdentifier(t.identifier),i=this.visitTypeAnnotation(t.typeAnnotation);this.movePast(t.closeParenToken);var o=t.block.accept(this),a=new e.CatchClause(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitFinallyClause=function(t){var n=this.position;this.movePast(t.finallyKeyword);var r=t.block.accept(this),i=new e.FinallyClause(r);return this.setSpan(i,n,t),i},t.prototype.visitLabeledStatement=function(t){var n=this.position,r=this.visitIdentifier(t.identifier);this.movePast(t.colonToken);var i=t.statement.accept(this),o=new e.LabeledStatement(r,i);return this.setSpan(o,n,t),o},t.prototype.visitDoStatement=function(t){var n=this.position;this.movePast(t.doKeyword);var r=t.statement.accept(this),i=this.createTokenSpan(this.position,t.whileKeyword);this.movePast(t.whileKeyword),this.movePast(t.openParenToken);var o=t.condition.accept(this);this.movePast(t.closeParenToken),this.movePast(t.semicolonToken);var a=new e.DoStatement(r,i,o);return this.setSpan(a,n,t),a},t.prototype.visitTypeOfExpression=function(t){var n=this.position;this.movePast(t.typeOfKeyword);var r=t.expression.accept(this),i=new e.TypeOfExpression(r);return this.setSpan(i,n,t),i},t.prototype.visitDeleteExpression=function(t){var n=this.position;this.movePast(t.deleteKeyword);var r=t.expression.accept(this),i=new e.DeleteExpression(r);return this.setSpan(i,n,t),i},t.prototype.visitVoidExpression=function(t){var n=this.position;this.movePast(t.voidKeyword);var r=t.expression.accept(this),i=new e.VoidExpression(r);return this.setSpan(i,n,t),i},t.prototype.visitDebuggerStatement=function(t){var n=this.position;this.movePast(t.debuggerKeyword),this.movePast(t.semicolonToken);var r=new e.DebuggerStatement;return this.setSpan(r,n,t),r},t}();e.SyntaxTreeToAstVisitor=r;var i=function(r){function i(){r.apply(this,arguments)}return __extends(i,r),i.prototype.applyDelta=function(r,i){if(0!==i){var o=function(e){switch(t(e,i),n(e.preComments(),i),n(e.postComments(),i),e.kind()){case 146:t(e.closeBraceToken,i);break;case 226:t(e.closeParenToken,i);break;case 130:t(e.endingToken,i);break;case 131:t(e.closeBraceToken,i);break;case 161:t(e.whileKeyword,i);break;case 151:t(e.closeParenToken,i)}};e.getAstWalkerFactory().simpleWalk(r,o)}},i.prototype.setSpanExplicit=function(e,t,n){if(-1!==e._start){var i=t-e._start;this.applyDelta(e,i),e._end=n}else r.prototype.setSpanExplicit.call(this,e,t,n)},i.prototype.getAndMovePastAST=function(e){if(null!==this.previousTokenTrailingComments)return null;var t=e._ast;if(!t)return null;var n=this.position;return this.movePast(e),this.setSpan(t,n,e),t},i.prototype.setAST=function(e,t){e._ast=t},i.prototype.visitSyntaxList=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitSyntaxList.call(this,e),e.childCount()>0&&this.setAST(e,t)),t},i.prototype.visitSeparatedSyntaxList=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitSeparatedSyntaxList.call(this,e),e.childCount()>0&&this.setAST(e,t)),t},i.prototype.visitToken=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitToken.call(this,e),this.setAST(e,t)),t},i.prototype.visitClassDeclaration=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitClassDeclaration.call(this,e),this.setAST(e,t)),t},i.prototype.visitInterfaceDeclaration=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitInterfaceDeclaration.call(this,e),this.setAST(e,t)),t},i.prototype.visitHeritageClause=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitHeritageClause.call(this,e),this.setAST(e,t)),t},i.prototype.visitModuleDeclaration=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitModuleDeclaration.call(this,e),this.setAST(e,t)),t},i.prototype.visitFunctionDeclaration=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitFunctionDeclaration.call(this,e),this.setAST(e,t)),t},i.prototype.visitImportDeclaration=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitImportDeclaration.call(this,e),this.setAST(e,t)),t},i.prototype.visitExportAssignment=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitExportAssignment.call(this,e),this.setAST(e,t)),t},i.prototype.visitPrefixUnaryExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitPrefixUnaryExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitArrayLiteralExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitArrayLiteralExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitOmittedExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitOmittedExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitParenthesizedExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitParenthesizedExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitSimpleArrowFunctionExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitSimpleArrowFunctionExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitParenthesizedArrowFunctionExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitParenthesizedArrowFunctionExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitQualifiedName=function(e){var t=this.getAndMovePastAST(e);if(!t){var t=r.prototype.visitQualifiedName.call(this,e);this.setAST(e,t)}return t},i.prototype.visitConstructorType=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitConstructorType.call(this,e),this.setAST(e,t)),t},i.prototype.visitFunctionType=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitFunctionType.call(this,e),this.setAST(e,t)),t},i.prototype.visitObjectType=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitObjectType.call(this,e),this.setAST(e,t)),t},i.prototype.visitArrayType=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitArrayType.call(this,e),this.setAST(e,t)),t},i.prototype.visitGenericType=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitGenericType.call(this,e),this.setAST(e,t)),t},i.prototype.visitBlock=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitBlock.call(this,e),this.setAST(e,t)),t},i.prototype.visitParameter=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitParameter.call(this,e),this.setAST(e,t)),t},i.prototype.visitMemberAccessExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitMemberAccessExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitPostfixUnaryExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitPostfixUnaryExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitElementAccessExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitElementAccessExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitInvocationExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitInvocationExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitBinaryExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitBinaryExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitConditionalExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitConditionalExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitConstructSignature=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitConstructSignature.call(this,e),this.setAST(e,t)),t},i.prototype.visitMethodSignature=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitMethodSignature.call(this,e),this.setAST(e,t)),t},i.prototype.visitIndexSignature=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitIndexSignature.call(this,e),this.setAST(e,t)),t},i.prototype.visitPropertySignature=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitPropertySignature.call(this,e),this.setAST(e,t)),t},i.prototype.visitCallSignature=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitCallSignature.call(this,e),this.setAST(e,t)),t},i.prototype.visitTypeParameter=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitTypeParameter.call(this,e),this.setAST(e,t)),t},i.prototype.visitIfStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitIfStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitExpressionStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitExpressionStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitConstructorDeclaration=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitConstructorDeclaration.call(this,e),this.setAST(e,t)),t},i.prototype.visitMemberFunctionDeclaration=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitMemberFunctionDeclaration.call(this,e),this.setAST(e,t)),t},i.prototype.visitGetAccessor=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitGetAccessor.call(this,e),this.setAST(e,t)),t},i.prototype.visitSetAccessor=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitSetAccessor.call(this,e),this.setAST(e,t)),t},i.prototype.visitMemberVariableDeclaration=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitMemberVariableDeclaration.call(this,e),this.setAST(e,t)),t},i.prototype.visitThrowStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitThrowStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitReturnStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitReturnStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitObjectCreationExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitObjectCreationExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitSwitchStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitSwitchStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitCaseSwitchClause=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitCaseSwitchClause.call(this,e),this.setAST(e,t)),t},i.prototype.visitDefaultSwitchClause=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitDefaultSwitchClause.call(this,e),this.setAST(e,t)),t},i.prototype.visitBreakStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitBreakStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitContinueStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitContinueStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitForStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitForStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitForInStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitForInStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitWhileStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitWhileStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitWithStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitWithStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitCastExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitCastExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitObjectLiteralExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitObjectLiteralExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitSimplePropertyAssignment=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitSimplePropertyAssignment.call(this,e),this.setAST(e,t)),t},i.prototype.visitFunctionPropertyAssignment=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitFunctionPropertyAssignment.call(this,e),this.setAST(e,t)),t},i.prototype.visitFunctionExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitFunctionExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitEmptyStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitEmptyStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitTryStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitTryStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitCatchClause=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitCatchClause.call(this,e),this.setAST(e,t)),t},i.prototype.visitLabeledStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitLabeledStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitDoStatement=function(e){var t=this.getAndMovePastAST(e); return t||(t=r.prototype.visitDoStatement.call(this,e),this.setAST(e,t)),t},i.prototype.visitTypeOfExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitTypeOfExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitDeleteExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitDeleteExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitVoidExpression=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitVoidExpression.call(this,e),this.setAST(e,t)),t},i.prototype.visitDebuggerStatement=function(e){var t=this.getAndMovePastAST(e);return t||(t=r.prototype.visitDebuggerStatement.call(this,e),this.setAST(e,t)),t},i}(r)}(TypeScript||(TypeScript={}));var TypeScript;!function(e){function t(e,t){return o(e,t,!1)}function n(e,t){return o(e,t,!0)}function r(e,t){return a(e,t,!1)}function i(e,t){return a(e,t,!0)}function o(e,t,n){return e===t?!0:null!==e&&null!==t&&e.kind()===t.kind()&&e.structuralEquals(t,n)}function a(e,t,n){return e===t?!0:null!==e&&null!==t&&e.structuralEquals(t,n)}function s(r,i,o){return e.ArrayUtilities.sequenceEquals(r,i,o?n:t)}function l(t,n,o){return e.ArrayUtilities.sequenceEquals(t,n,o?i:r)}function c(t,n,r){"undefined"==typeof r&&(r=null);var i=t.getSpan();return new e.Diagnostic(t.fileName(),t.semanticInfoChain().lineMap(t.fileName()),i.start(),i.length(),n,r)}var u=function(){function e(e,t){this._start=e,this._end=t}return e.prototype.start=function(){return this._start},e.prototype.end=function(){return this._end},e}();e.ASTSpan=u;var p=0;e.structuralEqualsNotIncludingPosition=t,e.structuralEqualsIncludingPosition=n;var h=function(){function t(){this.parent=null,this._start=-1,this._end=-1,this._trailingTriviaWidth=0,this._astID=p++,this._preComments=null,this._postComments=null}return t.prototype.syntaxID=function(){return this._astID},t.prototype.start=function(){return this._start},t.prototype.end=function(){return this._end},t.prototype.trailingTriviaWidth=function(){return this._trailingTriviaWidth},t.prototype.fileName=function(){return this.parent.fileName()},t.prototype.kind=function(){throw e.Errors.abstract()},t.prototype.preComments=function(){return this._preComments},t.prototype.postComments=function(){return this._postComments},t.prototype.setPreComments=function(e){e&&e.length?this._preComments=e:this._preComments&&(this._preComments=null)},t.prototype.setPostComments=function(e){e&&e.length?this._postComments=e:this._postComments&&(this._postComments=null)},t.prototype.width=function(){return this.end()-this.start()},t.prototype.structuralEquals=function(e,t){return!t||this.start()===e.start()&&this.end()===e.end()?l(this.preComments(),e.preComments(),t)&&l(this.postComments(),e.postComments(),t):!1},t}();e.AST=h;var d=function(t){function n(e,n){t.call(this),this._fileName=e,this.members=n;for(var r=0,i=n.length;i>r;r++)n[r].parent=this}return __extends(n,t),n.prototype.childCount=function(){return this.members.length},n.prototype.childAt=function(e){return this.members[e]},n.prototype.fileName=function(){return this._fileName},n.prototype.kind=function(){return 1},n.prototype.firstOrDefault=function(t){return e.ArrayUtilities.firstOrDefault(this.members,t)},n.prototype.lastOrDefault=function(t){return e.ArrayUtilities.lastOrDefault(this.members,t)},n.prototype.any=function(t){return e.ArrayUtilities.any(this.members,t)},n.prototype.structuralEquals=function(e,n){return t.prototype.structuralEquals.call(this,e,n)&&s(this.members,e.members,n)},n}(h);e.ISyntaxList2=d;var m=function(e){function t(t,n,r){e.call(this),this._fileName=t,this.members=n,this._separatorCount=r;for(var i=0,o=n.length;o>i;i++)n[i].parent=this}return __extends(t,e),t.prototype.nonSeparatorCount=function(){return this.members.length},t.prototype.separatorCount=function(){return this._separatorCount},t.prototype.nonSeparatorAt=function(e){return this.members[e]},t.prototype.nonSeparatorIndexOf=function(e){for(var t=0,n=this.nonSeparatorCount();n>t;t++)if(this.nonSeparatorAt(t)===e)return t;return-1},t.prototype.fileName=function(){return this._fileName},t.prototype.kind=function(){return 2},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&s(this.members,t.members,n)},t}(h);e.ISeparatedSyntaxList2=m;var y=function(e){function t(t,n){e.call(this),this.moduleElements=t,this._fileName=n,t&&(t.parent=this)}return __extends(t,e),t.prototype.fileName=function(){return this._fileName},t.prototype.kind=function(){return 120},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.moduleElements,t.moduleElements,n)},t}(h);e.SourceUnit=y;var f=function(t){function n(e){t.call(this),this._text=e,this._valueText=null}return __extends(n,t),n.prototype.text=function(){return this._text},n.prototype.valueText=function(){if(!this._valueText){var t=this._text;this._valueText="__proto__"===t?"#__proto__":e.Syntax.massageEscapes(t)}return this._valueText},n.prototype.kind=function(){return 11},n.prototype.structuralEquals=function(e,n){return t.prototype.structuralEquals.call(this,e,n)&&this._text===e._text},n}(h);e.Identifier=f;var g=function(e){function t(t,n,r){e.call(this),this._nodeType=t,this._text=n,this._valueText=r}return __extends(t,e),t.prototype.text=function(){return this._text},t.prototype.valueText=function(){return this._valueText},t.prototype.kind=function(){return this._nodeType},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)},t}(h);e.LiteralExpression=g;var v=function(e){function t(t,n){e.call(this),this._text=t,this._valueText=n}return __extends(t,e),t.prototype.text=function(){return this._text},t.prototype.valueText=function(){return this._valueText},t.prototype.kind=function(){return 35},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)},t}(h);e.ThisExpression=v;var S=function(e){function t(t,n){e.call(this),this._text=t,this._valueText=n}return __extends(t,e),t.prototype.text=function(){return this._text},t.prototype.valueText=function(){return this._valueText},t.prototype.kind=function(){return 50},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)},t}(h);e.SuperExpression=S;var T=function(e){function t(t,n,r){e.call(this),this._value=t,this._text=n,this._valueText=r}return __extends(t,e),t.prototype.text=function(){return this._text},t.prototype.valueText=function(){return this._valueText},t.prototype.value=function(){return this._value},t.prototype.kind=function(){return 13},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&(this._value===t._value||isNaN(this._value)&&isNaN(t._value))&&this._text===t._text},t}(h);e.NumericLiteral=T;var b=function(e){function t(t,n){e.call(this),this._text=t,this._valueText=n}return __extends(t,e),t.prototype.text=function(){return this._text},t.prototype.valueText=function(){return this._valueText},t.prototype.kind=function(){return 12},t}(h);e.RegularExpressionLiteral=b;var _=function(e){function t(t,n){e.call(this),this._text=t,this._valueText=n,this._valueText="__proto__"===n?"#__proto__":n}return __extends(t,e),t.prototype.text=function(){return this._text},t.prototype.valueText=function(){return this._valueText},t.prototype.kind=function(){return 14},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&this._text===t._text},t}(h);e.StringLiteral=_;var E=function(e){function t(t){e.call(this),this.type=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 244},t}(h);e.TypeAnnotation=E;var C=function(e){function t(t,n,r){e.call(this),this._nodeType=t,this._text=n,this._valueText=r}return __extends(t,e),t.prototype.text=function(){return this._text},t.prototype.valueText=function(){return this._valueText},t.prototype.kind=function(){return this._nodeType},t}(h);e.BuiltInType=C;var x=function(e){function t(t){e.call(this),this.stringLiteral=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 245},t}(h);e.ExternalModuleReference=x;var k=function(e){function t(t){e.call(this),this.moduleName=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 246},t}(h);e.ModuleNameModuleReference=k;var w=function(e){function t(t,n,r){e.call(this),this.modifiers=t,this.identifier=n,this.moduleReference=r,n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 133},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.identifier,t.identifier,n)&&o(this.moduleReference,t.moduleReference,n)},t}(h);e.ImportDeclaration=w;var A=function(e){function t(t){e.call(this),this.identifier=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 134},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.identifier,t.identifier,n)},t}(h);e.ExportAssignment=A;var D=function(e){function t(t){e.call(this),this.typeParameters=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 229},t}(h);e.TypeParameterList=D;var I=function(e){function t(t,n,r,i,o,a){e.call(this),this.modifiers=t,this.identifier=n,this.typeParameterList=r,this.heritageClauses=i,this.classElements=o,this.closeBraceToken=a,n&&(n.parent=this),r&&(r.parent=this),i&&(i.parent=this),o&&(o.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 131},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.identifier,t.identifier,n)&&o(this.classElements,t.classElements,n)&&o(this.typeParameterList,t.typeParameterList,n)&&o(this.heritageClauses,t.heritageClauses,n)},t}(h);e.ClassDeclaration=I;var L=function(e){function t(t,n,r,i,o){e.call(this),this.modifiers=t,this.identifier=n,this.typeParameterList=r,this.heritageClauses=i,this.body=o,n&&(n.parent=this),r&&(r.parent=this),o&&(o.parent=this),i&&(i.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 128},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.identifier,t.identifier,n)&&o(this.body,t.body,n)&&o(this.typeParameterList,t.typeParameterList,n)&&o(this.heritageClauses,t.heritageClauses,n)},t}(h);e.InterfaceDeclaration=L;var N=function(e){function t(t,n){e.call(this),this._nodeType=t,this.typeNames=n,n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return this._nodeType},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.typeNames,t.typeNames,n)},t}(h);e.HeritageClause=N;var P=function(e){function t(t,n,r,i,o){e.call(this),this.modifiers=t,this.name=n,this.stringLiteral=r,this.moduleElements=i,this.endingToken=o,n&&(n.parent=this),r&&(r.parent=this),i&&(i.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 130},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.name,t.name,n)&&o(this.moduleElements,t.moduleElements,n)},t}(h);e.ModuleDeclaration=P;var M=function(e){function t(t,n,r,i){e.call(this),this.modifiers=t,this.identifier=n,this.callSignature=r,this.block=i,n&&(n.parent=this),r&&(r.parent=this),i&&(i.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 129},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.identifier,t.identifier,n)&&o(this.block,t.block,n)&&o(this.callSignature,t.callSignature,n)},t}(h);e.FunctionDeclaration=M;var O=function(e){function t(t,n){e.call(this),this.modifiers=t,this.declaration=n,n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 148},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.declaration,t.declaration,n)},t}(h);e.VariableStatement=O;var F=function(e){function t(t,n){e.call(this),this.declarators=t,this.tokenKind=n,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 224},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.declarators,t.declarators,n)},t}(h);e.VariableDeclaration=F;var R=function(e){function t(t,n,r){e.call(this),this.propertyName=t,this.typeAnnotation=n,this.equalsValueClause=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 225},t}(h);e.VariableDeclarator=R;var V=function(e){function t(t){e.call(this),this.value=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 232},t}(h);e.EqualsValueClause=V;var B=function(e){function t(t,n){e.call(this),this._nodeType=t,this.operand=n,n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return this._nodeType},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.operand,t.operand,n)},t}(h);e.PrefixUnaryExpression=B;var G=function(e){function t(t){e.call(this),this.expressions=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 214},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expressions,t.expressions,n)},t}(h);e.ArrayLiteralExpression=G;var H=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.kind=function(){return 223},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)},t}(h);e.OmittedExpression=H;var K=function(e){function t(t,n){e.call(this),this.openParenTrailingComments=t,this.expression=n,n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 217},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)},t}(h);e.ParenthesizedExpression=K;var U=function(e){function t(t,n,r){e.call(this),this.identifier=t,this.block=n,this.expression=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 219},t}(h);e.SimpleArrowFunctionExpression=U;var W=function(e){function t(t,n,r){e.call(this),this.callSignature=t,this.block=n,this.expression=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 218},t}(h);e.ParenthesizedArrowFunctionExpression=W;var j=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 121},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.left,t.left,n)&&o(this.right,t.right,n)},t}(h);e.QualifiedName=j;var q=function(e){function t(t,n){e.call(this),this.openParenTrailingComments=t,this.parameters=n,n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 227},t}(h);e.ParameterList=q;var z=function(e){function t(t,n,r){e.call(this),this.typeParameterList=t,this.parameterList=n,this.type=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 125},t}(h);e.ConstructorType=z;var Y=function(e){function t(t,n,r){e.call(this),this.typeParameterList=t,this.parameterList=n,this.type=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 123},t}(h);e.FunctionType=Y;var J=function(e){function t(t){e.call(this),this.typeMembers=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 122},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.typeMembers,t.typeMembers,n)},t}(h);e.ObjectType=J;var X=function(e){function t(t){e.call(this),this.type=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 124},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.type,t.type,n)},t}(h);e.ArrayType=X;var Q=function(e){function t(t){e.call(this),this.typeArguments=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 228},t}(h);e.TypeArgumentList=Q;var Z=function(e){function t(t,n){e.call(this),this.name=t,this.typeArgumentList=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 126},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.name,t.name,n)&&o(this.typeArgumentList,t.typeArgumentList,n)},t}(h);e.GenericType=Z;var $=function(e){function t(t){e.call(this),this.name=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 127},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.name,t.name,n)},t}(h);e.TypeQuery=$;var et=function(e){function t(t,n,r){e.call(this),this.statements=t,this.closeBraceLeadingComments=n,this.closeBraceToken=r,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 146},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.statements,t.statements,n)},t}(h);e.Block=et;var tt=function(e){function t(t,n,r,i,o,a){e.call(this),this.dotDotDotToken=t,this.modifiers=n,this.identifier=r,this.questionToken=i,this.typeAnnotation=o,this.equalsValueClause=a,r&&(r.parent=this),o&&(o.parent=this),a&&(a.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 242},t}(h);e.Parameter=tt;var nt=function(e){function t(t,n){e.call(this),this.expression=t,this.name=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 212},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)&&o(this.name,t.name,n)},t}(h);e.MemberAccessExpression=nt;var rt=function(e){function t(t,n){e.call(this),this._nodeType=t,this.operand=n,n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return this._nodeType},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.operand,t.operand,n)},t}(h);e.PostfixUnaryExpression=rt;var it=function(e){function t(t,n){e.call(this),this.expression=t,this.argumentExpression=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 221},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)&&o(this.argumentExpression,t.argumentExpression,n)},t}(h);e.ElementAccessExpression=it;var ot=function(e){function t(t,n){e.call(this),this.expression=t,this.argumentList=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 213},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)&&o(this.argumentList,t.argumentList,n)},t}(h);e.InvocationExpression=ot;var at=function(e){function t(t,n,r){e.call(this),this.typeArgumentList=t,this.arguments=n,this.closeParenToken=r,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 226},t}(h);e.ArgumentList=at;var st=function(e){function t(t,n,r){e.call(this),this._nodeType=t,this.left=n,this.right=r,n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return this._nodeType},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.left,t.left,n)&&o(this.right,t.right,n)},t}(h);e.BinaryExpression=st;var lt=function(e){function t(t,n,r){e.call(this),this.condition=t,this.whenTrue=n,this.whenFalse=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 186},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.condition,t.condition,n)&&o(this.whenTrue,t.whenTrue,n)&&o(this.whenFalse,t.whenFalse,n)},t}(h);e.ConditionalExpression=lt;var ct=function(e){function t(t){e.call(this),this.callSignature=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 143},t}(h);e.ConstructSignature=ct;var ut=function(e){function t(t,n,r){e.call(this),this.propertyName=t,this.questionToken=n,this.callSignature=r,t&&(t.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 145},t}(h);e.MethodSignature=ut;var pt=function(e){function t(t,n){e.call(this),this.parameter=t,this.typeAnnotation=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 144},t}(h);e.IndexSignature=pt;var ht=function(e){function t(t,n,r){e.call(this),this.propertyName=t,this.questionToken=n,this.typeAnnotation=r,t&&(t.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 141},t}(h);e.PropertySignature=ht;var dt=function(e){function t(t,n,r){e.call(this),this.typeParameterList=t,this.parameterList=n,this.typeAnnotation=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 142},t}(h);e.CallSignature=dt;var mt=function(e){function t(t,n){e.call(this),this.identifier=t,this.constraint=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 238},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.identifier,t.identifier,n)&&o(this.constraint,t.constraint,n)},t}(h);e.TypeParameter=mt;var yt=function(e){function t(t){e.call(this),this.type=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 239},t}(h);e.Constraint=yt;var ft=function(e){function t(t){e.call(this),this.statement=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 235},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.statement,t.statement,n)},t}(h);e.ElseClause=ft;var gt=function(e){function t(t,n,r){e.call(this),this.condition=t,this.statement=n,this.elseClause=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 147},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.condition,t.condition,n)&&o(this.statement,t.statement,n)&&o(this.elseClause,t.elseClause,n)},t}(h);e.IfStatement=gt;var vt=function(e){function t(t){e.call(this),this.expression=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 149},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)},t}(h);e.ExpressionStatement=vt;var St=function(e){function t(t,n){e.call(this),this.parameterList=t,this.block=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 137},t}(h);e.ConstructorDeclaration=St;var Tt=function(e){function t(t,n,r,i){e.call(this),this.modifiers=t,this.propertyName=n,this.callSignature=r,this.block=i,n&&(n.parent=this),r&&(r.parent=this),i&&(i.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 135},t}(h);e.MemberFunctionDeclaration=Tt;var bt=function(e){function t(t,n,r,i,o){e.call(this),this.modifiers=t,this.propertyName=n,this.parameterList=r,this.typeAnnotation=i,this.block=o,n&&(n.parent=this),r&&(r.parent=this),i&&(i.parent=this),o&&(o.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 139},t}(h);e.GetAccessor=bt;var _t=function(e){function t(t,n,r,i){e.call(this),this.modifiers=t,this.propertyName=n,this.parameterList=r,this.block=i,n&&(n.parent=this),r&&(r.parent=this),i&&(i.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 140},t}(h);e.SetAccessor=_t;var Et=function(e){function t(t,n){e.call(this),this.modifiers=t,this.variableDeclarator=n,n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 136},t}(h);e.MemberVariableDeclaration=Et;var Ct=function(e){function t(t){e.call(this),this.indexSignature=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 138},t}(h);e.IndexMemberDeclaration=Ct;var xt=function(e){function t(t){e.call(this),this.expression=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 157},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)},t}(h);e.ThrowStatement=xt;var kt=function(e){function t(t){e.call(this),this.expression=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 150},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)},t}(h);e.ReturnStatement=kt;var wt=function(e){function t(t,n){e.call(this),this.expression=t,this.argumentList=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 216},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)&&o(this.argumentList,t.argumentList,n)},t}(h);e.ObjectCreationExpression=wt;var At=function(e){function t(t,n,r){e.call(this),this.expression=t,this.closeParenToken=n,this.switchClauses=r,t&&(t.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 151},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.switchClauses,t.switchClauses,n)&&o(this.expression,t.expression,n)},t}(h);e.SwitchStatement=At;var Dt=function(e){function t(t,n){e.call(this),this.expression=t,this.statements=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 233},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)&&o(this.statements,t.statements,n)},t}(h);e.CaseSwitchClause=Dt;var It=function(e){function t(t){e.call(this),this.statements=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 234},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.statements,t.statements,n)},t}(h);e.DefaultSwitchClause=It;var Lt=function(e){function t(t){e.call(this),this.identifier=t}return __extends(t,e),t.prototype.kind=function(){return 152},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)},t}(h);e.BreakStatement=Lt;var Nt=function(e){function t(t){e.call(this),this.identifier=t}return __extends(t,e),t.prototype.kind=function(){return 153},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)},t}(h);e.ContinueStatement=Nt;var Pt=function(e){function t(t,n,r,i,o){e.call(this),this.variableDeclaration=t,this.initializer=n,this.condition=r,this.incrementor=i,this.statement=o,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this),i&&(i.parent=this),o&&(o.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 154},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.initializer,t.initializer,n)&&o(this.condition,t.condition,n)&&o(this.incrementor,t.incrementor,n)&&o(this.statement,t.statement,n)},t}(h);e.ForStatement=Pt;var Mt=function(e){function t(t,n,r,i){e.call(this),this.variableDeclaration=t,this.left=n,this.expression=r,this.statement=i,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this),i&&(i.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 155},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.variableDeclaration,t.variableDeclaration,n)&&o(this.expression,t.expression,n)&&o(this.statement,t.statement,n)},t}(h);e.ForInStatement=Mt;var Ot=function(e){function t(t,n){e.call(this),this.condition=t,this.statement=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 158},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.condition,t.condition,n)&&o(this.statement,t.statement,n)},t}(h);e.WhileStatement=Ot;var Ft=function(e){function t(t,n){e.call(this),this.condition=t,this.statement=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 163},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.condition,t.condition,n)&&o(this.statement,t.statement,n)},t}(h);e.WithStatement=Ft;var Rt=function(e){function t(t,n,r){e.call(this),this.modifiers=t,this.identifier=n,this.enumElements=r,n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 132},t}(h);e.EnumDeclaration=Rt;var Vt=function(e){function t(t,n){e.call(this),this.propertyName=t,this.equalsValueClause=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 243},t}(h);e.EnumElement=Vt;var Bt=function(e){function t(t,n){e.call(this),this.type=t,this.expression=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 220},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.type,t.type,n)&&o(this.expression,t.expression,n)},t}(h);e.CastExpression=Bt;var Gt=function(e){function t(t){e.call(this),this.propertyAssignments=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 215},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.propertyAssignments,t.propertyAssignments,n)},t}(h);e.ObjectLiteralExpression=Gt;var Ht=function(e){function t(t,n){e.call(this),this.propertyName=t,this.expression=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 240},t}(h);e.SimplePropertyAssignment=Ht;var Kt=function(e){function t(t,n,r){e.call(this),this.propertyName=t,this.callSignature=n,this.block=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 241},t}(h);e.FunctionPropertyAssignment=Kt;var Ut=function(e){function t(t,n,r){e.call(this),this.identifier=t,this.callSignature=n,this.block=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 222},t}(h);e.FunctionExpression=Ut;var Wt=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.kind=function(){return 156},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)},t}(h);e.EmptyStatement=Wt;var jt=function(e){function t(t,n,r){e.call(this),this.block=t,this.catchClause=n,this.finallyClause=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 159},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.block,t.block,n)&&o(this.catchClause,t.catchClause,n)&&o(this.finallyClause,t.finallyClause,n)},t}(h);e.TryStatement=jt;var qt=function(e){function t(t,n,r){e.call(this),this.identifier=t,this.typeAnnotation=n,this.block=r,t&&(t.parent=this),n&&(n.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 236},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.identifier,t.identifier,n)&&o(this.typeAnnotation,t.typeAnnotation,n)&&o(this.block,t.block,n)},t}(h);e.CatchClause=qt;var zt=function(e){function t(t){e.call(this),this.block=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 237},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.block,t.block,n)},t}(h);e.FinallyClause=zt; var Yt=function(e){function t(t,n){e.call(this),this.identifier=t,this.statement=n,t&&(t.parent=this),n&&(n.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 160},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.identifier,t.identifier,n)&&o(this.statement,t.statement,n)},t}(h);e.LabeledStatement=Yt;var Jt=function(e){function t(t,n,r){e.call(this),this.statement=t,this.whileKeyword=n,this.condition=r,t&&(t.parent=this),r&&(r.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 161},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.statement,t.statement,n)&&o(this.condition,t.condition,n)},t}(h);e.DoStatement=Jt;var Xt=function(e){function t(t){e.call(this),this.expression=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 171},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)},t}(h);e.TypeOfExpression=Xt;var Qt=function(e){function t(t){e.call(this),this.expression=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 170},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)},t}(h);e.DeleteExpression=Qt;var Zt=function(e){function t(t){e.call(this),this.expression=t,t&&(t.parent=this)}return __extends(t,e),t.prototype.kind=function(){return 172},t.prototype.structuralEquals=function(t,n){return e.prototype.structuralEquals.call(this,t,n)&&o(this.expression,t.expression,n)},t}(h);e.VoidExpression=Zt;var $t=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.kind=function(){return 162},t}(h);e.DebuggerStatement=$t;var en=function(){function e(e,t,n,r){this._trivia=e,this.endsLine=t,this._start=n,this._end=r}return e.prototype.start=function(){return this._start},e.prototype.end=function(){return this._end},e.prototype.fullText=function(){return this._trivia.fullText()},e.prototype.kind=function(){return this._trivia.kind()},e.prototype.structuralEquals=function(e,t){return!t||this.start()===e.start()&&this.end()===e.end()?this._trivia.fullText()===e._trivia.fullText()&&this.endsLine===e.endsLine:!1},e}();e.Comment=en,e.diagnosticFromDecl=c}(TypeScript||(TypeScript={})),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){"use strict";if(null==this)throw new TypeError;var t=Object(this),n=t.length>>>0;if(0===n)return-1;var r=0;if(arguments.length>0&&(r=Number(arguments[1]),r!=r?r=0:0!=r&&1/0!=r&&r!=-1/0&&(r=(r>0||-1)*Math.floor(Math.abs(r)))),r>=n)return-1;for(var i=r>=0?r:Math.max(n-Math.abs(r),0);n>i;i++)if(i in t&&t[i]===e)return i;return-1}),Array.prototype.filter||(Array.prototype.filter=function(e,t){"use strict";if(null==this)throw new TypeError;var n=Object(this),r=n.length>>>0;if("function"!=typeof e)throw new TypeError;for(var i=[],o=0;r>o;o++)if(o in n){var a=n[o];e.call(t,a,o,n)&&i.push(a)}return i}),Array.prototype.map||(Array.prototype.map=function(e,t){var n,r,i=void 0;if(null==this)throw new TypeError(" this is null or not defined");var o=Object(this),a=o.length>>>0;if("[object Function]"!={}.toString.call(e))throw new TypeError(e+" is not a function");for(t&&(i=t),n=new Array(a),r=0;a>r;){var s,l;r in o&&(s=o[r],l=e.call(i,s,r,o),n[r]=l),r++}return n}),Array.prototype.reduce||(Array.prototype.reduce=function(e){if(null===this||void 0===this)throw new TypeError("Object is null or undefined");var t,n=0,r=this.length>>0;if("function"!=typeof e)throw new TypeError("First argument is not callable");if(arguments.length<2){if(0===r)throw new TypeError("Array length is 0 and no second argument");t=this[0],n=1}else t=arguments[1];for(;r>n;)n in this&&(t=e.call(void 0,t,this[n],n,this)),++n;return t}),Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n,r;if(null==this)throw new TypeError(" this is null or not defined");var i=Object(this),o=i.length>>>0;if("[object Function]"!={}.toString.call(e))throw new TypeError(e+" is not a function");for(n=t?t:void 0,r=0;o>r;){var a;r in i&&(a=i[r],e.call(n,a,r,i)),r++}}),Date.now||(Date.now=function(){return(new Date).getTime()}),Array.prototype.some||(Array.prototype.some=function(e){"use strict";if(null==this)throw new TypeError;var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError;for(var r=arguments[1],i=0;n>i;i++){var o=i.toString();if(o in t&&e.call(r,t[i],i,t))return!0}return!1});var TypeScript;!function(e){!function(t){!function(e){e[e.Start=0]="Start",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral"}(t.EndOfLineState||(t.EndOfLineState={}));t.EndOfLineState;!function(e){e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.StringLiteral=7]="StringLiteral",e[e.RegExpLiteral=8]="RegExpLiteral"}(t.TokenClass||(t.TokenClass={}));var n=(t.TokenClass,[]);n[11]=!0,n[14]=!0,n[13]=!0,n[12]=!0,n[35]=!0,n[93]=!0,n[94]=!0,n[73]=!0,n[75]=!0,n[71]=!0,n[37]=!0,n[24]=!0;var r=function(){function t(t){this.host=t,this.characterWindow=e.ArrayUtilities.createArray(2048,0),this.diagnostics=[]}return t.prototype.getClassificationsForLine=function(t,r){var o=0;0!==r&&(3===r?t='"\\\n'+t:2===r?t="'\\\n"+t:1===r&&(t="/*\n"+t),o=3);var a=new i;this.scanner=new e.Scanner("",e.SimpleText.fromString(t),1,this.characterWindow);for(var s=0;this.scanner.absoluteIndex()=t.length){if(this.diagnostics.length>0&&this.diagnostics[this.diagnostics.length-1].diagnosticKey()===e.DiagnosticCode.AsteriskSlash_expected)return void(i.finalLexState=1);if(14===r.tokenKind){var o=r.text();if(o.length>0&&92===o.charCodeAt(o.length-1)){var a=o.charCodeAt(0);return void(i.finalLexState=34===a?3:2)}}}},t.prototype.processTriviaList=function(e,t,n,r){for(var i=0,o=n.count();o>i;i++){var a=n.syntaxTriviaAt(i);this.addResult(e,t,r,a.fullWidth(),a.kind())}},t.prototype.addResult=function(e,t,n,r,i){r>0&&(0===n.entries.length&&(r-=t),n.entries.push(new o(r,this.classFromKind(i))))},t.prototype.classFromKind=function(t){if(e.SyntaxFacts.isAnyKeyword(t))return 1;if(e.SyntaxFacts.isBinaryExpressionOperatorToken(t)||e.SyntaxFacts.isPrefixUnaryExpressionOperatorToken(t))return 2;if(e.SyntaxFacts.isAnyPunctuation(t))return 0;switch(t){case 4:return 4;case 6:case 7:return 3;case 13:return 6;case 14:return 7;case 12:return 8;case 11:default:return 5}},t}();t.Classifier=r;var i=function(){function e(){this.finalLexState=0,this.entries=[]}return e}();t.ClassificationResult=i;var o=function(){function e(e,t){this.length=e,this.classification=t}return e}();t.ClassificationInfo=o}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){function t(e,t){e.log("*INTERNAL ERROR* - Exception in typescript services: "+t.message)}e.logInternalError=t;var n=function(){function e(e,t,n,r){this.fileName="",this.minChar=-1,this.limChar=-1,this.isWriteAccess=!1,this.fileName=e,this.minChar=t,this.limChar=n,this.isWriteAccess=r}return e}();e.ReferenceEntry=n;var r=function(){function e(){this.name="",this.kind="",this.kindModifiers="",this.matchKind="",this.fileName="",this.minChar=-1,this.limChar=-1,this.containerName="",this.containerKind=""}return e}();e.NavigateToItem=r;var i=function(){function e(e,t,n){this.minChar=e,this.limChar=t,this.text=n}return e.createInsert=function(t,n){return new e(t,t,n)},e.createDelete=function(t,n){return new e(t,n,"")},e.createReplace=function(t,n,r){return new e(t,n,r)},e}();e.TextEdit=i;var o=function(){function e(){this.IndentSize=4,this.TabSize=4,this.NewLineCharacter="\r\n",this.ConvertTabsToSpaces=!0}return e.clone=function(t){var n=new e;return n.IndentSize=t.IndentSize,n.TabSize=t.TabSize,n.NewLineCharacter=t.NewLineCharacter,n.ConvertTabsToSpaces=t.ConvertTabsToSpaces,n},e}();e.EditorOptions=o;var a=function(e){function t(){e.apply(this,arguments),this.InsertSpaceAfterCommaDelimiter=!0,this.InsertSpaceAfterSemicolonInForStatements=!0,this.InsertSpaceBeforeAndAfterBinaryOperators=!0,this.InsertSpaceAfterKeywordsInControlFlowStatements=!0,this.InsertSpaceAfterFunctionKeywordForAnonymousFunctions=!1,this.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis=!1,this.PlaceOpenBraceOnNewLineForFunctions=!1,this.PlaceOpenBraceOnNewLineForControlBlocks=!1}return __extends(t,e),t.clone=function(e){var t=o.clone(e);return t.InsertSpaceAfterCommaDelimiter=e.InsertSpaceAfterCommaDelimiter,t.InsertSpaceAfterSemicolonInForStatements=e.InsertSpaceAfterSemicolonInForStatements,t.InsertSpaceBeforeAndAfterBinaryOperators=e.InsertSpaceBeforeAndAfterBinaryOperators,t.InsertSpaceAfterKeywordsInControlFlowStatements=e.InsertSpaceAfterKeywordsInControlFlowStatements,t.InsertSpaceAfterFunctionKeywordForAnonymousFunctions=e.InsertSpaceAfterFunctionKeywordForAnonymousFunctions,t.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis=e.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis,t.PlaceOpenBraceOnNewLineForFunctions=e.PlaceOpenBraceOnNewLineForFunctions,t.PlaceOpenBraceOnNewLineForControlBlocks=e.PlaceOpenBraceOnNewLineForControlBlocks,t},t}(o);e.FormatCodeOptions=a;var s=function(){function e(e,t,n,r,i,o,a){this.fileName=e,this.minChar=t,this.limChar=n,this.kind=r,this.name=i,this.containerKind=o,this.containerName=a}return e}();e.DefinitionInfo=s;var l=function(){function e(e,t,n,r,i,o){this.memberName=e,this.docComment=t,this.fullSymbolName=n,this.kind=r,this.minChar=i,this.limChar=o}return e}();e.TypeInfo=l;var c=function(){function e(e,t,n){"undefined"==typeof n&&(n=null),this.minChar=e,this.limChar=t,this.text=n}return e}();e.SpanInfo=c;var u=function(){function e(){this.formal=[]}return e}();e.SignatureInfo=u;var p=function(){function e(){this.typeParameters=[],this.parameters=[]}return e}();e.FormalSignatureItemInfo=p;var h=function(){function e(){}return e}();e.FormalTypeParameterInfo=h;var d=function(){function e(){}return e}();e.FormalParameterInfo=d;var m=function(){function e(){}return e}();e.ActualSignatureInfo=m;var y=function(){function e(){this.maybeInaccurate=!1,this.isMemberCompletion=!1,this.entries=[]}return e}();e.CompletionInfo=y;var f=function(){function e(){}return e.unknown="",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.interfaceElement="interface",e.enumElement="enum",e.variableElement="var",e.localVariableElement="local var",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e}();e.ScriptElementKind=f;var g=function(){function e(){}return e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e}();e.ScriptElementKindModifier=g;var v=function(){function e(){}return e.none=null,e.exact="exact",e.subString="substring",e.prefix="prefix",e}();e.MatchKind=v;var S=function(){function e(){}return e.none="",e.error="error",e.warning="warning",e.message="message",e}();e.DiagnosticCategory=S}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(e){this.snapshot=e,this.lines=[]}return t.prototype.getText=function(e){return this.snapshot.substr(e.start(),e.length(),!1)},t.prototype.getLineNumberFromPosition=function(e){return this.snapshot.lineMap().getLineNumberFromPosition(e)},t.prototype.getLineFromPosition=function(e){var t=this.getLineNumberFromPosition(e);return this.getLineFromLineNumber(t)},t.prototype.getLineFromLineNumber=function(e){var t=this.lines[e];return void 0===t&&(t=this.getLineFromLineNumberWorker(e),this.lines[e]=t),t},t.prototype.getLineFromLineNumberWorker=function(t){var n=this.snapshot.lineMap().lineStarts(),r=t;if(0>r||r>=n.length)throw new Error(e.getDiagnosticMessage(e.DiagnosticCode.Invalid_line_number_0,[r]));var i,o,a=n[r],s="";if(r==n.length)i=o=this.snapshot.length();else{o=r>=n.length-1?this.snapshot.length():n[r+1];for(var l=o-1;l>=a;l--){var c=this.snapshot.substr(l,1,!1);if("\r"!=c&&"\n"!=c)break}i=l+1,s=this.snapshot.substr(i,o-i,!1)}var u=new e.Services.Formatting.TextSnapshotLine(this,t,a,i,s);return u},t}();t.TextSnapshot=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(e,t,n,r,i){this._snapshot=e,this._lineNumber=t,this._start=n,this._end=r,this._lineBreak=i}return t.prototype.snapshot=function(){return this._snapshot},t.prototype.start=function(){return new e.Services.Formatting.SnapshotPoint(this._snapshot,this._start)},t.prototype.startPosition=function(){return this._start},t.prototype.end=function(){return new e.Services.Formatting.SnapshotPoint(this._snapshot,this._end)},t.prototype.endPosition=function(){return this._end},t.prototype.endIncludingLineBreak=function(){return new e.Services.Formatting.SnapshotPoint(this._snapshot,this._end+this._lineBreak.length)},t.prototype.endIncludingLineBreakPosition=function(){return this._end+this._lineBreak.length},t.prototype.length=function(){return this._end-this._start},t.prototype.lineNumber=function(){return this._lineNumber},t.prototype.getText=function(){return this._snapshot.getText(e.TextSpan.fromBounds(this._start,this._end))},t}();t.TextSnapshotLine=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){!function(e){var t=function(){function e(e,t){this.snapshot=e,this.position=t}return e.prototype.getContainingLine=function(){return this.snapshot.getLineFromPosition(this.position)},e.prototype.add=function(t){return new e(this.snapshot,this.position+t)},e}();e.SnapshotPoint=t}(e.Formatting||(e.Formatting={}));e.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(t,n){this.snapshot=t,this.formattingRequestKind=n,this.currentTokenSpan=null,this.nextTokenSpan=null,this.contextNode=null,this.currentTokenParent=null,this.nextTokenParent=null,this.contextNodeAllOnSameLine=null,this.nextNodeAllOnSameLine=null,this.tokensAreOnSameLine=null,this.contextNodeBlockIsOnOneLine=null,this.nextNodeBlockIsOnOneLine=null,e.Debug.assert(null!=this.snapshot,"snapshot is null")}return t.prototype.updateContext=function(t,n,r,i,o){e.Debug.assert(null!=t,"currentTokenSpan is null"),e.Debug.assert(null!=n,"currentTokenParent is null"),e.Debug.assert(null!=r,"nextTokenSpan is null"),e.Debug.assert(null!=i,"nextTokenParent is null"),e.Debug.assert(null!=o,"commonParent is null"),this.currentTokenSpan=t,this.currentTokenParent=n,this.nextTokenSpan=r,this.nextTokenParent=i,this.contextNode=o,this.contextNodeAllOnSameLine=null,this.nextNodeAllOnSameLine=null,this.tokensAreOnSameLine=null,this.contextNodeBlockIsOnOneLine=null,this.nextNodeBlockIsOnOneLine=null},t.prototype.ContextNodeAllOnSameLine=function(){return null===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine},t.prototype.NextNodeAllOnSameLine=function(){return null===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine},t.prototype.TokensAreOnSameLine=function(){if(null===this.tokensAreOnSameLine){var e=this.snapshot.getLineNumberFromPosition(this.currentTokenSpan.start()),t=this.snapshot.getLineNumberFromPosition(this.nextTokenSpan.start());this.tokensAreOnSameLine=e==t}return this.tokensAreOnSameLine},t.prototype.ContextNodeBlockIsOnOneLine=function(){return null===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine},t.prototype.NextNodeBlockIsOnOneLine=function(){return null===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine},t.prototype.NodeIsOnOneLine=function(e){var t=this.snapshot.getLineNumberFromPosition(e.start()),n=this.snapshot.getLineNumberFromPosition(e.end());return t==n},t.prototype.BlockIsOnOneLine=function(t){var n=t.fullStart(),r=t.node(),i=n+e.Syntax.childOffset(r,r.openBraceToken),o=n+e.Syntax.childOffset(r,r.closeBraceToken),a=this.snapshot.getLineNumberFromPosition(i),s=this.snapshot.getLineNumberFromPosition(o);return a==s},t}();t.FormattingContext=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(e,t,n,r){this.syntaxTree=e,this.snapshot=t,this.rulesProvider=n,this.options=new FormattingOptions(!r.ConvertTabsToSpaces,r.TabSize,r.IndentSize,r.NewLineCharacter)}return t.prototype.formatSelection=function(t,n){var r=e.TextSpan.fromBounds(t,n);return this.formatSpan(r,1)},t.prototype.formatDocument=function(t,n){var r=e.TextSpan.fromBounds(t,n);return this.formatSpan(r,0)},t.prototype.formatOnPaste=function(t,n){var r=e.TextSpan.fromBounds(t,n);return this.formatSpan(r,5)},t.prototype.formatOnSemicolon=function(t){var n=this.syntaxTree.sourceUnit(),r=n.findToken(t-1);if(78===r.kind()){for(var i=r;null!==i.parent()&&i.parent().end()===r.end()&&1!==i.parent().kind();)i=i.parent();var o=new e.TextSpan(i.fullStart(),i.fullWidth());return this.formatSpan(o,3)}return[]},t.prototype.formatOnClosingCurlyBrace=function(t){var n=this.syntaxTree.sourceUnit(),r=n.findToken(t-1);if(71===r.kind()){for(var i=r;null!==i.parent()&&i.parent().end()===r.end()&&1!==i.parent().kind();)i=i.parent();var o=new e.TextSpan(i.fullStart(),i.fullWidth());return this.formatSpan(o,4)}return[]},t.prototype.formatOnEnter=function(t){var n=this.snapshot.getLineNumberFromPosition(t);if(n>0){var r=this.snapshot.getLineFromLineNumber(n-1),i=this.snapshot.getLineFromLineNumber(n),o=e.TextSpan.fromBounds(r.startPosition(),i.endPosition());return this.formatSpan(o,2)}return[]},t.prototype.formatSpan=function(t,n){var r=this.snapshot.getLineFromPosition(t.start());t=e.TextSpan.fromBounds(r.startPosition(),t.end());var i=[],o=e.Services.Formatting.Formatter.getEdits(t,this.syntaxTree.sourceUnit(),this.options,!0,this.snapshot,this.rulesProvider,n);return o.forEach(function(t){var n=new e.Services.TextEdit(t.position,t.position+t.length,t.replaceWith);i.push(n)}),i},t}();t.FormattingManager=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){!function(e){!function(e){e[e.FormatDocument=0]="FormatDocument",e[e.FormatSelection=1]="FormatSelection",e[e.FormatOnEnter=2]="FormatOnEnter",e[e.FormatOnSemicolon=3]="FormatOnSemicolon",e[e.FormatOnClosingCurlyBrace=4]="FormatOnClosingCurlyBrace",e[e.FormatOnPaste=5]="FormatOnPaste"}(e.FormattingRequestKind||(e.FormattingRequestKind={}));e.FormattingRequestKind}(e.Formatting||(e.Formatting={}));e.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){!function(e){var t=function(){function e(e,t,n){"undefined"==typeof n&&(n=0),this.Descriptor=e,this.Operation=t,this.Flag=n}return e.prototype.toString=function(){return"[desc="+this.Descriptor+",operation="+this.Operation+",flag="+this.Flag+"]"},e}();e.Rule=t}(e.Formatting||(e.Formatting={}));e.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){!function(e){!function(e){e[e.Ignore=0]="Ignore",e[e.Space=1]="Space",e[e.NewLine=2]="NewLine",e[e.Delete=3]="Delete"}(e.RuleAction||(e.RuleAction={}));e.RuleAction}(e.Formatting||(e.Formatting={}));e.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(e,t){this.LeftTokenRange=e,this.RightTokenRange=t}return t.prototype.toString=function(){return"[leftRange="+this.LeftTokenRange+",rightRange="+this.RightTokenRange+"]"},t.create1=function(n,r){return t.create4(e.Services.Formatting.Shared.TokenRange.FromToken(n),e.Services.Formatting.Shared.TokenRange.FromToken(r))},t.create2=function(n,r){return t.create4(n,e.Services.Formatting.Shared.TokenRange.FromToken(r))},t.create3=function(n,r){return t.create4(e.Services.Formatting.Shared.TokenRange.FromToken(n),r)},t.create4=function(e,n){return new t(e,n)},t}();t.RuleDescriptor=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){!function(e){!function(e){e[e.None=0]="None",e[e.CanDeleteNewLines=1]="CanDeleteNewLines"}(e.RuleFlags||(e.RuleFlags={}));e.RuleFlags}(e.Formatting||(e.Formatting={}));e.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(){this.Context=null,this.Action=null}return t.prototype.toString=function(){return"[context="+this.Context+",action="+this.Action+"]"},t.create1=function(n){return t.create2(e.Services.Formatting.RuleOperationContext.Any,n)},t.create2=function(e,n){var r=new t;return r.Context=e,r.Action=n,r},t}();t.RuleOperation=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){!function(e){var t=function(){function e(){for(var e=[],t=0;tt;t++)if(!this.customContextChecks[t](e))return!1;return!0},e.Any=new e,e}();e.RuleOperationContext=t}(e.Formatting||(e.Formatting={}));e.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(){this.IgnoreBeforeComment=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.Any,e.Services.Formatting.Shared.TokenRange.Comments),e.Services.Formatting.RuleOperation.create1(0)),this.IgnoreAfterLineComment=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(7,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create1(0)),this.NoSpaceBeforeSemicolon=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,78),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceBeforeColon=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,106),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),3)),this.NoSpaceBeforeQMark=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,105),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),3)),this.SpaceAfterColon=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(106,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),1)),this.SpaceAfterQMark=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(105,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),1)),this.SpaceAfterSemicolon=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(78,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.SpaceAfterCloseBrace=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(71,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsAfterCodeBlockContext),1)),this.SpaceBetweenCloseBraceAndElse=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(71,23),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.SpaceBetweenCloseBraceAndWhile=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(71,42),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.NoSpaceAfterCloseBrace=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(71,e.Services.Formatting.Shared.TokenRange.FromTokens([73,75,79,78])),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceBeforeDot=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,76),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceAfterDot=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(76,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceBeforeOpenBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,74),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceAfterOpenBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(74,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceBeforeCloseBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,75),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceAfterCloseBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(75,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.FunctionOpenBraceLeftTokenRange=e.Services.Formatting.Shared.TokenRange.AnyIncludingMultilineComments,this.SpaceBeforeOpenBraceInFunction=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange,70),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsFunctionDeclContext,t.IsNotFormatOnEnter,t.IsSameLineTokenOrBeforeMultilineBlockContext),1),1),this.TypeScriptOpenBraceLeftTokenRange=e.Services.Formatting.Shared.TokenRange.FromTokens([11,6]),this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange,70),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsTypeScriptDeclWithBlockContext,t.IsNotFormatOnEnter,t.IsSameLineTokenOrBeforeMultilineBlockContext),1),1),this.ControlOpenBraceLeftTokenRange=e.Services.Formatting.Shared.TokenRange.FromTokens([73,6,22,38,25,23]),this.SpaceBeforeOpenBraceInControl=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange,70),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsControlDeclContext,t.IsNotFormatOnEnter,t.IsSameLineTokenOrBeforeMultilineBlockContext),1),1),this.SpaceAfterOpenBrace=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(70,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSingleLineBlockContext),1)),this.SpaceBeforeCloseBrace=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,71),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSingleLineBlockContext),1)),this.NoSpaceBetweenEmptyBraceBrackets=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(70,71),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsObjectContext),3)),this.NewLineAfterOpenBraceInBlockContext=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(70,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsMultilineBlockContext),2)),this.NewLineBeforeCloseBraceInBlockContext=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.AnyIncludingMultilineComments,71),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsMultilineBlockContext),2)),this.NoSpaceAfterUnaryPrefixOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.UnaryPrefixOperators,e.Services.Formatting.Shared.TokenRange.UnaryPrefixExpressions),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),3)),this.NoSpaceAfterUnaryPreincrementOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(93,e.Services.Formatting.Shared.TokenRange.UnaryPreincrementExpressions),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceAfterUnaryPredecrementOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(94,e.Services.Formatting.Shared.TokenRange.UnaryPredecrementExpressions),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceBeforeUnaryPostincrementOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.UnaryPostincrementExpressions,93),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceBeforeUnaryPostdecrementOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.UnaryPostdecrementExpressions,94),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.SpaceAfterPostincrementWhenFollowedByAdd=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(93,89),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.SpaceAfterAddWhenFollowedByUnaryPlus=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(89,89),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.SpaceAfterAddWhenFollowedByPreincrement=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(89,93),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.SpaceAfterPostdecrementWhenFollowedBySubtract=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(94,90),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.SpaceAfterSubtractWhenFollowedByUnaryMinus=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(90,90),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.SpaceAfterSubtractWhenFollowedByPredecrement=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(90,94),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.NoSpaceBeforeComma=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,79),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.SpaceAfterCertainKeywords=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.FromTokens([40,36,31,21,33,39]),e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.NoSpaceBeforeOpenParenInFuncCall=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,72),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsFunctionCallOrNewContext),3)),this.SpaceAfterFunctionInFuncDecl=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(27,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsFunctionDeclContext),1)),this.NoSpaceBeforeOpenParenInFuncDecl=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,72),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsFunctionDeclContext),3)),this.SpaceAfterVoidOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(41,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsVoidOpContext),1)),this.NoSpaceBetweenReturnAndSemicolon=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(33,78),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.SpaceBetweenStatements=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.FromTokens([73,22,23,16]),e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotForContext),1)),this.SpaceAfterTryFinally=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.FromTokens([38,25]),70),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.SpaceAfterGetSetInMember=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.FromTokens([64,68]),11),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsFunctionDeclContext),1)),this.SpaceBeforeBinaryKeywordOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.Any,e.Services.Formatting.Shared.TokenRange.BinaryKeywordOperators),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.SpaceAfterBinaryKeywordOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.BinaryKeywordOperators,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.NoSpaceAfterConstructor=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(62,72),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceAfterModuleImport=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.FromTokens([65,66]),72),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.SpaceAfterCertainTypeScriptKeywords=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.FromTokens([44,63,46,47,48,64,51,49,52,65,55,57,68,58]),e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.SpaceBeforeCertainTypeScriptKeywords=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.Any,e.Services.Formatting.Shared.TokenRange.FromTokens([48,51])),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.SpaceAfterModuleName=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(14,70),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsModuleDeclContext),1)),this.SpaceAfterArrow=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(85,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.NoSpaceAfterEllipsis=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(77,11),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceAfterOptionalParameters=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(105,e.Services.Formatting.Shared.TokenRange.FromTokens([73,79])),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsNotBinaryOpContext),3)),this.NoSpaceBeforeOpenAngularBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.TypeNames,80),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),3)),this.NoSpaceBetweenCloseParenAndAngularBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(73,80),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),3)),this.NoSpaceAfterOpenAngularBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(80,e.Services.Formatting.Shared.TokenRange.TypeNames),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),3)),this.NoSpaceBeforeCloseAngularBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,81),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),3)),this.NoSpaceAfterCloseAngularBracket=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(81,e.Services.Formatting.Shared.TokenRange.FromTokens([72,74,81,79])),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsTypeArgumentOrParameterContext),3)),this.NoSpaceBetweenEmptyInterfaceBraceBrackets=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(70,71),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsObjectTypeContext),3)),this.HighPriorityCommonRules=[this.IgnoreBeforeComment,this.IgnoreAfterLineComment,this.NoSpaceBeforeColon,this.SpaceAfterColon,this.NoSpaceBeforeQMark,this.SpaceAfterQMark,this.NoSpaceBeforeDot,this.NoSpaceAfterDot,this.NoSpaceAfterUnaryPrefixOperator,this.NoSpaceAfterUnaryPreincrementOperator,this.NoSpaceAfterUnaryPredecrementOperator,this.NoSpaceBeforeUnaryPostincrementOperator,this.NoSpaceBeforeUnaryPostdecrementOperator,this.SpaceAfterPostincrementWhenFollowedByAdd,this.SpaceAfterAddWhenFollowedByUnaryPlus,this.SpaceAfterAddWhenFollowedByPreincrement,this.SpaceAfterPostdecrementWhenFollowedBySubtract,this.SpaceAfterSubtractWhenFollowedByUnaryMinus,this.SpaceAfterSubtractWhenFollowedByPredecrement,this.NoSpaceAfterCloseBrace,this.SpaceAfterOpenBrace,this.SpaceBeforeCloseBrace,this.NewLineBeforeCloseBraceInBlockContext,this.SpaceAfterCloseBrace,this.SpaceBetweenCloseBraceAndElse,this.SpaceBetweenCloseBraceAndWhile,this.NoSpaceBetweenEmptyBraceBrackets,this.SpaceAfterFunctionInFuncDecl,this.NewLineAfterOpenBraceInBlockContext,this.SpaceAfterGetSetInMember,this.NoSpaceBetweenReturnAndSemicolon,this.SpaceAfterCertainKeywords,this.NoSpaceBeforeOpenParenInFuncCall,this.SpaceBeforeBinaryKeywordOperator,this.SpaceAfterBinaryKeywordOperator,this.SpaceAfterVoidOperator,this.NoSpaceAfterConstructor,this.NoSpaceAfterModuleImport,this.SpaceAfterCertainTypeScriptKeywords,this.SpaceBeforeCertainTypeScriptKeywords,this.SpaceAfterModuleName,this.SpaceAfterArrow,this.NoSpaceAfterEllipsis,this.NoSpaceAfterOptionalParameters,this.NoSpaceBetweenEmptyInterfaceBraceBrackets,this.NoSpaceBeforeOpenAngularBracket,this.NoSpaceBetweenCloseParenAndAngularBracket,this.NoSpaceAfterOpenAngularBracket,this.NoSpaceBeforeCloseAngularBracket,this.NoSpaceAfterCloseAngularBracket],this.LowPriorityCommonRules=[this.NoSpaceBeforeSemicolon,this.SpaceBeforeOpenBraceInControl,this.SpaceBeforeOpenBraceInFunction,this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock,this.NoSpaceBeforeComma,this.NoSpaceBeforeOpenBracket,this.NoSpaceAfterOpenBracket,this.NoSpaceBeforeCloseBracket,this.NoSpaceAfterCloseBracket,this.SpaceAfterSemicolon,this.NoSpaceBeforeOpenParenInFuncDecl,this.SpaceBetweenStatements,this.SpaceAfterTryFinally],this.SpaceAfterComma=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(79,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.NoSpaceAfterComma=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(79,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.SpaceBeforeBinaryOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.Any,e.Services.Formatting.Shared.TokenRange.BinaryOperators),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.SpaceAfterBinaryOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.BinaryOperators,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),1)),this.NoSpaceBeforeBinaryOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.Any,e.Services.Formatting.Shared.TokenRange.BinaryOperators),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),3)),this.NoSpaceAfterBinaryOperator=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create4(e.Services.Formatting.Shared.TokenRange.BinaryOperators,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsBinaryOpContext),3)),this.SpaceAfterKeywordInControl=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Keywords,72),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsControlDeclContext),1)),this.NoSpaceAfterKeywordInControl=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Keywords,72),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsControlDeclContext),3)),this.NewLineBeforeOpenBraceInFunction=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange,70),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsFunctionDeclContext,t.IsBeforeMultilineBlockContext),2),1),this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange,70),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsTypeScriptDeclWithBlockContext,t.IsBeforeMultilineBlockContext),2),1),this.NewLineBeforeOpenBraceInControl=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange,70),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsControlDeclContext,t.IsBeforeMultilineBlockContext),2),1),this.SpaceAfterSemicolonInFor=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(78,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsForContext),1)),this.NoSpaceAfterSemicolonInFor=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(78,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext,t.IsForContext),3)),this.SpaceAfterOpenParen=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(72,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.SpaceBeforeCloseParen=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,73),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),1)),this.NoSpaceBetweenParens=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(72,73),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceAfterOpenParen=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create3(72,e.Services.Formatting.Shared.TokenRange.Any),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.NoSpaceBeforeCloseParen=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create2(e.Services.Formatting.Shared.TokenRange.Any,73),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsSameLineTokenContext),3)),this.SpaceAfterAnonymousFunctionKeyword=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(27,72),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsFunctionDeclContext),1)),this.NoSpaceAfterAnonymousFunctionKeyword=new e.Services.Formatting.Rule(e.Services.Formatting.RuleDescriptor.create1(27,72),e.Services.Formatting.RuleOperation.create2(new e.Services.Formatting.RuleOperationContext(t.IsFunctionDeclContext),3)) }return t.prototype.getRuleName=function(t){var n=this;for(var r in n)if(n[r]===t)return r;throw new Error(e.getDiagnosticMessage(e.DiagnosticCode.Unknown_rule,null))},t.IsForContext=function(e){return 154===e.contextNode.kind()},t.IsNotForContext=function(e){return!t.IsForContext(e)},t.IsBinaryOpContext=function(e){switch(e.contextNode.kind()){case 174:case 175:case 176:case 177:case 178:case 179:case 180:case 181:case 182:case 183:case 184:case 185:case 186:case 187:case 188:case 189:case 190:case 191:case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 208:case 209:return!0;case 133:case 225:case 232:return 107===e.currentTokenSpan.kind()||107===e.nextTokenSpan.kind();case 155:return 29===e.currentTokenSpan.kind()||29===e.nextTokenSpan.kind()}return!1},t.IsNotBinaryOpContext=function(e){return!t.IsBinaryOpContext(e)},t.IsSameLineTokenOrBeforeMultilineBlockContext=function(e){return e.TokensAreOnSameLine()||t.IsBeforeMultilineBlockContext(e)},t.IsBeforeMultilineBlockContext=function(e){return t.IsBeforeBlockContext(e)&&!(e.NextNodeAllOnSameLine()||e.NextNodeBlockIsOnOneLine())},t.IsMultilineBlockContext=function(e){return t.IsBlockContext(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())},t.IsSingleLineBlockContext=function(e){return t.IsBlockContext(e)&&(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())},t.IsBlockContext=function(e){return t.NodeIsBlockContext(e.contextNode)},t.IsBeforeBlockContext=function(e){return t.NodeIsBlockContext(e.nextTokenParent)},t.NodeIsBlockContext=function(e){if(t.NodeIsTypeScriptDeclWithBlockContext(e))return!0;switch(e.kind()){case 146:case 151:case 215:return!0}return!1},t.IsFunctionDeclContext=function(e){switch(e.contextNode.kind()){case 129:case 135:case 139:case 140:case 145:case 142:case 222:case 137:case 219:case 218:case 128:return!0}return!1},t.IsTypeScriptDeclWithBlockContext=function(e){return t.NodeIsTypeScriptDeclWithBlockContext(e.contextNode)},t.NodeIsTypeScriptDeclWithBlockContext=function(e){switch(e.kind()){case 131:case 132:case 122:case 130:return!0}return!1},t.IsAfterCodeBlockContext=function(e){switch(e.currentTokenParent.kind()){case 131:case 130:case 132:case 146:case 151:return!0}return!1},t.IsControlDeclContext=function(e){switch(e.contextNode.kind()){case 147:case 151:case 154:case 155:case 158:case 159:case 161:case 163:case 235:case 236:case 237:return!0;default:return!1}},t.IsObjectContext=function(e){return 215===e.contextNode.kind()},t.IsFunctionCallContext=function(e){return 213===e.contextNode.kind()},t.IsNewContext=function(e){return 216===e.contextNode.kind()},t.IsFunctionCallOrNewContext=function(e){return t.IsFunctionCallContext(e)||t.IsNewContext(e)},t.IsSameLineTokenContext=function(e){return e.TokensAreOnSameLine()},t.IsNotFormatOnEnter=function(e){return 2!=e.formattingRequestKind},t.IsModuleDeclContext=function(e){return 130===e.contextNode.kind()},t.IsObjectTypeContext=function(e){return 122===e.contextNode.kind()&&128!==e.contextNode.parent().kind()},t.IsTypeArgumentOrParameter=function(e,t){return!(80!==e&&81!==e||229!==t&&228!==t)},t.IsTypeArgumentOrParameterContext=function(e){return t.IsTypeArgumentOrParameter(e.currentTokenSpan.kind(),e.currentTokenParent.kind())||t.IsTypeArgumentOrParameter(e.nextTokenSpan.kind(),e.nextTokenParent.kind())},t.IsVoidOpContext=function(e){return 41===e.currentTokenSpan.kind()&&172===e.currentTokenParent.kind()},t}();t.Rules=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(){this.map=[],this.mapRowLength=0}return t.create=function(e){var n=new t;return n.Initialize(e),n},t.prototype.Initialize=function(e){this.mapRowLength=120,this.map=new Array(this.mapRowLength*this.mapRowLength);var t=new Array(this.map.length);return this.FillRules(e,t),this.map},t.prototype.FillRules=function(e,t){var n=this;e.forEach(function(e){n.FillRule(e,t)})},t.prototype.GetRuleBucketIndex=function(e,t){var n=e*this.mapRowLength+t;return n},t.prototype.FillRule=function(t,n){var r=this,i=t.Descriptor.LeftTokenRange!=e.Services.Formatting.Shared.TokenRange.Any&&t.Descriptor.RightTokenRange!=e.Services.Formatting.Shared.TokenRange.Any;t.Descriptor.LeftTokenRange.GetTokens().forEach(function(e){t.Descriptor.RightTokenRange.GetTokens().forEach(function(o){var a=r.GetRuleBucketIndex(e,o),l=r.map[a];void 0==l&&(l=r.map[a]=new s),l.AddRule(t,i,n,a)})})},t.prototype.GetRule=function(e){var t=this.GetRuleBucketIndex(e.currentTokenSpan.kind(),e.nextTokenSpan.kind()),n=this.map[t];if(null!=n)for(var r=0,i=n.Rules().length;i>r;r++){var o=n.Rules()[r];if(o.Operation.Context.InContext(e))return o}return null},t}();t.RulesMap=n;var r=5,i=31;!function(e){e[e.IgnoreRulesSpecific=0]="IgnoreRulesSpecific",e[e.IgnoreRulesAny=1*r]="IgnoreRulesAny",e[e.ContextRulesSpecific=2*r]="ContextRulesSpecific",e[e.ContextRulesAny=3*r]="ContextRulesAny",e[e.NoContextRulesSpecific=4*r]="NoContextRulesSpecific",e[e.NoContextRulesAny=5*r]="NoContextRulesAny"}(t.RulesPosition||(t.RulesPosition={}));var o=t.RulesPosition,a=function(){function t(){this.rulesInsertionIndexBitmap=0}return t.prototype.GetInsertionIndex=function(e){for(var t=0,n=0,o=this.rulesInsertionIndexBitmap;e>=n;)t+=o&i,o>>=r,n+=r;return t},t.prototype.IncreaseInsertionIndex=function(t){var n=this.rulesInsertionIndexBitmap>>t&i;n++,e.Debug.assert((n&i)==n,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules.");var r=this.rulesInsertionIndexBitmap&~(i<=r;r++)n.indexOf(r)<0&&this.tokens.push(r)}return t.prototype.GetTokens=function(){return this.tokens},t.prototype.Contains=function(e){return this.tokens.indexOf(e)>=0},t.prototype.toString=function(){return"[tokenRangeStart="+e.SyntaxKind[this.tokens[0]]+",tokenRangeEnd="+e.SyntaxKind[this.tokens[this.tokens.length-1]]+"]"},t}();t.TokenRangeAccess=n;var r=function(){function e(e){this.tokens=e&&e.length?e:[]}return e.prototype.GetTokens=function(){return this.tokens},e.prototype.Contains=function(e){return this.tokens.indexOf(e)>=0},e}();t.TokenValuesAccess=r;var i=function(){function t(e){this.token=e}return t.prototype.GetTokens=function(){return[this.token]},t.prototype.Contains=function(e){return e==this.token},t.prototype.toString=function(){return"[singleTokenKind="+e.SyntaxKind[this.token]+"]"},t}();t.TokenSingleValueAccess=i;var o=function(){function e(){}return e.prototype.GetTokens=function(){for(var e=[],t=9;119>=t;t++)e.push(t);return e},e.prototype.Contains=function(){return!0},e.prototype.toString=function(){return"[allTokens]"},e}();t.TokenAllAccess=o;var a=function(){function e(e){this.tokenAccess=e}return e.FromToken=function(t){return new e(new i(t))},e.FromTokens=function(t){return new e(new r(t))},e.FromRange=function(t,r,i){return"undefined"==typeof i&&(i=[]),new e(new n(t,r,i))},e.AllTokens=function(){return new e(new o)},e.prototype.GetTokens=function(){return this.tokenAccess.GetTokens()},e.prototype.Contains=function(e){return this.tokenAccess.Contains(e)},e.prototype.toString=function(){return this.tokenAccess.toString()},e.Any=e.AllTokens(),e.AnyIncludingMultilineComments=e.FromTokens(e.Any.GetTokens().concat([6])),e.Keywords=e.FromRange(15,69),e.Operators=e.FromRange(78,119),e.BinaryOperators=e.FromRange(80,119),e.BinaryKeywordOperators=e.FromTokens([29,30]),e.ReservedKeywords=e.FromRange(51,59),e.UnaryPrefixOperators=e.FromTokens([93,94,102,101]),e.UnaryPrefixExpressions=e.FromTokens([13,11,72,74,70,35,31]),e.UnaryPreincrementExpressions=e.FromTokens([11,72,35,31]),e.UnaryPostincrementExpressions=e.FromTokens([11,73,75,31]),e.UnaryPredecrementExpressions=e.FromTokens([11,72,35,31]),e.UnaryPostdecrementExpressions=e.FromTokens([11,73,75,31]),e.Comments=e.FromTokens([7,6]),e.TypeNames=e.FromTokens([11,67,69,61,41,60]),e}();t.TokenRange=a}(t.Shared||(t.Shared={}));t.Shared}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(e){function t(t,n,r){e.call(this,n,r),this._kind=t}return __extends(t,e),t.prototype.kind=function(){return this._kind},t}(e.TextSpan);t.TokenSpan=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(e,t,n,r,i){this.update(e,t,n,r,i)}return t.prototype.parent=function(){return this._parent},t.prototype.node=function(){return this._node},t.prototype.fullStart=function(){return this._fullStart},t.prototype.fullWidth=function(){return this._node.fullWidth()},t.prototype.start=function(){return this._fullStart+this._node.leadingTriviaWidth()},t.prototype.end=function(){return this._fullStart+this._node.leadingTriviaWidth()+this._node.width()},t.prototype.indentationAmount=function(){return this._indentationAmount},t.prototype.childIndentationAmountDelta=function(){return this._childIndentationAmountDelta},t.prototype.depth=function(){return this._depth},t.prototype.kind=function(){return this._node.kind()},t.prototype.hasSkippedOrMissingTokenChild=function(){return null===this._hasSkippedOrMissingTokenChild&&(this._hasSkippedOrMissingTokenChild=e.Syntax.nodeHasSkippedOrMissingTokens(this._node)),this._hasSkippedOrMissingTokenChild},t.prototype.clone=function(e){var t=null;return this._parent&&(t=this._parent.clone(e)),e.getNode(t,this._node,this._fullStart,this._indentationAmount,this._childIndentationAmountDelta)},t.prototype.update=function(e,t,n,r,i){this._parent=e,this._node=t,this._fullStart=n,this._indentationAmount=r,this._childIndentationAmountDelta=i,this._hasSkippedOrMissingTokenChild=null,this._depth=e?e.depth()+1:0},t}();t.IndentationNodeContext=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(){function t(){this.nodes=[]}return t.prototype.getNode=function(t,n,r,i,o){if(this.nodes.length>0){var a=this.nodes.pop();return a.update(t,n,r,i,o),a}return new e.Services.Formatting.IndentationNodeContext(t,n,r,i,o)},t.prototype.releaseNode=function(e,t){if("undefined"==typeof t&&(t=!1),this.nodes.push(e),t){var n=e.parent();n&&this.releaseNode(n,t)}},t}();t.IndentationNodeContextPool=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(t){function n(n,r,i,o,a){t.call(this),this.options=a,this._position=0,this._parent=null,this._indentationNodeContextPool=new e.Services.Formatting.IndentationNodeContextPool,this._textSpan=n,this._snapshot=i,this._parent=this._indentationNodeContextPool.getNode(null,r,0,0,0),this._lastTriviaWasNewLine=o}return __extends(n,t),n.prototype.position=function(){return this._position},n.prototype.parent=function(){return this._parent},n.prototype.textSpan=function(){return this._textSpan},n.prototype.snapshot=function(){return this._snapshot},n.prototype.indentationNodeContextPool=function(){return this._indentationNodeContextPool},n.prototype.forceIndentNextToken=function(e){this._lastTriviaWasNewLine=!0,this.forceRecomputeIndentationOfParent(e,!0)},n.prototype.forceSkipIndentingNextToken=function(e){this._lastTriviaWasNewLine=!1,this.forceRecomputeIndentationOfParent(e,!1)},n.prototype.indentToken=function(){throw e.Errors.abstract()},n.prototype.visitTokenInSpan=function(e){if(this._lastTriviaWasNewLine){var t=this.getTokenIndentationAmount(e),n=this.getCommentIndentationAmount(e);this.indentToken(e,t,n)}},n.prototype.visitToken=function(t){var n=new e.TextSpan(this._position,t.fullWidth());if(n.intersectsWithTextSpan(this._textSpan)){this.visitTokenInSpan(t);var r=t.trailingTrivia();this._lastTriviaWasNewLine=t.hasTrailingNewLine()&&5==r.syntaxTriviaAt(r.count()-1).kind()}this._position+=t.fullWidth()},n.prototype.visitNode=function(t){var n=new e.TextSpan(this._position,t.fullWidth());if(n.intersectsWithTextSpan(this._textSpan)){var r=this.getNodeIndentation(t),i=this._parent;this._parent=this._indentationNodeContextPool.getNode(i,t,this._position,r.indentationAmount,r.indentationAmountDelta),t.accept(this),this._indentationNodeContextPool.releaseNode(this._parent),this._parent=i}else this._position+=t.fullWidth()},n.prototype.getTokenIndentationAmount=function(e){return this._parent.node().firstToken()===e||70===e.kind()||71===e.kind()||74===e.kind()||75===e.kind()||42===e.kind()&&161==this._parent.node().kind()?this._parent.indentationAmount():this._parent.indentationAmount()+this._parent.childIndentationAmountDelta()},n.prototype.getCommentIndentationAmount=function(e){return 71===e.kind()||75===e.kind()?this._parent.indentationAmount()+this._parent.childIndentationAmountDelta():this._parent.indentationAmount()},n.prototype.getNodeIndentation=function(t,n){var r,i=this._parent.node();if(this._textSpan.containsPosition(this._parent.start()))r=this._parent.indentationAmount();else{var o=this._snapshot.getLineFromPosition(this._parent.start()).getText(),a=e.Indentation.firstNonWhitespacePosition(o);r=e.Indentation.columnForPositionInString(o,a,this.options)}var s,l,c=this._parent.childIndentationAmountDelta();switch(t.kind()){default:s=r+c,l=0;break;case 131:case 130:case 122:case 132:case 151:case 215:case 137:case 129:case 222:case 135:case 139:case 140:case 138:case 236:case 214:case 124:case 221:case 144:case 154:case 155:case 158:case 161:case 163:case 233:case 234:case 150:case 157:case 219:case 218:case 224:case 134:case 213:case 216:case 142:case 143:s=r+c,l=this.options.indentSpaces;break;case 147:s=235!==i.kind()||i.elseKeyword.hasTrailingNewLine()||t.ifKeyword.hasLeadingNewLine()?r+c:r,l=this.options.indentSpaces;break;case 235:s=r,l=this.options.indentSpaces;break;case 146:switch(i.kind()){case 120:case 130:case 146:case 233:case 234:s=r+c;break;default:s=r}l=this.options.indentSpaces}if(i&&!n){var u=this._snapshot.getLineNumberFromPosition(this._parent.start()),p=this._snapshot.getLineNumberFromPosition(this._position+t.leadingTriviaWidth());(u===p||n===!1)&&(s=r,l=Math.min(this.options.indentSpaces,c+l))}return{indentationAmount:s,indentationAmountDelta:l}},n.prototype.forceRecomputeIndentationOfParent=function(e,t){var n=this._parent;if(n.fullStart()===e){this._parent=n.parent();var r=this.getNodeIndentation(n.node(),t);n.update(n.parent(),n.node(),n.fullStart(),r.indentationAmount,r.indentationAmountDelta),this._parent=n}},n}(e.SyntaxWalker);t.IndentationTrackingWalker=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){var n=function(t){function n(e,n,r,i,o){t.call(this,e,n,r,i,o),this._edits=[]}return __extends(n,t),n.prototype.indentToken=function(t,n,r){if(0!==t.fullWidth()&&!this.parent().hasSkippedOrMissingTokenChild()){var i=new e.TextSpan(this.position()+t.leadingTriviaWidth(),t.width());if(this.textSpan().containsTextSpan(i)){var o=e.Indentation.indentationString(n,this.options),a=e.Indentation.indentationString(r,this.options);this.recordIndentationEditsForToken(t,o,a)}}},n.prototype.edits=function(){return this._edits},n.prototype.recordEdit=function(t,n,r){this._edits.push(new e.Services.Formatting.TextEditInfo(t,n,r))},n.prototype.recordIndentationEditsForToken=function(t,n,r){var i=this.position(),o=!0,a="",s=t.leadingTrivia();if(s)for(var l=0,c=s.count();c>l;l++,i+=u.fullWidth()){var u=s.syntaxTriviaAt(l);if(this.textSpan().containsTextSpan(new e.TextSpan(i,u.fullWidth())))switch(u.kind()){case 6:this.recordIndentationEditsForMultiLineComment(u,i,r,a,!o),o=!1,a="";break;case 7:case 8:o&&(this.recordIndentationEditsForSingleLineOrSkippedText(u,i,r),o=!1);break;case 4:var p=c>l+1&&s.syntaxTriviaAt(l+1),h=p&&p.isComment()?r:n;o&&(p&&p.isNewLine()||this.recordIndentationEditsForWhitespace(u,i,h),o=!1),a+=u.fullText();break;case 5:o=!0,a="";break;default:throw e.Errors.invalidOperation()}}10!==t.kind()&&o&&n.length>0&&this.recordEdit(i,0,n)},n.prototype.recordIndentationEditsForSingleLineOrSkippedText=function(e,t,n){n.length>0&&this.recordEdit(t,0,n)},n.prototype.recordIndentationEditsForWhitespace=function(e,t,n){var r=e.fullText();n!==r&&this.recordEdit(t,r.length,n)},n.prototype.recordIndentationEditsForMultiLineComment=function(t,n,r,i,o){var a=n,s=e.Syntax.splitMultiLineCommentTriviaIntoMultipleLines(t);if(s.length<=1)return void(o||this.recordIndentationEditsForSingleLineOrSkippedText(t,n,r));var l=e.Indentation.columnForPositionInString(i,i.length,this.options),c=e.Indentation.columnForPositionInString(r,r.length,this.options),u=0;o&&(u=1,a+=s[0].length);for(var p=u;pl&&(l=0);var c=e.Indentation.indentationString(l,this.options);oi;i++){var a=t.syntaxTriviaAt(i);if(a.isComment()||a.isSkippedToken()){var s=new e.Services.Formatting.TokenSpan(a.kind(),r,a.fullWidth());if(this.textSpan().containsTextSpan(s)){if(a.isComment()&&this.previousTokenSpan)this.formatPair(this.previousTokenSpan,this.previousTokenParent,s,this.parent());else{var l=this.getLineNumber(this.previousTokenSpan||this.textSpan());this.trimWhitespaceInLineRange(l,this.getLineNumber(s))}this.previousTokenSpan=s,this.previousTokenParent&&this.indentationNodeContextPool().releaseNode(this.previousTokenParent,!0),this.previousTokenParent=this.parent().clone(this.indentationNodeContextPool())}}r+=a.fullWidth()}},n.prototype.findCommonParents=function(t,n){var r,i,o,a;for(t.depth()=0,"Expected shallowParentDepth >= 0"),e.Debug.assert(a>=0,"Expected deepParentDepth >= 0"),e.Debug.assert(a>=i,"Expected deepParentDepth >= shallowParentDepth");a>i;)o=o.parent(),a--;for(e.Debug.assert(a===i,"Expected deepParentDepth === shallowParentDepth");o.node()&&r.node();){if(o.node()===r.node())return o;o=o.parent(),r=r.parent()}throw e.Errors.invalidOperation()},n.prototype.formatPair=function(e,t,n,r){var i=this.getLineNumber(e),o=this.getLineNumber(n),a=this.findCommonParents(t,r);this.formattingContext.updateContext(e,t,n,r,a);var s=this.rulesProvider.getRulesMap().GetRule(this.formattingContext);null!=s&&(this.RecordRuleEdits(s,e,n),1!=s.Operation.Action&&3!=s.Operation.Action||i==o||this.forceSkipIndentingNextToken(n.start()),2==s.Operation.Action&&i==o&&this.forceIndentNextToken(n.start())),i==o||s&&(3==s.Operation.Action||1==s.Flag)||this.trimWhitespaceInLineRange(i,o,e)},n.prototype.getLineNumber=function(e){return this.snapshot().getLineNumberFromPosition(e.start())},n.prototype.trimWhitespaceInLineRange=function(e,t,n){for(var r=e;t>r;++r){var i=this.snapshot().getLineFromLineNumber(r);this.trimWhitespace(i,n)}},n.prototype.trimWhitespace=function(t,n){if(!(n&&(6==n.kind()||7==n.kind())&&n.start()<=t.endPosition()&&n.end()>=t.endPosition())){var r=t.getText(),i=0;for(i=r.length-1;i>=0&&e.CharacterInfo.isWhitespace(r.charCodeAt(i));--i);++i,i0)return void this.recordEdit(i.start(),i.length(),"");break;case 2:if(1!=t.Flag&&this.getLineNumber(n)!=this.getLineNumber(r))return;i=new e.TextSpan(n.end(),r.start()-n.end());var o=!1,a=this.snapshot().getText(i),s=a.indexOf(this.options.newLineCharacter);if(0>s?o=!0:(s=a.indexOf(this.options.newLineCharacter,s+1),s>=0&&(o=!0)),o)return void this.recordEdit(i.start(),i.length(),this.options.newLineCharacter);break;case 1:if(1!=t.Flag&&this.getLineNumber(n)!=this.getLineNumber(r))return;if(i=new e.TextSpan(n.end(),r.start()-n.end()),i.length()>1||" "!=this.snapshot().getText(i))return void this.recordEdit(i.start(),i.length()," ")}}},n}(e.Services.Formatting.MultipleTokenIndenter);t.Formatter=n}(t.Formatting||(t.Formatting={}));t.Formatting}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var debugObjectHost=this,TypeScript;!function(e){!function(t){var n=function(){function t(e){this.host=e}return t.prototype.getPreProcessedFileInfo=function(t,n){return e.preProcessFile(t,n)},t.prototype.getDefaultCompilationSettings=function(){var t=new e.CompilationSettings;return t.codeGenTarget=1,t},t.prototype.dumpMemory=function(){if(!debugObjectHost||!debugObjectHost.Debug||!debugObjectHost.Debug.dumpHeap)throw new Error(e.getDiagnosticMessage(e.DiagnosticCode.This_version_of_the_Javascript_runtime_does_not_support_the_0_function,["Debug.dumpHeap()"]));for(var t=debugObjectHost.Debug.dumpHeap(2),n=0,r=0;ri;i++){var a=r[i];this._fileNameToEntry.add(e.switchToForwardSlashes(a),new n(a,t,t.getScriptVersion(a),t.getScriptIsOpen(a),t.getScriptByteOrderMark(a)))}var s=t.getCompilationSettings();s||(s=new e.CompilationSettings,s.codeGenTarget=1),this._compilationSettings=e.ImmutableCompilationSettings.fromCompilationSettings(s)}return t.prototype.compilationSettings=function(){return this._compilationSettings},t.prototype.contains=function(t){return null!==this._fileNameToEntry.lookup(e.switchToForwardSlashes(t))},t.prototype.getHostFileName=function(t){var n=this._fileNameToEntry.lookup(e.switchToForwardSlashes(t));return n?n.fileName:t},t.prototype.getFileNames=function(){return this._fileNameToEntry.getAllKeys()},t.prototype.getVersion=function(t){return this._fileNameToEntry.lookup(e.switchToForwardSlashes(t)).version},t.prototype.isOpen=function(t){return this._fileNameToEntry.lookup(e.switchToForwardSlashes(t)).isOpen},t.prototype.getByteOrderMark=function(t){return this._fileNameToEntry.lookup(e.switchToForwardSlashes(t)).byteOrderMark},t.prototype.getScriptSnapshot=function(t){return this._fileNameToEntry.lookup(e.switchToForwardSlashes(t)).getScriptSnapshot()},t.prototype.getScriptTextChangeRangeSinceVersion=function(t,n){var r=this.getVersion(t);if(n===r)return e.TextChangeRange.unchanged;var i=this.getScriptSnapshot(t);return i.getTextChangeRangeSinceVersion(n)},t}(),i=function(){function t(e){this._host=e,this._currentFileName="",this._currentFileVersion=-1,this._currentFileSyntaxTree=null,this._currentFileScriptSnapshot=null,this._hostCache=new r(e)}return t.prototype.getCurrentFileSyntaxTree=function(e){this._hostCache=new r(this._host);var t=this._hostCache.getVersion(e),n=null;if(null===this._currentFileSyntaxTree||this._currentFileName!==e){var i=this._hostCache.getScriptSnapshot(e);n=this.createSyntaxTree(e,i)}else if(this._currentFileVersion!==t){var i=this._hostCache.getScriptSnapshot(e);n=this.updateSyntaxTree(e,i,this._currentFileSyntaxTree,this._currentFileVersion)}return null!==n&&(this._currentFileScriptSnapshot=i,this._currentFileVersion=t,this._currentFileName=e,this._currentFileSyntaxTree=n),this._currentFileSyntaxTree},t.prototype.createSyntaxTree=function(t,n){var r=e.SimpleText.fromScriptSnapshot(n),i=e.Parser.parse(t,r,e.isDTSFile(t),e.getParseOptions(e.ImmutableCompilationSettings.defaultSettings()));return i},t.prototype.updateSyntaxTree=function(t,n,r,i){var o=this._hostCache.getScriptTextChangeRangeSinceVersion(t,i);if(null===o)return this.createSyntaxTree(t,n);var a=e.Parser.incrementalParse(r,o,e.SimpleText.fromScriptSnapshot(n));return this.ensureInvariants(t,o,a,this._currentFileScriptSnapshot,n),a},t.prototype.ensureInvariants=function(t,n,r,i,o){function a(){function e(e){return'"'+e.replace(/\r/g,"\\r").replace(/\n/g,"\\n")+'"'}var t=["expected length:",s,"and actual length:",l,"are not equal\r\n"],r=n.span();t.push("Edit range (old text) (start: "+r.start()+", end: "+r.end()+") \r\n"),t.push("Old text edit range contents: "+e(i.getText(r.start(),r.end())));var a=n.newSpan();return t.push("Edit range (new text) (start: "+a.start()+", end: "+a.end()+") \r\n"),t.push("New text edit range contents: "+e(o.getText(a.start(),a.end()))),t.join(" ")}var s=i.getLength()-n.span().length()+n.newLength(),l=o.getLength(); if(e.Debug.assert(s===l,"Expected length is different from actual!",a),e.Debug.shouldAssert(3)){var c=i.getText(0,n.span().start()),u=o.getText(0,n.span().start());e.Debug.assert(c===u,"Expected equal prefix texts!");var p=i.getText(n.span().end(),i.getLength()),h=o.getText(n.newSpan().end(),o.getLength());e.Debug.assert(p===h,"Expected equal suffix texts!");var d=this.createSyntaxTree(t,o);e.Debug.assert(d.structuralEquals(r),"Expected equal incremental and normal trees");var m=r.sourceUnit().fullText(),y=o.getText(0,o.getLength());e.Debug.assert(m===y,"Expected full texts to be equal")}},t}();t.SyntaxTreeCache=i;var o=function(){function t(e){this.host=e,this.compiler=null,this.hostCache=null,this.logger=this.host}return t.prototype.synchronizeHostData=function(){var t=this;e.timeFunction(this.logger,"synchronizeHostData()",function(){t.synchronizeHostDataWorker()})},t.prototype.synchronizeHostDataWorker=function(){this.hostCache=new r(this.host);var t=this.hostCache.compilationSettings();null===this.compiler&&(this.compiler=new e.TypeScriptCompiler(this.logger,t)),this.compiler.setCompilationSettings(t);for(var n=this.compiler.fileNames(),i=0,o=n.length;o>i;i++){var a=n[i];this.hostCache.contains(a)||this.compiler.removeFile(a)}for(var s=this.hostCache,l=s.getFileNames(),i=0,o=l.length;o>i;i++){var a=l[i];this.compiler.getDocument(a)?this.tryUpdateFile(this.compiler,a):this.compiler.addFile(a,s.getScriptSnapshot(a),s.getByteOrderMark(a),s.getVersion(a),s.isOpen(a))}},t.prototype.tryUpdateFile=function(e,t){var n=this.compiler.getDocument(t),r=this.hostCache.getVersion(t),i=this.hostCache.isOpen(t);if(n.version!==r||n.isOpen!==i){var o=null;n.isOpen&&i&&(o=this.hostCache.getScriptTextChangeRangeSinceVersion(t,n.version)),e.updateFile(t,this.hostCache.getScriptSnapshot(t),r,i,o)}},t.prototype.getScriptSnapshot=function(e){return this.synchronizeHostData(),this.hostCache.getScriptSnapshot(e)},t.prototype.getCachedHostFileName=function(e){return this.hostCache||this.synchronizeHostData(),this.hostCache.getHostFileName(e)},t.prototype.getCachedTopLevelDeclaration=function(e){return this.hostCache||this.synchronizeHostData(),this.compiler.topLevelDeclaration(e)},t.prototype.compilationSettings=function(){return this.synchronizeHostData(),this.compiler.compilationSettings()},t.prototype.fileNames=function(){return this.synchronizeHostData(),this.compiler.fileNames()},t.prototype.cleanupSemanticCache=function(){this.compiler.cleanupSemanticCache()},t.prototype.getDocument=function(e){return this.synchronizeHostData(),this.compiler.getDocument(e)},t.prototype.getSyntacticDiagnostics=function(e){return this.synchronizeHostData(),this.compiler.getSyntacticDiagnostics(e)},t.prototype.getSemanticDiagnostics=function(e){return this.synchronizeHostData(),this.compiler.getSemanticDiagnostics(e)},t.prototype.getSymbolInformationFromAST=function(e,t){return this.synchronizeHostData(),this.compiler.pullGetSymbolInformationFromAST(e,t)},t.prototype.getCallInformationFromAST=function(e,t){return this.synchronizeHostData(),this.compiler.pullGetCallInformationFromAST(e,t)},t.prototype.getVisibleMemberSymbolsFromAST=function(e,t){return this.synchronizeHostData(),this.compiler.pullGetVisibleMemberSymbolsFromAST(e,t)},t.prototype.getVisibleDeclsFromAST=function(e,t){return this.synchronizeHostData(),this.compiler.pullGetVisibleDeclsFromAST(e,t)},t.prototype.getContextualMembersFromAST=function(e,t){return this.synchronizeHostData(),this.compiler.pullGetContextualMembersFromAST(e,t)},t.prototype.pullGetDeclInformation=function(e,t,n){return this.synchronizeHostData(),this.compiler.pullGetDeclInformation(e,t,n)},t.prototype.topLevelDeclaration=function(e){return this.synchronizeHostData(),this.compiler.topLevelDeclaration(e)},t.prototype.getDeclForAST=function(e){return this.synchronizeHostData(),this.compiler.getDeclForAST(e)},t.prototype.emit=function(e,t){return this.synchronizeHostData(),this.compiler.emit(e,t)},t.prototype.emitDeclarations=function(e,t){return this.synchronizeHostData(),this.compiler.emitDeclarations(e,t)},t}();t.LanguageServiceCompiler=o}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){var n=function(){function t(){}return t.filterContextualMembersList=function(t,n){if(!n||!n.symbols||0===n.symbols.length)return t;for(var r=n.symbols,i=e.createIntrinsicsObject(),o=0,a=r.length;a>o;o++)i[e.stripStartAndEndQuotes(r[o].getDisplayName())]=!0;for(var s=[],l=0,c=t.length;c>l;l++){var u=t[l];i[e.stripStartAndEndQuotes(u.getDisplayName())]||s.push(u)}return s},t.isCompletionListBlocker=function(n,r){return e.Syntax.isEntirelyInsideComment(n,r)||e.Syntax.isEntirelyInStringOrRegularExpressionLiteral(n,r)||t.isIdentifierDefinitionLocation(n,r)||t.isRightOfIllegalDot(n,r)},t.getContainingObjectLiteralApplicableForCompletion=function(e,n){var r=t.getNonIdentifierCompleteTokenOnLeft(e,n);if(r){var i=r.parent();switch(r.kind()){case 70:case 79:if(i&&2===i.kind()&&(i=i.parent()),i&&215===i.kind())return i}}return null},t.isIdentifierDefinitionLocation=function(e,n){var r=t.getNonIdentifierCompleteTokenOnLeft(e,n);if(r){var i=r.containingNode()&&r.containingNode().kind();switch(r.kind()){case 79:return 227===i||224===i||132===i;case 72:return 227===i||236===i;case 70:return 132===i;case 57:case 55:case 58:case 77:return 242===i;case 44:case 65:case 46:case 52:case 27:case 40:case 45:case 53:case 64:case 68:return!0}switch(r.token().text()){case"class":case"interface":case"enum":case"module":return!0}}return!1},t.getNonIdentifierCompleteTokenOnLeft=function(e,t){var n=e.findCompleteTokenOnLeft(t,!0);return n&&t===n.end()&&10==n.kind()&&(n=n.previousToken(!0)),n&&t===n.end()&&11===n.kind()&&(n=n.previousToken(!0)),n},t.isRightOfIllegalDot=function(e,n){var r=t.getNonIdentifierCompleteTokenOnLeft(e,n);if(r)switch(r.kind()){case 76:var i=r.previousToken(!0);return i&&13===i.kind();case 13:var o=r.token().text();return"."===o.charAt(o.length-1)}return!1},t.getValidCompletionEntryDisplayName=function(t){if(t&&t.length>0){var n=t.charCodeAt(0);if(39!==n&&34!==n)return t;if(t=e.stripStartAndEndQuotes(t),e.Scanner.isValidIdentifier(e.SimpleText.fromString(t),1))return t}return null},t}();t.CompletionHelpers=n}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){var n=function(){function t(){}return t.getKeywordCompltions=function(){if(null===t.keywordCompletions){for(var n=[],r=0,i=t.keywords.length;i>r;r++){var o=t.keywords[r],a=new e.Services.ResolvedCompletionEntry(o,e.Services.ScriptElementKind.keyword,e.Services.ScriptElementKindModifier.none,null,o,null);n.push(a)}t.keywordCompletions=n}return t.keywordCompletions},t.keywords=["break","case","catch","class","constructor","continue","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","function","get","if","implements","import","in","instanceof","interface","module","new","private","public","require","return","set","static","super","switch","this","throw","true","try","typeof","var","while","with"],t.keywordCompletions=null,t}();t.KeywordCompletions=n}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){var n=function(){function t(){}return t.isInPartiallyWrittenTypeArgumentList=function(n,r){var i=n.sourceUnit().findTokenOnLeft(r,!0);if(i&&e.Syntax.hasAncestorOfKind(i,229))return null;var o=0,a=0;e:for(;i;){switch(i.kind()){case 80:if(0===o){var s=i;if(i=i.previousToken(!0),!i||11!==i.kind())break e;return{genericIdentifer:i,lessThanToken:s,argumentIndex:a}}if(0>o)break e;o--;break;case 97:o++;case 81:o++;break;case 79:0==o&&a++;break;case 71:;if(i=t.moveBackUpTillMatchingTokenKind(i,71,70),!i)break e;break;case 85:if(i=i.previousToken(!0),!i||73!==i.kind())break e;if(i=t.moveBackUpTillMatchingTokenKind(i,73,72),i&&81===i.kind()&&(i=t.moveBackUpTillMatchingTokenKind(i,81,80)),i&&31===i.kind()&&(i=i.previousToken(!0)),!i)break e;break;case 11:case 60:case 67:case 69:case 41:case 61:case 76:case 74:case 75:break;default:break e}i=i.previousToken(!0)}return null},t.getSignatureInfoFromSignatureSymbol=function(t,n,r){for(var i=[],o=n.length>1,a=0,s=n.length;s>a;a++){var l=n[a];if(!o||!l.isDefinition()){var c=new e.Services.FormalSignatureItemInfo,u=[],p=l.getScopedNameEx(r).toString();p||t.isType()&&!t.isNamedTypeSymbol()||(p=t.getScopedNameEx(r).toString());var h=l.getSignatureTypeNameEx(p,!1,!1,r,!0,!0);c.signatureInfo=e.MemberName.memberNameToString(h,u),c.docComment=l.docComments();var d=0;if(l.isGeneric())for(var m=l.getTypeParameters(),y=0,f=m.length;f>y;y++){var g=m[y],v=new e.Services.FormalTypeParameterInfo;v.name=g.getDisplayName(),v.docComment=g.docComments(),v.minChar=u[2*d],v.limChar=u[2*d+1],d++,c.typeParameters.push(v)}for(var S=l.parameters,y=0,f=S.length;f>y;y++){var T=S[y],b=new e.Services.FormalParameterInfo;b.isVariable=l.hasVarArgs&&y===S.length-1,b.name=T.getDisplayName(),b.docComment=T.docComments(),b.minChar=u[2*d],b.limChar=u[2*d+1],d++,c.parameters.push(b)}i.push(c)}}return i},t.getSignatureInfoFromGenericSymbol=function(t,n){var r=new e.Services.FormalSignatureItemInfo,i=[],o=t.getScopedNameEx(n,!1,!0,!1,!0);r.signatureInfo=e.MemberName.memberNameToString(o,i),r.docComment=t.docComments();for(var a=t.type,s=a.getTypeParameters(),l=0,c=s.length;c>l;l++){var u=s[l],p=new e.Services.FormalTypeParameterInfo;p.name=u.getDisplayName(),p.docComment=u.docComments(),p.minChar=i[2*l],p.limChar=i[2*l+1],r.typeParameters.push(p)}return[r]},t.getActualSignatureInfoFromCallExpression=function(t,n,r){if(!t)return null;var i=new e.Services.ActualSignatureInfo,o=n,a=n;if(t.argumentList.typeArgumentList&&(o=Math.min(t.argumentList.typeArgumentList.start()),a=Math.max(Math.max(t.argumentList.typeArgumentList.start(),t.argumentList.typeArgumentList.end()+t.argumentList.typeArgumentList.trailingTriviaWidth()))),t.argumentList.arguments&&(o=Math.min(o,t.argumentList.arguments.start()),a=Math.max(a,Math.max(t.argumentList.arguments.start(),t.argumentList.arguments.end()+t.argumentList.arguments.trailingTriviaWidth()))),i.parameterMinChar=o,i.parameterLimChar=a,i.currentParameterIsTypeParameter=!1,i.currentParameter=-1,r)i.currentParameterIsTypeParameter=!0,i.currentParameter=r.argumentIndex;else if(t.argumentList.arguments&&t.argumentList.arguments.nonSeparatorCount()>0){i.currentParameter=0;for(var s=0;st.argumentList.arguments.nonSeparatorAt(s).end()+t.argumentList.arguments.nonSeparatorAt(s).trailingTriviaWidth()&&i.currentParameter++}return i},t.getActualSignatureInfoFromPartiallyWritenGenericExpression=function(t,n){var r=new e.Services.ActualSignatureInfo;return r.parameterMinChar=n.lessThanToken.start(),r.parameterLimChar=Math.max(n.lessThanToken.fullEnd(),t),r.currentParameterIsTypeParameter=!0,r.currentParameter=n.argumentIndex,r},t.isSignatureHelpBlocker=function(t,n){return 0>n||n>t.fullWidth()?!0:e.Syntax.isEntirelyInsideComment(t,n)},t.isTargetOfObjectCreationExpression=function(t){var n=e.Syntax.getAncestorOfKind(t,216);if(n){var r=n.element(),i=r.newKeyword.fullWidth(),o=t.fullStart()-n.fullStart();return o>=i&&o<=i+r.expression.fullWidth()}return!1},t.moveBackUpTillMatchingTokenKind=function(t,n,r){if(!t||t.kind()!==n)throw e.Errors.invalidOperation();t=t.previousToken(!0);for(var i=0;t;){if(t.kind()===r){if(0===i)return t;if(0>i)break;i--}else t.kind()===n&&i++;t=t.previousToken(!0)}return null},t}();t.SignatureInfoHelpers=n}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){var t=function(){function e(e,t,n,r,i,o){this.name=e,this.kind=t,this.kindModifiers=n,this.type=r,this.fullSymbolName=i,this.docComment=o}return e.prototype.isResolved=function(){return!0},e}();e.ResolvedCompletionEntry=t;var n=function(){function e(e,t,n,r){this.name=e,this.kind=t,this.kindModifiers=n,this.decl=r,this.type=null,this.fullSymbolName=null,this.docComment=null,this.hasBeenResolved=!1}return e.prototype.isResolved=function(){return this.hasBeenResolved},e.prototype.resolve=function(e,t,n){this.type=e,this.fullSymbolName=t,this.docComment=n,this.hasBeenResolved=!0},e}();e.DeclReferenceCompletionEntry=n;var r=function(){function e(e,t,n){this.fileName=e,this.position=t,this.entries=n}return e}();e.CompletionSession=r}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e){if(e)switch(e.kind()){case 131:case 128:case 130:case 137:case 129:case 225:case 218:case 219:return!0}return!1}var r=function(){function t(t){this.host=t,this.activeCompletionSession=null,this.logger=this.host,this.compiler=new e.Services.LanguageServiceCompiler(this.host),this._syntaxTreeCache=new e.Services.SyntaxTreeCache(this.host),e.LocalizedDiagnosticMessages||(e.LocalizedDiagnosticMessages=this.host.getLocalizedDiagnosticMessages())}return t.prototype.cleanupSemanticCache=function(){this.compiler.cleanupSemanticCache()},t.prototype.refresh=function(){},t.prototype.getSymbolInfoAtPosition=function(t,n,r){var i=this.compiler.getDocument(t),o=i.sourceUnit(),a=e.getAstAtPosition(o,n);if(null===a||r&&11!==a.kind())return this.logger.log("No name found at the given position"),null;var s=this.compiler.getSymbolInformationFromAST(a,i);if(null===s||null===s.symbol&&s.aliasSymbol)return this.logger.log("No symbol found at the given position"),{symbol:null,containingASTOpt:null};var l=s.aliasSymbol||s.symbol,c=l.getName();if(r){var u=a.valueText();if((l.isError()||l.isAny())&&u!==c)return this.logger.log("Unknown symbol found at the given position"),{symbol:null,containingASTOpt:null}}var p=this.getSymbolScopeAST(l,a);return{symbol:l,containingASTOpt:p}},t.prototype.getReferencesAtPosition=function(t,n){t=e.switchToForwardSlashes(t);var r=this.getSymbolInfoAtPosition(t,n,!0);if(null===r)return[];if(null===r.symbol)return this.getSingleNodeReferenceAtPosition(t,n);for(var i=[],o=r.symbol,a=o.getName(),s=r.containingASTOpt,l=this.compiler.fileNames(),c=0,u=l.length;u>c;c++){var p=l[c];if(!s||t==p){var h=this.compiler.getDocument(p),d=h.bloomFilter();d.probablyContains(a)&&(i=i.concat(this.getReferencesInFile(p,o,s)))}}return i},t.prototype.getSymbolScopeAST=function(e,t){if(8192===e.kind&&e.getDeclarations().length>0&&e.getDeclarations()[0].getParentDecl()&&65536===e.getDeclarations()[0].getParentDecl().kind)for(;t;){if(129===t.kind()||135===t.kind())return t;t=t.parent}return null},t.prototype.getOccurrencesAtPosition=function(t,n){t=e.switchToForwardSlashes(t);var r=this.getSymbolInfoAtPosition(t,n,!0);if(null===r)return[];if(null===r.symbol)return this.getSingleNodeReferenceAtPosition(t,n);var i=r.symbol,o=r.containingASTOpt;return this.getReferencesInFile(t,i,o)},t.prototype.getSingleNodeReferenceAtPosition=function(t,n){var r=this.compiler.getDocument(t),i=r.sourceUnit(),o=e.getAstAtPosition(i,n);if(null===o||11!==o.kind())return[];var a=this.isWriteAccess(o);return[new e.Services.ReferenceEntry(this.compiler.getCachedHostFileName(t),o.start(),o.end(),a)]},t.prototype.getImplementorsAtPosition=function(t,n){var r=this;t=e.switchToForwardSlashes(t);var i=[],o=this.compiler.getDocument(t),a=o.sourceUnit(),s=e.getAstAtPosition(a,n);if(null===s||11!==s.kind())return this.logger.log("No identifier at the specified location."),i;var l=s.valueText(),c=this.compiler.getSymbolInformationFromAST(s,o),u=c.symbol;if(null===u)return this.logger.log("No symbol annotation on the identifier AST."),i;var p=u.getName();if((u.isError()||u.isAny())&&l!==p)return this.logger.log("Unknown symbol found at the given position"),i;var h,d=u.type;if(d.isClass()||d.isInterface())h=d.getTypesThatExtendThisType();else if(4096==u.kind||16384==u.kind||d.isMethod()||d.isProperty()){var m=u.getDeclarations()[0],y=m.getParentDecl().getSymbol().type;h=[];var f=y.getTypesThatExtendThisType(),g=y.getExtendedTypes();f.forEach(function(e){var t=r.getOverrides(e,u);t.forEach(function(e){h.push(e)})}),g.forEach(function(e){var t=r.getOverrides(e,u);t.forEach(function(e){h.push(e)})})}if(h)for(var v=this.compiler.fileNames(),S=0,T=v.length;T>S;S++){var b=v[S],_=this.compiler.getDocument(b),E=_.bloomFilter();h.forEach(function(e){var t=e.getName();E.probablyContains(t)&&(i=i.concat(r.getImplementorsInFile(b,e)))})}return i},t.prototype.getOverrides=function(e,t){var n,r=[];return e.isClass()?n=e.getMembers():e.isInterface()&&(n=e.getMembers()),null==n?null:(n.forEach(function(e){var n=e;n.getName()===t.getName()&&r.push(n)}),r)},t.prototype.getImplementorsInFile=function(t,n){var r=this,i=[],o=n.getDisplayName(),a=this.getPossibleSymbolReferencePositions(t,o);if(a&&a.length>0){var s=this.compiler.getDocument(t),l=s.sourceUnit();a.forEach(function(o){var a=e.getAstAtPosition(l,o);if(null!==a&&11===a.kind()){var c=r.compiler.getSymbolInformationFromAST(a,s);if(null!==c){var u;if(8===n.kind||16===n.kind)u=c.symbol.type;else{var p=c.symbol.getDeclarations()[0];u=p.getSymbol()}if(u===n){var h=r.isWriteAccess(a);i.push(new e.Services.ReferenceEntry(r.compiler.getCachedHostFileName(t),a.start(),a.end(),h))}}}})}return i},t.prototype.getReferencesInFile=function(t,n,r){var i=this,o=[],a=n.getDisplayName(),s=this.getPossibleSymbolReferencePositions(t,a);if(s&&s.length>0){var l=this.compiler.getDocument(t),c=l.sourceUnit();s.forEach(function(s){if(!r||!(sr.end())){var u=e.getAstAtPosition(c,s);if(null!==u&&11===u.kind()&&u.end()-u.start()===a.length){var p=i.compiler.getSymbolInformationFromAST(u,l);if(null!==p){var h=p.aliasSymbol||p.symbol;if(e.Services.FindReferenceHelpers.compareSymbolsForLexicalIdentity(h,n)){var d=i.isWriteAccess(u);o.push(new e.Services.ReferenceEntry(i.compiler.getCachedHostFileName(t),u.start(),u.end(),d))}}}}})}return o},t.prototype.isWriteAccess=function(e){var t=e.parent;if(null!==t){var n=t.kind();switch(n){case 131:return t.identifier===e;case 128:return t.identifier===e;case 130:return t.name===e||t.stringLiteral===e;case 129:return t.identifier===e;case 133:return t.identifier===e;case 225:var r=t;return!(!r.equalsValueClause||r.propertyName!==e);case 242:return!0;case 174:case 175:case 176:case 177:case 178:case 179:case 182:case 180:case 181:case 183:case 185:case 184:return t.left===e;case 168:case 210:return!0;case 169:case 211:return!0}}return!1},t.prototype.isLetterOrDigit=function(t){return t>=97&&122>=t||t>=65&&90>=t||t>=48&&57>=t||95===t||36===t||t>127&&e.Unicode.isIdentifierPart(t,1)},t.prototype.getPossibleSymbolReferencePositions=function(e,t){var n=[];if(!t||!t.length)return n;for(var r=this.compiler.getScriptSnapshot(e),i=r.getLength(),o=r.getText(0,i),a=t.length,s=o.indexOf(t);s>=0;){var l=s+a;(0>=s||!this.isLetterOrDigit(o.charCodeAt(s-1)))&&(l>=i||!this.isLetterOrDigit(o.charCodeAt(l)))&&n.push(s),s=o.indexOf(t,s+a+1)}return n},t.prototype.getSignatureAtPosition=function(t,r){t=e.switchToForwardSlashes(t);var i=this.compiler.getDocument(t);if(e.Services.SignatureInfoHelpers.isSignatureHelpBlocker(i.syntaxTree().sourceUnit(),r))return this.logger.log("position is not a valid singature help location"),null;var o=e.Services.SignatureInfoHelpers.isInPartiallyWrittenTypeArgumentList(i.syntaxTree(),r);if(o)return this.getTypeParameterSignatureFromPartiallyWrittenExpression(i,r,o);var a=i.sourceUnit(),s=e.getAstAtPosition(a,r);if(!s)return null;for(;s&&!(213===s.kind()||216===s.kind()||n(s)&&r>s.start());)s=s.parent;if(!s)return null;if(213!==s.kind()&&216!==s.kind())return this.logger.log("No call expression or generic arguments found for the given position"),null;var l=s,c=216===l.kind();if(c&&null===l.argumentList)return this.logger.log("No signature help for a object creation expression without arguments"),null;e.Debug.assert(null!==l.argumentList.arguments,"Expected call expression to have arguments, but it did not");var u=l.expression.end()+l.expression.trailingTriviaWidth(),p=l.argumentList.arguments.end()+l.argumentList.arguments.trailingTriviaWidth();if(u>=r||r>p)return this.logger.log("Outside argument list"),null;var h=this.compiler.getCallInformationFromAST(s,i);if(!h||!h.targetSymbol||!h.resolvedSignatures)return this.logger.log("Could not find symbol for call expression"),null;var d=new e.Services.SignatureInfo;return d.formal=e.Services.SignatureInfoHelpers.getSignatureInfoFromSignatureSymbol(h.targetSymbol,h.resolvedSignatures,h.enclosingScopeSymbol,this.compiler),d.actual=e.Services.SignatureInfoHelpers.getActualSignatureInfoFromCallExpression(l,r,o),d.activeFormal=h.resolvedSignatures&&h.candidateSignature?h.resolvedSignatures.indexOf(h.candidateSignature):-1,null===d.actual||null===d.formal||null===d.activeFormal?(this.logger.log("Can't compute actual and/or formal signature of the call expression"),null):d},t.prototype.getTypeParameterSignatureFromPartiallyWrittenExpression=function(t,n,r){var i=t.sourceUnit(),o=e.getAstAtPosition(i,r.genericIdentifer.start());if(null===o||11!==o.kind())return this.logger.log(["getTypeParameterSignatureAtPosition: Unexpected ast found at position:",n,null===o?"ast was null":"ast kind: "+e.SyntaxKind[o.kind()]].join(" ")),null;var a=this.compiler.getSymbolInformationFromAST(o,t);if(!a.symbol)return null;var s=e.Services.SignatureInfoHelpers.isTargetOfObjectCreationExpression(r.genericIdentifer),l=a.symbol.type;if(16777216===l.kind||s&&33554432===l.kind){var c=s?l.getConstructSignatures():l.getCallSignatures(),u=new e.Services.SignatureInfo;return u.formal=e.Services.SignatureInfoHelpers.getSignatureInfoFromSignatureSymbol(a.symbol,c,a.enclosingScopeSymbol,this.compiler),u.actual=e.Services.SignatureInfoHelpers.getActualSignatureInfoFromPartiallyWritenGenericExpression(n,r),u.activeFormal=0,u}if(l.isGeneric()){33554432===l.kind&&(l=l.getAssociatedContainerType());var u=new e.Services.SignatureInfo;return u.formal=e.Services.SignatureInfoHelpers.getSignatureInfoFromGenericSymbol(l,a.enclosingScopeSymbol,this.compiler),u.actual=e.Services.SignatureInfoHelpers.getActualSignatureInfoFromPartiallyWritenGenericExpression(n,r),u.activeFormal=0,u}return null},t.prototype.getDefinitionAtPosition=function(t,n){t=e.switchToForwardSlashes(t);var r=this.getSymbolInfoAtPosition(t,n,!1);if(null===r||null===r.symbol)return null;var i=r.symbol;if(e.Debug.assert(0!==i.kind&&0!==i.kind&&1!==i.kind,"getDefinitionAtPosition - Invalid symbol kind"),2===i.kind)return null;var o=i.getDeclarations(),a=i.getDisplayName(),s=this.mapPullElementKind(i.kind,i),l=i.getContainer(),c=l?l.fullName():"",u=l?this.mapPullElementKind(l.kind,l):"",p=[];return this.tryAddDefinition(s,a,u,c,o,p)||this.tryAddSignatures(s,a,u,c,o,p)||this.tryAddConstructor(s,a,u,c,o,p)||this.addDeclarations(s,a,u,c,o,p),p},t.prototype.addDeclarations=function(e,t,n,r,i,o){for(var a=0,s=i.length;s>a;a++)this.addDeclaration(e,t,n,r,i[a],o)},t.prototype.addDeclaration=function(t,n,r,i,o,a){var s=o.getSpan();a.push(new e.Services.DefinitionInfo(this.compiler.getCachedHostFileName(o.fileName()),s.start(),s.end(),t,n,r,i))},t.prototype.tryAddDefinition=function(t,n,r,i,o,a){var s=e.ArrayUtilities.firstOrDefault(o,function(e){var t=e.getSignatureSymbol();return t&&t.isDefinition()});return s?(this.addDeclaration(t,n,r,i,s,a),!0):!1},t.prototype.tryAddSignatures=function(t,n,r,i,o,a){var s=e.ArrayUtilities.where(o,function(e){var t=e.getSignatureSymbol();return t&&!t.isDefinition()});return 0===s.length?!1:(this.addDeclaration(t,n,r,i,e.ArrayUtilities.last(s),a),!0)},t.prototype.tryAddConstructor=function(t,n,r,i,o,a){var s=e.ArrayUtilities.where(o,function(e){return 32768===e.kind});return 0===s.length?!1:(this.addDeclaration(t,n,r,i,e.ArrayUtilities.last(s),a),!0)},t.prototype.getNavigateToItems=function(e){for(var t=e.split(" "),n=new Array(t.length),r=0;rr;r++){var s=o[r],l=this.compiler.getCachedTopLevelDeclaration(s);this.findSearchValueInPullDecl(s,[l],i,t,n)}return i},t.prototype.findSearchValueInPullDecl=function(t,n,r,i,o,a,s){for(var l,c,u,p,h,d,m,y,f,g=0,v=n.length;v>g;++g){c=n[g],h=c.getDisplayName(),d=this.mapPullElementKind(c.kind),m=null;for(var S=0,T=i.length;T>S;++S)if(u=i[S],p=o[S],f=p.exec(h)){if(h.length===u.length&&0===f.index){m=e.Services.MatchKind.exact;break}if(h.length>u.length&&0===f.index){m=e.Services.MatchKind.prefix;break}if(h.length>u.length&&f.index>0){m=e.Services.MatchKind.subString;break}}this.shouldIncludeDeclarationInNavigationItems(c)&&(y=a?a+"."+h:h,m&&(l=new e.Services.NavigateToItem,l.name=h,l.matchKind=m,l.kind=this.mapPullElementKind(c.kind),l.kindModifiers=this.getScriptElementKindModifiersFromDecl(c),l.fileName=this.compiler.getCachedHostFileName(t),l.minChar=c.getSpan().start(),l.limChar=c.getSpan().end(),l.containerName=a||"",l.containerKind=s||"",r.push(l))),this.isContainerDeclaration(c)&&this.findSearchValueInPullDecl(t,c.getChildDecls(),r,i,o,y,d)}},t.prototype.getScriptElementKindModifiersFromDecl=function(t){var n=[],r=t.flags;return 1&r&&n.push(e.Services.ScriptElementKindModifier.exportedModifier),8&r&&n.push(e.Services.ScriptElementKindModifier.ambientModifier),4&r&&n.push(e.Services.ScriptElementKindModifier.publicMemberModifier),2&r&&n.push(e.Services.ScriptElementKindModifier.privateMemberModifier),16&r&&n.push(e.Services.ScriptElementKindModifier.staticModifier),n.length>0?n.join(","):e.Services.ScriptElementKindModifier.none},t.prototype.isContainerDeclaration=function(e){switch(e.kind){case 1:case 4:case 8:case 16:case 32:case 64:return!0}return!1},t.prototype.shouldIncludeDeclarationInNavigationItems=function(e){switch(e.kind){case 1:return!1;case 512:case 4096:return 0===(118784&e.flags);case 67108864:return!0;case 131072:case 16384:return""!==e.name;case 32768:return!1}return this.isContainerDeclaration(e)?!0:!0},t.prototype.getSyntacticDiagnostics=function(t){return t=e.switchToForwardSlashes(t),this.compiler.getSyntacticDiagnostics(t)},t.prototype.getSemanticDiagnostics=function(t){return t=e.switchToForwardSlashes(t),this.compiler.getSemanticDiagnostics(t)},t.prototype.getEmitOutput=function(t){var n=this;t=e.switchToForwardSlashes(t);var r=function(e){return n.host.resolveRelativePath(e,null)},i=this.compiler.getDocument(t),o=i.emitToOwnOutputFile(),a=o?this.getSyntacticDiagnostics(t):this.getAllSyntacticDiagnostics();if(this.containErrors(a))return new e.EmitOutput;var s=o?this.getSemanticDiagnostics(t):this.getAllSemanticDiagnostics(),l=this.compiler.emit(t,r);if(!this.containErrors(l.diagnostics)&&!this.containErrors(s)){var c=this.compiler.emitDeclarations(t,r);l.outputFiles.push.apply(l.outputFiles,c.outputFiles),l.diagnostics.push.apply(l.diagnostics,c.diagnostics)}return l},t.prototype.getAllSyntacticDiagnostics=function(){var e=this,t=[];return this.compiler.fileNames().forEach(function(n){return t.push.apply(t,e.compiler.getSyntacticDiagnostics(n))}),t},t.prototype.getAllSemanticDiagnostics=function(){var e=this,t=[];return this.compiler.fileNames().map(function(n){return t.push.apply(t,e.compiler.getSemanticDiagnostics(n))}),t},t.prototype.containErrors=function(e){if(e&&e.length>0)for(var t=0;t=s.start()&&n<=s.start()+11?a:null;case 129:return null;case 212:case 121:case 50:case 14:case 35:case 11:return a}},t.prototype.getTypeAtPosition=function(t,n){t=e.switchToForwardSlashes(t);var r=this.getTypeInfoEligiblePath(t,n,!0);if(!r)return null;var i,o,a,s,l,c,u,p=this.compiler.getDocument(t),h=!1;if(e.isDeclarationASTOrDeclarationNameAST(r)){var d=this.compiler.getSymbolInformationFromAST(r,p);if(!d)return null;if(i=d.ast,o=d.symbol,s=d.enclosingScopeSymbol,137===r.kind()||129===r.kind()||218===r.kind()||219===r.kind()||135===r.kind()||e.isNameOfFunction(r)||e.isNameOfMemberFunction(r)){var m=11===r.kind()?r.parent:r;if(o&&4096!=o.kind){var y=e.PullHelpers.getSignatureForFuncDecl(this.compiler.getDeclForAST(m));h=!0,c=y.signature,l=y.allSignatures}}}else if(e.isCallExpression(r)||e.isCallExpressionTarget(r)){for(;!e.isCallExpression(r);)r=r.parent;var f=this.compiler.getCallInformationFromAST(r,p);if(!f||!f.targetSymbol)return null;i=f.ast,o=f.targetSymbol,s=f.enclosingScopeSymbol;var g=4096==o.kind||512==o.kind;a=o.type,g&&(""!=a.getName()&&(o=a),g=16!=a.kind&&8388608!=a.kind||""==a.getName()),g||(h=!0,l=f.resolvedSignatures,c=f.candidateSignature,u=f.isConstructorCall)}else{var v=this.compiler.getSymbolInformationFromAST(r,p);if(!v||!v.symbol)return null;i=v.ast,o=v.symbol,s=v.enclosingScopeSymbol,(65536===o.kind||16384==o.kind)&&(a=o.type,a&&(h=!0,l=a.getCallSignatures()))}if(l&&(!c||c.isDefinition()))for(var S=0,T=l.length;T>S;S++)if(!(T>1&&l[S].isDefinition())){c=l[S];break}var b=h?e.PullSignatureSymbol.getSignatureTypeMemberName(c,l,s):o.getTypeNameEx(s,!0),_=this.mapPullElementKind(o.kind,o,!h,h,u),E=c||o,C=E.docComments(!h),x=this.getFullNameOfSymbol(o,s),k=i?i.start():-1,w=i?i.end():-1;return new e.Services.TypeInfo(b,C,x,_,k,w)},t.prototype.getCompletionsAtPosition=function(t,n,r){t=e.switchToForwardSlashes(t);var i=this.compiler.getDocument(t),o=i.sourceUnit();if(e.Services.CompletionHelpers.isCompletionListBlocker(i.syntaxTree().sourceUnit(),n))return this.logger.log("Returning an empty list because completion was blocked."),null;var a=e.getAstAtPosition(o,n,!0,!0);a&&11===a.kind()&&a.start()===a.end()&&(a=a.parent);var s=!1;a&&212===a.kind()&&a.expression.end()0){var d=this.compiler.getVisibleMemberSymbolsFromAST(a,i);this.getCompletionEntriesFromSymbols({symbols:e.Services.CompletionHelpers.filterContextualMembersList(h.symbols,d),enclosingScopeSymbol:h.enclosingScopeSymbol},l)}}else{r=!1;var m=this.compiler.getVisibleDeclsFromAST(a,i);this.getCompletionEntriesFromDecls(m,l)}}r||this.getCompletionEntriesForKeywords(e.Services.KeywordCompletions.getKeywordCompltions(),l);var y=new e.Services.CompletionInfo;return y.isMemberCompletion=r,y.entries=[],l.map(function(e,t){y.entries.push({name:t.name,kind:t.kind,kindModifiers:t.kindModifiers})},null),this.activeCompletionSession=new e.Services.CompletionSession(t,n,l),y},t.prototype.getCompletionEntriesFromSymbols=function(t,n){for(var r=0,i=t.symbols.length;i>r;r++){var o=t.symbols[r],a=e.Services.CompletionHelpers.getValidCompletionEntryDisplayName(o.getDisplayName());if(a){var s=o.kind,l=n.lookup(a);if(!(l&&68147712&s)){var c,u=this.mapPullElementKind(s,o,!0),p=this.getScriptElementKindModifiers(o);if(o.isResolved){var h=this.getResolvedCompletionEntryDetailsFromSymbol(o,t.enclosingScopeSymbol); c=new e.Services.ResolvedCompletionEntry(a,u,p,h.typeName,h.fullSymbolName,h.docComments)}else c=new e.Services.DeclReferenceCompletionEntry(a,u,p,o.getDeclarations()[0]);n.addOrUpdate(a,c)}}}},t.prototype.getCompletionEntriesFromDecls=function(t,n){for(var r=0,i=t?t.length:0;i>r;r++){var o=t[r],a=e.Services.CompletionHelpers.getValidCompletionEntryDisplayName(o.getDisplayName());if(a){var s=o.kind,l=n.lookup(a);if(!(l&&68147712&s)){var c=this.mapPullElementKind(s,null,!0),u=this.getScriptElementKindModifiersFromFlags(o.flags),p=null,h=o.hasSymbol()&&o.getSymbol(),d=o.getEnclosingDecl(),m=d&&d.hasSymbol()?d.getSymbol():null;if(h&&h.isResolved&&m&&m.isResolved){var y=this.getResolvedCompletionEntryDetailsFromSymbol(h,m);p=new e.Services.ResolvedCompletionEntry(a,c,u,y.typeName,y.fullSymbolName,y.docComments)}else p=new e.Services.DeclReferenceCompletionEntry(a,c,u,o);n.addOrUpdate(a,p)}}}},t.prototype.getResolvedCompletionEntryDetailsFromSymbol=function(e,t){var n=e.getTypeName(t,!0),r=this.getFullNameOfSymbol(e,t),i=e.type,o=e;i&&i.hasOnlyOverloadCallSignatures()&&(o=i.getCallSignatures()[0]);var a=o.docComments(!0);return{typeName:n,fullSymbolName:r,docComments:a}},t.prototype.getCompletionEntriesForKeywords=function(e,t){for(var n=0,r=e.length;r>n;n++){var i=e[n];t.addOrUpdate(i.name,i)}},t.prototype.getCompletionEntryDetails=function(t,n,r){if(t=e.switchToForwardSlashes(t),!this.activeCompletionSession||this.activeCompletionSession.fileName!==t||this.activeCompletionSession.position!==n)return null;var i=this.activeCompletionSession.entries.lookup(r);if(!i)return null;if(!i.isResolved()){var o=i.decl,a=this.compiler.getDocument(t);if(o.fileName()===e.switchToForwardSlashes(t)&&(o=this.tryFindDeclFromPreviousCompilerVersion(o))){var s=e.Services.CompletionHelpers.getValidCompletionEntryDisplayName(o.getDisplayName()),l=o.kind,c=this.mapPullElementKind(l,null,!0),u=this.getScriptElementKindModifiersFromFlags(o.flags);i=new e.Services.DeclReferenceCompletionEntry(s,c,u,o),this.activeCompletionSession.entries.addOrUpdate(r,i)}if(o){var p=e.getAstAtPosition(a.sourceUnit(),n),h=this.compiler.pullGetDeclInformation(o,p,a);if(!h)return null;var d=h.symbol,m=this.getResolvedCompletionEntryDetailsFromSymbol(d,h.enclosingScopeSymbol);i.resolve(m.typeName,m.fullSymbolName,m.docComments)}}return{name:i.name,kind:i.kind,kindModifiers:i.kindModifiers,type:i.type,fullSymbolName:i.fullSymbolName,docComment:i.docComment}},t.prototype.tryFindDeclFromPreviousCompilerVersion=function(e){for(var t=e.fileName(),n=[],r=e;r;)1!==r.kind&&n.unshift(r),r=r.getParentDecl();var i=this.compiler.topLevelDeclaration(t);if(!i)return null;for(var o=[i],a=[],s=4&e.kind||16&e.kind||8&e.kind||64&e.kind,l=0;l0?n.join(","):e.Services.ScriptElementKindModifier.none},t.prototype.getScriptElementKindModifiersFromFlags=function(t){var n=[];return 1&t&&n.push(e.Services.ScriptElementKindModifier.exportedModifier),8&t&&n.push(e.Services.ScriptElementKindModifier.ambientModifier),4&t&&n.push(e.Services.ScriptElementKindModifier.publicMemberModifier),2&t&&n.push(e.Services.ScriptElementKindModifier.privateMemberModifier),16&t&&n.push(e.Services.ScriptElementKindModifier.staticModifier),n.length>0?n.join(","):e.Services.ScriptElementKindModifier.none},t.prototype.getNameOrDottedNameSpan=function(t,n){t=e.switchToForwardSlashes(t);var r=this.getTypeInfoEligiblePath(t,n,!1);if(!r)return null;for(;r&&(e.isNameOfMemberAccessExpression(r)||e.isRightSideOfQualifiedName(r));)r=r.parent;var i=new e.Services.SpanInfo(r.start(),r.end());return i},t.prototype.getBreakpointStatementAtPosition=function(t,n){t=e.switchToForwardSlashes(t);var r=this.getSyntaxTree(t);return e.Services.Breakpoints.getBreakpointLocation(r,n)},t.prototype.getFormattingEditsForRange=function(t,n,r,i){t=e.switchToForwardSlashes(t);var o=this.getFormattingManager(t,i);return o.formatSelection(n,r)},t.prototype.getFormattingEditsForDocument=function(t,n,r,i){t=e.switchToForwardSlashes(t);var o=this.getFormattingManager(t,i);return o.formatDocument(n,r)},t.prototype.getFormattingEditsOnPaste=function(t,n,r,i){t=e.switchToForwardSlashes(t);var o=this.getFormattingManager(t,i);return o.formatOnPaste(n,r)},t.prototype.getFormattingEditsAfterKeystroke=function(t,n,r,i){t=e.switchToForwardSlashes(t);var o=this.getFormattingManager(t,i);return"}"===r?o.formatOnClosingCurlyBrace(n):";"===r?o.formatOnSemicolon(n):"\n"===r?o.formatOnEnter(n):[]},t.prototype.getFormattingManager=function(t,n){null==this.formattingRulesProvider&&(this.formattingRulesProvider=new e.Services.Formatting.RulesProvider(this.logger)),this.formattingRulesProvider.ensureUpToDate(n);var r=this.getSyntaxTree(t),i=this.compiler.getScriptSnapshot(t),o=e.SimpleText.fromScriptSnapshot(i),a=new e.Services.Formatting.TextSnapshot(o),s=new e.Services.Formatting.FormattingManager(r,a,this.formattingRulesProvider,n);return s},t.prototype.getOutliningRegions=function(t){t=e.switchToForwardSlashes(t);var n=this.getSyntaxTree(t);return e.Services.OutliningElementsCollector.collectElements(n.sourceUnit())},t.prototype.getIndentationAtPosition=function(t,n,r){t=e.switchToForwardSlashes(t);var i=this.getSyntaxTree(t),o=this.compiler.getScriptSnapshot(t),a=e.SimpleText.fromScriptSnapshot(o),s=new e.Services.Formatting.TextSnapshot(a),l=new FormattingOptions(!r.ConvertTabsToSpaces,r.TabSize,r.IndentSize,r.NewLineCharacter);return e.Services.Formatting.SingleTokenIndenter.getIndentationAmount(n,i.sourceUnit(),s,l)},t.prototype.getBraceMatchingAtPosition=function(t,n){t=e.switchToForwardSlashes(t);var r=this.getSyntaxTree(t);return e.Services.BraceMatcher.getMatchSpans(r,n)},t.prototype.getScriptLexicalStructure=function(t){t=e.switchToForwardSlashes(t);var n=this.getSyntaxTree(t),r=[];return e.Services.GetScriptLexicalStructureWalker.getListsOfAllScriptLexicalStructure(r,t,n.sourceUnit()),r},t.prototype.getSyntaxTree=function(t){return t=e.switchToForwardSlashes(t),this._syntaxTreeCache.getCurrentFileSyntaxTree(t)},t}();t.LanguageService=r}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(e){var t=function(){function e(){}return e.compareSymbolsForLexicalIdentity=function(e,t){if(!e.isAlias()&&e.isContainer()){var n=e;n.getInstanceSymbol()&&(e=n.getInstanceSymbol())}if(!t.isAlias()&&t.isContainer()){var r=t;r.getInstanceSymbol()&&(t=r.getInstanceSymbol())}if(e.kind===t.kind){if(e===t)return!0;if(512===e.kind&&e.name===t.name&&e.getDeclarations()&&e.getDeclarations().length>=1&&t.getDeclarations()&&t.getDeclarations().length>=1){var i=e.getDeclarations()[0],o=t.getDeclarations()[0];return i.getParentDecl()===o.getParentDecl()}if(4096===e.kind&&e.name===t.name&&e.getDeclarations()&&e.getDeclarations().length>=1&&t.getDeclarations()&&t.getDeclarations().length>=1){var i=e.getDeclarations()[0],o=t.getDeclarations()[0],a=i.getParentDecl(),s=o.getParentDecl();if(256===a.kind&&256===s.kind)return a.ast()===s.ast()}return!1}switch(e.kind){case 8:return this.checkSymbolsForDeclarationEquality(e,t);case 4096:if(e.isAccessor()){var l=e.getGetter(),c=e.getSetter();if(l&&l===t)return!0;if(c&&c===t)return!0}return!1;case 16384:if(t.isAccessor()){var l=t.getGetter(),c=t.getSetter();if(l&&l===e)return!0;if(c&&c===e)return!0}return!1;case 32768:return this.checkSymbolsForDeclarationEquality(e,t)}return e===t},e.checkSymbolsForDeclarationEquality=function(e,t){for(var n=e.getDeclarations(),r=t.getDeclarations(),i=0,o=n.length;o>i;i++)for(var a=0,s=r.length;s>a;a++)if(this.declarationsAreSameOrParents(n[i],r[a]))return!0;return!1},e.declarationsAreSameOrParents=function(e,t){var n=e.getParentDecl(),r=t.getParentDecl();return e===t||e===r||n===t||n===r?!0:!1},e}();e.FindReferenceHelpers=t}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e,t,n){e.log(t);var r=Date.now(),i=n(),o=Date.now();if(e.log(t+" completed in "+(o-r)+" msec"),"string"==typeof i){var a=i;a.length>128&&(a=a.substring(0,128)+"..."),e.log(" result.length="+a.length+", result='"+JSON.stringify(a)+"'")}return i}function r(t,r,i){try{var o=n(t,r,i);return JSON.stringify({result:o})}catch(a){return e.Services.logInternalError(t,a),a.description=r,JSON.stringify({error:a})}}var i=function(){function e(e){this.factory=e,e.registerShim(this)}return e.prototype.dispose=function(){this.factory.unregisterShim(this)},e}();t.ShimBase=i;var o=function(){function t(e){this.scriptSnapshotShim=e,this.lineStartPositions=null}return t.prototype.getText=function(e,t){return this.scriptSnapshotShim.getText(e,t)},t.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},t.prototype.getLineStartPositions=function(){return null==this.lineStartPositions&&(this.lineStartPositions=JSON.parse(this.scriptSnapshotShim.getLineStartPositions())),this.lineStartPositions},t.prototype.getTextChangeRangeSinceVersion=function(t){var n=this.scriptSnapshotShim.getTextChangeRangeSinceVersion(t);if(null==n)return null;var r=JSON.parse(n);return new e.TextChangeRange(new e.TextSpan(r.span.start,r.span.length),r.newLength)},t}(),a=function(){function e(e){this.shimHost=e}return e.prototype.information=function(){return this.shimHost.information()},e.prototype.debug=function(){return this.shimHost.debug()},e.prototype.warning=function(){return this.shimHost.warning()},e.prototype.error=function(){return this.shimHost.error()},e.prototype.fatal=function(){return this.shimHost.fatal()},e.prototype.log=function(e){this.shimHost.log(e)},e.prototype.getCompilationSettings=function(){var e=this.shimHost.getCompilationSettings();if(null==e||""==e)return null;var t=JSON.parse(e);return t},e.prototype.getScriptFileNames=function(){var e=this.shimHost.getScriptFileNames();return JSON.parse(e)},e.prototype.getScriptSnapshot=function(e){return new o(this.shimHost.getScriptSnapshot(e))},e.prototype.getScriptVersion=function(e){return this.shimHost.getScriptVersion(e)},e.prototype.getScriptIsOpen=function(e){return this.shimHost.getScriptIsOpen(e)},e.prototype.getScriptByteOrderMark=function(e){return this.shimHost.getScriptByteOrderMark(e)},e.prototype.getDiagnosticsObject=function(){return this.shimHost.getDiagnosticsObject()},e.prototype.getLocalizedDiagnosticMessages=function(){var e=this.shimHost.getLocalizedDiagnosticMessages();if(null==e||""==e)return null;try{return JSON.parse(e)}catch(t){return this.log(t.description||"diagnosticMessages.generated.json has invalid JSON format"),null}},e.prototype.resolveRelativePath=function(e,t){return this.shimHost.resolveRelativePath(e,t)},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e.prototype.directoryExists=function(e){return this.shimHost.directoryExists(e)},e.prototype.getParentDirectory=function(e){return this.shimHost.getParentDirectory(e)},e}();t.LanguageServiceShimHostAdapter=a,t.simpleForwardCall=n,t.forwardJSONCall=r;var s=function(t){function n(e,n,r){t.call(this,e),this.host=n,this.languageService=r,this.logger=this.host}return __extends(n,t),n.prototype.forwardJSONCall=function(t,n){return e.Services.forwardJSONCall(this.logger,t,n)},n.prototype.dispose=function(e){this.logger.log("dispose()"),this.languageService=null,debugObjectHost&&debugObjectHost.CollectGarbage&&(debugObjectHost.CollectGarbage(),this.logger.log("CollectGarbage()")),this.logger=null,t.prototype.dispose.call(this,e)},n.prototype.refresh=function(e){var t=this;this.forwardJSONCall("refresh("+e+")",function(){return t.languageService.refresh(),null})},n.prototype.cleanupSemanticCache=function(){var e=this;this.forwardJSONCall("cleanupSemanticCache()",function(){return e.languageService.cleanupSemanticCache(),null})},n.realizeDiagnosticCategory=function(t){switch(t){case 1:return e.Services.DiagnosticCategory.error;case 0:return e.Services.DiagnosticCategory.warning;case 2:return e.Services.DiagnosticCategory.message;default:return e.Services.DiagnosticCategory.none}},n.realizeDiagnostic=function(e){return{message:e.text(),start:e.start(),length:e.length(),category:n.realizeDiagnosticCategory(e.info().category)}},n.prototype.getSyntacticDiagnostics=function(e){var t=this;return this.forwardJSONCall('getSyntacticDiagnostics("'+e+'")',function(){var r=t.languageService.getSyntacticDiagnostics(e);return r.map(n.realizeDiagnostic)})},n.prototype.getSemanticDiagnostics=function(e){var t=this;return this.forwardJSONCall('getSemanticDiagnostics("'+e+'")',function(){var r=t.languageService.getSemanticDiagnostics(e);return r.map(n.realizeDiagnostic)})},n.prototype.getTypeAtPosition=function(e,t){var n=this;return this.forwardJSONCall('getTypeAtPosition("'+e+'", '+t+")",function(){var r=n.languageService.getTypeAtPosition(e,t);return r})},n.prototype.getNameOrDottedNameSpan=function(e,t,n){var r=this;return this.forwardJSONCall('getNameOrDottedNameSpan("'+e+'", '+t+", "+n+")",function(){var i=r.languageService.getNameOrDottedNameSpan(e,t,n);return i})},n.prototype.getBreakpointStatementAtPosition=function(e,t){var n=this;return this.forwardJSONCall('getBreakpointStatementAtPosition("'+e+'", '+t+")",function(){var r=n.languageService.getBreakpointStatementAtPosition(e,t);return r})},n.prototype.getSignatureAtPosition=function(e,t){var n=this;return this.forwardJSONCall('getSignatureAtPosition("'+e+'", '+t+")",function(){var r=n.languageService.getSignatureAtPosition(e,t);return r})},n.prototype.getDefinitionAtPosition=function(e,t){var n=this;return this.forwardJSONCall('getDefinitionAtPosition("'+e+'", '+t+")",function(){return n.languageService.getDefinitionAtPosition(e,t)})},n.prototype.getBraceMatchingAtPosition=function(e,t){var n=this;return this.forwardJSONCall('getBraceMatchingAtPosition("'+e+'", '+t+")",function(){var r=n.languageService.getBraceMatchingAtPosition(e,t);return r})},n.prototype.getIndentationAtPosition=function(e,t,n){var r=this;return this.forwardJSONCall('getIndentationAtPosition("'+e+'", '+t+")",function(){var i=JSON.parse(n),o=r.languageService.getIndentationAtPosition(e,t,i);return{value:o}})},n.prototype.getReferencesAtPosition=function(e,t){var n=this;return this.forwardJSONCall('getReferencesAtPosition("'+e+'", '+t+")",function(){return n.languageService.getReferencesAtPosition(e,t)})},n.prototype.getOccurrencesAtPosition=function(e,t){var n=this;return this.forwardJSONCall('getOccurrencesAtPosition("'+e+'", '+t+")",function(){return n.languageService.getOccurrencesAtPosition(e,t)})},n.prototype.getImplementorsAtPosition=function(e,t){var n=this;return this.forwardJSONCall('getImplementorsAtPosition("'+e+'", '+t+")",function(){return n.languageService.getImplementorsAtPosition(e,t)})},n.prototype.getCompletionsAtPosition=function(e,t,n){var r=this;return this.forwardJSONCall('getCompletionsAtPosition("'+e+'", '+t+", "+n+")",function(){var i=r.languageService.getCompletionsAtPosition(e,t,n);return i})},n.prototype.getCompletionEntryDetails=function(e,t,n){var r=this;return this.forwardJSONCall('getCompletionEntryDetails("'+e+'", '+t+", "+n+")",function(){var i=r.languageService.getCompletionEntryDetails(e,t,n);return i})},n.prototype.getFormattingEditsForRange=function(e,t,n,r){var i=this;return this.forwardJSONCall('getFormattingEditsForRange("'+e+'", '+t+", "+n+")",function(){var o=JSON.parse(r),a=i.languageService.getFormattingEditsForRange(e,t,n,o);return a})},n.prototype.getFormattingEditsForDocument=function(e,t,n,r){var i=this;return this.forwardJSONCall('getFormattingEditsForDocument("'+e+'", '+t+", "+n+")",function(){var o=JSON.parse(r),a=i.languageService.getFormattingEditsForDocument(e,t,n,o);return a})},n.prototype.getFormattingEditsOnPaste=function(e,t,n,r){var i=this;return this.forwardJSONCall('getFormattingEditsOnPaste("'+e+'", '+t+", "+n+")",function(){var o=JSON.parse(r),a=i.languageService.getFormattingEditsOnPaste(e,t,n,o);return a})},n.prototype.getFormattingEditsAfterKeystroke=function(e,t,n,r){var i=this;return this.forwardJSONCall('getFormattingEditsAfterKeystroke("'+e+'", '+t+', "'+n+'")',function(){var o=JSON.parse(r),a=i.languageService.getFormattingEditsAfterKeystroke(e,t,n,o);return a})},n.prototype.getNavigateToItems=function(e){var t=this;return this.forwardJSONCall('getNavigateToItems("'+e+'")',function(){var n=t.languageService.getNavigateToItems(e),r=t._navigateToItemsToString(n);return r})},n.prototype.getScriptLexicalStructure=function(e){var t=this;return this.forwardJSONCall('getScriptLexicalStructure("'+e+'")',function(){var n=t.languageService.getScriptLexicalStructure(e),r=t._navigateToItemsToString(n);return r})},n.prototype.getOutliningRegions=function(e){var t=this;return this.forwardJSONCall('getOutliningRegions("'+e+'")',function(){var n=t.languageService.getOutliningRegions(e);return n})},n.prototype.getEmitOutput=function(e){var t=this;return this.forwardJSONCall('getEmitOutput("'+e+'")',function(){var n=t.languageService.getEmitOutput(e);return n})},n.prototype._navigateToItemsToString=function(e){for(var t=[],n=0;nr;r++){var o=e.childAt(r);if(null!==o&&o===n)return t.getListItemIndentation(e,r-1)}break;case 226:var a=e,s=a.arguments;if(null!==s&&a.closeParenToken===n)return t.getListItemIndentation(s,s.childCount()-1);break;case 227:var l=e,c=l.parameters;if(null!==c&&l.closeParenToken===n)return t.getListItemIndentation(c,c.childCount()-1);break;case 228:var u=e,p=u.typeArguments;if(null!==p&&u.greaterThanToken===n)return t.getListItemIndentation(p,p.childCount()-1);break;case 229:var h=e,d=h.typeParameters;if(null!==d&&h.greaterThanToken===n)return t.getListItemIndentation(d,d.childCount()-1)}return-1},t.getListItemIndentation=function(e,t){for(var n=t;n>0;n--){var r=e.childAt(n),i=e.childAt(n-1);if(null!==r&&r.leadingTrivia().hasNewLine()||null!==i&&i.trailingTrivia().hasNewLine())return r.leadingTriviaWidth()}return-1},t}();t.Indenter=n}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){!function(t){function n(t){for(var n=[],r=0;rs)return null;var c=new o(s,a);return c.breakpointSpanOf(i)}var o=function(){function t(e,t){this.posLine=e,this.lineMap=t}return t.prototype.breakpointSpanOfToken=function(e){switch(e.token().tokenKind){case 70:return this.breakpointSpanOfOpenBrace(e);case 71:return this.breakpointSpanOfCloseBrace(e);case 79:return this.breakpointSpanOfComma(e);case 78:case 10:return this.breakpointSpanIfStartsOnSameLine(e.previousToken());case 73:return this.breakpointSpanOfCloseParen(e);case 22:var t=e.parent();if(t&&161==t.kind())return this.breakpointSpanIfStartsOnSameLine(e.nextToken())}return this.breakpointSpanOfContainingNode(e)},t.prototype.breakpointSpanOfOpenBrace=function(e){var t=e.containingNode();if(t){var n=t;switch(t&&146==t.kind()&&(t=t.containingNode(),t||(t=n)),t.kind()){case 146:return this.canHaveBreakpointInBlock(t)?this.breakpointSpanOfFirstStatementInBlock(t):null();case 130:case 131:case 129:case 137:case 135:case 139:case 140:case 222:return this.canHaveBreakpointInDeclaration(t)?this.posLine!=this.lineMap.getLineNumberFromPosition(t.start())?this.breakpointSpanOfFirstChildOfSyntaxList(this.getSyntaxListOfDeclarationWithElements(t)):this.breakpointSpanOf(t):null;case 132:return this.canHaveBreakpointInDeclaration(t)?this.posLine!=this.lineMap.getLineNumberFromPosition(t.start())?this.breakpointSpanOfFirstEnumElement(t):this.breakpointSpanOf(t):null;case 147:case 155:case 158:case 236:return this.posLine!=this.lineMap.getLineNumberFromPosition(t.start())?this.breakpointSpanOfFirstStatementInBlock(n):this.breakpointSpanOf(t);case 161:return this.breakpointSpanOfFirstStatementInBlock(n);case 154:return this.posLine!=this.lineMap.getLineNumberFromPosition(t.start())?this.breakpointSpanOfFirstStatementInBlock(n):this.breakpointSpanOf(e.previousToken());case 235:case 233:case 234:case 163:case 159:case 237:return this.breakpointSpanOfFirstStatementInBlock(n);case 151:return this.posLine!=this.lineMap.getLineNumberFromPosition(t.start())?this.breakpointSpanOfFirstStatementOfFirstCaseClause(t):this.breakpointSpanOf(t)}}return null},t.prototype.breakpointSpanOfCloseBrace=function(e){var t=e.containingNode();if(t){var r=t;switch(146==t.kind()&&(t=t.containingNode(),t||(t=r)),t.kind()){case 146:return this.canHaveBreakpointInBlock(t)?this.breakpointSpanOfLastStatementInBlock(t):null();case 130:if(!this.canHaveBreakpointInDeclaration(t))return null;var i=t.node();return i.moduleElements&&i.moduleElements.childCount()>0?n(e):null;case 131:case 129:case 137:case 135:case 139:case 140:case 222:return this.canHaveBreakpointInDeclaration(t)?n(e):null;case 132:return this.canHaveBreakpointInDeclaration(t)?n(e):null;case 147:case 235:case 155:case 154:case 158:case 161:case 233:case 234:case 163:case 159:case 236:case 237:return this.breakpointSpanOfLastStatementInBlock(r);case 151:return this.breakpointSpanOfLastStatementOfLastCaseClause(t)}}return null},t.prototype.breakpointSpanOfComma=function(e){var t=e.parent();if(t&&t.element().isSeparatedList()){var n=t.parent();if(n)switch(n.kind()){case 224:case 132:case 227:var r=t.childIndex(e.token());if(r>0){var i=t.childAt(r-1);return this.breakpointSpanOf(i)}if(132==n.kind())return null}}return this.breakpointSpanOfContainingNode(e)},t.prototype.breakpointSpanOfCloseParen=function(e){var t=e.parent();if(t)switch(t.kind()){case 154:case 227:return this.breakpointSpanOf(e.previousToken())}return this.breakpointSpanOfContainingNode(e)},t.prototype.canHaveBreakpointInBlock=function(t){if(!t||e.SyntaxUtilities.isAmbientDeclarationSyntax(t))return!1;var n=t.node();return n.statements&&0!=n.statements.childCount()},t.prototype.breakpointSpanOfFirstStatementInBlock=function(e){if(!e)return null;var t=e.node(),n=e.getPositionedChild(t.statements);if(!n||0==n.childCount())return null;var r=n.childAt(0);return r&&146==r.kind()?this.canHaveBreakpointInBlock(r)?this.breakpointSpanOfFirstStatementInBlock(r):null:this.breakpointSpanOf(r)},t.prototype.breakpointSpanOfLastStatementInBlock=function(e){if(!e)return null;var t=e.node(),n=e.getPositionedChild(t.statements);if(!n||0==n.childCount())return null;var r=n.childAt(n.childCount()-1); return r&&146==r.kind()?this.canHaveBreakpointInBlock(r)?this.breakpointSpanOfLastStatementInBlock(r):null:this.breakpointSpanOf(r)},t.prototype.breakpointSpanOfFirstChildOfSyntaxList=function(e){if(!e)return null;var t=e.list();if(0==t.childCount())return null;var n=e.childAt(0);return n&&146==n.kind()?this.canHaveBreakpointInBlock(n)?this.breakpointSpanOfFirstStatementInBlock(n):null:this.breakpointSpanOf(n)},t.prototype.breakpointSpanOfLastChildOfSyntaxList=function(e){if(!e)return null;var t=e.list();if(0==t.childCount())return null;var n=e.childAt(0);return n&&146==n.kind()?this.canHaveBreakpointInBlock(n)?this.breakpointSpanOfLastStatementInBlock(n):null:this.breakpointSpanOf(n)},t.prototype.breakpointSpanOfNode=function(e){var t=e.node();switch(t.kind()){case 130:case 131:case 129:case 137:case 135:case 139:case 140:return this.breakpointSpanOfDeclarationWithElements(e);case 225:return this.breakpointSpanOfVariableDeclarator(e);case 224:return this.breakpointSpanOfVariableDeclaration(e);case 148:return this.breakpointSpanOfVariableStatement(e);case 242:return this.breakpointSpanOfParameter(e);case 136:return this.breakpointSpanOfMemberVariableDeclaration(e);case 133:return this.breakpointSpanOfImportDeclaration(e);case 132:return this.breakpointSpanOfEnumDeclaration(e);case 243:return this.breakpointSpanOfEnumElement(e);case 147:return this.breakpointSpanOfIfStatement(e);case 235:return this.breakpointSpanOfElseClause(e);case 155:return this.breakpointSpanOfForInStatement(e);case 154:return this.breakpointSpanOfForStatement(e);case 158:return this.breakpointSpanOfWhileStatement(e);case 161:return this.breakpointSpanOfDoStatement(e);case 151:return this.breakpointSpanOfSwitchStatement(e);case 233:return this.breakpointSpanOfCaseSwitchClause(e);case 234:return this.breakpointSpanOfDefaultSwitchClause(e);case 163:return this.breakpointSpanOfWithStatement(e);case 159:return this.breakpointSpanOfTryStatement(e);case 236:return this.breakpointSpanOfCatchClause(e);case 237:return this.breakpointSpanOfFinallyClause(e);default:return t.isStatement()?this.breakpointSpanOfStatement(e):this.breakpointOfExpression(e)}},t.prototype.isInitializerOfForStatement=function(e){if(!e)return!1;var t=e.parent();if(t&&154==t.kind()){var n=e.element(),r=t.element(),i=t.getPositionedChild(r.initializer);return i&&i.element()==n}return t&&173==t.kind()?this.isInitializerOfForStatement(t):!1},t.prototype.isConditionOfForStatement=function(e){if(!e)return!1;var t=e.parent();if(t&&154==t.kind()){var n=e.element(),r=t.element(),i=t.getPositionedChild(r.condition);return i&&i.element()==n}return t&&173==t.kind()?this.isConditionOfForStatement(t):!1},t.prototype.isIncrememtorOfForStatement=function(e){if(!e)return!1;var t=e.parent();if(t&&154==t.kind()){var n=e.element(),r=t.element(),i=t.getPositionedChild(r.incrementor);return i&&i.element()==n}return t&&173==t.kind()?this.isIncrememtorOfForStatement(t):!1},t.prototype.breakpointOfLeftOfCommaExpression=function(e){var t=e.node();return this.breakpointSpanOf(e.getPositionedChild(t.left))},t.prototype.breakpointOfExpression=function(e){if(this.isInitializerOfForStatement(e)||this.isConditionOfForStatement(e)||this.isIncrememtorOfForStatement(e))return 173==e.kind()?this.breakpointOfLeftOfCommaExpression(e):n(e);if(134==e.kind()){var t=e.node();return n(e,t.exportKeyword,t.equalsToken,t.identifier)}return this.breakpointSpanOfContainingNode(e)},t.prototype.breakpointSpanOfStatement=function(e){var t=e.node();if(156==t.kind())return null;var r=e.containingNode();if(r&&r.node().isStatement()){var i=!1;switch(r.kind()){case 130:case 131:case 129:case 137:case 135:case 139:case 140:case 146:case 147:case 235:case 155:case 154:case 158:case 161:case 151:case 233:case 234:case 163:case 159:case 236:case 237:case 146:i=!0}if(!i)return this.breakpointSpanOfContainingNode(e)}switch(t.kind()){case 149:var o=t;return n(e.getPositionedChild(o.expression));case 150:var a=t;return n(e,a.returnKeyword,a.expression);case 157:var s=t;return n(e,s.throwKeyword,s.expression);case 152:var l=t;return n(e,l.breakKeyword,l.identifier);case 153:var c=t;return n(e,c.continueKeyword,c.identifier);case 162:var u=t;return n(e.getPositionedChild(u.debuggerKeyword));case 160:var p=t;return this.breakpointSpanOf(e.getPositionedChild(p.statement))}return null},t.prototype.getSyntaxListOfDeclarationWithElements=function(t){var n,r,i=t.node();switch(i.kind()){case 130:n=i.moduleElements;break;case 131:n=i.classElements;break;case 129:r=i.block;break;case 137:r=i.block;break;case 135:r=i.block;break;case 139:r=i.block;break;case 140:r=i.block;break;case 222:r=i.block;break;default:throw e.Errors.argument("positionNode","unknown node kind in getSyntaxListOfDeclarationWithElements")}var o=t;return r&&(o=t.getPositionedChild(r),n=r.statements),o.getPositionedChild(n)},t.prototype.canHaveBreakpointInDeclaration=function(t){return t&&!e.SyntaxUtilities.isAmbientDeclarationSyntax(t)},t.prototype.breakpointSpanOfDeclarationWithElements=function(e){if(!this.canHaveBreakpointInDeclaration(e))return null;var t=e.node(),r=e.node();return t.isModuleElement()&&120!=e.containingNode().kind()||t.isClassElement()||130==r.kind()&&r.name&&121==r.name.kind()?n(e):this.breakpointSpanOfFirstChildOfSyntaxList(this.getSyntaxListOfDeclarationWithElements(e))},t.prototype.canHaveBreakpointInVariableDeclarator=function(t){if(!t||e.SyntaxUtilities.isAmbientDeclarationSyntax(t))return!1;var n=t.node();return!!n.equalsValueClause},t.prototype.breakpointSpanOfVariableDeclarator=function(e){if(!this.canHaveBreakpointInVariableDeclarator(e))return null;var t=e.containingNode();if(t&&224==t.kind()){var r=e.parent();return r&&r.list().childAt(0)==e.node()?this.breakpointSpanOfVariableDeclaration(t):this.canHaveBreakpointInVariableDeclarator(e)?n(e):null}return t?this.breakpointSpanOfMemberVariableDeclaration(t):null},t.prototype.canHaveBreakpointInVariableDeclaration=function(t){if(!t||e.SyntaxUtilities.isAmbientDeclarationSyntax(t))return!1;var n=t.node(),r=t.getPositionedChild(n.variableDeclarators);if(!r||0==r.childCount())return!1;var i=r.childAt(0);return i&&i.element().isNode()?this.canHaveBreakpointInVariableDeclarator(r.childAt(0)):!1},t.prototype.breakpointSpanOfVariableDeclaration=function(e){if(!this.canHaveBreakpointInDeclaration(e))return null;{var t=e.containingNode(),n=e.node(),i=e.getPositionedChild(n.variableDeclarators);i.childCount()}return t&&148==t.kind()?this.breakpointSpanOfVariableStatement(t):this.canHaveBreakpointInVariableDeclaration(e)?r(e,i.childEndAt(0)):null},t.prototype.canHaveBreakpointInVariableStatement=function(t){if(!t||e.SyntaxUtilities.isAmbientDeclarationSyntax(t))return!1;var n=t.node();return this.canHaveBreakpointInVariableDeclaration(t.getPositionedChild(n.variableDeclaration))},t.prototype.breakpointSpanOfVariableStatement=function(e){if(!this.canHaveBreakpointInVariableStatement(e))return null;var t=e.node(),n=e.getPositionedChild(t.variableDeclaration),i=n.node(),o=n.getPositionedChild(i.variableDeclarators);return r(e,o.childEndAt(0))},t.prototype.breakpointSpanOfParameter=function(t){if(e.SyntaxUtilities.isAmbientDeclarationSyntax(t))return null;var r=t.node();return r.dotDotDotToken||r.equalsValueClause||r.modifiers.childCount()>0?n(t):null},t.prototype.breakpointSpanOfMemberVariableDeclaration=function(t){if(e.SyntaxUtilities.isAmbientDeclarationSyntax(t))return null;var r=t.node();return this.canHaveBreakpointInVariableDeclarator(t.getPositionedChild(r.variableDeclarator))?n(t,r.modifiers,r.variableDeclarator):null},t.prototype.breakpointSpanOfImportDeclaration=function(t){if(e.SyntaxUtilities.isAmbientDeclarationSyntax(t))return null;var r=t.node();return n(t,r.modifiers,r.importKeyword,r.identifier,r.equalsToken,r.moduleReference)},t.prototype.breakpointSpanOfEnumDeclaration=function(e){return this.canHaveBreakpointInDeclaration(e)?n(e):null},t.prototype.breakpointSpanOfFirstEnumElement=function(e){var t=e.node(),n=e.getPositionedChild(t.enumElements);return n&&n.childCount()?this.breakpointSpanOf(n.childAt(0)):null},t.prototype.breakpointSpanOfEnumElement=function(t){return e.SyntaxUtilities.isAmbientDeclarationSyntax(t)?null:n(t)},t.prototype.breakpointSpanOfIfStatement=function(e){var t=e.node();return n(e,t.ifKeyword,t.openParenToken,t.condition,t.closeParenToken)},t.prototype.breakpointSpanOfElseClause=function(e){var t=e.node();return this.breakpointSpanOf(e.getPositionedChild(t.statement))},t.prototype.breakpointSpanOfForInStatement=function(e){var t=e.node();return n(e,t.forKeyword,t.openParenToken,t.variableDeclaration,t.left,t.inKeyword,t.expression,t.closeParenToken)},t.prototype.breakpointSpanOfForStatement=function(e){var t=e.node();return this.breakpointSpanOf(e.getPositionedChild(t.variableDeclaration?t.variableDeclaration:t.initializer))},t.prototype.breakpointSpanOfWhileStatement=function(e){var t=e.node();return n(e,t.whileKeyword,t.openParenToken,t.condition,t.closeParenToken)},t.prototype.breakpointSpanOfDoStatement=function(e){var t=e.node();return n(e,t.whileKeyword,t.openParenToken,t.condition,t.closeParenToken)},t.prototype.breakpointSpanOfSwitchStatement=function(e){var t=e.node();return n(e,t.switchKeyword,t.openParenToken,t.expression,t.closeParenToken)},t.prototype.breakpointSpanOfFirstStatementOfFirstCaseClause=function(e){var t=e.node();if(t.switchClauses&&0==t.switchClauses.childCount())return null;var n=e.getPositionedChild(t.switchClauses);if(0==n.childCount())return null;var r=n.childAt(0),i=null;if(r&&233==r.kind()){var o=r.node();i=o.statements}else{if(!r||234!=r.kind())return null;var a=r.node();i=a.statements}return this.breakpointSpanOfFirstChildOfSyntaxList(r.getPositionedChild(i))},t.prototype.breakpointSpanOfLastStatementOfLastCaseClause=function(e){var t=e.node();if(t.switchClauses&&0==t.switchClauses.childCount())return null;var n=e.getPositionedChild(t.switchClauses);if(0==n.childCount())return null;var r=n.childAt(n.childCount()-1),i=null;if(r&&233==r.kind()){var o=r.node();i=o.statements}else{if(!r||234!=r.kind())return null;var a=r.node();i=a.statements}return this.breakpointSpanOfLastChildOfSyntaxList(r.getPositionedChild(i))},t.prototype.breakpointSpanOfCaseSwitchClause=function(e){var t=e.node();return this.breakpointSpanOfFirstChildOfSyntaxList(e.getPositionedChild(t.statements))},t.prototype.breakpointSpanOfDefaultSwitchClause=function(e){var t=e.node();return this.breakpointSpanOfFirstChildOfSyntaxList(e.getPositionedChild(t.statements))},t.prototype.breakpointSpanOfWithStatement=function(e){var t=e.node();return this.breakpointSpanOf(e.getPositionedChild(t.statement))},t.prototype.breakpointSpanOfTryStatement=function(e){var t=e.node();return this.breakpointSpanOfFirstStatementInBlock(e.getPositionedChild(t.block))},t.prototype.breakpointSpanOfCatchClause=function(e){var t=e.node();return n(e,t.catchKeyword,t.openParenToken,t.identifier,t.typeAnnotation,t.closeParenToken)},t.prototype.breakpointSpanOfFinallyClause=function(e){var t=e.node();return this.breakpointSpanOfFirstStatementInBlock(e.getPositionedChild(t.block))},t.prototype.breakpointSpanOfContainingNode=function(e){return this.breakpointSpanOf(e.containingNode())},t.prototype.breakpointSpanIfStartsOnSameLine=function(e){return e&&this.posLine==this.lineMap.getLineNumberFromPosition(e.start())?this.breakpointSpanOf(e):null},t.prototype.breakpointSpanOf=function(e){if(!e)return null;for(var t=e.containingNode();null!=t;t=t.containingNode())if(244==t.kind())return this.breakpointSpanIfStartsOnSameLine(t);var n=e.element();return n.isNode()?this.breakpointSpanOfNode(e):n.isToken()?this.breakpointSpanOfToken(e):this.breakpointSpanOfContainingNode(e)},t}();t.getBreakpointLocation=i}(t.Breakpoints||(t.Breakpoints={}));t.Breakpoints}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){var n=function(t){function n(e,n){t.call(this),this.items=e,this.fileName=n,this.nameStack=[],this.kindStack=[],this.currentMemberVariableDeclaration=null,this.currentVariableStatement=null,this.currentInterfaceDeclaration=null}return __extends(n,t),n.getListsOfAllScriptLexicalStructure=function(e,t,r){var i=new n(e,t);r.accept(i)},n.prototype.createItem=function(t,n,r,i){var o=new e.Services.NavigateToItem;o.name=i,o.kind=r,o.matchKind=e.Services.MatchKind.exact,o.fileName=this.fileName,o.kindModifiers=this.getKindModifiers(n),o.minChar=this.position()+t.leadingTriviaWidth(),o.limChar=o.minChar+t.width(),o.containerName=this.nameStack.join("."),o.containerKind=0===this.kindStack.length?"":e.ArrayUtilities.last(this.kindStack),this.items.push(o)},n.prototype.getKindModifiers=function(t){var n=[];return e.SyntaxUtilities.containsToken(t,47)&&n.push(e.Services.ScriptElementKindModifier.exportedModifier),e.SyntaxUtilities.containsToken(t,63)&&n.push(e.Services.ScriptElementKindModifier.ambientModifier),e.SyntaxUtilities.containsToken(t,57)&&n.push(e.Services.ScriptElementKindModifier.publicMemberModifier),e.SyntaxUtilities.containsToken(t,55)&&n.push(e.Services.ScriptElementKindModifier.privateMemberModifier),e.SyntaxUtilities.containsToken(t,58)&&n.push(e.Services.ScriptElementKindModifier.staticModifier),n.length>0?n.join(","):e.Services.ScriptElementKindModifier.none},n.prototype.visitModuleDeclaration=function(e){var t=this.getModuleNames(e);this.visitModuleDeclarationWorker(e,t,0)},n.prototype.visitModuleDeclarationWorker=function(n,r,i){if(i===r.length)t.prototype.visitModuleDeclaration.call(this,n);else{var o=(0===i?n.modifiers:e.Syntax.list([e.Syntax.token(47)]),r[i]),a=e.Services.ScriptElementKind.moduleElement;this.createItem(n,n.modifiers,a,o),this.nameStack.push(o),this.kindStack.push(a),this.visitModuleDeclarationWorker(n,r,i+1),this.nameStack.pop(),this.kindStack.pop()}},n.prototype.getModuleNames=function(e){var t=[];return e.stringLiteral?t.push(e.stringLiteral.text()):this.getModuleNamesHelper(e.name,t),t},n.prototype.getModuleNamesHelper=function(e,t){if(121===e.kind()){var n=e;this.getModuleNamesHelper(n.left,t),t.push(n.right.text())}else t.push(e.text())},n.prototype.visitClassDeclaration=function(n){var r=n.identifier.text(),i=e.Services.ScriptElementKind.classElement;this.createItem(n,n.modifiers,i,r),this.nameStack.push(r),this.kindStack.push(i),t.prototype.visitClassDeclaration.call(this,n),this.nameStack.pop(),this.kindStack.pop()},n.prototype.visitInterfaceDeclaration=function(n){var r=n.identifier.text(),i=e.Services.ScriptElementKind.interfaceElement;this.createItem(n,n.modifiers,i,r),this.nameStack.push(r),this.kindStack.push(i),this.currentInterfaceDeclaration=n,t.prototype.visitInterfaceDeclaration.call(this,n),this.currentInterfaceDeclaration=null,this.nameStack.pop(),this.kindStack.pop()},n.prototype.visitObjectType=function(e){null===this.currentInterfaceDeclaration?this.skip(e):t.prototype.visitObjectType.call(this,e)},n.prototype.visitEnumDeclaration=function(n){var r=n.identifier.text(),i=e.Services.ScriptElementKind.enumElement;this.createItem(n,n.modifiers,i,r),this.nameStack.push(r),this.kindStack.push(i),t.prototype.visitEnumDeclaration.call(this,n),this.nameStack.pop(),this.kindStack.pop()},n.prototype.visitConstructorDeclaration=function(t){this.createItem(t,e.Syntax.emptyList,e.Services.ScriptElementKind.constructorImplementationElement,"constructor");this.skip(t)},n.prototype.visitMemberFunctionDeclaration=function(t){this.createItem(t,t.modifiers,e.Services.ScriptElementKind.memberFunctionElement,t.propertyName.text());this.skip(t)},n.prototype.visitGetAccessor=function(t){this.createItem(t,t.modifiers,e.Services.ScriptElementKind.memberGetAccessorElement,t.propertyName.text());this.skip(t)},n.prototype.visitSetAccessor=function(t){this.createItem(t,t.modifiers,e.Services.ScriptElementKind.memberSetAccessorElement,t.propertyName.text());this.skip(t)},n.prototype.visitMemberVariableDeclaration=function(e){this.currentMemberVariableDeclaration=e,t.prototype.visitMemberVariableDeclaration.call(this,e),this.currentMemberVariableDeclaration=null},n.prototype.visitVariableStatement=function(e){this.currentVariableStatement=e,t.prototype.visitVariableStatement.call(this,e),this.currentVariableStatement=null},n.prototype.visitVariableDeclarator=function(t){{var n=this.currentMemberVariableDeclaration?this.currentMemberVariableDeclaration.modifiers:e.Syntax.emptyList,r=this.currentMemberVariableDeclaration?e.Services.ScriptElementKind.memberVariableElement:e.Services.ScriptElementKind.variableElement;this.createItem(t,n,r,t.propertyName.text())}this.skip(t)},n.prototype.visitIndexSignature=function(t){this.createItem(t,e.Syntax.emptyList,e.Services.ScriptElementKind.indexSignatureElement,"[]");this.skip(t)},n.prototype.visitEnumElement=function(t){this.createItem(t,e.Syntax.emptyList,e.Services.ScriptElementKind.memberVariableElement,t.propertyName.text());this.skip(t)},n.prototype.visitCallSignature=function(t){this.createItem(t,e.Syntax.emptyList,e.Services.ScriptElementKind.callSignatureElement,"()");this.skip(t)},n.prototype.visitConstructSignature=function(t){this.createItem(t,e.Syntax.emptyList,e.Services.ScriptElementKind.constructSignatureElement,"new()");this.skip(t)},n.prototype.visitMethodSignature=function(t){this.createItem(t,e.Syntax.emptyList,e.Services.ScriptElementKind.memberFunctionElement,t.propertyName.text());this.skip(t)},n.prototype.visitPropertySignature=function(t){this.createItem(t,e.Syntax.emptyList,e.Services.ScriptElementKind.memberVariableElement,t.propertyName.text());this.skip(t)},n.prototype.visitFunctionDeclaration=function(t){this.createItem(t,t.modifiers,e.Services.ScriptElementKind.functionElement,t.identifier.text());this.skip(t)},n.prototype.visitBlock=function(e){this.skip(e)},n.prototype.visitIfStatement=function(e){this.skip(e)},n.prototype.visitExpressionStatement=function(e){this.skip(e)},n.prototype.visitThrowStatement=function(e){this.skip(e)},n.prototype.visitReturnStatement=function(e){this.skip(e)},n.prototype.visitSwitchStatement=function(e){this.skip(e)},n.prototype.visitWithStatement=function(e){this.skip(e)},n.prototype.visitTryStatement=function(e){this.skip(e)},n.prototype.visitLabeledStatement=function(e){this.skip(e)},n}(e.PositionTrackingWalker);t.GetScriptLexicalStructureWalker=n}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){function n(e,t){for(var r in e)"object"==typeof e[r]?n(e[r],t[r]):"function"!=typeof e[r]&&(e[r]=t[r]);return e}t.copyDataObject=n;var r=function(){function t(){this._shims=[]}return t.prototype.createPullLanguageService=function(t){try{return new e.Services.LanguageService(t)}catch(n){throw e.Services.logInternalError(t,n),n}},t.prototype.createLanguageServiceShim=function(t){try{var n=new e.Services.LanguageServiceShimHostAdapter(t),r=this.createPullLanguageService(n);return new e.Services.LanguageServiceShim(this,t,r)}catch(i){throw e.Services.logInternalError(t,i),i}},t.prototype.createClassifier=function(t){try{return new e.Services.Classifier(t)}catch(n){throw e.Services.logInternalError(t,n),n}},t.prototype.createClassifierShim=function(t){try{return new e.Services.ClassifierShim(this,t)}catch(n){throw e.Services.logInternalError(t,n),n}},t.prototype.createCoreServices=function(t){try{return new e.Services.CoreServices(t)}catch(n){throw e.Services.logInternalError(t.logger,n),n}},t.prototype.createCoreServicesShim=function(t){try{return new e.Services.CoreServicesShim(this,t)}catch(n){throw e.Services.logInternalError(t.logger,n),n}},t.prototype.close=function(){this._shims=[]},t.prototype.registerShim=function(e){this._shims.push(e)},t.prototype.unregisterShim=function(t){for(var n=0,r=this._shims.length;r>n;n++)if(this._shims[n]===t)return void delete this._shims[n];throw e.Errors.invalidOperation()},t}();t.TypeScriptServicesFactory=r}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={}));var TypeScript;!function(e){!function(t){var n=function(){function t(){}return t.getMatchSpans=function(e,n){var r=[],i=e.sourceUnit().findToken(n);return t.getMatchingCloseBrace(i,n,r),t.getMatchingOpenBrace(i,n,r),r},t.getMatchingCloseBrace=function(n,r,i){if(n.start()===r){var o=t.getMatchingCloseBraceTokenKind(n);if(null!==o)for(var a=n.parentElement(),s=n.parent().fullStart(),l=0,c=a.childCount();c>l;l++){var u=a.childAt(l);if(null!==u&&u.fullWidth()>0){if(u.kind()===o){var p=new e.TextSpan(r,n.token().width()),h=new e.TextSpan(s+u.leadingTriviaWidth(),u.width());i.push(p,h);break}s+=u.fullWidth()}}}},t.getMatchingOpenBrace=function(n,r,i){if(n.fullStart()===r&&(n=n.previousToken()),null!==n&&n.start()===r-1){var o=t.getMatchingOpenBraceTokenKind(n);if(null!==o)for(var a=n.parentElement(),s=n.parent().fullStart()+a.fullWidth(),l=a.childCount()-1;l>=0;l--){var c=a.childAt(l);if(null!==c&&c.fullWidth()>0){if(c.kind()===o){var u=new e.TextSpan(r-1,n.token().width()),p=new e.TextSpan(s-c.trailingTriviaWidth()-c.width(),c.width());i.push(u,p);break}s-=c.fullWidth()}}}},t.getMatchingCloseBraceTokenKind=function(t){var n=null!==t&&t.element();switch(n.kind()){case 70:return 71;case 72:return 73;case 74:return 75;case 80:return e.SyntaxUtilities.isAngleBracket(t)?81:null}return null},t.getMatchingOpenBraceTokenKind=function(t){var n=null!==t&&t.element();switch(n.kind()){case 71:return 70;case 73:return 72;case 75:return 74;case 81:return e.SyntaxUtilities.isAngleBracket(t)?80:null}return null},t}();t.BraceMatcher=n}(e.Services||(e.Services={}));e.Services}(TypeScript||(TypeScript={})),define("vs/languages/typescript/lib/raw.typescriptServices",[],{}),define("vs/text!vs/languages/typescript/lib/lib.d.ts",function(){return'/* *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved. \r\nLicensed under the Apache License, Version 2.0 (the "License"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0 \r\n \r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, \r\nMERCHANTABLITY OR NON-INFRINGEMENT. \r\n \r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\n/// \r\n\r\n/////////////////////////////\r\n/// ECMAScript APIs\r\n/////////////////////////////\r\n\r\ndeclare var NaN: number;\r\ndeclare var Infinity: number;\r\n\r\n/**\r\n * Evaluates JavaScript code and executes it. \r\n * @param x A String value that contains valid JavaScript code.\r\n */\r\ndeclare function eval(x: string): any;\r\n\r\n/**\r\n * Converts A string to an integer.\r\n * @param s A string to convert into a number.\r\n * @param radix A value between 2 and 36 that specifies the base of the number in numString. \r\n * If this argument is not supplied, strings with a prefix of \'0x\' are considered hexadecimal.\r\n * All other strings are considered decimal.\r\n */\r\ndeclare function parseInt(s: string, radix?: number): number;\r\n\r\n/**\r\n * Converts a string to a floating-point number. \r\n * @param string A string that contains a floating-point number. \r\n */\r\ndeclare function parseFloat(string: string): number;\r\n\r\n/**\r\n * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). \r\n * @param number A numeric value.\r\n */\r\ndeclare function isNaN(number: number): boolean;\r\n\r\n/** \r\n * Determines whether a supplied number is finite.\r\n * @param number Any numeric value.\r\n */\r\ndeclare function isFinite(number: number): boolean;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).\r\n * @param encodedURI A value representing an encoded URI.\r\n */\r\ndeclare function decodeURI(encodedURI: string): string;\r\n\r\n/**\r\n * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).\r\n * @param encodedURIComponent A value representing an encoded URI component.\r\n */\r\ndeclare function decodeURIComponent(encodedURIComponent: string): string;\r\n\r\n/** \r\n * Encodes a text string as a valid Uniform Resource Identifier (URI)\r\n * @param uri A value representing an encoded URI.\r\n */ \r\ndeclare function encodeURI(uri: string): string;\r\n\r\n/**\r\n * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).\r\n * @param uriComponent A value representing an encoded URI component.\r\n */\r\ndeclare function encodeURIComponent(uriComponent: string): string;\r\n\r\ninterface PropertyDescriptor {\r\n configurable?: boolean;\r\n enumerable?: boolean;\r\n value?: any;\r\n writable?: boolean;\r\n get? (): any;\r\n set? (v: any): void;\r\n}\r\n\r\ninterface PropertyDescriptorMap {\r\n [s: string]: PropertyDescriptor;\r\n}\r\n\r\ninterface Object {\r\n /** Returns a string representation of an object. */\r\n toString(): string;\r\n \r\n /** Returns a date converted to a string using the current locale. */\r\n toLocaleString(): string;\r\n\r\n /** Returns the primitive value of the specified object. */\r\n valueOf(): Object;\r\n\r\n /**\r\n * Determines whether an object has a property with the specified name. \r\n * @param v A property name.\r\n */\r\n hasOwnProperty(v: string): boolean;\r\n\r\n /**\r\n * Determines whether an object exists in another object\'s prototype chain. \r\n * @param v Another object whose prototype chain is to be checked.\r\n */\r\n isPrototypeOf(v: Object): boolean;\r\n\r\n /** \r\n * Determines whether a specified property is enumerable.\r\n * @param v A property name.\r\n */\r\n propertyIsEnumerable(v: string): boolean;\r\n}\r\n\r\n/**\r\n * Provides functionality common to all JavaScript objects.\r\n */\r\ndeclare var Object: {\r\n new (value?: any): Object;\r\n (): any;\r\n (value: any): any;\r\n\r\n /** A reference to the prototype for a class of objects. */\r\n prototype: Object;\r\n\r\n /** \r\n * Returns the prototype of an object. \r\n * @param o The object that references the prototype.\r\n */\r\n getPrototypeOf(o: any): any;\r\n\r\n /**\r\n * Gets the own property descriptor of the specified object. \r\n * An own property descriptor is one that is defined directly on the object and is not inherited from the object\'s prototype. \r\n * @param o Object that contains the property.\r\n * @param p Name of the property.\r\n */\r\n getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;\r\n\r\n /** \r\n * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly \r\n * on that object, and are not inherited from the object\'s prototype. The properties of an object include both fields (objects) and functions.\r\n * @param o Object that contains the own properties.\r\n */\r\n getOwnPropertyNames(o: any): string[];\r\n\r\n /** \r\n * Creates an object that has the specified prototype, and that optionally contains specified properties.\r\n * @param o Object to use as a prototype. May be null\r\n * @param properties JavaScript object that contains one or more property descriptors. \r\n */\r\n create(o: any, properties?: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Adds a property to an object, or modifies attributes of an existing property. \r\n * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.\r\n * @param p The property name.\r\n * @param attributes Descriptor for the property. It can be for a data property or an accessor property.\r\n */\r\n defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;\r\n\r\n /**\r\n * Adds one or more properties to an object, and/or modifies attributes of existing properties. \r\n * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.\r\n * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.\r\n */\r\n defineProperties(o: any, properties: PropertyDescriptorMap): any;\r\n\r\n /**\r\n * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes. \r\n */\r\n seal(o: any): any;\r\n\r\n /**\r\n * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.\r\n * @param o Object on which to lock the attributes.\r\n */\r\n freeze(o: any): any;\r\n\r\n /**\r\n * Prevents the addition of new properties to an object.\r\n * @param o Object to make non-extensible. \r\n */\r\n preventExtensions(o: any): any;\r\n\r\n /**\r\n * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.\r\n * @param o Object to test. \r\n */\r\n isSealed(o: any): boolean;\r\n\r\n /**\r\n * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.\r\n * @param o Object to test. \r\n */\r\n isFrozen(o: any): boolean;\r\n\r\n /**\r\n * Returns a value that indicates whether new properties can be added to an object.\r\n * @param o Object to test. \r\n */\r\n isExtensible(o: any): boolean;\r\n\r\n /**\r\n * Returns the names of the enumerable properties and methods of an object.\r\n * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.\r\n */\r\n keys(o: any): string[];\r\n}\r\n\r\n/**\r\n * Creates a new function.\r\n */\r\ninterface Function {\r\n /**\r\n * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.\r\n * @param thisArg The object to be used as the this object.\r\n * @param argArray A set of arguments to be passed to the function.\r\n */\r\n apply(thisArg: any, argArray?: any): any;\r\n\r\n /**\r\n * Calls a method of an object, substituting another object for the current object.\r\n * @param thisArg The object to be used as the current object.\r\n * @param argArray A list of arguments to be passed to the method.\r\n */\r\n call(thisArg: any, ...argArray: any[]): any;\r\n\r\n /**\r\n * For a given function, creates a bound function that has the same body as the original function. \r\n * The this object of the bound function is associated with the specified object, and has the specified initial parameters.\r\n * @param thisArg An object to which the this keyword can refer inside the new function.\r\n * @param argArray A list of arguments to be passed to the new function.\r\n */\r\n bind(thisArg: any, ...argArray: any[]): any;\r\n\r\n prototype: any;\r\n length: number;\r\n\r\n // Non-standard extensions\r\n arguments: any;\r\n caller: Function;\r\n}\r\n\r\ndeclare var Function: {\r\n /** \r\n * Creates a new function.\r\n * @param args A list of arguments the function accepts.\r\n */\r\n new (...args: string[]): Function;\r\n (...args: string[]): Function;\r\n prototype: Function;\r\n}\r\n\r\ninterface IArguments {\r\n [index: number]: any;\r\n length: number;\r\n callee: Function;\r\n}\r\n\r\ninterface String {\r\n /** Returns a string representation of a string. */\r\n toString(): string;\r\n\r\n /**\r\n * Returns the character at the specified index.\r\n * @param pos The zero-based index of the desired character.\r\n */\r\n charAt(pos: number): string;\r\n\r\n /** \r\n * Returns the Unicode value of the character at the specified location.\r\n * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.\r\n */\r\n charCodeAt(index: number): number;\r\n\r\n /**\r\n * Returns a string that contains the concatenation of two or more strings.\r\n * @param strings The strings to append to the end of the string. \r\n */\r\n concat(...strings: string[]): string;\r\n\r\n /**\r\n * Returns the position of the first occurrence of a substring. \r\n * @param searchString The substring to search for in the string\r\n * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.\r\n */\r\n indexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Returns the last occurrence of a substring in the string.\r\n * @param searchString The substring to search for.\r\n * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.\r\n */\r\n lastIndexOf(searchString: string, position?: number): number;\r\n\r\n /**\r\n * Determines whether two strings are equivalent in the current locale.\r\n * @param that String to compare to target string\r\n */\r\n localeCompare(that: string): number;\r\n\r\n /** \r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A variable name or string literal containing the regular expression pattern and flags.\r\n */\r\n match(regexp: string): string[];\r\n\r\n /** \r\n * Matches a string with a regular expression, and returns an array containing the results of that search.\r\n * @param regexp A regular expression object that contains the regular expression pattern and applicable flags. \r\n */\r\n match(regexp: RegExp): string[];\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A String object or string literal that represents the regular expression\r\n * @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.\r\n */\r\n replace(searchValue: string, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A String object or string literal that represents the regular expression\r\n * @param replaceValue A function that returns the replacement text.\r\n */\r\n replace(searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags\r\n * @param replaceValue A String object or string literal containing the text to replace for every successful match of rgExp in stringObj.\r\n */\r\n replace(searchValue: RegExp, replaceValue: string): string;\r\n\r\n /**\r\n * Replaces text in a string, using a regular expression or search string.\r\n * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags\r\n * @param replaceValue A function that returns the replacement text.\r\n */\r\n replace(searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags. \r\n */\r\n search(regexp: string): number;\r\n\r\n /**\r\n * Finds the first substring match in a regular expression search.\r\n * @param regexp The regular expression pattern and applicable flags. \r\n */\r\n search(regexp: RegExp): number;\r\n\r\n /**\r\n * Returns a section of a string.\r\n * @param start The index to the beginning of the specified portion of stringObj. \r\n * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. \r\n * If this value is not specified, the substring continues to the end of stringObj.\r\n */\r\n slice(start: number, end?: number): string;\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. \r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: string, limit?: number): string[];\r\n\r\n /**\r\n * Split a string into substrings using the specified separator and return them as an array.\r\n * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. \r\n * @param limit A value used to limit the number of elements returned in the array.\r\n */\r\n split(separator: RegExp, limit?: number): string[];\r\n\r\n /**\r\n * Returns the substring at the specified location within a String object. \r\n * @param start The zero-based index number indicating the beginning of the substring.\r\n * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.\r\n * If end is omitted, the characters from start through the end of the original string are returned.\r\n */\r\n substring(start: number, end?: number): string;\r\n\r\n /** Converts all the alphabetic characters in a string to lowercase. */\r\n toLowerCase(): string;\r\n\r\n /** Converts all alphabetic characters to lowercase, taking into account the host environment\'s current locale. */\r\n toLocaleLowerCase(): string;\r\n\r\n /** Converts all the alphabetic characters in a string to uppercase. */\r\n toUpperCase(): string;\r\n\r\n /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment\'s current locale. */\r\n toLocaleUpperCase(): string;\r\n\r\n /** Removes the leading and trailing white space and line terminator characters from a string. */\r\n trim(): string;\r\n\r\n /** Returns the length of a String object. */\r\n length: number;\r\n\r\n // IE extensions\r\n /**\r\n * Gets a substring beginning at the specified location and having the specified length.\r\n * @param from The starting position of the desired substring. The index of the first character in the string is zero.\r\n * @param length The number of characters to include in the returned substring.\r\n */\r\n substr(from: number, length?: number): string;\r\n\r\n [index: number]: string;\r\n}\r\n\r\n/** \r\n * Allows manipulation and formatting of text strings and determination and location of substrings within strings. \r\n */\r\ndeclare var String: {\r\n new (value?: any): String;\r\n (value?: any): string;\r\n prototype: String;\r\n fromCharCode(...codes: number[]): string;\r\n}\r\n\r\ninterface Boolean {\r\n}\r\ndeclare var Boolean: {\r\n new (value?: any): Boolean;\r\n (value?: any): boolean;\r\n prototype: Boolean;\r\n}\r\n\r\ninterface Number {\r\n /**\r\n * Returns a string representation of an object.\r\n * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.\r\n */\r\n toString(radix?: number): string;\r\n\r\n /** \r\n * Returns a string representing a number in fixed-point notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toFixed(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented in exponential notation.\r\n * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.\r\n */\r\n toExponential(fractionDigits?: number): string;\r\n\r\n /**\r\n * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.\r\n * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.\r\n */ \r\n toPrecision(precision?: number): string;\r\n}\r\n\r\n/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */\r\ndeclare var Number: {\r\n new (value?: any): Number;\r\n (value?: any): number;\r\n prototype: Number;\r\n\r\n /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */\r\n MAX_VALUE: number;\r\n\r\n /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */\r\n MIN_VALUE: number;\r\n\r\n /** \r\n * A value that is not a number.\r\n * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.\r\n */\r\n NaN: number;\r\n\r\n /** \r\n * A value that is less than the largest negative number that can be represented in JavaScript.\r\n * JavaScript displays NEGATIVE_INFINITY values as -infinity. \r\n */\r\n NEGATIVE_INFINITY: number;\r\n\r\n /**\r\n * A value greater than the largest number that can be represented in JavaScript. \r\n * JavaScript displays POSITIVE_INFINITY values as infinity. \r\n */\r\n POSITIVE_INFINITY: number;\r\n}\r\n\r\ninterface Math {\r\n /** The mathematical constant e. This is Euler\'s number, the base of natural logarithms. */\r\n E: number;\r\n /** The natural logarithm of 10. */\r\n LN10: number;\r\n /** The natural logarithm of 2. */\r\n LN2: number;\r\n /** The base-2 logarithm of e. */\r\n LOG2E: number;\r\n /** The base-10 logarithm of e. */\r\n LOG10E: number;\r\n /** Pi. This is the ratio of the circumference of a circle to its diameter. */\r\n PI: number;\r\n /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */\r\n SQRT1_2: number;\r\n /** The square root of 2. */\r\n SQRT2: number;\r\n /**\r\n * Returns the absolute value of a number (the value without regard to whether it is positive or negative). \r\n * For example, the absolute value of -5 is the same as the absolute value of 5.\r\n * @param x A numeric expression for which the absolute value is needed.\r\n */\r\n abs(x: number): number;\r\n /**\r\n * Returns the arc cosine (or inverse cosine) of a number. \r\n * @param x A numeric expression.\r\n */ \r\n acos(x: number): number;\r\n /** \r\n * Returns the arcsine of a number. \r\n * @param x A numeric expression.\r\n */\r\n asin(x: number): number;\r\n /**\r\n * Returns the arctangent of a number. \r\n * @param x A numeric expression for which the arctangent is needed.\r\n */\r\n atan(x: number): number;\r\n /**\r\n * Returns the angle (in radians) from the X axis to a point (y,x).\r\n * @param y A numeric expression representing the cartesian y-coordinate.\r\n * @param x A numeric expression representing the cartesian x-coordinate.\r\n */\r\n atan2(y: number, x: number): number;\r\n /**\r\n * Returns the smallest number greater than or equal to its numeric argument. \r\n * @param x A numeric expression.\r\n */\r\n ceil(x: number): number;\r\n /**\r\n * Returns the cosine of a number. \r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */ \r\n cos(x: number): number;\r\n /**\r\n * Returns e (the base of natural logarithms) raised to a power. \r\n * @param x A numeric expression representing the power of e.\r\n */\r\n exp(x: number): number;\r\n /**\r\n * Returns the greatest number less than or equal to its numeric argument. \r\n * @param x A numeric expression.\r\n */\r\n floor(x: number): number;\r\n /**\r\n * Returns the natural logarithm (base e) of a number. \r\n * @param x A numeric expression.\r\n */\r\n log(x: number): number;\r\n /**\r\n * Returns the larger of a set of supplied numeric expressions. \r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n max(...values: number[]): number;\r\n /**\r\n * Returns the smaller of a set of supplied numeric expressions. \r\n * @param values Numeric expressions to be evaluated.\r\n */\r\n min(...values: number[]): number;\r\n /**\r\n * Returns the value of a base expression taken to a specified power. \r\n * @param x The base value of the expression.\r\n * @param y The exponent value of the expression.\r\n */\r\n pow(x: number, y: number): number;\r\n /** Returns a pseudorandom number between 0 and 1. */ \r\n random(): number;\r\n /** \r\n * Returns a supplied numeric expression rounded to the nearest number.\r\n * @param x The value to be rounded to the nearest number.\r\n */\r\n round(x: number): number;\r\n /**\r\n * Returns the sine of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n sin(x: number): number;\r\n /**\r\n * Returns the square root of a number.\r\n * @param x A numeric expression.\r\n */\r\n sqrt(x: number): number;\r\n /**\r\n * Returns the tangent of a number.\r\n * @param x A numeric expression that contains an angle measured in radians.\r\n */\r\n tan(x: number): number;\r\n}\r\n/** An intrinsic object that provides basic mathematics functionality and constants. */\r\ndeclare var Math: Math;\r\n\r\n/** Enables basic storage and retrieval of dates and times. */\r\ninterface Date {\r\n /** Returns a string representation of a date. The format of the string depends on the locale. */\r\n toString(): string;\r\n /** Returns a date as a string value. */\r\n toDateString(): string;\r\n /** Returns a time as a string value. */\r\n toTimeString(): string;\r\n /** Returns a value as a string value appropriate to the host environment\'s current locale. */\r\n toLocaleString(): string;\r\n /** Returns a date as a string value appropriate to the host environment\'s current locale. */\r\n toLocaleDateString(): string;\r\n /** Returns a time as a string value appropriate to the host environment\'s current locale. */\r\n toLocaleTimeString(): string;\r\n /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */\r\n valueOf(): number;\r\n /** Gets the time value in milliseconds. */\r\n getTime(): number;\r\n /** Gets the year, using local time. */\r\n getFullYear(): number;\r\n /** Gets the year using Universal Coordinated Time (UTC). */\r\n getUTCFullYear(): number;\r\n /** Gets the month, using local time. */\r\n getMonth(): number;\r\n /** Gets the month of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMonth(): number;\r\n /** Gets the day-of-the-month, using local time. */\r\n getDate(): number;\r\n /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */\r\n getUTCDate(): number;\r\n /** Gets the day of the week, using local time. */\r\n getDay(): number;\r\n /** Gets the day of the week using Universal Coordinated Time (UTC). */\r\n getUTCDay(): number;\r\n /** Gets the hours in a date, using local time. */\r\n getHours(): number;\r\n /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */\r\n getUTCHours(): number;\r\n /** Gets the minutes of a Date object, using local time. */\r\n getMinutes(): number;\r\n /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMinutes(): number;\r\n /** Gets the seconds of a Date object, using local time. */\r\n getSeconds(): number;\r\n /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCSeconds(): number;\r\n /** Gets the milliseconds of a Date, using local time. */\r\n getMilliseconds(): number;\r\n /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */\r\n getUTCMilliseconds(): number;\r\n /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */\r\n getTimezoneOffset(): number;\r\n /** \r\n * Sets the date and time value in the Date object.\r\n * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT. \r\n */\r\n setTime(time: number): void;\r\n /**\r\n * Sets the milliseconds value in the Date object using local time. \r\n * @param ms A numeric value equal to the millisecond value.\r\n */\r\n setMilliseconds(ms: number): void;\r\n /** \r\n * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param ms A numeric value equal to the millisecond value. \r\n */\r\n setUTCMilliseconds(ms: number): void;\r\n\r\n /**\r\n * Sets the seconds value in the Date object using local time. \r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setSeconds(sec: number, ms?: number): void;\r\n /**\r\n * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).\r\n * @param sec A numeric value equal to the seconds value.\r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCSeconds(sec: number, ms?: number): void;\r\n /**\r\n * Sets the minutes value in the Date object using local time. \r\n * @param min A numeric value equal to the minutes value. \r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setMinutes(min: number, sec?: number, ms?: number): void;\r\n /**\r\n * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).\r\n * @param min A numeric value equal to the minutes value. \r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCMinutes(min: number, sec?: number, ms?: number): void;\r\n /**\r\n * Sets the hour value in the Date object using local time.\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setHours(hours: number, min?: number, sec?: number, ms?: number): void;\r\n /**\r\n * Sets the hours value in the Date object using Universal Coordinated Time (UTC).\r\n * @param hours A numeric value equal to the hours value.\r\n * @param min A numeric value equal to the minutes value.\r\n * @param sec A numeric value equal to the seconds value. \r\n * @param ms A numeric value equal to the milliseconds value.\r\n */\r\n setUTCHours(hours: number, min?: number, sec?: number, ms?: number): void;\r\n /**\r\n * Sets the numeric day-of-the-month value of the Date object using local time. \r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setDate(date: number): void;\r\n /** \r\n * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).\r\n * @param date A numeric value equal to the day of the month. \r\n */\r\n setUTCDate(date: number): void;\r\n /** \r\n * Sets the month value in the Date object using local time. \r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. \r\n * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.\r\n */\r\n setMonth(month: number, date?: number): void;\r\n /**\r\n * Sets the month value in the Date object using Universal Coordinated Time (UTC).\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.\r\n * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.\r\n */\r\n setUTCMonth(month: number, date?: number): void;\r\n /**\r\n * Sets the year of the Date object using local time.\r\n * @param year A numeric value for the year.\r\n * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.\r\n * @param date A numeric value equal for the day of the month.\r\n */\r\n setFullYear(year: number, month?: number, date?: number): void;\r\n /**\r\n * Sets the year value in the Date object using Universal Coordinated Time (UTC).\r\n * @param year A numeric value equal to the year.\r\n * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.\r\n * @param date A numeric value equal to the day of the month.\r\n */\r\n setUTCFullYear(year: number, month?: number, date?: number): void;\r\n /** Returns a date converted to a string using Universal Coordinated Time (UTC). */\r\n toUTCString(): string;\r\n /** Returns a date as a string value in ISO format. */\r\n toISOString(): string;\r\n /** Used by the JSON.stringify method to enable the transformation of an object\'s data for JavaScript Object Notation (JSON) serialization. */\r\n toJSON(key?: any): string;\r\n}\r\n\r\ndeclare var Date: {\r\n new (): Date;\r\n new (value: number): Date;\r\n new (value: string): Date;\r\n new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;\r\n (): string;\r\n prototype: Date;\r\n /**\r\n * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.\r\n * @param s A date string\r\n */\r\n parse(s: string): number;\r\n /**\r\n * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date. \r\n * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.\r\n * @param month The month as an number between 0 and 11 (January to December).\r\n * @param date The date as an number between 1 and 31.\r\n * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.\r\n * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.\r\n * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.\r\n * @param ms An number from 0 to 999 that specifies the milliseconds.\r\n */\r\n UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;\r\n now(): number;\r\n}\r\n\r\ninterface RegExpExecArray {\r\n [index: number]: string;\r\n length: number;\r\n\r\n index: number;\r\n input: string;\r\n\r\n toString(): string;\r\n toLocaleString(): string;\r\n concat(...items: string[][]): string[];\r\n join(separator?: string): string;\r\n pop(): string;\r\n push(...items: string[]): number;\r\n reverse(): string[];\r\n shift(): string;\r\n slice(start: number, end?: number): string[];\r\n sort(compareFn?: (a: string, b: string) => number): string[];\r\n splice(start: number): string[];\r\n splice(start: number, deleteCount: number, ...items: string[]): string[];\r\n unshift(...items: string[]): number;\r\n\r\n indexOf(searchElement: string, fromIndex?: number): number;\r\n lastIndexOf(searchElement: string, fromIndex?: number): number;\r\n every(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;\r\n some(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): boolean;\r\n forEach(callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any): void;\r\n map(callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): any[];\r\n filter(callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any): string[];\r\n reduce(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;\r\n reduceRight(callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: string[]) => any, initialValue?: any): any;\r\n}\r\n\r\n\r\ninterface RegExp {\r\n /** \r\n * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.\r\n * @param string The String object or string literal on which to perform the search.\r\n */\r\n exec(string: string): RegExpExecArray;\r\n \r\n /** \r\n * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.\r\n * @param string String on which to perform the search.\r\n */\r\n test(string: string): boolean;\r\n\r\n /** Returns a copy of the text of the regular expression pattern. Read-only. The rgExp argument is a Regular expression object. It can be a variable name or a literal. */\r\n source: string;\r\n \r\n /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */\r\n global: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */\r\n ignoreCase: boolean;\r\n\r\n /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */\r\n multiline: boolean;\r\n\r\n lastIndex: number;\r\n\r\n // Non-standard extensions\r\n compile(): RegExp;\r\n}\r\ndeclare var RegExp: {\r\n new (pattern: string, flags?: string): RegExp;\r\n (pattern: string, flags?: string): RegExp;\r\n\r\n // Non-standard extensions\r\n $1: string;\r\n $2: string;\r\n $3: string;\r\n $4: string;\r\n $5: string;\r\n $6: string;\r\n $7: string;\r\n $8: string;\r\n $9: string;\r\n lastMatch: string;\r\n}\r\n\r\ninterface Error {\r\n name: string;\r\n message: string;\r\n}\r\ndeclare var Error: {\r\n new (message?: string): Error;\r\n (message?: string): Error;\r\n prototype: Error;\r\n}\r\n\r\ninterface EvalError extends Error {\r\n}\r\ndeclare var EvalError: {\r\n new (message?: string): EvalError;\r\n (message?: string): EvalError;\r\n prototype: EvalError;\r\n}\r\n\r\ninterface RangeError extends Error {\r\n}\r\ndeclare var RangeError: {\r\n new (message?: string): RangeError;\r\n (message?: string): RangeError;\r\n prototype: RangeError;\r\n}\r\n\r\ninterface ReferenceError extends Error {\r\n}\r\ndeclare var ReferenceError: {\r\n new (message?: string): ReferenceError;\r\n (message?: string): ReferenceError;\r\n prototype: ReferenceError;\r\n}\r\n\r\ninterface SyntaxError extends Error {\r\n}\r\ndeclare var SyntaxError: {\r\n new (message?: string): SyntaxError;\r\n (message?: string): SyntaxError;\r\n prototype: SyntaxError;\r\n}\r\n\r\ninterface TypeError extends Error {\r\n}\r\ndeclare var TypeError: {\r\n new (message?: string): TypeError;\r\n (message?: string): TypeError;\r\n prototype: TypeError;\r\n}\r\n\r\ninterface URIError extends Error {\r\n}\r\ndeclare var URIError: {\r\n new (message?: string): URIError;\r\n (message?: string): URIError;\r\n prototype: URIError;\r\n}\r\n\r\ninterface JSON {\r\n /**\r\n * Converts a JavaScript Object Notation (JSON) string into an object.\r\n * @param text A valid JSON string.\r\n * @param reviver A function that transforms the results. This function is called for each member of the object. \r\n * If a member contains nested objects, the nested objects are transformed before the parent object is. \r\n */\r\n parse(text: string, reviver?: (key: any, value: any) => any): any;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n */\r\n stringify(value: any): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer A function that transforms the results.\r\n */\r\n stringify(value: any, replacer: (key: string, value: any) => any): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer Array that transforms the results.\r\n */\r\n stringify(value: any, replacer: any[]): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer A function that transforms the results.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer: (key: string, value: any) => any, space: any): string;\r\n /**\r\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\r\n * @param value A JavaScript value, usually an object or array, to be converted.\r\n * @param replacer Array that transforms the results.\r\n * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\r\n */\r\n stringify(value: any, replacer: any[], space: any): string;\r\n}\r\n/**\r\n * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.\r\n */\r\ndeclare var JSON: JSON;\r\n\r\n\r\n/////////////////////////////\r\n/// ECMAScript Array API (specially handled by compiler)\r\n/////////////////////////////\r\n\r\ninterface Array {\r\n /**\r\n * Returns a string representation of an array.\r\n */\r\n toString(): string;\r\n toLocaleString(): string;\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: U[]): T[];\r\n /**\r\n * Combines two or more arrays.\r\n * @param items Additional items to add to the end of array1.\r\n */\r\n concat(...items: T[]): T[];\r\n /**\r\n * Adds all the elements of an array separated by the specified separator string.\r\n * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.\r\n */\r\n join(separator?: string): string;\r\n /**\r\n * Removes the last element from an array and returns it.\r\n */\r\n pop(): T;\r\n /**\r\n * Appends new elements to an array, and returns the new length of the array.\r\n * @param items New elements of the Array.\r\n */\r\n push(...items: T[]): number;\r\n /**\r\n * Reverses the elements in an Array. \r\n */\r\n reverse(): T[];\r\n /**\r\n * Removes the first element from an array and returns it.\r\n */\r\n shift(): T;\r\n /** \r\n * Returns a section of an array.\r\n * @param start The beginning of the specified portion of the array.\r\n * @param end The end of the specified portion of the array.\r\n */\r\n slice(start: number, end?: number): T[];\r\n\r\n /**\r\n * Sorts an array.\r\n * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.\r\n */\r\n sort(compareFn?: (a: T, b: T) => number): T[];\r\n\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n */\r\n splice(start: number): T[];\r\n\r\n /**\r\n * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.\r\n * @param start The zero-based location in the array from which to start removing elements.\r\n * @param deleteCount The number of elements to remove.\r\n * @param items Elements to insert into the array in place of the deleted elements.\r\n */\r\n splice(start: number, deleteCount: number, ...items: T[]): T[];\r\n\r\n /**\r\n * Inserts new elements at the start of an array.\r\n * @param items Elements to insert at the start of the Array.\r\n */\r\n unshift(...items: T[]): number;\r\n\r\n /**\r\n * Returns the index of the first occurrence of a value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\r\n */\r\n indexOf(searchElement: T, fromIndex?: number): number;\r\n\r\n /**\r\n * Returns the index of the last occurrence of a specified value in an array.\r\n * @param searchElement The value to locate in the array.\r\n * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.\r\n */\r\n lastIndexOf(searchElement: T, fromIndex?: number): number;\r\n\r\n /**\r\n * Determines whether all the members of an array satisfy the specified test.\r\n * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Determines whether the specified callback function returns true for any element of an array.\r\n * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.\r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;\r\n\r\n /**\r\n * Performs the specified action for each element in an array.\r\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;\r\n\r\n /**\r\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\r\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];\r\n\r\n /**\r\n * Returns the elements of an array that meet the condition specified in a callback function. \r\n * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. \r\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\r\n */\r\n filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];\r\n\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /**\r\n * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.\r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;\r\n /** \r\n * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\r\n * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array. \r\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\r\n */\r\n reduceRight(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;\r\n\r\n /**\r\n * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.\r\n */\r\n length: number;\r\n\r\n [n: number]: T;\r\n}\r\ndeclare var Array: {\r\n new(arrayLength?: number): any[];\r\n new (arrayLength: number): T[];\r\n new (...items: T[]): T[];\r\n (arrayLength?: number): any[];\r\n (arrayLength: number): T[];\r\n (...items: T[]): T[];\r\n isArray(arg: any): boolean;\r\n prototype: Array;\r\n}\r\n\r\n\r\n/////////////////////////////\r\n/// IE10 ECMAScript Extensions\r\n/////////////////////////////\r\n\r\n/**\r\n * Represents a raw buffer of binary data, which is used to store data for the \r\n * different typed arrays. ArrayBuffers cannot be read from or written to directly, \r\n * but can be passed to a typed array or DataView Object to interpret the raw \r\n * buffer as needed. \r\n */\r\ninterface ArrayBuffer {\r\n /**\r\n * Read-only. The length of the ArrayBuffer (in bytes).\r\n */\r\n byteLength: number;\r\n}\r\n\r\ndeclare var ArrayBuffer: {\r\n prototype: ArrayBuffer;\r\n new (byteLength: number): ArrayBuffer;\r\n}\r\n\r\ninterface ArrayBufferView {\r\n buffer: ArrayBuffer;\r\n byteOffset: number;\r\n byteLength: number;\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int8Array extends ArrayBufferView {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n\r\n [index: number]: number;\r\n\r\n /**\r\n * Gets the element at the specified index.\r\n * @param index The index at which to get the element of the array.\r\n */\r\n get(index: number): number;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Int8Array, offset?: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: number[], offset?: number): void;\r\n\r\n /**\r\n * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int8Array;\r\n}\r\ndeclare var Int8Array: {\r\n prototype: Int8Array;\r\n new (length: number): Int8Array;\r\n new (array: Int8Array): Int8Array;\r\n new (array: number[]): Int8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;\r\n BYTES_PER_ELEMENT: number;\r\n}\r\n\r\n/**\r\n * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint8Array extends ArrayBufferView {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n [index: number]: number;\r\n\r\n /**\r\n * Gets the element at the specified index.\r\n * @param index The index at which to get the element of the array.\r\n */\r\n get(index: number): number;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Uint8Array, offset?: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: number[], offset?: number): void;\r\n\r\n /**\r\n * Gets a new Uint8Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint8Array;\r\n}\r\ndeclare var Uint8Array: {\r\n prototype: Uint8Array;\r\n new (length: number): Uint8Array;\r\n new (array: Uint8Array): Uint8Array;\r\n new (array: number[]): Uint8Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;\r\n BYTES_PER_ELEMENT: number;\r\n}\r\n\r\n/**\r\n * A typed array of 16-bit integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int16Array extends ArrayBufferView {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n [index: number]: number;\r\n\r\n /**\r\n * Gets the element at the specified index.\r\n * @param index The index at which to get the element of the array.\r\n */\r\n get(index: number): number;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Int16Array, offset?: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: number[], offset?: number): void;\r\n\r\n /**\r\n * Gets a new Int16Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int16Array;\r\n}\r\ndeclare var Int16Array: {\r\n prototype: Int16Array;\r\n new (length: number): Int16Array;\r\n new (array: Int16Array): Int16Array;\r\n new (array: number[]): Int16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;\r\n BYTES_PER_ELEMENT: number;\r\n}\r\n\r\n/**\r\n * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint16Array extends ArrayBufferView {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n [index: number]: number;\r\n\r\n /**\r\n * Gets the element at the specified index.\r\n * @param index The index at which to get the element of the array.\r\n */\r\n get(index: number): number;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Uint16Array, offset?: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: number[], offset?: number): void;\r\n\r\n /**\r\n * Gets a new Uint16Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray.\r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint16Array;\r\n}\r\ndeclare var Uint16Array: {\r\n prototype: Uint16Array;\r\n new (length: number): Uint16Array;\r\n new (array: Uint16Array): Uint16Array;\r\n new (array: number[]): Uint16Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;\r\n BYTES_PER_ELEMENT: number;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Int32Array extends ArrayBufferView {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n [index: number]: number;\r\n\r\n /**\r\n * Gets the element at the specified index.\r\n * @param index The index at which to get the element of the array.\r\n */\r\n get(index: number): number;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Int32Array, offset?: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: number[], offset?: number): void;\r\n\r\n /**\r\n * Gets a new Int32Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Int32Array;\r\n}\r\ndeclare var Int32Array: {\r\n prototype: Int32Array;\r\n new (length: number): Int32Array;\r\n new (array: Int32Array): Int32Array;\r\n new (array: number[]): Int32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;\r\n BYTES_PER_ELEMENT: number;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Uint32Array extends ArrayBufferView {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n [index: number]: number;\r\n\r\n /**\r\n * Gets the element at the specified index.\r\n * @param index The index at which to get the element of the array.\r\n */\r\n get(index: number): number;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Uint32Array, offset?: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: number[], offset?: number): void;\r\n\r\n /**\r\n * Gets a new Int8Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Uint32Array;\r\n}\r\ndeclare var Uint32Array: {\r\n prototype: Uint32Array;\r\n new (length: number): Uint32Array;\r\n new (array: Uint32Array): Uint32Array;\r\n new (array: number[]): Uint32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;\r\n BYTES_PER_ELEMENT: number;\r\n}\r\n\r\n/**\r\n * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float32Array extends ArrayBufferView {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n [index: number]: number;\r\n\r\n /**\r\n * Gets the element at the specified index.\r\n * @param index The index at which to get the element of the array.\r\n */\r\n get(index: number): number;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Float32Array, offset?: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: number[], offset?: number): void;\r\n\r\n /**\r\n * Gets a new Float32Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float32Array;\r\n}\r\ndeclare var Float32Array: {\r\n prototype: Float32Array;\r\n new (length: number): Float32Array;\r\n new (array: Float32Array): Float32Array;\r\n new (array: number[]): Float32Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;\r\n BYTES_PER_ELEMENT: number;\r\n}\r\n\r\n/**\r\n * A typed array of 64-bit float values. The contents are initialized to 0. If the requested number of bytes could not be allocated an exception is raised.\r\n */\r\ninterface Float64Array extends ArrayBufferView {\r\n /**\r\n * The size in bytes of each element in the array. \r\n */\r\n BYTES_PER_ELEMENT: number;\r\n\r\n /**\r\n * The length of the array.\r\n */\r\n length: number;\r\n [index: number]: number;\r\n\r\n /**\r\n * Gets the element at the specified index.\r\n * @param index The index at which to get the element of the array.\r\n */\r\n get(index: number): number;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param index The index of the location to set.\r\n * @param value The value to set.\r\n */\r\n set(index: number, value: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: Float64Array, offset?: number): void;\r\n\r\n /**\r\n * Sets a value or an array of values.\r\n * @param A typed or untyped array of values to set.\r\n * @param offset The index in the current array at which the values are to be written.\r\n */\r\n set(array: number[], offset?: number): void;\r\n\r\n /**\r\n * Gets a new Float64Array view of the ArrayBuffer Object store for this array, specifying the first and last members of the subarray. \r\n * @param begin The index of the beginning of the array.\r\n * @param end The index of the end of the array.\r\n */\r\n subarray(begin: number, end?: number): Float64Array;\r\n}\r\ndeclare var Float64Array: {\r\n prototype: Float64Array;\r\n new (length: number): Float64Array;\r\n new (array: Float64Array): Float64Array;\r\n new (array: number[]): Float64Array;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;\r\n BYTES_PER_ELEMENT: number;\r\n}\r\n\r\n/**\r\n * You can use a DataView object to read and write the different kinds of binary data to any location in the ArrayBuffer. \r\n */\r\ninterface DataView extends ArrayBufferView {\r\n /**\r\n * Gets the Int8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Uint8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint8(byteOffset: number): number;\r\n\r\n /**\r\n * Gets the Int16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt16(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint16(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Int32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getInt32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Uint32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getUint32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Float32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat32(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Gets the Float64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. \r\n * @param byteOffset The place in the buffer at which the value should be retrieved.\r\n */\r\n getFloat64(byteOffset: number, littleEndian?: boolean): number;\r\n\r\n /**\r\n * Stores an Int8 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setInt8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Uint8 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n */\r\n setUint8(byteOffset: number, value: number): void;\r\n\r\n /**\r\n * Stores an Int16 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written.\r\n */\r\n setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint16 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written.\r\n */\r\n setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Int32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written.\r\n */\r\n setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Uint32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written.\r\n */\r\n setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Float32 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written.\r\n */\r\n setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n\r\n /**\r\n * Stores an Float64 value at the specified byte offset from the start of the view. \r\n * @param byteOffset The place in the buffer at which the value should be set.\r\n * @param value The value to set.\r\n * @param littleEndian If false or undefined, a big-endian value should be written, otherwise a little-endian value should be written.\r\n */\r\n setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;\r\n}\r\ndeclare var DataView: {\r\n prototype: DataView;\r\n new (buffer: ArrayBuffer, byteOffset?: number, length?: number): DataView;\r\n}\r\n\r\n/////////////////////////////\r\n/// IE11 ECMAScript Extensions\r\n/////////////////////////////\r\n\r\ninterface Map {\r\n clear(): void;\r\n delete(key: K): boolean;\r\n forEach(callbackfn: (value: V, index: K, map: Map) => void, thisArg?: any): void;\r\n get(key: K): V;\r\n has(key: K): boolean;\r\n set(key: K, value: V): Map;\r\n size: number;\r\n}\r\ndeclare var Map: {\r\n new (): Map;\r\n}\r\n\r\ninterface WeakMap {\r\n clear(): void;\r\n delete(key: K): boolean;\r\n get(key: K): V;\r\n has(key: K): boolean;\r\n set(key: K, value: V): WeakMap;\r\n}\r\ndeclare var WeakMap: {\r\n new (): WeakMap;\r\n}\r\n\r\ninterface Set {\r\n add(value: T): Set;\r\n clear(): void;\r\n delete(value: T): boolean;\r\n forEach(callbackfn: (value: T, index: T, set: Set) => void, thisArg?: any): void;\r\n has(value: T): boolean;\r\n size: number;\r\n}\r\ndeclare var Set: {\r\n new (): Set;\r\n}\r\n\r\ndeclare module Intl {\r\n\r\n interface CollatorOptions {\r\n usage?: string;\r\n localeMatcher?: string;\r\n numeric?: boolean;\r\n caseFirst?: string;\r\n sensitivity?: string;\r\n ignorePunctuation?: boolean;\r\n }\r\n\r\n interface ResolvedCollatorOptions {\r\n locale: string;\r\n usage: string;\r\n sensitivity: string;\r\n ignorePunctuation: boolean;\r\n collation: string;\r\n caseFirst: string;\r\n numeric: boolean;\r\n }\r\n\r\n interface Collator {\r\n compare(x: string, y: string): number;\r\n resolvedOptions(): ResolvedCollatorOptions;\r\n }\r\n var Collator: {\r\n new (locales?: string[], options?: CollatorOptions): Collator;\r\n new (locale?: string, options?: CollatorOptions): Collator;\r\n (locales?: string[], options?: CollatorOptions): Collator;\r\n (locale?: string, options?: CollatorOptions): Collator;\r\n supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];\r\n supportedLocalesOf(locale: string, options?: CollatorOptions): string[];\r\n }\r\n\r\n interface NumberFormatOptions {\r\n localeMatcher?: string;\r\n style?: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n useGrouping?: boolean;\r\n }\r\n\r\n interface ResolvedNumberFormatOptions {\r\n locale: string;\r\n numberingSystem: string;\r\n style: string;\r\n currency?: string;\r\n currencyDisplay?: string;\r\n minimumintegerDigits: number;\r\n minimumFractionDigits: number;\r\n maximumFractionDigits: number;\r\n minimumSignificantDigits?: number;\r\n maximumSignificantDigits?: number;\r\n useGrouping: boolean;\r\n }\r\n\r\n interface NumberFormat {\r\n format(value: number): string;\r\n resolvedOptions(): ResolvedNumberFormatOptions;\r\n }\r\n var NumberFormat: {\r\n new (locales?: string[], options?: NumberFormatOptions): Collator;\r\n new (locale?: string, options?: NumberFormatOptions): Collator;\r\n (locales?: string[], options?: NumberFormatOptions): Collator;\r\n (locale?: string, options?: NumberFormatOptions): Collator;\r\n supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];\r\n }\r\n\r\n interface DateTimeFormatOptions {\r\n localeMatcher?: string;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n formatMatcher?: string;\r\n hour12: boolean;\r\n }\r\n\r\n interface ResolvedDateTimeFormatOptions {\r\n locale: string;\r\n calendar: string;\r\n numberingSystem: string;\r\n timeZone: string;\r\n hour12?: boolean;\r\n weekday?: string;\r\n era?: string;\r\n year?: string;\r\n month?: string;\r\n day?: string;\r\n hour?: string;\r\n minute?: string;\r\n second?: string;\r\n timeZoneName?: string;\r\n }\r\n\r\n interface DateTimeFormat {\r\n format(date: number): string;\r\n resolvedOptions(): ResolvedDateTimeFormatOptions;\r\n }\r\n var DateTimeFormat: {\r\n new (locales?: string[], options?: DateTimeFormatOptions): Collator;\r\n new (locale?: string, options?: DateTimeFormatOptions): Collator;\r\n (locales?: string[], options?: DateTimeFormatOptions): Collator;\r\n (locale?: string, options?: DateTimeFormatOptions): Collator;\r\n supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];\r\n supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];\r\n }\r\n}\r\n\r\ninterface String {\r\n localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;\r\n localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;\r\n}\r\n\r\ninterface Number {\r\n toLocaleString(locales: string[], options?: Intl.NumberFormatOptions): string;\r\n toLocaleString(locale: string, options?: Intl.NumberFormatOptions): string;\r\n}\r\n\r\ninterface Date {\r\n toLocaleString(locales: string[], options?: Intl.DateTimeFormatOptions): string;\r\n toLocaleString(locale: string, options?: Intl.DateTimeFormatOptions): string;\r\n}\r\n\r\n\r\n/////////////////////////////\r\n/// IE9 DOM APIs \r\n/////////////////////////////\r\n\r\ninterface PositionOptions {\r\n enableHighAccuracy?: boolean;\r\n timeout?: number;\r\n maximumAge?: number;\r\n}\r\n\r\ninterface NavigatorID {\r\n appVersion: string;\r\n appName: string;\r\n userAgent: string;\r\n platform: string;\r\n}\r\n\r\ninterface HTMLTableElement extends HTMLElement, MSDataBindingTableExtensions, MSDataBindingExtensions, DOML2DeprecatedBackgroundStyle, DOML2DeprecatedBackgroundColorStyle {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.\r\n */\r\n borderColorLight: any;\r\n /**\r\n * Sets or retrieves the amount of space between cells in a table.\r\n */\r\n cellSpacing: string;\r\n /**\r\n * Retrieves the tFoot object of the table.\r\n */\r\n tFoot: HTMLTableSectionElement;\r\n /**\r\n * Sets or retrieves the way the border frame around the table is displayed.\r\n */\r\n frame: string;\r\n /**\r\n * Sets or retrieves the border color of the object. \r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollection;\r\n /**\r\n * Sets or retrieves which dividing lines (inner borders) are displayed.\r\n */\r\n rules: string;\r\n /**\r\n * Sets or retrieves the number of columns in the table.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves a description and/or structure of the object.\r\n */\r\n summary: string;\r\n /**\r\n * Retrieves the caption object of a table.\r\n */\r\n caption: HTMLTableCaptionElement;\r\n /**\r\n * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.\r\n */\r\n tBodies: HTMLCollection;\r\n /**\r\n * Retrieves the tHead object of the table.\r\n */\r\n tHead: HTMLTableSectionElement;\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n /**\r\n * Retrieves a collection of all cells in the table row or in the entire table.\r\n */\r\n cells: HTMLCollection;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves the amount of space between the border of the cell and the content of the cell.\r\n */\r\n cellPadding: string;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.\r\n */\r\n borderColorDark: any;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Creates an empty tBody element in the table.\r\n */\r\n createTBody(): HTMLElement;\r\n /**\r\n * Deletes the caption element and its contents from the table.\r\n */\r\n deleteCaption(): void;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLElement;\r\n /**\r\n * Deletes the tFoot element and its contents from the table.\r\n */\r\n deleteTFoot(): void;\r\n /**\r\n * Returns the tHead element object if successful, or null otherwise.\r\n */\r\n createTHead(): HTMLElement;\r\n /**\r\n * Deletes the tHead element and its contents from the table.\r\n */\r\n deleteTHead(): void;\r\n /**\r\n * Creates an empty caption element in the table.\r\n */\r\n createCaption(): HTMLElement;\r\n /**\r\n * Moves a table row to a new position.\r\n * @param indexFrom Number that specifies the index in the rows collection of the table row that is moved.\r\n * @param indexTo Number that specifies where the row is moved within the rows collection.\r\n */\r\n moveRow(indexFrom?: number, indexTo?: number): Object;\r\n /**\r\n * Creates an empty tFoot element in the table.\r\n */\r\n createTFoot(): HTMLElement;\r\n}\r\ndeclare var HTMLTableElement: {\r\n prototype: HTMLTableElement;\r\n new (): HTMLTableElement;\r\n}\r\n\r\ninterface TreeWalker {\r\n whatToShow: number;\r\n filter: NodeFilter;\r\n root: Node;\r\n currentNode: Node;\r\n expandEntityReferences: boolean;\r\n previousSibling(): Node;\r\n lastChild(): Node;\r\n nextSibling(): Node;\r\n nextNode(): Node;\r\n parentNode(): Node;\r\n firstChild(): Node;\r\n previousNode(): Node;\r\n}\r\ndeclare var TreeWalker: {\r\n prototype: TreeWalker;\r\n new (): TreeWalker;\r\n}\r\n\r\ninterface GetSVGDocument {\r\n getSVGDocument(): Document;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {\r\n y: number;\r\n y1: number;\r\n x: number;\r\n x1: number;\r\n}\r\ndeclare var SVGPathSegCurvetoQuadraticRel: {\r\n prototype: SVGPathSegCurvetoQuadraticRel;\r\n new (): SVGPathSegCurvetoQuadraticRel;\r\n}\r\n\r\ninterface Performance {\r\n navigation: PerformanceNavigation;\r\n timing: PerformanceTiming;\r\n getEntriesByType(entryType: string): any;\r\n toJSON(): any;\r\n getMeasures(measureName?: string): any;\r\n clearMarks(markName?: string): void;\r\n getMarks(markName?: string): any;\r\n clearResourceTimings(): void;\r\n mark(markName: string): void;\r\n measure(measureName: string, startMarkName?: string, endMarkName?: string): void;\r\n getEntriesByName(name: string, entryType?: string): any;\r\n getEntries(): any;\r\n clearMeasures(measureName?: string): void;\r\n setResourceTimingBufferSize(maxSize: number): void;\r\n}\r\ndeclare var Performance: {\r\n prototype: Performance;\r\n new (): Performance;\r\n}\r\n\r\ninterface MSDataBindingTableExtensions {\r\n dataPageSize: number;\r\n nextPage(): void;\r\n firstPage(): void;\r\n refresh(): void;\r\n previousPage(): void;\r\n lastPage(): void;\r\n}\r\n\r\ninterface CompositionEvent extends UIEvent {\r\n data: string;\r\n locale: string;\r\n initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;\r\n}\r\ndeclare var CompositionEvent: {\r\n prototype: CompositionEvent;\r\n new (): CompositionEvent;\r\n}\r\n\r\ninterface WindowTimers {\r\n clearTimeout(handle: number): void;\r\n setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\n clearInterval(handle: number): void;\r\n setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\n}\r\n\r\ninterface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired {\r\n orientType: SVGAnimatedEnumeration;\r\n markerUnits: SVGAnimatedEnumeration;\r\n markerWidth: SVGAnimatedLength;\r\n markerHeight: SVGAnimatedLength;\r\n orientAngle: SVGAnimatedAngle;\r\n refY: SVGAnimatedLength;\r\n refX: SVGAnimatedLength;\r\n setOrientToAngle(angle: SVGAngle): void;\r\n setOrientToAuto(): void;\r\n SVG_MARKER_ORIENT_UNKNOWN: number;\r\n SVG_MARKER_ORIENT_ANGLE: number;\r\n SVG_MARKERUNITS_UNKNOWN: number;\r\n SVG_MARKERUNITS_STROKEWIDTH: number;\r\n SVG_MARKER_ORIENT_AUTO: number;\r\n SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n}\r\ndeclare var SVGMarkerElement: {\r\n prototype: SVGMarkerElement;\r\n new (): SVGMarkerElement;\r\n SVG_MARKER_ORIENT_UNKNOWN: number;\r\n SVG_MARKER_ORIENT_ANGLE: number;\r\n SVG_MARKERUNITS_UNKNOWN: number;\r\n SVG_MARKERUNITS_STROKEWIDTH: number;\r\n SVG_MARKER_ORIENT_AUTO: number;\r\n SVG_MARKERUNITS_USERSPACEONUSE: number;\r\n}\r\n\r\ninterface CSSStyleDeclaration {\r\n backgroundAttachment: string;\r\n visibility: string;\r\n textAlignLast: string;\r\n borderRightStyle: string;\r\n counterIncrement: string;\r\n orphans: string;\r\n cssText: string;\r\n borderStyle: string;\r\n pointerEvents: string;\r\n borderTopColor: string;\r\n markerEnd: string;\r\n textIndent: string;\r\n listStyleImage: string;\r\n cursor: string;\r\n listStylePosition: string;\r\n wordWrap: string;\r\n borderTopStyle: string;\r\n alignmentBaseline: string;\r\n opacity: string;\r\n direction: string;\r\n strokeMiterlimit: string;\r\n maxWidth: string;\r\n color: string;\r\n clip: string;\r\n borderRightWidth: string;\r\n verticalAlign: string;\r\n overflow: string;\r\n mask: string;\r\n borderLeftStyle: string;\r\n emptyCells: string;\r\n stopOpacity: string;\r\n paddingRight: string;\r\n parentRule: CSSRule;\r\n background: string;\r\n boxSizing: string;\r\n textJustify: string;\r\n height: string;\r\n paddingTop: string;\r\n length: number;\r\n right: string;\r\n baselineShift: string;\r\n borderLeft: string;\r\n widows: string;\r\n lineHeight: string;\r\n left: string;\r\n textUnderlinePosition: string;\r\n glyphOrientationHorizontal: string;\r\n display: string;\r\n textAnchor: string;\r\n cssFloat: string;\r\n strokeDasharray: string;\r\n rubyAlign: string;\r\n fontSizeAdjust: string;\r\n borderLeftColor: string;\r\n backgroundImage: string;\r\n listStyleType: string;\r\n strokeWidth: string;\r\n textOverflow: string;\r\n fillRule: string;\r\n borderBottomColor: string;\r\n zIndex: string;\r\n position: string;\r\n listStyle: string;\r\n msTransformOrigin: string;\r\n dominantBaseline: string;\r\n overflowY: string;\r\n fill: string;\r\n captionSide: string;\r\n borderCollapse: string;\r\n boxShadow: string;\r\n quotes: string;\r\n tableLayout: string;\r\n unicodeBidi: string;\r\n borderBottomWidth: string;\r\n backgroundSize: string;\r\n textDecoration: string;\r\n strokeDashoffset: string;\r\n fontSize: string;\r\n border: string;\r\n pageBreakBefore: string;\r\n borderTopRightRadius: string;\r\n msTransform: string;\r\n borderBottomLeftRadius: string;\r\n textTransform: string;\r\n rubyPosition: string;\r\n strokeLinejoin: string;\r\n clipPath: string;\r\n borderRightColor: string;\r\n fontFamily: string;\r\n clear: string;\r\n content: string;\r\n backgroundClip: string;\r\n marginBottom: string;\r\n counterReset: string;\r\n outlineWidth: string;\r\n marginRight: string;\r\n paddingLeft: string;\r\n borderBottom: string;\r\n wordBreak: string;\r\n marginTop: string;\r\n top: string;\r\n fontWeight: string;\r\n borderRight: string;\r\n width: string;\r\n kerning: string;\r\n pageBreakAfter: string;\r\n borderBottomStyle: string;\r\n fontStretch: string;\r\n padding: string;\r\n strokeOpacity: string;\r\n markerStart: string;\r\n bottom: string;\r\n borderLeftWidth: string;\r\n clipRule: string;\r\n backgroundPosition: string;\r\n backgroundColor: string;\r\n pageBreakInside: string;\r\n backgroundOrigin: string;\r\n strokeLinecap: string;\r\n borderTopWidth: string;\r\n outlineStyle: string;\r\n borderTop: string;\r\n outlineColor: string;\r\n paddingBottom: string;\r\n marginLeft: string;\r\n font: string;\r\n outline: string;\r\n wordSpacing: string;\r\n maxHeight: string;\r\n fillOpacity: string;\r\n letterSpacing: string;\r\n borderSpacing: string;\r\n backgroundRepeat: string;\r\n borderRadius: string;\r\n borderWidth: string;\r\n borderBottomRightRadius: string;\r\n whiteSpace: string;\r\n fontStyle: string;\r\n minWidth: string;\r\n stopColor: string;\r\n borderTopLeftRadius: string;\r\n borderColor: string;\r\n marker: string;\r\n glyphOrientationVertical: string;\r\n markerMid: string;\r\n fontVariant: string;\r\n minHeight: string;\r\n stroke: string;\r\n rubyOverhang: string;\r\n overflowX: string;\r\n textAlign: string;\r\n margin: string;\r\n getPropertyPriority(propertyName: string): string;\r\n getPropertyValue(propertyName: string): string;\r\n removeProperty(propertyName: string): string;\r\n item(index: number): string;\r\n [index: number]: string;\r\n setProperty(propertyName: string, value: string, priority?: string): void;\r\n}\r\ndeclare var CSSStyleDeclaration: {\r\n prototype: CSSStyleDeclaration;\r\n new (): CSSStyleDeclaration;\r\n}\r\n\r\ninterface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n}\r\ndeclare var SVGGElement: {\r\n prototype: SVGGElement;\r\n new (): SVGGElement;\r\n}\r\n\r\ninterface MSStyleCSSProperties extends MSCSSProperties {\r\n pixelWidth: number;\r\n posHeight: number;\r\n posLeft: number;\r\n pixelTop: number;\r\n pixelBottom: number;\r\n textDecorationNone: boolean;\r\n pixelLeft: number;\r\n posTop: number;\r\n posBottom: number;\r\n textDecorationOverline: boolean;\r\n posWidth: number;\r\n textDecorationLineThrough: boolean;\r\n pixelHeight: number;\r\n textDecorationBlink: boolean;\r\n posRight: number;\r\n pixelRight: number;\r\n textDecorationUnderline: boolean;\r\n}\r\ndeclare var MSStyleCSSProperties: {\r\n prototype: MSStyleCSSProperties;\r\n new (): MSStyleCSSProperties;\r\n}\r\n\r\ninterface Navigator extends NavigatorID, NavigatorOnLine, NavigatorContentUtils, MSNavigatorExtensions, NavigatorGeolocation, MSNavigatorDoNotTrack, NavigatorStorageUtils {\r\n}\r\ndeclare var Navigator: {\r\n prototype: Navigator;\r\n new (): Navigator;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {\r\n y: number;\r\n x2: number;\r\n x: number;\r\n y2: number;\r\n}\r\ndeclare var SVGPathSegCurvetoCubicSmoothAbs: {\r\n prototype: SVGPathSegCurvetoCubicSmoothAbs;\r\n new (): SVGPathSegCurvetoCubicSmoothAbs;\r\n}\r\n\r\ninterface SVGZoomEvent extends UIEvent {\r\n zoomRectScreen: SVGRect;\r\n previousScale: number;\r\n newScale: number;\r\n previousTranslate: SVGPoint;\r\n newTranslate: SVGPoint;\r\n}\r\ndeclare var SVGZoomEvent: {\r\n prototype: SVGZoomEvent;\r\n new (): SVGZoomEvent;\r\n}\r\n\r\ninterface NodeSelector {\r\n querySelectorAll(selectors: string): NodeList;\r\n querySelector(selectors: string): Element;\r\n}\r\n\r\ninterface HTMLTableDataCellElement extends HTMLTableCellElement {\r\n}\r\ndeclare var HTMLTableDataCellElement: {\r\n prototype: HTMLTableDataCellElement;\r\n new (): HTMLTableDataCellElement;\r\n}\r\n\r\ninterface HTMLBaseElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Gets or sets the baseline URL on which relative links are based.\r\n */\r\n href: string;\r\n}\r\ndeclare var HTMLBaseElement: {\r\n prototype: HTMLBaseElement;\r\n new (): HTMLBaseElement;\r\n}\r\n\r\ninterface ClientRect {\r\n left: number;\r\n width: number;\r\n right: number;\r\n top: number;\r\n bottom: number;\r\n height: number;\r\n}\r\ndeclare var ClientRect: {\r\n prototype: ClientRect;\r\n new (): ClientRect;\r\n}\r\n\r\ninterface PositionErrorCallback {\r\n (error: PositionError): void;\r\n}\r\n\r\ninterface DOMImplementation {\r\n createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;\r\n createDocument(namespaceURI: string, qualifiedName: string, doctype: DocumentType): Document;\r\n hasFeature(feature: string, version?: string): boolean;\r\n createHTMLDocument(title: string): Document;\r\n}\r\ndeclare var DOMImplementation: {\r\n prototype: DOMImplementation;\r\n new (): DOMImplementation;\r\n}\r\n\r\ninterface SVGUnitTypes {\r\n SVG_UNIT_TYPE_UNKNOWN: number;\r\n SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;\r\n SVG_UNIT_TYPE_USERSPACEONUSE: number;\r\n}\r\ndeclare var SVGUnitTypes: {\r\n prototype: SVGUnitTypes;\r\n new (): SVGUnitTypes;\r\n SVG_UNIT_TYPE_UNKNOWN: number;\r\n SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;\r\n SVG_UNIT_TYPE_USERSPACEONUSE: number;\r\n}\r\n\r\ninterface Element extends Node, NodeSelector, ElementTraversal {\r\n scrollTop: number;\r\n clientLeft: number;\r\n scrollLeft: number;\r\n tagName: string;\r\n clientWidth: number;\r\n scrollWidth: number;\r\n clientHeight: number;\r\n clientTop: number;\r\n scrollHeight: number;\r\n getAttribute(name?: string): string;\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList;\r\n hasAttributeNS(namespaceURI: string, localName: string): boolean;\r\n getBoundingClientRect(): ClientRect;\r\n getAttributeNS(namespaceURI: string, localName: string): string;\r\n getAttributeNodeNS(namespaceURI: string, localName: string): Attr;\r\n setAttributeNodeNS(newAttr: Attr): Attr;\r\n msMatchesSelector(selectors: string): boolean;\r\n hasAttribute(name: string): boolean;\r\n removeAttribute(name?: string): void;\r\n setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;\r\n getAttributeNode(name: string): Attr;\r\n fireEvent(eventName: string, eventObj?: any): boolean;\r\n getElementsByTagName(name: "a"): NodeListOf;\r\n getElementsByTagName(name: "abbr"): NodeListOf;\r\n getElementsByTagName(name: "address"): NodeListOf;\r\n getElementsByTagName(name: "area"): NodeListOf;\r\n getElementsByTagName(name: "article"): NodeListOf;\r\n getElementsByTagName(name: "aside"): NodeListOf;\r\n getElementsByTagName(name: "audio"): NodeListOf;\r\n getElementsByTagName(name: "b"): NodeListOf;\r\n getElementsByTagName(name: "base"): NodeListOf;\r\n getElementsByTagName(name: "bdi"): NodeListOf;\r\n getElementsByTagName(name: "bdo"): NodeListOf;\r\n getElementsByTagName(name: "blockquote"): NodeListOf;\r\n getElementsByTagName(name: "body"): NodeListOf;\r\n getElementsByTagName(name: "br"): NodeListOf;\r\n getElementsByTagName(name: "button"): NodeListOf;\r\n getElementsByTagName(name: "canvas"): NodeListOf;\r\n getElementsByTagName(name: "caption"): NodeListOf;\r\n getElementsByTagName(name: "cite"): NodeListOf;\r\n getElementsByTagName(name: "code"): NodeListOf;\r\n getElementsByTagName(name: "col"): NodeListOf;\r\n getElementsByTagName(name: "colgroup"): NodeListOf;\r\n getElementsByTagName(name: "datalist"): NodeListOf;\r\n getElementsByTagName(name: "dd"): NodeListOf;\r\n getElementsByTagName(name: "del"): NodeListOf;\r\n getElementsByTagName(name: "dfn"): NodeListOf;\r\n getElementsByTagName(name: "div"): NodeListOf;\r\n getElementsByTagName(name: "dl"): NodeListOf;\r\n getElementsByTagName(name: "dt"): NodeListOf;\r\n getElementsByTagName(name: "em"): NodeListOf;\r\n getElementsByTagName(name: "embed"): NodeListOf;\r\n getElementsByTagName(name: "fieldset"): NodeListOf;\r\n getElementsByTagName(name: "figcaption"): NodeListOf;\r\n getElementsByTagName(name: "figure"): NodeListOf;\r\n getElementsByTagName(name: "footer"): NodeListOf;\r\n getElementsByTagName(name: "form"): NodeListOf;\r\n getElementsByTagName(name: "h1"): NodeListOf;\r\n getElementsByTagName(name: "h2"): NodeListOf;\r\n getElementsByTagName(name: "h3"): NodeListOf;\r\n getElementsByTagName(name: "h4"): NodeListOf;\r\n getElementsByTagName(name: "h5"): NodeListOf;\r\n getElementsByTagName(name: "h6"): NodeListOf;\r\n getElementsByTagName(name: "head"): NodeListOf;\r\n getElementsByTagName(name: "header"): NodeListOf;\r\n getElementsByTagName(name: "hgroup"): NodeListOf;\r\n getElementsByTagName(name: "hr"): NodeListOf;\r\n getElementsByTagName(name: "html"): NodeListOf;\r\n getElementsByTagName(name: "i"): NodeListOf;\r\n getElementsByTagName(name: "iframe"): NodeListOf;\r\n getElementsByTagName(name: "img"): NodeListOf;\r\n getElementsByTagName(name: "input"): NodeListOf;\r\n getElementsByTagName(name: "ins"): NodeListOf;\r\n getElementsByTagName(name: "kbd"): NodeListOf;\r\n getElementsByTagName(name: "label"): NodeListOf;\r\n getElementsByTagName(name: "legend"): NodeListOf;\r\n getElementsByTagName(name: "li"): NodeListOf;\r\n getElementsByTagName(name: "link"): NodeListOf;\r\n getElementsByTagName(name: "main"): NodeListOf;\r\n getElementsByTagName(name: "map"): NodeListOf;\r\n getElementsByTagName(name: "mark"): NodeListOf;\r\n getElementsByTagName(name: "menu"): NodeListOf;\r\n getElementsByTagName(name: "meta"): NodeListOf;\r\n getElementsByTagName(name: "nav"): NodeListOf;\r\n getElementsByTagName(name: "noscript"): NodeListOf;\r\n getElementsByTagName(name: "object"): NodeListOf;\r\n getElementsByTagName(name: "ol"): NodeListOf;\r\n getElementsByTagName(name: "optgroup"): NodeListOf;\r\n getElementsByTagName(name: "option"): NodeListOf;\r\n getElementsByTagName(name: "p"): NodeListOf;\r\n getElementsByTagName(name: "param"): NodeListOf;\r\n getElementsByTagName(name: "pre"): NodeListOf;\r\n getElementsByTagName(name: "progress"): NodeListOf;\r\n getElementsByTagName(name: "q"): NodeListOf;\r\n getElementsByTagName(name: "rp"): NodeListOf;\r\n getElementsByTagName(name: "rt"): NodeListOf;\r\n getElementsByTagName(name: "ruby"): NodeListOf;\r\n getElementsByTagName(name: "s"): NodeListOf;\r\n getElementsByTagName(name: "samp"): NodeListOf;\r\n getElementsByTagName(name: "script"): NodeListOf;\r\n getElementsByTagName(name: "section"): NodeListOf;\r\n getElementsByTagName(name: "select"): NodeListOf;\r\n getElementsByTagName(name: "small"): NodeListOf;\r\n getElementsByTagName(name: "source"): NodeListOf;\r\n getElementsByTagName(name: "span"): NodeListOf;\r\n getElementsByTagName(name: "strong"): NodeListOf;\r\n getElementsByTagName(name: "style"): NodeListOf;\r\n getElementsByTagName(name: "sub"): NodeListOf;\r\n getElementsByTagName(name: "summary"): NodeListOf;\r\n getElementsByTagName(name: "sup"): NodeListOf;\r\n getElementsByTagName(name: "table"): NodeListOf;\r\n getElementsByTagName(name: "tbody"): NodeListOf;\r\n getElementsByTagName(name: "td"): NodeListOf;\r\n getElementsByTagName(name: "textarea"): NodeListOf;\r\n getElementsByTagName(name: "tfoot"): NodeListOf;\r\n getElementsByTagName(name: "th"): NodeListOf;\r\n getElementsByTagName(name: "thead"): NodeListOf;\r\n getElementsByTagName(name: "title"): NodeListOf;\r\n getElementsByTagName(name: "tr"): NodeListOf;\r\n getElementsByTagName(name: "track"): NodeListOf;\r\n getElementsByTagName(name: "u"): NodeListOf;\r\n getElementsByTagName(name: "ul"): NodeListOf;\r\n getElementsByTagName(name: "var"): NodeListOf;\r\n getElementsByTagName(name: "video"): NodeListOf;\r\n getElementsByTagName(name: "wbr"): NodeListOf;\r\n getElementsByTagName(name: string): NodeList;\r\n getClientRects(): ClientRectList;\r\n setAttributeNode(newAttr: Attr): Attr;\r\n removeAttributeNode(oldAttr: Attr): Attr;\r\n setAttribute(name?: string, value?: string): void;\r\n removeAttributeNS(namespaceURI: string, localName: string): void;\r\n}\r\ndeclare var Element: {\r\n prototype: Element;\r\n new (): Element;\r\n}\r\n\r\ninterface HTMLNextIdElement extends HTMLElement {\r\n n: string;\r\n}\r\ndeclare var HTMLNextIdElement: {\r\n prototype: HTMLNextIdElement;\r\n new (): HTMLNextIdElement;\r\n}\r\n\r\ninterface SVGPathSegMovetoRel extends SVGPathSeg {\r\n y: number;\r\n x: number;\r\n}\r\ndeclare var SVGPathSegMovetoRel: {\r\n prototype: SVGPathSegMovetoRel;\r\n new (): SVGPathSegMovetoRel;\r\n}\r\n\r\ninterface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n y1: SVGAnimatedLength;\r\n x2: SVGAnimatedLength;\r\n x1: SVGAnimatedLength;\r\n y2: SVGAnimatedLength;\r\n}\r\ndeclare var SVGLineElement: {\r\n prototype: SVGLineElement;\r\n new (): SVGLineElement;\r\n}\r\n\r\ninterface HTMLParagraphElement extends HTMLElement, DOML2DeprecatedTextFlowControl {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n}\r\ndeclare var HTMLParagraphElement: {\r\n prototype: HTMLParagraphElement;\r\n new (): HTMLParagraphElement;\r\n}\r\n\r\ninterface HTMLAreasCollection extends HTMLCollection {\r\n /**\r\n * Removes an element from the collection.\r\n */\r\n remove(index?: number): void;\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n */\r\n add(element: HTMLElement, before?: any): void;\r\n}\r\ndeclare var HTMLAreasCollection: {\r\n prototype: HTMLAreasCollection;\r\n new (): HTMLAreasCollection;\r\n}\r\n\r\ninterface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n}\r\ndeclare var SVGDescElement: {\r\n prototype: SVGDescElement;\r\n new (): SVGDescElement;\r\n}\r\n\r\ninterface Node extends EventTarget {\r\n nodeType: number;\r\n previousSibling: Node;\r\n localName: string;\r\n namespaceURI: string;\r\n textContent: string;\r\n parentNode: Node;\r\n nextSibling: Node;\r\n nodeValue: string;\r\n lastChild: Node;\r\n childNodes: NodeList;\r\n nodeName: string;\r\n ownerDocument: Document;\r\n attributes: NamedNodeMap;\r\n firstChild: Node;\r\n prefix: string;\r\n removeChild(oldChild: Node): Node;\r\n appendChild(newChild: Node): Node;\r\n isSupported(feature: string, version: string): boolean;\r\n isEqualNode(arg: Node): boolean;\r\n lookupPrefix(namespaceURI: string): string;\r\n isDefaultNamespace(namespaceURI: string): boolean;\r\n compareDocumentPosition(other: Node): number;\r\n normalize(): void;\r\n isSameNode(other: Node): boolean;\r\n hasAttributes(): boolean;\r\n lookupNamespaceURI(prefix: string): string;\r\n cloneNode(deep?: boolean): Node;\r\n hasChildNodes(): boolean;\r\n replaceChild(newChild: Node, oldChild: Node): Node;\r\n insertBefore(newChild: Node, refChild?: Node): Node;\r\n ENTITY_REFERENCE_NODE: number;\r\n ATTRIBUTE_NODE: number;\r\n DOCUMENT_FRAGMENT_NODE: number;\r\n TEXT_NODE: number;\r\n ELEMENT_NODE: number;\r\n COMMENT_NODE: number;\r\n DOCUMENT_POSITION_DISCONNECTED: number;\r\n DOCUMENT_POSITION_CONTAINED_BY: number;\r\n DOCUMENT_POSITION_CONTAINS: number;\r\n DOCUMENT_TYPE_NODE: number;\r\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n DOCUMENT_NODE: number;\r\n ENTITY_NODE: number;\r\n PROCESSING_INSTRUCTION_NODE: number;\r\n CDATA_SECTION_NODE: number;\r\n NOTATION_NODE: number;\r\n DOCUMENT_POSITION_FOLLOWING: number;\r\n DOCUMENT_POSITION_PRECEDING: number;\r\n}\r\ndeclare var Node: {\r\n prototype: Node;\r\n new (): Node;\r\n ENTITY_REFERENCE_NODE: number;\r\n ATTRIBUTE_NODE: number;\r\n DOCUMENT_FRAGMENT_NODE: number;\r\n TEXT_NODE: number;\r\n ELEMENT_NODE: number;\r\n COMMENT_NODE: number;\r\n DOCUMENT_POSITION_DISCONNECTED: number;\r\n DOCUMENT_POSITION_CONTAINED_BY: number;\r\n DOCUMENT_POSITION_CONTAINS: number;\r\n DOCUMENT_TYPE_NODE: number;\r\n DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;\r\n DOCUMENT_NODE: number;\r\n ENTITY_NODE: number;\r\n PROCESSING_INSTRUCTION_NODE: number;\r\n CDATA_SECTION_NODE: number;\r\n NOTATION_NODE: number;\r\n DOCUMENT_POSITION_FOLLOWING: number;\r\n DOCUMENT_POSITION_PRECEDING: number;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {\r\n y: number;\r\n x: number;\r\n}\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothRel: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothRel;\r\n new (): SVGPathSegCurvetoQuadraticSmoothRel;\r\n}\r\n\r\ninterface DOML2DeprecatedListSpaceReduction {\r\n compact: boolean;\r\n}\r\n\r\ninterface MSScriptHost {\r\n}\r\ndeclare var MSScriptHost: {\r\n prototype: MSScriptHost;\r\n new (): MSScriptHost;\r\n}\r\n\r\ninterface SVGClipPathElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n clipPathUnits: SVGAnimatedEnumeration;\r\n}\r\ndeclare var SVGClipPathElement: {\r\n prototype: SVGClipPathElement;\r\n new (): SVGClipPathElement;\r\n}\r\n\r\ninterface MouseEvent extends UIEvent {\r\n toElement: Element;\r\n layerY: number;\r\n fromElement: Element;\r\n which: number;\r\n pageX: number;\r\n offsetY: number;\r\n x: number;\r\n y: number;\r\n metaKey: boolean;\r\n altKey: boolean;\r\n ctrlKey: boolean;\r\n offsetX: number;\r\n screenX: number;\r\n clientY: number;\r\n shiftKey: boolean;\r\n layerX: number;\r\n screenY: number;\r\n relatedTarget: EventTarget;\r\n button: number;\r\n pageY: number;\r\n buttons: number;\r\n clientX: number;\r\n initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;\r\n getModifierState(keyArg: string): boolean;\r\n}\r\ndeclare var MouseEvent: {\r\n prototype: MouseEvent;\r\n new (): MouseEvent;\r\n}\r\n\r\ninterface RangeException {\r\n code: number;\r\n message: string;\r\n toString(): string;\r\n INVALID_NODE_TYPE_ERR: number;\r\n BAD_BOUNDARYPOINTS_ERR: number;\r\n}\r\ndeclare var RangeException: {\r\n prototype: RangeException;\r\n new (): RangeException;\r\n INVALID_NODE_TYPE_ERR: number;\r\n BAD_BOUNDARYPOINTS_ERR: number;\r\n}\r\n\r\ninterface SVGTextPositioningElement extends SVGTextContentElement {\r\n y: SVGAnimatedLengthList;\r\n rotate: SVGAnimatedNumberList;\r\n dy: SVGAnimatedLengthList;\r\n x: SVGAnimatedLengthList;\r\n dx: SVGAnimatedLengthList;\r\n}\r\ndeclare var SVGTextPositioningElement: {\r\n prototype: SVGTextPositioningElement;\r\n new (): SVGTextPositioningElement;\r\n}\r\n\r\ninterface HTMLAppletElement extends HTMLElement, DOML2DeprecatedMarginStyle, DOML2DeprecatedBorderStyle, DOML2DeprecatedAlignmentStyle, MSDataBindingExtensions, MSDataBindingRecordSetExtensions {\r\n width: number;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n object: string;\r\n form: HTMLFormElement;\r\n code: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Sets or retrieves the class identifier for the object.\r\n */\r\n classid: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.\r\n */\r\n declare: boolean;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n BaseHref: string;\r\n}\r\ndeclare var HTMLAppletElement: {\r\n prototype: HTMLAppletElement;\r\n new (): HTMLAppletElement;\r\n}\r\n\r\ninterface TextMetrics {\r\n width: number;\r\n}\r\ndeclare var TextMetrics: {\r\n prototype: TextMetrics;\r\n new (): TextMetrics;\r\n}\r\n\r\ninterface DocumentEvent {\r\n createEvent(eventInterface: string): Event;\r\n}\r\n\r\ninterface HTMLOListElement extends HTMLElement, DOML2DeprecatedListSpaceReduction, DOML2DeprecatedListNumberingAndBulletStyle {\r\n /**\r\n * The starting number.\r\n */\r\n start: number;\r\n}\r\ndeclare var HTMLOListElement: {\r\n prototype: HTMLOListElement;\r\n new (): HTMLOListElement;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalRel extends SVGPathSeg {\r\n y: number;\r\n}\r\ndeclare var SVGPathSegLinetoVerticalRel: {\r\n prototype: SVGPathSegLinetoVerticalRel;\r\n new (): SVGPathSegLinetoVerticalRel;\r\n}\r\n\r\ninterface SVGAnimatedString {\r\n animVal: string;\r\n baseVal: string;\r\n}\r\ndeclare var SVGAnimatedString: {\r\n prototype: SVGAnimatedString;\r\n new (): SVGAnimatedString;\r\n}\r\n\r\ninterface CDATASection extends Text {\r\n}\r\ndeclare var CDATASection: {\r\n prototype: CDATASection;\r\n new (): CDATASection;\r\n}\r\n\r\ninterface StyleMedia {\r\n type: string;\r\n matchMedium(mediaquery: string): boolean;\r\n}\r\ndeclare var StyleMedia: {\r\n prototype: StyleMedia;\r\n new (): StyleMedia;\r\n}\r\n\r\ninterface HTMLSelectElement extends HTMLElement, MSHTMLCollectionExtensions, MSDataBindingExtensions {\r\n options: HTMLSelectElement;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the number of rows in the list box. \r\n */\r\n size: number;\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Sets or retrieves the index of the selected option in a select object.\r\n */\r\n selectedIndex: number;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Retrieves the type of select control based on the value of the MULTIPLE attribute.\r\n */\r\n type: string;\r\n /**\r\n * Removes an element from the collection.\r\n * @param index Number that specifies the zero-based index of the element to remove from the collection.\r\n */\r\n remove(index?: number): void;\r\n /**\r\n * Adds an element to the areas, controlRange, or options collection.\r\n * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.\r\n * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. \r\n */\r\n add(element: HTMLElement, before?: any): void;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.\r\n */\r\n namedItem(name: string): any;\r\n [name: string]: any;\r\n}\r\ndeclare var HTMLSelectElement: {\r\n prototype: HTMLSelectElement;\r\n new (): HTMLSelectElement;\r\n}\r\n\r\ninterface TextRange {\r\n boundingLeft: number;\r\n htmlText: string;\r\n offsetLeft: number;\r\n boundingWidth: number;\r\n boundingHeight: number;\r\n boundingTop: number;\r\n text: string;\r\n offsetTop: number;\r\n moveToPoint(x: number, y: number): void;\r\n queryCommandValue(cmdID: string): any;\r\n getBookmark(): string;\r\n move(unit: string, count?: number): number;\r\n queryCommandIndeterm(cmdID: string): boolean;\r\n scrollIntoView(fStart?: boolean): void;\r\n findText(string: string, count?: number, flags?: number): boolean;\r\n execCommand(cmdID: string, showUI?: boolean, value?: any): boolean;\r\n getBoundingClientRect(): ClientRect;\r\n moveToBookmark(bookmark: string): boolean;\r\n isEqual(range: TextRange): boolean;\r\n duplicate(): TextRange;\r\n collapse(start?: boolean): void;\r\n queryCommandText(cmdID: string): string;\r\n select(): void;\r\n pasteHTML(html: string): void;\r\n inRange(range: TextRange): boolean;\r\n moveEnd(unit: string, count?: number): number;\r\n getClientRects(): ClientRectList;\r\n moveStart(unit: string, count?: number): number;\r\n parentElement(): Element;\r\n queryCommandState(cmdID: string): boolean;\r\n compareEndPoints(how: string, sourceRange: TextRange): number;\r\n execCommandShowHelp(cmdID: string): boolean;\r\n moveToElementText(element: Element): void;\r\n expand(Unit: string): boolean;\r\n queryCommandSupported(cmdID: string): boolean;\r\n setEndPoint(how: string, SourceRange: TextRange): void;\r\n queryCommandEnabled(cmdID: string): boolean;\r\n}\r\ndeclare var TextRange: {\r\n prototype: TextRange;\r\n new (): TextRange;\r\n}\r\n\r\ninterface SVGTests {\r\n requiredFeatures: SVGStringList;\r\n requiredExtensions: SVGStringList;\r\n systemLanguage: SVGStringList;\r\n hasExtension(extension: string): boolean;\r\n}\r\n\r\ninterface HTMLBlockElement extends HTMLElement, DOML2DeprecatedTextFlowControl {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n}\r\ndeclare var HTMLBlockElement: {\r\n prototype: HTMLBlockElement;\r\n new (): HTMLBlockElement;\r\n}\r\n\r\ninterface CSSStyleSheet extends StyleSheet {\r\n owningElement: Element;\r\n imports: StyleSheetList;\r\n isAlternate: boolean;\r\n rules: MSCSSRuleList;\r\n isPrefAlternate: boolean;\r\n readOnly: boolean;\r\n cssText: string;\r\n ownerRule: CSSRule;\r\n href: string;\r\n cssRules: CSSRuleList;\r\n id: string;\r\n pages: StyleSheetPageList;\r\n addImport(bstrURL: string, lIndex?: number): number;\r\n addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;\r\n insertRule(rule: string, index?: number): number;\r\n removeRule(lIndex: number): void;\r\n deleteRule(index?: number): void;\r\n addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;\r\n removeImport(lIndex: number): void;\r\n}\r\ndeclare var CSSStyleSheet: {\r\n prototype: CSSStyleSheet;\r\n new (): CSSStyleSheet;\r\n}\r\n\r\ninterface MSSelection {\r\n type: string;\r\n typeDetail: string;\r\n createRange(): TextRange;\r\n clear(): void;\r\n createRangeCollection(): TextRangeCollection;\r\n empty(): void;\r\n}\r\ndeclare var MSSelection: {\r\n prototype: MSSelection;\r\n new (): MSSelection;\r\n}\r\n\r\ninterface HTMLMetaElement extends HTMLElement {\r\n /**\r\n * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.\r\n */\r\n httpEquiv: string;\r\n /**\r\n * Sets or retrieves the value specified in the content attribute of the meta object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets meta-information to associate with httpEquiv or name.\r\n */\r\n content: string;\r\n /**\r\n * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. \r\n */\r\n url: string;\r\n /**\r\n * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.\r\n */\r\n scheme: string;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n}\r\ndeclare var HTMLMetaElement: {\r\n prototype: HTMLMetaElement;\r\n new (): HTMLMetaElement;\r\n}\r\n\r\ninterface SVGPatternElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGTests, SVGFitToViewBox, SVGExternalResourcesRequired, SVGURIReference {\r\n patternUnits: SVGAnimatedEnumeration;\r\n y: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n patternContentUnits: SVGAnimatedEnumeration;\r\n patternTransform: SVGAnimatedTransformList;\r\n height: SVGAnimatedLength;\r\n}\r\ndeclare var SVGPatternElement: {\r\n prototype: SVGPatternElement;\r\n new (): SVGPatternElement;\r\n}\r\n\r\ninterface SVGAnimatedAngle {\r\n animVal: SVGAngle;\r\n baseVal: SVGAngle;\r\n}\r\ndeclare var SVGAnimatedAngle: {\r\n prototype: SVGAnimatedAngle;\r\n new (): SVGAnimatedAngle;\r\n}\r\n\r\ninterface Selection {\r\n isCollapsed: boolean;\r\n anchorNode: Node;\r\n focusNode: Node;\r\n anchorOffset: number;\r\n focusOffset: number;\r\n rangeCount: number;\r\n addRange(range: Range): void;\r\n collapseToEnd(): void;\r\n toString(): string;\r\n selectAllChildren(parentNode: Node): void;\r\n getRangeAt(index: number): Range;\r\n collapse(parentNode: Node, offset: number): void;\r\n removeAllRanges(): void;\r\n collapseToStart(): void;\r\n deleteFromDocument(): void;\r\n removeRange(range: Range): void;\r\n}\r\ndeclare var Selection: {\r\n prototype: Selection;\r\n new (): Selection;\r\n}\r\n\r\ninterface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {\r\n type: string;\r\n}\r\ndeclare var SVGScriptElement: {\r\n prototype: SVGScriptElement;\r\n new (): SVGScriptElement;\r\n}\r\n\r\ninterface HTMLDDElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\ndeclare var HTMLDDElement: {\r\n prototype: HTMLDDElement;\r\n new (): HTMLDDElement;\r\n}\r\n\r\ninterface MSDataBindingRecordSetReadonlyExtensions {\r\n recordset: Object;\r\n namedRecordset(dataMember: string, hierarchy?: any): Object;\r\n}\r\n\r\ninterface CSSStyleRule extends CSSRule {\r\n selectorText: string;\r\n style: MSStyleCSSProperties;\r\n readOnly: boolean;\r\n}\r\ndeclare var CSSStyleRule: {\r\n prototype: CSSStyleRule;\r\n new (): CSSStyleRule;\r\n}\r\n\r\ninterface NodeIterator {\r\n whatToShow: number;\r\n filter: NodeFilter;\r\n root: Node;\r\n expandEntityReferences: boolean;\r\n nextNode(): Node;\r\n detach(): void;\r\n previousNode(): Node;\r\n}\r\ndeclare var NodeIterator: {\r\n prototype: NodeIterator;\r\n new (): NodeIterator;\r\n}\r\n\r\ninterface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox, SVGExternalResourcesRequired {\r\n viewTarget: SVGStringList;\r\n}\r\ndeclare var SVGViewElement: {\r\n prototype: SVGViewElement;\r\n new (): SVGViewElement;\r\n}\r\n\r\ninterface HTMLLinkElement extends HTMLElement, LinkStyle {\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n}\r\ndeclare var HTMLLinkElement: {\r\n prototype: HTMLLinkElement;\r\n new (): HTMLLinkElement;\r\n}\r\n\r\ninterface SVGLocatable {\r\n farthestViewportElement: SVGElement;\r\n nearestViewportElement: SVGElement;\r\n getBBox(): SVGRect;\r\n getTransformToElement(element: SVGElement): SVGMatrix;\r\n getCTM(): SVGMatrix;\r\n getScreenCTM(): SVGMatrix;\r\n}\r\n\r\ninterface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n}\r\ndeclare var HTMLFontElement: {\r\n prototype: HTMLFontElement;\r\n new (): HTMLFontElement;\r\n}\r\n\r\ninterface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {\r\n}\r\ndeclare var SVGTitleElement: {\r\n prototype: SVGTitleElement;\r\n new (): SVGTitleElement;\r\n}\r\n\r\ninterface ControlRangeCollection {\r\n length: number;\r\n queryCommandValue(cmdID: string): any;\r\n remove(index: number): void;\r\n add(item: Element): void;\r\n queryCommandIndeterm(cmdID: string): boolean;\r\n scrollIntoView(varargStart?: any): void;\r\n item(index: number): Element;\r\n [index: number]: Element;\r\n execCommand(cmdID: string, showUI?: boolean, value?: any): boolean;\r\n addElement(item: Element): void;\r\n queryCommandState(cmdID: string): boolean;\r\n queryCommandSupported(cmdID: string): boolean;\r\n queryCommandEnabled(cmdID: string): boolean;\r\n queryCommandText(cmdID: string): string;\r\n select(): void;\r\n}\r\ndeclare var ControlRangeCollection: {\r\n prototype: ControlRangeCollection;\r\n new (): ControlRangeCollection;\r\n}\r\n\r\ninterface MSNamespaceInfo extends MSEventAttachmentTarget {\r\n urn: string;\r\n onreadystatechange: (ev: Event) => any;\r\n addEventListener(type: "readystatechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n name: string;\r\n readyState: string;\r\n doImport(implementationUrl: string): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var MSNamespaceInfo: {\r\n prototype: MSNamespaceInfo;\r\n new (): MSNamespaceInfo;\r\n}\r\n\r\ninterface WindowSessionStorage {\r\n sessionStorage: Storage;\r\n}\r\n\r\ninterface SVGAnimatedTransformList {\r\n animVal: SVGTransformList;\r\n baseVal: SVGTransformList;\r\n}\r\ndeclare var SVGAnimatedTransformList: {\r\n prototype: SVGAnimatedTransformList;\r\n new (): SVGAnimatedTransformList;\r\n}\r\n\r\ninterface HTMLTableCaptionElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the alignment of the caption or legend.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the caption appears at the top or bottom of the table.\r\n */\r\n vAlign: string;\r\n}\r\ndeclare var HTMLTableCaptionElement: {\r\n prototype: HTMLTableCaptionElement;\r\n new (): HTMLTableCaptionElement;\r\n}\r\n\r\ninterface HTMLOptionElement extends HTMLElement, MSDataBindingExtensions {\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n index: number;\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n text: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n create(): HTMLOptionElement;\r\n}\r\ndeclare var HTMLOptionElement: {\r\n prototype: HTMLOptionElement;\r\n new (): HTMLOptionElement;\r\n}\r\n\r\ninterface HTMLMapElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves a collection of the area objects defined for the given map object.\r\n */\r\n areas: HTMLAreasCollection;\r\n}\r\ndeclare var HTMLMapElement: {\r\n prototype: HTMLMapElement;\r\n new (): HTMLMapElement;\r\n}\r\n\r\ninterface HTMLMenuElement extends HTMLElement, DOML2DeprecatedListSpaceReduction {\r\n type: string;\r\n}\r\ndeclare var HTMLMenuElement: {\r\n prototype: HTMLMenuElement;\r\n new (): HTMLMenuElement;\r\n}\r\n\r\ninterface MouseWheelEvent extends MouseEvent {\r\n wheelDelta: number;\r\n initMouseWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, wheelDeltaArg: number): void;\r\n}\r\ndeclare var MouseWheelEvent: {\r\n prototype: MouseWheelEvent;\r\n new (): MouseWheelEvent;\r\n}\r\n\r\ninterface SVGFitToViewBox {\r\n viewBox: SVGAnimatedRect;\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n}\r\n\r\ninterface SVGPointList {\r\n numberOfItems: number;\r\n replaceItem(newItem: SVGPoint, index: number): SVGPoint;\r\n getItem(index: number): SVGPoint;\r\n clear(): void;\r\n appendItem(newItem: SVGPoint): SVGPoint;\r\n initialize(newItem: SVGPoint): SVGPoint;\r\n removeItem(index: number): SVGPoint;\r\n insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;\r\n}\r\ndeclare var SVGPointList: {\r\n prototype: SVGPointList;\r\n new (): SVGPointList;\r\n}\r\n\r\ninterface SVGAnimatedLengthList {\r\n animVal: SVGLengthList;\r\n baseVal: SVGLengthList;\r\n}\r\ndeclare var SVGAnimatedLengthList: {\r\n prototype: SVGAnimatedLengthList;\r\n new (): SVGAnimatedLengthList;\r\n}\r\n\r\ninterface Window extends EventTarget, MSEventAttachmentTarget, WindowLocalStorage, MSWindowExtensions, WindowSessionStorage, WindowTimers {\r\n ondragend: (ev: DragEvent) => any;\r\n addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n ondragover: (ev: DragEvent) => any;\r\n addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n onreset: (ev: Event) => any;\r\n addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onmouseup: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n ondragstart: (ev: DragEvent) => any;\r\n addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n ondrag: (ev: DragEvent) => any;\r\n addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n screenX: number;\r\n onmouseover: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n ondragleave: (ev: DragEvent) => any;\r\n addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n history: History;\r\n pageXOffset: number;\r\n name: string;\r\n onafterprint: (ev: Event) => any;\r\n addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onpause: (ev: Event) => any;\r\n addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onbeforeprint: (ev: Event) => any;\r\n addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n top: Window;\r\n onmousedown: (ev: MouseEvent) => any;\r\n addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onseeked: (ev: Event) => any;\r\n addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n opener: Window;\r\n onclick: (ev: MouseEvent) => any;\r\n addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n innerHeight: number;\r\n onwaiting: (ev: Event) => any;\r\n addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n ononline: (ev: Event) => any;\r\n addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n ondurationchange: (ev: Event) => any;\r\n addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n frames: Window;\r\n onblur: (ev: FocusEvent) => any;\r\n addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n onemptied: (ev: Event) => any;\r\n addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onseeking: (ev: Event) => any;\r\n addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n oncanplay: (ev: Event) => any;\r\n addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n outerWidth: number;\r\n onstalled: (ev: Event) => any;\r\n addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onmousemove: (ev: MouseEvent) => any;\r\n addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n innerWidth: number;\r\n onoffline: (ev: Event) => any;\r\n addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n length: number;\r\n screen: Screen;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n onratechange: (ev: Event) => any;\r\n addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onstorage: (ev: StorageEvent) => any;\r\n addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n onloadstart: (ev: Event) => any;\r\n addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n ondragenter: (ev: DragEvent) => any;\r\n addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onsubmit: (ev: Event) => any;\r\n addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n self: Window;\r\n document: Document;\r\n onprogress: (ev: any) => any;\r\n addEventListener(type: "progress", listener: (ev: any) => any, useCapture?: boolean): void;\r\n ondblclick: (ev: MouseEvent) => any;\r\n addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n pageYOffset: number;\r\n oncontextmenu: (ev: MouseEvent) => any;\r\n addEventListener(type: "contextmenu", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onchange: (ev: Event) => any;\r\n addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onloadedmetadata: (ev: Event) => any;\r\n addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onplay: (ev: Event) => any;\r\n addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onerror: ErrorEventHandler;\r\n onplaying: (ev: Event) => any;\r\n addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n parent: Window;\r\n location: Location;\r\n oncanplaythrough: (ev: Event) => any;\r\n addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onabort: (ev: UIEvent) => any;\r\n addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n onreadystatechange: (ev: Event) => any;\r\n addEventListener(type: "readystatechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n outerHeight: number;\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n frameElement: Element;\r\n onloadeddata: (ev: Event) => any;\r\n addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onsuspend: (ev: Event) => any;\r\n addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n window: Window;\r\n onfocus: (ev: FocusEvent) => any;\r\n addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n onmessage: (ev: MessageEvent) => any;\r\n addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n ontimeupdate: (ev: Event) => any;\r\n addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onresize: (ev: UIEvent) => any;\r\n addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n onselect: (ev: UIEvent) => any;\r\n addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n navigator: Navigator;\r\n styleMedia: StyleMedia;\r\n ondrop: (ev: DragEvent) => any;\r\n addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onmouseout: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onended: (ev: Event) => any;\r\n addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onhashchange: (ev: Event) => any;\r\n addEventListener(type: "hashchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onunload: (ev: Event) => any;\r\n addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onscroll: (ev: UIEvent) => any;\r\n addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n screenY: number;\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onvolumechange: (ev: Event) => any;\r\n addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n oninput: (ev: Event) => any;\r\n addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n performance: Performance;\r\n alert(message?: any): void;\r\n scroll(x?: number, y?: number): void;\r\n focus(): void;\r\n scrollTo(x?: number, y?: number): void;\r\n print(): void;\r\n prompt(message?: string, defaul?: string): string;\r\n toString(): string;\r\n open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\n scrollBy(x?: number, y?: number): void;\r\n confirm(message?: string): boolean;\r\n close(): void;\r\n postMessage(message: any, targetOrigin: string, ports?: any): void;\r\n showModalDialog(url?: string, argument?: any, options?: any): any;\r\n blur(): void;\r\n getSelection(): Selection;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var Window: {\r\n prototype: Window;\r\n new (): Window;\r\n}\r\n\r\ninterface SVGAnimatedPreserveAspectRatio {\r\n animVal: SVGPreserveAspectRatio;\r\n baseVal: SVGPreserveAspectRatio;\r\n}\r\ndeclare var SVGAnimatedPreserveAspectRatio: {\r\n prototype: SVGAnimatedPreserveAspectRatio;\r\n new (): SVGAnimatedPreserveAspectRatio;\r\n}\r\n\r\ninterface MSSiteModeEvent extends Event {\r\n buttonID: number;\r\n actionURL: string;\r\n}\r\ndeclare var MSSiteModeEvent: {\r\n prototype: MSSiteModeEvent;\r\n new (): MSSiteModeEvent;\r\n}\r\n\r\ninterface DOML2DeprecatedTextFlowControl {\r\n clear: string;\r\n}\r\n\r\ninterface StyleSheetPageList {\r\n length: number;\r\n item(index: number): CSSPageRule;\r\n [index: number]: CSSPageRule;\r\n}\r\ndeclare var StyleSheetPageList: {\r\n prototype: StyleSheetPageList;\r\n new (): StyleSheetPageList;\r\n}\r\n\r\ninterface MSCSSProperties extends CSSStyleDeclaration {\r\n scrollbarShadowColor: string;\r\n scrollbarHighlightColor: string;\r\n layoutGridChar: string;\r\n layoutGridType: string;\r\n textAutospace: string;\r\n textKashidaSpace: string;\r\n writingMode: string;\r\n scrollbarFaceColor: string;\r\n backgroundPositionY: string;\r\n lineBreak: string;\r\n imeMode: string;\r\n msBlockProgression: string;\r\n layoutGridLine: string;\r\n scrollbarBaseColor: string;\r\n layoutGrid: string;\r\n layoutFlow: string;\r\n textKashida: string;\r\n filter: string;\r\n zoom: string;\r\n scrollbarArrowColor: string;\r\n behavior: string;\r\n backgroundPositionX: string;\r\n accelerator: string;\r\n layoutGridMode: string;\r\n textJustifyTrim: string;\r\n scrollbar3dLightColor: string;\r\n msInterpolationMode: string;\r\n scrollbarTrackColor: string;\r\n scrollbarDarkShadowColor: string;\r\n styleFloat: string;\r\n getAttribute(attributeName: string, flags?: number): any;\r\n setAttribute(attributeName: string, AttributeValue: any, flags?: number): void;\r\n removeAttribute(attributeName: string, flags?: number): boolean;\r\n}\r\ndeclare var MSCSSProperties: {\r\n prototype: MSCSSProperties;\r\n new (): MSCSSProperties;\r\n}\r\n\r\ninterface HTMLCollection extends MSHTMLCollectionExtensions {\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Retrieves an object from various collections.\r\n */\r\n item(nameOrIndex?: any, optionalIndex?: any): Element;\r\n /**\r\n * Retrieves a select object or an object from an options collection.\r\n */\r\n namedItem(name: string): Element;\r\n [name: number]: Element;\r\n}\r\ndeclare var HTMLCollection: {\r\n prototype: HTMLCollection;\r\n new (): HTMLCollection;\r\n}\r\n\r\ninterface SVGExternalResourcesRequired {\r\n externalResourcesRequired: SVGAnimatedBoolean;\r\n}\r\n\r\ninterface HTMLImageElement extends HTMLElement, MSImageResourceExtensions, MSDataBindingExtensions, MSResourceMetadata {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n naturalHeight: number;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n naturalWidth: number;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: number;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Contains the hypertext reference (HREF) of the URL.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves whether the image is a server-side image map.\r\n */\r\n isMap: boolean;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n complete: boolean;\r\n create(): HTMLImageElement;\r\n}\r\ndeclare var HTMLImageElement: {\r\n prototype: HTMLImageElement;\r\n new (): HTMLImageElement;\r\n}\r\n\r\ninterface HTMLAreaElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the protocol portion of a URL.\r\n */\r\n protocol: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n /**\r\n * Sets or retrieves the host name part of the location or URL. \r\n */\r\n hostname: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Sets or retrieves the file name or path specified by the object.\r\n */\r\n pathname: string;\r\n /**\r\n * Sets or retrieves the hostname and port number of the location or URL.\r\n */\r\n host: string;\r\n /**\r\n * Sets or retrieves the subsection of the href property that follows the number sign (#).\r\n */\r\n hash: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or gets whether clicks in this region cause action.\r\n */\r\n noHref: boolean;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\ndeclare var HTMLAreaElement: {\r\n prototype: HTMLAreaElement;\r\n new (): HTMLAreaElement;\r\n}\r\n\r\ninterface EventTarget {\r\n removeEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n dispatchEvent(evt: Event): boolean;\r\n}\r\n\r\ninterface SVGAngle {\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n value: number;\r\n unitType: number;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n SVG_ANGLETYPE_RAD: number;\r\n SVG_ANGLETYPE_UNKNOWN: number;\r\n SVG_ANGLETYPE_UNSPECIFIED: number;\r\n SVG_ANGLETYPE_DEG: number;\r\n SVG_ANGLETYPE_GRAD: number;\r\n}\r\ndeclare var SVGAngle: {\r\n prototype: SVGAngle;\r\n new (): SVGAngle;\r\n SVG_ANGLETYPE_RAD: number;\r\n SVG_ANGLETYPE_UNKNOWN: number;\r\n SVG_ANGLETYPE_UNSPECIFIED: number;\r\n SVG_ANGLETYPE_DEG: number;\r\n SVG_ANGLETYPE_GRAD: number;\r\n}\r\n\r\ninterface HTMLButtonElement extends HTMLElement, MSDataBindingExtensions {\r\n /** \r\n * Sets or retrieves the default or selected value of the control.\r\n */\r\n value: string;\r\n status: any;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /** \r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets the classification and default behavior of the button.\r\n */\r\n type: string;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n}\r\ndeclare var HTMLButtonElement: {\r\n prototype: HTMLButtonElement;\r\n new (): HTMLButtonElement;\r\n}\r\n\r\ninterface HTMLSourceElement extends HTMLElement {\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n /**\r\n * Gets or sets the intended media type of the media source.\r\n */\r\n media: string;\r\n /**\r\n * Gets or sets the MIME type of a media resource.\r\n */\r\n type: string;\r\n}\r\ndeclare var HTMLSourceElement: {\r\n prototype: HTMLSourceElement;\r\n new (): HTMLSourceElement;\r\n}\r\n\r\ninterface CanvasGradient {\r\n addColorStop(offset: number, color: string): void;\r\n}\r\ndeclare var CanvasGradient: {\r\n prototype: CanvasGradient;\r\n new (): CanvasGradient;\r\n}\r\n\r\ninterface KeyboardEvent extends UIEvent {\r\n location: number;\r\n keyCode: number;\r\n shiftKey: boolean;\r\n which: number;\r\n locale: string;\r\n key: string;\r\n altKey: boolean;\r\n metaKey: boolean;\r\n char: string;\r\n ctrlKey: boolean;\r\n repeat: boolean;\r\n charCode: number;\r\n getModifierState(keyArg: string): boolean;\r\n initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;\r\n DOM_KEY_LOCATION_RIGHT: number;\r\n DOM_KEY_LOCATION_STANDARD: number;\r\n DOM_KEY_LOCATION_LEFT: number;\r\n DOM_KEY_LOCATION_NUMPAD: number;\r\n DOM_KEY_LOCATION_JOYSTICK: number;\r\n DOM_KEY_LOCATION_MOBILE: number;\r\n}\r\ndeclare var KeyboardEvent: {\r\n prototype: KeyboardEvent;\r\n new (): KeyboardEvent;\r\n DOM_KEY_LOCATION_RIGHT: number;\r\n DOM_KEY_LOCATION_STANDARD: number;\r\n DOM_KEY_LOCATION_LEFT: number;\r\n DOM_KEY_LOCATION_NUMPAD: number;\r\n DOM_KEY_LOCATION_JOYSTICK: number;\r\n DOM_KEY_LOCATION_MOBILE: number;\r\n}\r\n\r\ninterface Document extends Node, NodeSelector, MSEventAttachmentTarget, DocumentEvent, MSResourceMetadata, MSNodeExtensions {\r\n /**\r\n * Retrieves the collection of user agents and versions declared in the X-UA-Compatible\r\n */\r\n compatible: MSCompatibleInfoCollection;\r\n /**\r\n * Fires when the user presses a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n /**\r\n * Fires when the user releases a key.\r\n * @param ev The keyboard event\r\n */\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets the implementation object of the current document. \r\n */\r\n implementation: DOMImplementation;\r\n /**\r\n * Fires when the user resets a form. \r\n * @param ev The event.\r\n */\r\n onreset: (ev: Event) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Retrieves a collection of all script objects in the document.\r\n */\r\n scripts: HTMLCollection;\r\n\r\n /**\r\n * Fires when the user presses the F1 key while the browser is the active window. \r\n * @param ev The event.\r\n */\r\n onhelp: (ev: Event) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "help", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /** \r\n * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.\r\n * @param ev The drag event.\r\n */\r\n ondragleave: (ev: DragEvent) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets or sets the character set used to encode the object.\r\n */\r\n charset: string;\r\n\r\n /**\r\n * Fires for an element just prior to setting focus on that element.\r\n * @param ev The focus event\r\n */\r\n onfocusin: (ev: FocusEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n\r\n /** \r\n * Sets or gets the color of the links that the user has visited.\r\n */\r\n vlinkColor: string;\r\n\r\n /**\r\n * Occurs when the seek operation ends. \r\n * @param ev The event.\r\n */\r\n onseeked: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n security: string;\r\n\r\n /**\r\n * Contains the title of the document.\r\n */\r\n title: string;\r\n\r\n /**\r\n * Retrieves a collection of namespace objects.\r\n */\r\n namespaces: MSNamespaceInfoCollection;\r\n\r\n /**\r\n * Gets the default character set from the current regional language settings.\r\n */\r\n defaultCharset: string;\r\n\r\n /**\r\n * Retrieves a collection of all embed objects in the document.\r\n */\r\n embeds: HTMLCollection;\r\n\r\n /**\r\n * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.\r\n */\r\n styleSheets: StyleSheetList;\r\n\r\n /**\r\n * Retrieves a collection of all window objects defined by the given document or defined by the document associated with the given window.\r\n */\r\n frames: Window;\r\n\r\n /**\r\n * Occurs when the duration attribute is updated. \r\n * @param ev The event.\r\n */\r\n ondurationchange: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Returns a reference to the collection of elements contained by the object.\r\n */\r\n all: HTMLCollection;\r\n\r\n /**\r\n * Retrieves a collection, in source order, of all form objects in the document.\r\n */\r\n forms: HTMLCollection;\r\n\r\n /** \r\n * Fires when the object loses the input focus. \r\n * @param ev The focus event.\r\n */\r\n onblur: (ev: FocusEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Sets or retrieves a value that indicates the reading order of the object. \r\n */\r\n dir: string;\r\n\r\n /**\r\n * Occurs when the media element is reset to its initial state. \r\n * @param ev The event.\r\n */\r\n onemptied: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Sets or gets a value that indicates whether the document can be edited.\r\n */\r\n designMode: string;\r\n\r\n /**\r\n * Occurs when the current playback position is moved. \r\n * @param ev The event.\r\n */\r\n onseeking: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The UI Event\r\n */\r\n ondeactivate: (ev: UIEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when playback is possible, but would require further buffering. \r\n * @param ev The event.\r\n */\r\n oncanplay: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the data set exposed by a data source object changes. \r\n * @param ev The event.\r\n */\r\n ondatasetchanged: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "datasetchanged", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when rows are about to be deleted from the recordset.\r\n * @param ev The event \r\n */\r\n onrowsdelete: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "rowsdelete", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n Script: MSScriptHost;\r\n\r\n /**\r\n * Occurs when Internet Explorer begins looking for media data. \r\n * @param ev The event.\r\n */\r\n onloadstart: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets the URL for the document, stripped of any character encoding.\r\n */\r\n URLUnencoded: string;\r\n\r\n defaultView: Window;\r\n\r\n /**\r\n * Fires when the user is about to make a control selection of the object.\r\n * @param ev The event.\r\n */\r\n oncontrolselect: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "controlselect", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /** \r\n * Fires on the target element when the user drags the object to a valid drop target.\r\n * @param ev The drag event.\r\n */\r\n ondragenter: (ev: DragEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onsubmit: (ev: Event) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Returns the character encoding used to create the webpage that is loaded into the document object.\r\n */\r\n inputEncoding: string;\r\n\r\n /**\r\n * Gets the object that has the focus when the parent document has focus.\r\n */\r\n activeElement: Element;\r\n\r\n /**\r\n * Fires when the contents of the object or selection have changed. \r\n * @param ev The event.\r\n */\r\n onchange: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Retrieves a collection of all a objects that specify the href property and all area objects in the document.\r\n */\r\n links: HTMLCollection;\r\n\r\n /**\r\n * Retrieves an autogenerated, unique identifier for the object. \r\n */\r\n uniqueID: string;\r\n\r\n /**\r\n * Sets or gets the URL for the current document. \r\n */\r\n URL: string;\r\n\r\n /**\r\n * Fires immediately before the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onbeforeactivate: (ev: UIEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n head: HTMLHeadElement;\r\n cookie: string;\r\n xmlEncoding: string;\r\n oncanplaythrough: (ev: Event) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /** \r\n * Retrieves the document compatibility mode of the document.\r\n */\r\n documentMode: number;\r\n\r\n characterSet: string;\r\n\r\n /**\r\n * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.\r\n */\r\n anchors: HTMLCollection;\r\n\r\n onbeforeupdate: (ev: MSEventObj) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "beforeupdate", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /** \r\n * Fires to indicate that all data is available from the data source object. \r\n * @param ev The event.\r\n */\r\n ondatasetcomplete: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "datasetcomplete", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n plugins: HTMLCollection;\r\n\r\n /**\r\n * Occurs if the load operation has been intentionally halted. \r\n * @param ev The event.\r\n */\r\n onsuspend: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets the root svg element in the document hierarchy.\r\n */\r\n rootElement: SVGSVGElement;\r\n\r\n /**\r\n * Retrieves a value that indicates the current state of the object.\r\n */\r\n readyState: string;\r\n\r\n /**\r\n * Gets the URL of the location that referred the user to the current page.\r\n */\r\n referrer: string;\r\n\r\n /**\r\n * Sets or gets the color of all active links in the document.\r\n */\r\n alinkColor: string;\r\n\r\n /**\r\n * Fires on a databound object when an error occurs while updating the associated data in the data source object. \r\n * @param ev The event.\r\n */\r\n onerrorupdate: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "errorupdate", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets a reference to the container object of the window.\r\n */\r\n parentWindow: Window;\r\n\r\n /**\r\n * Fires when the user moves the mouse pointer outside the boundaries of the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseout: (ev: MouseEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.\r\n * @param ev The event.\r\n */\r\n onmsthumbnailclick: (ev: MSSiteModeEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "msthumbnailclick", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the wheel button is rotated. \r\n * @param ev The mouse event\r\n */\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when the volume is changed, or playback is muted or unmuted.\r\n * @param ev The event.\r\n */\r\n onvolumechange: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /** \r\n * Fires when data changes in the data provider.\r\n * @param ev The event.\r\n */\r\n oncellchange: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "cellchange", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires just before the data source control changes the current row in the object. \r\n * @param ev The event.\r\n */\r\n onrowexit: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "rowexit", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires just after new rows are inserted in the current recordset.\r\n * @param ev The event.\r\n */\r\n onrowsinserted: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "rowsinserted", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets or sets the version attribute specified in the declaration of an XML document.\r\n */\r\n xmlVersion: string;\r\n\r\n msCapsLockWarningOff: boolean;\r\n\r\n /**\r\n * Fires when a property changes on the object.\r\n * @param ev The event.\r\n */\r\n onpropertychange: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "propertychange", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires on the source object when the user releases the mouse at the close of a drag operation.\r\n * @param ev The event.\r\n */\r\n ondragend: (ev: DragEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets an object representing the document type declaration associated with the current document. \r\n */\r\n doctype: DocumentType;\r\n\r\n /**\r\n * Fires on the target element continuously while the user drags the object over a valid drop target.\r\n * @param ev The event.\r\n */\r\n ondragover: (ev: DragEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Deprecated. Sets or retrieves a value that indicates the background color behind the object. \r\n */\r\n bgColor: string;\r\n\r\n /**\r\n * Fires on the source object when the user starts to drag a text selection or selected object. \r\n * @param ev The event.\r\n */\r\n ondragstart: (ev: DragEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the user releases a mouse button while the mouse is over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmouseup: (ev: MouseEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires on the source object continuously during a drag operation.\r\n * @param ev The event.\r\n */\r\n ondrag: (ev: DragEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the user moves the mouse pointer into the object.\r\n * @param ev The mouse event.\r\n */\r\n onmouseover: (ev: MouseEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Sets or gets the color of the document links. \r\n */\r\n linkColor: string;\r\n\r\n /**\r\n * Occurs when playback is paused.\r\n * @param ev The event.\r\n */\r\n onpause: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the user clicks the object with either mouse button. \r\n * @param ev The mouse event.\r\n */\r\n onmousedown: (ev: MouseEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the user clicks the left mouse button on the object\r\n * @param ev The mouse event.\r\n */\r\n onclick: (ev: MouseEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when playback stops because the next frame of a video resource is not available. \r\n * @param ev The event.\r\n */\r\n onwaiting: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the user clicks the Stop button or leaves the Web page.\r\n * @param ev The event.\r\n */\r\n onstop: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)[rolls\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "stop", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. \r\n * @param ev The event.\r\n */\r\n onmssitemodejumplistitemremoved: (ev: MSSiteModeEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "mssitemodejumplistitemremoved", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Retrieves a collection of all applet objects in the document.\r\n */\r\n applets: HTMLCollection;\r\n\r\n /**\r\n * Specifies the beginning and end of the document body.\r\n */\r\n body: HTMLElement;\r\n\r\n /**\r\n * Sets or gets the security domain of the document. \r\n */\r\n domain: string;\r\n\r\n xmlStandalone: boolean;\r\n\r\n /**\r\n * Represents the active selection, which is a highlighted block of text or other elements in the document that a user or a script can carry out some action on.\r\n */\r\n selection: MSSelection;\r\n\r\n /**\r\n * Occurs when the download has stopped. \r\n * @param ev The event.\r\n */\r\n onstalled: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the user moves the mouse over the object. \r\n * @param ev The mouse event.\r\n */\r\n onmousemove: (ev: MouseEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets a reference to the root node of the document. \r\n */\r\n documentElement: HTMLElement;\r\n\r\n /**\r\n * Fires before an object contained in an editable element enters a UI-activated state or when an editable container object is control selected.\r\n * @param ev The event.\r\n */\r\n onbeforeeditfocus: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "beforeeditfocus", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when the playback rate is increased or decreased. \r\n * @param ev The event.\r\n */\r\n onratechange: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs to indicate progress while downloading media data. \r\n * @param ev The event.\r\n */\r\n onprogress: (ev: any) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "progress", listener: (ev: any) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the user double-clicks the object.\r\n * @param ev The mouse event.\r\n */\r\n ondblclick: (ev: MouseEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the user clicks the right mouse button in the client area, opening the context menu. \r\n * @param ev The mouse event.\r\n */\r\n oncontextmenu: (ev: MouseEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "contextmenu", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when the duration and dimensions of the media have been determined.\r\n * @param ev The event.\r\n */\r\n onloadedmetadata: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n media: string;\r\n\r\n /**\r\n * Fires when an error occurs during object loading.\r\n * @param ev The event.\r\n */\r\n onerror: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "error", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when the play method is requested. \r\n * @param ev The event.\r\n */\r\n onplay: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onafterupdate: (ev: MSEventObj) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "afterupdate", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when the audio or video has started playing. \r\n * @param ev The event.\r\n */\r\n onplaying: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Retrieves a collection, in source order, of img objects in the document.\r\n */\r\n images: HTMLCollection;\r\n\r\n /**\r\n * Contains information about the current URL. \r\n */\r\n location: Location;\r\n\r\n /**\r\n * Fires when the user aborts the download.\r\n * @param ev The event.\r\n */\r\n onabort: (ev: UIEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires for the current element with focus immediately after moving focus to another element. \r\n * @param ev The event.\r\n */\r\n onfocusout: (ev: FocusEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the selection state of a document changes.\r\n * @param ev The event.\r\n */\r\n onselectionchange: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "selectionchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when a local DOM Storage area is written to disk.\r\n * @param ev The event.\r\n */\r\n onstoragecommit: (ev: StorageEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "storagecommit", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires periodically as data arrives from data source objects that asynchronously transmit their data. \r\n * @param ev The event.\r\n */\r\n ondataavailable: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "dataavailable", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the state of the object has changed.\r\n * @param ev The event\r\n */\r\n onreadystatechange: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "readystatechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets the date that the page was last modified, if the page supplies one. \r\n */\r\n lastModified: string;\r\n\r\n /**\r\n * Fires when the user presses an alphanumeric key.\r\n * @param ev The event.\r\n */\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when media data is loaded at the current playback position. \r\n * @param ev The event.\r\n */\r\n onloadeddata: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires immediately before the activeElement is changed from the current object to another object in the parent document.\r\n * @param ev The event.\r\n */\r\n onbeforedeactivate: (ev: UIEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the object is set as the active element.\r\n * @param ev The event.\r\n */\r\n onactivate: (ev: UIEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n\r\n onselectstart: (ev: Event) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the object receives focus. \r\n * @param ev The event.\r\n */\r\n onfocus: (ev: FocusEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Sets or gets the foreground (text) color of the document.\r\n */\r\n fgColor: string;\r\n\r\n /**\r\n * Occurs to indicate the current playback position.\r\n * @param ev The event.\r\n */\r\n ontimeupdate: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires when the current selection changes.\r\n * @param ev The event.\r\n */\r\n onselect: (ev: UIEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n ondrop: (ev: DragEvent) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Occurs when the end of playback is reached. \r\n * @param ev The event\r\n */\r\n onended: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Gets a value that indicates whether standards-compliant mode is switched on for the object.\r\n */\r\n compatMode: string;\r\n\r\n /**\r\n * Fires when the user repositions the scroll box in the scroll bar on the object. \r\n * @param ev The event.\r\n */\r\n onscroll: (ev: UIEvent) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires to indicate that the current row has changed in the data source and new data values are available on the object. \r\n * @param ev The event.\r\n */\r\n onrowenter: (ev: MSEventObj) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "rowenter", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Fires immediately after the browser loads the object. \r\n * @param ev The event.\r\n */\r\n onload: (ev: Event) => any;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n oninput: (ev: Event) => any;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event to register\r\n * @param listener The event handler function to associate with the event. \r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase.\r\n */\r\n addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n\r\n /**\r\n * Returns the current value of the document, range, or current selection for the given command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandValue(commandId: string): string;\r\n\r\n adoptNode(source: Node): Node;\r\n\r\n /**\r\n * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandIndeterm(commandId: string): boolean;\r\n\r\n getElementsByTagNameNS(namespaceURI: string, localName: string): NodeList;\r\n createProcessingInstruction(target: string, data: string): ProcessingInstruction;\r\n\r\n /**\r\n * Executes a command on the current document, current selection, or the given range.\r\n * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.\r\n * @param showUI Display the user interface, defaults to false.\r\n * @param value Value to assign.\r\n */\r\n execCommand(commandId: string, showUI?: boolean, value?: any): boolean;\r\n\r\n /**\r\n * Returns the element for the specified x coordinate and the specified y coordinate. \r\n * @param x The x-offset\r\n * @param y The y-offset\r\n */\r\n elementFromPoint(x: number, y: number): Element;\r\n createCDATASection(data: string): CDATASection;\r\n\r\n /**\r\n * Retrieves the string associated with a command.\r\n * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. \r\n */\r\n queryCommandText(commandId: string): string;\r\n\r\n /**\r\n * Writes one or more HTML expressions to a document in the specified window. \r\n * @param content Specifies the text and HTML tags to write.\r\n */\r\n write(...content: string[]): void;\r\n\r\n /**\r\n * Allows updating the print settings for the page.\r\n */\r\n updateSettings(): void;\r\n\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "a"): HTMLAnchorElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "abbr"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "address"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "area"): HTMLAreaElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "article"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "aside"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "audio"): HTMLAudioElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "b"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "base"): HTMLBaseElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "bdi"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "bdo"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "blockquote"): HTMLQuoteElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "body"): HTMLBodyElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "br"): HTMLBRElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "button"): HTMLButtonElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "canvas"): HTMLCanvasElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "caption"): HTMLTableCaptionElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "cite"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "code"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "col"): HTMLTableColElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "colgroup"): HTMLTableColElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "datalist"): HTMLDataListElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "dd"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "del"): HTMLModElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "dfn"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "div"): HTMLDivElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "dl"): HTMLDListElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "dt"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "em"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "embed"): HTMLEmbedElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "fieldset"): HTMLFieldSetElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "figcaption"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "figure"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "footer"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "form"): HTMLFormElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "h1"): HTMLHeadingElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "h2"): HTMLHeadingElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "h3"): HTMLHeadingElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "h4"): HTMLHeadingElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "h5"): HTMLHeadingElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "h6"): HTMLHeadingElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "head"): HTMLHeadElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "header"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "hgroup"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "hr"): HTMLHRElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "html"): HTMLHtmlElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "i"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "iframe"): HTMLIFrameElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "img"): HTMLImageElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "input"): HTMLInputElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "ins"): HTMLModElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "kbd"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "label"): HTMLLabelElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "legend"): HTMLLegendElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "li"): HTMLLIElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "link"): HTMLLinkElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "main"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "map"): HTMLMapElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "mark"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "menu"): HTMLMenuElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "meta"): HTMLMetaElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "nav"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "noscript"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "object"): HTMLObjectElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "ol"): HTMLOListElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "optgroup"): HTMLOptGroupElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "option"): HTMLOptionElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "p"): HTMLParagraphElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "param"): HTMLParamElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "pre"): HTMLPreElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "progress"): HTMLProgressElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "q"): HTMLQuoteElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "rp"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "rt"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "ruby"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "s"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "samp"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "script"): HTMLScriptElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "section"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "select"): HTMLSelectElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "small"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "source"): HTMLSourceElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "span"): HTMLSpanElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "strong"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "style"): HTMLStyleElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "sub"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "summary"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "sup"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "table"): HTMLTableElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "tbody"): HTMLTableSectionElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "td"): HTMLTableDataCellElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "textarea"): HTMLTextAreaElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "tfoot"): HTMLTableSectionElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "th"): HTMLTableHeaderCellElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "thead"): HTMLTableSectionElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "title"): HTMLTitleElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "tr"): HTMLTableRowElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "track"): HTMLTrackElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "u"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "ul"): HTMLUListElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "var"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "video"): HTMLVideoElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: "wbr"): HTMLElement;\r\n /**\r\n * Creates an instance of the element for the specified tag.\r\n * @param tagName The name of an element.\r\n */\r\n createElement(tagName: string): HTMLElement;\r\n \r\n /**\r\n * Removes mouse capture from the object in the current document.\r\n */\r\n releaseCapture(): void;\r\n\r\n /**\r\n * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. \r\n * @param content The text and HTML tags to write.\r\n */\r\n writeln(...content: string[]): void;\r\n createElementNS(namespaceURI: string, qualifiedName: string): Element;\r\n\r\n /**\r\n * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.\r\n * @param url Specifies a MIME type for the document.\r\n * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.\r\n * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.\r\n * @param replace Specifies whether the existing entry for the document is replaced in the history list.\r\n */\r\n open(url?: string, name?: string, features?: string, replace?: boolean): any;\r\n\r\n /**\r\n * Returns a Boolean value that indicates whether the current command is supported on the current range.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandSupported(commandId: string): boolean;\r\n\r\n /**\r\n * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.\r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.\r\n * @param filter A custom NodeFilter function to use.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createTreeWalker(root: Node, whatToShow: number, filter: NodeFilter, entityReferenceExpansion: boolean): TreeWalker;\r\n createAttributeNS(namespaceURI: string, qualifiedName: string): Attr;\r\n\r\n /** \r\n * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.\r\n * @param commandId Specifies a command identifier.\r\n */\r\n queryCommandEnabled(commandId: string): boolean;\r\n\r\n /**\r\n * Causes the element to receive the focus and executes the code specified by the onfocus event.\r\n */\r\n focus(): void;\r\n\r\n /**\r\n * Closes an output stream and forces the sent data to display.\r\n */\r\n close(): void;\r\n\r\n getElementsByClassName(classNames: string): NodeList;\r\n importNode(importedNode: Node, deep: boolean): Node;\r\n\r\n /**\r\n * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. \r\n */\r\n createRange(): Range;\r\n\r\n /**\r\n * Fires a specified event on the object.\r\n * @param eventName Specifies the name of the event to fire.\r\n * @param eventObj Object that specifies the event object from which to obtain event object properties.\r\n */\r\n fireEvent(eventName: string, eventObj?: any): boolean;\r\n\r\n /**\r\n * Creates a comment object with the specified data.\r\n * @param data Sets the comment object\'s data.\r\n */\r\n createComment(data: string): Comment;\r\n\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "a"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "abbr"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "address"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "area"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "article"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "aside"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "audio"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "b"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "base"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "bdi"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "bdo"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "blockquote"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "body"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "br"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "button"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "canvas"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "caption"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "cite"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "code"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "col"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "colgroup"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "datalist"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "dd"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "del"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "dfn"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "div"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "dl"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "dt"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "em"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "embed"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "fieldset"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "figcaption"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "figure"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "footer"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "form"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "h1"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "h2"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "h3"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "h4"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "h5"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "h6"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "head"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "header"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "hgroup"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "hr"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "html"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "i"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "iframe"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "img"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "input"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "ins"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "kbd"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "label"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "legend"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "li"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "link"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "main"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "map"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "mark"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "menu"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "meta"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "nav"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "noscript"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "object"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "ol"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "optgroup"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "option"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "p"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "param"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "pre"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "progress"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "q"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "rp"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "rt"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "ruby"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "s"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "samp"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "script"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "section"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "select"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "small"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "source"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "span"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "strong"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "style"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "sub"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "summary"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "sup"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "table"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "tbody"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "td"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "textarea"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "tfoot"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "th"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "thead"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "title"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "tr"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "track"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "u"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "ul"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "var"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "video"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: "wbr"): NodeListOf;\r\n /**\r\n * Retrieves a collection of objects based on the specified element name.\r\n * @param name Specifies the name of an element.\r\n */\r\n getElementsByTagName(name: string): NodeList;\r\n \r\n /**\r\n * Creates a new document.\r\n */\r\n createDocumentFragment(): DocumentFragment;\r\n\r\n /**\r\n * Creates a style sheet for the document. \r\n * @param href Specifies how to add the style sheet to the document. If a file name is specified for the URL, the style information is added as a link object. If the URL contains style information, it is added to the style object.\r\n * @param index Specifies the index that indicates where the new style sheet is inserted in the styleSheets collection. The default is to insert the new style sheet at the end of the collection.\r\n */\r\n createStyleSheet(href?: string, index?: number): CSSStyleSheet;\r\n\r\n /**\r\n * Gets a collection of objects based on the value of the NAME or ID attribute.\r\n * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.\r\n */\r\n getElementsByName(elementName: string): NodeList;\r\n\r\n /**\r\n * Returns a Boolean value that indicates the current state of the command.\r\n * @param commandId String that specifies a command identifier.\r\n */\r\n queryCommandState(commandId: string): boolean;\r\n\r\n /**\r\n * Gets a value indicating whether the object currently has focus.\r\n */\r\n hasFocus(): boolean;\r\n\r\n /**\r\n * Displays help information for the given command identifier.\r\n * @param commandId Displays help information for the given command identifier.\r\n */\r\n execCommandShowHelp(commandId: string): boolean;\r\n\r\n /**\r\n * Creates an attribute object with a specified name.\r\n * @param name String that sets the attribute object\'s name.\r\n */\r\n createAttribute(name: string): Attr;\r\n\r\n /**\r\n * Creates a text string from the specified value. \r\n * @param data String that specifies the nodeValue property of the text node.\r\n */\r\n createTextNode(data: string): Text;\r\n\r\n /**\r\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. \r\n * @param root The root element or node to start traversing on.\r\n * @param whatToShow The type of nodes or elements to appear in the node list\r\n * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.\r\n * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.\r\n */\r\n createNodeIterator(root: Node, whatToShow: number, filter: NodeFilter, entityReferenceExpansion: boolean): NodeIterator;\r\n\r\n /**\r\n * Generates an event object to pass event context information when you use the fireEvent method.\r\n * @param eventObj An object that specifies an existing event object on which to base the new object.\r\n */\r\n createEventObject(eventObj?: any): MSEventObj;\r\n\r\n /**\r\n * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.\r\n */\r\n getSelection(): Selection;\r\n\r\n /**\r\n * Returns a reference to the first object with the specified value of the ID or NAME attribute.\r\n * @param elementId String that specifies the ID value. Case-insensitive.\r\n */\r\n getElementById(elementId: string): HTMLElement;\r\n\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event type to register. \r\n * @param listener The event handler function to associate with the event.\r\n * @param useCapture Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase. \r\n */\r\n addEventListener(type: "DOMContentLoaded", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n /**\r\n * Registers an event handler for the specified event type. \r\n * @param type The type of event type to register. \r\n * @param listener The event handler function to associate with the event.\r\n * @param useCapture Boolean value that specifies the event phase to add the event handler for: \r\n * true (true)\r\n * Register the event handler for the capturing phase. \r\n * false (false)\r\n * Register the event handler for the bubbling phase. \r\n */\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\n\r\ndeclare var Document: {\r\n prototype: Document;\r\n new (): Document;\r\n}\r\n\r\ninterface MessageEvent extends Event {\r\n source: Window;\r\n origin: string;\r\n data: any;\r\n initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;\r\n}\r\ndeclare var MessageEvent: {\r\n prototype: MessageEvent;\r\n new (): MessageEvent;\r\n}\r\n\r\ninterface SVGElement extends Element {\r\n onmouseover: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n viewportElement: SVGElement;\r\n onmousemove: (ev: MouseEvent) => any;\r\n addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onmouseout: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n ondblclick: (ev: MouseEvent) => any;\r\n addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onfocusout: (ev: FocusEvent) => any;\r\n addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n onfocusin: (ev: FocusEvent) => any;\r\n addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n xmlbase: string;\r\n onmousedown: (ev: MouseEvent) => any;\r\n addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onmouseup: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onclick: (ev: MouseEvent) => any;\r\n addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n ownerSVGElement: SVGSVGElement;\r\n id: string;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var SVGElement: {\r\n prototype: SVGElement;\r\n new (): SVGElement;\r\n}\r\n\r\ninterface HTMLScriptElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the status of the script.\r\n */\r\n defer: boolean;\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n /**\r\n * Retrieves the URL to an external file that contains the source code or data.\r\n */\r\n src: string;\r\n /** \r\n * Sets or retrieves the object that is bound to the event script.\r\n */\r\n htmlFor: string;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the MIME type for the associated scripting engine.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the event for which the script is written. \r\n */\r\n event: string;\r\n}\r\ndeclare var HTMLScriptElement: {\r\n prototype: HTMLScriptElement;\r\n new (): HTMLScriptElement;\r\n}\r\n\r\ninterface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment, DOML2DeprecatedBackgroundColorStyle {\r\n /**\r\n * Retrieves the position of the object in the rows collection for the table.\r\n */\r\n rowIndex: number;\r\n /**\r\n * Retrieves a collection of all cells in the table row.\r\n */\r\n cells: HTMLCollection;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.\r\n */\r\n borderColorLight: any;\r\n /**\r\n * Retrieves the position of the object in the collection.\r\n */\r\n sectionRowIndex: number;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.\r\n */\r\n borderColorDark: any;\r\n /**\r\n * Removes the specified cell from the table row, as well as from the cells collection.\r\n * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.\r\n */\r\n deleteCell(index?: number): void;\r\n /**\r\n * Creates a new cell in the table row, and adds the cell to the cells collection.\r\n * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.\r\n */\r\n insertCell(index?: number): HTMLElement;\r\n}\r\ndeclare var HTMLTableRowElement: {\r\n prototype: HTMLTableRowElement;\r\n new (): HTMLTableRowElement;\r\n}\r\n\r\ninterface CanvasRenderingContext2D {\r\n miterLimit: number;\r\n font: string;\r\n globalCompositeOperation: string;\r\n msFillRule: string;\r\n lineCap: string;\r\n msImageSmoothingEnabled: boolean;\r\n lineDashOffset: number;\r\n shadowColor: string;\r\n lineJoin: string;\r\n shadowOffsetX: number;\r\n lineWidth: number;\r\n canvas: HTMLCanvasElement;\r\n strokeStyle: any;\r\n globalAlpha: number;\r\n shadowOffsetY: number;\r\n fillStyle: any;\r\n shadowBlur: number;\r\n textAlign: string;\r\n textBaseline: string;\r\n restore(): void;\r\n setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n save(): void;\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n measureText(text: string): TextMetrics;\r\n isPointInPath(x: number, y: number, fillRule?: string): boolean;\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;\r\n rotate(angle: number): void;\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n translate(x: number, y: number): void;\r\n scale(x: number, y: number): void;\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;\r\n lineTo(x: number, y: number): void;\r\n getLineDash(): Array;\r\n fill(fillRule?: string): void;\r\n createImageData(imageDataOrSw: any, sh?: number): ImageData;\r\n createPattern(image: HTMLElement, repetition: string): CanvasPattern;\r\n closePath(): void;\r\n rect(x: number, y: number, w: number, h: number): void;\r\n clip(fillRule?: string): void;\r\n clearRect(x: number, y: number, w: number, h: number): void;\r\n moveTo(x: number, y: number): void;\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n fillRect(x: number, y: number, w: number, h: number): void;\r\n bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;\r\n drawImage(image: HTMLElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;\r\n transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;\r\n stroke(): void;\r\n strokeRect(x: number, y: number, w: number, h: number): void;\r\n setLineDash(segments: Array): void;\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n beginPath(): void;\r\n arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;\r\n}\r\ndeclare var CanvasRenderingContext2D: {\r\n prototype: CanvasRenderingContext2D;\r\n new (): CanvasRenderingContext2D;\r\n}\r\n\r\ninterface MSCSSRuleList {\r\n length: number;\r\n item(index?: number): CSSStyleRule;\r\n [index: number]: CSSStyleRule;\r\n}\r\ndeclare var MSCSSRuleList: {\r\n prototype: MSCSSRuleList;\r\n new (): MSCSSRuleList;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {\r\n x: number;\r\n}\r\ndeclare var SVGPathSegLinetoHorizontalAbs: {\r\n prototype: SVGPathSegLinetoHorizontalAbs;\r\n new (): SVGPathSegLinetoHorizontalAbs;\r\n}\r\n\r\ninterface SVGPathSegArcAbs extends SVGPathSeg {\r\n y: number;\r\n sweepFlag: boolean;\r\n r2: number;\r\n x: number;\r\n angle: number;\r\n r1: number;\r\n largeArcFlag: boolean;\r\n}\r\ndeclare var SVGPathSegArcAbs: {\r\n prototype: SVGPathSegArcAbs;\r\n new (): SVGPathSegArcAbs;\r\n}\r\n\r\ninterface SVGTransformList {\r\n numberOfItems: number;\r\n getItem(index: number): SVGTransform;\r\n consolidate(): SVGTransform;\r\n clear(): void;\r\n appendItem(newItem: SVGTransform): SVGTransform;\r\n initialize(newItem: SVGTransform): SVGTransform;\r\n removeItem(index: number): SVGTransform;\r\n insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;\r\n replaceItem(newItem: SVGTransform, index: number): SVGTransform;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n}\r\ndeclare var SVGTransformList: {\r\n prototype: SVGTransformList;\r\n new (): SVGTransformList;\r\n}\r\n\r\ninterface HTMLHtmlElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the DTD version that governs the current document.\r\n */\r\n version: string;\r\n}\r\ndeclare var HTMLHtmlElement: {\r\n prototype: HTMLHtmlElement;\r\n new (): HTMLHtmlElement;\r\n}\r\n\r\ninterface SVGPathSegClosePath extends SVGPathSeg {\r\n}\r\ndeclare var SVGPathSegClosePath: {\r\n prototype: SVGPathSegClosePath;\r\n new (): SVGPathSegClosePath;\r\n}\r\n\r\ninterface HTMLFrameElement extends HTMLElement, GetSVGDocument, MSDataBindingExtensions {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: any;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n contentWindow: Window;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n /**\r\n * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.\r\n */\r\n security: any;\r\n /**\r\n * Registers an event handler for the specified event type.\r\n * @param type The type of event type to register.\r\n * @param listener The event handler function to associate with the event.\r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for. If true, register the event handler for the capturing phase. If false, Register the event handler for the bubbling phase. \r\n */\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var HTMLFrameElement: {\r\n prototype: HTMLFrameElement;\r\n new (): HTMLFrameElement;\r\n}\r\n\r\ninterface SVGAnimatedLength {\r\n animVal: SVGLength;\r\n baseVal: SVGLength;\r\n}\r\ndeclare var SVGAnimatedLength: {\r\n prototype: SVGAnimatedLength;\r\n new (): SVGAnimatedLength;\r\n}\r\n\r\ninterface SVGAnimatedPoints {\r\n points: SVGPointList;\r\n animatedPoints: SVGPointList;\r\n}\r\n\r\ninterface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n}\r\ndeclare var SVGDefsElement: {\r\n prototype: SVGDefsElement;\r\n new (): SVGDefsElement;\r\n}\r\n\r\ninterface HTMLQuoteElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n}\r\ndeclare var HTMLQuoteElement: {\r\n prototype: HTMLQuoteElement;\r\n new (): HTMLQuoteElement;\r\n}\r\n\r\ninterface CSSMediaRule extends CSSRule {\r\n media: MediaList;\r\n cssRules: CSSRuleList;\r\n insertRule(rule: string, index?: number): number;\r\n deleteRule(index?: number): void;\r\n}\r\ndeclare var CSSMediaRule: {\r\n prototype: CSSMediaRule;\r\n new (): CSSMediaRule;\r\n}\r\n\r\ninterface WindowModal {\r\n dialogArguments: any;\r\n returnValue: any;\r\n}\r\n\r\ninterface XMLHttpRequest extends EventTarget {\r\n responseBody: any;\r\n status: number;\r\n readyState: number;\r\n responseText: string;\r\n responseXML: Document;\r\n ontimeout: (ev: Event) => any;\r\n addEventListener(type: "timeout", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n statusText: string;\r\n onreadystatechange: (ev: Event) => any;\r\n addEventListener(type: "readystatechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n timeout: number;\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n open(method: string, url: string, async?: boolean, user?: string, password?: string): void;\r\n create(): XMLHttpRequest;\r\n send(data?: any): void;\r\n abort(): void;\r\n getAllResponseHeaders(): string;\r\n setRequestHeader(header: string, value: string): void;\r\n getResponseHeader(header: string): string;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n LOADING: number;\r\n DONE: number;\r\n UNSENT: number;\r\n OPENED: number;\r\n HEADERS_RECEIVED: number;\r\n}\r\ndeclare var XMLHttpRequest: {\r\n prototype: XMLHttpRequest;\r\n new (): XMLHttpRequest;\r\n LOADING: number;\r\n DONE: number;\r\n UNSENT: number;\r\n OPENED: number;\r\n HEADERS_RECEIVED: number;\r\n}\r\n\r\ninterface HTMLTableHeaderCellElement extends HTMLTableCellElement {\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object\'s information applies.\r\n */\r\n scope: string;\r\n}\r\ndeclare var HTMLTableHeaderCellElement: {\r\n prototype: HTMLTableHeaderCellElement;\r\n new (): HTMLTableHeaderCellElement;\r\n}\r\n\r\ninterface HTMLDListElement extends HTMLElement, DOML2DeprecatedListSpaceReduction {\r\n}\r\ndeclare var HTMLDListElement: {\r\n prototype: HTMLDListElement;\r\n new (): HTMLDListElement;\r\n}\r\n\r\ninterface MSDataBindingExtensions {\r\n dataSrc: string;\r\n dataFormatAs: string;\r\n dataFld: string;\r\n}\r\n\r\ninterface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {\r\n x: number;\r\n}\r\ndeclare var SVGPathSegLinetoHorizontalRel: {\r\n prototype: SVGPathSegLinetoHorizontalRel;\r\n new (): SVGPathSegLinetoHorizontalRel;\r\n}\r\n\r\ninterface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n ry: SVGAnimatedLength;\r\n cx: SVGAnimatedLength;\r\n rx: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n}\r\ndeclare var SVGEllipseElement: {\r\n prototype: SVGEllipseElement;\r\n new (): SVGEllipseElement;\r\n}\r\n\r\ninterface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired, SVGURIReference {\r\n target: SVGAnimatedString;\r\n}\r\ndeclare var SVGAElement: {\r\n prototype: SVGAElement;\r\n new (): SVGAElement;\r\n}\r\n\r\ninterface SVGStylable {\r\n className: SVGAnimatedString;\r\n style: CSSStyleDeclaration;\r\n}\r\n\r\ninterface SVGTransformable extends SVGLocatable {\r\n transform: SVGAnimatedTransformList;\r\n}\r\n\r\ninterface HTMLFrameSetElement extends HTMLElement {\r\n ononline: (ev: Event) => any;\r\n addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n /**\r\n * Sets or retrieves the border color of the object.\r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves the frame heights of the object.\r\n */\r\n rows: string;\r\n /**\r\n * Sets or retrieves the frame widths of the object.\r\n */\r\n cols: string;\r\n /**\r\n * Fires when the object loses the input focus.\r\n */\r\n onblur: (ev: FocusEvent) => any;\r\n addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Fires when the object receives focus.\r\n */\r\n onfocus: (ev: FocusEvent) => any;\r\n addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n onmessage: (ev: MessageEvent) => any;\r\n addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n onerror: (ev: Event) => any;\r\n addEventListener(type: "error", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n onresize: (ev: UIEvent) => any;\r\n addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n name: string;\r\n onafterprint: (ev: Event) => any;\r\n addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onbeforeprint: (ev: Event) => any;\r\n addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onoffline: (ev: Event) => any;\r\n addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n border: string;\r\n onunload: (ev: Event) => any;\r\n addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onhashchange: (ev: Event) => any;\r\n addEventListener(type: "hashchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n onstorage: (ev: StorageEvent) => any;\r\n addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var HTMLFrameSetElement: {\r\n prototype: HTMLFrameSetElement;\r\n new (): HTMLFrameSetElement;\r\n}\r\n\r\ninterface Screen {\r\n width: number;\r\n deviceXDPI: number;\r\n fontSmoothingEnabled: boolean;\r\n bufferDepth: number;\r\n logicalXDPI: number;\r\n systemXDPI: number;\r\n availHeight: number;\r\n height: number;\r\n logicalYDPI: number;\r\n systemYDPI: number;\r\n updateInterval: number;\r\n colorDepth: number;\r\n availWidth: number;\r\n deviceYDPI: number;\r\n pixelDepth: number;\r\n}\r\ndeclare var Screen: {\r\n prototype: Screen;\r\n new (): Screen;\r\n}\r\n\r\ninterface Coordinates {\r\n altitudeAccuracy: number;\r\n longitude: number;\r\n latitude: number;\r\n speed: number;\r\n heading: number;\r\n altitude: number;\r\n accuracy: number;\r\n}\r\ndeclare var Coordinates: {\r\n prototype: Coordinates;\r\n new (): Coordinates;\r\n}\r\n\r\ninterface NavigatorGeolocation {\r\n geolocation: Geolocation;\r\n}\r\n\r\ninterface NavigatorContentUtils {\r\n}\r\n\r\ninterface EventListener {\r\n (evt: Event): void;\r\n}\r\n\r\ninterface SVGLangSpace {\r\n xmllang: string;\r\n xmlspace: string;\r\n}\r\n\r\ninterface DataTransfer {\r\n effectAllowed: string;\r\n dropEffect: string;\r\n clearData(format?: string): boolean;\r\n setData(format: string, data: string): boolean;\r\n getData(format: string): string;\r\n}\r\ndeclare var DataTransfer: {\r\n prototype: DataTransfer;\r\n new (): DataTransfer;\r\n}\r\n\r\ninterface FocusEvent extends UIEvent {\r\n relatedTarget: EventTarget;\r\n initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;\r\n}\r\ndeclare var FocusEvent: {\r\n prototype: FocusEvent;\r\n new (): FocusEvent;\r\n}\r\n\r\ninterface Range {\r\n startOffset: number;\r\n collapsed: boolean;\r\n endOffset: number;\r\n startContainer: Node;\r\n endContainer: Node;\r\n commonAncestorContainer: Node;\r\n setStart(refNode: Node, offset: number): void;\r\n setEndBefore(refNode: Node): void;\r\n setStartBefore(refNode: Node): void;\r\n selectNode(refNode: Node): void;\r\n detach(): void;\r\n getBoundingClientRect(): ClientRect;\r\n toString(): string;\r\n compareBoundaryPoints(how: number, sourceRange: Range): number;\r\n insertNode(newNode: Node): void;\r\n collapse(toStart: boolean): void;\r\n selectNodeContents(refNode: Node): void;\r\n cloneContents(): DocumentFragment;\r\n setEnd(refNode: Node, offset: number): void;\r\n cloneRange(): Range;\r\n getClientRects(): ClientRectList;\r\n surroundContents(newParent: Node): void;\r\n deleteContents(): void;\r\n setStartAfter(refNode: Node): void;\r\n extractContents(): DocumentFragment;\r\n setEndAfter(refNode: Node): void;\r\n END_TO_END: number;\r\n START_TO_START: number;\r\n START_TO_END: number;\r\n END_TO_START: number;\r\n}\r\ndeclare var Range: {\r\n prototype: Range;\r\n new (): Range;\r\n END_TO_END: number;\r\n START_TO_START: number;\r\n START_TO_END: number;\r\n END_TO_START: number;\r\n}\r\n\r\ninterface SVGPoint {\r\n y: number;\r\n x: number;\r\n matrixTransform(matrix: SVGMatrix): SVGPoint;\r\n}\r\ndeclare var SVGPoint: {\r\n prototype: SVGPoint;\r\n new (): SVGPoint;\r\n}\r\n\r\ninterface MSPluginsCollection {\r\n length: number;\r\n refresh(reload?: boolean): void;\r\n}\r\ndeclare var MSPluginsCollection: {\r\n prototype: MSPluginsCollection;\r\n new (): MSPluginsCollection;\r\n}\r\n\r\ninterface SVGAnimatedNumberList {\r\n animVal: SVGNumberList;\r\n baseVal: SVGNumberList;\r\n}\r\ndeclare var SVGAnimatedNumberList: {\r\n prototype: SVGAnimatedNumberList;\r\n new (): SVGAnimatedNumberList;\r\n}\r\n\r\ninterface SVGSVGElement extends SVGElement, SVGStylable, SVGZoomAndPan, DocumentEvent, SVGLangSpace, SVGLocatable, SVGTests, SVGFitToViewBox, SVGExternalResourcesRequired {\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n contentStyleType: string;\r\n onzoom: (ev: any) => any;\r\n addEventListener(type: "zoom", listener: (ev: any) => any, useCapture?: boolean): void;\r\n y: SVGAnimatedLength;\r\n viewport: SVGRect;\r\n onerror: (ev: Event) => any;\r\n addEventListener(type: "error", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n pixelUnitToMillimeterY: number;\r\n onresize: (ev: UIEvent) => any;\r\n addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n screenPixelToMillimeterY: number;\r\n height: SVGAnimatedLength;\r\n onabort: (ev: UIEvent) => any;\r\n addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n contentScriptType: string;\r\n pixelUnitToMillimeterX: number;\r\n currentTranslate: SVGPoint;\r\n onunload: (ev: Event) => any;\r\n addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n currentScale: number;\r\n onscroll: (ev: UIEvent) => any;\r\n addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n screenPixelToMillimeterX: number;\r\n setCurrentTime(seconds: number): void;\r\n createSVGLength(): SVGLength;\r\n getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeList;\r\n unpauseAnimations(): void;\r\n createSVGRect(): SVGRect;\r\n checkIntersection(element: SVGElement, rect: SVGRect): boolean;\r\n unsuspendRedrawAll(): void;\r\n pauseAnimations(): void;\r\n suspendRedraw(maxWaitMilliseconds: number): number;\r\n deselectAll(): void;\r\n createSVGAngle(): SVGAngle;\r\n getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeList;\r\n createSVGTransform(): SVGTransform;\r\n unsuspendRedraw(suspendHandleID: number): void;\r\n forceRedraw(): void;\r\n getCurrentTime(): number;\r\n checkEnclosure(element: SVGElement, rect: SVGRect): boolean;\r\n createSVGMatrix(): SVGMatrix;\r\n createSVGPoint(): SVGPoint;\r\n createSVGNumber(): SVGNumber;\r\n createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;\r\n getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\n getElementById(elementId: string): Element;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var SVGSVGElement: {\r\n prototype: SVGSVGElement;\r\n new (): SVGSVGElement;\r\n}\r\n\r\ninterface HTMLLabelElement extends HTMLElement, MSDataBindingExtensions {\r\n /**\r\n * Sets or retrieves the object to which the given label object is assigned.\r\n */\r\n htmlFor: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n}\r\ndeclare var HTMLLabelElement: {\r\n prototype: HTMLLabelElement;\r\n new (): HTMLLabelElement;\r\n}\r\n\r\ninterface MSResourceMetadata {\r\n protocol: string;\r\n fileSize: string;\r\n fileUpdatedDate: string;\r\n nameProp: string;\r\n fileCreatedDate: string;\r\n fileModifiedDate: string;\r\n mimeType: string;\r\n}\r\n\r\ninterface HTMLLegendElement extends HTMLElement, MSDataBindingExtensions {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n align: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n}\r\ndeclare var HTMLLegendElement: {\r\n prototype: HTMLLegendElement;\r\n new (): HTMLLegendElement;\r\n}\r\n\r\ninterface HTMLDirectoryElement extends HTMLElement, DOML2DeprecatedListSpaceReduction, DOML2DeprecatedListNumberingAndBulletStyle {\r\n}\r\ndeclare var HTMLDirectoryElement: {\r\n prototype: HTMLDirectoryElement;\r\n new (): HTMLDirectoryElement;\r\n}\r\n\r\ninterface SVGAnimatedInteger {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\ndeclare var SVGAnimatedInteger: {\r\n prototype: SVGAnimatedInteger;\r\n new (): SVGAnimatedInteger;\r\n}\r\n\r\ninterface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {\r\n}\r\ndeclare var SVGTextElement: {\r\n prototype: SVGTextElement;\r\n new (): SVGTextElement;\r\n}\r\n\r\ninterface SVGTSpanElement extends SVGTextPositioningElement {\r\n}\r\ndeclare var SVGTSpanElement: {\r\n prototype: SVGTSpanElement;\r\n new (): SVGTSpanElement;\r\n}\r\n\r\ninterface HTMLLIElement extends HTMLElement, DOML2DeprecatedListNumberingAndBulletStyle {\r\n /**\r\n * Sets or retrieves the value of a list item.\r\n */\r\n value: number;\r\n}\r\ndeclare var HTMLLIElement: {\r\n prototype: HTMLLIElement;\r\n new (): HTMLLIElement;\r\n}\r\n\r\ninterface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {\r\n y: number;\r\n}\r\ndeclare var SVGPathSegLinetoVerticalAbs: {\r\n prototype: SVGPathSegLinetoVerticalAbs;\r\n new (): SVGPathSegLinetoVerticalAbs;\r\n}\r\n\r\ninterface MSStorageExtensions {\r\n remainingSpace: number;\r\n}\r\n\r\ninterface SVGStyleElement extends SVGElement, SVGLangSpace {\r\n media: string;\r\n type: string;\r\n title: string;\r\n}\r\ndeclare var SVGStyleElement: {\r\n prototype: SVGStyleElement;\r\n new (): SVGStyleElement;\r\n}\r\n\r\ninterface MSCurrentStyleCSSProperties extends MSCSSProperties {\r\n blockDirection: string;\r\n clipBottom: string;\r\n clipLeft: string;\r\n clipRight: string;\r\n clipTop: string;\r\n hasLayout: string;\r\n}\r\ndeclare var MSCurrentStyleCSSProperties: {\r\n prototype: MSCurrentStyleCSSProperties;\r\n new (): MSCurrentStyleCSSProperties;\r\n}\r\n\r\ninterface MSHTMLCollectionExtensions {\r\n urns(urn: any): Object;\r\n tags(tagName: any): Object;\r\n}\r\n\r\ninterface Storage extends MSStorageExtensions {\r\n length: number;\r\n getItem(key: string): any;\r\n [key: string]: any;\r\n setItem(key: string, data: string): void;\r\n clear(): void;\r\n removeItem(key: string): void;\r\n key(index: number): string;\r\n [index: number]: any;\r\n}\r\ndeclare var Storage: {\r\n prototype: Storage;\r\n new (): Storage;\r\n}\r\n\r\ninterface HTMLIFrameElement extends HTMLElement, GetSVGDocument, MSDataBindingExtensions {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Sets or retrieves whether the frame can be scrolled.\r\n */\r\n scrolling: string;\r\n /**\r\n * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.\r\n */\r\n marginHeight: string;\r\n /**\r\n * Sets or retrieves the left and right margin widths before displaying the text in a frame.\r\n */\r\n marginWidth: string;\r\n /**\r\n * Sets or retrieves the amount of additional space between the frames.\r\n */\r\n frameSpacing: any;\r\n /**\r\n * Sets or retrieves whether to display a border for the frame.\r\n */\r\n frameBorder: string;\r\n /**\r\n * Sets or retrieves whether the user can resize the frame.\r\n */\r\n noResize: boolean;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Retrieves the object of the specified.\r\n */\r\n contentWindow: Window;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the frame name.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Specifies the properties of a border drawn around an object.\r\n */\r\n border: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Sets or retrieves the horizontal margin for the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves a URI to a long description of the object.\r\n */\r\n longDesc: string;\r\n /**\r\n * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.\r\n */\r\n security: any;\r\n /**\r\n * Raised when the object has been completely received from the server.\r\n */\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n /**\r\n * Registers an event handler for the specified event type.\r\n * @param type The type of event type to register.\r\n * @param listener The event handler function to associate with the event.\r\n * @param useCapture A Boolean value that specifies the event phase to add the event handler for. If true, register the event handler for the capturing phase. If false, Register the event handler for the bubbling phase. \r\n */\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var HTMLIFrameElement: {\r\n prototype: HTMLIFrameElement;\r\n new (): HTMLIFrameElement;\r\n}\r\n\r\ninterface TextRangeCollection {\r\n length: number;\r\n item(index: number): TextRange;\r\n [index: number]: TextRange;\r\n}\r\ndeclare var TextRangeCollection: {\r\n prototype: TextRangeCollection;\r\n new (): TextRangeCollection;\r\n}\r\n\r\ninterface HTMLBodyElement extends HTMLElement, DOML2DeprecatedBackgroundStyle, DOML2DeprecatedBackgroundColorStyle {\r\n scroll: string;\r\n ononline: (ev: Event) => any;\r\n addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onblur: (ev: FocusEvent) => any;\r\n addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n noWrap: boolean;\r\n onfocus: (ev: FocusEvent) => any;\r\n addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n onmessage: (ev: MessageEvent) => any;\r\n addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\n text: any;\r\n onerror: (ev: Event) => any;\r\n addEventListener(type: "error", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n bgProperties: string;\r\n onresize: (ev: UIEvent) => any;\r\n addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n link: any;\r\n aLink: any;\r\n bottomMargin: any;\r\n topMargin: any;\r\n onafterprint: (ev: Event) => any;\r\n addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n vLink: any;\r\n onbeforeprint: (ev: Event) => any;\r\n addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onoffline: (ev: Event) => any;\r\n addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onunload: (ev: Event) => any;\r\n addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onhashchange: (ev: Event) => any;\r\n addEventListener(type: "hashchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n rightMargin: any;\r\n onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\n addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\n leftMargin: any;\r\n onstorage: (ev: StorageEvent) => any;\r\n addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\n createTextRange(): TextRange;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var HTMLBodyElement: {\r\n prototype: HTMLBodyElement;\r\n new (): HTMLBodyElement;\r\n}\r\n\r\ninterface DocumentType extends Node {\r\n name: string;\r\n notations: NamedNodeMap;\r\n systemId: string;\r\n internalSubset: string;\r\n entities: NamedNodeMap;\r\n publicId: string;\r\n}\r\ndeclare var DocumentType: {\r\n prototype: DocumentType;\r\n new (): DocumentType;\r\n}\r\n\r\ninterface SVGRadialGradientElement extends SVGGradientElement {\r\n cx: SVGAnimatedLength;\r\n r: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n fx: SVGAnimatedLength;\r\n fy: SVGAnimatedLength;\r\n}\r\ndeclare var SVGRadialGradientElement: {\r\n prototype: SVGRadialGradientElement;\r\n new (): SVGRadialGradientElement;\r\n}\r\n\r\ninterface MutationEvent extends Event {\r\n newValue: string;\r\n attrChange: number;\r\n attrName: string;\r\n prevValue: string;\r\n relatedNode: Node;\r\n initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;\r\n MODIFICATION: number;\r\n REMOVAL: number;\r\n ADDITION: number;\r\n}\r\ndeclare var MutationEvent: {\r\n prototype: MutationEvent;\r\n new (): MutationEvent;\r\n MODIFICATION: number;\r\n REMOVAL: number;\r\n ADDITION: number;\r\n}\r\n\r\ninterface DragEvent extends MouseEvent {\r\n dataTransfer: DataTransfer;\r\n initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;\r\n}\r\ndeclare var DragEvent: {\r\n prototype: DragEvent;\r\n new (): DragEvent;\r\n}\r\n\r\ninterface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment, DOML2DeprecatedBackgroundColorStyle {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: HTMLCollection;\r\n /**\r\n * Removes the specified row (tr) from the element and from the rows collection.\r\n * @param index Number that specifies the zero-based position in the rows collection of the row to remove.\r\n */\r\n deleteRow(index?: number): void;\r\n /**\r\n * Moves a table row to a new position.\r\n * @param indexFrom Number that specifies the index in the rows collection of the table row that is moved.\r\n * @param indexTo Number that specifies where the row is moved within the rows collection.\r\n */\r\n moveRow(indexFrom?: number, indexTo?: number): Object;\r\n /**\r\n * Creates a new row (tr) in the table, and adds the row to the rows collection.\r\n * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.\r\n */\r\n insertRow(index?: number): HTMLElement;\r\n}\r\ndeclare var HTMLTableSectionElement: {\r\n prototype: HTMLTableSectionElement;\r\n new (): HTMLTableSectionElement;\r\n}\r\n\r\ninterface DOML2DeprecatedListNumberingAndBulletStyle {\r\n type: string;\r\n}\r\n\r\ninterface HTMLInputElement extends HTMLElement, MSDataBindingExtensions {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n status: boolean;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n indeterminate: boolean;\r\n readOnly: boolean;\r\n size: number;\r\n loop: number;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Sets or retrieves the URL of the virtual reality modeling language (VRML) world to be displayed in the window.\r\n */\r\n vrml: string;\r\n /**\r\n * Sets or retrieves a lower resolution image to display.\r\n */\r\n lowsrc: string;\r\n /**\r\n * Sets or retrieves the vertical margin for the object.\r\n */\r\n vspace: number;\r\n /**\r\n * Sets or retrieves a comma-separated list of content types.\r\n */\r\n accept: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n defaultChecked: boolean;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Returns the value of the data at the cursor\'s current position.\r\n */\r\n value: string;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n border: string;\r\n dynsrc: string;\r\n /**\r\n * Sets or retrieves the state of the check box or radio button.\r\n */\r\n checked: boolean;\r\n /**\r\n * Sets or retrieves the width of the border to draw around the object.\r\n */\r\n hspace: number;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Returns the content type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n /**\r\n * Retrieves whether the object is fully loaded.\r\n */\r\n complete: boolean;\r\n start: string;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start: number, end: number): void;\r\n /**\r\n * Makes the selection equal to the current object.\r\n */\r\n select(): void;\r\n}\r\ndeclare var HTMLInputElement: {\r\n prototype: HTMLInputElement;\r\n new (): HTMLInputElement;\r\n}\r\n\r\ninterface HTMLAnchorElement extends HTMLElement, MSDataBindingExtensions {\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rel: string;\r\n /**\r\n * Contains the protocol of the URL.\r\n */\r\n protocol: string;\r\n /**\r\n * Sets or retrieves the substring of the href property that follows the question mark.\r\n */\r\n search: string;\r\n /**\r\n * Sets or retrieves the coordinates of the object.\r\n */\r\n coords: string;\r\n /**\r\n * Contains the hostname of a URL.\r\n */\r\n hostname: string;\r\n /**\r\n * Contains the pathname of the URL.\r\n */\r\n pathname: string;\r\n Methods: string;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n protocolLong: string;\r\n /**\r\n * Sets or retrieves a destination URL or an anchor point.\r\n */\r\n href: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the character set used to encode the object.\r\n */\r\n charset: string;\r\n /**\r\n * Sets or retrieves the language code of the object.\r\n */\r\n hreflang: string;\r\n /**\r\n * Sets or retrieves the port number associated with a URL.\r\n */\r\n port: string;\r\n /**\r\n * Contains the hostname and port values of the URL.\r\n */\r\n host: string;\r\n /**\r\n * Contains the anchor portion of the URL including the hash sign (#).\r\n */\r\n hash: string;\r\n nameProp: string;\r\n urn: string;\r\n /**\r\n * Sets or retrieves the relationship between the object and the destination of the link.\r\n */\r\n rev: string;\r\n /**\r\n * Sets or retrieves the shape of the object.\r\n */\r\n shape: string;\r\n type: string;\r\n mimeType: string;\r\n /** \r\n * Returns a string representation of an object.\r\n */\r\n toString(): string;\r\n}\r\ndeclare var HTMLAnchorElement: {\r\n prototype: HTMLAnchorElement;\r\n new (): HTMLAnchorElement;\r\n}\r\n\r\ninterface HTMLParamElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the value of an input parameter for an element.\r\n */\r\n value: string;\r\n /**\r\n * Sets or retrieves the name of an input parameter for an element.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the content type of the resource designated by the value attribute.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the data type of the value attribute.\r\n */\r\n valueType: string;\r\n}\r\ndeclare var HTMLParamElement: {\r\n prototype: HTMLParamElement;\r\n new (): HTMLParamElement;\r\n}\r\n\r\ninterface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired, SVGURIReference {\r\n y: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n x: SVGAnimatedLength;\r\n height: SVGAnimatedLength;\r\n}\r\ndeclare var SVGImageElement: {\r\n prototype: SVGImageElement;\r\n new (): SVGImageElement;\r\n}\r\n\r\ninterface SVGAnimatedNumber {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\ndeclare var SVGAnimatedNumber: {\r\n prototype: SVGAnimatedNumber;\r\n new (): SVGAnimatedNumber;\r\n}\r\n\r\ninterface PerformanceTiming {\r\n redirectStart: number;\r\n domainLookupEnd: number;\r\n responseStart: number;\r\n domComplete: number;\r\n domainLookupStart: number;\r\n loadEventStart: number;\r\n msFirstPaint: number;\r\n unloadEventEnd: number;\r\n fetchStart: number;\r\n requestStart: number;\r\n domInteractive: number;\r\n navigationStart: number;\r\n connectEnd: number;\r\n loadEventEnd: number;\r\n connectStart: number;\r\n responseEnd: number;\r\n domLoading: number;\r\n redirectEnd: number;\r\n unloadEventStart: number;\r\n domContentLoadedEventStart: number;\r\n domContentLoadedEventEnd: number;\r\n toJSON(): any;\r\n}\r\ndeclare var PerformanceTiming: {\r\n prototype: PerformanceTiming;\r\n new (): PerformanceTiming;\r\n}\r\n\r\ninterface HTMLPreElement extends HTMLElement, DOML2DeprecatedTextFlowControl {\r\n /**\r\n * Sets or gets a value that you can use to implement your own width functionality for the object.\r\n */\r\n width: number;\r\n /**\r\n * Indicates a citation by rendering text in italic type.\r\n */\r\n cite: string;\r\n}\r\ndeclare var HTMLPreElement: {\r\n prototype: HTMLPreElement;\r\n new (): HTMLPreElement;\r\n}\r\n\r\ninterface EventException {\r\n code: number;\r\n message: string;\r\n toString(): string;\r\n DISPATCH_REQUEST_ERR: number;\r\n UNSPECIFIED_EVENT_TYPE_ERR: number;\r\n}\r\ndeclare var EventException: {\r\n prototype: EventException;\r\n new (): EventException;\r\n DISPATCH_REQUEST_ERR: number;\r\n UNSPECIFIED_EVENT_TYPE_ERR: number;\r\n}\r\n\r\ninterface MSNavigatorDoNotTrack {\r\n msDoNotTrack: string;\r\n}\r\n\r\ninterface NavigatorOnLine {\r\n onLine: boolean;\r\n}\r\n\r\ninterface WindowLocalStorage {\r\n localStorage: Storage;\r\n}\r\n\r\ninterface SVGMetadataElement extends SVGElement {\r\n}\r\ndeclare var SVGMetadataElement: {\r\n prototype: SVGMetadataElement;\r\n new (): SVGMetadataElement;\r\n}\r\n\r\ninterface SVGPathSegArcRel extends SVGPathSeg {\r\n y: number;\r\n sweepFlag: boolean;\r\n r2: number;\r\n x: number;\r\n angle: number;\r\n r1: number;\r\n largeArcFlag: boolean;\r\n}\r\ndeclare var SVGPathSegArcRel: {\r\n prototype: SVGPathSegArcRel;\r\n new (): SVGPathSegArcRel;\r\n}\r\n\r\ninterface SVGPathSegMovetoAbs extends SVGPathSeg {\r\n y: number;\r\n x: number;\r\n}\r\ndeclare var SVGPathSegMovetoAbs: {\r\n prototype: SVGPathSegMovetoAbs;\r\n new (): SVGPathSegMovetoAbs;\r\n}\r\n\r\ninterface SVGStringList {\r\n numberOfItems: number;\r\n replaceItem(newItem: string, index: number): string;\r\n getItem(index: number): string;\r\n clear(): void;\r\n appendItem(newItem: string): string;\r\n initialize(newItem: string): string;\r\n removeItem(index: number): string;\r\n insertItemBefore(newItem: string, index: number): string;\r\n}\r\ndeclare var SVGStringList: {\r\n prototype: SVGStringList;\r\n new (): SVGStringList;\r\n}\r\n\r\ninterface XDomainRequest {\r\n timeout: number;\r\n onerror: (ev: Event) => any;\r\n addEventListener(type: "error", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onprogress: (ev: any) => any;\r\n addEventListener(type: "progress", listener: (ev: any) => any, useCapture?: boolean): void;\r\n ontimeout: (ev: Event) => any;\r\n addEventListener(type: "timeout", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n responseText: string;\r\n contentType: string;\r\n open(method: string, url: string): void;\r\n create(): XDomainRequest;\r\n abort(): void;\r\n send(data?: any): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var XDomainRequest: {\r\n prototype: XDomainRequest;\r\n new (): XDomainRequest;\r\n}\r\n\r\ninterface DOML2DeprecatedBackgroundColorStyle {\r\n bgColor: any;\r\n}\r\n\r\ninterface ElementTraversal {\r\n childElementCount: number;\r\n previousElementSibling: Element;\r\n lastElementChild: Element;\r\n nextElementSibling: Element;\r\n firstElementChild: Element;\r\n}\r\n\r\ninterface SVGLength {\r\n valueAsString: string;\r\n valueInSpecifiedUnits: number;\r\n value: number;\r\n unitType: number;\r\n newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;\r\n convertToSpecifiedUnits(unitType: number): void;\r\n SVG_LENGTHTYPE_NUMBER: number;\r\n SVG_LENGTHTYPE_CM: number;\r\n SVG_LENGTHTYPE_PC: number;\r\n SVG_LENGTHTYPE_PERCENTAGE: number;\r\n SVG_LENGTHTYPE_MM: number;\r\n SVG_LENGTHTYPE_PT: number;\r\n SVG_LENGTHTYPE_IN: number;\r\n SVG_LENGTHTYPE_EMS: number;\r\n SVG_LENGTHTYPE_PX: number;\r\n SVG_LENGTHTYPE_UNKNOWN: number;\r\n SVG_LENGTHTYPE_EXS: number;\r\n}\r\ndeclare var SVGLength: {\r\n prototype: SVGLength;\r\n new (): SVGLength;\r\n SVG_LENGTHTYPE_NUMBER: number;\r\n SVG_LENGTHTYPE_CM: number;\r\n SVG_LENGTHTYPE_PC: number;\r\n SVG_LENGTHTYPE_PERCENTAGE: number;\r\n SVG_LENGTHTYPE_MM: number;\r\n SVG_LENGTHTYPE_PT: number;\r\n SVG_LENGTHTYPE_IN: number;\r\n SVG_LENGTHTYPE_EMS: number;\r\n SVG_LENGTHTYPE_PX: number;\r\n SVG_LENGTHTYPE_UNKNOWN: number;\r\n SVG_LENGTHTYPE_EXS: number;\r\n}\r\n\r\ninterface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGAnimatedPoints, SVGTests, SVGExternalResourcesRequired {\r\n}\r\ndeclare var SVGPolygonElement: {\r\n prototype: SVGPolygonElement;\r\n new (): SVGPolygonElement;\r\n}\r\n\r\ninterface HTMLPhraseElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n}\r\ndeclare var HTMLPhraseElement: {\r\n prototype: HTMLPhraseElement;\r\n new (): HTMLPhraseElement;\r\n}\r\n\r\ninterface NavigatorStorageUtils {\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicRel extends SVGPathSeg {\r\n y: number;\r\n y1: number;\r\n x2: number;\r\n x: number;\r\n x1: number;\r\n y2: number;\r\n}\r\ndeclare var SVGPathSegCurvetoCubicRel: {\r\n prototype: SVGPathSegCurvetoCubicRel;\r\n new (): SVGPathSegCurvetoCubicRel;\r\n}\r\n\r\ninterface MSEventObj extends Event {\r\n nextPage: string;\r\n keyCode: number;\r\n toElement: Element;\r\n returnValue: any;\r\n dataFld: string;\r\n y: number;\r\n dataTransfer: DataTransfer;\r\n propertyName: string;\r\n url: string;\r\n offsetX: number;\r\n recordset: Object;\r\n screenX: number;\r\n buttonID: number;\r\n wheelDelta: number;\r\n reason: number;\r\n origin: string;\r\n data: string;\r\n srcFilter: Object;\r\n boundElements: HTMLCollection;\r\n cancelBubble: boolean;\r\n altLeft: boolean;\r\n behaviorCookie: number;\r\n bookmarks: BookmarkCollection;\r\n type: string;\r\n repeat: boolean;\r\n srcElement: Element;\r\n source: Window;\r\n fromElement: Element;\r\n offsetY: number;\r\n x: number;\r\n behaviorPart: number;\r\n qualifier: string;\r\n altKey: boolean;\r\n ctrlKey: boolean;\r\n clientY: number;\r\n shiftKey: boolean;\r\n shiftLeft: boolean;\r\n contentOverflow: boolean;\r\n screenY: number;\r\n ctrlLeft: boolean;\r\n button: number;\r\n srcUrn: string;\r\n clientX: number;\r\n actionURL: string;\r\n getAttribute(strAttributeName: string, lFlags?: number): any;\r\n setAttribute(strAttributeName: string, AttributeValue: any, lFlags?: number): void;\r\n removeAttribute(strAttributeName: string, lFlags?: number): boolean;\r\n}\r\ndeclare var MSEventObj: {\r\n prototype: MSEventObj;\r\n new (): MSEventObj;\r\n}\r\n\r\ninterface SVGTextContentElement extends SVGElement, SVGStylable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n textLength: SVGAnimatedLength;\r\n lengthAdjust: SVGAnimatedEnumeration;\r\n getCharNumAtPosition(point: SVGPoint): number;\r\n getStartPositionOfChar(charnum: number): SVGPoint;\r\n getExtentOfChar(charnum: number): SVGRect;\r\n getComputedTextLength(): number;\r\n getSubStringLength(charnum: number, nchars: number): number;\r\n selectSubString(charnum: number, nchars: number): void;\r\n getNumberOfChars(): number;\r\n getRotationOfChar(charnum: number): number;\r\n getEndPositionOfChar(charnum: number): SVGPoint;\r\n LENGTHADJUST_SPACING: number;\r\n LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n LENGTHADJUST_UNKNOWN: number;\r\n}\r\ndeclare var SVGTextContentElement: {\r\n prototype: SVGTextContentElement;\r\n new (): SVGTextContentElement;\r\n LENGTHADJUST_SPACING: number;\r\n LENGTHADJUST_SPACINGANDGLYPHS: number;\r\n LENGTHADJUST_UNKNOWN: number;\r\n}\r\n\r\ninterface DOML2DeprecatedColorProperty {\r\n color: string;\r\n}\r\n\r\ninterface HTMLCanvasElement extends HTMLElement {\r\n /**\r\n * Gets or sets the width of a canvas element on a document.\r\n */\r\n width: number;\r\n /**\r\n * Gets or sets the height of a canvas element on a document.\r\n */\r\n height: number;\r\n /**\r\n * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.\r\n * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.\r\n */\r\n toDataURL(type?: string, ...args: any[]): string;\r\n /**\r\n * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.\r\n * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");\r\n */\r\n getContext(contextId: "2d"): CanvasRenderingContext2D;\r\n getContext(contextId: string, ...args: any[]): any;\r\n}\r\ndeclare var HTMLCanvasElement: {\r\n prototype: HTMLCanvasElement;\r\n new (): HTMLCanvasElement;\r\n}\r\n\r\ninterface Location {\r\n hash: string;\r\n protocol: string;\r\n search: string;\r\n href: string;\r\n hostname: string;\r\n port: string;\r\n pathname: string;\r\n host: string;\r\n reload(flag?: boolean): void;\r\n replace(url: string): void;\r\n assign(url: string): void;\r\n toString(): string;\r\n}\r\ndeclare var Location: {\r\n prototype: Location;\r\n new (): Location;\r\n}\r\n\r\ninterface HTMLTitleElement extends HTMLElement {\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n}\r\ndeclare var HTMLTitleElement: {\r\n prototype: HTMLTitleElement;\r\n new (): HTMLTitleElement;\r\n}\r\n\r\ninterface HTMLStyleElement extends HTMLElement, LinkStyle {\r\n /**\r\n * Sets or retrieves the media type.\r\n */\r\n media: string;\r\n /**\r\n * Retrieves the CSS language in which the style sheet is written.\r\n */\r\n type: string;\r\n}\r\ndeclare var HTMLStyleElement: {\r\n prototype: HTMLStyleElement;\r\n new (): HTMLStyleElement;\r\n}\r\n\r\ninterface PerformanceEntry {\r\n name: string;\r\n startTime: number;\r\n duration: number;\r\n entryType: string;\r\n}\r\ndeclare var PerformanceEntry: {\r\n prototype: PerformanceEntry;\r\n new (): PerformanceEntry;\r\n}\r\n\r\ninterface SVGTransform {\r\n type: number;\r\n angle: number;\r\n matrix: SVGMatrix;\r\n setTranslate(tx: number, ty: number): void;\r\n setScale(sx: number, sy: number): void;\r\n setMatrix(matrix: SVGMatrix): void;\r\n setSkewY(angle: number): void;\r\n setRotate(angle: number, cx: number, cy: number): void;\r\n setSkewX(angle: number): void;\r\n SVG_TRANSFORM_SKEWX: number;\r\n SVG_TRANSFORM_UNKNOWN: number;\r\n SVG_TRANSFORM_SCALE: number;\r\n SVG_TRANSFORM_TRANSLATE: number;\r\n SVG_TRANSFORM_MATRIX: number;\r\n SVG_TRANSFORM_ROTATE: number;\r\n SVG_TRANSFORM_SKEWY: number;\r\n}\r\ndeclare var SVGTransform: {\r\n prototype: SVGTransform;\r\n new (): SVGTransform;\r\n SVG_TRANSFORM_SKEWX: number;\r\n SVG_TRANSFORM_UNKNOWN: number;\r\n SVG_TRANSFORM_SCALE: number;\r\n SVG_TRANSFORM_TRANSLATE: number;\r\n SVG_TRANSFORM_MATRIX: number;\r\n SVG_TRANSFORM_ROTATE: number;\r\n SVG_TRANSFORM_SKEWY: number;\r\n}\r\n\r\ninterface UIEvent extends Event {\r\n detail: number;\r\n view: Window;\r\n initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;\r\n}\r\ndeclare var UIEvent: {\r\n prototype: UIEvent;\r\n new (): UIEvent;\r\n}\r\n\r\ninterface SVGURIReference {\r\n href: SVGAnimatedString;\r\n}\r\n\r\ninterface SVGPathSeg {\r\n pathSegType: number;\r\n pathSegTypeAsLetter: string;\r\n PATHSEG_MOVETO_REL: number;\r\n PATHSEG_LINETO_VERTICAL_REL: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n PATHSEG_CURVETO_CUBIC_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n PATHSEG_LINETO_ABS: number;\r\n PATHSEG_CLOSEPATH: number;\r\n PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n PATHSEG_LINETO_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n PATHSEG_ARC_REL: number;\r\n PATHSEG_CURVETO_CUBIC_REL: number;\r\n PATHSEG_UNKNOWN: number;\r\n PATHSEG_LINETO_VERTICAL_ABS: number;\r\n PATHSEG_ARC_ABS: number;\r\n PATHSEG_MOVETO_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n}\r\ndeclare var SVGPathSeg: {\r\n prototype: SVGPathSeg;\r\n new (): SVGPathSeg;\r\n PATHSEG_MOVETO_REL: number;\r\n PATHSEG_LINETO_VERTICAL_REL: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_REL: number;\r\n PATHSEG_CURVETO_CUBIC_ABS: number;\r\n PATHSEG_LINETO_HORIZONTAL_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_ABS: number;\r\n PATHSEG_LINETO_ABS: number;\r\n PATHSEG_CLOSEPATH: number;\r\n PATHSEG_LINETO_HORIZONTAL_REL: number;\r\n PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;\r\n PATHSEG_LINETO_REL: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;\r\n PATHSEG_ARC_REL: number;\r\n PATHSEG_CURVETO_CUBIC_REL: number;\r\n PATHSEG_UNKNOWN: number;\r\n PATHSEG_LINETO_VERTICAL_ABS: number;\r\n PATHSEG_ARC_ABS: number;\r\n PATHSEG_MOVETO_ABS: number;\r\n PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;\r\n}\r\n\r\ninterface WheelEvent extends MouseEvent {\r\n deltaZ: number;\r\n deltaX: number;\r\n deltaMode: number;\r\n deltaY: number;\r\n initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;\r\n DOM_DELTA_PIXEL: number;\r\n DOM_DELTA_LINE: number;\r\n DOM_DELTA_PAGE: number;\r\n}\r\ndeclare var WheelEvent: {\r\n prototype: WheelEvent;\r\n new (): WheelEvent;\r\n DOM_DELTA_PIXEL: number;\r\n DOM_DELTA_LINE: number;\r\n DOM_DELTA_PAGE: number;\r\n}\r\n\r\ninterface MSEventAttachmentTarget {\r\n attachEvent(event: string, listener: EventListener): boolean;\r\n detachEvent(event: string, listener: EventListener): void;\r\n}\r\n\r\ninterface SVGNumber {\r\n value: number;\r\n}\r\ndeclare var SVGNumber: {\r\n prototype: SVGNumber;\r\n new (): SVGNumber;\r\n}\r\n\r\ninterface SVGPathElement extends SVGElement, SVGStylable, SVGAnimatedPathData, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n getPathSegAtLength(distance: number): number;\r\n getPointAtLength(distance: number): SVGPoint;\r\n createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;\r\n createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;\r\n createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;\r\n createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;\r\n createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;\r\n createSVGPathSegClosePath(): SVGPathSegClosePath;\r\n createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;\r\n createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;\r\n createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;\r\n createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;\r\n createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;\r\n createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;\r\n createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;\r\n createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;\r\n getTotalLength(): number;\r\n createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;\r\n createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;\r\n createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;\r\n createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;\r\n}\r\ndeclare var SVGPathElement: {\r\n prototype: SVGPathElement;\r\n new (): SVGPathElement;\r\n}\r\n\r\ninterface MSCompatibleInfo {\r\n version: string;\r\n userAgent: string;\r\n}\r\ndeclare var MSCompatibleInfo: {\r\n prototype: MSCompatibleInfo;\r\n new (): MSCompatibleInfo;\r\n}\r\n\r\ninterface Text extends CharacterData, MSNodeExtensions {\r\n wholeText: string;\r\n splitText(offset: number): Text;\r\n replaceWholeText(content: string): Text;\r\n}\r\ndeclare var Text: {\r\n prototype: Text;\r\n new (): Text;\r\n}\r\n\r\ninterface SVGAnimatedRect {\r\n animVal: SVGRect;\r\n baseVal: SVGRect;\r\n}\r\ndeclare var SVGAnimatedRect: {\r\n prototype: SVGAnimatedRect;\r\n new (): SVGAnimatedRect;\r\n}\r\n\r\ninterface CSSNamespaceRule extends CSSRule {\r\n namespaceURI: string;\r\n prefix: string;\r\n}\r\ndeclare var CSSNamespaceRule: {\r\n prototype: CSSNamespaceRule;\r\n new (): CSSNamespaceRule;\r\n}\r\n\r\ninterface SVGPathSegList {\r\n numberOfItems: number;\r\n replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n getItem(index: number): SVGPathSeg;\r\n clear(): void;\r\n appendItem(newItem: SVGPathSeg): SVGPathSeg;\r\n initialize(newItem: SVGPathSeg): SVGPathSeg;\r\n removeItem(index: number): SVGPathSeg;\r\n insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;\r\n}\r\ndeclare var SVGPathSegList: {\r\n prototype: SVGPathSegList;\r\n new (): SVGPathSegList;\r\n}\r\n\r\ninterface HTMLUnknownElement extends HTMLElement, MSDataBindingRecordSetReadonlyExtensions {\r\n}\r\ndeclare var HTMLUnknownElement: {\r\n prototype: HTMLUnknownElement;\r\n new (): HTMLUnknownElement;\r\n}\r\n\r\ninterface HTMLAudioElement extends HTMLMediaElement {\r\n}\r\ndeclare var HTMLAudioElement: {\r\n prototype: HTMLAudioElement;\r\n new (): HTMLAudioElement;\r\n}\r\n\r\ninterface MSImageResourceExtensions {\r\n dynsrc: string;\r\n vrml: string;\r\n lowsrc: string;\r\n start: string;\r\n loop: number;\r\n}\r\n\r\ninterface PositionError {\r\n code: number;\r\n message: string;\r\n toString(): string;\r\n POSITION_UNAVAILABLE: number;\r\n PERMISSION_DENIED: number;\r\n TIMEOUT: number;\r\n}\r\ndeclare var PositionError: {\r\n prototype: PositionError;\r\n new (): PositionError;\r\n POSITION_UNAVAILABLE: number;\r\n PERMISSION_DENIED: number;\r\n TIMEOUT: number;\r\n}\r\n\r\ninterface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment, DOML2DeprecatedBackgroundStyle, DOML2DeprecatedBackgroundColorStyle {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n /**\r\n * Sets or retrieves a list of header cells that provide information for the object.\r\n */\r\n headers: string;\r\n /**\r\n * Retrieves the position of the object in the cells collection of a row.\r\n */\r\n cellIndex: number;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.\r\n */\r\n borderColorLight: any;\r\n /**\r\n * Sets or retrieves the number columns in the table that the object should span.\r\n */\r\n colSpan: number;\r\n /**\r\n * Sets or retrieves the border color of the object. \r\n */\r\n borderColor: any;\r\n /**\r\n * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.\r\n */\r\n axis: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: any;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n /**\r\n * Sets or retrieves abbreviated text for the object.\r\n */\r\n abbr: string;\r\n /**\r\n * Sets or retrieves how many rows in a table the cell should span.\r\n */\r\n rowSpan: number;\r\n /**\r\n * Sets or retrieves the group of cells in a table to which the object\'s information applies.\r\n */\r\n scope: string;\r\n /**\r\n * Sets or retrieves the color for one of the two colors used to draw the 3-D border of the object.\r\n */\r\n borderColorDark: any;\r\n}\r\ndeclare var HTMLTableCellElement: {\r\n prototype: HTMLTableCellElement;\r\n new (): HTMLTableCellElement;\r\n}\r\n\r\ninterface SVGElementInstance extends EventTarget {\r\n previousSibling: SVGElementInstance;\r\n parentNode: SVGElementInstance;\r\n lastChild: SVGElementInstance;\r\n nextSibling: SVGElementInstance;\r\n childNodes: SVGElementInstanceList;\r\n correspondingUseElement: SVGUseElement;\r\n correspondingElement: SVGElement;\r\n firstChild: SVGElementInstance;\r\n}\r\ndeclare var SVGElementInstance: {\r\n prototype: SVGElementInstance;\r\n new (): SVGElementInstance;\r\n}\r\n\r\ninterface MSNamespaceInfoCollection {\r\n length: number;\r\n add(namespace?: string, urn?: string, implementationUrl?: any): Object;\r\n item(index: any): Object;\r\n [index: string]: Object;\r\n}\r\ndeclare var MSNamespaceInfoCollection: {\r\n prototype: MSNamespaceInfoCollection;\r\n new (): MSNamespaceInfoCollection;\r\n}\r\n\r\ninterface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n cx: SVGAnimatedLength;\r\n r: SVGAnimatedLength;\r\n cy: SVGAnimatedLength;\r\n}\r\ndeclare var SVGCircleElement: {\r\n prototype: SVGCircleElement;\r\n new (): SVGCircleElement;\r\n}\r\n\r\ninterface StyleSheetList {\r\n length: number;\r\n item(index?: number): StyleSheet;\r\n [index: number]: StyleSheet;\r\n}\r\ndeclare var StyleSheetList: {\r\n prototype: StyleSheetList;\r\n new (): StyleSheetList;\r\n}\r\n\r\ninterface CSSImportRule extends CSSRule {\r\n styleSheet: CSSStyleSheet;\r\n href: string;\r\n media: MediaList;\r\n}\r\ndeclare var CSSImportRule: {\r\n prototype: CSSImportRule;\r\n new (): CSSImportRule;\r\n}\r\n\r\ninterface CustomEvent extends Event {\r\n detail: Object;\r\n initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: Object): void;\r\n}\r\ndeclare var CustomEvent: {\r\n prototype: CustomEvent;\r\n new (): CustomEvent;\r\n}\r\n\r\ninterface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {\r\n /**\r\n * Sets or retrieves the current typeface family.\r\n */\r\n face: string;\r\n /**\r\n * Sets or retrieves the font size of the object.\r\n */\r\n size: number;\r\n}\r\ndeclare var HTMLBaseFontElement: {\r\n prototype: HTMLBaseFontElement;\r\n new (): HTMLBaseFontElement;\r\n}\r\n\r\ninterface HTMLTextAreaElement extends HTMLElement, MSDataBindingExtensions {\r\n /**\r\n * Retrieves or sets the text in the entry field of the textArea element.\r\n */\r\n value: string;\r\n /**\r\n * Sets or retrieves the value indicating whether the control is selected.\r\n */\r\n status: any;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Gets or sets the starting position or offset of a text selection.\r\n */\r\n selectionStart: number;\r\n /**\r\n * Sets or retrieves the number of horizontal rows contained in the object.\r\n */\r\n rows: number;\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n cols: number;\r\n /**\r\n * Sets or retrieves the value indicated whether the content of the object is read-only.\r\n */\r\n readOnly: boolean;\r\n /**\r\n * Sets or retrieves how to handle wordwrapping in the object.\r\n */\r\n wrap: string;\r\n /**\r\n * Gets or sets the end position or offset of a text selection.\r\n */\r\n selectionEnd: number;\r\n /**\r\n * Retrieves the type of control.\r\n */\r\n type: string;\r\n /**\r\n * Sets or retrieves the initial contents of the object.\r\n */\r\n defaultValue: string;\r\n /**\r\n * Creates a TextRange object for the element.\r\n */\r\n createTextRange(): TextRange;\r\n /**\r\n * Sets the start and end positions of a selection in a text field.\r\n * @param start The offset into the text field for the start of the selection.\r\n * @param end The offset into the text field for the end of the selection.\r\n */\r\n setSelectionRange(start: number, end: number): void;\r\n /**\r\n * Highlights the input area of a form element.\r\n */\r\n select(): void;\r\n}\r\ndeclare var HTMLTextAreaElement: {\r\n prototype: HTMLTextAreaElement;\r\n new (): HTMLTextAreaElement;\r\n}\r\n\r\ninterface Geolocation {\r\n clearWatch(watchId: number): void;\r\n getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;\r\n watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;\r\n}\r\ndeclare var Geolocation: {\r\n prototype: Geolocation;\r\n new (): Geolocation;\r\n}\r\n\r\ninterface DOML2DeprecatedMarginStyle {\r\n vspace: number;\r\n hspace: number;\r\n}\r\n\r\ninterface MSWindowModeless {\r\n dialogTop: any;\r\n dialogLeft: any;\r\n dialogWidth: any;\r\n dialogHeight: any;\r\n menuArguments: any;\r\n}\r\n\r\ninterface DOML2DeprecatedAlignmentStyle {\r\n align: string;\r\n}\r\n\r\ninterface HTMLMarqueeElement extends HTMLElement, MSDataBindingExtensions, DOML2DeprecatedBackgroundColorStyle {\r\n width: string;\r\n onbounce: (ev: Event) => any;\r\n addEventListener(type: "bounce", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n vspace: number;\r\n trueSpeed: boolean;\r\n scrollAmount: number;\r\n scrollDelay: number;\r\n behavior: string;\r\n height: string;\r\n loop: number;\r\n direction: string;\r\n hspace: number;\r\n onstart: (ev: Event) => any;\r\n addEventListener(type: "start", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onfinish: (ev: Event) => any;\r\n addEventListener(type: "finish", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n stop(): void;\r\n start(): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var HTMLMarqueeElement: {\r\n prototype: HTMLMarqueeElement;\r\n new (): HTMLMarqueeElement;\r\n}\r\n\r\ninterface SVGRect {\r\n y: number;\r\n width: number;\r\n x: number;\r\n height: number;\r\n}\r\ndeclare var SVGRect: {\r\n prototype: SVGRect;\r\n new (): SVGRect;\r\n}\r\n\r\ninterface MSNodeExtensions {\r\n swapNode(otherNode: Node): Node;\r\n removeNode(deep?: boolean): Node;\r\n replaceNode(replacement: Node): Node;\r\n}\r\n\r\ninterface History {\r\n length: number;\r\n back(distance?: any): void;\r\n forward(distance?: any): void;\r\n go(delta?: any): void;\r\n}\r\ndeclare var History: {\r\n prototype: History;\r\n new (): History;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {\r\n y: number;\r\n y1: number;\r\n x2: number;\r\n x: number;\r\n x1: number;\r\n y2: number;\r\n}\r\ndeclare var SVGPathSegCurvetoCubicAbs: {\r\n prototype: SVGPathSegCurvetoCubicAbs;\r\n new (): SVGPathSegCurvetoCubicAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {\r\n y: number;\r\n y1: number;\r\n x: number;\r\n x1: number;\r\n}\r\ndeclare var SVGPathSegCurvetoQuadraticAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticAbs;\r\n new (): SVGPathSegCurvetoQuadraticAbs;\r\n}\r\n\r\ninterface TimeRanges {\r\n length: number;\r\n start(index: number): number;\r\n end(index: number): number;\r\n}\r\ndeclare var TimeRanges: {\r\n prototype: TimeRanges;\r\n new (): TimeRanges;\r\n}\r\n\r\ninterface CSSRule {\r\n cssText: string;\r\n parentStyleSheet: CSSStyleSheet;\r\n parentRule: CSSRule;\r\n type: number;\r\n IMPORT_RULE: number;\r\n MEDIA_RULE: number;\r\n STYLE_RULE: number;\r\n NAMESPACE_RULE: number;\r\n PAGE_RULE: number;\r\n UNKNOWN_RULE: number;\r\n FONT_FACE_RULE: number;\r\n CHARSET_RULE: number;\r\n}\r\ndeclare var CSSRule: {\r\n prototype: CSSRule;\r\n new (): CSSRule;\r\n IMPORT_RULE: number;\r\n MEDIA_RULE: number;\r\n STYLE_RULE: number;\r\n NAMESPACE_RULE: number;\r\n PAGE_RULE: number;\r\n UNKNOWN_RULE: number;\r\n FONT_FACE_RULE: number;\r\n CHARSET_RULE: number;\r\n}\r\n\r\ninterface SVGPathSegLinetoAbs extends SVGPathSeg {\r\n y: number;\r\n x: number;\r\n}\r\ndeclare var SVGPathSegLinetoAbs: {\r\n prototype: SVGPathSegLinetoAbs;\r\n new (): SVGPathSegLinetoAbs;\r\n}\r\n\r\ninterface HTMLModElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the date and time of a modification to the object.\r\n */\r\n dateTime: string;\r\n /**\r\n * Sets or retrieves reference information about the object.\r\n */\r\n cite: string;\r\n}\r\ndeclare var HTMLModElement: {\r\n prototype: HTMLModElement;\r\n new (): HTMLModElement;\r\n}\r\n\r\ninterface SVGMatrix {\r\n e: number;\r\n c: number;\r\n a: number;\r\n b: number;\r\n d: number;\r\n f: number;\r\n multiply(secondMatrix: SVGMatrix): SVGMatrix;\r\n flipY(): SVGMatrix;\r\n skewY(angle: number): SVGMatrix;\r\n inverse(): SVGMatrix;\r\n scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;\r\n rotate(angle: number): SVGMatrix;\r\n flipX(): SVGMatrix;\r\n translate(x: number, y: number): SVGMatrix;\r\n scale(scaleFactor: number): SVGMatrix;\r\n rotateFromVector(x: number, y: number): SVGMatrix;\r\n skewX(angle: number): SVGMatrix;\r\n}\r\ndeclare var SVGMatrix: {\r\n prototype: SVGMatrix;\r\n new (): SVGMatrix;\r\n}\r\n\r\ninterface MSPopupWindow {\r\n document: Document;\r\n isOpen: boolean;\r\n show(x: number, y: number, w: number, h: number, element?: any): void;\r\n hide(): void;\r\n}\r\ndeclare var MSPopupWindow: {\r\n prototype: MSPopupWindow;\r\n new (): MSPopupWindow;\r\n}\r\n\r\ninterface BeforeUnloadEvent extends Event {\r\n returnValue: string;\r\n}\r\ndeclare var BeforeUnloadEvent: {\r\n prototype: BeforeUnloadEvent;\r\n new (): BeforeUnloadEvent;\r\n}\r\n\r\ninterface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired, SVGURIReference {\r\n y: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n animatedInstanceRoot: SVGElementInstance;\r\n instanceRoot: SVGElementInstance;\r\n x: SVGAnimatedLength;\r\n height: SVGAnimatedLength;\r\n}\r\ndeclare var SVGUseElement: {\r\n prototype: SVGUseElement;\r\n new (): SVGUseElement;\r\n}\r\n\r\ninterface Event {\r\n timeStamp: number;\r\n defaultPrevented: boolean;\r\n isTrusted: boolean;\r\n currentTarget: EventTarget;\r\n cancelBubble: boolean;\r\n target: EventTarget;\r\n eventPhase: number;\r\n cancelable: boolean;\r\n type: string;\r\n srcElement: Element;\r\n bubbles: boolean;\r\n initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;\r\n stopPropagation(): void;\r\n stopImmediatePropagation(): void;\r\n preventDefault(): void;\r\n CAPTURING_PHASE: number;\r\n AT_TARGET: number;\r\n BUBBLING_PHASE: number;\r\n}\r\ndeclare var Event: {\r\n prototype: Event;\r\n new (): Event;\r\n CAPTURING_PHASE: number;\r\n AT_TARGET: number;\r\n BUBBLING_PHASE: number;\r\n}\r\n\r\ninterface ImageData {\r\n width: number;\r\n data: Uint8Array;\r\n height: number;\r\n}\r\ndeclare var ImageData: {\r\n prototype: ImageData;\r\n new (): ImageData;\r\n}\r\n\r\ninterface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: any;\r\n /**\r\n * Sets or retrieves the alignment of the object relative to the display or table.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves the number of columns in the group.\r\n */\r\n span: number;\r\n}\r\ndeclare var HTMLTableColElement: {\r\n prototype: HTMLTableColElement;\r\n new (): HTMLTableColElement;\r\n}\r\n\r\ninterface SVGException {\r\n code: number;\r\n message: string;\r\n toString(): string;\r\n SVG_MATRIX_NOT_INVERTABLE: number;\r\n SVG_WRONG_TYPE_ERR: number;\r\n SVG_INVALID_VALUE_ERR: number;\r\n}\r\ndeclare var SVGException: {\r\n prototype: SVGException;\r\n new (): SVGException;\r\n SVG_MATRIX_NOT_INVERTABLE: number;\r\n SVG_WRONG_TYPE_ERR: number;\r\n SVG_INVALID_VALUE_ERR: number;\r\n}\r\n\r\ninterface SVGLinearGradientElement extends SVGGradientElement {\r\n y1: SVGAnimatedLength;\r\n x2: SVGAnimatedLength;\r\n x1: SVGAnimatedLength;\r\n y2: SVGAnimatedLength;\r\n}\r\ndeclare var SVGLinearGradientElement: {\r\n prototype: SVGLinearGradientElement;\r\n new (): SVGLinearGradientElement;\r\n}\r\n\r\ninterface HTMLTableAlignment {\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own ch functionality for the object.\r\n */\r\n ch: string;\r\n /**\r\n * Sets or retrieves how text and other content are vertically aligned within the object that contains them.\r\n */\r\n vAlign: string;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.\r\n */\r\n chOff: string;\r\n}\r\n\r\ninterface SVGAnimatedEnumeration {\r\n animVal: number;\r\n baseVal: number;\r\n}\r\ndeclare var SVGAnimatedEnumeration: {\r\n prototype: SVGAnimatedEnumeration;\r\n new (): SVGAnimatedEnumeration;\r\n}\r\n\r\ninterface DOML2DeprecatedSizeProperty {\r\n size: number;\r\n}\r\n\r\ninterface HTMLUListElement extends HTMLElement, DOML2DeprecatedListSpaceReduction, DOML2DeprecatedListNumberingAndBulletStyle {\r\n}\r\ndeclare var HTMLUListElement: {\r\n prototype: HTMLUListElement;\r\n new (): HTMLUListElement;\r\n}\r\n\r\ninterface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n y: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n ry: SVGAnimatedLength;\r\n rx: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n height: SVGAnimatedLength;\r\n}\r\ndeclare var SVGRectElement: {\r\n prototype: SVGRectElement;\r\n new (): SVGRectElement;\r\n}\r\n\r\ninterface ErrorEventHandler {\r\n (event: Event, source: string, fileno: number, columnNumber: number): void;\r\n (message: any, uri: string, lineNumber: number, columnNumber?: number): boolean;\r\n}\r\n\r\ninterface HTMLDivElement extends HTMLElement, MSDataBindingExtensions {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text. \r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\ndeclare var HTMLDivElement: {\r\n prototype: HTMLDivElement;\r\n new (): HTMLDivElement;\r\n}\r\n\r\ninterface DOML2DeprecatedBorderStyle {\r\n border: string;\r\n}\r\n\r\ninterface NamedNodeMap {\r\n length: number;\r\n removeNamedItemNS(namespaceURI: string, localName: string): Attr;\r\n item(index: number): Attr;\r\n [index: number]: Attr;\r\n removeNamedItem(name: string): Attr;\r\n getNamedItem(name: string): Attr;\r\n setNamedItem(arg: Attr): Attr;\r\n getNamedItemNS(namespaceURI: string, localName: string): Attr;\r\n setNamedItemNS(arg: Attr): Attr;\r\n}\r\ndeclare var NamedNodeMap: {\r\n prototype: NamedNodeMap;\r\n new (): NamedNodeMap;\r\n}\r\n\r\ninterface MediaList {\r\n length: number;\r\n mediaText: string;\r\n deleteMedium(oldMedium: string): void;\r\n appendMedium(newMedium: string): void;\r\n item(index: number): string;\r\n [index: number]: string;\r\n toString(): string;\r\n}\r\ndeclare var MediaList: {\r\n prototype: MediaList;\r\n new (): MediaList;\r\n}\r\n\r\ninterface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {\r\n y: number;\r\n x: number;\r\n}\r\ndeclare var SVGPathSegCurvetoQuadraticSmoothAbs: {\r\n prototype: SVGPathSegCurvetoQuadraticSmoothAbs;\r\n new (): SVGPathSegCurvetoQuadraticSmoothAbs;\r\n}\r\n\r\ninterface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {\r\n y: number;\r\n x2: number;\r\n x: number;\r\n y2: number;\r\n}\r\ndeclare var SVGPathSegCurvetoCubicSmoothRel: {\r\n prototype: SVGPathSegCurvetoCubicSmoothRel;\r\n new (): SVGPathSegCurvetoCubicSmoothRel;\r\n}\r\n\r\ninterface SVGLengthList {\r\n numberOfItems: number;\r\n replaceItem(newItem: SVGLength, index: number): SVGLength;\r\n getItem(index: number): SVGLength;\r\n clear(): void;\r\n appendItem(newItem: SVGLength): SVGLength;\r\n initialize(newItem: SVGLength): SVGLength;\r\n removeItem(index: number): SVGLength;\r\n insertItemBefore(newItem: SVGLength, index: number): SVGLength;\r\n}\r\ndeclare var SVGLengthList: {\r\n prototype: SVGLengthList;\r\n new (): SVGLengthList;\r\n}\r\n\r\ninterface ProcessingInstruction extends Node {\r\n target: string;\r\n data: string;\r\n}\r\ndeclare var ProcessingInstruction: {\r\n prototype: ProcessingInstruction;\r\n new (): ProcessingInstruction;\r\n}\r\n\r\ninterface MSWindowExtensions {\r\n status: string;\r\n onmouseleave: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n screenLeft: number;\r\n offscreenBuffering: any;\r\n maxConnectionsPerServer: number;\r\n onmouseenter: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n clipboardData: DataTransfer;\r\n defaultStatus: string;\r\n clientInformation: Navigator;\r\n closed: boolean;\r\n onhelp: (ev: Event) => any;\r\n addEventListener(type: "help", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n external: External;\r\n event: MSEventObj;\r\n onfocusout: (ev: FocusEvent) => any;\r\n addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n screenTop: number;\r\n onfocusin: (ev: FocusEvent) => any;\r\n addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n showModelessDialog(url?: string, argument?: any, options?: any): Window;\r\n navigate(url: string): void;\r\n resizeBy(x?: number, y?: number): void;\r\n item(index: any): any;\r\n resizeTo(x?: number, y?: number): void;\r\n createPopup(arguments?: any): MSPopupWindow;\r\n toStaticHTML(html: string): string;\r\n execScript(code: string, language?: string): any;\r\n msWriteProfilerMark(profilerMarkName: string): void;\r\n moveTo(x?: number, y?: number): void;\r\n moveBy(x?: number, y?: number): void;\r\n showHelp(url: string, helpArg?: any, features?: string): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\n\r\ninterface MSBehaviorUrnsCollection {\r\n length: number;\r\n item(index: number): string;\r\n}\r\ndeclare var MSBehaviorUrnsCollection: {\r\n prototype: MSBehaviorUrnsCollection;\r\n new (): MSBehaviorUrnsCollection;\r\n}\r\n\r\ninterface CSSFontFaceRule extends CSSRule {\r\n style: CSSStyleDeclaration;\r\n}\r\ndeclare var CSSFontFaceRule: {\r\n prototype: CSSFontFaceRule;\r\n new (): CSSFontFaceRule;\r\n}\r\n\r\ninterface DOML2DeprecatedBackgroundStyle {\r\n background: string;\r\n}\r\n\r\ninterface TextEvent extends UIEvent {\r\n inputMethod: number;\r\n data: string;\r\n locale: string;\r\n initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;\r\n DOM_INPUT_METHOD_KEYBOARD: number;\r\n DOM_INPUT_METHOD_DROP: number;\r\n DOM_INPUT_METHOD_IME: number;\r\n DOM_INPUT_METHOD_SCRIPT: number;\r\n DOM_INPUT_METHOD_VOICE: number;\r\n DOM_INPUT_METHOD_UNKNOWN: number;\r\n DOM_INPUT_METHOD_PASTE: number;\r\n DOM_INPUT_METHOD_HANDWRITING: number;\r\n DOM_INPUT_METHOD_OPTION: number;\r\n DOM_INPUT_METHOD_MULTIMODAL: number;\r\n}\r\ndeclare var TextEvent: {\r\n prototype: TextEvent;\r\n new (): TextEvent;\r\n DOM_INPUT_METHOD_KEYBOARD: number;\r\n DOM_INPUT_METHOD_DROP: number;\r\n DOM_INPUT_METHOD_IME: number;\r\n DOM_INPUT_METHOD_SCRIPT: number;\r\n DOM_INPUT_METHOD_VOICE: number;\r\n DOM_INPUT_METHOD_UNKNOWN: number;\r\n DOM_INPUT_METHOD_PASTE: number;\r\n DOM_INPUT_METHOD_HANDWRITING: number;\r\n DOM_INPUT_METHOD_OPTION: number;\r\n DOM_INPUT_METHOD_MULTIMODAL: number;\r\n}\r\n\r\ninterface DocumentFragment extends Node, NodeSelector, MSEventAttachmentTarget, MSNodeExtensions {\r\n}\r\ndeclare var DocumentFragment: {\r\n prototype: DocumentFragment;\r\n new (): DocumentFragment;\r\n}\r\n\r\ninterface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGAnimatedPoints, SVGTests, SVGExternalResourcesRequired {\r\n}\r\ndeclare var SVGPolylineElement: {\r\n prototype: SVGPolylineElement;\r\n new (): SVGPolylineElement;\r\n}\r\n\r\ninterface SVGAnimatedPathData {\r\n pathSegList: SVGPathSegList;\r\n}\r\n\r\ninterface Position {\r\n timestamp: number;\r\n coords: Coordinates;\r\n}\r\ndeclare var Position: {\r\n prototype: Position;\r\n new (): Position;\r\n}\r\n\r\ninterface BookmarkCollection {\r\n length: number;\r\n item(index: number): any;\r\n [index: number]: any;\r\n}\r\ndeclare var BookmarkCollection: {\r\n prototype: BookmarkCollection;\r\n new (): BookmarkCollection;\r\n}\r\n\r\ninterface PerformanceMark extends PerformanceEntry {\r\n}\r\ndeclare var PerformanceMark: {\r\n prototype: PerformanceMark;\r\n new (): PerformanceMark;\r\n}\r\n\r\ninterface CSSPageRule extends CSSRule {\r\n pseudoClass: string;\r\n selectorText: string;\r\n selector: string;\r\n style: CSSStyleDeclaration;\r\n}\r\ndeclare var CSSPageRule: {\r\n prototype: CSSPageRule;\r\n new (): CSSPageRule;\r\n}\r\n\r\ninterface HTMLBRElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.\r\n */\r\n clear: string;\r\n}\r\ndeclare var HTMLBRElement: {\r\n prototype: HTMLBRElement;\r\n new (): HTMLBRElement;\r\n}\r\n\r\ninterface MSNavigatorExtensions {\r\n userLanguage: string;\r\n plugins: MSPluginsCollection;\r\n cookieEnabled: boolean;\r\n appCodeName: string;\r\n cpuClass: string;\r\n appMinorVersion: string;\r\n connectionSpeed: number;\r\n browserLanguage: string;\r\n mimeTypes: MSMimeTypesCollection;\r\n systemLanguage: string;\r\n javaEnabled(): boolean;\r\n taintEnabled(): boolean;\r\n}\r\n\r\ninterface HTMLSpanElement extends HTMLElement, MSDataBindingExtensions {\r\n}\r\ndeclare var HTMLSpanElement: {\r\n prototype: HTMLSpanElement;\r\n new (): HTMLSpanElement;\r\n}\r\n\r\ninterface HTMLHeadElement extends HTMLElement {\r\n profile: string;\r\n}\r\ndeclare var HTMLHeadElement: {\r\n prototype: HTMLHeadElement;\r\n new (): HTMLHeadElement;\r\n}\r\n\r\ninterface HTMLHeadingElement extends HTMLElement, DOML2DeprecatedTextFlowControl {\r\n /**\r\n * Sets or retrieves a value that indicates the table alignment.\r\n */\r\n align: string;\r\n}\r\ndeclare var HTMLHeadingElement: {\r\n prototype: HTMLHeadingElement;\r\n new (): HTMLHeadingElement;\r\n}\r\n\r\ninterface HTMLFormElement extends HTMLElement, MSHTMLCollectionExtensions {\r\n /**\r\n * Sets or retrieves the number of objects in a collection.\r\n */\r\n length: number;\r\n /**\r\n * Sets or retrieves the window or frame at which to target content.\r\n */\r\n target: string;\r\n /**\r\n * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.\r\n */\r\n acceptCharset: string;\r\n /**\r\n * Sets or retrieves the encoding type for the form.\r\n */\r\n enctype: string;\r\n /**\r\n * Retrieves a collection, in source order, of all controls in a given form.\r\n */\r\n elements: HTMLCollection;\r\n /**\r\n * Sets or retrieves the URL to which the form content is sent for processing.\r\n */\r\n action: string;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves how to send the form data to the server.\r\n */\r\n method: string;\r\n /**\r\n * Sets or retrieves the MIME encoding for the form.\r\n */\r\n encoding: string;\r\n /**\r\n * Fires when the user resets a form.\r\n */\r\n reset(): void;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.\r\n * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.\r\n */\r\n item(name?: any, index?: any): any;\r\n /**\r\n * Fires when a FORM is about to be submitted.\r\n */\r\n submit(): void;\r\n /**\r\n * Retrieves a form object or an object from an elements collection.\r\n */\r\n namedItem(name: string): any;\r\n [name: string]: any;\r\n}\r\ndeclare var HTMLFormElement: {\r\n prototype: HTMLFormElement;\r\n new (): HTMLFormElement;\r\n}\r\n\r\ninterface SVGZoomAndPan {\r\n zoomAndPan: number;\r\n SVG_ZOOMANDPAN_MAGNIFY: number;\r\n SVG_ZOOMANDPAN_UNKNOWN: number;\r\n SVG_ZOOMANDPAN_DISABLE: number;\r\n}\r\ndeclare var SVGZoomAndPan: {\r\n prototype: SVGZoomAndPan;\r\n new (): SVGZoomAndPan;\r\n SVG_ZOOMANDPAN_MAGNIFY: number;\r\n SVG_ZOOMANDPAN_UNKNOWN: number;\r\n SVG_ZOOMANDPAN_DISABLE: number;\r\n}\r\n\r\ninterface HTMLMediaElement extends HTMLElement {\r\n /**\r\n * Gets the earliest possible position, in seconds, that the playback can begin.\r\n */\r\n initialTime: number;\r\n /**\r\n * Gets TimeRanges for the current media resource that has been played.\r\n */\r\n played: TimeRanges;\r\n /**\r\n * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.\r\n */\r\n currentSrc: string;\r\n readyState: any;\r\n /**\r\n * The autobuffer element is not supported by Internet Explorer 9. Use the preload element instead.\r\n */\r\n autobuffer: boolean;\r\n /**\r\n * Gets or sets a flag to specify whether playback should restart after it completes.\r\n */\r\n loop: boolean;\r\n /**\r\n * Gets information about whether the playback has ended or not.\r\n */\r\n ended: boolean;\r\n /**\r\n * Gets a collection of buffered time ranges.\r\n */\r\n buffered: TimeRanges;\r\n /**\r\n * Returns an object representing the current error state of the audio or video element.\r\n */\r\n error: MediaError;\r\n /**\r\n * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.\r\n */\r\n seekable: TimeRanges;\r\n /**\r\n * Gets or sets a value that indicates whether to start playing the media automatically.\r\n */\r\n autoplay: boolean;\r\n /**\r\n * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).\r\n */\r\n controls: boolean;\r\n /**\r\n * Gets or sets the volume level for audio portions of the media element.\r\n */\r\n volume: number;\r\n /**\r\n * The address or URL of the a media resource that is to be considered.\r\n */\r\n src: string;\r\n /**\r\n * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.\r\n */\r\n playbackRate: number;\r\n /**\r\n * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.\r\n */\r\n duration: number;\r\n /**\r\n * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.\r\n */\r\n muted: boolean;\r\n /**\r\n * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.\r\n */\r\n defaultPlaybackRate: number;\r\n /**\r\n * Gets a flag that specifies whether playback is paused.\r\n */\r\n paused: boolean;\r\n /**\r\n * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.\r\n */\r\n seeking: boolean;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n currentTime: number;\r\n /**\r\n * Gets or sets the current playback position, in seconds.\r\n */\r\n preload: string;\r\n /**\r\n * Gets the current network activity for the element.\r\n */\r\n networkState: number;\r\n /**\r\n * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.\r\n */\r\n pause(): void;\r\n /**\r\n * Loads and starts playback of a media resource.\r\n */\r\n play(): void;\r\n /**\r\n * Fires immediately after the client loads the object.\r\n */\r\n load(): void;\r\n /**\r\n * Returns a string that specifies whether the client can play a given media resource type.\r\n */\r\n canPlayType(type: string): string;\r\n HAVE_METADATA: number;\r\n HAVE_CURRENT_DATA: number;\r\n HAVE_NOTHING: number;\r\n NETWORK_NO_SOURCE: number;\r\n HAVE_ENOUGH_DATA: number;\r\n NETWORK_EMPTY: number;\r\n NETWORK_LOADING: number;\r\n NETWORK_IDLE: number;\r\n HAVE_FUTURE_DATA: number;\r\n}\r\ndeclare var HTMLMediaElement: {\r\n prototype: HTMLMediaElement;\r\n new (): HTMLMediaElement;\r\n HAVE_METADATA: number;\r\n HAVE_CURRENT_DATA: number;\r\n HAVE_NOTHING: number;\r\n NETWORK_NO_SOURCE: number;\r\n HAVE_ENOUGH_DATA: number;\r\n NETWORK_EMPTY: number;\r\n NETWORK_LOADING: number;\r\n NETWORK_IDLE: number;\r\n HAVE_FUTURE_DATA: number;\r\n}\r\n\r\ninterface ElementCSSInlineStyle {\r\n runtimeStyle: MSStyleCSSProperties;\r\n currentStyle: MSCurrentStyleCSSProperties;\r\n doScroll(component?: any): void;\r\n componentFromPoint(x: number, y: number): string;\r\n}\r\n\r\ninterface DOMParser {\r\n parseFromString(source: string, mimeType: string): Document;\r\n}\r\ndeclare var DOMParser: {\r\n prototype: DOMParser;\r\n new (): DOMParser;\r\n}\r\n\r\ninterface MSMimeTypesCollection {\r\n length: number;\r\n}\r\ndeclare var MSMimeTypesCollection: {\r\n prototype: MSMimeTypesCollection;\r\n new (): MSMimeTypesCollection;\r\n}\r\n\r\ninterface StyleSheet {\r\n disabled: boolean;\r\n ownerNode: Node;\r\n parentStyleSheet: StyleSheet;\r\n href: string;\r\n media: MediaList;\r\n type: string;\r\n title: string;\r\n}\r\ndeclare var StyleSheet: {\r\n prototype: StyleSheet;\r\n new (): StyleSheet;\r\n}\r\n\r\ninterface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {\r\n startOffset: SVGAnimatedLength;\r\n method: SVGAnimatedEnumeration;\r\n spacing: SVGAnimatedEnumeration;\r\n TEXTPATH_SPACINGTYPE_EXACT: number;\r\n TEXTPATH_METHODTYPE_STRETCH: number;\r\n TEXTPATH_SPACINGTYPE_AUTO: number;\r\n TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n TEXTPATH_METHODTYPE_ALIGN: number;\r\n}\r\ndeclare var SVGTextPathElement: {\r\n prototype: SVGTextPathElement;\r\n new (): SVGTextPathElement;\r\n TEXTPATH_SPACINGTYPE_EXACT: number;\r\n TEXTPATH_METHODTYPE_STRETCH: number;\r\n TEXTPATH_SPACINGTYPE_AUTO: number;\r\n TEXTPATH_SPACINGTYPE_UNKNOWN: number;\r\n TEXTPATH_METHODTYPE_UNKNOWN: number;\r\n TEXTPATH_METHODTYPE_ALIGN: number;\r\n}\r\n\r\ninterface HTMLDTElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves whether the browser automatically performs wordwrap.\r\n */\r\n noWrap: boolean;\r\n}\r\ndeclare var HTMLDTElement: {\r\n prototype: HTMLDTElement;\r\n new (): HTMLDTElement;\r\n}\r\n\r\ninterface NodeList {\r\n length: number;\r\n item(index: number): Node;\r\n [index: number]: Node;\r\n}\r\ndeclare var NodeList: {\r\n prototype: NodeList;\r\n new (): NodeList;\r\n}\r\n\r\ninterface NodeListOf extends NodeList {\r\n length: number;\r\n item(index: number): TNode;\r\n [index: number]: TNode;\r\n}\r\n\r\ninterface XMLSerializer {\r\n serializeToString(target: Node): string;\r\n}\r\ndeclare var XMLSerializer: {\r\n prototype: XMLSerializer;\r\n new (): XMLSerializer;\r\n}\r\n\r\ninterface PerformanceMeasure extends PerformanceEntry {\r\n}\r\ndeclare var PerformanceMeasure: {\r\n prototype: PerformanceMeasure;\r\n new (): PerformanceMeasure;\r\n}\r\n\r\ninterface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGExternalResourcesRequired, SVGURIReference {\r\n spreadMethod: SVGAnimatedEnumeration;\r\n gradientTransform: SVGAnimatedTransformList;\r\n gradientUnits: SVGAnimatedEnumeration;\r\n SVG_SPREADMETHOD_REFLECT: number;\r\n SVG_SPREADMETHOD_PAD: number;\r\n SVG_SPREADMETHOD_UNKNOWN: number;\r\n SVG_SPREADMETHOD_REPEAT: number;\r\n}\r\ndeclare var SVGGradientElement: {\r\n prototype: SVGGradientElement;\r\n new (): SVGGradientElement;\r\n SVG_SPREADMETHOD_REFLECT: number;\r\n SVG_SPREADMETHOD_PAD: number;\r\n SVG_SPREADMETHOD_UNKNOWN: number;\r\n SVG_SPREADMETHOD_REPEAT: number;\r\n}\r\n\r\ninterface NodeFilter {\r\n acceptNode(n: Node): number;\r\n SHOW_ENTITY_REFERENCE: number;\r\n SHOW_NOTATION: number;\r\n SHOW_ENTITY: number;\r\n SHOW_DOCUMENT: number;\r\n SHOW_PROCESSING_INSTRUCTION: number;\r\n FILTER_REJECT: number;\r\n SHOW_CDATA_SECTION: number;\r\n FILTER_ACCEPT: number;\r\n SHOW_ALL: number;\r\n SHOW_DOCUMENT_TYPE: number;\r\n SHOW_TEXT: number;\r\n SHOW_ELEMENT: number;\r\n SHOW_COMMENT: number;\r\n FILTER_SKIP: number;\r\n SHOW_ATTRIBUTE: number;\r\n SHOW_DOCUMENT_FRAGMENT: number;\r\n}\r\ndeclare var NodeFilter: {\r\n prototype: NodeFilter;\r\n new (): NodeFilter;\r\n SHOW_ENTITY_REFERENCE: number;\r\n SHOW_NOTATION: number;\r\n SHOW_ENTITY: number;\r\n SHOW_DOCUMENT: number;\r\n SHOW_PROCESSING_INSTRUCTION: number;\r\n FILTER_REJECT: number;\r\n SHOW_CDATA_SECTION: number;\r\n FILTER_ACCEPT: number;\r\n SHOW_ALL: number;\r\n SHOW_DOCUMENT_TYPE: number;\r\n SHOW_TEXT: number;\r\n SHOW_ELEMENT: number;\r\n SHOW_COMMENT: number;\r\n FILTER_SKIP: number;\r\n SHOW_ATTRIBUTE: number;\r\n SHOW_DOCUMENT_FRAGMENT: number;\r\n}\r\n\r\ninterface SVGNumberList {\r\n numberOfItems: number;\r\n replaceItem(newItem: SVGNumber, index: number): SVGNumber;\r\n getItem(index: number): SVGNumber;\r\n clear(): void;\r\n appendItem(newItem: SVGNumber): SVGNumber;\r\n initialize(newItem: SVGNumber): SVGNumber;\r\n removeItem(index: number): SVGNumber;\r\n insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;\r\n}\r\ndeclare var SVGNumberList: {\r\n prototype: SVGNumberList;\r\n new (): SVGNumberList;\r\n}\r\n\r\ninterface MediaError {\r\n code: number;\r\n MEDIA_ERR_ABORTED: number;\r\n MEDIA_ERR_NETWORK: number;\r\n MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n MEDIA_ERR_DECODE: number;\r\n}\r\ndeclare var MediaError: {\r\n prototype: MediaError;\r\n new (): MediaError;\r\n MEDIA_ERR_ABORTED: number;\r\n MEDIA_ERR_NETWORK: number;\r\n MEDIA_ERR_SRC_NOT_SUPPORTED: number;\r\n MEDIA_ERR_DECODE: number;\r\n}\r\n\r\ninterface HTMLFieldSetElement extends HTMLElement {\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n}\r\ndeclare var HTMLFieldSetElement: {\r\n prototype: HTMLFieldSetElement;\r\n new (): HTMLFieldSetElement;\r\n}\r\n\r\ninterface HTMLBGSoundElement extends HTMLElement {\r\n /**\r\n * Sets or gets the value indicating how the volume of the background sound is divided between the left speaker and the right speaker.\r\n */\r\n balance: any;\r\n /**\r\n * Sets or gets the volume setting for the sound. \r\n */\r\n volume: any;\r\n /**\r\n * Sets or gets the URL of a sound to play.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the number of times a sound or video clip will loop when activated.\r\n */\r\n loop: number;\r\n}\r\ndeclare var HTMLBGSoundElement: {\r\n prototype: HTMLBGSoundElement;\r\n new (): HTMLBGSoundElement;\r\n}\r\n\r\ninterface HTMLElement extends Element, ElementCSSInlineStyle, MSEventAttachmentTarget, MSNodeExtensions {\r\n onmouseleave: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onbeforecut: (ev: DragEvent) => any;\r\n addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onkeydown: (ev: KeyboardEvent) => any;\r\n addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n onmove: (ev: MSEventObj) => any;\r\n addEventListener(type: "move", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onkeyup: (ev: KeyboardEvent) => any;\r\n addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n onreset: (ev: Event) => any;\r\n addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onhelp: (ev: Event) => any;\r\n addEventListener(type: "help", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n ondragleave: (ev: DragEvent) => any;\r\n addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n className: string;\r\n onfocusin: (ev: FocusEvent) => any;\r\n addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n onseeked: (ev: Event) => any;\r\n addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n recordNumber: any;\r\n title: string;\r\n parentTextEdit: Element;\r\n outerHTML: string;\r\n ondurationchange: (ev: Event) => any;\r\n addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n offsetHeight: number;\r\n all: HTMLCollection;\r\n onblur: (ev: FocusEvent) => any;\r\n addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n dir: string;\r\n onemptied: (ev: Event) => any;\r\n addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onseeking: (ev: Event) => any;\r\n addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n oncanplay: (ev: Event) => any;\r\n addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n ondeactivate: (ev: UIEvent) => any;\r\n addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n ondatasetchanged: (ev: MSEventObj) => any;\r\n addEventListener(type: "datasetchanged", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onrowsdelete: (ev: MSEventObj) => any;\r\n addEventListener(type: "rowsdelete", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n sourceIndex: number;\r\n onloadstart: (ev: Event) => any;\r\n addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onlosecapture: (ev: MSEventObj) => any;\r\n addEventListener(type: "losecapture", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n ondragenter: (ev: DragEvent) => any;\r\n addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n oncontrolselect: (ev: MSEventObj) => any;\r\n addEventListener(type: "controlselect", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onsubmit: (ev: Event) => any;\r\n addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n behaviorUrns: MSBehaviorUrnsCollection;\r\n scopeName: string;\r\n onchange: (ev: Event) => any;\r\n addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n id: string;\r\n onlayoutcomplete: (ev: MSEventObj) => any;\r\n addEventListener(type: "layoutcomplete", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n uniqueID: string;\r\n onbeforeactivate: (ev: UIEvent) => any;\r\n addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n oncanplaythrough: (ev: Event) => any;\r\n addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onbeforeupdate: (ev: MSEventObj) => any;\r\n addEventListener(type: "beforeupdate", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onfilterchange: (ev: MSEventObj) => any;\r\n addEventListener(type: "filterchange", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n offsetParent: Element;\r\n ondatasetcomplete: (ev: MSEventObj) => any;\r\n addEventListener(type: "datasetcomplete", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onsuspend: (ev: Event) => any;\r\n addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n readyState: any;\r\n onmouseenter: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n innerText: string;\r\n onerrorupdate: (ev: MSEventObj) => any;\r\n addEventListener(type: "errorupdate", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onmouseout: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n parentElement: HTMLElement;\r\n onmousewheel: (ev: MouseWheelEvent) => any;\r\n addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\n onvolumechange: (ev: Event) => any;\r\n addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n oncellchange: (ev: MSEventObj) => any;\r\n addEventListener(type: "cellchange", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onrowexit: (ev: MSEventObj) => any;\r\n addEventListener(type: "rowexit", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onrowsinserted: (ev: MSEventObj) => any;\r\n addEventListener(type: "rowsinserted", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onpropertychange: (ev: MSEventObj) => any;\r\n addEventListener(type: "propertychange", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n filters: Object;\r\n children: HTMLCollection;\r\n ondragend: (ev: DragEvent) => any;\r\n addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onbeforepaste: (ev: DragEvent) => any;\r\n addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n ondragover: (ev: DragEvent) => any;\r\n addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n offsetTop: number;\r\n onmouseup: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n ondragstart: (ev: DragEvent) => any;\r\n addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onbeforecopy: (ev: DragEvent) => any;\r\n addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n ondrag: (ev: DragEvent) => any;\r\n addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n innerHTML: string;\r\n onmouseover: (ev: MouseEvent) => any;\r\n addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n lang: string;\r\n uniqueNumber: number;\r\n onpause: (ev: Event) => any;\r\n addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n tagUrn: string;\r\n onmousedown: (ev: MouseEvent) => any;\r\n addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onclick: (ev: MouseEvent) => any;\r\n addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onwaiting: (ev: Event) => any;\r\n addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onresizestart: (ev: MSEventObj) => any;\r\n addEventListener(type: "resizestart", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n offsetLeft: number;\r\n isTextEdit: boolean;\r\n isDisabled: boolean;\r\n onpaste: (ev: DragEvent) => any;\r\n addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n canHaveHTML: boolean;\r\n onmoveend: (ev: MSEventObj) => any;\r\n addEventListener(type: "moveend", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n language: string;\r\n onstalled: (ev: Event) => any;\r\n addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onmousemove: (ev: MouseEvent) => any;\r\n addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n style: MSStyleCSSProperties;\r\n isContentEditable: boolean;\r\n onbeforeeditfocus: (ev: MSEventObj) => any;\r\n addEventListener(type: "beforeeditfocus", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onratechange: (ev: Event) => any;\r\n addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n contentEditable: string;\r\n tabIndex: number;\r\n document: Document;\r\n onprogress: (ev: any) => any;\r\n addEventListener(type: "progress", listener: (ev: any) => any, useCapture?: boolean): void;\r\n ondblclick: (ev: MouseEvent) => any;\r\n addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n oncontextmenu: (ev: MouseEvent) => any;\r\n addEventListener(type: "contextmenu", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\n onloadedmetadata: (ev: Event) => any;\r\n addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onafterupdate: (ev: MSEventObj) => any;\r\n addEventListener(type: "afterupdate", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onerror: (ev: Event) => any;\r\n addEventListener(type: "error", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onplay: (ev: Event) => any;\r\n addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onresizeend: (ev: MSEventObj) => any;\r\n addEventListener(type: "resizeend", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onplaying: (ev: Event) => any;\r\n addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n isMultiLine: boolean;\r\n onfocusout: (ev: FocusEvent) => any;\r\n addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n onabort: (ev: UIEvent) => any;\r\n addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n ondataavailable: (ev: MSEventObj) => any;\r\n addEventListener(type: "dataavailable", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n hideFocus: boolean;\r\n onreadystatechange: (ev: Event) => any;\r\n addEventListener(type: "readystatechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onkeypress: (ev: KeyboardEvent) => any;\r\n addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\n onloadeddata: (ev: Event) => any;\r\n addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onbeforedeactivate: (ev: UIEvent) => any;\r\n addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n outerText: string;\r\n disabled: boolean;\r\n onactivate: (ev: UIEvent) => any;\r\n addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n accessKey: string;\r\n onmovestart: (ev: MSEventObj) => any;\r\n addEventListener(type: "movestart", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onselectstart: (ev: Event) => any;\r\n addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onfocus: (ev: FocusEvent) => any;\r\n addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\n ontimeupdate: (ev: Event) => any;\r\n addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onresize: (ev: UIEvent) => any;\r\n addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n oncut: (ev: DragEvent) => any;\r\n addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onselect: (ev: UIEvent) => any;\r\n addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n ondrop: (ev: DragEvent) => any;\r\n addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n offsetWidth: number;\r\n oncopy: (ev: DragEvent) => any;\r\n addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\n onended: (ev: Event) => any;\r\n addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onscroll: (ev: UIEvent) => any;\r\n addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\n onrowenter: (ev: MSEventObj) => any;\r\n addEventListener(type: "rowenter", listener: (ev: MSEventObj) => any, useCapture?: boolean): void;\r\n onload: (ev: Event) => any;\r\n addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n canHaveChildren: boolean;\r\n oninput: (ev: Event) => any;\r\n addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n dragDrop(): boolean;\r\n scrollIntoView(top?: boolean): void;\r\n addFilter(filter: Object): void;\r\n setCapture(containerCapture?: boolean): void;\r\n focus(): void;\r\n getAdjacentText(where: string): string;\r\n insertAdjacentText(where: string, text: string): void;\r\n getElementsByClassName(classNames: string): NodeList;\r\n setActive(): void;\r\n removeFilter(filter: Object): void;\r\n blur(): void;\r\n clearAttributes(): void;\r\n releaseCapture(): void;\r\n createControlRange(): ControlRangeCollection;\r\n removeBehavior(cookie: number): boolean;\r\n contains(child: HTMLElement): boolean;\r\n click(): void;\r\n insertAdjacentElement(position: string, insertedElement: Element): Element;\r\n mergeAttributes(source: HTMLElement, preserveIdentity?: boolean): void;\r\n replaceAdjacentText(where: string, newText: string): string;\r\n applyElement(apply: Element, where?: string): Element;\r\n addBehavior(bstrUrl: string, factory?: any): number;\r\n insertAdjacentHTML(where: string, html: string): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var HTMLElement: {\r\n prototype: HTMLElement;\r\n new (): HTMLElement;\r\n}\r\n\r\ninterface Comment extends CharacterData {\r\n text: string;\r\n}\r\ndeclare var Comment: {\r\n prototype: Comment;\r\n new (): Comment;\r\n}\r\n\r\ninterface PerformanceResourceTiming extends PerformanceEntry {\r\n redirectStart: number;\r\n redirectEnd: number;\r\n domainLookupEnd: number;\r\n responseStart: number;\r\n domainLookupStart: number;\r\n fetchStart: number;\r\n requestStart: number;\r\n connectEnd: number;\r\n connectStart: number;\r\n initiatorType: string;\r\n responseEnd: number;\r\n}\r\ndeclare var PerformanceResourceTiming: {\r\n prototype: PerformanceResourceTiming;\r\n new (): PerformanceResourceTiming;\r\n}\r\n\r\ninterface CanvasPattern {\r\n}\r\ndeclare var CanvasPattern: {\r\n prototype: CanvasPattern;\r\n new (): CanvasPattern;\r\n}\r\n\r\ninterface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: number;\r\n /**\r\n * Sets or retrieves how the object is aligned with adjacent text.\r\n */\r\n align: string;\r\n /**\r\n * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.\r\n */\r\n noShade: boolean;\r\n}\r\ndeclare var HTMLHRElement: {\r\n prototype: HTMLHRElement;\r\n new (): HTMLHRElement;\r\n}\r\n\r\ninterface HTMLObjectElement extends HTMLElement, GetSVGDocument, DOML2DeprecatedMarginStyle, DOML2DeprecatedBorderStyle, DOML2DeprecatedAlignmentStyle, MSDataBindingExtensions, MSDataBindingRecordSetExtensions {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Sets or retrieves the Internet media type for the code associated with the object.\r\n */\r\n codeType: string;\r\n /**\r\n * Retrieves the contained object.\r\n */\r\n object: Object;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the URL of the file containing the compiled Java class.\r\n */\r\n code: string;\r\n /**\r\n * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.\r\n */\r\n archive: string;\r\n /**\r\n * Sets or retrieves a message to be displayed while an object is loading.\r\n */\r\n standby: string;\r\n /**\r\n * Sets or retrieves a text alternative to the graphic.\r\n */\r\n alt: string;\r\n /**\r\n * Sets or retrieves the class identifier for the object.\r\n */\r\n classid: string;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.\r\n */\r\n useMap: string;\r\n /**\r\n * Sets or retrieves the URL that references the data of the object.\r\n */\r\n data: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Retrieves the document object of the page or frame.\r\n */\r\n contentDocument: Document;\r\n /**\r\n * Gets or sets the optional alternative HTML script to execute if the object fails to load.\r\n */\r\n altHtml: string;\r\n /**\r\n * Sets or retrieves the URL of the component.\r\n */\r\n codeBase: string;\r\n declare: boolean;\r\n /**\r\n * Sets or retrieves the MIME type of the object.\r\n */\r\n type: string;\r\n /**\r\n * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.\r\n */\r\n BaseHref: string;\r\n}\r\ndeclare var HTMLObjectElement: {\r\n prototype: HTMLObjectElement;\r\n new (): HTMLObjectElement;\r\n}\r\n\r\ninterface HTMLEmbedElement extends HTMLElement, GetSVGDocument {\r\n /**\r\n * Sets or retrieves the width of the object.\r\n */\r\n width: string;\r\n /**\r\n * Retrieves the palette used for the embedded document.\r\n */\r\n palette: string;\r\n /**\r\n * Sets or retrieves a URL to be loaded by the object.\r\n */\r\n src: string;\r\n /**\r\n * Sets or retrieves the name of the object.\r\n */\r\n name: string;\r\n /**\r\n * Retrieves the URL of the plug-in used to view an embedded document.\r\n */\r\n pluginspage: string;\r\n /**\r\n * Sets or retrieves the height of the object.\r\n */\r\n height: string;\r\n /**\r\n * Sets or retrieves the height and width units of the embed object.\r\n */\r\n units: string;\r\n}\r\ndeclare var HTMLEmbedElement: {\r\n prototype: HTMLEmbedElement;\r\n new (): HTMLEmbedElement;\r\n}\r\n\r\ninterface StorageEvent extends Event {\r\n oldValue: any;\r\n newValue: any;\r\n url: string;\r\n storageArea: Storage;\r\n key: string;\r\n initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void;\r\n}\r\ndeclare var StorageEvent: {\r\n prototype: StorageEvent;\r\n new (): StorageEvent;\r\n}\r\n\r\ninterface CharacterData extends Node {\r\n length: number;\r\n data: string;\r\n deleteData(offset: number, count: number): void;\r\n replaceData(offset: number, count: number, arg: string): void;\r\n appendData(arg: string): void;\r\n insertData(offset: number, arg: string): void;\r\n substringData(offset: number, count: number): string;\r\n}\r\ndeclare var CharacterData: {\r\n prototype: CharacterData;\r\n new (): CharacterData;\r\n}\r\n\r\ninterface HTMLOptGroupElement extends HTMLElement, MSDataBindingExtensions {\r\n /**\r\n * Sets or retrieves the ordinal position of an option in a list box.\r\n */\r\n index: number;\r\n /**\r\n * Sets or retrieves the status of an option.\r\n */\r\n defaultSelected: boolean;\r\n /**\r\n * Sets or retrieves the text string specified by the option tag.\r\n */\r\n text: string;\r\n /**\r\n * Sets or retrieves the value which is returned to the server when the form control is submitted.\r\n */\r\n value: string;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves a value that you can use to implement your own label functionality for the object.\r\n */\r\n label: string;\r\n /**\r\n * Sets or retrieves whether the option in the list box is the default item.\r\n */\r\n selected: boolean;\r\n}\r\ndeclare var HTMLOptGroupElement: {\r\n prototype: HTMLOptGroupElement;\r\n new (): HTMLOptGroupElement;\r\n}\r\n\r\ninterface HTMLIsIndexElement extends HTMLElement {\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in. \r\n */\r\n form: HTMLFormElement;\r\n /**\r\n * Sets or retrieves the URL to which the form content is sent for processing.\r\n */\r\n action: string;\r\n prompt: string;\r\n}\r\ndeclare var HTMLIsIndexElement: {\r\n prototype: HTMLIsIndexElement;\r\n new (): HTMLIsIndexElement;\r\n}\r\n\r\ninterface SVGPathSegLinetoRel extends SVGPathSeg {\r\n y: number;\r\n x: number;\r\n}\r\ndeclare var SVGPathSegLinetoRel: {\r\n prototype: SVGPathSegLinetoRel;\r\n new (): SVGPathSegLinetoRel;\r\n}\r\n\r\ninterface DOMException {\r\n code: number;\r\n message: string;\r\n toString(): string;\r\n HIERARCHY_REQUEST_ERR: number;\r\n NO_MODIFICATION_ALLOWED_ERR: number;\r\n INVALID_MODIFICATION_ERR: number;\r\n NAMESPACE_ERR: number;\r\n INVALID_CHARACTER_ERR: number;\r\n TYPE_MISMATCH_ERR: number;\r\n ABORT_ERR: number;\r\n INVALID_STATE_ERR: number;\r\n SECURITY_ERR: number;\r\n NETWORK_ERR: number;\r\n WRONG_DOCUMENT_ERR: number;\r\n QUOTA_EXCEEDED_ERR: number;\r\n INDEX_SIZE_ERR: number;\r\n DOMSTRING_SIZE_ERR: number;\r\n SYNTAX_ERR: number;\r\n SERIALIZE_ERR: number;\r\n VALIDATION_ERR: number;\r\n NOT_FOUND_ERR: number;\r\n URL_MISMATCH_ERR: number;\r\n PARSE_ERR: number;\r\n NO_DATA_ALLOWED_ERR: number;\r\n NOT_SUPPORTED_ERR: number;\r\n INVALID_ACCESS_ERR: number;\r\n INUSE_ATTRIBUTE_ERR: number;\r\n}\r\ndeclare var DOMException: {\r\n prototype: DOMException;\r\n new (): DOMException;\r\n HIERARCHY_REQUEST_ERR: number;\r\n NO_MODIFICATION_ALLOWED_ERR: number;\r\n INVALID_MODIFICATION_ERR: number;\r\n NAMESPACE_ERR: number;\r\n INVALID_CHARACTER_ERR: number;\r\n TYPE_MISMATCH_ERR: number;\r\n ABORT_ERR: number;\r\n INVALID_STATE_ERR: number;\r\n SECURITY_ERR: number;\r\n NETWORK_ERR: number;\r\n WRONG_DOCUMENT_ERR: number;\r\n QUOTA_EXCEEDED_ERR: number;\r\n INDEX_SIZE_ERR: number;\r\n DOMSTRING_SIZE_ERR: number;\r\n SYNTAX_ERR: number;\r\n SERIALIZE_ERR: number;\r\n VALIDATION_ERR: number;\r\n NOT_FOUND_ERR: number;\r\n URL_MISMATCH_ERR: number;\r\n PARSE_ERR: number;\r\n NO_DATA_ALLOWED_ERR: number;\r\n NOT_SUPPORTED_ERR: number;\r\n INVALID_ACCESS_ERR: number;\r\n INUSE_ATTRIBUTE_ERR: number;\r\n}\r\n\r\ninterface SVGAnimatedBoolean {\r\n animVal: boolean;\r\n baseVal: boolean;\r\n}\r\ndeclare var SVGAnimatedBoolean: {\r\n prototype: SVGAnimatedBoolean;\r\n new (): SVGAnimatedBoolean;\r\n}\r\n\r\ninterface MSCompatibleInfoCollection {\r\n length: number;\r\n item(index: number): MSCompatibleInfo;\r\n}\r\ndeclare var MSCompatibleInfoCollection: {\r\n prototype: MSCompatibleInfoCollection;\r\n new (): MSCompatibleInfoCollection;\r\n}\r\n\r\ninterface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n}\r\ndeclare var SVGSwitchElement: {\r\n prototype: SVGSwitchElement;\r\n new (): SVGSwitchElement;\r\n}\r\n\r\ninterface SVGPreserveAspectRatio {\r\n align: number;\r\n meetOrSlice: number;\r\n SVG_PRESERVEASPECTRATIO_NONE: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n SVG_MEETORSLICE_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n SVG_MEETORSLICE_MEET: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n SVG_MEETORSLICE_SLICE: number;\r\n SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n}\r\ndeclare var SVGPreserveAspectRatio: {\r\n prototype: SVGPreserveAspectRatio;\r\n new (): SVGPreserveAspectRatio;\r\n SVG_PRESERVEASPECTRATIO_NONE: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;\r\n SVG_MEETORSLICE_UNKNOWN: number;\r\n SVG_PRESERVEASPECTRATIO_XMAXYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;\r\n SVG_PRESERVEASPECTRATIO_XMINYMIN: number;\r\n SVG_MEETORSLICE_MEET: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMID: number;\r\n SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;\r\n SVG_MEETORSLICE_SLICE: number;\r\n SVG_PRESERVEASPECTRATIO_UNKNOWN: number;\r\n}\r\n\r\ninterface Attr extends Node {\r\n expando: boolean;\r\n specified: boolean;\r\n ownerElement: Element;\r\n value: string;\r\n name: string;\r\n}\r\ndeclare var Attr: {\r\n prototype: Attr;\r\n new (): Attr;\r\n}\r\n\r\ninterface PerformanceNavigation {\r\n redirectCount: number;\r\n type: number;\r\n toJSON(): any;\r\n TYPE_RELOAD: number;\r\n TYPE_RESERVED: number;\r\n TYPE_BACK_FORWARD: number;\r\n TYPE_NAVIGATE: number;\r\n}\r\ndeclare var PerformanceNavigation: {\r\n prototype: PerformanceNavigation;\r\n new (): PerformanceNavigation;\r\n TYPE_RELOAD: number;\r\n TYPE_RESERVED: number;\r\n TYPE_BACK_FORWARD: number;\r\n TYPE_NAVIGATE: number;\r\n}\r\n\r\ninterface SVGStopElement extends SVGElement, SVGStylable {\r\n offset: SVGAnimatedNumber;\r\n}\r\ndeclare var SVGStopElement: {\r\n prototype: SVGStopElement;\r\n new (): SVGStopElement;\r\n}\r\n\r\ninterface PositionCallback {\r\n (position: Position): void;\r\n}\r\n\r\ninterface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGFitToViewBox, SVGExternalResourcesRequired {\r\n}\r\ndeclare var SVGSymbolElement: {\r\n prototype: SVGSymbolElement;\r\n new (): SVGSymbolElement;\r\n}\r\n\r\ninterface SVGElementInstanceList {\r\n length: number;\r\n item(index: number): SVGElementInstance;\r\n}\r\ndeclare var SVGElementInstanceList: {\r\n prototype: SVGElementInstanceList;\r\n new (): SVGElementInstanceList;\r\n}\r\n\r\ninterface CSSRuleList {\r\n length: number;\r\n item(index: number): CSSRule;\r\n [index: number]: CSSRule;\r\n}\r\ndeclare var CSSRuleList: {\r\n prototype: CSSRuleList;\r\n new (): CSSRuleList;\r\n}\r\n\r\ninterface MSDataBindingRecordSetExtensions {\r\n recordset: Object;\r\n namedRecordset(dataMember: string, hierarchy?: any): Object;\r\n}\r\n\r\ninterface LinkStyle {\r\n styleSheet: StyleSheet;\r\n sheet: StyleSheet;\r\n}\r\n\r\ninterface HTMLVideoElement extends HTMLMediaElement {\r\n /**\r\n * Gets or sets the width of the video element.\r\n */\r\n width: number;\r\n /**\r\n * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n videoWidth: number;\r\n /**\r\n * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.\r\n */\r\n videoHeight: number;\r\n /**\r\n * Gets or sets the height of the video element.\r\n */\r\n height: number;\r\n /**\r\n * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.\r\n */\r\n poster: string;\r\n}\r\ndeclare var HTMLVideoElement: {\r\n prototype: HTMLVideoElement;\r\n new (): HTMLVideoElement;\r\n}\r\n\r\ninterface ClientRectList {\r\n length: number;\r\n item(index: number): ClientRect;\r\n [index: number]: ClientRect;\r\n}\r\ndeclare var ClientRectList: {\r\n prototype: ClientRectList;\r\n new (): ClientRectList;\r\n}\r\n\r\ninterface SVGMaskElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGTests, SVGExternalResourcesRequired {\r\n y: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n maskUnits: SVGAnimatedEnumeration;\r\n maskContentUnits: SVGAnimatedEnumeration;\r\n x: SVGAnimatedLength;\r\n height: SVGAnimatedLength;\r\n}\r\ndeclare var SVGMaskElement: {\r\n prototype: SVGMaskElement;\r\n new (): SVGMaskElement;\r\n}\r\n\r\ninterface External {\r\n}\r\ndeclare var External: {\r\n prototype: External;\r\n new (): External;\r\n}\r\n\r\ndeclare var Audio: { new (src?: string): HTMLAudioElement; };\r\ndeclare var Option: { new (text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };\r\ndeclare var Image: { new (width?: number, height?: number): HTMLImageElement; };\r\n\r\ndeclare var ondragend: (ev: DragEvent) => any;\r\ndeclare function addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare var onkeydown: (ev: KeyboardEvent) => any;\r\ndeclare function addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare var ondragover: (ev: DragEvent) => any;\r\ndeclare function addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare var onkeyup: (ev: KeyboardEvent) => any;\r\ndeclare function addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare var onreset: (ev: Event) => any;\r\ndeclare function addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onmouseup: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var ondragstart: (ev: DragEvent) => any;\r\ndeclare function addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare var ondrag: (ev: DragEvent) => any;\r\ndeclare function addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare var screenX: number;\r\ndeclare var onmouseover: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var ondragleave: (ev: DragEvent) => any;\r\ndeclare function addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare var history: History;\r\ndeclare var pageXOffset: number;\r\ndeclare var name: string;\r\ndeclare var onafterprint: (ev: Event) => any;\r\ndeclare function addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onpause: (ev: Event) => any;\r\ndeclare function addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onbeforeprint: (ev: Event) => any;\r\ndeclare function addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var top: Window;\r\ndeclare var onmousedown: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var onseeked: (ev: Event) => any;\r\ndeclare function addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var opener: Window;\r\ndeclare var onclick: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var innerHeight: number;\r\ndeclare var onwaiting: (ev: Event) => any;\r\ndeclare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var ononline: (ev: Event) => any;\r\ndeclare function addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var ondurationchange: (ev: Event) => any;\r\ndeclare function addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var frames: Window;\r\ndeclare var onblur: (ev: FocusEvent) => any;\r\ndeclare function addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare var onemptied: (ev: Event) => any;\r\ndeclare function addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onseeking: (ev: Event) => any;\r\ndeclare function addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var oncanplay: (ev: Event) => any;\r\ndeclare function addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var outerWidth: number;\r\ndeclare var onstalled: (ev: Event) => any;\r\ndeclare function addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onmousemove: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var innerWidth: number;\r\ndeclare var onoffline: (ev: Event) => any;\r\ndeclare function addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var length: number;\r\ndeclare var screen: Screen;\r\ndeclare var onbeforeunload: (ev: BeforeUnloadEvent) => any;\r\ndeclare function addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;\r\ndeclare var onratechange: (ev: Event) => any;\r\ndeclare function addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onstorage: (ev: StorageEvent) => any;\r\ndeclare function addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;\r\ndeclare var onloadstart: (ev: Event) => any;\r\ndeclare function addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var ondragenter: (ev: DragEvent) => any;\r\ndeclare function addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare var onsubmit: (ev: Event) => any;\r\ndeclare function addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var self: Window;\r\ndeclare var document: Document;\r\ndeclare var onprogress: (ev: any) => any;\r\ndeclare function addEventListener(type: "progress", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var ondblclick: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var pageYOffset: number;\r\ndeclare var oncontextmenu: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "contextmenu", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var onchange: (ev: Event) => any;\r\ndeclare function addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onloadedmetadata: (ev: Event) => any;\r\ndeclare function addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onplay: (ev: Event) => any;\r\ndeclare function addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onerror: ErrorEventHandler;\r\ndeclare var onplaying: (ev: Event) => any;\r\ndeclare function addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var parent: Window;\r\ndeclare var location: Location;\r\ndeclare var oncanplaythrough: (ev: Event) => any;\r\ndeclare function addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onabort: (ev: UIEvent) => any;\r\ndeclare function addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare var onreadystatechange: (ev: Event) => any;\r\ndeclare function addEventListener(type: "readystatechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var outerHeight: number;\r\ndeclare var onkeypress: (ev: KeyboardEvent) => any;\r\ndeclare function addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;\r\ndeclare var frameElement: Element;\r\ndeclare var onloadeddata: (ev: Event) => any;\r\ndeclare function addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onsuspend: (ev: Event) => any;\r\ndeclare function addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var window: Window;\r\ndeclare var onfocus: (ev: FocusEvent) => any;\r\ndeclare function addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare var onmessage: (ev: MessageEvent) => any;\r\ndeclare function addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;\r\ndeclare var ontimeupdate: (ev: Event) => any;\r\ndeclare function addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onresize: (ev: UIEvent) => any;\r\ndeclare function addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare var onselect: (ev: UIEvent) => any;\r\ndeclare function addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare var navigator: Navigator;\r\ndeclare var styleMedia: StyleMedia;\r\ndeclare var ondrop: (ev: DragEvent) => any;\r\ndeclare function addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;\r\ndeclare var onmouseout: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var onended: (ev: Event) => any;\r\ndeclare function addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onhashchange: (ev: Event) => any;\r\ndeclare function addEventListener(type: "hashchange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onunload: (ev: Event) => any;\r\ndeclare function addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onscroll: (ev: UIEvent) => any;\r\ndeclare function addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;\r\ndeclare var screenY: number;\r\ndeclare var onmousewheel: (ev: MouseWheelEvent) => any;\r\ndeclare function addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;\r\ndeclare var onload: (ev: Event) => any;\r\ndeclare function addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var onvolumechange: (ev: Event) => any;\r\ndeclare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var oninput: (ev: Event) => any;\r\ndeclare function addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var performance: Performance;\r\ndeclare function alert(message?: any): void;\r\ndeclare function scroll(x?: number, y?: number): void;\r\ndeclare function focus(): void;\r\ndeclare function scrollTo(x?: number, y?: number): void;\r\ndeclare function print(): void;\r\ndeclare function prompt(message?: string, defaul?: string): string;\r\ndeclare function toString(): string;\r\ndeclare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;\r\ndeclare function scrollBy(x?: number, y?: number): void;\r\ndeclare function confirm(message?: string): boolean;\r\ndeclare function close(): void;\r\ndeclare function postMessage(message: any, targetOrigin: string, ports?: any): void;\r\ndeclare function showModalDialog(url?: string, argument?: any, options?: any): any;\r\ndeclare function blur(): void;\r\ndeclare function getSelection(): Selection;\r\ndeclare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;\r\ndeclare function addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\ndeclare function removeEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\ndeclare function dispatchEvent(evt: Event): boolean;\r\ndeclare function attachEvent(event: string, listener: EventListener): boolean;\r\ndeclare function detachEvent(event: string, listener: EventListener): void;\r\ndeclare var localStorage: Storage;\r\ndeclare var status: string;\r\ndeclare var onmouseleave: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var screenLeft: number;\r\ndeclare var offscreenBuffering: any;\r\ndeclare var maxConnectionsPerServer: number;\r\ndeclare var onmouseenter: (ev: MouseEvent) => any;\r\ndeclare function addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;\r\ndeclare var clipboardData: DataTransfer;\r\ndeclare var defaultStatus: string;\r\ndeclare var clientInformation: Navigator;\r\ndeclare var closed: boolean;\r\ndeclare var onhelp: (ev: Event) => any;\r\ndeclare function addEventListener(type: "help", listener: (ev: Event) => any, useCapture?: boolean): void;\r\ndeclare var external: External;\r\ndeclare var event: MSEventObj;\r\ndeclare var onfocusout: (ev: FocusEvent) => any;\r\ndeclare function addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare var screenTop: number;\r\ndeclare var onfocusin: (ev: FocusEvent) => any;\r\ndeclare function addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;\r\ndeclare function showModelessDialog(url?: string, argument?: any, options?: any): Window;\r\ndeclare function navigate(url: string): void;\r\ndeclare function resizeBy(x?: number, y?: number): void;\r\ndeclare function item(index: any): any;\r\ndeclare function resizeTo(x?: number, y?: number): void;\r\ndeclare function createPopup(arguments?: any): MSPopupWindow;\r\ndeclare function toStaticHTML(html: string): string;\r\ndeclare function execScript(code: string, language?: string): any;\r\ndeclare function msWriteProfilerMark(profilerMarkName: string): void;\r\ndeclare function moveTo(x?: number, y?: number): void;\r\ndeclare function moveBy(x?: number, y?: number): void;\r\ndeclare function showHelp(url: string, helpArg?: any, features?: string): void;\r\ndeclare var sessionStorage: Storage;\r\ndeclare function clearTimeout(handle: number): void;\r\ndeclare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;\r\ndeclare function clearInterval(handle: number): void;\r\ndeclare function setInterval(handler: any, timeout?: any, ...args: any[]): number;\r\n\r\n\r\n/////////////////////////////\r\n/// IE10 DOM APIs \r\n/////////////////////////////\r\n\r\n\r\n\r\ninterface ObjectURLOptions {\r\n oneTimeOnly?: boolean;\r\n}\r\n\r\ninterface HTMLBodyElement {\r\n onpopstate: (ev: PopStateEvent) => any;\r\n addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n}\r\n\r\ninterface MSGestureEvent extends UIEvent {\r\n offsetY: number;\r\n translationY: number;\r\n velocityExpansion: number;\r\n velocityY: number;\r\n velocityAngular: number;\r\n translationX: number;\r\n velocityX: number;\r\n hwTimestamp: number;\r\n offsetX: number;\r\n screenX: number;\r\n rotation: number;\r\n expansion: number;\r\n clientY: number;\r\n screenY: number;\r\n scale: number;\r\n gestureObject: any;\r\n clientX: number;\r\n initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;\r\n MSGESTURE_FLAG_BEGIN: number;\r\n MSGESTURE_FLAG_END: number;\r\n MSGESTURE_FLAG_CANCEL: number;\r\n MSGESTURE_FLAG_INERTIA: number;\r\n MSGESTURE_FLAG_NONE: number;\r\n}\r\ndeclare var MSGestureEvent: {\r\n prototype: MSGestureEvent;\r\n new (): MSGestureEvent;\r\n MSGESTURE_FLAG_BEGIN: number;\r\n MSGESTURE_FLAG_END: number;\r\n MSGESTURE_FLAG_CANCEL: number;\r\n MSGESTURE_FLAG_INERTIA: number;\r\n MSGESTURE_FLAG_NONE: number;\r\n}\r\n\r\ninterface HTMLAnchorElement {\r\n /**\r\n * Retrieves or sets the text of the object as a string. \r\n */\r\n text: string;\r\n}\r\n\r\ninterface HTMLInputElement {\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a FileList object on a file type input object.\r\n */\r\n files: FileList;\r\n /**\r\n * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.\r\n */\r\n max: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.\r\n */\r\n step: string;\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * When present, marks an element that can\'t be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Returns the input field value as a number.\r\n */\r\n valueAsNumber: number;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Specifies the ID of a pre-defined datalist of options for an input element.\r\n */\r\n list: HTMLElement;\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.\r\n */\r\n min: string;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Gets or sets a string containing a regular expression that the user\'s input must match.\r\n */\r\n pattern: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.\r\n */\r\n multiple: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Decrements a range input control\'s value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control\'s step value multiplied by the parameter\'s value.\r\n * @param n Value to decrement the value by.\r\n */\r\n stepDown(n?: number): void;\r\n /**\r\n * Increments a range input control\'s value by the value given by the Step attribute. If the optional parameter is used, will increment the input control\'s value by that value.\r\n * @param n Value to increment the value by.\r\n */\r\n stepUp(n?: number): void;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ninterface ErrorEvent extends Event {\r\n colno: number;\r\n filename: string;\r\n lineno: number;\r\n message: string;\r\n initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;\r\n}\r\ndeclare var ErrorEvent: {\r\n prototype: ErrorEvent;\r\n new (): ErrorEvent;\r\n}\r\n\r\ninterface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {\r\n y: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n filterResX: SVGAnimatedInteger;\r\n filterUnits: SVGAnimatedEnumeration;\r\n primitiveUnits: SVGAnimatedEnumeration;\r\n x: SVGAnimatedLength;\r\n height: SVGAnimatedLength;\r\n filterResY: SVGAnimatedInteger;\r\n setFilterRes(filterResX: number, filterResY: number): void;\r\n}\r\ndeclare var SVGFilterElement: {\r\n prototype: SVGFilterElement;\r\n new (): SVGFilterElement;\r\n}\r\n\r\ninterface TrackEvent extends Event {\r\n track: any;\r\n}\r\ndeclare var TrackEvent: {\r\n prototype: TrackEvent;\r\n new (): TrackEvent;\r\n}\r\n\r\ninterface SVGFEMergeNodeElement extends SVGElement {\r\n in1: SVGAnimatedString;\r\n}\r\ndeclare var SVGFEMergeNodeElement: {\r\n prototype: SVGFEMergeNodeElement;\r\n new (): SVGFEMergeNodeElement;\r\n}\r\n\r\ninterface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n}\r\ndeclare var SVGFEFloodElement: {\r\n prototype: SVGFEFloodElement;\r\n new (): SVGFEFloodElement;\r\n}\r\n\r\ninterface MSGesture {\r\n target: Element;\r\n addPointer(pointerId: number): void;\r\n stop(): void;\r\n}\r\ndeclare var MSGesture: {\r\n prototype: MSGesture;\r\n new (): MSGesture;\r\n}\r\n\r\ninterface TextTrackCue extends EventTarget {\r\n onenter: (ev: Event) => any;\r\n addEventListener(type: "enter", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n track: TextTrack;\r\n endTime: number;\r\n text: string;\r\n pauseOnExit: boolean;\r\n id: string;\r\n startTime: number;\r\n onexit: (ev: Event) => any;\r\n addEventListener(type: "exit", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n getCueAsHTML(): DocumentFragment;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var TextTrackCue: {\r\n prototype: TextTrackCue;\r\n new (): TextTrackCue;\r\n}\r\n\r\ninterface MSStreamReader extends MSBaseReader {\r\n error: DOMError;\r\n readAsArrayBuffer(stream: MSStream, size?: number): void;\r\n readAsBlob(stream: MSStream, size?: number): void;\r\n readAsDataURL(stream: MSStream, size?: number): void;\r\n readAsText(stream: MSStream, encoding?: string, size?: number): void;\r\n}\r\ndeclare var MSStreamReader: {\r\n prototype: MSStreamReader;\r\n new (): MSStreamReader;\r\n}\r\n\r\ninterface DOMTokenList {\r\n length: number;\r\n contains(token: string): boolean;\r\n remove(token: string): void;\r\n toggle(token: string): boolean;\r\n add(token: string): void;\r\n item(index: number): string;\r\n [index: number]: string;\r\n toString(): string;\r\n}\r\ndeclare var DOMTokenList: {\r\n prototype: DOMTokenList;\r\n new (): DOMTokenList;\r\n}\r\n\r\ninterface EventException {\r\n name: string;\r\n}\r\n\r\ninterface Performance {\r\n now(): number;\r\n}\r\n\r\ninterface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {\r\n}\r\ndeclare var SVGFEFuncAElement: {\r\n prototype: SVGFEFuncAElement;\r\n new (): SVGFEFuncAElement;\r\n}\r\n\r\ninterface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n}\r\ndeclare var SVGFETileElement: {\r\n prototype: SVGFETileElement;\r\n new (): SVGFETileElement;\r\n}\r\n\r\ninterface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in2: SVGAnimatedString;\r\n mode: SVGAnimatedEnumeration;\r\n in1: SVGAnimatedString;\r\n SVG_FEBLEND_MODE_DARKEN: number;\r\n SVG_FEBLEND_MODE_UNKNOWN: number;\r\n SVG_FEBLEND_MODE_MULTIPLY: number;\r\n SVG_FEBLEND_MODE_NORMAL: number;\r\n SVG_FEBLEND_MODE_SCREEN: number;\r\n SVG_FEBLEND_MODE_LIGHTEN: number;\r\n}\r\ndeclare var SVGFEBlendElement: {\r\n prototype: SVGFEBlendElement;\r\n new (): SVGFEBlendElement;\r\n SVG_FEBLEND_MODE_DARKEN: number;\r\n SVG_FEBLEND_MODE_UNKNOWN: number;\r\n SVG_FEBLEND_MODE_MULTIPLY: number;\r\n SVG_FEBLEND_MODE_NORMAL: number;\r\n SVG_FEBLEND_MODE_SCREEN: number;\r\n SVG_FEBLEND_MODE_LIGHTEN: number;\r\n}\r\n\r\ninterface WindowTimers extends WindowTimersExtension {\r\n}\r\ndeclare var WindowTimers: {\r\n prototype: WindowTimers;\r\n new (): WindowTimers;\r\n}\r\n\r\ninterface CSSStyleDeclaration {\r\n animationFillMode: string;\r\n floodColor: string;\r\n animationIterationCount: string;\r\n textShadow: string;\r\n backfaceVisibility: string;\r\n msAnimationIterationCount: string;\r\n animationDelay: string;\r\n animationTimingFunction: string;\r\n columnWidth: any;\r\n msScrollSnapX: string;\r\n columnRuleColor: any;\r\n columnRuleWidth: any;\r\n transitionDelay: string;\r\n transition: string;\r\n msFlowFrom: string;\r\n msScrollSnapType: string;\r\n msContentZoomSnapType: string;\r\n msGridColumns: string;\r\n msAnimationName: string;\r\n msGridRowAlign: string;\r\n msContentZoomChaining: string;\r\n msGridColumn: any;\r\n msHyphenateLimitZone: any;\r\n msScrollRails: string;\r\n msAnimationDelay: string;\r\n enableBackground: string;\r\n msWrapThrough: string;\r\n columnRuleStyle: string;\r\n msAnimation: string;\r\n msFlexFlow: string;\r\n msScrollSnapY: string;\r\n msHyphenateLimitLines: any;\r\n msTouchAction: string;\r\n msScrollLimit: string;\r\n animation: string;\r\n transform: string;\r\n filter: string;\r\n colorInterpolationFilters: string;\r\n transitionTimingFunction: string;\r\n msBackfaceVisibility: string;\r\n animationPlayState: string;\r\n transformOrigin: string;\r\n msScrollLimitYMin: any;\r\n msFontFeatureSettings: string;\r\n msContentZoomLimitMin: any;\r\n columnGap: any;\r\n transitionProperty: string;\r\n msAnimationDuration: string;\r\n msAnimationFillMode: string;\r\n msFlexDirection: string;\r\n msTransitionDuration: string;\r\n fontFeatureSettings: string;\r\n breakBefore: string;\r\n msFlexWrap: string;\r\n perspective: string;\r\n msFlowInto: string;\r\n msTransformStyle: string;\r\n msScrollTranslation: string;\r\n msTransitionProperty: string;\r\n msUserSelect: string;\r\n msOverflowStyle: string;\r\n msScrollSnapPointsY: string;\r\n animationDirection: string;\r\n animationDuration: string;\r\n msFlex: string;\r\n msTransitionTimingFunction: string;\r\n animationName: string;\r\n columnRule: string;\r\n msGridColumnSpan: any;\r\n msFlexNegative: string;\r\n columnFill: string;\r\n msGridRow: any;\r\n msFlexOrder: string;\r\n msFlexItemAlign: string;\r\n msFlexPositive: string;\r\n msContentZoomLimitMax: any;\r\n msScrollLimitYMax: any;\r\n msGridColumnAlign: string;\r\n perspectiveOrigin: string;\r\n lightingColor: string;\r\n columns: string;\r\n msScrollChaining: string;\r\n msHyphenateLimitChars: string;\r\n msTouchSelect: string;\r\n floodOpacity: string;\r\n msAnimationDirection: string;\r\n msAnimationPlayState: string;\r\n columnSpan: string;\r\n msContentZooming: string;\r\n msPerspective: string;\r\n msFlexPack: string;\r\n msScrollSnapPointsX: string;\r\n msContentZoomSnapPoints: string;\r\n msGridRowSpan: any;\r\n msContentZoomSnap: string;\r\n msScrollLimitXMin: any;\r\n breakInside: string;\r\n msHighContrastAdjust: string;\r\n msFlexLinePack: string;\r\n msGridRows: string;\r\n transitionDuration: string;\r\n msHyphens: string;\r\n breakAfter: string;\r\n msTransition: string;\r\n msPerspectiveOrigin: string;\r\n msContentZoomLimit: string;\r\n msScrollLimitXMax: any;\r\n msFlexAlign: string;\r\n msWrapMargin: any;\r\n columnCount: any;\r\n msAnimationTimingFunction: string;\r\n msTransitionDelay: string;\r\n transformStyle: string;\r\n msWrapFlow: string;\r\n msFlexPreferredSize: string;\r\n}\r\n\r\ninterface MessageChannel {\r\n port2: MessagePort;\r\n port1: MessagePort;\r\n}\r\ndeclare var MessageChannel: {\r\n prototype: MessageChannel;\r\n new (): MessageChannel;\r\n}\r\n\r\ninterface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n}\r\ndeclare var SVGFEMergeElement: {\r\n prototype: SVGFEMergeElement;\r\n new (): SVGFEMergeElement;\r\n}\r\n\r\ninterface Navigator extends MSFileSaver {\r\n msMaxTouchPoints: number;\r\n msPointerEnabled: boolean;\r\n msManipulationViewsEnabled: boolean;\r\n msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;\r\n}\r\n\r\ninterface TransitionEvent extends Event {\r\n propertyName: string;\r\n elapsedTime: number;\r\n initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;\r\n}\r\ndeclare var TransitionEvent: {\r\n prototype: TransitionEvent;\r\n new (): TransitionEvent;\r\n}\r\n\r\ninterface MediaQueryList {\r\n matches: boolean;\r\n media: string;\r\n addListener(listener: MediaQueryListListener): void;\r\n removeListener(listener: MediaQueryListListener): void;\r\n}\r\ndeclare var MediaQueryList: {\r\n prototype: MediaQueryList;\r\n new (): MediaQueryList;\r\n}\r\n\r\ninterface DOMError {\r\n name: string;\r\n toString(): string;\r\n}\r\ndeclare var DOMError: {\r\n prototype: DOMError;\r\n new (): DOMError;\r\n}\r\n\r\ninterface CloseEvent extends Event {\r\n wasClean: boolean;\r\n reason: string;\r\n code: number;\r\n initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;\r\n}\r\ndeclare var CloseEvent: {\r\n prototype: CloseEvent;\r\n new (): CloseEvent;\r\n}\r\n\r\ninterface WebSocket extends EventTarget {\r\n protocol: string;\r\n readyState: number;\r\n bufferedAmount: number;\r\n onopen: (ev: Event) => any;\r\n addEventListener(type: "open", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n extensions: string;\r\n onmessage: (ev: any) => any;\r\n addEventListener(type: "message", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onclose: (ev: CloseEvent) => any;\r\n addEventListener(type: "close", listener: (ev: CloseEvent) => any, useCapture?: boolean): void;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n binaryType: string;\r\n url: string;\r\n close(code?: number, reason?: string): void;\r\n send(data: any): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n OPEN: number;\r\n CLOSING: number;\r\n CONNECTING: number;\r\n CLOSED: number;\r\n}\r\ndeclare var WebSocket: {\r\n prototype: WebSocket;\r\n new (url: string): WebSocket;\r\n new (url: string, prototcol: string): WebSocket;\r\n new (url: string, prototcol: string[]): WebSocket;\r\n OPEN: number;\r\n CLOSING: number;\r\n CONNECTING: number;\r\n CLOSED: number;\r\n}\r\n\r\ninterface SVGFEPointLightElement extends SVGElement {\r\n y: SVGAnimatedNumber;\r\n x: SVGAnimatedNumber;\r\n z: SVGAnimatedNumber;\r\n}\r\ndeclare var SVGFEPointLightElement: {\r\n prototype: SVGFEPointLightElement;\r\n new (): SVGFEPointLightElement;\r\n}\r\n\r\ninterface ProgressEvent extends Event {\r\n loaded: number;\r\n lengthComputable: boolean;\r\n total: number;\r\n initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;\r\n}\r\ndeclare var ProgressEvent: {\r\n prototype: ProgressEvent;\r\n new (): ProgressEvent;\r\n}\r\n\r\ninterface IDBObjectStore {\r\n indexNames: DOMStringList;\r\n name: string;\r\n transaction: IDBTransaction;\r\n keyPath: string;\r\n count(key?: any): IDBRequest;\r\n add(value: any, key?: any): IDBRequest;\r\n clear(): IDBRequest;\r\n createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;\r\n put(value: any, key?: any): IDBRequest;\r\n openCursor(range?: any, direction?: string): IDBRequest;\r\n deleteIndex(indexName: string): void;\r\n index(name: string): IDBIndex;\r\n get(key: any): IDBRequest;\r\n delete(key: any): IDBRequest;\r\n}\r\ndeclare var IDBObjectStore: {\r\n prototype: IDBObjectStore;\r\n new (): IDBObjectStore;\r\n}\r\n\r\ninterface HTMLCanvasElement {\r\n /**\r\n * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.\r\n */\r\n msToBlob(): Blob;\r\n}\r\n\r\ninterface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n stdDeviationX: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n stdDeviationY: SVGAnimatedNumber;\r\n setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;\r\n}\r\ndeclare var SVGFEGaussianBlurElement: {\r\n prototype: SVGFEGaussianBlurElement;\r\n new (): SVGFEGaussianBlurElement;\r\n}\r\n\r\ninterface SVGFilterPrimitiveStandardAttributes extends SVGStylable {\r\n y: SVGAnimatedLength;\r\n width: SVGAnimatedLength;\r\n x: SVGAnimatedLength;\r\n height: SVGAnimatedLength;\r\n result: SVGAnimatedString;\r\n}\r\n\r\ninterface Element {\r\n msRegionOverflow: string;\r\n onmspointerdown: (ev: any) => any;\r\n addEventListener(type: "mspointerdown", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgotpointercapture: (ev: any) => any;\r\n addEventListener(type: "msgotpointercapture", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturedoubletap: (ev: any) => any;\r\n addEventListener(type: "msgesturedoubletap", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerhover: (ev: any) => any;\r\n addEventListener(type: "mspointerhover", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturehold: (ev: any) => any;\r\n addEventListener(type: "msgesturehold", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointermove: (ev: any) => any;\r\n addEventListener(type: "mspointermove", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturechange: (ev: any) => any;\r\n addEventListener(type: "msgesturechange", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturestart: (ev: any) => any;\r\n addEventListener(type: "msgesturestart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointercancel: (ev: any) => any;\r\n addEventListener(type: "mspointercancel", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgestureend: (ev: any) => any;\r\n addEventListener(type: "msgestureend", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturetap: (ev: any) => any;\r\n addEventListener(type: "msgesturetap", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerout: (ev: any) => any;\r\n addEventListener(type: "mspointerout", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsinertiastart: (ev: any) => any;\r\n addEventListener(type: "msinertiastart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmslostpointercapture: (ev: any) => any;\r\n addEventListener(type: "mslostpointercapture", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerover: (ev: any) => any;\r\n addEventListener(type: "mspointerover", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msContentZoomFactor: number;\r\n onmspointerup: (ev: any) => any;\r\n addEventListener(type: "mspointerup", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msGetRegionContent(): MSRangeCollection;\r\n msReleasePointerCapture(pointerId: number): void;\r\n msSetPointerCapture(pointerId: number): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\n\r\ninterface IDBVersionChangeEvent extends Event {\r\n newVersion: number;\r\n oldVersion: number;\r\n}\r\ndeclare var IDBVersionChangeEvent: {\r\n prototype: IDBVersionChangeEvent;\r\n new (): IDBVersionChangeEvent;\r\n}\r\n\r\ninterface IDBIndex {\r\n unique: boolean;\r\n name: string;\r\n keyPath: string;\r\n objectStore: IDBObjectStore;\r\n count(key?: any): IDBRequest;\r\n getKey(key: any): IDBRequest;\r\n openKeyCursor(range?: IDBKeyRange, direction?: string): IDBRequest;\r\n get(key: any): IDBRequest;\r\n openCursor(range?: IDBKeyRange, direction?: string): IDBRequest;\r\n}\r\ndeclare var IDBIndex: {\r\n prototype: IDBIndex;\r\n new (): IDBIndex;\r\n}\r\n\r\ninterface WheelEvent {\r\n getCurrentPoint(element: Element): void;\r\n}\r\n\r\ninterface FileList {\r\n length: number;\r\n item(index: number): File;\r\n [index: number]: File;\r\n}\r\ndeclare var FileList: {\r\n prototype: FileList;\r\n new (): FileList;\r\n}\r\n\r\ninterface IDBCursor {\r\n source: any;\r\n direction: string;\r\n key: any;\r\n primaryKey: any;\r\n advance(count: number): void;\r\n delete(): IDBRequest;\r\n continue(key?: any): void;\r\n update(value: any): IDBRequest;\r\n PREV: string;\r\n PREV_NO_DUPLICATE: string;\r\n NEXT: string;\r\n NEXT_NO_DUPLICATE: string;\r\n}\r\ndeclare var IDBCursor: {\r\n prototype: IDBCursor;\r\n new (): IDBCursor;\r\n PREV: string;\r\n PREV_NO_DUPLICATE: string;\r\n NEXT: string;\r\n NEXT_NO_DUPLICATE: string;\r\n}\r\n\r\ninterface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n surfaceScale: SVGAnimatedNumber;\r\n specularExponent: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n specularConstant: SVGAnimatedNumber;\r\n}\r\ndeclare var SVGFESpecularLightingElement: {\r\n prototype: SVGFESpecularLightingElement;\r\n new (): SVGFESpecularLightingElement;\r\n}\r\n\r\ninterface File extends Blob {\r\n lastModifiedDate: any;\r\n name: string;\r\n}\r\ndeclare var File: {\r\n prototype: File;\r\n new (): File;\r\n}\r\n\r\ninterface URL {\r\n revokeObjectURL(url: string): void;\r\n createObjectURL(object: any, options?: ObjectURLOptions): string;\r\n}\r\ndeclare var URL: URL;\r\n\r\ninterface RangeException {\r\n name: string;\r\n}\r\n\r\ninterface IDBCursorWithValue extends IDBCursor {\r\n value: any;\r\n}\r\ndeclare var IDBCursorWithValue: {\r\n prototype: IDBCursorWithValue;\r\n new (): IDBCursorWithValue;\r\n}\r\n\r\ninterface HTMLTextAreaElement {\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * When present, marks an element that can\'t be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Sets or retrieves the maximum number of characters that the user can enter in a text control.\r\n */\r\n maxLength: number;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.\r\n */\r\n placeholder: string;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ninterface XMLHttpRequestEventTarget extends EventTarget {\r\n onprogress: (ev: ProgressEvent) => any;\r\n addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n onload: (ev: any) => any;\r\n addEventListener(type: "load", listener: (ev: any) => any, useCapture?: boolean): void;\r\n ontimeout: (ev: any) => any;\r\n addEventListener(type: "timeout", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onabort: (ev: any) => any;\r\n addEventListener(type: "abort", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onloadstart: (ev: any) => any;\r\n addEventListener(type: "loadstart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onloadend: (ev: ProgressEvent) => any;\r\n addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var XMLHttpRequestEventTarget: {\r\n prototype: XMLHttpRequestEventTarget;\r\n new (): XMLHttpRequestEventTarget;\r\n}\r\n\r\ninterface IDBEnvironment {\r\n msIndexedDB: IDBFactory;\r\n indexedDB: IDBFactory;\r\n}\r\n\r\ninterface AudioTrackList extends EventTarget {\r\n length: number;\r\n onchange: (ev: any) => any;\r\n addEventListener(type: "change", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onaddtrack: (ev: TrackEvent) => any;\r\n addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;\r\n getTrackById(id: string): AudioTrack;\r\n item(index: number): AudioTrack;\r\n [index: number]: AudioTrack;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var AudioTrackList: {\r\n prototype: AudioTrackList;\r\n new (): AudioTrackList;\r\n}\r\n\r\ninterface MSBaseReader extends EventTarget {\r\n onprogress: (ev: ProgressEvent) => any;\r\n addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n readyState: number;\r\n onabort: (ev: any) => any;\r\n addEventListener(type: "abort", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onloadend: (ev: ProgressEvent) => any;\r\n addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n onload: (ev: any) => any;\r\n addEventListener(type: "load", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onloadstart: (ev: any) => any;\r\n addEventListener(type: "loadstart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n result: any;\r\n abort(): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n LOADING: number;\r\n EMPTY: number;\r\n DONE: number;\r\n}\r\n\r\ninterface History {\r\n state: any;\r\n replaceState(statedata: any, title: string, url?: string): void;\r\n pushState(statedata: any, title: string, url?: string): void;\r\n}\r\n\r\ninterface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n operator: SVGAnimatedEnumeration;\r\n radiusX: SVGAnimatedNumber;\r\n radiusY: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n}\r\ndeclare var SVGFEMorphologyElement: {\r\n prototype: SVGFEMorphologyElement;\r\n new (): SVGFEMorphologyElement;\r\n SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;\r\n SVG_MORPHOLOGY_OPERATOR_ERODE: number;\r\n SVG_MORPHOLOGY_OPERATOR_DILATE: number;\r\n}\r\n\r\ninterface HTMLSelectElement {\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * When present, marks an element that can\'t be submitted without a value.\r\n */\r\n required: boolean;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ninterface CSSRule {\r\n KEYFRAMES_RULE: number;\r\n KEYFRAME_RULE: number;\r\n VIEWPORT_RULE: number;\r\n}\r\n//declare var CSSRule: {\r\n// prototype: CSSRule;\r\n// KEYFRAMES_RULE: number;\r\n// KEYFRAME_RULE: number;\r\n// VIEWPORT_RULE: number;\r\n//}\r\n\r\ninterface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {\r\n}\r\ndeclare var SVGFEFuncRElement: {\r\n prototype: SVGFEFuncRElement;\r\n new (): SVGFEFuncRElement;\r\n}\r\n\r\ninterface WindowTimersExtension {\r\n msSetImmediate(expression: any, ...args: any[]): number;\r\n clearImmediate(handle: number): void;\r\n msClearImmediate(handle: number): void;\r\n setImmediate(expression: any, ...args: any[]): number;\r\n}\r\n\r\ninterface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in2: SVGAnimatedString;\r\n xChannelSelector: SVGAnimatedEnumeration;\r\n yChannelSelector: SVGAnimatedEnumeration;\r\n scale: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n SVG_CHANNEL_B: number;\r\n SVG_CHANNEL_R: number;\r\n SVG_CHANNEL_G: number;\r\n SVG_CHANNEL_UNKNOWN: number;\r\n SVG_CHANNEL_A: number;\r\n}\r\ndeclare var SVGFEDisplacementMapElement: {\r\n prototype: SVGFEDisplacementMapElement;\r\n new (): SVGFEDisplacementMapElement;\r\n SVG_CHANNEL_B: number;\r\n SVG_CHANNEL_R: number;\r\n SVG_CHANNEL_G: number;\r\n SVG_CHANNEL_UNKNOWN: number;\r\n SVG_CHANNEL_A: number;\r\n}\r\n\r\ninterface AnimationEvent extends Event {\r\n animationName: string;\r\n elapsedTime: number;\r\n initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;\r\n}\r\ndeclare var AnimationEvent: {\r\n prototype: AnimationEvent;\r\n new (): AnimationEvent;\r\n}\r\n\r\ninterface SVGComponentTransferFunctionElement extends SVGElement {\r\n tableValues: SVGAnimatedNumberList;\r\n slope: SVGAnimatedNumber;\r\n type: SVGAnimatedEnumeration;\r\n exponent: SVGAnimatedNumber;\r\n amplitude: SVGAnimatedNumber;\r\n intercept: SVGAnimatedNumber;\r\n offset: SVGAnimatedNumber;\r\n SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n}\r\ndeclare var SVGComponentTransferFunctionElement: {\r\n prototype: SVGComponentTransferFunctionElement;\r\n new (): SVGComponentTransferFunctionElement;\r\n SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;\r\n SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;\r\n}\r\n\r\ninterface MSRangeCollection {\r\n length: number;\r\n item(index: number): Range;\r\n [index: number]: Range;\r\n}\r\ndeclare var MSRangeCollection: {\r\n prototype: MSRangeCollection;\r\n new (): MSRangeCollection;\r\n}\r\n\r\ninterface SVGFEDistantLightElement extends SVGElement {\r\n azimuth: SVGAnimatedNumber;\r\n elevation: SVGAnimatedNumber;\r\n}\r\ndeclare var SVGFEDistantLightElement: {\r\n prototype: SVGFEDistantLightElement;\r\n new (): SVGFEDistantLightElement;\r\n}\r\n\r\ninterface SVGException {\r\n name: string;\r\n}\r\n\r\ninterface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {\r\n}\r\ndeclare var SVGFEFuncBElement: {\r\n prototype: SVGFEFuncBElement;\r\n new (): SVGFEFuncBElement;\r\n}\r\n\r\ninterface IDBKeyRange {\r\n upper: any;\r\n upperOpen: boolean;\r\n lower: any;\r\n lowerOpen: boolean;\r\n bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;\r\n only(value: any): IDBKeyRange;\r\n lowerBound(bound: any, open?: boolean): IDBKeyRange;\r\n upperBound(bound: any, open?: boolean): IDBKeyRange;\r\n}\r\ndeclare var IDBKeyRange: {\r\n prototype: IDBKeyRange;\r\n new (): IDBKeyRange;\r\n}\r\n\r\ninterface WindowConsole {\r\n console: Console;\r\n}\r\n\r\ninterface IDBTransaction extends EventTarget {\r\n oncomplete: (ev: Event) => any;\r\n addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n db: IDBDatabase;\r\n mode: string;\r\n error: DOMError;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n onabort: (ev: any) => any;\r\n addEventListener(type: "abort", listener: (ev: any) => any, useCapture?: boolean): void;\r\n abort(): void;\r\n objectStore(name: string): IDBObjectStore;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n READ_ONLY: string;\r\n VERSION_CHANGE: string;\r\n READ_WRITE: string;\r\n}\r\ndeclare var IDBTransaction: {\r\n prototype: IDBTransaction;\r\n new (): IDBTransaction;\r\n READ_ONLY: string;\r\n VERSION_CHANGE: string;\r\n READ_WRITE: string;\r\n}\r\n\r\ninterface AudioTrack {\r\n kind: string;\r\n language: string;\r\n id: string;\r\n label: string;\r\n enabled: boolean;\r\n}\r\ndeclare var AudioTrack: {\r\n prototype: AudioTrack;\r\n new (): AudioTrack;\r\n}\r\n\r\ninterface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n orderY: SVGAnimatedInteger;\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n orderX: SVGAnimatedInteger;\r\n preserveAlpha: SVGAnimatedBoolean;\r\n kernelMatrix: SVGAnimatedNumberList;\r\n edgeMode: SVGAnimatedEnumeration;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n bias: SVGAnimatedNumber;\r\n targetX: SVGAnimatedInteger;\r\n targetY: SVGAnimatedInteger;\r\n divisor: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n SVG_EDGEMODE_WRAP: number;\r\n SVG_EDGEMODE_DUPLICATE: number;\r\n SVG_EDGEMODE_UNKNOWN: number;\r\n SVG_EDGEMODE_NONE: number;\r\n}\r\ndeclare var SVGFEConvolveMatrixElement: {\r\n prototype: SVGFEConvolveMatrixElement;\r\n new (): SVGFEConvolveMatrixElement;\r\n SVG_EDGEMODE_WRAP: number;\r\n SVG_EDGEMODE_DUPLICATE: number;\r\n SVG_EDGEMODE_UNKNOWN: number;\r\n SVG_EDGEMODE_NONE: number;\r\n}\r\n\r\ninterface TextTrackCueList {\r\n length: number;\r\n item(index: number): TextTrackCue;\r\n [index: number]: TextTrackCue;\r\n getCueById(id: string): TextTrackCue;\r\n}\r\ndeclare var TextTrackCueList: {\r\n prototype: TextTrackCueList;\r\n new (): TextTrackCueList;\r\n}\r\n\r\ninterface CSSKeyframesRule extends CSSRule {\r\n name: string;\r\n cssRules: CSSRuleList;\r\n findRule(rule: string): CSSKeyframeRule;\r\n deleteRule(rule: string): void;\r\n appendRule(rule: string): void;\r\n}\r\ndeclare var CSSKeyframesRule: {\r\n prototype: CSSKeyframesRule;\r\n new (): CSSKeyframesRule;\r\n}\r\n\r\ninterface Window extends WindowBase64, IDBEnvironment, WindowConsole {\r\n onmspointerdown: (ev: any) => any;\r\n addEventListener(type: "mspointerdown", listener: (ev: any) => any, useCapture?: boolean): void;\r\n animationStartTime: number;\r\n onmsgesturedoubletap: (ev: any) => any;\r\n addEventListener(type: "msgesturedoubletap", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerhover: (ev: any) => any;\r\n addEventListener(type: "mspointerhover", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturehold: (ev: any) => any;\r\n addEventListener(type: "msgesturehold", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointermove: (ev: any) => any;\r\n addEventListener(type: "mspointermove", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturechange: (ev: any) => any;\r\n addEventListener(type: "msgesturechange", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturestart: (ev: any) => any;\r\n addEventListener(type: "msgesturestart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointercancel: (ev: any) => any;\r\n addEventListener(type: "mspointercancel", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgestureend: (ev: any) => any;\r\n addEventListener(type: "msgestureend", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturetap: (ev: any) => any;\r\n addEventListener(type: "msgesturetap", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerout: (ev: any) => any;\r\n addEventListener(type: "mspointerout", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msAnimationStartTime: number;\r\n applicationCache: ApplicationCache;\r\n onmsinertiastart: (ev: any) => any;\r\n addEventListener(type: "msinertiastart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerover: (ev: any) => any;\r\n addEventListener(type: "mspointerover", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onpopstate: (ev: PopStateEvent) => any;\r\n addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\n onmspointerup: (ev: any) => any;\r\n addEventListener(type: "mspointerup", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msCancelRequestAnimationFrame(handle: number): void;\r\n matchMedia(mediaQuery: string): MediaQueryList;\r\n cancelAnimationFrame(handle: number): void;\r\n msIsStaticHTML(html: string): boolean;\r\n msMatchMedia(mediaQuery: string): MediaQueryList;\r\n requestAnimationFrame(callback: FrameRequestCallback): number;\r\n msRequestAnimationFrame(callback: FrameRequestCallback): number;\r\n}\r\n\r\ninterface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n baseFrequencyX: SVGAnimatedNumber;\r\n numOctaves: SVGAnimatedInteger;\r\n type: SVGAnimatedEnumeration;\r\n baseFrequencyY: SVGAnimatedNumber;\r\n stitchTiles: SVGAnimatedEnumeration;\r\n seed: SVGAnimatedNumber;\r\n SVG_STITCHTYPE_UNKNOWN: number;\r\n SVG_STITCHTYPE_NOSTITCH: number;\r\n SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n SVG_STITCHTYPE_STITCH: number;\r\n}\r\ndeclare var SVGFETurbulenceElement: {\r\n prototype: SVGFETurbulenceElement;\r\n new (): SVGFETurbulenceElement;\r\n SVG_STITCHTYPE_UNKNOWN: number;\r\n SVG_STITCHTYPE_NOSTITCH: number;\r\n SVG_TURBULENCE_TYPE_UNKNOWN: number;\r\n SVG_TURBULENCE_TYPE_TURBULENCE: number;\r\n SVG_TURBULENCE_TYPE_FRACTALNOISE: number;\r\n SVG_STITCHTYPE_STITCH: number;\r\n}\r\n\r\ninterface TextTrackList {\r\n length: number;\r\n item(index: number): TextTrack;\r\n [index: number]: TextTrack;\r\n}\r\ndeclare var TextTrackList: {\r\n prototype: TextTrackList;\r\n new (): TextTrackList;\r\n}\r\n\r\ninterface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {\r\n}\r\ndeclare var SVGFEFuncGElement: {\r\n prototype: SVGFEFuncGElement;\r\n new (): SVGFEFuncGElement;\r\n}\r\n\r\ninterface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n type: SVGAnimatedEnumeration;\r\n values: SVGAnimatedNumberList;\r\n SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n}\r\ndeclare var SVGFEColorMatrixElement: {\r\n prototype: SVGFEColorMatrixElement;\r\n new (): SVGFEColorMatrixElement;\r\n SVG_FECOLORMATRIX_TYPE_SATURATE: number;\r\n SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;\r\n SVG_FECOLORMATRIX_TYPE_MATRIX: number;\r\n SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;\r\n SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;\r\n}\r\n\r\ninterface Console {\r\n info(message?: any, ...optionalParams: any[]): void;\r\n profile(reportName?: string): void;\r\n assert(test?: boolean, message?: string, ...optionalParams: any[]): void;\r\n msIsIndependentlyComposed(element: Element): boolean;\r\n clear(): void;\r\n dir(value?: any, ...optionalParams: any[]): void;\r\n warn(message?: any, ...optionalParams: any[]): void;\r\n error(message?: any, ...optionalParams: any[]): void;\r\n log(message?: any, ...optionalParams: any[]): void;\r\n profileEnd(): void;\r\n}\r\ndeclare var Console: {\r\n prototype: Console;\r\n new (): Console;\r\n}\r\n\r\ninterface SVGFESpotLightElement extends SVGElement {\r\n pointsAtY: SVGAnimatedNumber;\r\n y: SVGAnimatedNumber;\r\n limitingConeAngle: SVGAnimatedNumber;\r\n specularExponent: SVGAnimatedNumber;\r\n x: SVGAnimatedNumber;\r\n pointsAtZ: SVGAnimatedNumber;\r\n z: SVGAnimatedNumber;\r\n pointsAtX: SVGAnimatedNumber;\r\n}\r\ndeclare var SVGFESpotLightElement: {\r\n prototype: SVGFESpotLightElement;\r\n new (): SVGFESpotLightElement;\r\n}\r\n\r\ninterface HTMLImageElement {\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n}\r\n\r\ninterface WindowBase64 {\r\n btoa(rawString: string): string;\r\n atob(encodedString: string): string;\r\n}\r\n\r\ninterface IDBDatabase extends EventTarget {\r\n version: string;\r\n name: string;\r\n objectStoreNames: DOMStringList;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n onabort: (ev: any) => any;\r\n addEventListener(type: "abort", listener: (ev: any) => any, useCapture?: boolean): void;\r\n createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;\r\n close(): void;\r\n transaction(storeNames: any, mode?: string): IDBTransaction;\r\n deleteObjectStore(name: string): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var IDBDatabase: {\r\n prototype: IDBDatabase;\r\n new (): IDBDatabase;\r\n}\r\n\r\ninterface DOMStringList {\r\n length: number;\r\n contains(str: string): boolean;\r\n item(index: number): string;\r\n [index: number]: string;\r\n}\r\ndeclare var DOMStringList: {\r\n prototype: DOMStringList;\r\n new (): DOMStringList;\r\n}\r\n\r\ninterface HTMLButtonElement {\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Overrides the target attribute on a form element.\r\n */\r\n formTarget: string;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Overrides the action attribute (where the data on a form is sent) on the parent form element.\r\n */\r\n formAction: string;\r\n /**\r\n * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.\r\n */\r\n autofocus: boolean;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.\r\n */\r\n formNoValidate: string;\r\n /**\r\n * Used to override the encoding (formEnctype attribute) specified on the form element.\r\n */\r\n formEnctype: string;\r\n /**\r\n * Overrides the submit method attribute previously specified on a form element.\r\n */\r\n formMethod: string;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ninterface IDBOpenDBRequest extends IDBRequest {\r\n onupgradeneeded: (ev: IDBVersionChangeEvent) => any;\r\n addEventListener(type: "upgradeneeded", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;\r\n onblocked: (ev: Event) => any;\r\n addEventListener(type: "blocked", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var IDBOpenDBRequest: {\r\n prototype: IDBOpenDBRequest;\r\n new (): IDBOpenDBRequest;\r\n}\r\n\r\ninterface HTMLProgressElement extends HTMLElement {\r\n /**\r\n * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.\r\n */\r\n value: number;\r\n /**\r\n * Defines the maximum, or "done" value for a progress element.\r\n */\r\n max: number;\r\n /**\r\n * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).\r\n */\r\n position: number;\r\n /**\r\n * Retrieves a reference to the form that the object is embedded in.\r\n */\r\n form: HTMLFormElement;\r\n}\r\ndeclare var HTMLProgressElement: {\r\n prototype: HTMLProgressElement;\r\n new (): HTMLProgressElement;\r\n}\r\n\r\ninterface MSLaunchUriCallback {\r\n (): void;\r\n}\r\n\r\ninterface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n dy: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n dx: SVGAnimatedNumber;\r\n}\r\ndeclare var SVGFEOffsetElement: {\r\n prototype: SVGFEOffsetElement;\r\n new (): SVGFEOffsetElement;\r\n}\r\n\r\ninterface HTMLFormElement {\r\n /**\r\n * Specifies whether autocomplete is applied to an editable text field.\r\n */\r\n autocomplete: string;\r\n /**\r\n * Designates a form that is not validated when submitted.\r\n */\r\n noValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n}\r\n\r\ninterface MSUnsafeFunctionCallback {\r\n (): any;\r\n}\r\n\r\ninterface Document {\r\n onmspointerdown: (ev: any) => any;\r\n addEventListener(type: "mspointerdown", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msHidden: boolean;\r\n msVisibilityState: string;\r\n onmsgesturedoubletap: (ev: any) => any;\r\n addEventListener(type: "msgesturedoubletap", listener: (ev: any) => any, useCapture?: boolean): void;\r\n visibilityState: string;\r\n onmsmanipulationstatechanged: (ev: any) => any;\r\n addEventListener(type: "msmanipulationstatechanged", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerhover: (ev: any) => any;\r\n addEventListener(type: "mspointerhover", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmscontentzoom: (ev: any) => any;\r\n addEventListener(type: "mscontentzoom", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointermove: (ev: any) => any;\r\n addEventListener(type: "mspointermove", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturehold: (ev: any) => any;\r\n addEventListener(type: "msgesturehold", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturechange: (ev: any) => any;\r\n addEventListener(type: "msgesturechange", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturestart: (ev: any) => any;\r\n addEventListener(type: "msgesturestart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointercancel: (ev: any) => any;\r\n addEventListener(type: "mspointercancel", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgestureend: (ev: any) => any;\r\n addEventListener(type: "msgestureend", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsgesturetap: (ev: any) => any;\r\n addEventListener(type: "msgesturetap", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerout: (ev: any) => any;\r\n addEventListener(type: "mspointerout", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmsinertiastart: (ev: any) => any;\r\n addEventListener(type: "msinertiastart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msCSSOMElementFloatMetrics: boolean;\r\n onmspointerover: (ev: any) => any;\r\n addEventListener(type: "mspointerover", listener: (ev: any) => any, useCapture?: boolean): void;\r\n hidden: boolean;\r\n onmspointerup: (ev: any) => any;\r\n addEventListener(type: "mspointerup", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msElementsFromPoint(x: number, y: number): NodeList;\r\n msElementsFromRect(left: number, top: number, width: number, height: number): NodeList;\r\n clear(): void;\r\n}\r\n\r\ninterface MessageEvent extends Event {\r\n ports: any;\r\n}\r\n\r\ninterface HTMLScriptElement {\r\n async: boolean;\r\n}\r\n\r\ninterface HTMLMediaElement {\r\n /**\r\n * Specifies the purpose of the audio or video media, such as background audio or alerts.\r\n */\r\n msAudioCategory: string;\r\n /**\r\n * Specifies whether or not to enable low-latency playback on the media element.\r\n */\r\n msRealTime: boolean;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n textTracks: TextTrackList;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Returns an AudioTrackList object with the audio tracks for a given video element.\r\n */\r\n audioTracks: AudioTrackList;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n /**\r\n * Specifies the output device id that the audio will be sent to.\r\n */\r\n msAudioDeviceType: string;\r\n /**\r\n * Clears all effects from the media pipeline.\r\n */\r\n msClearEffects(): void;\r\n /**\r\n * Specifies the media protection manager for a given media pipeline.\r\n */\r\n msSetMediaProtectionManager(mediaProtectionManager?: any): void;\r\n /**\r\n * Inserts the specified audio effect into media pipeline.\r\n */\r\n msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n}\r\n\r\ninterface TextTrack extends EventTarget {\r\n language: string;\r\n mode: any;\r\n readyState: number;\r\n activeCues: TextTrackCueList;\r\n cues: TextTrackCueList;\r\n oncuechange: (ev: Event) => any;\r\n addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n kind: string;\r\n onload: (ev: any) => any;\r\n addEventListener(type: "load", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n label: string;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n ERROR: number;\r\n SHOWING: number;\r\n LOADING: number;\r\n LOADED: number;\r\n NONE: number;\r\n HIDDEN: number;\r\n DISABLED: number;\r\n}\r\ndeclare var TextTrack: {\r\n prototype: TextTrack;\r\n new (): TextTrack;\r\n ERROR: number;\r\n SHOWING: number;\r\n LOADING: number;\r\n LOADED: number;\r\n NONE: number;\r\n HIDDEN: number;\r\n DISABLED: number;\r\n}\r\n\r\ninterface MediaQueryListListener {\r\n (mql: MediaQueryList): void;\r\n}\r\n\r\ninterface IDBRequest extends EventTarget {\r\n source: any;\r\n onsuccess: (ev: Event) => any;\r\n addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n error: DOMError;\r\n transaction: IDBTransaction;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n readyState: string;\r\n result: any;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var IDBRequest: {\r\n prototype: IDBRequest;\r\n new (): IDBRequest;\r\n}\r\n\r\ninterface MessagePort extends EventTarget {\r\n onmessage: (ev: any) => any;\r\n addEventListener(type: "message", listener: (ev: any) => any, useCapture?: boolean): void;\r\n close(): void;\r\n postMessage(message: any, ports?: any): void;\r\n start(): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var MessagePort: {\r\n prototype: MessagePort;\r\n new (): MessagePort;\r\n}\r\n\r\ninterface FileReader extends MSBaseReader {\r\n error: DOMError;\r\n readAsArrayBuffer(blob: Blob): void;\r\n readAsDataURL(blob: Blob): void;\r\n readAsText(blob: Blob, encoding?: string): void;\r\n}\r\ndeclare var FileReader: {\r\n prototype: FileReader;\r\n new (): FileReader;\r\n}\r\n\r\ninterface BlobPropertyBag {\r\n type?: string;\r\n endings?: string;\r\n}\r\n\r\ninterface Blob {\r\n type: string;\r\n size: number;\r\n msDetachStream(): any;\r\n slice(start?: number, end?: number, contentType?: string): Blob;\r\n close(): void;\r\n msClose(): void;\r\n}\r\ndeclare var Blob: {\r\n prototype: Blob;\r\n new (blobParts?: any[], options?: BlobPropertyBag): Blob;\r\n}\r\n\r\ninterface ApplicationCache extends EventTarget {\r\n status: number;\r\n ondownloading: (ev: Event) => any;\r\n addEventListener(type: "downloading", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onprogress: (ev: ProgressEvent) => any;\r\n addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n onupdateready: (ev: Event) => any;\r\n addEventListener(type: "updateready", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n oncached: (ev: Event) => any;\r\n addEventListener(type: "cached", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onobsolete: (ev: Event) => any;\r\n addEventListener(type: "obsolete", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n onchecking: (ev: Event) => any;\r\n addEventListener(type: "checking", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n onnoupdate: (ev: Event) => any;\r\n addEventListener(type: "noupdate", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n swapCache(): void;\r\n abort(): void;\r\n update(): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n CHECKING: number;\r\n UNCACHED: number;\r\n UPDATEREADY: number;\r\n DOWNLOADING: number;\r\n IDLE: number;\r\n OBSOLETE: number;\r\n}\r\ndeclare var ApplicationCache: {\r\n prototype: ApplicationCache;\r\n new (): ApplicationCache;\r\n CHECKING: number;\r\n UNCACHED: number;\r\n UPDATEREADY: number;\r\n DOWNLOADING: number;\r\n IDLE: number;\r\n OBSOLETE: number;\r\n}\r\n\r\ninterface FrameRequestCallback {\r\n (time: number): void;\r\n}\r\n\r\ninterface XMLHttpRequest {\r\n response: any;\r\n withCredentials: boolean;\r\n onprogress: (ev: ProgressEvent) => any;\r\n addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n onabort: (ev: any) => any;\r\n addEventListener(type: "abort", listener: (ev: any) => any, useCapture?: boolean): void;\r\n responseType: string;\r\n onloadend: (ev: ProgressEvent) => any;\r\n addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;\r\n upload: XMLHttpRequestEventTarget;\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n onloadstart: (ev: any) => any;\r\n addEventListener(type: "loadstart", listener: (ev: any) => any, useCapture?: boolean): void;\r\n}\r\n\r\ninterface PopStateEvent extends Event {\r\n state: any;\r\n initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;\r\n}\r\ndeclare var PopStateEvent: {\r\n prototype: PopStateEvent;\r\n new (): PopStateEvent;\r\n}\r\n\r\ninterface CSSKeyframeRule extends CSSRule {\r\n keyText: string;\r\n style: CSSStyleDeclaration;\r\n}\r\ndeclare var CSSKeyframeRule: {\r\n prototype: CSSKeyframeRule;\r\n new (): CSSKeyframeRule;\r\n}\r\n\r\ninterface MSFileSaver {\r\n msSaveBlob(blob: any, defaultName?: string): boolean;\r\n msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;\r\n}\r\n\r\ninterface MSStream {\r\n type: string;\r\n msDetachStream(): any;\r\n msClose(): void;\r\n}\r\ndeclare var MSStream: {\r\n prototype: MSStream;\r\n new (): MSStream;\r\n}\r\n\r\ninterface MediaError {\r\n msExtendedCode: number;\r\n}\r\n\r\ninterface HTMLFieldSetElement {\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ninterface MSBlobBuilder {\r\n append(data: any, endings?: string): void;\r\n getBlob(contentType?: string): Blob;\r\n}\r\ndeclare var MSBlobBuilder: {\r\n prototype: MSBlobBuilder;\r\n new (): MSBlobBuilder;\r\n}\r\n\r\ninterface HTMLElement {\r\n onmscontentzoom: (ev: any) => any;\r\n addEventListener(type: "mscontentzoom", listener: (ev: any) => any, useCapture?: boolean): void;\r\n oncuechange: (ev: Event) => any;\r\n addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;\r\n spellcheck: boolean;\r\n classList: DOMTokenList;\r\n onmsmanipulationstatechanged: (ev: any) => any;\r\n addEventListener(type: "msmanipulationstatechanged", listener: (ev: any) => any, useCapture?: boolean): void;\r\n draggable: boolean;\r\n}\r\n\r\ninterface DataTransfer {\r\n types: DOMStringList;\r\n files: FileList;\r\n}\r\n\r\ninterface DOMSettableTokenList extends DOMTokenList {\r\n value: string;\r\n}\r\ndeclare var DOMSettableTokenList: {\r\n prototype: DOMSettableTokenList;\r\n new (): DOMSettableTokenList;\r\n}\r\n\r\ninterface IDBFactory {\r\n open(name: string, version?: number): IDBOpenDBRequest;\r\n cmp(first: any, second: any): number;\r\n deleteDatabase(name: string): IDBOpenDBRequest;\r\n}\r\ndeclare var IDBFactory: {\r\n prototype: IDBFactory;\r\n new (): IDBFactory;\r\n}\r\n\r\ninterface Range {\r\n createContextualFragment(fragment: string): DocumentFragment;\r\n}\r\n\r\ninterface HTMLObjectElement {\r\n /**\r\n * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.\r\n */\r\n validationMessage: string;\r\n /**\r\n * Returns a ValidityState object that represents the validity states of an element.\r\n */\r\n validity: ValidityState;\r\n /**\r\n * Returns whether an element will successfully validate based on forms validation rules and constraints.\r\n */\r\n willValidate: boolean;\r\n /**\r\n * Returns whether a form will validate when it is submitted, without having to submit it.\r\n */\r\n checkValidity(): boolean;\r\n /**\r\n * Sets a custom error message that is displayed when a form is submitted.\r\n * @param error Sets a custom error message that is displayed when a form is submitted.\r\n */\r\n setCustomValidity(error: string): void;\r\n}\r\n\r\ninterface MSPointerEvent extends MouseEvent {\r\n width: number;\r\n rotation: number;\r\n pressure: number;\r\n pointerType: any;\r\n isPrimary: boolean;\r\n tiltY: number;\r\n height: number;\r\n intermediatePoints: any;\r\n currentPoint: any;\r\n tiltX: number;\r\n hwTimestamp: number;\r\n pointerId: number;\r\n initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;\r\n getCurrentPoint(element: Element): void;\r\n getIntermediatePoints(element: Element): void;\r\n MSPOINTER_TYPE_PEN: number;\r\n MSPOINTER_TYPE_MOUSE: number;\r\n MSPOINTER_TYPE_TOUCH: number;\r\n}\r\ndeclare var MSPointerEvent: {\r\n prototype: MSPointerEvent;\r\n new (): MSPointerEvent;\r\n MSPOINTER_TYPE_PEN: number;\r\n MSPOINTER_TYPE_MOUSE: number;\r\n MSPOINTER_TYPE_TOUCH: number;\r\n}\r\n\r\ninterface DOMException {\r\n name: string;\r\n INVALID_NODE_TYPE_ERR: number;\r\n DATA_CLONE_ERR: number;\r\n TIMEOUT_ERR: number;\r\n}\r\n//declare var DOMException: {\r\n// prototype: DOMException;\r\n// INVALID_NODE_TYPE_ERR: number;\r\n// DATA_CLONE_ERR: number;\r\n// TIMEOUT_ERR: number;\r\n//}\r\n\r\ninterface MSManipulationEvent extends UIEvent {\r\n lastState: number;\r\n currentState: number;\r\n initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;\r\n MS_MANIPULATION_STATE_STOPPED: number;\r\n MS_MANIPULATION_STATE_ACTIVE: number;\r\n MS_MANIPULATION_STATE_INERTIA: number;\r\n}\r\ndeclare var MSManipulationEvent: {\r\n prototype: MSManipulationEvent;\r\n new (): MSManipulationEvent;\r\n MS_MANIPULATION_STATE_STOPPED: number;\r\n MS_MANIPULATION_STATE_ACTIVE: number;\r\n MS_MANIPULATION_STATE_INERTIA: number;\r\n}\r\n\r\ninterface FormData {\r\n append(name: any, value: any, blobName?: string): void;\r\n}\r\ndeclare var FormData: {\r\n prototype: FormData;\r\n new (form?: HTMLFormElement): FormData;\r\n}\r\n\r\ninterface HTMLDataListElement extends HTMLElement {\r\n options: HTMLCollection;\r\n}\r\ndeclare var HTMLDataListElement: {\r\n prototype: HTMLDataListElement;\r\n new (): HTMLDataListElement;\r\n}\r\n\r\ninterface SVGFEImageElement extends SVGElement, SVGLangSpace, SVGFilterPrimitiveStandardAttributes, SVGURIReference, SVGExternalResourcesRequired {\r\n preserveAspectRatio: SVGAnimatedPreserveAspectRatio;\r\n}\r\ndeclare var SVGFEImageElement: {\r\n prototype: SVGFEImageElement;\r\n new (): SVGFEImageElement;\r\n}\r\n\r\ninterface AbstractWorker extends EventTarget {\r\n onerror: (ev: ErrorEvent) => any;\r\n addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\n\r\ninterface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n operator: SVGAnimatedEnumeration;\r\n in2: SVGAnimatedString;\r\n k2: SVGAnimatedNumber;\r\n k1: SVGAnimatedNumber;\r\n k3: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n k4: SVGAnimatedNumber;\r\n SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n}\r\ndeclare var SVGFECompositeElement: {\r\n prototype: SVGFECompositeElement;\r\n new (): SVGFECompositeElement;\r\n SVG_FECOMPOSITE_OPERATOR_OUT: number;\r\n SVG_FECOMPOSITE_OPERATOR_OVER: number;\r\n SVG_FECOMPOSITE_OPERATOR_XOR: number;\r\n SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;\r\n SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;\r\n SVG_FECOMPOSITE_OPERATOR_IN: number;\r\n SVG_FECOMPOSITE_OPERATOR_ATOP: number;\r\n}\r\n\r\ninterface ValidityState {\r\n customError: boolean;\r\n valueMissing: boolean;\r\n stepMismatch: boolean;\r\n rangeUnderflow: boolean;\r\n rangeOverflow: boolean;\r\n typeMismatch: boolean;\r\n patternMismatch: boolean;\r\n tooLong: boolean;\r\n valid: boolean;\r\n}\r\ndeclare var ValidityState: {\r\n prototype: ValidityState;\r\n new (): ValidityState;\r\n}\r\n\r\ninterface HTMLTrackElement extends HTMLElement {\r\n kind: string;\r\n src: string;\r\n srclang: string;\r\n track: TextTrack;\r\n label: string;\r\n default: boolean;\r\n}\r\ndeclare var HTMLTrackElement: {\r\n prototype: HTMLTrackElement;\r\n new (): HTMLTrackElement;\r\n}\r\n\r\ninterface MSApp {\r\n createFileFromStorageFile(storageFile: any): File;\r\n createBlobFromRandomAccessStream(type: string, seeker: any): Blob;\r\n createStreamFromInputStream(type: string, inputStream: any): MSStream;\r\n terminateApp(exceptionObject: any): void;\r\n createDataPackage(object: any): any;\r\n execUnsafeLocalFunction(unsafeFunction: MSUnsafeFunctionCallback): any;\r\n getHtmlPrintDocumentSource(htmlDoc: any): any;\r\n addPublicLocalApplicationUri(uri: string): void;\r\n createDataPackageFromSelection(): any;\r\n}\r\ndeclare var MSApp: MSApp;\r\n\r\ninterface HTMLVideoElement {\r\n msIsStereo3D: boolean;\r\n msStereo3DPackingMode: string;\r\n onMSVideoOptimalLayoutChanged: (ev: any) => any;\r\n addEventListener(type: "MSVideoOptimalLayoutChanged", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onMSVideoFrameStepCompleted: (ev: any) => any;\r\n addEventListener(type: "MSVideoFrameStepCompleted", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msStereo3DRenderMode: string;\r\n msIsLayoutOptimalForPlayback: boolean;\r\n msHorizontalMirror: boolean;\r\n onMSVideoFormatChanged: (ev: any) => any;\r\n addEventListener(type: "MSVideoFormatChanged", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msZoom: boolean;\r\n msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;\r\n msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;\r\n msFrameStep(forward: boolean): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\n\r\ninterface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n in1: SVGAnimatedString;\r\n}\r\ndeclare var SVGFEComponentTransferElement: {\r\n prototype: SVGFEComponentTransferElement;\r\n new (): SVGFEComponentTransferElement;\r\n}\r\n\r\ninterface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {\r\n kernelUnitLengthY: SVGAnimatedNumber;\r\n surfaceScale: SVGAnimatedNumber;\r\n in1: SVGAnimatedString;\r\n kernelUnitLengthX: SVGAnimatedNumber;\r\n diffuseConstant: SVGAnimatedNumber;\r\n}\r\ndeclare var SVGFEDiffuseLightingElement: {\r\n prototype: SVGFEDiffuseLightingElement;\r\n new (): SVGFEDiffuseLightingElement;\r\n}\r\n\r\ninterface MSCSSMatrix {\r\n m24: number;\r\n m34: number;\r\n a: number;\r\n d: number;\r\n m32: number;\r\n m41: number;\r\n m11: number;\r\n f: number;\r\n e: number;\r\n m23: number;\r\n m14: number;\r\n m33: number;\r\n m22: number;\r\n m21: number;\r\n c: number;\r\n m12: number;\r\n b: number;\r\n m42: number;\r\n m31: number;\r\n m43: number;\r\n m13: number;\r\n m44: number;\r\n multiply(secondMatrix: MSCSSMatrix): MSCSSMatrix;\r\n skewY(angle: number): MSCSSMatrix;\r\n setMatrixValue(value: string): void;\r\n inverse(): MSCSSMatrix;\r\n rotateAxisAngle(x: number, y: number, z: number, angle: number): MSCSSMatrix;\r\n toString(): string;\r\n rotate(angleX: number, angleY?: number, angleZ?: number): MSCSSMatrix;\r\n translate(x: number, y: number, z?: number): MSCSSMatrix;\r\n scale(scaleX: number, scaleY?: number, scaleZ?: number): MSCSSMatrix;\r\n skewX(angle: number): MSCSSMatrix;\r\n}\r\ndeclare var MSCSSMatrix: {\r\n prototype: MSCSSMatrix;\r\n new (text?: string): MSCSSMatrix;\r\n}\r\n\r\ninterface Worker extends AbstractWorker {\r\n onmessage: (ev: any) => any;\r\n addEventListener(type: "message", listener: (ev: any) => any, useCapture?: boolean): void;\r\n postMessage(message: any, ports?: any): void;\r\n terminate(): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var Worker: {\r\n prototype: Worker;\r\n new (stringUrl: string): Worker;\r\n}\r\n\r\ninterface HTMLIFrameElement {\r\n sandbox: DOMSettableTokenList;\r\n}\r\n\r\ndeclare var onmspointerdown: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointerdown", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var animationStartTime: number;\r\ndeclare var onmsgesturedoubletap: (ev: any) => any;\r\ndeclare function addEventListener(type: "msgesturedoubletap", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmspointerhover: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointerhover", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmsgesturehold: (ev: any) => any;\r\ndeclare function addEventListener(type: "msgesturehold", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmspointermove: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointermove", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmsgesturechange: (ev: any) => any;\r\ndeclare function addEventListener(type: "msgesturechange", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmsgesturestart: (ev: any) => any;\r\ndeclare function addEventListener(type: "msgesturestart", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmspointercancel: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointercancel", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmsgestureend: (ev: any) => any;\r\ndeclare function addEventListener(type: "msgestureend", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmsgesturetap: (ev: any) => any;\r\ndeclare function addEventListener(type: "msgesturetap", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmspointerout: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointerout", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var msAnimationStartTime: number;\r\ndeclare var applicationCache: ApplicationCache;\r\ndeclare var onmsinertiastart: (ev: any) => any;\r\ndeclare function addEventListener(type: "msinertiastart", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onmspointerover: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointerover", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onpopstate: (ev: PopStateEvent) => any;\r\ndeclare function addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;\r\ndeclare var onmspointerup: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointerup", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare function msCancelRequestAnimationFrame(handle: number): void;\r\ndeclare function matchMedia(mediaQuery: string): MediaQueryList;\r\ndeclare function cancelAnimationFrame(handle: number): void;\r\ndeclare function msIsStaticHTML(html: string): boolean;\r\ndeclare function msMatchMedia(mediaQuery: string): MediaQueryList;\r\ndeclare function requestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function msRequestAnimationFrame(callback: FrameRequestCallback): number;\r\ndeclare function btoa(rawString: string): string;\r\ndeclare function atob(encodedString: string): string;\r\ndeclare var msIndexedDB: IDBFactory;\r\ndeclare var indexedDB: IDBFactory;\r\ndeclare var console: Console;\r\n\r\n/////////////////////////////\r\n/// IE11 APIs \r\n/////////////////////////////\r\n\r\n\r\n\r\ninterface StoreExceptionsInformation extends ExceptionInformation {\r\n siteName?: string;\r\n explanationString?: string;\r\n detailURI?: string;\r\n}\r\n\r\ninterface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {\r\n arrayOfDomainStrings?: Array;\r\n}\r\n\r\ninterface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {\r\n arrayOfDomainStrings?: Array;\r\n}\r\n\r\ninterface AlgorithmParameters {\r\n}\r\n\r\ninterface MutationObserverInit {\r\n childList?: boolean;\r\n attributes?: boolean;\r\n characterData?: boolean;\r\n subtree?: boolean;\r\n attributeOldValue?: boolean;\r\n characterDataOldValue?: boolean;\r\n attributeFilter?: Array;\r\n}\r\n\r\ninterface ExceptionInformation {\r\n domain?: string;\r\n}\r\n\r\ninterface MsZoomToOptions {\r\n contentX?: number;\r\n contentY?: number;\r\n viewportX?: string;\r\n viewportY?: string;\r\n scaleFactor?: number;\r\n animate?: string;\r\n}\r\n\r\ninterface DeviceAccelerationDict {\r\n x?: number;\r\n y?: number;\r\n z?: number;\r\n}\r\n\r\ninterface DeviceRotationRateDict {\r\n alpha?: number;\r\n beta?: number;\r\n gamma?: number;\r\n}\r\n\r\ninterface Algorithm {\r\n name?: string;\r\n params?: AlgorithmParameters;\r\n}\r\n\r\ninterface NavigatorID {\r\n product: string;\r\n vendor: string;\r\n}\r\ndeclare var NavigatorID: {\r\n prototype: NavigatorID;\r\n new (): NavigatorID;\r\n}\r\n\r\ninterface HTMLBodyElement {\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n}\r\n\r\ninterface MSExecAtPriorityFunctionCallback {\r\n (...args: any[]): any;\r\n}\r\n\r\ninterface MSWindowExtensions {\r\n captureEvents(): void;\r\n releaseEvents(): void;\r\n}\r\ndeclare var MSWindowExtensions: {\r\n prototype: MSWindowExtensions;\r\n new (): MSWindowExtensions;\r\n}\r\n\r\ninterface MSGraphicsTrust {\r\n status: string;\r\n constrictionActive: boolean;\r\n}\r\ndeclare var MSGraphicsTrust: {\r\n prototype: MSGraphicsTrust;\r\n new (): MSGraphicsTrust;\r\n}\r\n\r\ninterface AudioTrack {\r\n sourceBuffer: SourceBuffer;\r\n}\r\n\r\ninterface DragEvent {\r\n msConvertURL(file: File, targetType: string, targetURL?: string): boolean;\r\n}\r\n\r\ninterface SubtleCrypto {\r\n unwrapKey(wrappedKey: ArrayBufferView, keyAlgorithm: any, keyEncryptionKey: Key, extractable?: boolean, keyUsages?: string[]): KeyOperation;\r\n encrypt(algorithm: any, key: Key, buffer?: ArrayBufferView): CryptoOperation;\r\n importKey(format: string, keyData: ArrayBufferView, algorithm: any, extractable?: boolean, keyUsages?: string[]): KeyOperation;\r\n wrapKey(key: Key, keyEncryptionKey: Key, keyWrappingAlgorithm: any): KeyOperation;\r\n verify(algorithm: any, key: Key, signature: ArrayBufferView, buffer?: ArrayBufferView): CryptoOperation;\r\n deriveKey(algorithm: any, baseKey: Key, derivedKeyType: any, extractable?: boolean, keyUsages?: string[]): KeyOperation;\r\n digest(algorithm: any, buffer?: ArrayBufferView): CryptoOperation;\r\n exportKey(format: string, key: Key): KeyOperation;\r\n generateKey(algorithm: any, extractable?: boolean, keyUsages?: string[]): KeyOperation;\r\n sign(algorithm: any, key: Key, buffer?: ArrayBufferView): CryptoOperation;\r\n decrypt(algorithm: any, key: Key, buffer?: ArrayBufferView): CryptoOperation;\r\n}\r\ndeclare var SubtleCrypto: {\r\n prototype: SubtleCrypto;\r\n new (): SubtleCrypto;\r\n}\r\n\r\ninterface Crypto extends RandomSource {\r\n subtle: SubtleCrypto;\r\n}\r\ndeclare var Crypto: {\r\n prototype: Crypto;\r\n new (): Crypto;\r\n}\r\n\r\ninterface VideoPlaybackQuality {\r\n creationTime: number;\r\n totalVideoFrames: number;\r\n droppedVideoFrames: number;\r\n}\r\ndeclare var VideoPlaybackQuality: {\r\n prototype: VideoPlaybackQuality;\r\n new (): VideoPlaybackQuality;\r\n}\r\n\r\ninterface Window {\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n ondevicemotion: (ev: DeviceMotionEvent) => any;\r\n addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\n devicePixelRatio: number;\r\n msCrypto: Crypto;\r\n ondeviceorientation: (ev: DeviceOrientationEvent) => any;\r\n addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\n onmspointerenter: (ev: any) => any;\r\n addEventListener(type: "mspointerenter", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n onmspointerleave: (ev: any) => any;\r\n addEventListener(type: "mspointerleave", listener: (ev: any) => any, useCapture?: boolean): void;\r\n}\r\n\r\ninterface Key {\r\n algorithm: Algorithm;\r\n type: string;\r\n extractable: boolean;\r\n keyUsage: string[];\r\n}\r\ndeclare var Key: {\r\n prototype: Key;\r\n new (): Key;\r\n}\r\n\r\ninterface TextTrackList extends EventTarget {\r\n onaddtrack: (ev: any) => any;\r\n addEventListener(type: "addtrack", listener: (ev: any) => any, useCapture?: boolean): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\n\r\ninterface DeviceAcceleration {\r\n y: number;\r\n x: number;\r\n z: number;\r\n}\r\ndeclare var DeviceAcceleration: {\r\n prototype: DeviceAcceleration;\r\n new (): DeviceAcceleration;\r\n}\r\n\r\ninterface Console {\r\n count(countTitle?: string): void;\r\n groupEnd(): void;\r\n time(timerName?: string): void;\r\n timeEnd(timerName?: string): void;\r\n trace(): void;\r\n group(groupTitle?: string): void;\r\n dirxml(value: any): void;\r\n debug(message?: string, ...optionalParams: any[]): void;\r\n groupCollapsed(groupTitle?: string): void;\r\n select(element: Element): void;\r\n}\r\n\r\ninterface MSNavigatorDoNotTrack {\r\n removeSiteSpecificTrackingException(args: ExceptionInformation): boolean;\r\n removeWebWideTrackingException(args: ExceptionInformation): boolean;\r\n storeWebWideTrackingException(args: StoreExceptionsInformation): void;\r\n storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;\r\n confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;\r\n confirmWebWideTrackingException(args: ExceptionInformation): boolean;\r\n}\r\ndeclare var MSNavigatorDoNotTrack: {\r\n prototype: MSNavigatorDoNotTrack;\r\n new (): MSNavigatorDoNotTrack;\r\n}\r\n\r\ninterface HTMLImageElement {\r\n crossOrigin: string;\r\n}\r\n\r\ninterface HTMLAllCollection extends HTMLCollection {\r\n namedItem(name: string): Element;\r\n}\r\ndeclare var HTMLAllCollection: {\r\n prototype: HTMLAllCollection;\r\n new (): HTMLAllCollection;\r\n}\r\n\r\ninterface MSNavigatorExtensions {\r\n language: string;\r\n}\r\ndeclare var MSNavigatorExtensions: {\r\n prototype: MSNavigatorExtensions;\r\n new (): MSNavigatorExtensions;\r\n}\r\n\r\ninterface AesGcmEncryptResult {\r\n ciphertext: ArrayBuffer;\r\n tag: ArrayBuffer;\r\n}\r\ndeclare var AesGcmEncryptResult: {\r\n prototype: AesGcmEncryptResult;\r\n new (): AesGcmEncryptResult;\r\n}\r\n\r\ninterface CSSStyleDeclaration {\r\n alignItems: string;\r\n borderImageSource: string;\r\n flexBasis: string;\r\n borderImageWidth: string;\r\n borderImageRepeat: string;\r\n order: string;\r\n flex: string;\r\n alignContent: string;\r\n msImeAlign: string;\r\n flexShrink: string;\r\n flexGrow: string;\r\n borderImageSlice: string;\r\n flexWrap: string;\r\n borderImageOutset: string;\r\n flexDirection: string;\r\n flexFlow: string;\r\n borderImage: string;\r\n justifyContent: string;\r\n alignSelf: string;\r\n msTextCombineHorizontal: string;\r\n}\r\n\r\ninterface HTMLSourceElement {\r\n msKeySystem: string;\r\n}\r\n\r\ninterface NavigationCompletedEvent extends NavigationEvent {\r\n webErrorStatus: number;\r\n isSuccess: boolean;\r\n}\r\ndeclare var NavigationCompletedEvent: {\r\n prototype: NavigationCompletedEvent;\r\n new (): NavigationCompletedEvent;\r\n}\r\n\r\ninterface MutationRecord {\r\n oldValue: string;\r\n previousSibling: Node;\r\n addedNodes: NodeList;\r\n attributeName: string;\r\n removedNodes: NodeList;\r\n target: Node;\r\n nextSibling: Node;\r\n attributeNamespace: string;\r\n type: string;\r\n}\r\ndeclare var MutationRecord: {\r\n prototype: MutationRecord;\r\n new (): MutationRecord;\r\n}\r\n\r\ninterface Document extends MSDocumentExtensions {\r\n msFullscreenEnabled: boolean;\r\n onmsfullscreenerror: (ev: any) => any;\r\n addEventListener(type: "msfullscreenerror", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerenter: (ev: any) => any;\r\n addEventListener(type: "mspointerenter", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msFullscreenElement: Element;\r\n onmsfullscreenchange: (ev: any) => any;\r\n addEventListener(type: "msfullscreenchange", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerleave: (ev: any) => any;\r\n addEventListener(type: "mspointerleave", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msExitFullscreen(): void;\r\n}\r\n\r\ninterface MimeTypeArray {\r\n length: number;\r\n item(index: number): Plugin;\r\n [index: number]: Plugin;\r\n namedItem(type: string): Plugin;\r\n}\r\ndeclare var MimeTypeArray: {\r\n prototype: MimeTypeArray;\r\n new (): MimeTypeArray;\r\n}\r\n\r\ninterface HTMLMediaElement {\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n onmsneedkey: (ev: MSMediaKeyNeededEvent) => any;\r\n addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;\r\n /**\r\n * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.\r\n */\r\n msKeys: MSMediaKeys;\r\n msGraphicsTrustStatus: MSGraphicsTrust;\r\n msSetMediaKeys(mediaKeys: MSMediaKeys): void;\r\n addTextTrack(kind: string, label?: string, language?: string): TextTrack;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\n\r\ninterface TextTrack {\r\n addCue(cue: TextTrackCue): void;\r\n removeCue(cue: TextTrackCue): void;\r\n}\r\n\r\ninterface KeyOperation extends EventTarget {\r\n oncomplete: (ev: any) => any;\r\n addEventListener(type: "complete", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onerror: (ev: any) => any;\r\n addEventListener(type: "error", listener: (ev: any) => any, useCapture?: boolean): void;\r\n result: any;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var KeyOperation: {\r\n prototype: KeyOperation;\r\n new (): KeyOperation;\r\n}\r\n\r\ninterface DOMStringMap {\r\n}\r\ndeclare var DOMStringMap: {\r\n prototype: DOMStringMap;\r\n new (): DOMStringMap;\r\n}\r\n\r\ninterface DeviceOrientationEvent extends Event {\r\n gamma: number;\r\n alpha: number;\r\n absolute: boolean;\r\n beta: number;\r\n initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number, beta: number, gamma: number, absolute: boolean): void;\r\n}\r\ndeclare var DeviceOrientationEvent: {\r\n prototype: DeviceOrientationEvent;\r\n new (): DeviceOrientationEvent;\r\n}\r\n\r\ninterface MSMediaKeyMessageEvent extends Event {\r\n destinationURL: string;\r\n message: Uint8Array;\r\n}\r\ndeclare var MSMediaKeyMessageEvent: {\r\n prototype: MSMediaKeyMessageEvent;\r\n new (): MSMediaKeyMessageEvent;\r\n}\r\n\r\ninterface MSMediaKeys {\r\n keySystem: string;\r\n createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;\r\n isTypeSupported(keySystem: string, type?: string): boolean;\r\n}\r\ndeclare var MSMediaKeys: {\r\n prototype: MSMediaKeys;\r\n new (): MSMediaKeys;\r\n}\r\n\r\ninterface MSHTMLWebViewElement extends HTMLElement {\r\n documentTitle: string;\r\n width: number;\r\n src: string;\r\n canGoForward: boolean;\r\n height: number;\r\n canGoBack: boolean;\r\n navigateWithHttpRequestMessage(requestMessage: any): void;\r\n goBack(): void;\r\n navigate(uri: string): void;\r\n stop(): void;\r\n navigateToString(contents: string): void;\r\n captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;\r\n capturePreviewToBlobAsync(): MSWebViewAsyncOperation;\r\n refresh(): void;\r\n goForward(): void;\r\n navigateToLocalStreamUri(source: string, streamResolver: any): void;\r\n invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;\r\n buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;\r\n}\r\ndeclare var MSHTMLWebViewElement: {\r\n prototype: MSHTMLWebViewElement;\r\n new (): MSHTMLWebViewElement;\r\n}\r\n\r\ninterface NavigationEvent extends Event {\r\n uri: string;\r\n}\r\ndeclare var NavigationEvent: {\r\n prototype: NavigationEvent;\r\n new (): NavigationEvent;\r\n}\r\n\r\ninterface Element {\r\n onmspointerenter: (ev: any) => any;\r\n addEventListener(type: "mspointerenter", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onmspointerleave: (ev: any) => any;\r\n addEventListener(type: "mspointerleave", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msZoomTo(args: MsZoomToOptions): void;\r\n msGetUntransformedBounds(): ClientRect;\r\n msRequestFullscreen(): void;\r\n}\r\n\r\ninterface RandomSource {\r\n getRandomValues(array: ArrayBufferView): ArrayBufferView;\r\n}\r\n\r\ninterface XMLHttpRequest {\r\n msCaching: string;\r\n msCachingEnabled(): boolean;\r\n overrideMimeType(mime: string): void;\r\n}\r\n\r\ninterface SourceBuffer extends EventTarget {\r\n updating: boolean;\r\n appendWindowStart: number;\r\n appendWindowEnd: number;\r\n buffered: TimeRanges;\r\n timestampOffset: number;\r\n audioTracks: AudioTrackList;\r\n appendBuffer(data: ArrayBuffer): void;\r\n remove(start: number, end: number): void;\r\n abort(): void;\r\n appendStream(stream: MSStream, maxSize?: number): void;\r\n}\r\ndeclare var SourceBuffer: {\r\n prototype: SourceBuffer;\r\n new (): SourceBuffer;\r\n}\r\n\r\ninterface MSInputMethodContext extends EventTarget {\r\n oncandidatewindowshow: (ev: any) => any;\r\n addEventListener(type: "candidatewindowshow", listener: (ev: any) => any, useCapture?: boolean): void;\r\n target: HTMLElement;\r\n compositionStartOffset: number;\r\n oncandidatewindowhide: (ev: any) => any;\r\n addEventListener(type: "candidatewindowhide", listener: (ev: any) => any, useCapture?: boolean): void;\r\n oncandidatewindowupdate: (ev: any) => any;\r\n addEventListener(type: "candidatewindowupdate", listener: (ev: any) => any, useCapture?: boolean): void;\r\n compositionEndOffset: number;\r\n getCompositionAlternatives(): string[];\r\n getCandidateWindowClientRect(): ClientRect;\r\n hasComposition(): boolean;\r\n isCandidateWindowVisible(): boolean;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var MSInputMethodContext: {\r\n prototype: MSInputMethodContext;\r\n new (): MSInputMethodContext;\r\n}\r\n\r\ninterface DeviceRotationRate {\r\n gamma: number;\r\n alpha: number;\r\n beta: number;\r\n}\r\ndeclare var DeviceRotationRate: {\r\n prototype: DeviceRotationRate;\r\n new (): DeviceRotationRate;\r\n}\r\n\r\ninterface PluginArray {\r\n length: number;\r\n refresh(reload?: boolean): void;\r\n item(index: number): Plugin;\r\n [index: number]: Plugin;\r\n namedItem(name: string): Plugin;\r\n}\r\ndeclare var PluginArray: {\r\n prototype: PluginArray;\r\n new (): PluginArray;\r\n}\r\n\r\ninterface MSMediaKeyError {\r\n systemCode: number;\r\n code: number;\r\n MS_MEDIA_KEYERR_SERVICE: number;\r\n MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n MS_MEDIA_KEYERR_OUTPUT: number;\r\n MS_MEDIA_KEYERR_DOMAIN: number;\r\n MS_MEDIA_KEYERR_UNKNOWN: number;\r\n MS_MEDIA_KEYERR_CLIENT: number;\r\n}\r\ndeclare var MSMediaKeyError: {\r\n prototype: MSMediaKeyError;\r\n new (): MSMediaKeyError;\r\n MS_MEDIA_KEYERR_SERVICE: number;\r\n MS_MEDIA_KEYERR_HARDWARECHANGE: number;\r\n MS_MEDIA_KEYERR_OUTPUT: number;\r\n MS_MEDIA_KEYERR_DOMAIN: number;\r\n MS_MEDIA_KEYERR_UNKNOWN: number;\r\n MS_MEDIA_KEYERR_CLIENT: number;\r\n}\r\n\r\ninterface Plugin {\r\n length: number;\r\n filename: string;\r\n version: string;\r\n name: string;\r\n description: string;\r\n item(index: number): MimeType;\r\n [index: number]: MimeType;\r\n namedItem(type: string): MimeType;\r\n}\r\ndeclare var Plugin: {\r\n prototype: Plugin;\r\n new (): Plugin;\r\n}\r\n\r\ninterface HTMLFrameSetElement {\r\n onpageshow: (ev: PageTransitionEvent) => any;\r\n addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n onpagehide: (ev: PageTransitionEvent) => any;\r\n addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\n}\r\n\r\ninterface Screen extends EventTarget {\r\n msOrientation: string;\r\n onmsorientationchange: (ev: any) => any;\r\n addEventListener(type: "msorientationchange", listener: (ev: any) => any, useCapture?: boolean): void;\r\n msLockOrientation(orientations: string[]): boolean;\r\n msUnlockOrientation(): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\n\r\ninterface MediaSource extends EventTarget {\r\n sourceBuffers: SourceBufferList;\r\n duration: string;\r\n readyState: any;\r\n activeSourceBuffers: SourceBufferList;\r\n addSourceBuffer(type: string): SourceBuffer;\r\n endOfStream(error?: string): void;\r\n isTypeSupported(type: string): boolean;\r\n removeSourceBuffer(sourceBuffer: SourceBuffer): void;\r\n}\r\ndeclare var MediaSource: {\r\n prototype: MediaSource;\r\n new (): MediaSource;\r\n}\r\n\r\ninterface MediaError {\r\n MS_MEDIA_ERR_ENCRYPTED: number;\r\n}\r\n//declare var MediaError: {\r\n// prototype: MediaError;\r\n// MS_MEDIA_ERR_ENCRYPTED: number;\r\n//}\r\n\r\ninterface SourceBufferList extends EventTarget {\r\n length: number;\r\n item(index: number): SourceBuffer;\r\n [index: number]: SourceBuffer;\r\n}\r\ndeclare var SourceBufferList: {\r\n prototype: SourceBufferList;\r\n new (): SourceBufferList;\r\n}\r\n\r\ninterface XMLDocument extends Document {\r\n}\r\ndeclare var XMLDocument: {\r\n prototype: XMLDocument;\r\n new (): XMLDocument;\r\n}\r\n\r\ninterface DeviceMotionEvent extends Event {\r\n rotationRate: DeviceRotationRate;\r\n acceleration: DeviceAcceleration;\r\n interval: number;\r\n accelerationIncludingGravity: DeviceAcceleration;\r\n initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict, accelerationIncludingGravity: DeviceAccelerationDict, rotationRate: DeviceRotationRateDict, interval: number): void;\r\n}\r\ndeclare var DeviceMotionEvent: {\r\n prototype: DeviceMotionEvent;\r\n new (): DeviceMotionEvent;\r\n}\r\n\r\ninterface MimeType {\r\n enabledPlugin: Plugin;\r\n suffixes: string;\r\n type: string;\r\n description: string;\r\n}\r\ndeclare var MimeType: {\r\n prototype: MimeType;\r\n new (): MimeType;\r\n}\r\n\r\ninterface MSDocumentExtensions {\r\n captureEvents(): void;\r\n releaseEvents(): void;\r\n}\r\n\r\ninterface HTMLElement {\r\n dataset: DOMStringMap;\r\n hidden: boolean;\r\n msGetInputContext(): MSInputMethodContext;\r\n}\r\n\r\ninterface MutationObserver {\r\n observe(target: Node, options: MutationObserverInit): void;\r\n takeRecords(): MutationRecord[];\r\n disconnect(): void;\r\n}\r\ndeclare var MutationObserver: {\r\n prototype: MutationObserver;\r\n new (callback: (arr: MutationRecord[], observer: MutationObserver)=>any): MutationObserver;\r\n}\r\n\r\ninterface AudioTrackList {\r\n onremovetrack: (ev: PluginArray) => any;\r\n //addEventListener(type: "removetrack", listener: (ev: PluginArray) => any, useCapture?: boolean): void;\r\n}\r\n\r\ninterface HTMLObjectElement {\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n}\r\n\r\ninterface HTMLEmbedElement {\r\n /**\r\n * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.\r\n */\r\n msPlayToPreferredSourceUri: string;\r\n /**\r\n * Gets or sets the primary DLNA PlayTo device.\r\n */\r\n msPlayToPrimary: boolean;\r\n /**\r\n * Gets or sets whether the DLNA PlayTo device is available.\r\n */\r\n msPlayToDisabled: boolean;\r\n /**\r\n * Gets the source associated with the media element for use by the PlayToManager.\r\n */\r\n msPlayToSource: any;\r\n}\r\n\r\ninterface MSWebViewAsyncOperation extends EventTarget {\r\n target: MSHTMLWebViewElement;\r\n oncomplete: (ev: any) => any;\r\n addEventListener(type: "complete", listener: (ev: any) => any, useCapture?: boolean): void;\r\n error: DOMError;\r\n onerror: (ev: any) => any;\r\n addEventListener(type: "error", listener: (ev: any) => any, useCapture?: boolean): void;\r\n readyState: number;\r\n type: number;\r\n result: any;\r\n start(): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n ERROR: number;\r\n TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n TYPE_INVOKE_SCRIPT: number;\r\n COMPLETED: number;\r\n TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n STARTED: number;\r\n}\r\ndeclare var MSWebViewAsyncOperation: {\r\n prototype: MSWebViewAsyncOperation;\r\n new (): MSWebViewAsyncOperation;\r\n ERROR: number;\r\n TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;\r\n TYPE_INVOKE_SCRIPT: number;\r\n COMPLETED: number;\r\n TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;\r\n STARTED: number;\r\n}\r\n\r\ninterface ScriptNotifyEvent extends Event {\r\n value: string;\r\n callingUri: string;\r\n}\r\ndeclare var ScriptNotifyEvent: {\r\n prototype: ScriptNotifyEvent;\r\n new (): ScriptNotifyEvent;\r\n}\r\n\r\ninterface PerformanceNavigationTiming extends PerformanceEntry {\r\n redirectStart: number;\r\n domainLookupEnd: number;\r\n responseStart: number;\r\n domComplete: number;\r\n domainLookupStart: number;\r\n loadEventStart: number;\r\n unloadEventEnd: number;\r\n fetchStart: number;\r\n requestStart: number;\r\n domInteractive: number;\r\n navigationStart: number;\r\n connectEnd: number;\r\n loadEventEnd: number;\r\n connectStart: number;\r\n responseEnd: number;\r\n domLoading: number;\r\n redirectEnd: number;\r\n redirectCount: number;\r\n unloadEventStart: number;\r\n domContentLoadedEventStart: number;\r\n domContentLoadedEventEnd: number;\r\n type: string;\r\n}\r\ndeclare var PerformanceNavigationTiming: {\r\n prototype: PerformanceNavigationTiming;\r\n new (): PerformanceNavigationTiming;\r\n}\r\n\r\ninterface MSMediaKeyNeededEvent extends Event {\r\n initData: Uint8Array;\r\n}\r\ndeclare var MSMediaKeyNeededEvent: {\r\n prototype: MSMediaKeyNeededEvent;\r\n new (): MSMediaKeyNeededEvent;\r\n}\r\n\r\ninterface MSManipulationEvent {\r\n MS_MANIPULATION_STATE_SELECTING: number;\r\n MS_MANIPULATION_STATE_COMMITTED: number;\r\n MS_MANIPULATION_STATE_PRESELECT: number;\r\n MS_MANIPULATION_STATE_DRAGGING: number;\r\n MS_MANIPULATION_STATE_CANCELLED: number;\r\n}\r\n//declare var MSManipulationEvent: {\r\n// prototype: MSManipulationEvent;\r\n// MS_MANIPULATION_STATE_SELECTING: number;\r\n// MS_MANIPULATION_STATE_COMMITTED: number;\r\n// MS_MANIPULATION_STATE_PRESELECT: number;\r\n// MS_MANIPULATION_STATE_DRAGGING: number;\r\n// MS_MANIPULATION_STATE_CANCELLED: number;\r\n//}\r\n\r\ninterface LongRunningScriptDetectedEvent extends Event {\r\n stopPageScriptExecution: boolean;\r\n executionTime: number;\r\n}\r\ndeclare var LongRunningScriptDetectedEvent: {\r\n prototype: LongRunningScriptDetectedEvent;\r\n new (): LongRunningScriptDetectedEvent;\r\n}\r\n\r\ninterface MSAppView {\r\n viewId: number;\r\n close(): void;\r\n postMessage(message: any, targetOrigin: string, ports?: any): void;\r\n}\r\ndeclare var MSAppView: {\r\n prototype: MSAppView;\r\n new (): MSAppView;\r\n}\r\n\r\ninterface PerfWidgetExternal {\r\n maxCpuSpeed: number;\r\n performanceCounterFrequency: number;\r\n performanceCounter: number;\r\n averagePaintTime: number;\r\n activeNetworkRequestCount: number;\r\n paintRequestsPerSecond: number;\r\n repositionWindow(x: number, y: number): void;\r\n getRecentMemoryUsage(last: number): any;\r\n getMemoryUsage(): number;\r\n resizeWindow(width: number, height: number): void;\r\n getProcessCpuUsage(): number;\r\n removeEventListener(eventType: string, callback: (ev: any) => any): void;\r\n getRecentCpuUsage(last: number): any;\r\n addEventListener(eventType: string, callback: (ev: any) => any): void;\r\n getRecentPaintRequests(last: number): any;\r\n}\r\ndeclare var PerfWidgetExternal: {\r\n prototype: PerfWidgetExternal;\r\n new (): PerfWidgetExternal;\r\n}\r\n\r\ninterface PageTransitionEvent extends Event {\r\n persisted: boolean;\r\n}\r\ndeclare var PageTransitionEvent: {\r\n prototype: PageTransitionEvent;\r\n new (): PageTransitionEvent;\r\n}\r\n\r\ninterface MutationCallback {\r\n (mutations: MutationRecord[], observer: MutationObserver): void;\r\n}\r\n\r\ninterface HTMLDocument extends Document {\r\n}\r\ndeclare var HTMLDocument: {\r\n prototype: HTMLDocument;\r\n new (): HTMLDocument;\r\n}\r\n\r\ninterface KeyPair {\r\n privateKey: Key;\r\n publicKey: Key;\r\n}\r\ndeclare var KeyPair: {\r\n prototype: KeyPair;\r\n new (): KeyPair;\r\n}\r\n\r\ninterface MSApp {\r\n getViewOpener(): MSAppView;\r\n suppressSubdownloadCredentialPrompts(suppress: boolean): void;\r\n execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;\r\n isTaskScheduledAtPriorityOrHigher(priority: string): boolean;\r\n execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;\r\n createNewView(uri: string): MSAppView;\r\n getCurrentPriority(): string;\r\n NORMAL: string;\r\n HIGH: string;\r\n IDLE: string;\r\n CURRENT: string;\r\n}\r\n//declare var MSApp: {\r\n// prototype: MSApp;\r\n// NORMAL: string;\r\n// HIGH: string;\r\n// IDLE: string;\r\n// CURRENT: string;\r\n//}\r\n\r\ninterface HTMLTrackElement {\r\n readyState: number;\r\n ERROR: number;\r\n LOADING: number;\r\n LOADED: number;\r\n NONE: number;\r\n}\r\n//declare var HTMLTrackElement: {\r\n// prototype: HTMLTrackElement;\r\n// ERROR: number;\r\n// LOADING: number;\r\n// LOADED: number;\r\n// NONE: number;\r\n//}\r\n\r\ninterface MSMediaKeySession extends EventTarget {\r\n sessionId: string;\r\n error: MSMediaKeyError;\r\n keySystem: string;\r\n close(): void;\r\n update(key: Uint8Array): void;\r\n}\r\ndeclare var MSMediaKeySession: {\r\n prototype: MSMediaKeySession;\r\n new (): MSMediaKeySession;\r\n}\r\n\r\ninterface HTMLVideoElement {\r\n videoPlaybackQuality: VideoPlaybackQuality;\r\n}\r\n\r\ninterface UnviewableContentIdentifiedEvent extends NavigationEvent {\r\n referrer: string;\r\n}\r\ndeclare var UnviewableContentIdentifiedEvent: {\r\n prototype: UnviewableContentIdentifiedEvent;\r\n new (): UnviewableContentIdentifiedEvent;\r\n}\r\n\r\ninterface CryptoOperation extends EventTarget {\r\n algorithm: Algorithm;\r\n oncomplete: (ev: any) => any;\r\n addEventListener(type: "complete", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onerror: (ev: any) => any;\r\n addEventListener(type: "error", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onprogress: (ev: any) => any;\r\n addEventListener(type: "progress", listener: (ev: any) => any, useCapture?: boolean): void;\r\n onabort: (ev: any) => any;\r\n addEventListener(type: "abort", listener: (ev: any) => any, useCapture?: boolean): void;\r\n key: Key;\r\n result: any;\r\n abort(): void;\r\n finish(): void;\r\n process(buffer: ArrayBufferView): void;\r\n addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;\r\n}\r\ndeclare var CryptoOperation: {\r\n prototype: CryptoOperation;\r\n new (): CryptoOperation;\r\n}\r\n\r\ndeclare var onpageshow: (ev: PageTransitionEvent) => any;\r\ndeclare function addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare var ondevicemotion: (ev: DeviceMotionEvent) => any;\r\ndeclare function addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;\r\ndeclare var devicePixelRatio: number;\r\ndeclare var msCrypto: Crypto;\r\ndeclare var ondeviceorientation: (ev: DeviceOrientationEvent) => any;\r\ndeclare function addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;\r\ndeclare var onmspointerenter: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointerenter", listener: (ev: any) => any, useCapture?: boolean): void;\r\ndeclare var onpagehide: (ev: PageTransitionEvent) => any;\r\ndeclare function addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;\r\ndeclare var onmspointerleave: (ev: any) => any;\r\ndeclare function addEventListener(type: "mspointerleave", listener: (ev: any) => any, useCapture?: boolean): void;\r\n\r\n\r\n/////////////////////////////\r\n/// WorkerGlobalScope APIs \r\n/////////////////////////////\r\n// TODO: These are only available in a Web Worker - should be in a separate lib file\r\ndeclare function importScripts(...urls: string[]): void;\r\n\r\n\r\n/////////////////////////////\r\n/// Windows Script Host APIS\r\n/////////////////////////////\r\ndeclare var ActiveXObject: { new (s: string): any; };\r\n\r\ninterface ITextWriter {\r\n Write(s: string): void;\r\n WriteLine(s: string): void;\r\n Close(): void;\r\n}\r\n\r\ndeclare var WScript: {\r\n Echo(s: any): void;\r\n StdErr: ITextWriter;\r\n StdOut: ITextWriter;\r\n Arguments: { length: number; Item(n: number): string; };\r\n ScriptFullName: string;\r\n Quit(exitCode?: number): number;\r\n}\r\n' }),require.config({shim:{"vs/languages/typescript/lib/raw.typescriptServices":{}}}),define("vs/languages/typescript/lib/typescriptServices",["./raw.typescriptServices","vs/text!./lib.d.ts"],function(){"use strict";return TypeScript});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/lib/typescriptServices.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/lib/typescriptServices.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";define("vs/base/paths",["require","exports"],function(e,t){function n(e,n){e=t.normalize(e),n=t.normalize(n);for(var r=e.split(t.sep),i=n.split(t.sep);r.length>0&&i.length>0&&r[0]===i[0];)r.shift(),i.shift();for(var s=0,o=r.length;o>s;s++)i.unshift("..");return i.join(t.sep)}function r(e){for(var n=e.split(/[\\\/]/),r=0,i=n.length;i>r;r++)"."===n[r]&&n[r+1]&&(n.splice(r,1),r--);return n.join(t.sep)}function i(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t||0===~t?".":e.substring(0,~t)}function s(e){var n=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===n?e:~n===e.length-1?t.basename(e.substring(0,e.length-1)):e.substr(~n+1)}function o(e){var t=~e.lastIndexOf(".");return t?e.substring(~t):""}function a(){for(var e=[],t=0;t=o.fullStart()&&s]+)/i,e}();t.FilenameSuggestions=l;var c;!function(e){function t(e){return e.fullText().substr(e.leadingTriviaWidth(),e.width())}function n(e,t){for(;t-->0&&e;)e=e.parent();return e}function r(e){for(var t=[],n=0;n0&&e;){var r=t.shift();if(r!==e.kind())return!1;e=e.parent()}return!0}e.text=t,e.parent=n,e.isTokenPath=r}(c||(c={}))});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/participants/filenameSuggestions.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/participants/filenameSuggestions.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/typescript/participants/nlsParticipant",["require","exports","vs/nls!vs/languages/typescript/participants/nlsParticipant","vs/base/severity","vs/base/strings","vs/platform/markers/markers","vs/languages/typescript/lib/typescriptServices"],function(e,t,n,r,i,s,o){var a=function(e){function t(t){e.call(this),this._markers=t}return __extends(t,e),t.prototype.visitToken=function(i){var o=this.position()+i.leadingTriviaWidth(),a=i.width();14===i.kind()&&i.text().charCodeAt(0)===t._DoubleQuote&&this._markers.push(s.createTextMarker(r.Severity.Info,0,n.localize("vs_languages_typescript_participants_nlsParticipant",0),o,a)),e.prototype.visitToken.call(this,i)},t.prototype.visitInvocationExpression=function(t){if(212!==t.expression.kind())return e.prototype.visitInvocationExpression.call(this,t);var n=t.expression;return 11===n.expression.kind()&&i.equalsIgnoreCase(n.expression.text(),"nls")?11!==n.name.kind()||"localize"!==n.name.text()?e.prototype.visitInvocationExpression.call(this,t):(this.skip(t),void 0):e.prototype.visitInvocationExpression.call(this,t)},t.prototype.visitMemberAccessExpression=function(t){if(11!==t.name.kind()||!i.equalsIgnoreCase("nls",t.name.text()))return e.prototype.visitMemberAccessExpression.call(this,t);if(213!==t.expression.kind())return e.prototype.visitMemberAccessExpression.call(this,t);var n=t.expression;return 11===n.kind()&&i.equalsIgnoreCase("localize",n.expression.fullText())?(this.skip(t),void 0):e.prototype.visitMemberAccessExpression.call(this,t)},t._DoubleQuote='"'.charCodeAt(0),t}(o.PositionTrackingWalker),l=function(){function e(){this._markers=[]}return e.prototype.validate=function(e,t,n){var r=this;this._markers.length=0,n.sourceUnit().accept(new a(this._markers)),t.changeMarkers(e.getAssociatedResource(),function(e){r._markers.forEach(function(t){return e.addMarker(t)})})},e.ID="vs.languages.typescript.nlsParticipant",e}();t.WorkerParticipant=l});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/participants/nlsParticipant.nls",[],{vs_languages_typescript_participants_nlsParticipant:["String needs localization"]});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/typescript/participants/nlsParticipant.nls.keys",[],{vs_languages_typescript_participants_nlsParticipant:{path:"vs/languages/typescript/participants/nlsParticipant.js",keys:["missing.localize"]}});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/xml/xml",["require","exports","vs/editor/modes/modes","vs/editor/modes/modesExtensions","vs/platform/services","vs/platform/thread/attribute"],function(e,t,n,r,i,s){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.equals=function(n){if(!(n instanceof t&&e.prototype.equals.call(this,n)))return!1;var r=n;return this.getMode()===r.getMode()&&Object.getPrototypeOf(this)===Object.getPrototypeOf(n)},t.prototype.nextName=function(e){return e.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/)},t.prototype.nextAttrValue=function(e){return e.advanceIfRegExp(/^("|').*?\1/)},t}(r.AbstractState),a=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){return e.advanceIfString("",!1).length>0?{type:"comment.xml.content"}:e.advanceIfString("-->").length>0?{type:"comment.xml",bracket:-1,nextState:new a(this.getMode())}:(e.next(),{type:"comment.xml.content"})},t}(o),c=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){var t=this.nextName(e);return t.length>0?{type:"tag.xml.tag-"+t,bracket:1,nextState:new u(this.getMode(),t)}:(e.next(),{type:""})},t}(o),u=function(e){function t(t,n){e.call(this,t),this.tagName=n}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.tagName)},t.prototype.equals=function(t){return e.prototype.equals.call(this,t)&&this.tagName===t.tagName},t.prototype.tokenize=function(e){var n=this;if(e.skipWhitespace().length>0)return{type:""};var r=this.nextName(e),i=null;return r.length>0?{type:"attribute.name.xml",bracket:0,nextState:new p(this.getMode(),function(e){return new t(e,n.tagName)})}:(i=e.advanceIfRegExp(/^\/?>/)).length>0?"/"===i.charAt(0)?(e.goBack(1),{type:"tag.xml.tag-"+this.tagName,bracket:-1,nextState:new d(this.getMode())}):{type:"delimiter.start.xml",bracket:-1,nextState:new a(this.getMode())}:(e.next(),{type:""})},t}(o),p=function(e){function t(t,n){e.call(this,t),this.tagStateCreator=n}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.tagStateCreator)},t.prototype.tokenize=function(e){return e.skipWhitespace().length>0||e.eos()?{type:""}:"="===e.peek()?(e.next(),{type:"",bracket:0,nextState:new h(this.getMode(),this.tagStateCreator)}):this.tagStateCreator(this.getMode()).tokenize(e)},t}(o),h=function(e){function t(t,n){e.call(this,t),this.tagStateCreator=n}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.tagStateCreator)},t.prototype.tokenize=function(e){if(e.skipWhitespace().length>0||e.eos())return{type:""};var t=this.nextAttrValue(e);return t.length>0?{type:"attribute.value.xml",bracket:0,nextState:this.tagStateCreator(this.getMode())}:this.tagStateCreator(this.getMode()).tokenize(e)},t}(o),d=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){var t=e.next();if(">"!==t)throw new Error("Should never happen");return{type:"delimiter.start.xml",bracket:-1,nextState:new a(this.getMode())}},t}(o),m=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){var t=this.nextName(e);return t.length>0?{type:"tag.xml.tag-"+t,bracket:-1}:e.advanceIfString(">").length>0?{type:"delimiter.end.xml",bracket:-1,nextState:new a(this.getMode())}:e.advanceUntil(">",!1).length>0?{type:""}:(e.next(),{type:""})},t}(o),f=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){var t=this.nextName(e);return t.length>0?{type:"meta.xml."+t,bracket:0,nextState:new g(this.getMode())}:(e.next(),{type:"meta.xml"})},t}(o),g=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){if(e.skipWhitespace().length>0)return{type:""};var n=this.nextName(e);return n.length>0?{type:"attribute.name.xml",bracket:0,nextState:new p(this.getMode(),function(e){return new t(e)})}:e.advanceIfString("?>").length>0?{type:"delimiter.start.xml",bracket:-1,nextState:new a(this.getMode())}:(e.next(),{type:""})},t}(o),v=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode())},t.prototype.tokenize=function(e){return e.advanceUntil("]]>",!1).length>0?{type:""}:e.advanceIfString("]]>").length>0?{type:"delimiter.start.xml",bracket:-1,nextState:new a(this.getMode())}:(e.next(),{type:""})},t}(o),y=function(e){function t(t,n){e.call(this,t,n,i.AsyncDescriptor.create("vs/languages/xml/xmlWorker","XMLWorker")),this.formattingSupport=this}return __extends(t,e),t.prototype.getInitialState=function(){return new a(this)},t.prototype.getNonWordTokenTypes=function(){return["delimiter.xml"]},t.prototype.getCommentsConfiguration=function(){return{blockCommentStartToken:""}},t.prototype.getElectricCharacters=function(){return[">"]},t.prototype.getAutoClosingPairs=function(){return[{open:'"',close:'"'}]},t.prototype.getSurroundingPairs=function(){return[{open:"<",close:">"},{open:'"',close:'"'}]},t.prototype.splitLineIntoTokens=function(e,t,n,r){var i;i=r?function(e,t,n){return n>=e&&t>n}:function(e,t,n){return n>e&&t>=n};for(var s=null,o=[],a=0;a0&&(o.push(e.substring(t[a-1].startIndex,t[a].startIndex)),i(t[a-1].startIndex,t[a].startIndex,n)&&(s=a-1));return o.push(e.substring(t[a-1].startIndex)),s=null===s?o.length-1:s,{lineTokens:o,offsetTokenIndex:s}},t.prototype.onEnterImpl=function(e,t,n){if(""===e)return null;for(var r=this.splitLineIntoTokens(e,t,n,!1),i=r.offsetTokenIndex,s=r.lineTokens;i>0&&""===t[i].type;)i--;return 0>i||"delimiter.start.xml"!==t[i].type?null:">"===s[i]&&i>0&&"/"===s[i-1]||"?>"===s[i]?null:(i=r.offsetTokenIndex+1,i1&&"delimiter.end.xml"!==o.type){if("delimiter.start.xml"===o.type){var a;do a=o.startIndex,s--,o=n[s];while(s>=0&&0!==o.type.indexOf("tag.xml.tag-"));if(s>=0){var l=e.substring(o.startIndex,a);return"/"===l?null:{appendText:""}}return null}return null}do s--;while(s>=0&&""===n[s].type);return 0>s||!t.tagRegExp.test(n[s].type)?null:{matchBracketType:n[s].type}},t.prototype._worker=function(t){return e.prototype._worker.call(this,t)},t.prototype.format=function(e,t,n){return this._worker(function(r){return r.format(e,t,n)})},t.tagRegExp=/^tag\.xml\./,t.$format=s.OneWorker(t,t.prototype.format),t}(r.AbstractMode);t.XMLMode=y});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/xml/xml.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/xml/xml.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/lib/htmlLib",["require","exports"],function(){function e(e){return e}var t={style_html:e};return t});var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/xml/xmlWorker",["require","exports","vs/base/lib/winjs.base","vs/editor/worker/modesWorker","vs/languages/lib/htmlLib"],function(e,t,n,r,i){var s=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.format=function(e,t,r){var s=this.resourceService.get(e),o=s.getValueInRange(t),a=i.style_html(o,{indent_size:r.insertSpaces?r.tabSize:1,indent_char:r.insertSpaces?" ":" ",max_char:256});return n.Promise.as(a)},t}(r.AbstractWorkerMode);t.XMLWorker=s});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/xml/xmlWorker.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/xml/xmlWorker.nls.keys",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ "use strict";var __extends=this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n};define("vs/languages/vsxml/vsxml",["require","exports","vs/base/objects","vs/base/errors","vs/editor/modes/modesExtensions"],function(e,t,n,r,i){var s='<>"=/',o=" ",a=n.createKeywordMatcher(["summary","reference","returns","param","loc"]),l=n.createKeywordMatcher(["type","path","name","locid","filename","format","optional"]),c=n.createKeywordMatcher(s.split("")),u=function(e){function t(t,n,r){e.call(this,t),this.state=n,this.parentState=r}return __extends(t,e),t.prototype.getParentState=function(){return this.parentState},t.prototype.makeClone=function(){return new t(this.getMode(),null===this.state?null:this.state.clone(),null===this.parentState?null:this.parentState.clone())},t.prototype.equals=function(n){if(!e.prototype.equals.call(this,n))return!1;if(!(n instanceof t))return!1;var r=n;return null===this.state&&null===r.state?!0:null===this.state||null===r.state?!1:null===this.parentState&&null===r.parentState?!0:null===this.parentState||null===r.parentState?!1:this.state.equals(r.state)&&this.parentState.equals(r.parentState)},t.prototype.setState=function(e){this.state=e},t.prototype.postTokenize=function(e){return e},t.prototype.tokenize=function(e){var t=this.state.tokenize(e);return void 0!==t.nextState&&this.setState(t.nextState),t.nextState=this,this.postTokenize(t,e)},t}(i.AbstractState);t.EmbeddedState=u;var p=function(e){function t(t,n,r){e.call(this,t,n,r)}return __extends(t,e),t.prototype.setState=function(t){e.prototype.setState.call(this,t),this.getParentState().setVSXMLState(t)},t.prototype.postTokenize=function(e,t){return t.eos()&&(e.nextState=this.getParentState()),e},t}(u);t.VSXMLEmbeddedState=p;var h=function(e){function t(t,n,r,i){"undefined"==typeof i&&(i=""),e.call(this,t),this.name=n,this.parent=r,this.whitespaceTokenType=i}return __extends(t,e),t.prototype.equals=function(n){return e.prototype.equals.call(this,n)?n instanceof t&&this.getMode()===n.getMode()&&this.name===n.name&&(null===this.parent&&null===n.parent||null!==this.parent&&this.parent.equals(n.parent)):!1},t.prototype.tokenize=function(e){return e.setTokenRules(s,o),e.skipWhitespace().length>0?{type:this.whitespaceTokenType}:this.stateTokenize(e)},t.prototype.stateTokenize=function(){throw r.notImplemented()},t}(i.AbstractState);t.VSXMLState=h;var d=function(e){function t(t,n){e.call(this,t,"string",n,"attribute.value.vs")}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null)},t.prototype.stateTokenize=function(e){for(;!e.eos();){var t=e.nextToken();if('"'===t)return{type:"attribute.value.vs",nextState:this.parent}}return{type:"attribute.value.vs",nextState:this.parent}},t}(h);t.VSXMLString=d;var m=function(e){function t(t,n){e.call(this,t,"expression",n,"vs")}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null)},t.prototype.stateTokenize=function(e){var t=e.nextToken(),n=this.whitespaceTokenType;return">"===t?{type:"delimiter.vs",nextState:this.parent}:'"'===t?{type:"attribute.value.vs",nextState:new d(this.getMode(),this)}:(a(t)?n="tag.vs":l(t)?n="attribute.name.vs":c(t)&&(n="delimiter.vs"),{type:n,nextState:this})},t}(h);t.VSXMLTag=m;var f=function(e){function t(t,n){e.call(this,t,"expression",n,"vs")}return __extends(t,e),t.prototype.makeClone=function(){return new t(this.getMode(),this.parent?this.parent.clone():null)},t.prototype.stateTokenize=function(e){var t=e.nextToken();return"<"===t?{type:"delimiter.vs",nextState:new m(this.getMode(),this)}:{type:this.whitespaceTokenType,nextState:this}},t}(h);t.VSXMLExpression=f});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/vsxml/vsxml.nls",[],{});/*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ define("vs/languages/vsxml/vsxml.nls.keys",[],{});var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; if (typeof importScripts === "function" && typeof document === "undefined") { onmessage = function (e) { importScripts("sourcemapParser.js", "sourcemapMappings.js", "workerMessaging.js", "base64.js"); var sourceMapContent = e.data.content; var sourceMap, sourcemapMappings; sourceMap = FormatService.SourcemapParser.parseMapContent(sourceMapContent); if (sourceMap && sourceMap.version === 3) { sourcemapMappings = FormatService.SourcemapParser.calculateMappings(sourceMap); } if (sourcemapMappings) { this.postMessage({ id: e.data.id, sourcemapMappings: sourcemapMappings, urls: sourceMap.sources, sourceRoot: sourceMap.sourceRoot, sourcesContent: sourceMap.sourcesContent, version: sourceMap.version, sourcesLanguage: sourceMap.x_sourcesLanguage }); } else { this.postMessage({ id: e.data.id, sourcemapMappings: null, urls: [], sourceRoot: "", sourcesContent: [], version: sourceMap && sourceMap.version, sourcesLanguage: null }); } }; } })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var FormatWorker = (function () { function FormatWorker(msg) { this._source = msg.source; this._mimeType = msg.mimeType; this._generatedSourceSpans = []; this._canBePrettyPrinted = false; this._error = false; this._firstCompilerError = ""; } Object.defineProperty(FormatWorker.prototype, "formattedText", { get: function () { return this._formattedText; }, enumerable: true, configurable: true }); Object.defineProperty(FormatWorker.prototype, "canBePrettyPrinted", { get: function () { return this._canBePrettyPrinted; }, enumerable: true, configurable: true }); Object.defineProperty(FormatWorker.prototype, "generatedSourceSpans", { get: function () { return this._generatedSourceSpans; }, enumerable: true, configurable: true }); Object.defineProperty(FormatWorker.prototype, "error", { get: function () { return this._error; }, enumerable: true, configurable: true }); Object.defineProperty(FormatWorker.prototype, "firstCompilerError", { get: function () { return this._firstCompilerError; }, enumerable: true, configurable: true }); FormatWorker.prototype.getNumLines = function (source) { var count = 0; for (var i = 0; i < source.length; i++) { if (source[i] === '\n') { ++count; } } return count; }; FormatWorker.prototype.parseSource = function (source, mimeType) { if (FormatService.HTMLScriptFinder.isSupportedScript(mimeType)) { this._generatedSourceSpans.push(new FormatService.SourceSpanBuilder(0, source.length, true)); this._canBePrettyPrinted = true; } else if (mimeType === "text/html") { try { var htmlScriptFinder = new FormatService.HTMLScriptFinder(source); if (htmlScriptFinder.sourceSpans.length > 1) { this._generatedSourceSpans = htmlScriptFinder.sourceSpans; this._canBePrettyPrinted = true; } } catch (ex) { } } }; FormatWorker.prototype.formatJavaScript = function (source) { if (source.length === 0) { return; } Tools.Utility.Assert.isTrue(this._canBePrettyPrinted); Tools.Utility.Assert.isTrue(this._generatedSourceSpans.length > 0); var generatedLineOffset = 0; var sourceSpanIndex = 0; this._generatedSourceSpans[0].generatedLineOffset = generatedLineOffset; this._formattedText = ""; var TypeScript = require("vs/languages/typescript/lib/typescriptServices"); while (true) { var sourceSpan = this._generatedSourceSpans[sourceSpanIndex]; if (!sourceSpan.isScript) { sourceSpan.generatedLineOffset += generatedLineOffset; var htmlSource = source.slice(sourceSpan.start, sourceSpan.end + 1); generatedLineOffset += sourceSpan.calculateLineOffsets(htmlSource); this._formattedText += htmlSource; if (++sourceSpanIndex < this._generatedSourceSpans.length) { this._formattedText += "\n"; ++generatedLineOffset; } } if (sourceSpanIndex === this._generatedSourceSpans.length) { return; } sourceSpan = this._generatedSourceSpans[sourceSpanIndex]; Tools.Utility.Assert.isTrue(sourceSpan.isScript); sourceSpan.generatedLineOffset += generatedLineOffset; var settings = new TypeScript.CompilationSettings(); settings.emitComments = true; settings.mapSourceFiles = true; var compiler = new TypeScript.TypeScriptCompiler(new TypeScript.NullLogger(), TypeScript.ImmutableCompilationSettings.fromCompilationSettings(settings)); var compilerSource; var compilerSourceNumLines; try { compilerSource = source.slice(sourceSpan.start, sourceSpan.end + 1); compilerSourceNumLines = sourceSpan.calculateLineOffsets(compilerSource); var snapshot = TypeScript.ScriptSnapshot.fromString(compilerSource); compiler.addFile("input.js", snapshot, TypeScript.ByteOrderMark.None, 5, false, []); var validFormattedText = false; var emitOutput = compiler.emit("input.js", function (path) { return path; }); var sourceMapContent = null; var outfileContent = null; for (var i in emitOutput.outputFiles) { if (emitOutput.outputFiles[i].fileType === TypeScript.OutputFileType.SourceMap) { sourceMapContent = emitOutput.outputFiles[i].text; } else { outfileContent = emitOutput.outputFiles[i].text; validFormattedText = true; } } } catch (e) { validFormattedText = false; } finally { if (validFormattedText) { try { if (sourceMapContent.indexOf(")]}") === 0) { sourceMapContent = sourceMapContent.slice(3); } var sourceMap = JSON.parse(sourceMapContent); } catch (ex) { } sourceSpan._mappings = FormatService.SourcemapParser.calculateMappings(sourceMap); if (!sourceSpan._mappings) { validFormattedText = false; } } if (validFormattedText) { var sourceMapPos = outfileContent.lastIndexOf("//# sourceMappingURL=input.js.map"); if (outfileContent[sourceMapPos - 1] === '\n' && outfileContent[sourceMapPos - 2] === '\n') { --sourceMapPos; } var newPrettyPrintedSource = (sourceMapPos !== -1) ? outfileContent.slice(0, sourceMapPos) : outfileContent; generatedLineOffset += this.getNumLines(newPrettyPrintedSource); this._formattedText += newPrettyPrintedSource; } else { generatedLineOffset += compilerSourceNumLines; this._formattedText += compilerSource; this._error = true; this._firstCompilerError = "Error: " + emitOutput.emitOutputResult; } } if (++sourceSpanIndex === this._generatedSourceSpans.length) { return; } } }; FormatWorker.prototype.processSource = function () { this.parseSource(this._source, this._mimeType); if (this._canBePrettyPrinted) { this.formatJavaScript(this._source); } }; return FormatWorker; })(); FormatService.FormatWorker = FormatWorker; onmessage = function (e) { var msg = e.data; var worker = new FormatWorker(msg); importScripts(msg.commonUrl + "assert.js", msg.loader + "loader.js", msg.typescriptServices + "typescriptServices.js", "sourceSpanBuilder.js", "sourcemapParser.js", "workerMessaging.js", "htmlScriptFinder.js", "base64.js"); require.config({ baseUrl: msg.editorBaseUrl }); worker.processSource(); var response = new FormatService.WorkerResponseMessage(); response.formattedText = worker.formattedText; response.canBePrettyPrinted = worker.canBePrettyPrinted; response.error = worker.error; response.errorMessage = worker.firstCompilerError; var generatedSourceSpans = worker.generatedSourceSpans; response.generatedSourceSpanData = []; for (var i = 0; i < generatedSourceSpans.length; i++) { response.generatedSourceSpanData.push(generatedSourceSpans[i].data); } this.postMessage(response); this.close(); }; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourcemapMappings = (function () { function SourcemapMappings(mappings, urls) { var _this = this; this.urls = urls; this._fileMappings = []; this._allMappings = []; if (mappings) { mappings.forEach(function (item) { if (!_this._fileMappings[item.file]) { _this._fileMappings[item.file] = []; } _this._fileMappings[item.file].push(item); _this._allMappings.push(item); }); } this._fileMappings.forEach(function (fileMappings) { fileMappings.sort(function (a, b) { if (a.sourceLine !== b.sourceLine) { return a.sourceLine - b.sourceLine; } else if (a.sourceColumn !== b.sourceColumn) { return a.sourceColumn - b.sourceColumn; } else if (a.generatedLine !== b.generatedLine) { return a.generatedLine - b.generatedLine; } else { return a.generatedColumn - b.generatedColumn; } }); }); } SourcemapMappings.binarySearch = function (mappings, position, compareFunction) { var max = mappings.length - 1; var min = 0; while (min <= max) { var mid = (min + max) >> 1; var comparison = compareFunction(mappings[mid], position.line, position.column); if (comparison > 0) { min = mid + 1; } else if (comparison < 0) { max = mid - 1; } else { max = mid; break; } } var result = Math.max(Math.min(mappings.length - 1, max), 0); while (result + 1 < mappings.length && compareFunction(mappings[result + 1], position.line, position.column) === 0) { result++; } return result; }; SourcemapMappings.binaryCompareSource = function (mapping, line, column) { if (mapping.sourceLine === line) { return column - mapping.sourceColumn; } else { return line - mapping.sourceLine; } }; SourcemapMappings.binaryCompareGenerated = function (mapping, line, column) { if (mapping.generatedLine === line) { return column - mapping.generatedColumn; } else { return line - mapping.generatedLine; } }; SourcemapMappings.prototype.isValid = function () { return this._fileMappings && this._fileMappings.length > 0; }; SourcemapMappings.prototype.getOriginalPosition = function (generatedPosition) { var pos = new FormatService.Position(generatedPosition.line, generatedPosition.column, generatedPosition.file); var mappings = this._allMappings; if (mappings.length > 0) { var index = SourcemapMappings.binarySearch(mappings, pos, SourcemapMappings.binaryCompareGenerated); pos.line = Math.max(mappings[index].sourceLine, 0); pos.column = Math.max(mappings[index].sourceColumn, 0); pos.file = Math.min(Math.max(mappings[index].file, 0), this._fileMappings.length - 1); } return pos; }; SourcemapMappings.prototype.getGeneratedPosition = function (originalPosition) { var pos = new FormatService.Position(originalPosition.line, originalPosition.column, originalPosition.file); var mappings = this._fileMappings[pos.file]; if (mappings && mappings.length > 0) { var index = SourcemapMappings.binarySearch(mappings, pos, SourcemapMappings.binaryCompareSource); pos.line = Math.max(mappings[index].generatedLine, 0); pos.column = Math.max(mappings[index].generatedColumn, 0); } return pos; }; return SourcemapMappings; })(); FormatService.SourcemapMappings = SourcemapMappings; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var Base64Format = (function () { function Base64Format() { } Base64Format.encode = function (inValue) { if (inValue < 64) { return Base64Format.EncodedValues.charAt(inValue); } throw TypeError(inValue + ": not a 64 based value"); }; Base64Format.decodeChar = function (inChar) { if (inChar.length === 1) { return Base64Format.EncodedValues.indexOf(inChar); } else { throw TypeError("'" + inChar + "' must have length 1"); } }; Base64Format.EncodedValues = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; return Base64Format; })(); var Base64VLQFormat = (function () { function Base64VLQFormat() { } Base64VLQFormat.encode = function (inValue) { if (inValue < 0) { inValue = ((-inValue) << 1) + 1; } else { inValue = inValue << 1; } var encodedStr = ""; do { var currentDigit = inValue & 31; inValue = inValue >> 5; if (inValue > 0) { currentDigit = currentDigit | 32; } encodedStr = encodedStr + Base64Format.encode(currentDigit); } while(inValue > 0); return encodedStr; }; Base64VLQFormat.decode = function (inString) { var result = 0; var negative = false; var shift = 0; for (var i = 0; i < inString.length; i++) { var byte = Base64Format.decodeChar(inString[i]); if (i === 0) { if ((byte & 1) === 1) { negative = true; } result = (byte >> 1) & 15; } else { result = result | ((byte & 31) << shift); } shift += (i === 0) ? 4 : 5; if ((byte & 32) === 32) { } else { return { value: negative ? -(result) : result, rest: inString.substr(i + 1) }; } } }; return Base64VLQFormat; })(); FormatService.Base64VLQFormat = Base64VLQFormat; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var HTMLScriptFinder = (function () { function HTMLScriptFinder(source) { Tools.Utility.Assert.hasValue(source, "Need to set a valid source"); this._source = source; this._sourceSpans = null; this._earlyEnd = false; } Object.defineProperty(HTMLScriptFinder.prototype, "sourceSpans", { get: function () { if (this._sourceSpans === null) { this.findScriptTags(); } return this._sourceSpans; }, enumerable: true, configurable: true }); HTMLScriptFinder.isSupportedScript = function (mimeType, scriptLanguage) { var mimeTypeLowerCase = mimeType.toLowerCase(); var scriptLanguageLowerCase = scriptLanguage ? scriptLanguage.toLocaleLowerCase() : ""; var isScriptSupported = ((!mimeTypeLowerCase && !scriptLanguageLowerCase) || (mimeTypeLowerCase === "text/javascript") || mimeTypeLowerCase === "text/jscript" || mimeTypeLowerCase === "application/javascript" || mimeTypeLowerCase === "application/x-javascript" || mimeTypeLowerCase === "text/ecmascript" || ((scriptLanguageLowerCase === "javascript" || scriptLanguageLowerCase === "jscript" || scriptLanguageLowerCase === "ecmascript"))); return isScriptSupported; }; HTMLScriptFinder.prototype.findScriptTags = function () { this._index = 0; this._sourceSpans = []; this._htmlStart = 0; var source = this._source; do { if (source[this._index] === "<") { if (this._index + 1 >= source.length) { break; } if (source[this._index + 1] === "!") { if (this._index + 3 < this._source.length && this._source[this._index + 2] === "-" && this._source[this._index + 3] === "-") { this.parseComment(); } else { this.parseTag(); } } else if (source[this._index + 1] === "?") { this.parseTag(); } else if (source[this._index + 1].match(/[a-zA-Z]/) || source[this._index + 1] === "_" || (source[this._index + 1] === "/" && this._index + 2 < source.length && (source[this._index + 2].match(/a-zA-Z/) || source[this._index + 2] === "_"))) { this.parseTag(); } } } while(++this._index < source.length); if (!this._earlyEnd) { this._sourceSpans.push(new FormatService.SourceSpanBuilder(this._htmlStart, this._source.length - 1, false)); } }; HTMLScriptFinder.prototype.parseComment = function () { Tools.Utility.Assert.areEqual(this._source[this._index], "<"); Tools.Utility.Assert.areEqual(this._source[this._index + 1], "!"); Tools.Utility.Assert.areEqual(this._source[this._index + 2], "-"); Tools.Utility.Assert.areEqual(this._source[this._index + 3], "-"); this._index += 3; while (++this._index < this._source.length) { if (this._source[this._index] === "-" && this._index + 2 < this._source.length && this._source[this._index + 1] === "-" && this._source[this._index + 2] === ">") { this._index += 2; return; } } }; HTMLScriptFinder.prototype.parseTag = function () { Tools.Utility.Assert.areEqual(this._source[this._index], "<"); var endTagEncountered = false; if (this._index + 1 < this._source.length && (this._source[this._index + 1] === "/" || this._source[this._index + 1] === "!" || this._source[this._index + 1] === "?")) { endTagEncountered = true; } var nextIsValue = false; var tagNameParsed = false; var obtainElementType = false; var obtainElementLanguage = false; var element; var mimeType = ""; var scriptLanguage = ""; var data; while (++this._index < this._source.length) { switch (this._source[this._index]) { case ">": if (this._source[this._index - 1] === "/" || this._source[this._index - 1] === "?") { endTagEncountered = true; } if (!endTagEncountered) { if (element && element.toLowerCase() === "script") { ++this._index; this.findScriptEnd(mimeType, scriptLanguage); } } return; case "\"": data = this.parseQuotedValue("\""); nextIsValue = false; if (obtainElementType) { mimeType = data; obtainElementType = false; } if (obtainElementLanguage) { scriptLanguage = data; obtainElementLanguage = false; } break; case "\'": data = this.parseQuotedValue("'"); nextIsValue = false; if (obtainElementType) { mimeType = data; obtainElementType = false; } if (obtainElementLanguage) { scriptLanguage = data; obtainElementLanguage = false; } break; case "=": nextIsValue = true; break; default: if (nextIsValue && !this._source[this._index].match(/\s/)) { data = this.parsePropertyValue(); nextIsValue = false; if (obtainElementType) { mimeType = data; obtainElementType = false; } if (obtainElementLanguage) { scriptLanguage = data; obtainElementLanguage = false; } } else if (this._source[this._index].match(/[a-zA-Z]/) || this._source[this._index] === "_") { if (!tagNameParsed) { element = this.parseElement(); tagNameParsed = true; } else { data = this.parseAttribute(); if (data.toLowerCase() === "type") { obtainElementType = true; } else if (data.toLowerCase() === "language" && !obtainElementType) { obtainElementLanguage = true; } } } } } }; HTMLScriptFinder.prototype.findScriptEnd = function (mimeType, scriptLanguage) { var scriptStart = this._index; var isScriptSupported = HTMLScriptFinder.isSupportedScript(mimeType, scriptLanguage); var endScriptStr = "": this._index--; return data; default: if (this._source[this._index].match(/\s/)) { this._index--; return data; } else { data += this._source[this._index]; } break; } } while(++this._index < this._source.length); Tools.Utility.Assert.fail("Should not be here"); return data; }; HTMLScriptFinder.prototype.parseElement = function () { Tools.Utility.Assert.isTrue(this._source[this._index].match(/[a-zA-Z_]/), "Non alpha or underscore character"); var element = ""; element += this._source[this._index]; while (++this._index < this._source.length) { switch (this._source[this._index]) { case ":": element += this._source[this._index]; break; default: if (this._source[this._index].match(/[a-zA-Z0-9]/) || this._source[this._index] === "_" || this._source[this._index] === "." || this._source[this._index] === "-") { element += this._source[this._index]; } else { this._index--; return element; } break; } } Tools.Utility.Assert.fail("Should not be here"); return element; }; HTMLScriptFinder.prototype.parseAttribute = function () { Tools.Utility.Assert.isTrue(this._source[this._index].match(/[a-zA-Z_]/), "Non alpha or underscore character"); var data = ""; data += this._source[this._index]; while (++this._index < this._source.length) { switch (this._source[this._index]) { case ".": data += this._source[this._index]; break; case ":": data += this._source[this._index]; break; case "-": case "_": data += this._source[this._index]; break; default: if (this._source[this._index].match(/[a-zA-Z0-9]/)) { data += this._source[this._index]; } else { this._index--; return data; } break; } } Tools.Utility.Assert.fail("Should not be here"); return data; }; return HTMLScriptFinder; })(); FormatService.HTMLScriptFinder = HTMLScriptFinder; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourcemapParser = (function () { function SourcemapParser() { } SourcemapParser.calculateMappings = function (sourceMap) { var mappings = []; if (!sourceMap || sourceMap.version !== 3 || !(sourceMap.mappings) || typeof sourceMap.mappings !== "string" || !sourceMap.sources || sourceMap.sources.length === 0) { return null; } var maxFileNum = sourceMap.sources.length; var lastMapping = new FormatService.SourcemapMapping(); var generatedLine = 0; var str = sourceMap.mappings; if (str.length === 0) { var mapping = new FormatService.SourcemapMapping(); mappings.push(mapping); } var currentFile = 0; while (str.length > 0) { if (str.charAt(0) === ";") { generatedLine++; str = str.slice(1); lastMapping.generatedColumn = 0; } else if (str.charAt(0) === ",") { str = str.slice(1); } else { var mapping = new FormatService.SourcemapMapping(); mapping.generatedLine = generatedLine; var result = FormatService.Base64VLQFormat.decode(str); mapping.generatedColumn = lastMapping.generatedColumn + result.value; lastMapping.generatedColumn = mapping.generatedColumn; str = result.rest; if (str.length > 0 && str.charAt(0) !== ";" && str.charAt(0) !== ",") { result = FormatService.Base64VLQFormat.decode(str); currentFile += result.value; if (currentFile > maxFileNum) { return null; } str = result.rest; } mapping.file = currentFile; if (str.length > 0 && str.charAt(0) !== ";" && str.charAt(0) !== ",") { result = FormatService.Base64VLQFormat.decode(str); mapping.sourceLine = result.value + lastMapping.sourceLine; lastMapping.sourceLine = mapping.sourceLine; str = result.rest; } if (str.length > 0 && str.charAt(0) !== ";" && str.charAt(0) !== ",") { result = FormatService.Base64VLQFormat.decode(str); mapping.sourceColumn = result.value + lastMapping.sourceColumn; lastMapping.sourceColumn = mapping.sourceColumn; str = result.rest; } if (str.length > 0 && str.charAt(0) !== ";" && str.charAt(0) !== ",") { result = FormatService.Base64VLQFormat.decode(str); str = result.rest; } mappings.push(mapping); } } return mappings; }; SourcemapParser.parseMapContent = function (sourceMapContent) { var sourceMap = null; try { if (sourceMapContent.substr(0, 4) === ")]}'") { var nextLineIndex = sourceMapContent.indexOf("\n"); if (nextLineIndex >= 0) { sourceMapContent = sourceMapContent.slice(nextLineIndex + 1); } } sourceMap = JSON.parse(sourceMapContent); } catch (ex) { } return sourceMap; }; return SourcemapParser; })(); FormatService.SourcemapParser = SourcemapParser; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourceSpanBuilder = (function () { function SourceSpanBuilder(start, end, isScript) { Tools.Utility.Assert.isTrue(start >= 0, "Invalid start offset: " + start.toString()); Tools.Utility.Assert.isTrue(end >= start, "Invalid end offset: " + end.toString()); this._data = new FormatService.SourceSpanData(); this._data.start = start; this._data.end = end; this._isScript = isScript; this._data.lineOffsets = []; this._data.generatedLineOffset = 0; this._data.length = 0; this._data.mappings = []; } Object.defineProperty(SourceSpanBuilder.prototype, "_mappings", { get: function () { return this._data.mappings; }, set: function (mappings) { this._data.mappings = mappings; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "data", { get: function () { return this._data; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "start", { get: function () { return this._data.start; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "end", { get: function () { return this._data.end; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "isScript", { get: function () { return this._isScript; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "generatedLineOffset", { get: function () { return this._data.generatedLineOffset; }, set: function (offset) { Tools.Utility.Assert.isTrue(offset >= 0, "offset is negative"); this._data.generatedLineOffset = offset; }, enumerable: true, configurable: true }); Object.defineProperty(SourceSpanBuilder.prototype, "lineOffsets", { get: function () { return this._data.lineOffsets; }, enumerable: true, configurable: true }); SourceSpanBuilder.prototype.calculateLineOffsets = function (source) { var lineCount = 0; this._data.lineOffsets = []; this._data.lineOffsets[lineCount] = 0; this._data.length = source.length; for (var offset = 0; offset < source.length; offset++) { if (source.charAt(offset) === "\n") { this._data.lineOffsets[++lineCount] = offset + 1; } } return lineCount; }; return SourceSpanBuilder; })(); FormatService.SourceSpanBuilder = SourceSpanBuilder; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { (function (FormatService) { "use strict"; var SourcemapMapping = (function () { function SourcemapMapping() { this.generatedColumn = 0; this.generatedLine = 0; this.sourceColumn = 0; this.sourceLine = 0; this.file = 0; } return SourcemapMapping; })(); FormatService.SourcemapMapping = SourcemapMapping; var SourceSpanData = (function () { function SourceSpanData() { } return SourceSpanData; })(); FormatService.SourceSpanData = SourceSpanData; var WorkerSendMessage = (function () { function WorkerSendMessage() { } return WorkerSendMessage; })(); FormatService.WorkerSendMessage = WorkerSendMessage; var WorkerResponseMessage = (function () { function WorkerResponseMessage() { } return WorkerResponseMessage; })(); FormatService.WorkerResponseMessage = WorkerResponseMessage; })(Debugger.FormatService || (Debugger.FormatService = {})); var FormatService = Debugger.FormatService; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); PNG  IHDR$l  pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx 0 uz-v(4o!KIENDB`PNG  IHDR6= pHYs  :ZiTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-02-24T09:06:44-08:00 2014-02-24T09:09:48-08:00 2014-02-24T09:09:48-08:00 xmp.iid:4b90143f-413e-4f49-89ae-1bd537296018 xmp.did:686E747EE28C11E2B7A1BD9B3632D4CC xmp.iid:686E747BE28C11E2B7A1BD9B3632D4CC xmp.did:686E747CE28C11E2B7A1BD9B3632D4CC xmp.did:686E747EE28C11E2B7A1BD9B3632D4CC saved xmp.iid:4b90143f-413e-4f49-89ae-1bd537296018 2014-02-24T09:09:48-08:00 Adobe Photoshop CC (Windows) / image/png 3 xmp.did:686E747EE28C11E2B7A1BD9B3632D4CC 1 720000/10000 720000/10000 2 65535 54 180 x cHRMz%u0`:o_FIDATx]Gn{dr)p*QeBJpnۄQ ԑ8Р▝n]E힯{O~Y"dr`.( /4Mk^ٶsIY(YPB\m۞P| 1D٥mێQo;!6xAE$hf >s^}gIOE(R̪'<ՠX(yMӴlv>OI<0݁ lDȋ7R0M &`H/ADԟ^ 0r]ފGm۶ 4ʅŀ@,Xض= c•c͸a/uĞrS4_+H́&-x(EuXu £GJn-Š,b88VaEH-i@lqg?cımo"Ɔ&(2I!&U.nσHX,ˁI{aV .7sN˞]AV{IUJ")=RLǡEh}mW "PYm3i:\ba'}_O"y*BYӠU5`և++H05{Po%Qi^D^kb#ڢ @xHAj Z쭒f`%2KAV3A֠7>\Fz3iZQ/m_5$jKG Z=4P cM)J >\V ?_ߛ?Cp3i-QODn&M4I)yH?1,*0b"ѫAU$c^GZ`-:5l1v?QJqk>d-l,>cK-?Q,_,KeYqf Awyo}N˞=g⁳1g[Uy٬ Ds]C9hDe b`JA?ľp oszf 0=g3{'}|:LY4A΁sЂ09h*7Xf5hAh?ʹAwyϊz_n$j8ZAYpX] zf}E?u#%֛ej:U3Hmow"ytDQ!"{4w$f`˚]S.xϬWx왱be3iz*;`VXѠ+]iT[%Ue+Utb+]砷cٛ fTP!U黓^DmkB㪕nDVyy +˝D$B#.H}.sMLʊz-@x&j-VI3`d<֠H Zl\s1 ϓ(ֱE:zpC<[TGŐ HƘD9CBM̡"(.+E-0""!O'! H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FCIDATx[1n0}4rwQ #Ĭ U]Ts{ 59GZMAP.-d lڠ>>oooSL0!>(rQ=Z]BB1dR"T-;B\bm'-6Zy9B)Q|3_-)S*~U"+MR )H9ʲB;q @NHz_>r PC{f*z1S oU!Rjp_#f_tqTH0A~uM-ֹ57K\{oR[_]n`z0nHj r_ݠY_9bl0oc\CBP'=4T ?Q{kCGcŽP!gj[I^*ԬDi ` 2R72=PǕmz22}eeL`&ӧ(S RQS5e/*F7QGLݩs1\0a= 7s8Z '521Άl/'w2,QGǶǸ2=ԗy2(Ӷekj'+0-1 (O|o-bq 1vaG3 F~ H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FpIDATx1n0E@jVsUA*Ebpo`c en 876m6DrbN>9GLu*}9 }?x^|C]]*Wp.t-tǔ`BЅB׫VDzg>Ē/;_R;s[uB \sU,@'qe HO6?Z`EɊn o+@,V8X[q$j/:p66ɲK9 PJ@ s^cCȲ5l2󦼲l.[ǔ sٚ}z ǷX}`ǝ/eϞ/}-_|qbʗdpW^fP5\P `D}gˆv-U[fvOOYKR30O۽C@,6!0 P2pl$]11OȀ72ͦ 0YBlN1ݧ (s7HDc90\TPBIENDB`PNG  IHDR6l!PAL pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx욱@G)" @⤜d媤:")W(2=2pפ#PQ x(~Ā vkf};?VEcćn56rCi+lݮ*njÛKƞp}P3S]Áev:Ҋۃ^PRʁSwBAgkp_ C0ƈh`{e+) Pƻ #?TeIDATxb?=80%"05@j9`$ʇ԰ ,1`ԛ.!գbQ G-p!n!ht[`3(PIENDB`PNG  IHDR tEXtSoftwareAdobe ImageReadyqe<kIDATxڔTq0@ .t+]A|C B~;A(g AZV#2{MZ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_F>IDATx얽q0 y#ullڅIRVA67:JChlE.t' QWIDATx+DQ/[,(,4 (+k&;;eYXB6(Mi,H=Mwי)N}:W{SI9H zw5a۞yNTwhxÊqjĖpi h~RU˔d-Ii[ɠ%.wh^6pVÐr,)cMFB=n[@ uK% gcƳ03ph䍱A8D &y_#ra-ӽ YD* Y\7,ƒe@AT!Z"n5Z*7vhX.XLL"Ucp#ZC0o254t961yI׈p-PR` iH)W{هIENDB`PNG  IHDR `|"psRGBgAMA a pHYsodtEXtSoftwarePaint.NET v3.5.11GB7IDAThCoeʝI5Fn uFl#eq \h\H 2$łikDR E6G! MwgygL{ a999sg|UVBFaU, N1xmÆ>! jMɵ)how2jϭ>a_4(_.ɝCdS>ͷKγ? "غ~!=L~'~i}r,Xc|'$w/]I'6lX~H}V{q=JݾLO>dtwVFXC񈽗kf;_g&u/!q laֶO ȵ q!'x`릝 FH@ e [sΌ&jLغhOev&jL`?tKPnE:$joG]mSQG~HY?s)> pTAut4^!)g\ۖxA#բ.rtslհ8 Tέ^tc4z蛴G~OE"G%v{yO9JQZlop m9w;VI< CFa>mW6o%&Β xL@/W\R8p?$4;݊HjmOn]rLZSe׌ŗɂv2/V,!ۍE0aH+n ,B'Un?g\`}Bhr5vt>ȶV|5{KT{>  5yⳣc7][D[7P%Q@geGO#^is.l6fFl(غi'vL2XݽgI$u~mۮቜ&jL`}RUVCF GYkty>@a"9ұ}Q-{> W<E\3εXۭ.qHsEvc|]ܼB,6y>v#iٯ|9y'VqԢ6Mٵ!JK?Xp3RI`)r>ۍE0aHt>ID IHWChl쟌ƩSChb8x06y%yJP>XFpp'6OP=(+@=8}m?QZo_j-=#ap5ɓ88ϴ:`P ژucVo>@M;17H``mxM(غhW]v;hM(`T%idqe78@t>`m7c4 *X /WߐE\3εXۍqusEv=.n^n|@93I㠧6G~mEo'J6|@]d?moی[͈vҢ|tcCp?$j* СC5M|OI qz~Hhk.2iNke2nBeҊulm7/XۍEh @ / (IENDB`PNG  IHDR$l gAMA a pHYsj։ tEXtSoftwarePaint.NET v3.5.11GB7IDAThCQH`^1"vb6=,`&tsF& &r^jJ^f"T/ G ?/j~tjg:HDKttA }{-^Vo1bLD ecޘg&6<ƩrhaZ_/ 'X8ƒ[K 0NP6`$G p#= Ѝ-Jb W:.{U,j= I#0г(bݚY/juN2S#ZR3`N=ނpM$iLvyV3giz?6S9sџ}Đ26ʄ}\,W,V?bbbԚ Qk++^,DYXxfbBԚ waeA->߂r11'}F^KuaaWry}8s1Lqwa_?. I쇝yyirUx̓ 9f8?-_Ksy-~/ZfJީ6/E}L)9en"7wROӛi%~H,;c<9g˕ b.'w1K> + I| )U/GYXxfbBԚ Qk++^,DYXx{6X-(aq"o^'A0^QߟDEKttA }{-$+ћyy\"rUxc\6<ƩrhaZK 0N$%CsU(w0O.hacgشޢ+mh`t=*ϕ,1E(#V$|1\ O)]!mejh05XcJAԃ912$^\*A0g>lA)bO̓3`\ԐXg\$q1X,L r˕$C>Ou0C1jzrŋ5/֬W,WXZ^\b!jzrŋػoA#Ee h?]IENDB`PNG  IHDR@ ~gAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx1 Osܤ=A;]27M|̙r@K[Bj=EcYXG:23 8:̠<+ PZ=`-aL:JBf_f~`{XGΎ^8Pa&?~M֧{@i'I[qkPu4&;pVaO ?BIENDB`PNG  IHDR@ ~gAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV PIDATxڬAKAnHAOv M:EZAH}NA$Dނ@`&=Bt #:mFe$*,>x̾7y3,0pzqXAcX\vn9Z 2 r9 'IDATxZ=L@GB, e[c7u!ԤP u*#,`$S,KH! U'n햱cHСjH9۱u'ٟ{}=(d$ϋ}+9/ԛMBx3H)꺾q03<0 FXFe- j(u(t= ee(!M2cd2` jKE( SP3yڏxaCȗū[+K×_2A ]ט3^MLOP"zWAB~۟fE0;<_dCԬ~ -YT4۔Y2,=R)'P*-)S;Nk 1Nǹ~VbY6fOv–A9T=m24W1<0=ư݇ǘ+CǨROdY|.6uLp{ޕ}S;x:ng&`{ޔk\!(|vt'%s($hAHn@\ȶ@8MtF`z%uIw5N%wR2e $;˜u'ʵ}0PcD@UQe4Nu-MJ+++ޏUj c ˈ}\3i1*@C#֓Yvj4WUFf,bUa듃" P"2 #Jw76c,YBnu0'># nmyywȋv}v5WO"v(Λ jL&_R?͞t/2~禟bR|:Ϥ \._杬,Ì3;;ەW׷Rgٿ1 \JiYPeʠ)@κ>Cu DT=^Ő/튕=IENDB`PNG  IHDR$l  pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FJIDATxZ;nJ=4Vrt,.7Ti"R!AQJQ2\DKpkU5wx""o\G 8ss;>R"\&.qH)C:t.$0J?iqH8P D LnNөVj%M@4n_fH)i`@3CTfy-0iK\$ ;iZ&$1Q'2 9(οPrSg :MuF>2@U7]5l p#-'!:75l|I8 i0k hFJV֭iF3v%uDH8Qe6]P(GyH]jdXѧ}HFUK9-[Ln>@az}*jF:*]2a L8X8]IhX60-LlD4zYQ9KR|25{F wf֓SH}li8ے>:KWPwvtq*)=A թ<0!k;^fEI]^,i)PNzqKD3PT71'WE5Et:tz/ԇV _t桦Bv񧒷V&q7`hWwhjnur74"*5#4FKM-b2RNK|$MF|Y\VqGQ5$?_q"1^q-'Vқ{a{xu_8nZ5FJ쁩1>·Ś/4n*{gpS@M m?Hb[DKo. љM6cTɧtin<=\1V[(h1^VPԥ/ iݿ%#kZB MIZJ,*a6!!Xu1Lgj+/.d*ykbZC!:/ 06F1cx9φDM1p꣆(cfIc|ϻScDcFHcxBX5FX( ʡccƘeYh,oڈhjg˲,GjBhBCm1qiugMǵ6,F48Jz82.^δBY>M^3}Cc$2?f-2紷mqw1Rx u갅}c&GSDc4MSc Ci` w3ty]3!/3i2gYFasjqOUkFejU! hU(K_@Ӟnj.dMڼcO7jB?O,+xIENDB`PNG  IHDR$l  pHYs+8iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2013-12-17T10:24:14-08:00 2013-12-19T13:59:47-08:00 2013-12-19T13:59:47-08:00 image/png 3 xmp.iid:278a6bb2-db3c-824a-a320-a365a176dab0 xmp.did:278a6bb2-db3c-824a-a320-a365a176dab0 xmp.did:278a6bb2-db3c-824a-a320-a365a176dab0 created xmp.iid:278a6bb2-db3c-824a-a320-a365a176dab0 2013-12-17T10:24:14-08:00 Adobe Photoshop CC (Windows) 1 960000/10000 960000/10000 2 65535 36 108 } cHRMz%u0`:o_FIDATxXˑ0lMMΑ`H}& 921 !(bn'ŚZ$c l\G{M8x&*~TUiBP~J)ѝxIp5sE4Qy+,:LӊН恡ZPl$אm\v8 Ցk@NC:&yl*u o7/J&>l;B_! TI JF%HudHThGUSS_K߻11"S{Tm8=IENDB`PNG  IHDRr ߔ pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx 0x##&܍'0ޛ0n#xAF``b?GҴ!\/<-%6I9`3P[ e pPN,}O08؉6@Uyrl45o.?&Cf\A`j1> TQIENDB`PNG  IHDRr ߔ pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxڼq0FAH+/{ T|C B:܁rY1 F1hOs) IDdl5 TWժ_s.(" 0YZ֣"lW۬fBk-X/p(l{,T5P# Z"\\LƝ=.Eq]IOvC_U ~@刴۷{9Gy|;T-K Y؜4 Ǝ>ׁO!u[<e<ld]-?j-ᨀOɛ u+:(wFTeZXYxi?ZW}g-agi1H>,8٭aM~܆[TPIENDB`PNG  IHDR$l  pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_F(IDATx1v0rH8r9rIZ ӊ"~#Pdo@elT~^IIϼ߫kwXYoNO uJCD@D@D@f:ơ9v} q_De9lbηL}wLMOmc79t>*|̄8L@f1;Lz\]t'@ |qʲLP1z+sQ-rOt ~ H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx?r0şw8a($iRm b3 h&8F6mLV cYz4E%I`eutB]%kZ[i8xUZ#dgcJf)VfV.X(<âqXvI$]~|ҟr& 6osqcUu1NJ5Դ{ž޸؟rqz7a:]'0K@Y0\api/+>\[jeuֺX9FBHb}!c~'KfJ[Cj$TeZB?7hٴLGmPpF(&BcDclS/mhϐi- 0K& !x1: :: Q\[ B ."}>fKv##clnJ3l6)c+NQ!t!2#cLh4vq cK&E9m>א21߫%n !g5rٿ yIENDB`PNG  IHDR$l  pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_F\IDATx1n@V>@n`.0-˵OMC)kr #lB 03yR$Ǜ{,K ɾa`6>ċvY|کz'F޳Le8~`*/ֻ,+H=4 ?5,yd@8^Y(aǸbmIFu W82q YPK]i:Jؿ*IENDB`var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; (function (Tristate) { Tristate[Tristate["On"] = 0] = "On"; Tristate[Tristate["Off"] = 1] = "Off"; Tristate[Tristate["Disabled"] = 2] = "Disabled"; })(Debugger.Tristate || (Debugger.Tristate = {})); var Tristate = Debugger.Tristate; var Source = (function () { function Source(id, parentId, isRootChild, url, mimeType, length, isDynamicCode, headers, longDocumentId, sourceMapUrl, sourceUrlOverride) { this.id = id; this.parentId = parentId; this.isRootChild = isRootChild; this.url = url; this.mimeType = mimeType; this.length = length; this.isDynamicCode = isDynamicCode; this.headers = headers; this.longDocumentId = longDocumentId; this.sourceMapUrl = sourceMapUrl; this.sourceUrlOverride = sourceUrlOverride; } return Source; })(); Debugger.Source = Source; (function (CauseBreakAction) { CauseBreakAction[CauseBreakAction["BreakOnAny"] = 0] = "BreakOnAny"; CauseBreakAction[CauseBreakAction["BreakOnAnyNewWorkerStarting"] = 1] = "BreakOnAnyNewWorkerStarting"; CauseBreakAction[CauseBreakAction["BreakIntoSpecificWorker"] = 2] = "BreakIntoSpecificWorker"; CauseBreakAction[CauseBreakAction["UnsetBreakOnAnyNewWorkerStarting"] = 3] = "UnsetBreakOnAnyNewWorkerStarting"; })(Debugger.CauseBreakAction || (Debugger.CauseBreakAction = {})); var CauseBreakAction = Debugger.CauseBreakAction; (function (BreakResumeAction) { BreakResumeAction[BreakResumeAction["Abort"] = 0] = "Abort"; BreakResumeAction[BreakResumeAction["Continue"] = 1] = "Continue"; BreakResumeAction[BreakResumeAction["StepInto"] = 2] = "StepInto"; BreakResumeAction[BreakResumeAction["StepOver"] = 3] = "StepOver"; BreakResumeAction[BreakResumeAction["StepOut"] = 4] = "StepOut"; BreakResumeAction[BreakResumeAction["Ignore"] = 5] = "Ignore"; BreakResumeAction[BreakResumeAction["StepDocument"] = 6] = "StepDocument"; })(Debugger.BreakResumeAction || (Debugger.BreakResumeAction = {})); var BreakResumeAction = Debugger.BreakResumeAction; (function (BreakpointState) { BreakpointState[BreakpointState["Deleted"] = 0] = "Deleted"; BreakpointState[BreakpointState["Disabled"] = 1] = "Disabled"; BreakpointState[BreakpointState["Enabled"] = 2] = "Enabled"; BreakpointState[BreakpointState["Pending"] = 3] = "Pending"; })(Debugger.BreakpointState || (Debugger.BreakpointState = {})); var BreakpointState = Debugger.BreakpointState; (function (ExceptionFilter) { ExceptionFilter[ExceptionFilter["None"] = 0] = "None"; ExceptionFilter[ExceptionFilter["Unhandled"] = 1] = "Unhandled"; ExceptionFilter[ExceptionFilter["Handled"] = 2] = "Handled"; })(Debugger.ExceptionFilter || (Debugger.ExceptionFilter = {})); var ExceptionFilter = Debugger.ExceptionFilter; (function (BreakReason) { BreakReason[BreakReason["Step"] = 0] = "Step"; BreakReason[BreakReason["Breakpoint"] = 1] = "Breakpoint"; BreakReason[BreakReason["DebuggerBlock"] = 2] = "DebuggerBlock"; BreakReason[BreakReason["HostInitiated"] = 3] = "HostInitiated"; BreakReason[BreakReason["LanguageInitiated"] = 4] = "LanguageInitiated"; BreakReason[BreakReason["DebuggerHalt"] = 5] = "DebuggerHalt"; BreakReason[BreakReason["Error"] = 6] = "Error"; BreakReason[BreakReason["Jit"] = 7] = "Jit"; })(Debugger.BreakReason || (Debugger.BreakReason = {})); var BreakReason = Debugger.BreakReason; (function (ConnectionResult) { ConnectionResult[ConnectionResult["Succeeded"] = 0] = "Succeeded"; ConnectionResult[ConnectionResult["Failed"] = 1] = "Failed"; ConnectionResult[ConnectionResult["FailedAlreadyAttached"] = 2] = "FailedAlreadyAttached"; })(Debugger.ConnectionResult || (Debugger.ConnectionResult = {})); var ConnectionResult = Debugger.ConnectionResult; Debugger.breakpointIdNotFound = "BKP:notfound:"; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var RemoteDebugger = (function () { function RemoteDebugger() { var _this = this; this._port = toolUI.createPort("debuggerPort"); toolUI.connect(this._port); this._rpc = new F12.Tools.RPC.JsonRPCEndpoint("SERVER", function (method, params, response) { return _this.jsonRpcMethodReceive(method, params, response); }, function (method, params) { return _this.jsonRpcNotificationReceive(method, params); }, function (data) { _this.postMessage(data); }, function (onMessage) { _this._port.addEventListener("message", function (data) { if (_this.logging) { DebuggerEval.log("message", data); } onMessage(data); }); }); this._dbg = new Debugger.DebugProvider(this); } RemoteDebugger.prototype.methodCall = function (method, params, completed, error) { this._rpc.jsonRpcMethodCall(method, params, completed, error); }; RemoteDebugger.prototype.notify = function (method, params) { this._rpc.jsonRpcNotification(method, params); }; RemoteDebugger.prototype.detach = function () { this._rpc.jsonRpcMethodCall = function (method, params, completed, error) { return false; }; this._rpc.jsonRpcNotification = function () { }; this.postMessage = function (data) { return false; }; }; RemoteDebugger.prototype.postMessage = function (data) { if (this.logging) { DebuggerEval.log("postMessage", data); } return this._port.postMessage(data); }; RemoteDebugger.prototype.jsonRpcMethodReceive = function (method, params, response) { F12.Tools.Utility.Assert.hasValue(this._dbg, "Method received when debugger not attached."); var isAsync = false; if (this._dbg.isAsyncMethod(method)) { params = params || []; params.push(response); isAsync = true; } var result; if (params) { result = this._dbg[method].apply(this._dbg, params); } else { result = this._dbg[method].apply(this._dbg); } if (!isAsync) { response(result, undefined); } }; RemoteDebugger.prototype.jsonRpcNotificationReceive = function (event, params) { }; return RemoteDebugger; })(); Debugger.RemoteDebugger = RemoteDebugger; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var DebuggerEval = (function () { function DebuggerEval() { } DebuggerEval.log = function () { var params = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { params[_i] = arguments[_i + 0]; } var logString = params.join("\t"); try { mainBrowser.document.parentWindow.console.log(logString); if (DebuggerEval.Queue.length > 0) { var msg; while (msg = DebuggerEval.Queue.shift()) { mainBrowser.document.parentWindow.console.log(msg); } } } catch (ex) { DebuggerEval.Queue.push(logString); } }; DebuggerEval.Queue = []; return DebuggerEval; })(); var remoteDebugger = new F12.Tools.Debugger.RemoteDebugger(); var F12; (function (F12) { (function (Tools) { (function (Debugger) { "use strict"; var DebugProvider = (function () { function DebugProvider(callHandler) { var _this = this; this._callHandler = callHandler; this._isEnabled = DebugProvider.IsLaunchedViaJitDebugging; this._isBreakOnNextError = DebugProvider.IsLaunchedViaJitDebugging; this._documentMap = {}; this._breakIntoSpecificWorkerIds = []; this._rootDocIdQueue = []; this._sessionNumber = 0; this._initialDocumentDocId = 0; this._exceptionFilter = 1 /* Unhandled */; this._debugger = debug; this._debugger.addEventListener("onAddDocuments", function (documents) { return _this.onAddDocuments(documents); }); this._debugger.addEventListener("onRemoveDocuments", function (docIds) { return _this.onRemoveDocuments(docIds); }); this._debugger.addEventListener("onUpdateDocuments", function (documents) { return _this.onUpdateDocuments(documents); }); this._debugger.addEventListener("onResolveBreakpoints", function (breakpoints) { return _this.onResolveBreakpoints(breakpoints); }); this._debugger.addEventListener("onBreak", function (breakEventInfo) { return _this.onBreak(breakEventInfo); }); this._debugger.addEventListener("onPdmClose", function () { _this._sessionNumber++; _this._isEnabled = false; _this.enableDynamicDebugging(function () { }); }); toolUI.addEventListener("detach", function (dispatchWindow) { _this._callHandler.detach(); _this._isEnabled = false; _this._sessionNumber++; _this._debugger.resume(1 /* Continue */); }); toolUI.addEventListener("closed", function () { _this._debugger.shutdown(); }); this._debugger.addEventListener("webworkerstarted", function (label, id) { var description = _this.parseThreadDescription(id, label, null); if (_this._breakOnAnyNewWorkerStarting) { _this._lastStartedWorkerId = id; } for (var i = _this._rootDocIdQueue.length - 1; i >= 0; i--) { var docInfo = _this._documentMap[_this._rootDocIdQueue[i]]; if (docInfo && docInfo.url === description.fullScriptFileName) { _this._rootDocIdQueue.splice(i, 1); } } _this._callHandler.notify("onWebWorkerStarted", [description]); }); this._debugger.addEventListener("webworkerfinished", function (id) { _this.removeWorkerFromWaitToBreakList(id); _this._callHandler.notify("onWebWorkerFinished", [id]); }); this._debugger.addEventListener("debuggingdisabled", function () { _this._isEnabled = false; }); this._debugger.addEventListener("debugapplicationcreate", function (isProfiling) { if (!isProfiling) { _this.enableDynamicDebugging(function () { }); } }); toolUI.addEventListener("remotescripterror", function (description, fileName, lineNumber, column) { _this._callHandler.notify("onRemoteScriptError", [description, fileName, lineNumber, column]); }); if (DebugProvider.IsLaunchedViaJitDebugging) { this._debugger.connect(true); } } DebugProvider.findSourceAttributes = function (codeContent, isDynamicCode) { var sourceMapUrl = null; var sourceUrlOverride = null; if (codeContent) { sourceMapUrl = DebugProvider.findSourceAttribute("sourceMappingURL", codeContent); sourceUrlOverride = DebugProvider.findSourceAttribute("sourceURL", codeContent); if (!sourceUrlOverride && isDynamicCode && codeContent.substr(0, DebugProvider.DIAGNOSTICSOM_EVAL_SIGNATURE.length) === DebugProvider.DIAGNOSTICSOM_EVAL_SIGNATURE) { sourceUrlOverride = DebugProvider.JMC_SCRIPT_URL; } } return { sourceMap: sourceMapUrl, sourceUrl: sourceUrlOverride }; }; DebugProvider.prototype.isAsyncMethod = function (method) { if (method === "enableDynamicDebugging") { return true; } return false; }; DebugProvider.prototype.enableDynamicDebugging = function (response) { var _this = this; if (!this._isEnabled && !this._isAwaitingDebuggerEnableCall) { var listener = function (succeeded) { var connectionResult = (succeeded ? 0 /* Succeeded */ : 1 /* Failed */); _this._debugger.removeEventListener("debuggingenabled", listener); _this._isAwaitingDebuggerEnableCall = false; if (succeeded) { connectionResult = _this._debugger.connect(true); if (connectionResult === 0 /* Succeeded */) { _this._isEnabled = true; } } response(connectionResult); }; this._debugger.addEventListener("debuggingenabled", listener); this._isAwaitingDebuggerEnableCall = true; this._debugger.enable(); } else { response(0 /* Succeeded */); } }; DebugProvider.prototype.getSourceText = function (docId, start, length) { try { var text = this._debugger.getSourceText(docId); if (typeof start === "number" && start >= 0) { if (typeof length === "number" && length >= 0) { text = text.substr(start, length); } else { text = text.substr(start); } } return text; } catch (ex) { return "Error getting source text: " + ex.toString(); } }; DebugProvider.prototype.causeBreak = function (causeBreakAction, workerId) { if (typeof workerId !== "number" || isNaN(workerId)) { workerId = 0; } switch (causeBreakAction) { case 0 /* BreakOnAny */: this._breakOnAny = true; this._isNextBreakCausedByUser = true; break; case 1 /* BreakOnAnyNewWorkerStarting */: this._breakOnAnyNewWorkerStarting = true; break; case 2 /* BreakIntoSpecificWorker */: this._breakIntoSpecificWorkerIds.push(workerId); break; case 3 /* UnsetBreakOnAnyNewWorkerStarting */: this._breakOnAnyNewWorkerStarting = false; this._lastStartedWorkerId = null; break; default: throw new Error("CauseBreakAction not known"); break; } return this._debugger.causeBreak(causeBreakAction, workerId); }; DebugProvider.prototype.resume = function (breakResumeAction) { if (breakResumeAction !== 1 /* Continue */) { this._isNextBreakCausedByUser = true; } return this._debugger.resume(breakResumeAction); }; DebugProvider.prototype.getBreakpointIdFromSourceLocation = function (docId, start) { var breakpointId = this._debugger.getBreakpointIdFromSourceLocation(docId, start); if (breakpointId !== 0) { return this.bpString(breakpointId); } else { return Debugger.breakpointIdNotFound; } }; DebugProvider.prototype.addEventBreakpoint = function (eventTypes, isEnabled, condition, isTracepoint, ignoreUnbound) { if (!condition) { condition = ""; } var bp = this._debugger.addEventBreakpoint(eventTypes, isEnabled, condition, isTracepoint); if (bp) { return { location: bp.location, eventTypes: bp.eventTypes, breakpointId: this.bpString(bp.breakpointId), isBound: bp.isBound, isEnabled: bp.isEnabled, condition: condition, isTracepoint: isTracepoint, failed: false }; } else { return { location: null, eventTypes: eventTypes, breakpointId: ":failed:" + eventTypes.join(","), isBound: false, isEnabled: false, failed: true }; } }; DebugProvider.prototype.addCodeBreakpoint = function (docId, start, condition, isTracepoint, isPseudoBreakpoint, ignoreUnbound) { if (!condition) { condition = ""; } var bp = this._debugger.addCodeBreakpoint(docId, start, condition, isTracepoint); if (bp) { return { location: bp.location, eventTypes: null, breakpointId: this.bpString(bp.breakpointId), isBound: bp.isBound, isEnabled: bp.isEnabled, condition: condition, isTracepoint: isTracepoint, isPseudoBreakpoint: isPseudoBreakpoint, failed: false }; } else { return { location: { docId: docId, start: start, length: 1 }, eventTypes: null, breakpointId: ":failed:" + docId, isBound: false, isEnabled: false, failed: true }; } }; DebugProvider.prototype.addPendingBreakpoint = function (url, start, condition, isEnabled, isTracepoint) { var bpId = this._debugger.addPendingBreakpoint(url, start, condition, isEnabled, isTracepoint); if (bpId) { return this.bpString(bpId); } return ""; }; DebugProvider.prototype.removeBreakpoint = function (bpId) { var realId = this.getBpIdNumber(bpId); return this._debugger.removeBreakpoint(realId); }; DebugProvider.prototype.setBreakpointEnabledState = function (bpId, enabled) { var realId = this.getBpIdNumber(bpId); return this._debugger.setBreakpointEnabledState(realId, enabled); }; DebugProvider.prototype.setBreakpointCondition = function (bpId, condition, isTracepoint) { var realId = this.getBpIdNumber(bpId); return this._debugger.updateBreakpoint(realId, condition, isTracepoint); }; DebugProvider.prototype.setExceptionFilter = function (filter) { this._exceptionFilter = filter; return this._debugger.setBreakOnFirstChanceExceptions(filter === 2 /* Handled */); }; DebugProvider.prototype.isDocContainingMatch = function (query, docId) { var regExp = new RegExp(query, "gi"); var text = this.getSourceText(docId); return regExp.test(text); }; DebugProvider.prototype.triggerSourceRundown = function () { return this._debugger.connect(false); }; DebugProvider.prototype.getFrames = function (framesNeeded) { var frames = this._debugger.getFrames(framesNeeded); for (var i = 0; i < frames.length; i++) { frames[i].callFrameId = this.frameString(frames[i].callFrameId), frames[i].location.docId = frames[i].location.docId; } return frames; }; DebugProvider.prototype.getCurrentThreadDescription = function () { var description = this._debugger.getThreadDescription(); return this.parseThreadDescription(null, null, description); }; DebugProvider.prototype.getThreads = function () { var _this = this; var descriptions = this._debugger.getThreads(); var decodedDescriptions = []; descriptions.forEach(function (description) { decodedDescriptions.push(_this.parseThreadDescription(null, null, description)); }); return decodedDescriptions; }; DebugProvider.prototype.eval = function (frameId, evalString) { var prop = this._debugger.eval(this.getFrameIdNumber(frameId), evalString); if (prop) { prop.propertyId = this.propString(prop.propertyId); } else { prop = { propertyId: "ERROR", name: null, type: null, fullName: null, value: null, expandable: false, readOnly: true, fake: false, invalid: false, returnValue: false }; } return prop; }; DebugProvider.prototype.getLocals = function (frameId) { return this.propString(this._debugger.getLocals(this.getFrameIdNumber(frameId))); }; DebugProvider.prototype.getChildProperties = function (propertyId, start, length) { var propInfosObject = this._debugger.getChildProperties(this.getPropIdNumber(propertyId), start, length); var props = propInfosObject.propInfos; for (var i = 0; i < props.length; i++) { props[i].propertyId = this.propString(props[i].propertyId); } return propInfosObject; }; DebugProvider.prototype.setPropertyValueAsString = function (propertyId, value) { return this._debugger.setPropertyValueAsString(this.getPropIdNumber(propertyId), value); }; DebugProvider.prototype.setNextStatement = function (docId, position) { return this._debugger.setNextStatement(docId, position); }; DebugProvider.prototype.canSetNextStatement = function (docId, position) { return this._debugger.canSetNextStatement(docId, position); }; DebugProvider.prototype.getFrameIdNumber = function (frameId) { DebugProvider.assertIsValidId(frameId, DebugProvider.FRAME_ID_PREFIX); return this.parseIdNumber(frameId); }; DebugProvider.prototype.getBpIdNumber = function (bpId) { DebugProvider.assertIsValidId(bpId, DebugProvider.BREAKPOINT_ID_PREFIX); return this.parseIdNumber(bpId); }; DebugProvider.prototype.getPropIdNumber = function (propId) { DebugProvider.assertIsValidId(propId, DebugProvider.PROPERTY_ID_PREFIX); return this.parseIdNumber(propId); }; DebugProvider.assertIsValidId = function (id, idPrefix) { F12.Tools.Utility.Assert.isTrue(id && id.length > idPrefix.length && id.substr(0, idPrefix.length) === idPrefix); }; DebugProvider.findSourceAttribute = function (attribute, codeContent) { var findString = "\n//# " + attribute + "="; var index = codeContent.lastIndexOf(findString); if (index === -1) { findString = "\n//@ " + attribute + "="; index = codeContent.lastIndexOf(findString); } if (index >= 0 && index === codeContent.indexOf(findString)) { var endIndex = codeContent.indexOf("\n", index + findString.length); if (endIndex < 0) { endIndex = codeContent.length; } return codeContent.substring(index + findString.length, endIndex).trim(); } return null; }; DebugProvider.prototype.removeWorkerFromWaitToBreakList = function (id) { for (var i = 0; i < this._breakIntoSpecificWorkerIds.length; i++) { if (id === this._breakIntoSpecificWorkerIds[i]) { this._breakIntoSpecificWorkerIds.splice(i, 1); return true; } } return false; }; DebugProvider.prototype.flushMessageQueue = function (queue, eventName) { if (queue.length > 0) { switch (eventName) { case "onAddDocuments": case "onRemoveDocuments": case "onUpdateDocuments": this._callHandler.notify(eventName, queue); queue.length = 0; break; default: F12.Tools.Utility.Assert.fail("Batching of '" + eventName + "' messages isn't supported."); break; } } }; DebugProvider.prototype.onAddDocuments = function (documents) { var sources = []; for (var i = 0; i < documents.length; ++i) { var document = documents[i]; if (document.parentDocId === 0xFFFFFFFF) { this._initialDocumentDocId = document.docId; continue; } this._documentMap[document.docId] = { url: document.url, start: 0, length: document.length }; var isRootChild = document.parentDocId === this._initialDocumentDocId; var docText = this._debugger.getSourceText(document.docId); var sourceAttributes = DebugProvider.findSourceAttributes(docText, document.isDynamicCode); sources.push(new Debugger.Source(document.docId, document.parentDocId, isRootChild, document.url, document.mimeType, document.length, document.isDynamicCode, document.headers, document.longDocumentId, document.sourceMapUrlFromHeader || sourceAttributes.sourceMap, sourceAttributes.sourceUrl)); if (isRootChild) { var count = 0; for (var x in this._documentMap) { count++; if (count > 1) { break; } } if (count === 1) { this.flushMessageQueue(sources, "onAddDocuments"); this._rootDocId = document.docId; this._callHandler.notify("onSetRootDocument", [this._rootDocId]); } else { this._rootDocIdQueue.push(document.docId); } } } this.flushMessageQueue(sources, "onAddDocuments"); }; DebugProvider.prototype.onRemoveDocuments = function (docIds) { var removedDocIds = []; for (var i = 0; i < docIds.length; ++i) { var docId = docIds[i]; delete this._documentMap[docId]; var oldRootDocIdIndex = this._rootDocIdQueue.indexOf(docId); if (oldRootDocIdIndex > -1) { this._rootDocIdQueue.splice(oldRootDocIdIndex, 1); } if (docId !== this._initialDocumentDocId) { removedDocIds.push(docId); } if (docId === this._rootDocId && this._rootDocIdQueue.length > 0 && this._documentMap[this._rootDocIdQueue[0]]) { this._rootDocId = this._rootDocIdQueue[0]; this.flushMessageQueue(removedDocIds, "onRemoveDocuments"); this._callHandler.notify("onSetRootDocument", [this._rootDocId]); } } this.flushMessageQueue(removedDocIds, "onRemoveDocuments"); }; DebugProvider.prototype.onUpdateDocuments = function (documents) { var sources = []; for (var i = 0; i < documents.length; ++i) { var document = documents[i]; var isRootChild = document.parentDocId === this._initialDocumentDocId; var source = new Debugger.Source(document.docId, undefined, isRootChild, document.url, document.mimeType, document.length, undefined, undefined, undefined); if (!this._lastUpdatedSource || source.id !== this._lastUpdatedSource.id || source.length !== this._lastUpdatedSource.length || source.mimeType !== this._lastUpdatedSource.mimeType || source.url !== this._lastUpdatedSource.url) { sources.push(source); this._lastUpdatedSource = source; } } this.flushMessageQueue(sources, "onUpdateDocuments"); }; DebugProvider.prototype.onResolveBreakpoints = function (breakpoints) { for (var i = 0; i < breakpoints.length; i++) { var bp = breakpoints[i]; var info = { location: { docId: bp.newDocId, start: bp.start, length: bp.length }, eventTypes: null, breakpointId: this.bpString(bp.breakpointId), isBound: bp.isBound }; this._callHandler.notify("onResolveBreakpoint", [info.breakpointId, info]); } }; DebugProvider.prototype.onBreak = function (breakEventInfo) { if (!this._isEnabled || this._isAwaitingDebuggerEnableCall) { this._debugger.resume(1 /* Continue */); return false; } var isRealBreak = true; var threadDescription = this.getCurrentThreadDescription(); if (breakEventInfo.breakReason === 5 /* DebuggerHalt */) { isRealBreak = false; if (this._breakOnAnyNewWorkerStarting) { if (threadDescription.id === this._lastStartedWorkerId) { this._lastStartedWorkerId = null; isRealBreak = true; } } if (!isRealBreak) { var removed = this.removeWorkerFromWaitToBreakList(threadDescription.id); if (removed) { isRealBreak = true; } } if (!isRealBreak && this._isNextBreakCausedByUser) { isRealBreak = true; } } else if (breakEventInfo.breakReason === 6 /* Error */) { isRealBreak = false; if (this._isBreakOnNextError || this._exceptionFilter === 2 /* Handled */ || (this._exceptionFilter === 1 /* Unhandled */ && !breakEventInfo.isFirstChanceException)) { this._isBreakOnNextError = false; isRealBreak = true; } if (!breakEventInfo.isFirstChanceException && !threadDescription.isWorker) { var frames = this.getFrames(1); if (frames && frames.length > 0) { var frame = frames[0]; this._callHandler.notify("onUnhandledException", [frame.location.docId, breakEventInfo.description, breakEventInfo.errorId, frame.location.start]); } } } else if (breakEventInfo.breakReason === 1 /* Breakpoint */) { isRealBreak = this._breakOnAny; if (!isRealBreak && breakEventInfo.breakpoints !== null) { for (var i = 0; i < breakEventInfo.breakpoints.length; i++) { if (this.evaluateBreakpointCondition(breakEventInfo.firstFrameId, breakEventInfo.breakpoints[i])) { isRealBreak = true; } } } } if (isRealBreak) { this._breakOnAny = false; this._callHandler.notify("onBreak", [breakEventInfo.breakReason, breakEventInfo.description, breakEventInfo.errorId, breakEventInfo.isFirstChanceException, breakEventInfo.isUserUnhandled, threadDescription.isWorker, breakEventInfo.systemThreadId, breakEventInfo.breakEventType]); } else { this._debugger.resume(1 /* Continue */); } this._isNextBreakCausedByUser = false; return isRealBreak; }; DebugProvider.prototype.evaluateBreakpointCondition = function (frameId, breakpoint) { if (breakpoint) { if (breakpoint.isTracepoint) { var propertyInfo = this._debugger.eval(frameId, "console.log(" + breakpoint.condition + ");"); if (propertyInfo.type === "Error") { this._debugger.eval(frameId, "console.log(\"" + propertyInfo.value + "\");"); } return false; } else if (!breakpoint.condition || this._debugger.eval(frameId, breakpoint.condition).value === "true") { return true; } } return false; }; DebugProvider.prototype.parseThreadDescription = function (id, label, description) { var threadDescription = { id: 0, label: null, description: null, poundLabel: null, scriptFileName: null, fullScriptFileName: null, htmlFileName: null, isWorker: false, displayName: null }; if (id !== null && id >= 1) { threadDescription.id = id; } if (label !== null) { threadDescription.label = label; var idParts = label.split("\r\n"); F12.Tools.Utility.Assert.areEqual(idParts.length, 3); if (idParts.length === 3) { threadDescription.poundLabel = idParts[0]; var scriptfilePath = idParts[1].split("/"); threadDescription.fullScriptFileName = idParts[1]; threadDescription.scriptFileName = scriptfilePath[scriptfilePath.length - 1]; var htmlFilePath = idParts[2].split("/"); threadDescription.htmlFileName = htmlFilePath[htmlFilePath.length - 1]; threadDescription.isWorker = true; threadDescription.displayName = "Worker" + threadDescription.poundLabel + " " + threadDescription.scriptFileName + " (" + threadDescription.htmlFileName + ")"; } } if (description !== null) { threadDescription.description = description; var pattern = /^([0-9]+)##/gi; var match = pattern.test(description); if (match) { threadDescription.id = parseInt(description.split("##")[0], 10); var scriptFilePath = description.split("/"); threadDescription.scriptFileName = scriptFilePath[scriptFilePath.length - 1]; threadDescription.isWorker = true; threadDescription.displayName = "Worker-" + threadDescription.id + " " + threadDescription.scriptFileName; } } return threadDescription; }; DebugProvider.prototype.parseIdNumber = function (id) { var delimiterIndex = id.indexOf("_"); F12.Tools.Utility.Assert.isTrue(delimiterIndex >= 3 && delimiterIndex < id.length - 1, "Malformed id string detected"); return parseInt(id.substr(delimiterIndex + 1, 10)); }; DebugProvider.prototype.frameString = function (frameId) { return DebugProvider.FRAME_ID_PREFIX + this._sessionNumber + "_" + frameId; }; DebugProvider.prototype.bpString = function (bpId) { return DebugProvider.BREAKPOINT_ID_PREFIX + this._sessionNumber + "_" + bpId; }; DebugProvider.prototype.propString = function (propId) { return DebugProvider.PROPERTY_ID_PREFIX + this._sessionNumber + "_" + propId; }; DebugProvider.BREAKPOINT_ID_PREFIX = "BKP"; DebugProvider.FRAME_ID_PREFIX = "FRM"; DebugProvider.PROPERTY_ID_PREFIX = "PRP"; DebugProvider.JMC_SCRIPT_URL = "browsertools://browsertools.library.js"; DebugProvider.DIAGNOSTICSOM_EVAL_SIGNATURE = "document.__IE_DEVTOOLBAR_CONSOLE_EVAL_RESULT"; DebugProvider.IsLaunchedViaJitDebugging = false; return DebugProvider; })(); Debugger.DebugProvider = DebugProvider; })(Tools.Debugger || (Tools.Debugger = {})); var Debugger = Tools.Debugger; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); "use strict"; var DiagnosticsOMProvider = (function () { function DiagnosticsOMProvider() { var _this = this; this._port = toolUI.createPort("DiagnosticsOMPort"); this._window = browser.document.parentWindow; toolUI.connect(this._port); this._rpc = new F12.Tools.RPC.JsonRPCEndpoint("DIAGOMSERVER", function (method, params, response) { return _this.jsonRpcMethodReceive(method, params, response); }, function (method, params) { return _this.jsonRpcNotificationReceive(method, params); }, function (data) { _this._port.postMessage(data); }, function (onMessage) { _this._port.addEventListener("message", function (data) { onMessage(data); }); }); var breakModeIntellisenseFunc = function () { _this._window = browser.document.parentWindow; _this.addIntellisenseHelperOnWindow(_this._window); }; Common.RemoteHelpers.addListener(browser, "beforeScriptExecute", breakModeIntellisenseFunc); breakModeIntellisenseFunc(); } DiagnosticsOMProvider.standardizeReceivedMimeType = function (mimeType) { mimeType = mimeType.toLowerCase().trim(); switch (mimeType) { case "text/javascript1.0": case "text/javascript1.1": case "text/javascript1.2": case "text/javascript1.4": case "text/jscript": case "text/x-javascript": case "application/x-javascript": case "application/javascript": case "text/javascript1.3": case "text/javascript1.5": case "text/livescript": case "text/x-ecmascript": case "application/x-ecmascript": case "application/ecmascript": return "text/javascript"; case "video/vnd.dlna.mpeg-tts": return "text/typescript"; case "text/x-coffeescript": return "text/coffeescript"; case "text/x-jshtm": return "text/html"; case "application/xml": return "text/xml"; default: return mimeType; } }; DiagnosticsOMProvider.prototype.notify = function (method, params) { this._rpc.jsonRpcNotification(method, params); }; DiagnosticsOMProvider.prototype.executeOnTargetPage = function (expression) { try { this._window.eval(expression); } catch (ex) { return false; } return true; }; DiagnosticsOMProvider.prototype.downloadUrl = function (url, mimeTypeOverride, isAsync) { var _this = this; try { var xmlhttp = new XMLHttpRequest(); if (isAsync && !this.isLocalUrl(url)) { xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState === 4) { _this.onXHRComplete(true, xmlhttp, url, mimeTypeOverride); } }; xmlhttp.open("GET", url, true); xmlhttp.send(null); } else { xmlhttp.open("GET", url, false); xmlhttp.send(null); this.onXHRComplete(true, xmlhttp, url, mimeTypeOverride); } } catch (ex) { this.onXHRComplete(false, xmlhttp, url, mimeTypeOverride, ex.message); } return true; }; DiagnosticsOMProvider.prototype.onXHRComplete = function (success, xmlhttp, url, mimeTypeOverride, errorMessage) { var containsValidResponse = success && (this.isLocalUrl(url) || xmlhttp.status === 200); var mimeType = mimeTypeOverride; if (!mimeTypeOverride) { if (containsValidResponse) { mimeType = xmlhttp.getResponseHeader("content-type"); mimeType = mimeType ? DiagnosticsOMProvider.standardizeReceivedMimeType(mimeType.split(";")[0]) : null; } else { mimeType = null; errorMessage = errorMessage || String(xmlhttp.status); } } var text = typeof (xmlhttp.responseText) !== "unknown" ? xmlhttp.responseText : ""; this.notify("onDownloadUrlComplete", [containsValidResponse, url, text, mimeType, errorMessage]); }; DiagnosticsOMProvider.prototype.jsonRpcMethodReceive = function (method, params, response) { var result; if (params) { result = this[method].apply(this, params); } else { result = this[method].apply(this); } response(result, undefined); }; DiagnosticsOMProvider.prototype.jsonRpcNotificationReceive = function (event, params) { }; DiagnosticsOMProvider.prototype.isLocalUrl = function (url) { return url && url.indexOf("file://") === 0; }; DiagnosticsOMProvider.prototype.getIntellisenseItemsForExpression = function (expression, windowContext, searcObject, locals) { var intellisenseSupported = (Common.RemoteHelpers.getDocumentMode() >= 9); if (intellisenseSupported) { var intellisenseRemoteHelper = new Common.Intellisense.IntellisenseRemoteHelpers({ currentWindowContext: this._window }); var result; if (windowContext) { result = intellisenseRemoteHelper.getIntellisenseItemsForExpressionUsingWindowContext(expression, windowContext, searcObject, locals); } else { result = intellisenseRemoteHelper.getIntellisenseItemsForExpression(expression); } return result; } else { return { choices: [] }; } }; DiagnosticsOMProvider.prototype.performBreakmodeIntellisense = function (uid, expression, windowContext, searchObject, locals) { var sanitizedLocals = Array.prototype.map.call(locals, function (value, index, array) { return "" + value; }); var result = this.getIntellisenseItemsForExpression(expression, windowContext, searchObject, sanitizedLocals); this.notify("onIntellisenseRequestComplete", [uid, result]); }; DiagnosticsOMProvider.prototype.addIntellisenseHelperOnFrames = function (window) { if (window.frames) { for (var i = 0, len = window.frames.length; i < len; i++) { var frame = window.frames[i]; var result = Common.RemoteHelpers.getValidWindow(window, frame); if (result.isValid) { this.addIntellisenseHelperOnWindow(result.window); } } } }; DiagnosticsOMProvider.prototype.addIntellisenseHelperOnWindow = function (window) { var _this = this; browser.executeScript("window.__BROWSERTOOLS_DEBUGGER = {}; \\r\\n//# sourceURL=browsertools://browsertools.library.js", window); window.__BROWSERTOOLS_DEBUGGER.performBreakmodeIntellisense = browser.createSafeFunction(window, function (uid, expression, windowContext, searchObject, locals) { return _this.performBreakmodeIntellisense(uid, expression, windowContext, searchObject, locals); }); this.addIntellisenseHelperOnFrames(window); }; return DiagnosticsOMProvider; })(); var diagOMProvider = new DiagnosticsOMProvider(); "use strict"; F12.Tools.Debugger.DebugProvider.IsLaunchedViaJitDebugging = true; /* * TabControl styles */ .tabControl { height: 100%; width: calc(100% - 3.5em); display: -ms-grid; -ms-grid-columns: 1fr; -ms-grid-rows: auto minmax(min-content, 1fr); box-sizing: border-box; float: left; margin-left: 3.5em; } .tabControl > .tabBarContainer { -ms-grid-column: 1; -ms-grid-row: 1; -ms-grid-column-align: end; box-sizing: border-box; position: relative; width: 100%; white-space: nowrap; } .tabControl ul.tabBar { width: calc(100% - 32px); float: left; list-style-type: none; margin: 0; padding-left: 0; cursor: default; position: relative; overflow: hidden; font-size: 0; } .tabControl ul.tabBar li { position: relative; display: inline-block; min-width: 9em; color: TRANSPARENT; /*[{vs-file-tab-text-color}]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ height: 2em; padding-top: 2px; } .tabControl ul.tabBar li:hover { color: TRANSPARENT; /*[{vs-file-tab-hot-text-color}]*/ background-color: TRANSPARENT; /*[{vs-file-tab-hot-gradient-bottom-color}]*/ } .tabControl ul.tabBar li:hover .closeButton { background: url("../Common/images/tabclose.png") no-repeat 0 2px; /*[url({f12-debugger-image-tab-control-close}) no-repeat 0 2px]*/ background-size: 32px 16px; } .tabControl ul.tabBar li:hover .closeButton:hover { background: url("../Common/images/tabclose.png") no-repeat -16px 2px; /*[url({f12-debugger-image-tab-control-close}) no-repeat -16px 2px]*/ background-size: 32px 16px; } .tabControl ul.tabBar li:focus { outline: 1px dotted TRANSPARENT; /*[1px dotted {vs-designer-selection-dots-color}]*/ } .tabControl ul.tabBar li.active { color: TRANSPARENT; /*[{vs-file-tab-selected-text-color}]*/ background-color: TRANSPARENT; /*[{vs-file-tab-selected-gradient-bottom-color}]*/ } .tabControl ul.tabBar li.active .closeButton { background: url("../Common/images/tabclose.png") no-repeat 0 2px; /*[url({f12-debugger-image-tab-control-close}) no-repeat 0 2px]*/ background-size: 32px 16px; } .tabControl ul.tabBar li.active .closeButton:hover { background: url("../Common/images/tabclose.png") no-repeat -16px 2px; /*[url({f12-debugger-image-tab-control-close}) no-repeat -16px 2px]*/ background-size: 32px 16px; } .tabControl > .tabContentPane { -ms-grid-column: 1; -ms-grid-row: 2; box-sizing: border-box; } .tabControl > .tabContentPane > .tabItemContent { display: none; } .tabControl > .tabContentPane > .active { display: block; } #tabStripContainer { display: inline-block; border-bottom: 0.2em solid TRANSPARENT; /*[0.2em solid {vs-file-tab-selected-gradient-bottom-color}]*/ } .buttonControl { position: absolute; float: left; overflow: hidden; height: 2em; } .buttonControl > button { width: 19px; height: 100%; padding: 1px 5px 4px 5px; border: none; border-bottom: 0.2em solid TRANSPARENT; /*[0.2em solid {vs-file-tab-selected-gradient-bottom-color}]*/ } .tabControl .closeButton { margin-left: 1em; margin-right: 0.5em; float: right; height: 16px; width: 16px; } .tabTitle { margin-left: 3px; overflow: hidden; float: left; text-align: center; height: 100%; padding-top: 1px; } .tabContent { display: inline; height: 2em; } #tabNavigation { width: 32px; float: right; margin-top: 4px; position: relative; z-index: 100; } .prevTabDisabled { background: url("images/prevTab.png"); /*[url({f12-debugger-image-tab-control-previous})]*/ background-repeat: no-repeat; background-position: 0px 0px; background-size: 32px 16px; float: left; width: 16px; height: 16px; } .prevTabDisabled:hover { background-position-x: -16px; } .nextTabDisabled { background: url("images/nextTab.png"); /*[url({f12-debugger-image-tab-control-next})]*/ background-repeat: no-repeat; background-position: 0px 0px; background-size: 32px 16px; float: right; width: 16px; height: 16px; } .nextTabDisabled:hover { background-position-x: -16px; } .hiddenButton { display: none; } PNG  IHDR `|"pIDATx^ZAn0 ߛ'/֣8ht-u؛+`U2KJv\ wRp8.)jtax#OO'#L9sԄ )0U>!FѣfMhM]|  pFծc^h'CH s$TOܴC>$T;5 l+ S$38dJ$PwY$.h"X [opX/p_u=J PD) _ } `|P+6 &$)~ӈ:zԬ?_SjF GgP#zb-!|2 Sk6d^j%QH(wpλ,\+%'@t_yO;; dz)(!јWoA;Wa`m' aO%+WG%Skĵ0'xR\'s!9p=H$&%s^Is^ߡ?H?c.v@o; LC)B=9꘿z}^#rL SYn/;@I3<}j٭xFP -.>Pxofu #GdxE8]4G X z `N( IENDB`PNG  IHDR `|"pIDATx^A@EӈA 82mvX2@~8 >pAA%i;mc7ity=|=k0Ln+4|bCvuQЛVj{0&ߞŧ "q>jŴK4bJGdz"kq= eo!J|HibVJ|Cf?*!/s\GT’}H߿yiHQۨ Xӑ҈L`W,l0JsK^XIӜn հF-gӕD7Lly(4!; ܇(vZ˞~gg]1ˬh &51cZ{[/˖ N*ʮU/8}Q`#LV3eX9| ^/%D|&=- wDi̙kji|`,@0Ĉ|>@6x0"_1xqnn^Zz. 2 >)' @>@|=4: /Q#x'f^'?ѹ%G˞.rx@d$a(o->-5@_P>;?Yf.8nTFtWFY^LF=|&F8V|90 c"90^> ,#dIENDB`.watchWindow { width: 100%; height: 100%; padding: 0px; } .watchWindow > .windowtoolbar { -ms-grid-columns: 1fr auto auto auto; display: -ms-grid; } .watchWindow > .windowtoolbar > #addWatchButton { -ms-grid-column: 2; } .watchWindow > .windowtoolbar > #addWatchButton > .buttonIcon { background-image: url('Watches/images/addWatch.png'); /*[url({f12-debugger-image-watches-add-watch})]*/ } .watchWindow > .windowtoolbar > #deleteAllWatchesButton { -ms-grid-column: 4; } .watchWindow > .windowtoolbar > #deleteAllWatchesButton > .buttonIcon { background-image: url('Watches/images/deleteAll.png'); /*[url({f12-debugger-image-watches-delete-all})]*/ } .watchWindow .gridWatchContainer { height: calc(100% - 20px); width: 100%; border: none; position: relative; } .watchWindow .gridWatchContainer .grid .grid-canvas { overflow-x: hidden; } .watchWindow .gridWatchContainer.busy .grid .grid-canvas .grid-row > .grid-cell { cursor: wait !important; } .grid-row:hover .deleteWatch { background: url("../common/images/i_delete.png") no-repeat; /*[url({f12-debugger-image-watches-delete-watch}) no-repeat]*/ background-size: 16px; } .grid-row:hover .deleteWatch:hover { background: url("../common/images/i_delete.png") no-repeat 0px -16px; /*[url({f12-debugger-image-watches-delete-watch}) no-repeat 0px -16px]*/ background-size: 16px; background-color: TRANSPARENT; /*[{f12-toolbar-button-hover-color}]*/ } .watchWindow .gridWatchContainer.busy .grid .grid-canvas .grid-row:hover .deleteWatch { background: url("../common/images/i_delete.png") no-repeat 0px -32px; /*[url({f12-debugger-image-watches-delete-watch}) no-repeat 0px -32px]*/ background-size: 16px; } .watchWindow .gridWatchContainer.busy .grid .grid-canvas .grid-row .deleteWatch:hover { background: url("../common/images/i_delete.png") no-repeat 0px -32px; /*[url({f12-debugger-image-watches-delete-watch}) no-repeat 0px -32px]*/ background-size: 16px; background-color: TRANSPARENT; /*[{f12-toolbar-button-hover-color}]*/ } .deleteWatch { width: 16px; height: 16px; } .addWatch { color: TRANSPARENT; /*[{plugin-link-active-color}]*/ border: none; } .grid-row:hover { color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/ } .watch-Error { color: TRANSPARENT; /*[{plugin-font-console-error-color}]*/ } .watch-ValueChanged { color: TRANSPARENT; /*[{plugin-debugger-watch-font-color}]*/ } .watch-watchName { color: TRANSPARENT; /*[{plugin-link-active-color}]*/ } .grid-row-selected .watch-watchName, .grid-row-selected-blur .watch-watchName, .grid-row:hover .watch-watchName { color: TRANSPARENT; /*[{plugin-link-active-selected-color}]*/ } .grid-row-selected .watch-ValueChanged, .grid-row-selected-blur .watch-ValueChanged, .grid-row:hover .watch-ValueChanged { color: TRANSPARENT; /*[{plugin-treeview-content-selected-color}]*/ } .gridWatchContainer .overlayWindow { opacity: 0.5; position: absolute; display: block; z-index: 10; top: 0; bottom: 0; left: 0; right: 0; background: TRANSPARENT; /*[{plugin-debugger-watch-overlay-color}]*/ } .grid-row .showAll { cursor: pointer; text-decoration: underline; } .grid-row .functionItem { background: url("./images/functionIcon.png") no-repeat; /*[url({f12-debugger-image-watches-function}) no-repeat]*/ background-size: 10px 10px; } .grid-row .notAFunctionItem { background: url("./images/notAFunctionIcon.png") no-repeat; /*[url({f12-debugger-image-watches-not-a-function}) no-repeat]*/ background-size: 10px 10px; } .grid-row .returnValue { background: url("./images/returnValue.png") no-repeat; /*[url({f12-debugger-image-watches-return-value}) no-repeat]*/ background-size: 10px 10px; } #mainContainer { background-color: TRANSPARENT; /*[{plugin-background-color}]*/ cursor: default; display: -ms-grid; -ms-grid-rows: auto 1fr; } #clientArea { -ms-grid-row: 2; width: 100%; height: 100%; box-sizing: border-box; background-color: TRANSPARENT; /*[{plugin-background-color}]*/ cursor: default; overflow: auto; } #clientPanel { width: 100%; height: 100%; overflow: hidden; color: TRANSPARENT; /*[{plugin-color}]*/ background-color: TRANSPARENT; /*[{plugin-background-color}]*/ } .BPT-ConsoleButton { top: 0; display: table-cell; padding-left: 0.5em; padding-right: 0.5em; width: auto; vertical-align: bottom; } .labeledComboBox { } .emulationSection label { display: inline-block; width: 100px; font-size: 12px; line-height: 1.6em; color: TRANSPARENT; /*[{plugin-subheading-color}]*/ } .labeledComboBox select { width: 150px; margin: 3px; } .labeledComboBox option { background-color: TRANSPARENT; /*[{plugin-background-color}]*/ } .emulationSection { margin-left: 14px; margin-right: 70px; margin-bottom: 20px; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ color: TRANSPARENT; /*[{plugin-color}]*/ float: left; } .emulationSection h1 { font-size: 13px; font-weight: 600; } .labeledRadioButton { font-size: 12px; line-height: 1.6em; color: TRANSPARENT; /*[{plugin-subheading-color}]*/ } .radioButtonLabel { width: auto !important; } .labeledTextBox { } .labeledTextBox input { width: 150px; margin: 3px; } .minorHeadingLabel { color: TRANSPARENT !important; /*[{plugin-color} !important]*/ width: auto !important; } .inputIcon { border: none; background-repeat: no-repeat; } .infoButton .inputIcon { border: none; background-repeat: no-repeat; background-image: url('infoButton.png'); /*[url({f12-emulation-image-info-button})]*/ background-size: 14px 14px; width: 14px; height: 14px; display: inline-block; vertical-align: text-top; cursor: pointer; } #documentModeAwarenessContainer{ display: none; /*default to collapsed display*/ } #documentModeAwarenessLink { display: inline-block; width: auto; font-size: 12px; line-height: 1.6em; margin: 0px 0px 10px 6px; cursor: pointer; } .deleteUaStringButton .buttonIcon { background-image: url('../common/images/i_delete.png'); /*[url({f12-emulation-image-delete})]*/ background-size: 16px 48px; width: 16px; height: 16px; display: inline-block; vertical-align: text-top; } #removeCustomUaStringControlRoot { display: inline; cursor: pointer; margin-left: 4px; cursor: pointer; } .validationErrorIcon { width: 14px; height: 14px; } .labeledTextBoxWithUnits { } .labeledTextBoxWithUnits input { width: 90px; margin: 3px; } .labeledTextBoxWithUnits img { margin-top: 1px; vertical-align: text-top; } .hiddenLabel { display: none; position: absolute; left: -1000px; } .unitsLabel { width: auto !important; } .customSection { margin-top: 6px; } .customUaStringTextBox { display: inline; } /* do not display the "x" in the custom UA string box */ .customUaStringTextBox ::-ms-clear { display: none; } #gpsLabel { margin: 3px -3px 3px 0px; } #gpsOffLabel, #gpsOnLabel, #gpsOnNoSignalLabel { margin: 0px 4px 0px -2px; } .BPT-Toolbar .BPT-button.resetButton .buttonIcon { background-image: url(''); /*[url({f12-emulation-image-reset-settings})]*/ } .BPT-Toolbar .BPT-button.persistSettingsButton .buttonIcon { background-image: url(''); /*[url({f12-emulation-image-persist-settings})]*/ } Emulation

        // // Copyright (C) Microsoft. All rights reserved. // // converters.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { var Converters = (function () { function Converters() { } Converters.initialize = function () { Converters.ToPreserveSettingsTooltip = Converters.boolToEnabledDisabledTooltip("EmulationPersistSettingsButtonEnabledTooltip", "EmulationPersistSettingsButtonDisabledTooltip"); Converters.ToDocModeOriginDisplaySetting = Converters.docModeOriginToDisplaySetting(); Converters.ToStringFromBrowserMode = Converters.browserModeToString(); Converters.ToUserAgentStringDisplaySetting = Converters.userAgentStringToDisplaySetting(); Converters.ToStringFromOrientation = Converters.orientationToString(); }; Converters.boolToEnabledDisabledTooltip = function (enabledResourceKey, disabledResourceKey) { return { convertTo: function (from) { return Plugin.Resources.getString(from ? enabledResourceKey : disabledResourceKey); }, convertFrom: null }; }; Converters.docModeOriginToDisplaySetting = function () { return { convertTo: function (from) { return from !== "" ? "block" : "none"; }, convertFrom: null }; }; Converters.browserModeToString = function () { return { convertTo: function (from) { return "" + from; }, convertFrom: function (from) { return parseInt(from, 10); } }; }; Converters.userAgentStringToDisplaySetting = function () { return { convertTo: function (from) { return from === Emulation.EmulationModel.CUSTOM_VALUE ? "block" : "none"; }, convertFrom: null }; }; Converters.orientationToString = function () { return { convertTo: function (from) { return "" + from; }, convertFrom: function (from) { return parseInt(from, 10); } }; }; return Converters; })(); Emulation.Converters = Converters; Converters.initialize(); })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // emulationEnums.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { (function (ViewUpdateFlags) { ViewUpdateFlags[ViewUpdateFlags["Mode"] = 1] = "Mode"; ViewUpdateFlags[ViewUpdateFlags["Display"] = 2] = "Display"; ViewUpdateFlags[ViewUpdateFlags["Geolocation"] = 4] = "Geolocation"; ViewUpdateFlags[ViewUpdateFlags["All"] = ViewUpdateFlags.Mode | ViewUpdateFlags.Display | ViewUpdateFlags.Geolocation] = "All"; })(Emulation.ViewUpdateFlags || (Emulation.ViewUpdateFlags = {})); var ViewUpdateFlags = Emulation.ViewUpdateFlags; (function (BrowserMode) { BrowserMode[BrowserMode["Desktop"] = 0] = "Desktop"; BrowserMode[BrowserMode["Phone"] = 1] = "Phone"; BrowserMode[BrowserMode["Enterprise"] = 2] = "Enterprise"; BrowserMode[BrowserMode["Unknown"] = 3] = "Unknown"; })(Emulation.BrowserMode || (Emulation.BrowserMode = {})); var BrowserMode = Emulation.BrowserMode; (function (ModeUpdate) { ModeUpdate[ModeUpdate["BrowserMode"] = 0] = "BrowserMode"; ModeUpdate[ModeUpdate["UserAgentString"] = 1] = "UserAgentString"; })(Emulation.ModeUpdate || (Emulation.ModeUpdate = {})); var ModeUpdate = Emulation.ModeUpdate; (function (Orientation) { Orientation[Orientation["Landscape"] = 0] = "Landscape"; Orientation[Orientation["Portrait"] = 1] = "Portrait"; Orientation[Orientation["Unknown"] = 2] = "Unknown"; })(Emulation.Orientation || (Emulation.Orientation = {})); var Orientation = Emulation.Orientation; (function (ViewportUpdate) { ViewportUpdate[ViewportUpdate["Orientation"] = 0] = "Orientation"; ViewportUpdate[ViewportUpdate["Resolution"] = 1] = "Resolution"; })(Emulation.ViewportUpdate || (Emulation.ViewportUpdate = {})); var ViewportUpdate = Emulation.ViewportUpdate; (function (GeolocationState) { GeolocationState[GeolocationState["Off"] = 0] = "Off"; GeolocationState[GeolocationState["On"] = 1] = "On"; GeolocationState[GeolocationState["OnNoSignal"] = 2] = "OnNoSignal"; GeolocationState[GeolocationState["Unknown"] = 3] = "Unknown"; })(Emulation.GeolocationState || (Emulation.GeolocationState = {})); var GeolocationState = Emulation.GeolocationState; })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // Emulation.templates.ts var ControlTemplates; (function (ControlTemplates) { var Emulation = (function () { function Emulation() { } Emulation.emulationBasicDisplayControls = "\
        \ \
        \ \
        \
        \ \
        \ \
        \
        \
        \ "; Emulation.emulationButtonPanel = "\
        \
        \
        \
        \ "; Emulation.emulationModeControls = "\
        \

        \ \
        \ \
        \
        \
        \ \
        \ \
        \
        \ \
        \ \
        \
        \ \
        \ \
        \
        \ \
        \ \
        \ \
        \
        \
        \
        \
        \ "; Emulation.emulationLinkIconButton = "\ \ \ \ "; Emulation.emulationLinkButton = "\ \ "; Emulation.emulationCustomUaStringTextBox = "\
        \ \
        \
        \ "; Emulation.emulationCustomUaStringDataList = "\ \ "; Emulation.emulationCustomUaStringDataListItem = "\ \ "; return Emulation; })(); ControlTemplates.Emulation = Emulation; })(ControlTemplates || (ControlTemplates = {})); // emulationModel.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { var EmulationModel = (function (_super) { __extends(EmulationModel, _super); function EmulationModel(events, config) { var _this = this; _super.call(this); this.documentModes = new Common.ObservableCollection(); this.userAgentStrings = new Common.ObservableCollection(); this.mobileUserAgentStrings = []; this.customUserAgentStrings = new Common.ObservableCollection(); this.orientations = new Common.ObservableCollection(); this.resolutions = new Common.ObservableCollection(); this.mobileResolutions = []; this.propertiesResolved = new Common.EventSource(); this.settingsHaveBeenModifiedChanged = new Common.EventSource(); this.customResolutionFieldsNeedCommit = new Common.EventSource(); this._events = events; this._config = config; this.propertiesResolved.addHandler(function (setDirtyFlag) { return _this.onPropertiesResolved(setDirtyFlag); }); } EmulationModel.initialize = function () { Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.ShouldPeristSettingsProperty, false, function (obj) { return obj.onGenericPropertyChanged(null, null); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.IsAtBreakpointProperty, false, function (obj, oldValue, newValue) { return obj.onIsAtBreakpointChanged(newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.SettingsHaveBeenModifiedProperty, false, function (obj) { return obj.updateResetEnabledState(); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.ResetShouldBeEnabledProperty, false); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.DocumentModeProperty, EmulationModel.DocumentModeDefault, function (obj, oldValue, newValue) { return obj.onDocumentModeChanged(newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.DocumentModeInfoProperty, ""); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.DocumentModeInfoLinkProperty, ""); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.DocumentModeOriginProperty, ""); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.DocumentModeOriginTooltipProperty, ""); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.AllBrowserModesProperty, []); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.BrowserModesProperty, []); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.BrowserModeProperty, EmulationModel.BrowserModeDefault, function (obj, oldValue, newValue) { return obj.onBrowserModeChanged(newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.UserAgentStringProperty, EmulationModel.UserAgentStringDefault, function (obj, oldValue, newValue) { return obj.onUserAgentStringChanged(newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.CustomUserAgentStringProperty, EmulationModel.CustomUserAgentStringDefault, function (obj, oldValue, newValue) { return obj.onCustomUserAgentStringChanged(newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.OrientationProperty, EmulationModel.OrientationDefault, function (obj, oldValue, newValue) { return obj.onDisplayPropertiesChanged(0 /* Orientation */, newValue === EmulationModel.OrientationDefault); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.ResolutionProperty, EmulationModel.ResolutionDefault, function (obj, oldValue, newValue) { return obj.onDisplayPropertiesChanged(1 /* Resolution */, newValue === EmulationModel.ResolutionDefault); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.ResolutionDisplaySizeProperty, EmulationModel.ResolutionDisplaySizeDefault, function (obj, oldValue, newValue) { return obj.onGenericPropertyChanged(EmulationModel.ResolutionDisplaySizeDefault, newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.ResolutionWidthProperty, EmulationModel.ResolutionWidthDefault, function (obj, oldValue, newValue) { return obj.onGenericPropertyChanged(EmulationModel.ResolutionWidthDefault, newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.ResolutionHeightProperty, EmulationModel.ResolutionHeightDefault, function (obj, oldValue, newValue) { return obj.onGenericPropertyChanged(EmulationModel.ResolutionHeightDefault, newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.GeolocationControlsEnabledProperty, true, function (obj, oldValue, newValue) { return obj.onGenericPropertyChanged(null, null); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.GeolocationStateProperty, EmulationModel.GeolocationStateDefault, function (obj, oldValue, newValue) { return obj.onGenericPropertyChanged(EmulationModel.GeolocationStateDefault, newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.GpsLatitudeProperty, EmulationModel.GpsLatitudeDefault, function (obj, oldValue, newValue) { return obj.onGenericPropertyChanged(EmulationModel.GpsLatitudeDefault, newValue); }); Common.ObservableHelpers.defineProperty(EmulationModel, EmulationModel.GpsLongitudeProperty, EmulationModel.GpsLongitudeDefault, function (obj, oldValue, newValue) { return obj.onGenericPropertyChanged(EmulationModel.GpsLongitudeDefault, newValue); }); }; EmulationModel.prototype.load = function (settings) { var validator = new Emulation.EmulationSettingsValidator(this.userAgentStrings.map(function (uaString) { return uaString; }), this.resolutions.map(function (resolution) { return resolution; }), settings); this.shouldPeristSettings = validator.shouldPersistSettings; if (this.shouldPeristSettings) { this._events.areMultiplePropertiesChanging = true; this.documentMode = validator.documentMode; this.browserMode = validator.browserMode; this.userAgentString = validator.userAgentString; this.customUserAgentString = validator.customUserAgentString; this.orientation = validator.orientation; this.resolution = validator.resolution; var resolutionInfo = validator.resolutionInfo; this.resolutionDisplaySize = resolutionInfo.displaySize; this.resolutionWidth = resolutionInfo.width; this.resolutionHeight = resolutionInfo.height; this.geolocationState = validator.geolocationState; if (this.geolocationState === 0 /* Off */) { var gpsOffConfig = this._config ? this._config.categories.simulateGPS.off : {}; this.gpsLatitude = gpsOffConfig.latitude; this.gpsLongitude = gpsOffConfig.longitude; } else { var gpsInfo = validator.geolocationInfo; this.gpsLatitude = gpsInfo.latitude; this.gpsLongitude = gpsInfo.longitude; } this.updateDirtyFlag(); this._events.areMultiplePropertiesChanging = false; this._events.onFlushPendingRefreshes(); } }; EmulationModel.prototype.save = function () { var settings = {}; settings.shouldPersistSettings = this.shouldPeristSettings; settings.documentMode = this.documentMode; settings.browserMode = Emulation.BrowserMode[this.browserMode]; settings.orientation = Emulation.Orientation[this.orientation]; settings.userAgentString = this.userAgentString !== EmulationModel.CUSTOM_VALUE ? this.userAgentString : this.customUserAgentString; if (this.resolution === EmulationModel.DEFAULT_VALUE) { settings.resolution = null; } else { settings.resolution = {}; var resolutionInfoIdx = this.resolutions.map(function (item) { return item.value; }).indexOf(this.resolution); if (resolutionInfoIdx >= 0 && this.resolution !== EmulationModel.CUSTOM_VALUE) { var resolutionInfo = this.resolutions.getItem(resolutionInfoIdx).info; settings.resolution.displaySize = resolutionInfo.displaySize; settings.resolution.width = resolutionInfo.width; settings.resolution.height = resolutionInfo.height; } else { settings.resolution.displaySize = this.resolutionDisplaySize; settings.resolution.width = this.resolutionWidth; settings.resolution.height = this.resolutionHeight; } } settings.geolocationState = Emulation.GeolocationState[this.geolocationState]; settings.geolocation = {}; settings.geolocation.latitude = this.gpsLatitude; settings.geolocation.longitude = this.gpsLongitude; return settings; }; EmulationModel.prototype.reset = function () { this.documentMode = EmulationModel.DocumentModeDefault; this.browserMode = EmulationModel.BrowserModeDefault; this.userAgentString = EmulationModel.UserAgentStringDefault; this.customUserAgentString = EmulationModel.CustomUserAgentStringDefault; this.orientation = EmulationModel.OrientationDefault; this.resolution = EmulationModel.ResolutionDefault; this.resolutionDisplaySize = EmulationModel.ResolutionDisplaySizeDefault; this.resolutionWidth = EmulationModel.ResolutionWidthDefault; this.resolutionHeight = EmulationModel.ResolutionHeightDefault; this.geolocationState = EmulationModel.GeolocationStateDefault; this.gpsLatitude = EmulationModel.GpsLatitudeDefault; this.gpsLongitude = EmulationModel.GpsLongitudeDefault; this.settingsHaveBeenModified = false; }; EmulationModel.prototype.onIsAtBreakpointChanged = function (isAtBreakpoint) { this._events.onIsAtBreakpointChanged(isAtBreakpoint); this.updateResetEnabledState(); }; EmulationModel.prototype.updateResetEnabledState = function () { this.resetShouldBeEnabled = this.settingsHaveBeenModified && !this.isAtBreakpoint; this.settingsHaveBeenModifiedChanged.invoke(this.settingsHaveBeenModified); }; EmulationModel.prototype.onDocumentModeChanged = function (newValue) { this._events.onDocumentModeChanged(newValue); this.propertiesResolved.invoke(this.documentMode !== EmulationModel.DocumentModeDefault); }; EmulationModel.prototype.onBrowserModeChanged = function (newValue) { this._events.onBrowserModeChanged(newValue); if (!this._events.areMultiplePropertiesChanging) { this._events.areMultiplePropertiesChanging = true; var commitUaString = true; var newUaString = this.userAgentString; if (this.userAgentString === EmulationModel.CUSTOM_VALUE) { commitUaString = false; } if (newValue === 0 /* Desktop */) { newUaString = EmulationModel.DEFAULT_VALUE; this.resolution = EmulationModel.DEFAULT_VALUE; } else if (newValue === 1 /* Phone */) { if (this.mobileUserAgentStrings.length > 0) { newUaString = this.mobileUserAgentStrings[0]; } if (this.mobileResolutions.length > 0) { this.resolution = this.mobileResolutions[this.mobileResolutions.length - 1]; } } else if (newValue === 2 /* Enterprise */) { newUaString = EmulationModel.DEFAULT_VALUE; this.resolution = EmulationModel.DEFAULT_VALUE; } else { throw new Error("BrowserMode was set to an unknown value: " + newValue); } if (commitUaString) { this.userAgentString = newUaString; } this._events.onRefreshNeeded(); this._events.areMultiplePropertiesChanging = false; this.propertiesResolved.invoke(true); } }; EmulationModel.prototype.onUserAgentStringChanged = function (newValue) { this._events.onUserAgentStringChanged(newValue); if (!this._events.areMultiplePropertiesChanging) { var refreshNeeded = true; this._events.areMultiplePropertiesChanging = true; if (newValue === EmulationModel.CUSTOM_VALUE) { refreshNeeded = false; } else if (this.mobileUserAgentStrings.indexOf(newValue) < 0) { this.browserMode = 0 /* Desktop */; this.resolution = EmulationModel.DEFAULT_VALUE; } else { this.browserMode = 1 /* Phone */; if (this.mobileResolutions.length > 0) { this.resolution = this.mobileResolutions[this.mobileResolutions.length - 1]; } } if (refreshNeeded) { this._events.onRefreshNeeded(); } this._events.areMultiplePropertiesChanging = false; this.propertiesResolved.invoke(this.userAgentString !== EmulationModel.UserAgentStringDefault); } }; EmulationModel.prototype.onCustomUserAgentStringChanged = function (uaString) { var _this = this; if (uaString !== "") { this._events.onCustomUserAgentStringChanged(uaString).done(function (customUaStrings) { _this.customUserAgentStrings.resetItems(customUaStrings.map(function (value, index, array) { return { text: value.value, date: value.name }; }).sort(function (a, b) { return b.date.localeCompare(a.date); })); }); } this.propertiesResolved.invoke(this.customUserAgentString !== EmulationModel.CustomUserAgentStringDefault); }; EmulationModel.prototype.getResolutionInfo = function (resolutionValue) { for (var i = 0; i < this.resolutions.length; ++i) { if (this.resolutions.getItem(i).text === resolutionValue) { return this.resolutions.getItem(i).info; } } throw new Error("Resolution is set to an unknown value"); }; EmulationModel.prototype.onDisplayPropertiesChanged = function (update, isDefault) { if (this.resolution === EmulationModel.DEFAULT_VALUE) { if (update === 1 /* Resolution */) { this._events.onResolutionSetToDefault(); } } else if (this.resolution !== EmulationModel.CUSTOM_VALUE) { var info = this.getResolutionInfo(this.resolution); var width, height; if (this.orientation === 0 /* Landscape */) { width = info.width; height = info.height; } else if (this.orientation === 1 /* Portrait */) { width = info.height; height = info.width; } else if (this.orientation === 2 /* Unknown */) { throw new Error("Orientation is set to an unknown value"); } this._events.onResolutionViewportSizeSet(info.displaySize, width, height); } else { this.customResolutionFieldsNeedCommit.invoke(); } this.propertiesResolved.invoke(isDefault); }; EmulationModel.prototype.onGenericPropertyChanged = function (defaultValue, newValue) { if (!this._events.areMultiplePropertiesChanging) { var defaultValueIsNullOrUndefined = (defaultValue === undefined) || (defaultValue === null); var newValueIsNullOrUndefined = (newValue === undefined) || (newValue === null); var modelIsDirty = (defaultValue !== newValue) && (!defaultValueIsNullOrUndefined || !newValueIsNullOrUndefined); this.propertiesResolved.invoke(modelIsDirty); } }; EmulationModel.prototype.onPropertiesResolved = function (setDirtyFlag) { if (setDirtyFlag) { this.settingsHaveBeenModified = true; } else { this.updateDirtyFlag(); } }; EmulationModel.prototype.updateDirtyFlag = function () { this.settingsHaveBeenModified = this.documentMode !== EmulationModel.DocumentModeDefault || this.browserMode !== EmulationModel.BrowserModeDefault || this.userAgentString !== EmulationModel.UserAgentStringDefault || this.customUserAgentString !== EmulationModel.CustomUserAgentStringDefault || this.orientation !== EmulationModel.OrientationDefault || this.resolution !== EmulationModel.ResolutionDefault || this.resolutionDisplaySize !== EmulationModel.ResolutionDisplaySizeDefault || this.resolutionWidth !== EmulationModel.ResolutionWidthDefault || this.resolutionHeight !== EmulationModel.ResolutionHeightDefault || this.geolocationState !== EmulationModel.GeolocationStateDefault || this.gpsLatitude !== EmulationModel.GpsLatitudeDefault || this.gpsLongitude !== EmulationModel.GpsLongitudeDefault; }; EmulationModel.DEFAULT_VALUE = ""; EmulationModel.CUSTOM_VALUE = "?"; EmulationModel.MAX_VIEWPORT_DISPLAY_SIZE = 60; EmulationModel.MAX_VIEWPORT_WIDTH_IN_PX = 3820; EmulationModel.MAX_VIEWPORT_HEIGHT_IN_PX = 2160; EmulationModel.MIN_LATITUDE = -90; EmulationModel.MAX_LATITUDE = 90; EmulationModel.MIN_LONGITUDE = -180; EmulationModel.MAX_LONGITUDE = 180; EmulationModel.ShouldPeristSettingsProperty = "shouldPeristSettings"; EmulationModel.IsAtBreakpointProperty = "isAtBreakpoint"; EmulationModel.SettingsHaveBeenModifiedProperty = "settingsHaveBeenModified"; EmulationModel.ResetShouldBeEnabledProperty = "resetShouldBeEnabled"; EmulationModel.DocumentModeProperty = "documentMode"; EmulationModel.DocumentModeInfoProperty = "documentModeInfo"; EmulationModel.DocumentModeInfoLinkProperty = "documentModeInfoLink"; EmulationModel.DocumentModeOriginProperty = "documentModeOrigin"; EmulationModel.DocumentModeOriginTooltipProperty = "documentModeOriginTooltip"; EmulationModel.AllBrowserModesProperty = "allBrowserModes"; EmulationModel.BrowserModesProperty = "browserModes"; EmulationModel.BrowserModeProperty = "browserMode"; EmulationModel.UserAgentStringProperty = "userAgentString"; EmulationModel.CustomUserAgentStringProperty = "customUserAgentString"; EmulationModel.OrientationProperty = "orientation"; EmulationModel.ResolutionProperty = "resolution"; EmulationModel.ResolutionDisplaySizeProperty = "resolutionDisplaySize"; EmulationModel.ResolutionWidthProperty = "resolutionWidth"; EmulationModel.ResolutionHeightProperty = "resolutionHeight"; EmulationModel.GeolocationControlsEnabledProperty = "geolocationControlsEnabled"; EmulationModel.GeolocationStateProperty = "geolocationState"; EmulationModel.GpsLatitudeProperty = "gpsLatitude"; EmulationModel.GpsLongitudeProperty = "gpsLongitude"; EmulationModel.DocumentModeDefault = EmulationModel.DEFAULT_VALUE; EmulationModel.BrowserModeDefault = 0 /* Desktop */; EmulationModel.UserAgentStringDefault = EmulationModel.DEFAULT_VALUE; EmulationModel.CustomUserAgentStringDefault = ""; EmulationModel.OrientationDefault = 0 /* Landscape */; EmulationModel.ResolutionDefault = EmulationModel.DEFAULT_VALUE; EmulationModel.ResolutionDisplaySizeDefault = null; EmulationModel.ResolutionWidthDefault = null; EmulationModel.ResolutionHeightDefault = null; EmulationModel.GeolocationStateDefault = 0 /* Off */; EmulationModel.GpsLatitudeDefault = null; EmulationModel.GpsLongitudeDefault = null; return EmulationModel; })(Common.Observable); Emulation.EmulationModel = EmulationModel; EmulationModel.initialize(); })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // emulationSettingsValidator.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { var EmulationSettingsValidator = (function () { function EmulationSettingsValidator(validUAStrings, validResolutions, settings) { if (typeof settings === "undefined") { settings = {}; } this._validUAStrings = validUAStrings; this._validResolutions = validResolutions; this._settings = settings; } Object.defineProperty(EmulationSettingsValidator.prototype, "shouldPersistSettings", { get: function () { return !!this._settings.shouldPersistSettings; }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "documentMode", { get: function () { if (this._settings.documentMode) { var modeIndex = Emulation.EmulationWindow.EMULATION_MODES.indexOf(this._settings.documentMode); return (modeIndex < 0) ? Emulation.EmulationModel.DEFAULT_VALUE : Emulation.EmulationWindow.EMULATION_MODES[modeIndex]; } return Emulation.EmulationModel.DEFAULT_VALUE; }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "browserMode", { get: function () { var browserMode = Emulation.BrowserMode[this._settings.browserMode]; return typeof browserMode !== "undefined" && browserMode !== 3 /* Unknown */ ? browserMode : 0 /* Desktop */; }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "userAgentString", { get: function () { if (this._settings.userAgentString) { var uaIndex = this._validUAStrings.map(function (item) { return item.value; }).indexOf(this._settings.userAgentString); return (uaIndex < 0) ? Emulation.EmulationModel.CUSTOM_VALUE : this._validUAStrings[uaIndex].value; } return Emulation.EmulationModel.DEFAULT_VALUE; }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "customUserAgentString", { get: function () { if (this._settings.userAgentString && this.userAgentString === Emulation.EmulationModel.CUSTOM_VALUE) { return "" + this._settings.userAgentString; } return ""; }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "orientation", { get: function () { var orientation = Emulation.Orientation[this._settings.orientation]; return typeof orientation !== "undefined" && orientation !== 2 /* Unknown */ ? orientation : 0 /* Landscape */; }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "resolution", { get: function () { if (this._settings.resolution) { var resolutionString = Emulation.EmulationWindow.formatResolutionInfo(this._settings.resolution); var resolutionIndex = this._validResolutions.map(function (item) { return item.value; }).indexOf(resolutionString); return (resolutionIndex < 0) ? Emulation.EmulationModel.CUSTOM_VALUE : this._validResolutions[resolutionIndex].value; } return Emulation.EmulationModel.DEFAULT_VALUE; }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "resolutionInfo", { get: function () { if (this._settings.resolution) { return { displaySize: this.validateFloatValue(this._settings.resolution.displaySize), width: this.validateIntValue(this._settings.resolution.width), height: this.validateIntValue(this._settings.resolution.height) }; } else { return {}; } }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "geolocationState", { get: function () { var state = Emulation.GeolocationState[this._settings.geolocationState]; return typeof state !== "undefined" && state !== 3 /* Unknown */ ? state : 0 /* Off */; }, enumerable: true, configurable: true }); Object.defineProperty(EmulationSettingsValidator.prototype, "geolocationInfo", { get: function () { if (this._settings.geolocation) { return { latitude: this.validateFloatValue(this._settings.geolocation.latitude), longitude: this.validateFloatValue(this._settings.geolocation.longitude) }; } else { return {}; } }, enumerable: true, configurable: true }); EmulationSettingsValidator.prototype.validateIntValue = function (value) { if (typeof value === "number") { return value; } else { var int = parseInt(value, 10); return isNaN(int) || !isFinite(int) ? undefined : int; } }; EmulationSettingsValidator.prototype.validateFloatValue = function (value) { if (typeof value === "number") { return value; } else { var float = parseFloat(value); return isNaN(float) || !isFinite(float) ? undefined : float; } }; return EmulationSettingsValidator; })(); Emulation.EmulationSettingsValidator = EmulationSettingsValidator; })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // emulationRemoteController.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { var EmulationRemoteController = (function () { function EmulationRemoteController(proxy) { this._proxy = proxy; this._runningPromises = []; this._isAtBreakpoint = false; this.eventsShouldFire = true; this.areMultiplePropertiesChanging = false; this.needsRefresh = false; } Object.defineProperty(EmulationRemoteController.prototype, "shouldPerformRefreshes", { get: function () { return !this._isAtBreakpoint; }, enumerable: true, configurable: true }); EmulationRemoteController.prototype.awaitRunningPromises = function () { if (this._runningPromises.length > 0) { var promises = this._runningPromises; this._runningPromises = []; return Plugin.Promise.join(promises); } else { return Plugin.Promise.wrap({}); } }; EmulationRemoteController.prototype.setPromise = function (promise, name) { if (!this.areMultiplePropertiesChanging) { this._runningPromises = []; } promise.__debugname = name; this._runningPromises.push(promise); }; EmulationRemoteController.prototype.clearPromises = function () { this._runningPromises = []; }; EmulationRemoteController.prototype.onIsAtBreakpointChanged = function (isAtBreakpoint) { this._isAtBreakpoint = isAtBreakpoint; }; EmulationRemoteController.prototype.onDocumentModeChanged = function (mode) { var _this = this; if (!this.eventsShouldFire) { return; } if (mode === Emulation.EmulationModel.DEFAULT_VALUE) { mode = null; } this.needsRefresh = !this.shouldPerformRefreshes; this.setPromise(new Plugin.Promise(function (doneCallback) { _this._proxy.callRemote("setDocumentModeOverride", [mode, _this.shouldPerformRefreshes], doneCallback); }), "onDocumentModeChanged"); }; EmulationRemoteController.prototype.onBrowserModeChanged = function (mode) { var _this = this; if (!this.eventsShouldFire) { return; } this.needsRefresh = false; this.setPromise(new Plugin.Promise(function (doneCallback) { _this._proxy.callRemote("setBrowserMode", [_this.getStringFromBrowserMode(mode)], doneCallback); }), "onBrowserModeChanged"); }; EmulationRemoteController.prototype.onUserAgentStringChanged = function (uaString) { var _this = this; if (!this.eventsShouldFire) { return; } this.needsRefresh = true; this.setPromise(new Plugin.Promise(function (doneCallback) { var performRefresh = true; if (uaString === Emulation.EmulationModel.DEFAULT_VALUE) { _this._proxy.callRemote("setUserAgentStringToDefault", [false], doneCallback); } else if (uaString !== Emulation.EmulationModel.CUSTOM_VALUE) { _this._proxy.callRemote("setCurrentUserAgentString", [uaString, false], doneCallback); } else { doneCallback(); } }), "onUserAgentStringChanged"); }; EmulationRemoteController.prototype.onCustomUserAgentStringChanged = function (uaString) { var _this = this; this.needsRefresh = !this.shouldPerformRefreshes; var promise = new Plugin.Promise(function (doneCallback) { F12.Tools.Utility.Assert.isFalse(uaString === "", "Expected a non-empty custom UA string"); _this._proxy.callRemote("storeAndSetCustomUserAgentString", [uaString, _this.shouldPerformRefreshes], doneCallback); }); this.setPromise(promise, "onCustomUserAgentStringChanged"); return promise; }; EmulationRemoteController.prototype.onRefreshNeeded = function () { var _this = this; this.needsRefresh = false; if (!this.eventsShouldFire) { return; } if (this.shouldPerformRefreshes) { this.setPromise(new Plugin.Promise(function (doneCallback) { _this._proxy.callRemote("refresh", [], doneCallback); }), "onRefreshNeeded"); } }; EmulationRemoteController.prototype.onFlushPendingRefreshes = function () { if (this.needsRefresh) { this.onRefreshNeeded(); } }; EmulationRemoteController.prototype.onResolutionSetToDefault = function () { var _this = this; this.setPromise(new Plugin.Promise(function (doneCallback) { _this._proxy.callRemote("resetViewportSizeToDefault", [], doneCallback); }), "onResolutionSetToDefault"); }; EmulationRemoteController.prototype.onResolutionViewportSizeSet = function (displaySize, width, height) { var _this = this; this.setPromise(new Plugin.Promise(function (doneCallback) { _this._proxy.callRemote("setViewportSize", [displaySize, width, height], doneCallback); }), "onResolutionViewportSizeSet"); }; EmulationRemoteController.prototype.getStringFromBrowserMode = function (mode) { if (mode === 0 /* Desktop */) { return "Desktop"; } else if (mode === 1 /* Phone */) { return "Mobile"; } else if (mode === 2 /* Enterprise */) { return "Enterprise"; } throw new Error("Got unknown browser mode value"); }; return EmulationRemoteController; })(); Emulation.EmulationRemoteController = EmulationRemoteController; })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // validatedTextbox.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { (function (ValidationStatus) { ValidationStatus[ValidationStatus["Unknown"] = 0] = "Unknown"; ValidationStatus[ValidationStatus["Okay"] = 1] = "Okay"; ValidationStatus[ValidationStatus["Error"] = 2] = "Error"; })(Emulation.ValidationStatus || (Emulation.ValidationStatus = {})); var ValidationStatus = Emulation.ValidationStatus; var ValidatedTextbox = (function (_super) { __extends(ValidatedTextbox, _super); function ValidatedTextbox(parentElement, validationCallback, useLocaleString, templateName) { var _this = this; _super.call(this, templateName); parentElement.appendChild(this.rootElement); this._validationCallback = validationCallback; this._useLocaleString = useLocaleString; this._textbox = this.findElement("validatedTextbox"); this._errorIcon = this.findElement("validationErrorIcon"); this._errorHelper = this.findElement("validationErrorHelper"); this._textbox.setAttribute("aria-describedby", this._errorHelper.id); this._textbox.addEventListener("change", function (ev) { return _this.onChange(ev); }); this._textbox.addEventListener("keydown", function (ev) { return _this.onKeydown(ev); }); this._textbox.addEventListener("blur", function (ev) { return _this.onBlur(ev); }); this.clearValidationStatus(1 /* Okay */); } Object.defineProperty(ValidatedTextbox.prototype, "disabled", { get: function () { return this._textbox.disabled; }, set: function (value) { this._textbox.disabled = value; }, enumerable: true, configurable: true }); Object.defineProperty(ValidatedTextbox.prototype, "text", { get: function () { return this._textbox.value; }, set: function (value) { this._textbox.value = value; }, enumerable: true, configurable: true }); Object.defineProperty(ValidatedTextbox.prototype, "validationStatus", { get: function () { return this._validationStatus.status; }, enumerable: true, configurable: true }); Object.defineProperty(ValidatedTextbox.prototype, "validatedValue", { get: function () { return this._validationStatus.validatedValue; }, enumerable: true, configurable: true }); Object.defineProperty(ValidatedTextbox.prototype, "textCommitted", { get: function () { return this._textCommitted; }, set: function (handler) { this._textCommitted = handler; }, enumerable: true, configurable: true }); Object.defineProperty(ValidatedTextbox.prototype, "valueCommitted", { get: function () { return this._valueCommitted; }, set: function (handler) { this._valueCommitted = handler; }, enumerable: true, configurable: true }); Object.defineProperty(ValidatedTextbox.prototype, "validationFailed", { get: function () { return this._validationFailed; }, set: function (handler) { this._validationFailed = handler; }, enumerable: true, configurable: true }); Object.defineProperty(ValidatedTextbox.prototype, "focusableElement", { get: function () { return this._textbox; }, enumerable: true, configurable: true }); ValidatedTextbox.prototype.getValidationInfo = function () { return this._validationStatus; }; ValidatedTextbox.prototype.commitEdits = function () { this.validateAndCommit(); }; ValidatedTextbox.prototype.tryValidate = function () { this.validateAndCommit(false); return this.validationStatus === 1 /* Okay */; }; ValidatedTextbox.prototype.onChange = function (ev) { this.validateAndCommit(); }; ValidatedTextbox.prototype.onKeydown = function (ev) { if (ev.keyCode === 13 /* Enter */) { this.validateAndCommit(); ev.preventDefault(); } else { this.clearValidationStatus(); } }; ValidatedTextbox.prototype.onBlur = function (ev) { if (this.validationStatus === 0 /* Unknown */) { this.validateAndCommit(); } }; ValidatedTextbox.prototype.clearValidationStatus = function (status) { if (typeof status === "undefined") { status = 0 /* Unknown */; } this._validationStatus = { status: status, tooltip: "" }; this._errorIcon.style.display = "none"; this._errorHelper.innerText = ""; }; ValidatedTextbox.prototype.validateAndCommit = function (commitValue) { var _this = this; if (typeof commitValue === "undefined") { commitValue = true; } try { this._validationStatus = this._validationCallback(this._textbox.value); } catch (e) { this._validationStatus = { status: 2 /* Error */, tooltip: "" }; } if (this._validationStatus.status === 1 /* Okay */) { this._errorIcon.style.display = "none"; this._errorHelper.innerText = ""; if (this._useLocaleString) { if (this.validatedValue && this.validatedValue.toLocaleString() !== this.text) { this.text = this.validatedValue.toLocaleString(); } } else { if (this.validatedValue && this.validatedValue.toString() !== this.text) { this.text = this.validatedValue.toString(); } } if (commitValue) { if (this.textCommitted) { this.textCommitted(this.text); } if (this.valueCommitted) { this.valueCommitted(this.validatedValue); } } } else { this._errorIcon.onmouseover = function (event) { Plugin.Tooltip.show({ content: _this._validationStatus.tooltip }); return true; }; this._errorIcon.style.display = "inline"; this._errorHelper.innerText = this._validationStatus.tooltip; if (this.validationFailed) { this.validationFailed(); } } }; return ValidatedTextbox; })(Common.Controls.Legacy.TemplateControl); Emulation.ValidatedTextbox = ValidatedTextbox; })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // emulation.ts var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { var EmulationWindow = (function () { function EmulationWindow(diagnosticsBridge) { var _this = this; this._traceWriter = new Common.TraceWriter(); this.traceWriter.raiseEvent(601 /* Emulation_Window_Create_Start */); this._handshakeCallbacks = []; Common.ToolWindowHelpers.registerErrorComponent("Emulation", this.onError.bind(this)); this._proxy = new Proxy(diagnosticsBridge); this._remote = new Emulation.EmulationRemoteController(this._proxy); this._diagnosticsBridge = diagnosticsBridge; var jsonText = F12.Host.Impl.Storage.readPluginFile("emulation.json"); this._config = JSON.parse(jsonText); this.initializeModel(); this._toolbar = new Common.Controls.ToolbarControl("Common.defaultToolbarTemplate"); this._modeSection = new Common.Controls.Panel("Emulation.emulationModeControls"); this._modeSection.model = this._model; document.getElementById("modeSection").appendChild(this._modeSection.rootElement); this._displayBasicSection = new Common.Controls.Panel("Emulation.emulationBasicDisplayControls"); this._displayBasicSection.model = this._model; document.getElementById("displayBasicSubSection").appendChild(this._displayBasicSection.rootElement); this._toolbar.title = this.loadLocalizedString("EmulationToolLabelText"); this._toolbar.model = this._model; this._toolbar.panelTemplateId = "Emulation.emulationButtonPanel"; document.getElementById("toolbar").appendChild(this._toolbar.rootElement); this._customDisplaySizeContainer = new Common.Controls.Legacy.Control(document.getElementById("customDisplaySizeSection")); this._displaySizeInput = new Emulation.ValidatedTextbox(document.getElementById("displaySizeControlRoot"), function (value) { return _this.validateDisplaySize(value); }, true, "validatedTextboxTemplate"); this._displayWidthInput = new Emulation.ValidatedTextbox(document.getElementById("displayWidthControlRoot"), function (value) { return _this.validateDisplayDimension(value, Emulation.EmulationModel.MAX_VIEWPORT_WIDTH_IN_PX, "EmulationLargeResolutionWidthError"); }, false, "validatedTextboxTemplate"); this._displayHeightInput = new Emulation.ValidatedTextbox(document.getElementById("displayHeightControlRoot"), function (value) { return _this.validateDisplayDimension(value, Emulation.EmulationModel.MAX_VIEWPORT_HEIGHT_IN_PX, "EmulationLargeResolutionHeightError"); }, false, "validatedTextboxTemplate"); this._geolocationOffButton = new Common.Controls.Legacy.RadioButton(document.getElementById("gpsOff")); this._geolocationOnButton = new Common.Controls.Legacy.RadioButton(document.getElementById("gpsOn")); this._geolocationOnNoSignalButton = new Common.Controls.Legacy.RadioButton(document.getElementById("gpsOnNoSignal")); this._gpsLatitudeInput = new Emulation.ValidatedTextbox(document.getElementById("latitudeControlRoot"), function (value) { return _this.validateCoordinate(value, Emulation.EmulationModel.MIN_LATITUDE, Emulation.EmulationModel.MAX_LATITUDE, "EmulationLatitudeError"); }, true, "validatedTextboxTemplate"); this._gpsLongitudeInput = new Emulation.ValidatedTextbox(document.getElementById("longitudeControlRoot"), function (value) { return _this.validateCoordinate(value, Emulation.EmulationModel.MIN_LONGITUDE, Emulation.EmulationModel.MAX_LONGITUDE, "EmulationLongitudeError"); }, true, "validatedTextboxTemplate"); this.initializeView(); this._modeSection.getNamedElement("documentModeSelector").focus(); if (!Plugin.F12) { window.addEventListener("keydown", function (e) { if (e.keyCode === 9 /* Tab */ && !e.altKey && !e.ctrlKey) { var activeElement = document.activeElement; var firstFocusableElement = _this._modeSection.getNamedElement("documentModeSelector"); var lastFocusableElement; if (_this._model.geolocationState === 0 /* Off */) { lastFocusableElement = _this._geolocationOffButton.focusableElement; } else { lastFocusableElement = _this._gpsLongitudeInput.focusableElement; } if (e.shiftKey) { if (activeElement === firstFocusableElement) { lastFocusableElement.focus(); e.preventDefault(); return false; } } else { if (activeElement === lastFocusableElement) { firstFocusableElement.focus(); e.preventDefault(); return false; } } } }); } this._isInitialHandshake = true; this._model.isAtBreakpoint = false; this._currentUrl = ""; this._proxy.initializeProxy(function (msg) { return _this.onMessage(msg); }, function () { return _this.onAttach(); }, function () { return _this.onDetach(); }, function () { return _this.onBreak(); }, function () { return _this.onRun(); }); Common.ToolWindowHelpers.initializeToolWindow(); this._toolbar.addClickHandlerToButton("resetButton", function () { return _this.resetAllEmulationSettings(); }); this._modeSection.addClickHandlerToButton("documentModeInfoButton", function () { return _this.onDocumentModeInfoClicked(); }); this._modeSection.addClickHandlerToButton("documentModeOriginButton", function () { return _this.onDocumentModeOriginClicked(); }); this._modeSection.addClickHandlerToButton("deleteUaStringButton", function () { return _this.onRemoveCustomUserAgentString(); }); this._displaySizeInput.valueCommitted = function (value) { return _this.onCustomDisplayFieldsCommitted(); }; this._displayWidthInput.valueCommitted = function (value) { return _this.onCustomDisplayFieldsCommitted(); }; this._displayWidthInput.validationFailed = function () { return _this.onDisplayDimensionValidationFailure(); }; this._displayHeightInput.valueCommitted = function (value) { return _this.onCustomDisplayFieldsCommitted(); }; this._displayHeightInput.validationFailed = function () { return _this.onDisplayDimensionValidationFailure(); }; this._geolocationOffButton.check = function () { return _this.onGeolocationStateChanged(0 /* Off */); }; this._geolocationOnButton.check = function () { return _this.onGeolocationStateChanged(1 /* On */); }; this._geolocationOnNoSignalButton.check = function () { return _this.onGeolocationStateChanged(2 /* OnNoSignal */); }; this._gpsLatitudeInput.valueCommitted = function (value) { return _this.onLatitudeCommitted(value); }; this._gpsLongitudeInput.valueCommitted = function (value) { return _this.onLongitudeCommitted(value); }; this._model.customResolutionFieldsNeedCommit.addHandler(function () { return _this.onCustomDisplayFieldsCommitted(); }); if (Plugin.F12) { Plugin.F12.addEventListener("browsershortcut", function (e) { if ((e.ctrlKey && e.shiftKey && !e.altKey && e.keyCode === 76 /* L */)) { _this.resetAllEmulationSettings(); } }); Plugin.F12.Communications.registerMethodHandler("getemulationquickaccessmenuitems", function (x, y) { return _this.onGetEmulationQuickAccessMenuItems(x, y); }); Plugin.F12.Communications.registerMethodHandler("setemulationdocmode", function (mode) { return _this.onSetEmulationDocMode(mode); }); } this._model.propertyChanged.addHandler(function (propertyChanged) { if (propertyChanged === Emulation.EmulationModel.OrientationProperty || propertyChanged === Emulation.EmulationModel.ResolutionProperty) { _this.updateView(); } }); if (Plugin.F12) { Common.NavigationUtilities.registerNavigationFrames([ Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body, function () { return _this._toolbar.getActiveElement(); }) ]); Common.NavigationUtilities.registerFocusHandlers(Plugin.F12.PluginId.Emulation); } this._model.propertiesResolved.addHandler(function () { if (_this._allowSavingSettings) { _this.saveEmulationSettings(); } }); this._model.documentModeOriginTooltip = EmulationWindow.DOCMODE_ORIGIN_LINK; if (Plugin.F12) { this._model.settingsHaveBeenModifiedChanged.addHandler(function (state) { return _this.onSettingsHaveBeenModifiedChanged(state); }); } this.traceWriter.raiseEvent(602 /* Emulation_Window_Create_Stop */); } Object.defineProperty(EmulationWindow.prototype, "traceWriter", { get: function () { return this._traceWriter; }, enumerable: true, configurable: true }); EmulationWindow.getBrowserModeFromString = function (mode) { if (mode === "Desktop") { return 0 /* Desktop */; } else if (mode === "Mobile") { return 1 /* Phone */; } else if (mode === "Enterprise") { return 2 /* Enterprise */; } throw new Error("Got unexpected browser mode string: " + mode); }; EmulationWindow.buildDocumentModeInfoLink = function (currentUrl, docModeInfo) { var infoUrl = EmulationWindow.DOCMODE_INFO_LINK + "&url=" + encodeURIComponent(currentUrl) + "&mode=" + docModeInfo; return infoUrl; }; EmulationWindow.handshakeBrowserModeInfo = function (shell, currentBrowserMode) { shell._model.browserMode = EmulationWindow.getBrowserModeFromString(currentBrowserMode); if (shell._model.browserMode === 2 /* Enterprise */ || (Plugin.F12 && Plugin.F12.isEnterpriseModeMenuOptionEnabled())) { shell._model.browserModes = shell._model.allBrowserModes; } else { shell._model.browserModes = shell._model.allBrowserModes.slice(0, 2); if (shell._model.browserMode === 2 /* Enterprise */) { shell._model.browserMode = 0 /* Desktop */; } } }; EmulationWindow.handshakeDocumentModeInfo = function (shell, documentModeState) { var defaultDocumentMode; if (documentModeState.defaultMode > EmulationWindow.EMULATION_MODE_MAX) { defaultDocumentMode = EmulationWindow.EMULATION_MODE_EDGE; } else { defaultDocumentMode = documentModeState.defaultMode.toString(); } shell._model.documentModes.clear(); for (var i = 0; i < EmulationWindow.EMULATION_MODES.length; ++i) { var mode = EmulationWindow.EMULATION_MODES[i]; if (shell._model.browserMode === 2 /* Enterprise */ && parseInt(mode, 10) > EmulationWindow.EMULATION_ENTERPRISE_MODE_MAX) { continue; } if (documentModeState.overrideMode === defaultDocumentMode || mode !== defaultDocumentMode) { shell._model.documentModes.push({ value: mode, text: mode }); } if (mode === defaultDocumentMode) { shell._model.documentModes.push({ value: Emulation.EmulationModel.DEFAULT_VALUE, text: shell.makeDefaultDocumentModeText(mode) }); } } var shellDocumentMode; if (documentModeState.overrideMode !== null) { shell._model.documentMode = documentModeState.overrideMode; shell._model.documentModeInfo = shell._model.documentMode; shellDocumentMode = shell._model.documentModeInfo; } else { shell._model.documentMode = Emulation.EmulationModel.DEFAULT_VALUE; shell._model.documentModeInfo = defaultDocumentMode; shellDocumentMode = shell.makeDefaultDocumentModeText(defaultDocumentMode); } if (Plugin.F12) { Plugin.F12.Header.notifyEmulationStateUpdated(shell._model.documentMode !== Emulation.EmulationModel.DEFAULT_VALUE, shellDocumentMode, shell._model.documentModeInfo); } var numericDocMode = parseInt(shell._model.documentModeInfo); shell._model.geolocationControlsEnabled = isNaN(numericDocMode) || numericDocMode >= EmulationWindow.EMULATION_GEOLOCATION_MINIMUM_MODE; shell._model.documentModeInfoLink = shell.getCurrentDocumentModeInfoLink(); shell._model.documentModeOrigin = documentModeState.currentModeOrigin; }; EmulationWindow.handshakeUserAgentStringInfo = function (shell, currentUserAgentString, allUserAgentStrings) { var usingFallbackUAList = false; var nonCustomUAStrings = allUserAgentStrings.filter(function (value) { return value.category !== "custom"; }); if (nonCustomUAStrings.length === 0) { allUserAgentStrings = allUserAgentStrings.concat(EmulationWindow.EMULATION_UA_FALLBACK_STRINGS); usingFallbackUAList = true; } var foundCurrentUAString = EmulationWindow.buildUserAgentStringItemsList(shell, currentUserAgentString, allUserAgentStrings); var uaIsFallbackDefault = usingFallbackUAList && !foundCurrentUAString && currentUserAgentString.category === "unknown"; EmulationWindow.setupUserAgentStringModel(shell, currentUserAgentString, uaIsFallbackDefault); }; EmulationWindow.buildUserAgentStringItemsList = function (shell, currentUserAgentString, allUserAgentStrings) { shell._model.userAgentStrings.clear(); shell._model.userAgentStrings.push({ value: Emulation.EmulationModel.DEFAULT_VALUE, text: shell.loadLocalizedString("EmulationDefault") }); shell._model.customUserAgentStrings.clear(); shell._model.mobileUserAgentStrings = []; var unsortedCustomUaStrings = []; var foundCurrentUAString = false; for (var i = 0; i < allUserAgentStrings.length; ++i) { var uaString = allUserAgentStrings[i]; if (uaString.category === "custom") { unsortedCustomUaStrings.push({ text: uaString.value, date: uaString.name }); } else { if (currentUserAgentString.value === allUserAgentStrings[i].value) { foundCurrentUAString = true; } shell._model.userAgentStrings.push({ value: uaString.value, text: uaString.name }); if (uaString.value.indexOf(EmulationWindow.IEMOBILE_UA_SUBSTRING) >= 0) { shell._model.mobileUserAgentStrings.push(uaString.value); } } } shell._model.userAgentStrings.push({ value: Emulation.EmulationModel.CUSTOM_VALUE, text: shell.loadLocalizedString("EmulationCustom") }); shell._model.customUserAgentStrings.resetItems(unsortedCustomUaStrings.sort(function (a, b) { return b.date.localeCompare(a.date); })); return foundCurrentUAString; }; EmulationWindow.setupUserAgentStringModel = function (shell, currentUserAgentString, uaIsFallbackDefault) { var customWasSelected = shell._model.userAgentString === Emulation.EmulationModel.CUSTOM_VALUE; if (currentUserAgentString.category === "custom") { shell._model.userAgentString = Emulation.EmulationModel.CUSTOM_VALUE; shell._model.customUserAgentString = currentUserAgentString.value; } else if (!customWasSelected) { if (currentUserAgentString.category === "default" || uaIsFallbackDefault) { shell._model.userAgentString = Emulation.EmulationModel.DEFAULT_VALUE; shell._model.customUserAgentString = ""; } else { shell._model.userAgentString = currentUserAgentString.value; shell._model.customUserAgentString = ""; } } }; EmulationWindow.formatResolutionInfo = function (resolutionInfo) { var displayString = typeof resolutionInfo.displaySize === "number" ? resolutionInfo.displaySize.toLocaleString() : "" + resolutionInfo.displaySize; var itemText = displayString + "\" " + resolutionInfo.width + " x " + resolutionInfo.height; return itemText; }; EmulationWindow.prototype.onError = function (message, file, line, additionalInfo) { }; EmulationWindow.prototype.awaitRefreshHandshake = function () { var _this = this; return new Plugin.Promise(function (callback) { _this._handshakeCallbacks.push(callback); }); }; EmulationWindow.prototype.getInvariantNumberString = function (localeNumberString) { var nf = Plugin.Culture.NumberFormat; if (!nf || !nf.numberDecimalSeparator) { nf = { numberDecimalSeparator: "." }; } return localeNumberString.replace(nf.numberDecimalSeparator, "."); }; EmulationWindow.prototype.getCustomResolutionDisplaySize = function () { return this._displaySizeInput.text; }; EmulationWindow.prototype.setCustomResolutionDisplaySize = function (value, doneCallback) { this._displaySizeInput.text = value; this._displaySizeInput.tryValidate(); this.onCustomDisplayFieldsCommitted(doneCallback); }; EmulationWindow.prototype.setGpsState = function (enabled, signal, doneCallback) { var state; if (enabled) { if (signal) { state = 1 /* On */; } else { state = 2 /* OnNoSignal */; } } else { if (signal) { state = 3 /* Unknown */; } else { state = 0 /* Off */; } } this.onGeolocationStateChanged(state, doneCallback); }; EmulationWindow.prototype.getGpsState = function () { if (this._model.geolocationState === 0 /* Off */) { return { enabled: false, hasSignal: false }; } else if (this._model.geolocationState === 1 /* On */) { return { enabled: true, hasSignal: true }; } else if (this._model.geolocationState === 2 /* OnNoSignal */) { return { enabled: true, hasSignal: false }; } else { throw new Error("Gps is set to an unknown state"); } }; EmulationWindow.prototype.setGpsPosition = function (doneCallback, latitude, longitude) { if (latitude !== null && typeof latitude !== "undefined") { this._model.gpsLatitude = latitude; } if (longitude !== null && typeof longitude !== "undefined") { this._model.gpsLongitude = longitude; } this.updateView(); this.commitGpsCoordinates(doneCallback); }; EmulationWindow.prototype.getGpsPosition = function () { return { latitude: this._model.gpsLatitude, longitude: this._model.gpsLongitude }; }; EmulationWindow.prototype.getIEGpsPosition = function (callback) { this._proxy.callRemote("getGpsPosition", [], callback); }; EmulationWindow.prototype.getDisplaySizeValidationInfo = function () { return this._displaySizeInput.getValidationInfo(); }; EmulationWindow.prototype.getDisplayWidthValidationInfo = function () { return this._displayWidthInput.getValidationInfo(); }; EmulationWindow.prototype.getDisplayHeightValidationInfo = function () { return this._displayHeightInput.getValidationInfo(); }; EmulationWindow.prototype.getGpsLatitudeValidationInfo = function () { return this._gpsLatitudeInput.getValidationInfo(); }; EmulationWindow.prototype.getGpsLongitudeValidationInfo = function () { return this._gpsLongitudeInput.getValidationInfo(); }; EmulationWindow.prototype.loadLocalizedString = function (key) { var params = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { params[_i] = arguments[_i + 1]; } if (params && params.length > 0) { return Common.ToolWindowHelpers.loadString(key, params); } else { return Common.ToolWindowHelpers.loadString(key); } }; EmulationWindow.prototype.makeDefaultDocumentModeText = function (mode) { var defaultModeText = mode + " (" + this.loadLocalizedString("EmulationDefault") + ")"; return defaultModeText; }; EmulationWindow.prototype.resetAllEmulationSettings = function (doneCallback) { this._model.reset(); this.updateView(2 /* Display */ | 4 /* Geolocation */); this._proxy.callRemote("resetAllSettings", [], doneCallback); }; EmulationWindow.prototype.getCurrentDocumentModeInfoLink = function () { return EmulationWindow.buildDocumentModeInfoLink(this._currentUrl, this._model.documentModeInfo); }; EmulationWindow.prototype.setDocumentMode = function (documentMode, doneCallback) { var newMode = this._model.documentMode; for (var i = 0; i < this._model.documentModes.length; ++i) { var item = this._model.documentModes.getItem(i); if (item.text === documentMode) { newMode = item.value; } } this._model.documentMode = newMode; this._remote.awaitRunningPromises().done(doneCallback); }; EmulationWindow.prototype.getDocumentMode = function () { return this.getDocumentModeTextFromValue(this._model.documentMode); }; EmulationWindow.prototype.getIEDocumentMode = function (callback) { var _this = this; this._proxy.callRemote("getFullDocumentModeState", [], function (state) { var documentMode; if (state.overrideMode !== null) { documentMode = state.overrideMode; } else { documentMode = Emulation.EmulationModel.DEFAULT_VALUE; } callback(_this.getDocumentModeTextFromValue(documentMode)); }); }; EmulationWindow.prototype.getIEDefaultDocumentMode = function (callback) { this._proxy.callRemote("getDefaultDocumentMode", [], function (defaultDocumentMode) { callback("" + defaultDocumentMode); }); }; EmulationWindow.prototype.getDocumentModeOriginString = function () { return this._model.documentModeOrigin; }; EmulationWindow.prototype.getDocumentModeOriginLink = function () { return this._model.documentModeOriginTooltip; }; EmulationWindow.prototype.setBrowserMode = function (browserMode, doneCallback) { var foundBrowserMode = false; var newBrowserMode; for (var i = 0; i < this._model.browserModes.length; ++i) { if (this._model.browserModes[i].text === browserMode) { newBrowserMode = this._model.browserModes[i].value; foundBrowserMode = true; } } if (!foundBrowserMode) { throw new Error("Unknown browser mode value"); } this._model.browserMode = newBrowserMode; this._remote.awaitRunningPromises().done(doneCallback); }; EmulationWindow.prototype.getBrowserMode = function () { return this._model.browserModes[this._model.browserMode].text; }; EmulationWindow.prototype.getIEBrowserMode = function (callback) { var _this = this; this._proxy.callRemote("getBrowserMode", [], function (browserModeString) { var browserMode = EmulationWindow.getBrowserModeFromString(browserModeString); var displayString = _this._model.browserModes[browserMode].text; callback(displayString); }); }; EmulationWindow.prototype.setUserAgentString = function (uaString, doneCallback) { var _this = this; uaString = this.sanitizeString(uaString); var foundStringValue = false; var uaStringValue; for (var i = 0; i < this._model.userAgentStrings.length; ++i) { var item = this._model.userAgentStrings.getItem(i); if (item.text === uaString) { uaStringValue = item.value; foundStringValue = true; } } if (!foundStringValue) { throw new Error("Unknown user agent string value"); } var stringUpdated = this._model.userAgentString !== uaStringValue; this._model.userAgentString = uaStringValue; if (stringUpdated) { this._remote.awaitRunningPromises().then(function () { _this.fireHandshakeCallbacks(); }).done(doneCallback); } else { this.fireHandshakeCallbacks(); doneCallback(); } }; EmulationWindow.prototype.getUserAgentString = function () { return this.getUADisplayStringFromUAString(this._model.userAgentString); }; EmulationWindow.prototype.getIEUserAgentString = function (callback) { var _this = this; this._proxy.callRemote("getCurrentUserAgentString", [], function (uaString) { callback(_this.getUADisplayStringFromUAString(uaString)); }); }; EmulationWindow.prototype.getAllIEUserAgentStrings = function (callback) { this._proxy.callRemote("getAllUserAgentStrings", [], function (uaStringEntries) { callback(uaStringEntries); }); }; EmulationWindow.prototype.setCustomUserAgentString = function (value, doneCallback) { var _this = this; this._model.customUserAgentString = value; this._remote.awaitRunningPromises().then(function () { _this.fireHandshakeCallbacks(); }).done(doneCallback); }; EmulationWindow.prototype.deleteCustomUserAgentString = function (value, doneCallback) { var _this = this; this._model.customUserAgentString = value; this._remote.awaitRunningPromises().done(function () { _this.onRemoveCustomUserAgentString(doneCallback); }); }; EmulationWindow.prototype.getCustomUserAgentString = function () { return this._model.customUserAgentString; }; EmulationWindow.prototype.setOrientation = function (orientation, doneCallback) { var value = 2 /* Unknown */; for (var i = 0; i < this._model.orientations.length; ++i) { if (this._model.orientations.getItem(i).text.localeCompare(orientation) === 0) { value = this._model.orientations.getItem(i).value; break; } } var valueUpdated = this._model.orientation !== value; this._model.orientation = value; if (valueUpdated) { this._remote.awaitRunningPromises().done(doneCallback); } else { doneCallback(); } }; EmulationWindow.prototype.getOrientation = function () { for (var i = 0; i < this._model.orientations.length; ++i) { if (this._model.orientation === this._model.orientations.getItem(i).value) { return this._model.orientations.getItem(i).text; } } return "unknown"; }; EmulationWindow.prototype.getIEOrientation = function (callback) { this._proxy.callRemote("getOrientation", [], function (orientation) { callback(orientation); }); }; EmulationWindow.prototype.getResolutionList = function () { return this._config.categories.resolution.map(function (value, index, array) { return { displayString: EmulationWindow.formatResolutionInfo(value), width: value.width, height: value.height }; }); }; EmulationWindow.prototype.setResolution = function (resolution, doneCallback) { var resolutionValue; for (var i = 0; i < this._model.resolutions.length; ++i) { if (this._model.resolutions.getItem(i).text.localeCompare(resolution) === 0) { resolutionValue = this._model.resolutions.getItem(i).value; } } var valueUpdated = this._model.resolution !== resolutionValue; this._model.resolution = resolutionValue; if (valueUpdated) { this._remote.awaitRunningPromises().done(doneCallback); } else { doneCallback(); } }; EmulationWindow.prototype.getResolution = function () { var resolutionText; for (var i = 0; i < this._model.resolutions.length; ++i) { if (this._model.resolutions.getItem(i).value.localeCompare(this._model.resolution) === 0) { resolutionText = this._model.resolutions.getItem(i).text; } } return resolutionText; }; EmulationWindow.prototype.getIEResolution = function (callback) { this._proxy.callRemote("getResolution", [], function (resolution) { callback(resolution); }); }; EmulationWindow.prototype.getCustomResolutionWidth = function () { return this._displayWidthInput.text; }; EmulationWindow.prototype.getCustomResolutionHeight = function () { return this._displayHeightInput.text; }; EmulationWindow.prototype.setCustomResolutionWidth = function (value, doneCallback) { this._displayWidthInput.text = value; this._displayWidthInput.tryValidate(); this.onCustomDisplayFieldsCommitted(doneCallback); }; EmulationWindow.prototype.setCustomResolutionHeight = function (value, doneCallback) { this._displayHeightInput.text = value; this._displayHeightInput.tryValidate(); this.onCustomDisplayFieldsCommitted(doneCallback); }; EmulationWindow.prototype.initializeModel = function () { this._remote.eventsShouldFire = false; this._model = new Emulation.EmulationModel(this._remote, this._config); this._model.allBrowserModes = []; this._model.allBrowserModes[0 /* Desktop */] = { value: 0 /* Desktop */, text: this.loadLocalizedString("EmulationModesDesktopMode") }; this._model.allBrowserModes[1 /* Phone */] = { value: 1 /* Phone */, text: this.loadLocalizedString("EmulationModesPhoneMode") }; this._model.allBrowserModes[2 /* Enterprise */] = { value: 2 /* Enterprise */, text: this.loadLocalizedString("EmulationModesEnterpriseMode") }; this._model.orientation = 0 /* Landscape */; var orientations = []; orientations[0 /* Landscape */] = { value: 0 /* Landscape */, text: this.loadLocalizedString("EmulationOrientationLandscape") }; orientations[1 /* Portrait */] = { value: 1 /* Portrait */, text: this.loadLocalizedString("EmulationOrientationPortrait") }; this._model.orientations.resetItems(orientations); this._model.resolution = Emulation.EmulationModel.DEFAULT_VALUE; this._model.resolutions.clear(); this._model.geolocationState = 0 /* Off */; this._model.gpsLatitude = this._config.categories.simulateGPS.off.latitude; this._model.gpsLongitude = this._config.categories.simulateGPS.off.longitude; this._remote.eventsShouldFire = true; }; EmulationWindow.prototype.initializeView = function () { this._localizedControlInfo = [ { controlId: "displayLabel", stringId: "EmulationDisplaySection" }, { controlId: "enterCustomResolutionLabel", stringId: "EmulationCustomResolution" }, { controlId: "customDisplaySizeLabel", stringId: "EmulationDisplaySize", labeledElement: this._displaySizeInput.focusableElement }, { controlId: "displaySizeInchesLabel", stringId: "EmulationInches" }, { controlId: "customDisplayWidthLabel", stringId: "EmulationWidth", labeledElement: this._displayWidthInput.focusableElement }, { controlId: "widthPixelsLabel", stringId: "EmulationPixels" }, { controlId: "customDisplayHeightLabel", stringId: "EmulationHeight", labeledElement: this._displayHeightInput.focusableElement }, { controlId: "heightPixelsLabel", stringId: "EmulationPixels" }, { controlId: "geoLabel", stringId: "EmulationGeoLocationSection" }, { controlId: "gpsLabel", stringId: "EmulationSimulateGPS" }, { controlId: "gpsOffLabel", stringId: "EmulationGPSOff", labeledElement: this._geolocationOffButton.focusableElement, describerElementId: "gpsLabel" }, { controlId: "gpsOnLabel", stringId: "EmulationGPSOn", labeledElement: this._geolocationOnButton.focusableElement, describerElementId: "gpsLabel" }, { controlId: "gpsOnNoSignalLabel", stringId: "EmulationGPSOnNoSignal", labeledElement: this._geolocationOnNoSignalButton.focusableElement, describerElementId: "gpsLabel" }, { controlId: "latitudeLabel", stringId: "EmulationLatitude", labeledElement: this._gpsLatitudeInput.focusableElement }, { controlId: "longitudeLabel", stringId: "EmulationLongitude", labeledElement: this._gpsLongitudeInput.focusableElement } ]; this.localizeAllLabels(); this.updateView(); }; EmulationWindow.prototype.localizeAllLabels = function () { for (var i = 0; i < this._localizedControlInfo.length; ++i) { var info = this._localizedControlInfo[i]; this.localizeControl(info.controlId, info.stringId, info.labeledElement, info.describerElementId); } var resolutions = [ { value: Emulation.EmulationModel.DEFAULT_VALUE, text: this.loadLocalizedString("EmulationDefault") } ]; this._model.mobileResolutions = []; for (var i = 0; i < this._config.categories.resolution.length; ++i) { var itemInfo = this._config.categories.resolution[i]; var itemText = EmulationWindow.formatResolutionInfo(itemInfo); resolutions.push({ text: itemText, value: itemText, info: itemInfo }); if (itemInfo.displaySize < EmulationWindow.MAX_MOBILE_SCREEN_SIZE) { this._model.mobileResolutions.push(itemText); } } resolutions.push({ value: Emulation.EmulationModel.CUSTOM_VALUE, text: this.loadLocalizedString("EmulationCustom") }); this._model.resolutions.resetItems(resolutions); }; EmulationWindow.prototype.localizeControl = function (controlId, stringId, labeledElement, describerElementId) { var locString = this.loadLocalizedString(stringId); if (controlId !== "") { document.getElementById(controlId).innerText = locString; } if (typeof labeledElement !== "undefined") { if (controlId !== "") { labeledElement.setAttribute("aria-labelledby", controlId); } else { labeledElement.setAttribute("aria-label", locString); } } if (typeof describerElementId !== "undefined") { labeledElement.setAttribute("aria-describedby", describerElementId); } }; EmulationWindow.prototype.ensureValueIsNumber = function (value) { if (typeof (value) === "string") { return parseInt(value, 10); } else if (typeof (value) === "number") { return value; } throw new Error("Only strings and numbers are supported as arguments"); }; EmulationWindow.prototype.getStringFromBrowserMode = function (mode) { if (mode === 0 /* Desktop */) { return "Desktop"; } else if (mode === 1 /* Phone */) { return "Mobile"; } else if (mode === 2 /* Enterprise */) { return "Enterprise"; } throw new Error("Got unknown browser mode value"); }; EmulationWindow.prototype.onDocumentModeInfoClicked = function () { Plugin.F12.openBrowser(this.getCurrentDocumentModeInfoLink()); }; EmulationWindow.prototype.onDocumentModeOriginClicked = function () { Plugin.F12.openBrowser(this._model.documentModeOriginTooltip); }; EmulationWindow.prototype.onRemoveCustomUserAgentString = function (doneCallback) { var _this = this; var uaString = this._model.customUserAgentString; this._model.customUserAgentString = ""; this._remote.awaitRunningPromises().done(function () { _this._proxy.callRemote("removeCustomUserAgentString", [uaString, _this._remote.shouldPerformRefreshes], function (customUaStrings) { _this._model.customUserAgentStrings.resetItems(customUaStrings.map(function (value, index, array) { return { text: value.value, date: value.name }; })); _this.updateView(); if (doneCallback) { doneCallback(); } }); }); }; EmulationWindow.prototype.displayWidthHasValidValue = function () { return ((this._displayWidthInput.validationStatus === 1 /* Okay */) && (this._displayWidthInput.text !== "")); }; EmulationWindow.prototype.displayHeightHasValidValue = function () { return ((this._displayHeightInput.validationStatus === 1 /* Okay */) && (this._displayHeightInput.text !== "")); }; EmulationWindow.prototype.displayWidthAndHeightHaveValidValues = function () { if (this.displayWidthHasValidValue() && this.displayHeightHasValidValue()) { return true; } else { return false; } }; EmulationWindow.prototype.validateDisplaySize = function (value) { if (value === "") { return { status: 1 /* Okay */, tooltip: "" }; } var invariantValue = this.getInvariantNumberString(value); var n = parseFloat(invariantValue); if (isNaN(n)) { return { status: 2 /* Error */, tooltip: this.loadLocalizedString("EmulationNonNumericValueError") }; } else if (n > Emulation.EmulationModel.MAX_VIEWPORT_DISPLAY_SIZE) { return { status: 2 /* Error */, tooltip: this.loadLocalizedString("EmulationLargeDisplaySizeError", Emulation.EmulationModel.MAX_VIEWPORT_DISPLAY_SIZE) }; } else if (n > 0) { if (this.displayWidthAndHeightHaveValidValues()) { return { status: 1 /* Okay */, tooltip: "", validatedValue: n }; } else { return { status: 2 /* Error */, tooltip: this.loadLocalizedString("EmulationNoResolutionError") }; } } else { return { status: 2 /* Error */, tooltip: this.loadLocalizedString("EmulationResolutionLessThanZeroError") }; } }; EmulationWindow.prototype.validateDisplayDimension = function (value, maxValue, errorStringID) { if (value === "") { return { status: 1 /* Okay */, tooltip: "" }; } var n = parseInt(value, 10); if (isNaN(n)) { return { status: 2 /* Error */, tooltip: this.loadLocalizedString("EmulationInvalidValueResolutionError") }; } else if (n > maxValue) { return { status: 2 /* Error */, tooltip: this.loadLocalizedString(errorStringID, maxValue) }; } else if (n > 0) { return { status: 1 /* Okay */, tooltip: "", validatedValue: n }; } else { return { status: 2 /* Error */, tooltip: this.loadLocalizedString("EmulationResolutionLessThanZeroError") }; } }; EmulationWindow.prototype.onDisplayDimensionValidationFailure = function () { this._displaySizeInput.tryValidate(); }; EmulationWindow.prototype.getStringFromOrientation = function (orientation) { if (orientation === 0 /* Landscape */) { return "landscape"; } else if (orientation === 1 /* Portrait */) { return "portrait"; } throw new Error("Got unknown orientation value"); }; EmulationWindow.prototype.onCustomDisplayFieldsCommitted = function (doneCallback) { var orientationString = this.getStringFromOrientation(this._model.orientation); if (this.displayWidthAndHeightHaveValidValues()) { var displaySizeIsValid = this._displaySizeInput.tryValidate(); if (displaySizeIsValid) { if (this._displaySizeInput.validatedValue) { this._proxy.callRemote("setViewportSize", [ this._displaySizeInput.validatedValue, this._displayWidthInput.validatedValue, this._displayHeightInput.validatedValue, orientationString], doneCallback); } else { this._proxy.callRemote("setViewportWidthAndHeight", [ this._displayWidthInput.validatedValue, this._displayHeightInput.validatedValue, orientationString], doneCallback); } } else if (doneCallback) { doneCallback(); } } else { var displaySizeIsValid = this._displaySizeInput.tryValidate(); if (displaySizeIsValid) { if (this.displayWidthHasValidValue()) { this._proxy.callRemote("setViewportWidth", [ this._displayWidthInput.validatedValue, orientationString], doneCallback); } else if (this.displayHeightHasValidValue()) { this._proxy.callRemote("setViewportHeight", [ this._displayHeightInput.validatedValue, orientationString], doneCallback); } else if (doneCallback) { doneCallback(); } } else if (doneCallback) { doneCallback(); } } this._model.resolutionDisplaySize = this._displaySizeInput.validatedValue; this._model.resolutionWidth = this._displayWidthInput.validatedValue; this._model.resolutionHeight = this._displayHeightInput.validatedValue; }; EmulationWindow.prototype.onGeolocationStateChanged = function (state, doneCallback) { this._model.geolocationState = state; var profile = this._config.categories.simulateGPS.off; if (state === 0 /* Off */) { profile = this._config.categories.simulateGPS.off; } else if (state === 1 /* On */) { profile = this._config.categories.simulateGPS.on; } else if (state === 2 /* OnNoSignal */) { profile = this._config.categories.simulateGPS.onWithNoSignal; } else { Tools.Utility.Assert.fail("Geolocation is set to an invalid state"); } this.setGpsCoordinates(profile.latitude, profile.longitude, doneCallback); }; EmulationWindow.prototype.validateCoordinate = function (value, min, max, rangeErrorString) { if (value === "") { return { status: 1 /* Okay */, tooltip: "" }; } var invariantValue = this.getInvariantNumberString(value); var n = parseFloat(invariantValue); if (isNaN(n)) { return { status: 2 /* Error */, tooltip: this.loadLocalizedString("EmulationNonNumericValueError") }; } else if (n >= min && n <= max) { return { status: 1 /* Okay */, tooltip: "", validatedValue: n }; } else { return { status: 2 /* Error */, tooltip: this.loadLocalizedString(rangeErrorString) }; } }; EmulationWindow.prototype.onLatitudeCommitted = function (value) { this._model.gpsLatitude = value; this.commitGpsCoordinates(); }; EmulationWindow.prototype.onLongitudeCommitted = function (value) { this._model.gpsLongitude = value; this.commitGpsCoordinates(); }; EmulationWindow.prototype.commitGpsCoordinates = function (doneCallback) { if (this._model.geolocationState === 0 /* Off */) { this._proxy.callRemote("clearGpsSettings", [], doneCallback); doneCallback = null; } else { var hasSignal = this._model.geolocationState === 1 /* On */; if (this._gpsLatitudeInput.validationStatus === 1 /* Okay */ && this._gpsLongitudeInput.validationStatus === 1 /* Okay */) { if (typeof this._model.gpsLatitude !== "undefined" && this._model.gpsLatitude !== null) { if (typeof this._model.gpsLongitude !== "undefined" && this._model.gpsLongitude !== null) { this._proxy.callRemote("setGpsPosition", [this._model.gpsLatitude, this._model.gpsLongitude, hasSignal], doneCallback); doneCallback = null; } else { this._proxy.callRemote("setGpsLatitude", [this._model.gpsLatitude, hasSignal], doneCallback); doneCallback = null; } } else if (typeof this._model.gpsLongitude !== "undefined" && this._model.gpsLongitude !== null) { this._proxy.callRemote("setGpsLongitude", [this._model.gpsLongitude, hasSignal], doneCallback); doneCallback = null; } } else { this._proxy.callRemote("setGpsHasSignal", [hasSignal], doneCallback); } } if (doneCallback) { doneCallback(); } }; EmulationWindow.prototype.setGpsCoordinates = function (latitude, longitude, doneCallback) { this._model.gpsLatitude = latitude; this._model.gpsLongitude = longitude; this.updateView(); this.commitGpsCoordinates(doneCallback); }; EmulationWindow.prototype.updateView = function (updateFlags) { if (typeof updateFlags === "undefined") { updateFlags = Emulation.ViewUpdateFlags.All; } if ((updateFlags & 2 /* Display */) === 2 /* Display */) { if (this._model.resolution === Emulation.EmulationModel.CUSTOM_VALUE) { this._customDisplaySizeContainer.rootElement.style.display = "block"; } else { this._customDisplaySizeContainer.rootElement.style.display = "none"; this._displaySizeInput.text = ""; this._displayWidthInput.text = ""; this._displayHeightInput.text = ""; } } if ((updateFlags & 4 /* Geolocation */) === 4 /* Geolocation */) { this._geolocationOffButton.disabled = !this._model.geolocationControlsEnabled; this._geolocationOnButton.disabled = !this._model.geolocationControlsEnabled; this._geolocationOnNoSignalButton.disabled = !this._model.geolocationControlsEnabled; if (!this._model.geolocationControlsEnabled) { this._model.geolocationState = 0 /* Off */; this._model.gpsLatitude = this._config.categories.simulateGPS.off.latitude; this._model.gpsLongitude = this._config.categories.simulateGPS.off.longitude; } if (this._model.geolocationState === 0 /* Off */) { this._gpsLatitudeInput.disabled = true; this._gpsLongitudeInput.disabled = true; this._geolocationOffButton.checked = true; } else { this._gpsLatitudeInput.disabled = false; this._gpsLongitudeInput.disabled = false; if (this._model.geolocationState === 1 /* On */) { this._geolocationOnButton.checked = true; } else { this._geolocationOnNoSignalButton.checked = true; } } this._gpsLatitudeInput.text = this._model.gpsLatitude !== null && typeof this._model.gpsLatitude !== "undefined" ? this._model.gpsLatitude.toString() : ""; if (this._gpsLatitudeInput.tryValidate()) { this._model.gpsLatitude = this._gpsLatitudeInput.validatedValue; } this._gpsLongitudeInput.text = this._model.gpsLongitude !== null && typeof this._model.gpsLongitude !== "undefined" ? this._model.gpsLongitude.toString() : ""; if (this._gpsLongitudeInput.tryValidate()) { this._model.gpsLongitude = this._gpsLongitudeInput.validatedValue; } } }; EmulationWindow.prototype.onAttach = function () { this._isInitialHandshake = true; this._model.isAtBreakpoint = Plugin.F12.Debugger.getIsAtBreakpoint(); try { this._diagnosticsBridge.loadScriptInProc("../Common/messageThrottle.js"); this._diagnosticsBridge.loadScriptInProc("../Common/remoteHelpers.js"); this._diagnosticsBridge.loadScriptInProc("remote.js"); this._diagnosticsBridge.loadScriptInProc("remoteMain.js"); } catch (e) { return; } }; EmulationWindow.prototype.onDetach = function () { this._allowSavingSettings = false; this._remote.eventsShouldFire = false; this._model.isAtBreakpoint = false; this._remote.clearPromises(); this.fireHandshakeCallbacks(); this._currentUrl = ""; this._model.reset(); this._remote.eventsShouldFire = true; }; EmulationWindow.prototype.onBreak = function () { this._model.isAtBreakpoint = true; }; EmulationWindow.prototype.onRun = function () { this._model.isAtBreakpoint = false; }; EmulationWindow.prototype.onMessage = function (msg) { window.msWriteProfilerMark("ConsoleWindow:BeginOnMessage"); if (msg.data.substr(0, 10) === "Handshake:") { var connectionInfo = JSON.parse(msg.data.substring(10)); this.onHandshake(connectionInfo); this.fireHandshakeCallbacks(); if (Plugin.F12) { Plugin.F12.TraceWriter.markToolReady(); window.setImmediate(function () { Plugin.F12.notifyOnToolActivated(); }); } Common.ToolWindowHelpers.codeMarker(Common.ToolWindowHelpers.CodeMarkers.perfBrowserTools_DiagnosticsToolWindowsConsoleReady); } else { this._proxy.fireCallbacks(msg.data); } window.msWriteProfilerMark("ConsoleWindow:EndOnMessage"); }; EmulationWindow.prototype.fireHandshakeCallbacks = function () { var handshakeCallbacks = this._handshakeCallbacks; this._handshakeCallbacks = []; for (var i = 0; i < handshakeCallbacks.length; ++i) { handshakeCallbacks[i](); } }; EmulationWindow.prototype.onHandshake = function (connectionInfo) { var _this = this; this._allowSavingSettings = false; var shouldReadSettings = false; if (this._isInitialHandshake) { this._isInitialHandshake = false; shouldReadSettings = true; } else { this._displaySizeInput.commitEdits(); this._displayWidthInput.commitEdits(); this._displayHeightInput.commitEdits(); this._gpsLatitudeInput.commitEdits(); this._gpsLongitudeInput.commitEdits(); } var urlChanged = this._currentUrl !== connectionInfo.currentUrl; this._currentUrl = connectionInfo.currentUrl; EmulationWindow.handshakeBrowserModeInfo(this, connectionInfo.currentBrowserMode); EmulationWindow.handshakeDocumentModeInfo(this, connectionInfo.documentModeState); EmulationWindow.handshakeUserAgentStringInfo(this, connectionInfo.currentUserAgentString, connectionInfo.allUserAgentStrings); var readSettingsPromise; if (shouldReadSettings) { readSettingsPromise = this.readEmulationSettings(); } else { readSettingsPromise = Plugin.Promise.wrap({}); } readSettingsPromise.done(function () { _this.updateView(); }); this._allowSavingSettings = true; }; EmulationWindow.prototype.saveEmulationSettings = function () { Plugin.Settings.set(EmulationWindow.EMULATION_SETTINGS_FILE, this._model.save()); }; EmulationWindow.prototype.loadEmulationSettings = function () { return new Plugin.Promise(function (completed) { Plugin.Settings.get(EmulationWindow.EMULATION_SETTINGS_FILE).done(function (result) { completed(result); }, function (error) { completed({}); }); }, null); }; EmulationWindow.prototype.readEmulationSettings = function () { var _this = this; this._allowSavingSettings = false; return this.loadEmulationSettings().then(function (settings) { _this._model.load(settings); if (_this._model.resolution === Emulation.EmulationModel.CUSTOM_VALUE) { var validateTextFields = []; if (_this._model.resolutionDisplaySize) { _this._displaySizeInput.text = "" + _this._model.resolutionDisplaySize; validateTextFields.push(function () { return _this._displaySizeInput.tryValidate(); }); } if (_this._model.resolutionWidth) { _this._displayWidthInput.text = "" + _this._model.resolutionWidth; validateTextFields.push(function () { return _this._displayWidthInput.tryValidate(); }); } if (_this._model.resolutionHeight) { _this._displayHeightInput.text = "" + _this._model.resolutionHeight; validateTextFields.push(function () { return _this._displayHeightInput.tryValidate(); }); } validateTextFields.forEach(function (callback) { return callback(); }); } _this.commitGpsCoordinates(); _this.updateView(); _this._allowSavingSettings = true; }); }; EmulationWindow.prototype.onGetEmulationQuickAccessMenuItems = function (xPosition, yPosition) { var _this = this; var menuItems = this._model.documentModes.map(function (docMode) { return { id: docMode.value, label: docMode.text, type: 0 /* checkbox */, checked: (docMode.value === _this._model.documentMode) }; }); return menuItems; }; EmulationWindow.prototype.onSetEmulationDocMode = function (mode) { var newMode = JSON.parse(mode); if (this._model.documentMode !== newMode) { this.awaitRefreshHandshake(); } this._model.documentMode = newMode; var itemIndex = this._model.documentModes.map(function (value) { return value.value; }).indexOf(this._model.documentMode); if (itemIndex >= 0) { var item = this._model.documentModes.getItem(itemIndex); if (newMode != this._model.documentMode) { this.onSettingsHaveBeenModifiedChanged(true); } return true; } return false; }; EmulationWindow.prototype.getDocumentModeTextFromValue = function (value) { var displayString = "Invalid"; for (var i = 0; i < this._model.documentModes.length; ++i) { var item = this._model.documentModes.getItem(i); if (item.value === value) { displayString = item.text; } } return displayString; }; EmulationWindow.prototype.getUADisplayStringFromUAString = function (uaString) { uaString = this.sanitizeString(uaString); for (var i = 0; i < this._model.userAgentStrings.length; ++i) { var item = this._model.userAgentStrings.getItem(i); if (item.value === uaString) { return item.text; } } for (var i = 0; i < this._model.customUserAgentStrings.length; ++i) { var customString = this._model.customUserAgentStrings.getItem(i); if (customString.text === uaString) { return customString.text; } } return this._model.userAgentStrings.getItem(0).text; }; EmulationWindow.prototype.sanitizeString = function (inputString) { var nullIdx = inputString.indexOf("\0"); if (nullIdx >= 0) { return inputString.substr(0, nullIdx); } return inputString; }; EmulationWindow.prototype.onSettingsHaveBeenModifiedChanged = function (state) { Plugin.F12.Header.notifyEmulationStateUpdated(this._model.settingsHaveBeenModified, this._model.documentMode, this._model.documentModeInfo); }; EmulationWindow.FWLINK_PREFIX = "http://go.microsoft.com/fwlink/?LinkID="; EmulationWindow.DOCMODE_INFO_LINK = EmulationWindow.FWLINK_PREFIX + "286288"; EmulationWindow.DOCMODE_ORIGIN_LINK = EmulationWindow.FWLINK_PREFIX + "389082"; EmulationWindow.IEMOBILE_UA_SUBSTRING = "IEMobile"; EmulationWindow.MAX_MOBILE_SCREEN_SIZE = 5; EmulationWindow.EMULATION_MODE_MAX = 10; EmulationWindow.EMULATION_ENTERPRISE_MODE_MAX = 8; EmulationWindow.EMULATION_GEOLOCATION_MINIMUM_MODE = 8; EmulationWindow.EMULATION_SETTINGS_FILE = "EmulationSettings.json"; EmulationWindow.EMULATION_MODE_EDGE = "Edge"; EmulationWindow.EMULATION_MODES = [ "Edge", "10", "9", "8", "7", "5" ]; EmulationWindow.EMULATION_UA_FALLBACK_STRINGS = [ { category: "desktop", name: "Internet Explorer 10", value: "Mozilla / 5.0(compatible; MSIE 10.0; Windows NT 6.2; Trident / 6.0)" }, { category: "desktop", name: "Internet Explorer 9", value: "Mozilla / 5.0(compatible; MSIE 9.0; Windows NT 6.1; Trident / 5.0)" }, { category: "desktop", name: "Internet Explorer 8", value: "Mozilla / 4.0(compatible; MSIE 8.0; Windows NT 6.1; Trident / 4.0)" }, { category: "desktop", name: "Internet Explorer 7", value: "Mozilla / 4.0(compatible; MSIE 7.0; Windows NT 6.0)" }, { category: "desktop", name: "Internet Explorer 6", value: "Mozilla / 4.0(compatible; MSIE 6.0; Windows NT 5.1)" }, { category: "non-desktop", name: "IE10 - Windows Phone 8", value: "Mozilla / 5.0(compatible; MSIE 10.0; Windows Phone 8.0; Trident / 6.0; IEMobile / 10.0; ARM; Touch)" }, { category: "non-desktop", name: "IE9 - Windows Phone 7", value: "Mozilla / 5.0(compatible; MSIE 9.0; Windows Phone OS 7.5; Trident / 5.0; IEMobile / 9.0)" }, { category: "non-desktop", name: "IE - Xbox One", value: "Mozilla / 5.0(compatible; MSIE 10.0; Windows NT 6.2; Trident / 6.0; Xbox; Xbox One)" }, { category: "non-desktop", name: "IE - Xbox 360", value: "Mozilla / 5.0(compatible; MSIE 9.0; Windows NT 6.1; Trident / 5.0; Xbox)" }, { category: "other", name: "Google Chrome", value: "Mozilla / 5.0(Windows NT 6.2) AppleWebKit / 537.36(KHTML, like Gecko) Chrome / 28.0.1500.95 Safari / 537.36" }, { category: "other", name: "Mozilla Firefox", value: "Mozilla / 5.0(Windows NT 6.2; rv: 12.0) Gecko / 20100101 Firefox / 23.0" }, { category: "other", name: "Opera", value: "Mozilla / 5.0(Windows NT 6.2) AppleWebKit / 537.36(KHTML, like Gecko) Chrome / 28.0.1500.95 Safari / 537.36 OPR / 15.0.1147.153" }, { category: "other", name: "Apple Safari (iPad)", value: "Mozilla / 5.0(iPad; CPU OS 6_0 like Mac OS X) AppleWebKit / 536.26(KHTML, like Gecko) Version / 6.0 Mobile / 10A5355d Safari / 8536.25" }, { category: "other", name: "Bing Bot", value: "Mozilla / 5.0(compatible; bingbot / 2.0; +http://www.bing.com/bingbot.htm)" } ]; return EmulationWindow; })(); Emulation.EmulationWindow = EmulationWindow; })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); // app.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { var EmulationApp = (function (_super) { __extends(EmulationApp, _super); function EmulationApp() { _super.apply(this, arguments); } EmulationApp.prototype.onStartup = function () { var _this = this; Plugin.addEventListener("pluginready", function () { if (Plugin && Plugin.Tooltip) { Plugin.Tooltip.defaultTooltipContentToHTML = false; } _this.emulation = new Emulation.EmulationWindow(_this.diagnosticsBridge); if (_this.onEmulationAppLoaded) { _this.onEmulationAppLoaded(); } }); }; return EmulationApp; })(Common.App); Emulation.EmulationApp = EmulationApp; Emulation.App = new EmulationApp(); })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); { "profileSelection": "default", "categories": { "resolution": [ { "displaySize": 4.0, "width": 800, "height": 480 }, { "displaySize": 4.3, "width": 800, "height": 480 }, { "displaySize": 4.3, "width": 1280, "height": 720 }, { "displaySize": 4.5, "width": 1280, "height": 768 }, { "displaySize": 10.6, "width": 1024, "height": 768 }, { "displaySize": 10.6, "width": 1366, "height": 768 }, { "displaySize": 10.6, "width": 1920, "height": 1080 }, { "displaySize": 10.6, "width": 2560, "height": 1440 }, { "displaySize": 12.0, "width": 1280, "height": 800 }, { "displaySize": 23.0, "width": 1920, "height": 1080 }, { "displaySize": 27.0, "width": 2560, "height": 1440 } ], "simulateGPS": { "off": { "latitude": null, "longitude": null }, "on": { "latitude": 47.6448, "longitude": -122.2985 }, "onWithNoSignal": { "latitude": null, "longitude": null } } }, "userProfiles": [ { "profileName": "Profile1", "browserProfile": "EmulationModesPhoneMode", "userAgentString": "xxx", "orientation": "EmulationDisplayPortrait", "resolution": { "displaySize": 10.6, "width": 1024, "height": 768 }, "simulateGPS": { "state": "on", "location": { "latitude": 47.6097, "longitude": -122.3331 } } } ] }PNG  IHDRr ߔ pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FQIDATxڼMMa9sga42ac(yKBfP,PBd! J!ElXdF,,䵰0Čqϵ\;s_̯y=9Em]PIH C7ˤ-lĴ "b'vHEa|I2r BMq&RrF6W pTlwQg{-NnNq+lÁIJGmֆء9M2Lsp zJ?TЖغ2_nY.W\ 37bFTJƋeH&eպ? V2K5@#ړԺ]6"ی?>VyVVybZ4o*i侰ЃUk򷨖ĒOC7 )Q-ӳh$׍)|9*e^0=|moJCj4x4뺥&!}LТ.g*c':gf&>Vέ*k=jJtfJˊc8)qcg'Q)'0cnB[Q+[T˕x1}(cĈ11)'cd#%p2FQbNZ8ƈJ' 56Ӽе3NHDsdO1F(rl1F؏1޷nCؙ1wƈI cxXƈ#ca}]c4th%}vY,Y4 EC'upC0#q3tk0F=F :H4#O9#Q m1F9oQ-W-(p#Nƨf ƨ~cdePf0F;#k#*c$.LB2F8#͑1? L`ʱ^c/ضƈ#{`}!2FLl#% 1F,2FQ46 hDLIENDB`PNG  IHDR$l  pHYs+IDATx^An1C7@ 'hL7$tIr-P7ss`^0z[V~Yʓ}'Ѫ,a!%PThZ' .ØtkGXV Kfwnj'́^0^>2?ejHmRit LFsedL  wFR TGwiCVޏ:*0C#kvsHtg;#=d s2,Lو0%HNlV6'̮ &ƖSBDKi r>#(&ِ&%{]mTK^6Dc䆹vczswX#5'c1Ռc$#8F18c$?P:F`w0m8T(P%31}* q$i#+,L<cڞ@qQV `TL1*0~hhtLIx(PQJCPJ@c\֪c8F#7 #{c99F#0VHEf# i1FuG# 1ۼcDu@q*/ TɌuY]^lD&L<&1q:F $eeFuq8FȔwuycL֮4uIENDB`{ "start_url": "emulation.html", "domain": "http://microsoft.com", "name": "Emulation", "version": "1.0", "f12": { "localized_tab_resource": "EmulationTitle", "localized_tooltip_id": 818, "resource_aliases" : { "Common": { "is_default" : true } }, "themed_images": { "f12-emulation-image-info-button": { "bitmap_source": "infoButton.png", "background_color": "plugin-background-color" }, "f12-emulation-image-delete": { "bitmap_source": "..\\common\\images\\i_delete.png", "background_color": "plugin-background-color" }, "f12-emulation-image-persist-settings": { "bitmap_source": "i_persistSettings.png", "background_color": "plugin-background-color" }, "f12-emulation-image-reset-settings": { "bitmap_source": "i_resetSettings.png", "background_color": "plugin-background-color" } } }, "file_aliases": { "PerformanceTraceExtension": { "path": "PerformanceTrace.dll", "optional": true } } } var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { var RemoteEmulation = (function () { function RemoteEmulation() { } RemoteEmulation.prototype.initialize = function () { var _this = this; try { if (typeof browser !== "undefined") { browser.addEventListener("beforeScriptExecute", function (dispatchWindow) { return _this.onBeforeScriptExecute(dispatchWindow); }); } } catch (ex) { } this._browserModeIsDirty = false; this._documentModeIsDirty = false; this._userAgentStringIsDirty = false; remoteHelpers.initialize("EmulationPort", function () { return _this.initializePage(); }, "__BROWSERTOOLS_EMULATIONTOOLS_ADDED", function () { return _this.onDetach(); }); }; RemoteEmulation.prototype.initializePage = function () { try { this.addRemotePageFunctions(browser.document.parentWindow); var connectionInfo = {}; connectionInfo.currentBrowserMode = this.getBrowserMode(); connectionInfo.documentModeState = this.getFullDocumentModeState(); connectionInfo.allUserAgentStrings = this.getAllUserAgentStrings(); var defaultView = Common.RemoteHelpers.getDefaultView(browser.document); connectionInfo.currentUrl = defaultView.location.href; var currentUserAgentString = this.getCurrentUserAgentString(); var nonCustomUAStrings = connectionInfo.allUserAgentStrings.filter(function (value) { return value.category !== "custom"; }); if (nonCustomUAStrings.length > 0) { for (var i = 0; i < connectionInfo.allUserAgentStrings.length; ++i) { if (currentUserAgentString.localeCompare(connectionInfo.allUserAgentStrings[i].value) === 0) { connectionInfo.currentUserAgentString = connectionInfo.allUserAgentStrings[i]; break; } } if (!connectionInfo.currentUserAgentString) { connectionInfo.currentUserAgentString = { category: "default", name: "", value: "" }; } } else { connectionInfo.currentUserAgentString = { category: "unknown", name: "unknown", value: currentUserAgentString }; } try { remoteHelpers.port.postMessage("Handshake:" + JSON.stringify(connectionInfo)); } catch (e) { return; } } catch (e) { } }; RemoteEmulation.prototype.onBeforeScriptExecute = function (dispatchWindow) { if (dispatchWindow && dispatchWindow.browserOrWindow) { dispatchWindow = dispatchWindow.browserOrWindow; } var realWindow; try { realWindow = dispatchWindow.document.parentWindow; } catch (ex) { return; } if (realWindow === browser.document.parentWindow) { if (remoteHelpers.port) { remoteHelpers.postAllMessages(); this.initializePage(); } } }; RemoteEmulation.prototype.addRemotePageFunctions = function (realWindow) { realWindow.__BROWSERTOOLS_EMULATIONTOOLS_ADDED = browser.createSafeFunction(realWindow, function () { }); }; RemoteEmulation.prototype.onDetach = function () { try { if (browser.document.parentWindow.__BROWSERTOOLS_EMULATIONTOOLS_ADDED) { delete browser.document.parentWindow.__BROWSERTOOLS_EMULATIONTOOLS_ADDED; } } catch (ex) { } this.resetAllSettings(); }; RemoteEmulation.prototype.resetAllSettings = function () { emulation.viewport.restoreOriginalSettings(); emulation.geoLocation.clearAll(); if (this._documentModeIsDirty) { browser.forceEdgeModeDocumentFamily = false; browser.documentModeOverride = null; } if (this._userAgentStringIsDirty) { emulation.userAgentStringManager.setCurrentToDefault(); } var needsRefresh = (this._documentModeIsDirty || this._userAgentStringIsDirty) && !this._browserModeIsDirty; this._documentModeIsDirty = false; this._userAgentStringIsDirty = false; if (this._browserModeIsDirty) { this._browserModeIsDirty = false; emulation.setBrowserMode("default"); } else if (needsRefresh) { this.safeRefresh(); } }; RemoteEmulation.prototype.getBrowserMode = function () { return browser.browserMode; }; RemoteEmulation.prototype.setBrowserMode = function (mode) { this._browserModeIsDirty = true; emulation.setBrowserMode(mode); }; RemoteEmulation.prototype.getDocumentMode = function () { var documentMode = browser.documentMode; if (browser.documentMode === 0) { documentMode = browser.defaultDocumentMode; } return documentMode / 10000.0; }; RemoteEmulation.prototype.getDefaultDocumentMode = function () { return browser.defaultDocumentMode / 10000.0; }; RemoteEmulation.prototype.getForceEdgeModeDocumentFamily = function () { return !!browser.forceEdgeModeDocumentFamily; }; RemoteEmulation.prototype.getDocumentModeOverride = function () { return browser.documentModeOverride; }; RemoteEmulation.prototype.getFullDocumentModeState = function () { return { currentMode: browser.documentMode / 10000.0, defaultMode: browser.defaultDocumentMode / 10000.0, forceEdge: !!browser.forceEdgeModeDocumentFamily, overrideMode: browser.documentModeOverride, currentModeOrigin: browser.documentModeOrigin || "" }; }; RemoteEmulation.prototype.setForceEdgeModeDocumentFamily = function (enabled, refresh) { this._documentModeIsDirty = true; browser.forceEdgeModeDocumentFamily = enabled; if (refresh) { this.safeRefresh(); } }; RemoteEmulation.prototype.setDocumentModeOverride = function (mode, refresh) { this._documentModeIsDirty = true; browser.documentModeOverride = mode; if (refresh) { this.safeRefresh(); } }; RemoteEmulation.prototype.getAllUserAgentStrings = function () { return emulation.userAgentStringManager.all; }; RemoteEmulation.prototype.setCurrentUserAgentString = function (uaString, refresh) { this._userAgentStringIsDirty = true; emulation.userAgentStringManager.current = uaString; if (refresh) { this.safeRefresh(); } }; RemoteEmulation.prototype.getCurrentUserAgentString = function () { return emulation.userAgentStringManager.current; }; RemoteEmulation.prototype.setUserAgentStringToDefault = function (refresh) { this._userAgentStringIsDirty = false; emulation.userAgentStringManager.setCurrentToDefault(); if (refresh) { this.safeRefresh(); } }; RemoteEmulation.prototype.storeAndSetCustomUserAgentString = function (uaString, refresh) { var customUAStrings = this.getCustomUserAgentStrings(); customUAStrings = customUAStrings.sort(function (a, b) { return a.name.localeCompare(b.name); }); var uaStringIdx = -1; for (var i = 0; i < customUAStrings.length; ++i) { if (customUAStrings[i].value === uaString) { uaStringIdx = i; break; } } if (uaStringIdx >= 0) { var removedString = customUAStrings.splice(uaStringIdx, 1); emulation.userAgentStringManager.removeCustom(removedString[0].name); } var newString = { name: "" + Date.now(), category: "custom", value: uaString }; customUAStrings.push(newString); emulation.userAgentStringManager.addCustom(newString.name, newString.value); customUAStrings = customUAStrings.reverse(); for (var i = 10; i < customUAStrings.length; ++i) { emulation.userAgentStringManager.removeCustom(customUAStrings[i].name); } this.setCurrentUserAgentString(uaString, refresh); }; RemoteEmulation.prototype.removeCustomUserAgentString = function (uaString) { var customUAStrings = this.getCustomUserAgentStrings(); for (var i = 0; i < customUAStrings.length; ++i) { if (customUAStrings[i].value === uaString) { emulation.userAgentStringManager.removeCustom(customUAStrings[i].name); break; } } }; RemoteEmulation.prototype.getCustomUserAgentStrings = function () { return this.getAllUserAgentStrings().filter(function (value, index, array) { return value.category === "custom"; }); }; RemoteEmulation.prototype.setViewportSize = function (diagonalInInches, widthInPx, heightInPx) { emulation.viewport.setDimensions(null, widthInPx, heightInPx); }; RemoteEmulation.prototype.setViewportWidth = function (widthInPx) { emulation.viewport.widthInPx = widthInPx; }; RemoteEmulation.prototype.setViewportHeight = function (heightInPx) { emulation.viewport.heightInPx = heightInPx; }; RemoteEmulation.prototype.resetViewportSizeToDefault = function () { emulation.viewport.restoreOriginalSettings(); }; RemoteEmulation.prototype.getOrientation = function () { return emulation.viewport.orientation; }; RemoteEmulation.prototype.setOrientation = function (orientation) { emulation.viewport.orientation = orientation; }; RemoteEmulation.prototype.getResolution = function () { return { width: emulation.viewport.widthInPx, height: emulation.viewport.heightInPx }; }; RemoteEmulation.prototype.setGpsLatitude = function (value) { emulation.geoLocation.latitude = value; }; RemoteEmulation.prototype.setGpsLongitude = function (value) { emulation.geoLocation.longitude = value; }; RemoteEmulation.prototype.setGpsPosition = function (latitude, longitude) { var altitude = 6.275; var accuracy = 2.0; var altitudeAccuracy = 2.0; var heading = 0; var speed = 0; emulation.geoLocation.setPosition(latitude, longitude, altitude, accuracy, altitudeAccuracy, heading, speed); }; RemoteEmulation.prototype.setGpsHasSignal = function (value) { emulation.geoLocation.hasSignal = value; }; RemoteEmulation.prototype.getGpsPosition = function () { return { latitude: emulation.geoLocation.latitude, longitude: emulation.geoLocation.longitude }; }; RemoteEmulation.prototype.clearGpsSettings = function () { emulation.geoLocation.clearAll(); }; RemoteEmulation.prototype.safeRefresh = function () { try { browser.refresh(); } catch (e) { } }; return RemoteEmulation; })(); Emulation.RemoteEmulation = RemoteEmulation; var MessageHandlers = (function () { function MessageHandlers() { } MessageHandlers.prototype.resetAllSettings = function () { Emulation.EmulationRemoteApp.remoteCode.resetAllSettings(); }; MessageHandlers.prototype.getBrowserMode = function () { return Emulation.EmulationRemoteApp.remoteCode.getBrowserMode(); }; MessageHandlers.prototype.setBrowserMode = function (mode) { Emulation.EmulationRemoteApp.remoteCode.setBrowserMode(mode); }; MessageHandlers.prototype.getDocumentMode = function () { return Emulation.EmulationRemoteApp.remoteCode.getDocumentMode(); }; MessageHandlers.prototype.getDefaultDocumentMode = function () { return Emulation.EmulationRemoteApp.remoteCode.getDefaultDocumentMode(); }; MessageHandlers.prototype.getForceEdgeModeDocumentFamily = function () { return Emulation.EmulationRemoteApp.remoteCode.getForceEdgeModeDocumentFamily(); }; MessageHandlers.prototype.getDocumentModeOverride = function () { return Emulation.EmulationRemoteApp.remoteCode.getDocumentModeOverride(); }; MessageHandlers.prototype.getFullDocumentModeState = function () { return Emulation.EmulationRemoteApp.remoteCode.getFullDocumentModeState(); }; MessageHandlers.prototype.setForceEdgeModeDocumentFamily = function (enabled, refresh) { Emulation.EmulationRemoteApp.remoteCode.setForceEdgeModeDocumentFamily(enabled, refresh); }; MessageHandlers.prototype.setDocumentModeOverride = function (mode, refresh) { Emulation.EmulationRemoteApp.remoteCode.setDocumentModeOverride(mode, refresh); }; MessageHandlers.prototype.getAllUserAgentStrings = function () { return Emulation.EmulationRemoteApp.remoteCode.getAllUserAgentStrings(); }; MessageHandlers.prototype.setCurrentUserAgentString = function (uaString, refresh) { Emulation.EmulationRemoteApp.remoteCode.setCurrentUserAgentString(uaString, refresh); }; MessageHandlers.prototype.getCurrentUserAgentString = function () { return Emulation.EmulationRemoteApp.remoteCode.getCurrentUserAgentString(); }; MessageHandlers.prototype.setUserAgentStringToDefault = function (refresh) { Emulation.EmulationRemoteApp.remoteCode.setUserAgentStringToDefault(refresh); }; MessageHandlers.prototype.storeAndSetCustomUserAgentString = function (uaString, refresh) { Emulation.EmulationRemoteApp.remoteCode.storeAndSetCustomUserAgentString(uaString, refresh); return Emulation.EmulationRemoteApp.remoteCode.getCustomUserAgentStrings(); }; MessageHandlers.prototype.removeCustomUserAgentString = function (uaString, refresh) { Emulation.EmulationRemoteApp.remoteCode.removeCustomUserAgentString(uaString); Emulation.EmulationRemoteApp.remoteCode.setUserAgentStringToDefault(refresh); return Emulation.EmulationRemoteApp.remoteCode.getCustomUserAgentStrings(); }; MessageHandlers.prototype.setViewportSize = function (diagonalInInches, widthInPx, heightInPx, orientation) { Emulation.EmulationRemoteApp.remoteCode.setViewportSize(diagonalInInches, widthInPx, heightInPx); if (orientation) { Emulation.EmulationRemoteApp.remoteCode.setOrientation(orientation); } }; MessageHandlers.prototype.setViewportWidthAndHeight = function (widthInPx, heightInPx, orientation) { Emulation.EmulationRemoteApp.remoteCode.resetViewportSizeToDefault(); Emulation.EmulationRemoteApp.remoteCode.setViewportWidth(widthInPx); Emulation.EmulationRemoteApp.remoteCode.setViewportHeight(heightInPx); Emulation.EmulationRemoteApp.remoteCode.setOrientation(orientation); }; MessageHandlers.prototype.setViewportWidth = function (widthInPx, orientation) { Emulation.EmulationRemoteApp.remoteCode.resetViewportSizeToDefault(); Emulation.EmulationRemoteApp.remoteCode.setViewportWidth(widthInPx); Emulation.EmulationRemoteApp.remoteCode.setOrientation(orientation); }; MessageHandlers.prototype.setViewportHeight = function (heightInPx, orientation) { Emulation.EmulationRemoteApp.remoteCode.resetViewportSizeToDefault(); Emulation.EmulationRemoteApp.remoteCode.setViewportHeight(heightInPx); Emulation.EmulationRemoteApp.remoteCode.setOrientation(orientation); }; MessageHandlers.prototype.resetViewportSizeToDefault = function () { Emulation.EmulationRemoteApp.remoteCode.resetViewportSizeToDefault(); }; MessageHandlers.prototype.getOrientation = function () { return Emulation.EmulationRemoteApp.remoteCode.getOrientation(); }; MessageHandlers.prototype.getResolution = function () { return Emulation.EmulationRemoteApp.remoteCode.getResolution(); }; MessageHandlers.prototype.setGpsLatitude = function (value, hasSignal) { Emulation.EmulationRemoteApp.remoteCode.setGpsHasSignal(hasSignal); Emulation.EmulationRemoteApp.remoteCode.setGpsLatitude(value); }; MessageHandlers.prototype.setGpsLongitude = function (value, hasSignal) { Emulation.EmulationRemoteApp.remoteCode.setGpsHasSignal(hasSignal); Emulation.EmulationRemoteApp.remoteCode.setGpsLongitude(value); }; MessageHandlers.prototype.setGpsPosition = function (latitude, longitude, hasSignal) { Emulation.EmulationRemoteApp.remoteCode.setGpsHasSignal(hasSignal); Emulation.EmulationRemoteApp.remoteCode.setGpsPosition(latitude, longitude); }; MessageHandlers.prototype.getGpsPosition = function () { return Emulation.EmulationRemoteApp.remoteCode.getGpsPosition(); }; MessageHandlers.prototype.setGpsHasSignal = function (value) { Emulation.EmulationRemoteApp.remoteCode.setGpsHasSignal(value); }; MessageHandlers.prototype.clearGpsSettings = function () { Emulation.EmulationRemoteApp.remoteCode.clearGpsSettings(); }; MessageHandlers.prototype.refresh = function () { Emulation.EmulationRemoteApp.remoteCode.safeRefresh(); }; return MessageHandlers; })(); Emulation.MessageHandlers = MessageHandlers; })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var remoteHelpers; var F12; (function (F12) { "use strict"; (function (Tools) { (function (Emulation) { var EmulationRemoteApp = (function () { function EmulationRemoteApp() { } EmulationRemoteApp.main = function () { EmulationRemoteApp.messageHandlers = new Emulation.MessageHandlers(); remoteHelpers = new Common.RemoteHelpers(EmulationRemoteApp.messageHandlers); EmulationRemoteApp.remoteCode = new Emulation.RemoteEmulation(); EmulationRemoteApp.remoteCode.initialize(); }; return EmulationRemoteApp; })(); Emulation.EmulationRemoteApp = EmulationRemoteApp; })(Tools.Emulation || (Tools.Emulation = {})); var Emulation = Tools.Emulation; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); F12.Tools.Emulation.EmulationRemoteApp.main(); html, body { width: 100%; height: 100%; margin: 0; padding: 0; } body { -ms-user-select: none; overflow: hidden; background-color: TRANSPARENT; /*[{f12-header-background-color}]*/ } body.inactiveWindow { background-color: TRANSPARENT; /*[{f12-header-background-inactive-color}]*/ } #f12Logo { width: 40px; padding-top: 2px; text-align: center; min-width: 40px; color: TRANSPARENT; /*[{f12-header-logo-text-color}]*/ flex-shrink: 0; cursor: default; } #emulationMenu { min-width: 29px; height: 22px; display: inline-flex; flex-direction: row; flex-shrink: 0; cursor: default; border: thin solid transparent; /* no token, just reserving space so the menu does not move when it is opened and we add a border*/ } #emulationMenu.menuOpen { background-color: TRANSPARENT; /*[{f12-header-tab-selected-background-color}]*/ border: thin solid TRANSPARENT; /*[thin solid {f12-header-popup-border-color} !important]*/ } #emulationMenu.menuOpen #emulationIcon { background-position-y: -36px; } #emulationMenu.menuOpen #emulationText { color: TRANSPARENT; /*[{f12-header-tab-selected-text-color}]*/ } body:not(.inactiveWindow) #emulationMenu:not(.toolbarButtonStateDisabled):not(.menuOpen):hover > #emulationText { background-color: TRANSPARENT; /*[{f12-header-button-active-background-color}]*/ } body:not(.inactiveWindow) #emulationMenu:not(.toolbarButtonStateDisabled):not(.menuOpen):hover > #emulationIcon { background-color: TRANSPARENT; /*[{f12-header-button-active-background-color}]*/ } body:not(.inactiveWindow) #emulationMenu:not(.toolbarButtonStateDisabled).menuOpen > #emulationIcon:hover { background-color: TRANSPARENT;/*[{f12-header-tab-selected-background-color}]*/ /* background-position-y: -36px; */ } #emulationIcon { background-image: url("Images/emulationCombo.png"); background-size: cover; } #emulationMenu.toolbarButtonStateDisabled:hover > #emulationIcon { background-color: transparent; } #emulationMenu.toolbarButtonStateDisabled #emulationIcon { background-position-y: -36px; } #emulationText { color: TRANSPARENT; /*[{f12-header-tab-text-color}]*/ padding: 2px 0 0 4px; padding-right: 8px; min-width: 30px; } #emulationMenu.toolbarButtonStateDisabled #emulationText { color: TRANSPARENT; /*[{f12-header-disabled-text-color}]*/ } #consoleButton { background-image: url("Images/console.png"); } #helpButton { background-image: url("Images/help.png"); } #dockButton { background-image: url("Images/dock.png"); display: block; } body.dockedWindow #dockButton { display: none; } #undockButton { background-image: url("Images/undock.png"); display: none; } body.dockedWindow #undockButton { display: block; } #bringIEToForegroundButton { background-image: url("Images/foreground.png"); display: block; } body.dockedWindow #bringIEToForegroundButton { display: none; } #closeButton { background-image: url("Images/close.png"); display: none; } body.dockedWindow #closeButton { display: block; } .buttonIcon { display: inline-block; background-color: transparent; background-repeat: no-repeat; background-position: center 1px; background-size: 18px 54px; padding: 1px 4px 0 5px; width: 18px; height: 18px; flex-shrink: 0; border: 1px solid transparent; } .buttonIcon.toolbarButtonStateActive { border: 1px solid TRANSPARENT; /*[1px solid {f12-header-button-selected-border-color}]*/ } .buttonIcon.toolbarButtonStateDisabled { background-position-y: -36px; } body:not(.inactiveWindow) .buttonIcon.toolbarButtonStateActive { background-color: TRANSPARENT; /*[{f12-header-button-active-background-color}]*/ } body:not(.inactiveWindow) .buttonIcon:not(.toolbarButtonStateDisabled):active { background-color: TRANSPARENT; /*[{f12-header-button-active-background-color}]*/ } body:not(.inactiveWindow) .buttonIcon:not(.toolbarButtonStateDisabled):hover { background-color: TRANSPARENT; /*[{f12-header-button-hover-background-color}]*/ } #tabControl { flex: 1 1 auto; overflow: hidden; white-space: nowrap; height: 22px; } #tabListContainer { height: 22px; color: TRANSPARENT; /*[{f12-header-tab-text-color}]*/ font-family: Segoe UI; font-size: 9pt; overflow:hidden; display: inline-block; vertical-align: top; float: left; } #mainContainer { display: flex; /* or inline-flex */ flex-direction: row; flex-wrap: nowrap; width: 100%; position: relative; } #overflowButton { background-image: url("Images/overflow.png"); height: 100%; display: inline-block; cursor: pointer; } #overflowButton.selectedTabOverflowed { background-color: TRANSPARENT; /*[{f12-header-tab-selected-background-color}]*/ background-position-y: -35px; } #overflowButton.menuOpen { background-color: TRANSPARENT; /*[{f12-header-tab-selected-background-color}]*/ border: thin solid TRANSPARENT !important; /*[thin solid {f12-header-popup-border-color} !important]*/ background-position-y: -35px; } #divider { background-color: TRANSPARENT; /*[{f12-header-divider-color}]*/ margin: 3px 2px; width: 1px; } .tabItem { text-align: center; justify-content: center; display: inline-block; cursor: pointer; white-space: nowrap; padding: 0px 9px; height: 100%; } .tabItem.neverBadge { padding: 0px 4px; } body:not(.inactiveWindow) .tabItem:hover:not(.tabItemSelected) { background-color: TRANSPARENT; /*[{f12-header-tab-hover-background-color}]*/ color: TRANSPARENT; /*[{f12-header-tab-hover-text-color}]*/ } .tabItem > .tabText { height: 18px; margin-top: 2px; display: inline-block; } .tabItem:not(.hasBadge) > .tabText { margin-left: 9px; margin-right: 9px; } .tabItem.countBadge:not(.hasBadge) > .tabText { margin-left: 16px; margin-right: 15px; } .tabImage { flex-grow: 0; padding: 2px 2px 0 2px; text-overflow: clip; white-space: nowrap; overflow: hidden; display: inline-flex; z-index: 1; } .tabItemSelected { background-color: TRANSPARENT; /*[{f12-header-tab-selected-background-color}]*/ color: TRANSPARENT; /*[{f12-header-tab-selected-text-color}]*/ } .tabItemSelected .tabImage, .tabItemSelected .tabImage:hover { background-position: -96px 0; } .tabItemDisabled .tabImage { background-position: -96px 0; } .badgeNumber, .badgePlus, .badgeBackground { font-family: 'Segoe UI'; font-size: 12px; background-color: transparent; /* no token - comes from the image */ } .badgeNumber, .badgePlus { z-index: 3; } .badgeBackground { width: 14px; height: 14px; margin: 3px 0 0 4px; background-size: 14px; background-repeat: no-repeat; vertical-align: top; z-index: 2; display: none; color: TRANSPARENT; /*[{f12-header-badge-error-text-color}]*/ text-align: justify; } .badgeBackground.badgeAlert { background-image: url("Images/badgeAlert.png"); } .badgeBackground.badgeError { background-image: url("Images/badgeError.png"); } .badgeBackground.badgeRunning { background-image: url("Images/badgeRunning.png"); } .badgeBackground.badgeInfo { background-image: url("Images/badgeInfo.png"); } .badgeBackground.badgeBreak { background-image: url("Images/badgeBreak.png"); } .tabItem.hasBadge .badgeBackground { display: inline-block; } .tabItem.countBadge.hasBadge .badgeBackground { padding-left: 15px; width: 12px; } .badgeNumber, .badgePlus { position: relative; top: -2px; font-size: 11px; padding-left: 1px; font-weight: 500; } .badgeNumber { display: none; } .tabItemSelected.hasBadge .badgeBackground { background-position-y: -14px; color: TRANSPARENT; /*[{f12-header-badge-error-selected-text-color}]*/ font-weight: 600; } .tabItem.hasBadge .badgeBackground.displayNumber .badgeNumber { display: inline-block; } .badgePlus { display: none; left: -1px; padding-right:2px; } .tabItem.hasBadge .badgeBackground.displayPlus .badgePlus { display: inline-block; } .tabItemSelected.hasBadge .badgeBackground.displayPlus .badgePlus { color: TRANSPARENT; /*[{f12-header-tab-selected-text-color}]*/ } .tabNavButton { width: 16px; height: 16px; -ms-grid-column-align: center; background-repeat: no-repeat; background-position: 0 0; background-color: TRANSPARENT; /*[{f12-header-background-color}]*/ background-size: 64px 16px; } .tabNavButton:active { background-position: -16px 0; } .tabNavButton:hover { background-position: -32px 0; } .tabNavButton.tabNavButtonDisabled { background-position: -48px 0; visibility: hidden; } .selectedTabOverflowed#overflowButton.inactiveWindow { background-position-y: 1px; } @media screen and (max-width:292px) { #f12Logo { min-width: 4px; flex-shrink: 1; } } @media screen and (max-width:250px) { #f12Logo { visibility: hidden; width: 8px; } } Header
        F12
        Edge
        // // Copyright (C) Microsoft. All rights reserved. // // badge.ts var F12; (function (F12) { (function (Host) { (function (Header) { "use strict"; (function (BadgeTypes) { BadgeTypes[BadgeTypes["Running"] = 0] = "Running"; BadgeTypes[BadgeTypes["Alert"] = 1] = "Alert"; BadgeTypes[BadgeTypes["Error"] = 2] = "Error"; BadgeTypes[BadgeTypes["Info"] = 3] = "Info"; BadgeTypes[BadgeTypes["Break"] = 4] = "Break"; })(Header.BadgeTypes || (Header.BadgeTypes = {})); var BadgeTypes = Header.BadgeTypes; (function (BadgeDisplayType) { BadgeDisplayType[BadgeDisplayType["None"] = 0] = "None"; BadgeDisplayType[BadgeDisplayType["Icon"] = 1] = "Icon"; BadgeDisplayType[BadgeDisplayType["IconAndCount"] = 2] = "IconAndCount"; })(Header.BadgeDisplayType || (Header.BadgeDisplayType = {})); var BadgeDisplayType = Header.BadgeDisplayType; var Badge = (function () { function Badge(container) { this._backgroundElement = document.createElement("span"); this._backgroundElement.className = "badgeBackground"; container.appendChild(this._backgroundElement); this._numberElement = document.createElement("span"); this._numberElement.className = "badgeNumber"; this._backgroundElement.appendChild(this._numberElement); this._plusElement = document.createElement("span"); this._plusElement.className = "badgePlus"; this._plusElement.innerText = "+"; this._backgroundElement.appendChild(this._plusElement); } Object.defineProperty(Badge.prototype, "currentBadgeInfo", { get: function () { return this._currentBageInfo; }, enumerable: true, configurable: true }); Badge.prototype.show = function (badgeType, count) { if (typeof count === "undefined") { count = 0; } var displayNumber = false; var displayPlus = false; this._backgroundElement.classList.add("badge" + BadgeTypes[badgeType]); var backgroundImage = ""; switch (badgeType) { case 1 /* Alert */: backgroundImage = "url('Images/badgeAlert.png')"; break; case 2 /* Error */: backgroundImage = "url('Images/badgeError.png')"; break; case 0 /* Running */: backgroundImage = "url('Images/badgeRunning.png')"; break; case 3 /* Info */: backgroundImage = "url('Images/badgeInfo.png')"; break; case 4 /* Break */: backgroundImage = "url('Images/badgeBreak.png')"; break; } if (count > 0 && badgeType === 2 /* Error */) { displayNumber = true; if (count >= 99) { displayPlus = true; count = 99; } this._numberElement.innerText = count.toString(); } if (displayNumber) { this._backgroundElement.classList.add("displayNumber"); } else { this._backgroundElement.classList.remove("displayNumber"); } if (displayPlus) { this._backgroundElement.classList.add("displayPlus"); } else { this._backgroundElement.classList.remove("displayPlus"); } this._currentBageInfo = { badgeType: badgeType, count: count, displayPlus: displayPlus, displayNumber: displayNumber }; }; Badge.prototype.hide = function () { this._currentBageInfo = null; }; return Badge; })(); Header.Badge = Badge; })(Host.Header || (Host.Header = {})); var Header = Host.Header; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); // jmcService.ts var F12; (function (F12) { (function (Host) { (function (Header) { "use strict"; var JMCService = (function () { function JMCService() { this._isDirty = false; this._isLoadedJsonValid = true; this._jmcRules = []; this._jmcRules[Plugin.F12.JMCType.UserCode] = []; this._jmcRules[Plugin.F12.JMCType.Library] = []; this._jmcRules[Plugin.F12.JMCType.Unrelated] = []; } Object.defineProperty(JMCService, "defaultRules", { get: function () { return { MyCode: JMCService.JMC_DEFAULT_RULES.MyCode.slice(0), Libraries: JMCService.JMC_DEFAULT_RULES.Libraries.slice(0), Unrelated: JMCService.JMC_DEFAULT_RULES.Unrelated.slice(0) }; }, enumerable: true, configurable: true }); JMCService.prototype.initialize = function () { var _this = this; return this.load().then(function () { _this.registerPluginMethodHandlers(); }, function (error) { _this.registerPluginMethodHandlers(); }); }; JMCService.prototype.isJMCAvailable = function () { return Plugin.Promise.wrap(this._isLoadedJsonValid); }; JMCService.prototype.getJMCTypeForUrls = function (urls) { var types = []; for (var i = 0; i < urls.length; i++) { types.push(this.getJMCTypeForUrlFromRules(urls[i])); } return Plugin.Promise.wrap(types); }; JMCService.prototype.getJMCTypeForEval = function () { return Plugin.Promise.wrap(Plugin.F12.JMCType.UserCode); }; JMCService.prototype.getJMCTypeForScriptBlock = function () { return Plugin.Promise.wrap(Plugin.F12.JMCType.UserCode); }; JMCService.prototype.getJMCTypeForFunction = function () { return Plugin.Promise.wrap(Plugin.F12.JMCType.UserCode); }; JMCService.prototype.getJMCTypeForUrl = function (url) { return this.getJMCTypeForUrls([url]).then(function (types) { return Plugin.Promise.wrap(types[0]); }); }; JMCService.prototype.setJMCTypeForUrl = function (url, type) { return Plugin.Promise.wrap(this.setJMCTypeForUrlFromRules(url, type)); }; JMCService.prototype.getCurrentRules = function () { var rules = []; for (var i = 0; i < this._jmcRules.length; i++) { rules[i] = this._jmcRules[i].slice(0); } return Plugin.Promise.wrap(rules); }; JMCService.prototype.load = function () { return this.loadRules(); }; JMCService.prototype.save = function () { return this.saveRules(); }; JMCService.prototype.loadFromJSON = function (jsonToParse) { return this.loadRules(jsonToParse); }; JMCService.prototype.saveToJSON = function () { return this.saveRules(true); }; JMCService.prototype.getError = function () { var error = null; if (!this._isLoadedJsonValid) { error = this._jmcError; } return Plugin.Promise.wrap(error); }; JMCService.prototype.loadRules = function (jsonToParse) { var _this = this; var stream; var loadSettings = null; if (typeof jsonToParse === "string") { loadSettings = Plugin.Promise.wrap(jsonToParse); } else { var jsonFromDisk = ""; loadSettings = Plugin.Storage.openFile(JMCService.JMC_SETTINGS_FILE, { access: 1 /* read */, encoding: "UTF-8", mode: 4 /* openOrCreate */, persistence: 0 /* permanent */, type: 1 /* text */ }).then(function (file) { stream = file; return stream.read(); }).then(function (json) { jsonFromDisk = json; return stream.close(); }).then(function () { return Plugin.Promise.wrap(jsonFromDisk); }, function (error) { if (!error) { error = { message: "" }; } _this._jmcError = error; _this._jmcError.name = "jmcLoadError"; return Plugin.Promise.wrapError(error); }); } return loadSettings.then(function (json) { var wasAvailable = _this.isJMCAvailable; _this.parseJMCSettings(json); if (wasAvailable !== _this.isJMCAvailable) { Plugin.F12.Communications.fireEvent("jmcAvailabilityChanged", Plugin.F12.PluginId.None); } if (!_this._isLoadedJsonValid) { return Plugin.Promise.wrapError(_this._jmcError); } _this._isDirty = false; return _this.getCurrentRules(); }); }; JMCService.prototype.saveRules = function (ignoreDisk) { var _this = this; var stream; var json = this.getJMCSettingsJson(); var saveSettings = null; if (ignoreDisk || !this._isDirty || !this._isLoadedJsonValid) { saveSettings = Plugin.Promise.wrap(json); } else { saveSettings = Plugin.Storage.openFile(JMCService.JMC_SETTINGS_FILE, { access: 2 /* write */, encoding: "UTF-8", mode: 1 /* createNew */, persistence: 0 /* permanent */, type: 1 /* text */ }).then(function (file) { stream = file; return stream.write(json); }).then(function () { return stream.close(); }).then(function () { return Plugin.Promise.wrap(json); }, function (error) { if (!error) { error = { message: "" }; } _this._jmcError = error; _this._jmcError.name = "jmcSaveError"; return Plugin.Promise.wrapError(error); }); } return saveSettings.then(function (savedJson) { _this._isDirty = false; return Plugin.Promise.wrap(savedJson); }); }; JMCService.prototype.getJMCTypeForUrlFromRules = function (url) { return this.findMatchingRule(url); }; JMCService.prototype.setJMCTypeForUrlFromRules = function (url, type) { var oldType = this.getJMCTypeForUrlFromRules(url); if (type === Plugin.F12.JMCType.Unsure) { F12.Tools.Utility.Assert.fail("F12 does not support setting a url to the 'Unsure' type"); return oldType; } var newType = this.updateJMC(url, type); var data = { url: url, previousType: oldType, currentType: newType }; Plugin.F12.Communications.fireEvent("jmcRulesChanged", Plugin.F12.PluginId.None, data); return newType; }; JMCService.prototype.parseJMCSettings = function (json) { var _this = this; this._jmcRules = []; this._jmcRules[Plugin.F12.JMCType.UserCode] = []; this._jmcRules[Plugin.F12.JMCType.Library] = []; this._jmcRules[Plugin.F12.JMCType.Unrelated] = []; var myCode = null; this._isLoadedJsonValid = true; if (!json) { myCode = JMCService.defaultRules; } else { try { myCode = JSON.parse(json); } catch (ex) { myCode = JMCService.defaultRules; this._isLoadedJsonValid = false; this._jmcError = ex; this._jmcError.name = "jmcParseError"; } } var mapSetting = function (settings, type) { if (settings && settings instanceof Array) { for (var i = 0; i < settings.length; i++) { var rule = settings[i]; if (typeof rule === "string") { _this._jmcRules[type].push(rule.toLowerCase()); } } } }; mapSetting(myCode.MyCode, Plugin.F12.JMCType.UserCode); mapSetting(myCode.Libraries, Plugin.F12.JMCType.Library); mapSetting(myCode.Unrelated, Plugin.F12.JMCType.Unrelated); }; JMCService.prototype.getJMCSettingsJson = function () { var myCode = { MyCode: this._jmcRules[Plugin.F12.JMCType.UserCode], Libraries: this._jmcRules[Plugin.F12.JMCType.Library], Unrelated: this._jmcRules[Plugin.F12.JMCType.Unrelated] }; return JSON.stringify(myCode); }; JMCService.prototype.findMatchingRule = function (url) { var _this = this; url = url.toLowerCase(); var isMatchingType = function (url, type) { var rules = _this._jmcRules[type]; for (var i = 0; i < rules.length; i++) { var rule = rules[i].toLowerCase(); if (rule.indexOf("*") >= 0) { var wild = []; var parts = rule.split("*"); for (var j = 0; j < parts.length; j++) { wild.push(Common.EncodingUtilities.escapeRegExp(parts[j])); } var wildRegEx = new RegExp("^" + wild.join(".*?") + "$", "i"); if (wildRegEx.test(url)) { return true; } } else if (rule === url) { return true; } } return false; }; if (isMatchingType(url, Plugin.F12.JMCType.UserCode)) { return Plugin.F12.JMCType.UserCode; } else if (isMatchingType(url, Plugin.F12.JMCType.Library)) { return Plugin.F12.JMCType.Library; } else if (isMatchingType(url, Plugin.F12.JMCType.Unrelated)) { return Plugin.F12.JMCType.Unrelated; } return Plugin.F12.JMCType.UserCode; }; JMCService.prototype.updateJMC = function (url, type) { url = url.toLowerCase(); this._isDirty = true; var oldType = this.findMatchingRule(url); for (var i = 0; i < this._jmcRules.length; i++) { var index = this._jmcRules[i].indexOf(url); if (index >= 0) { this._jmcRules[i].splice(index, 1); } } this._jmcRules[type].push(url); return this.findMatchingRule(url); }; JMCService.prototype.registerPluginMethodHandlers = function () { Plugin.F12.Communications.registerMethodHandler("jmcIsJMCAvailable", this.bindAsyncMethodHandler(this.isJMCAvailable), true); Plugin.F12.Communications.registerMethodHandler("jmcGetJMCTypeForUrls", this.bindAsyncMethodHandler(this.getJMCTypeForUrls), true); Plugin.F12.Communications.registerMethodHandler("jmcGetJMCTypeForEval", this.bindAsyncMethodHandler(this.getJMCTypeForEval), true); Plugin.F12.Communications.registerMethodHandler("jmcGetJMCTypeForScriptBlock", this.bindAsyncMethodHandler(this.getJMCTypeForScriptBlock), true); Plugin.F12.Communications.registerMethodHandler("jmcGetJMCTypeForFunction", this.bindAsyncMethodHandler(this.getJMCTypeForFunction), true); Plugin.F12.Communications.registerMethodHandler("jmcGetJMCTypeForUrl", this.bindAsyncMethodHandler(this.getJMCTypeForUrl), true); Plugin.F12.Communications.registerMethodHandler("jmcSetJMCTypeForUrl", this.bindAsyncMethodHandler(this.setJMCTypeForUrl), true); Plugin.F12.Communications.registerMethodHandler("jmcLoad", this.bindAsyncMethodHandler(this.load), true); Plugin.F12.Communications.registerMethodHandler("jmcSave", this.bindAsyncMethodHandler(this.save), true); Plugin.F12.Communications.registerMethodHandler("jmcLoadFromJSON", this.bindAsyncMethodHandler(this.loadFromJSON), true); Plugin.F12.Communications.registerMethodHandler("jmcSaveToJSON", this.bindAsyncMethodHandler(this.saveToJSON), true); Plugin.F12.Communications.registerMethodHandler("jmcGetCurrentRules", this.bindAsyncMethodHandler(this.getCurrentRules), true); Plugin.F12.Communications.registerMethodHandler("jmcGetError", this.bindAsyncMethodHandler(this.getError), true); }; JMCService.prototype.bindAsyncMethodHandler = function (func) { var that = this; return function () { var args = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { args[_i] = arguments[_i + 0]; } func.apply(that, args).done(function (result) { args[args.length - 1](result); }, function (error) { args[args.length - 1](undefined, error); }); }; }; JMCService.JMC_SETTINGS_FILE = "MyCode.json"; JMCService.JMC_DEFAULT_RULES = { MyCode: [], Libraries: ["*.min.js", "browsertools://*"], Unrelated: [] }; return JMCService; })(); Header.JMCService = JMCService; })(Host.Header || (Host.Header = {})); var Header = Host.Header; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); // rpcWrapper.ts var F12; (function (F12) { (function (Host) { (function (Header) { "use strict"; var RpcWrapper = (function () { function RpcWrapper() { var _this = this; this._diagOMConnect = null; var external = window.external; external.addEventListener("attach", function () { return _this.onAttach(); }); external.addEventListener("detach", function () { return _this.onDetach(); }); } Object.defineProperty(RpcWrapper.prototype, "isConnected", { get: function () { return !!this._rpc; }, enumerable: true, configurable: true }); RpcWrapper.prototype.onLoadComplete = function (control) { this._headerControl = control; if (window.external.isAttached) { this.onAttach(); } }; RpcWrapper.prototype.jsonRpcMethodCall = function (method, params) { var _this = this; var promise = new Plugin.Promise(function (completed, error) { _this._rpc.jsonRpcMethodCall(method, params, completed, error); }); return promise; }; RpcWrapper.prototype.toggleAlwaysRefreshFromServer = function (enable) { this.jsonRpcMethodCall("toggleAlwaysRefreshFromServer", [enable]).done(); }; RpcWrapper.prototype.refreshPage = function () { Plugin.F12.Debugger.abortScriptExecution(); this.jsonRpcMethodCall("refreshPage").done(); }; RpcWrapper.prototype.jsonRpcMethodReceive = function (method, params, response) { F12.Tools.Utility.Assert.fail("Frontend received an unexpected RPC method call: '" + method + "'"); }; RpcWrapper.prototype.jsonRpcNotificationReceive = function (event, params) { switch (event) { case "onDocumentComplete": F12.Tools.Utility.Assert.areEqual(1, params.length); this._headerControl.onDocumentComplete(params[0]); break; case "onInspectElement": F12.Tools.Utility.Assert.areEqual(1, params.length); this._headerControl.onInspectElement(params[0]); break; case "onScriptError": var errorDetails = JSON.parse(params[0]); Common.ErrorHandling.reportErrorDetails(errorDetails); break; default: F12.Tools.Utility.Assert.fail("Unknown event '" + event + "'"); } }; RpcWrapper.prototype.onAttach = function () { var _this = this; var diagOMEngine = window.external; diagOMEngine.loadScriptInProc("../common/isDebugBuild.js"); diagOMEngine.loadScriptInProc("../common/assert.js"); diagOMEngine.loadScriptInProc("../common/Remote/rpc.js"); diagOMEngine.loadScriptInProc("../common/remoteHelpers.js"); diagOMEngine.loadScriptInProc("remote/remote.js"); this._diagOMConnect = function (port) { _this._rpc = new F12.Tools.RPC.JsonRPCEndpoint("HEADER_CLIENT", function (method, params, response) { return _this.jsonRpcMethodReceive(method, params, response); }, function (method, params) { return _this.jsonRpcNotificationReceive(method, params); }, function (data) { port.postMessage(data); }, function (onMessage) { port.addEventListener("message", onMessage); }); _this._headerControl.onAttached(); }; diagOMEngine.addEventListener("connect", this._diagOMConnect); }; RpcWrapper.prototype.onDetach = function () { var external = window.external; if (this._diagOMConnect) { external.removeEventListener("connect", this._diagOMConnect); } this._rpc = null; this._diagOMConnect = null; this._headerControl.onDetached(); }; return RpcWrapper; })(); Header.RpcWrapper = RpcWrapper; })(Host.Header || (Host.Header = {})); var Header = Host.Header; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); // tabControl.ts var F12; (function (F12) { (function (Host) { (function (Header) { "use strict"; var TabControl = (function () { function TabControl() { this._rootElement = document.getElementById("tabControl"); this._tabListContainer = document.getElementById("tabListContainer"); this._tabItemsById = []; this._tabItemsByOrder = []; this._selectedTab = null; this._highlightedElement = null; this._listeners = []; this.initialize(); } Object.defineProperty(TabControl.prototype, "selectedTab", { get: function () { return this._selectedTab; }, enumerable: true, configurable: true }); Object.defineProperty(TabControl.prototype, "selectedTabName", { get: function () { if (this._selectedTab) { return this._selectedTab.getAttribute("data-tabId"); } return ""; }, enumerable: true, configurable: true }); Object.defineProperty(TabControl.prototype, "selectedTabPluginId", { get: function () { if (this._selectedTab) { return parseInt(this._selectedTab.getAttribute("data-pluginId"), 10); } return -1; }, enumerable: true, configurable: true }); Object.defineProperty(TabControl.prototype, "selectedElement", { get: function () { var selectedElement; if (this._selectedTab) { selectedElement = this._selectedTab.querySelector(".tabItem tabItemSelected"); } return selectedElement; }, enumerable: true, configurable: true }); Object.defineProperty(TabControl.prototype, "highlightedElement", { get: function () { var highlightedElement; if (this._highlightedElement) { highlightedElement = this._highlightedElement; } return highlightedElement; }, enumerable: true, configurable: true }); TabControl.prototype.addEventListener = function (eventName, callback) { if (eventName === "tabClicked") { this._listeners.push(callback); } }; TabControl.prototype.onResize = function () { var availableWidth = this._rootElement.getBoundingClientRect().width - this._overflowButton.getBoundingClientRect().width; var hitCapacity = false; var usedWidth = 0; for (var i = 0; i < this._tabItemsByOrder.length; i++) { var tabElement = this._tabItemsByOrder[i].rootElement; if (!hitCapacity) { if (!this.tabIsVisible(tabElement)) { this.showTab(tabElement); } var tabWidth = tabElement.getBoundingClientRect().width; if (usedWidth + tabWidth > availableWidth) { hitCapacity = true; } else { usedWidth += tabWidth; if (tabElement === this._highlightedElement) { this.highlightTabByElement(this._highlightedElement); this._overflowButton.classList.remove("selectedTabOverflowed"); this._overflowButton.tabIndex = -1; } } } if (hitCapacity) { if (this.tabIsVisible(tabElement)) { if (tabElement === this._highlightedElement) { this._overflowButton.classList.add("selectedTabOverflowed"); tabElement.tabIndex = -1; this._overflowButton.tabIndex = 1; } this.hideTab(tabElement); } } } if (hitCapacity) { this._overflowButton.style.display = "inline-block"; } else { if (this._highlightedElement === this._overflowButton) { this.highlightTabByElement(this._selectedTab); } this._overflowButton.style.display = "none"; } }; TabControl.prototype.getHiddenTabs = function () { var hiddenTabs = []; for (var i = 0; i < this._tabItemsByOrder.length; i++) { var tabItem = this._tabItemsByOrder[i]; if (!this.tabIsVisible(tabItem.rootElement)) { hiddenTabs.push(tabItem); } } return hiddenTabs; }; TabControl.prototype.getRightmostVisibleTabOffset = function () { var tabList = this._tabListContainer.children; var rightmostPoint = 0; for (var i = 0; i < tabList.length; i++) { var boundingRect = tabList[i].getBoundingClientRect(); if (boundingRect.top === 0 && boundingRect.right > rightmostPoint) { rightmostPoint = boundingRect.right; } } return rightmostPoint - this._tabListContainer.getBoundingClientRect().left; }; TabControl.prototype.addTab = function (pluginId, scriptId, tabName, localizedTooltip, badgeDisplayType) { var _this = this; var tab = document.createElement("div"); tab.setAttribute("data-tabId", scriptId); tab.setAttribute("data-pluginId", "" + pluginId); tab.setAttribute("data-pluginName", tabName); tab.className = "tabItem"; switch (badgeDisplayType) { case 0 /* None */: tab.classList.add("neverBadge"); break; case 2 /* IconAndCount */: tab.classList.add("countBadge"); break; } tab.onmouseover = function () { Plugin.Tooltip.show({ content: _this._tabItemsById[pluginId].toolTip }); return true; }; tab.setAttribute("aria-label", localizedTooltip); tab.tabIndex = -1; var tabText = document.createElement("span"); tabText.className = "tabText"; tabText.textContent = tabName; tabText.tabIndex = -1; tab.appendChild(tabText); var badge = new Header.Badge(tab); tab.addEventListener("click", function (e) { return _this.onTabClicked(e, pluginId); }); var tabItem = { rootElement: tab, badge: badge, originalTooltip: localizedTooltip, toolTip: localizedTooltip }; this._tabItemsById[pluginId] = tabItem; this._tabItemsByOrder.push(tabItem); this._tabListContainer.appendChild(tab); }; TabControl.prototype.selectTabById = function (pluginId, fireEvents) { if (typeof fireEvents === "undefined") { fireEvents = true; } this.highlightTabById(pluginId, false); this.onTabSelected(pluginId, fireEvents); }; TabControl.prototype.showBadge = function (pluginId, badgeType, additionalTooltip, count) { if (typeof count === "undefined") { count = 0; } var tabItem = this._tabItemsById[pluginId]; var formattedTooltip = Plugin.Resources.getString("BadgeTooltipFormat", tabItem.originalTooltip, additionalTooltip); var formattedAriaLabel = tabItem.originalTooltip + " " + additionalTooltip; tabItem.rootElement.setAttribute("aria-label", formattedAriaLabel); tabItem.toolTip = formattedTooltip; tabItem.badge.show(badgeType, count); tabItem.rootElement.classList.add("hasBadge"); }; TabControl.prototype.hideBadge = function (pluginId) { var tabItem = this._tabItemsById[pluginId]; tabItem.rootElement.setAttribute("aria-label", tabItem.originalTooltip); tabItem.toolTip = tabItem.originalTooltip; tabItem.badge.hide(); tabItem.rootElement.classList.remove("hasBadge"); }; TabControl.prototype.onTabSelected = function (pluginId, fireEvents) { if (typeof fireEvents === "undefined") { fireEvents = true; } if (this._selectedTab) { if (this.tabIsVisible(this._selectedTab)) { this._selectedTab.tabIndex = -1; } else { this._overflowButton.classList.remove("selectedTabOverflowed"); this._overflowButton.tabIndex = -1; } this._selectedTab.classList.remove("tabItemSelected"); } this._selectedTab = this._highlightedElement; if (this.tabIsVisible(this._selectedTab)) { this._selectedTab.tabIndex = 1; } else { this._overflowButton.classList.add("selectedTabOverflowed"); this._overflowButton.tabIndex = 1; } if (this._selectedTab) { this._selectedTab.classList.add("tabItemSelected"); } if (fireEvents) { for (var i = 0; i < this._listeners.length; i++) { if (this._listeners[i]) { this._listeners[i](pluginId); } } } }; TabControl.prototype.onOverflowButtonClicked = function () { var _this = this; var hiddenTabs = this.getHiddenTabs(); if (hiddenTabs.length > 0) { var menuItems = []; var createCallback = function (pluginId) { return function (menuId, menuItem) { return _this.onTabSelected(pluginId); }; }; var isCheckedCallback = function (thisPluginId, selectedTabPluginId) { return function () { return (thisPluginId === selectedTabPluginId); }; }; for (var i = 0; i < hiddenTabs.length; i++) { var tabText = hiddenTabs[i].rootElement.querySelector(".tabText").textContent; var pluginId = parseInt(hiddenTabs[i].rootElement.getAttribute("data-pluginId"), 10); var badgeInfo = hiddenTabs[i].badge.currentBadgeInfo; var itemClass = ""; if (badgeInfo) { if (badgeInfo.displayNumber) { itemClass = "badgeCount_" + badgeInfo.count; } else { itemClass = "badgeType" + badgeInfo.badgeType; } } menuItems.push({ id: "", callback: createCallback(pluginId), label: tabText, type: 0 /* checkbox */, disabled: function () { return false; }, accessKey: "", checked: isCheckedCallback(pluginId, this.selectedTabPluginId), cssClass: itemClass }); } if (this._overflowMenu) { this._overflowMenu.dispose(); this._overflowMenu = null; } this._overflowButton.classList.add("active"); this._overflowMenu = Plugin.ContextMenu.create(menuItems, "headerOverflowMenu"); this._overflowMenu.show(this._overflowButton.getBoundingClientRect().left, window.innerHeight); } }; TabControl.prototype.showTab = function (tabElement) { tabElement.style.display = "inline-block"; }; TabControl.prototype.hideTab = function (tabElement) { tabElement.style.display = "none"; }; TabControl.prototype.tabIsVisible = function (tabElement) { return tabElement.style.display.toLowerCase() !== "none"; }; TabControl.prototype.initialize = function () { var _this = this; this._overflowButton = document.getElementById("overflowButton"); this._overflowButton.addEventListener("keydown", function (e) { var moveTo = null; if (e.keyCode === 38 /* ArrowUp */ || e.keyCode === 37 /* ArrowLeft */) { for (var i = _this._tabItemsByOrder.length - 1; i >= 0; i--) { var tabElement = _this._tabItemsByOrder[i].rootElement; if (_this.tabIsVisible(tabElement)) { moveTo = tabElement; break; } } } if (moveTo) { _this._overflowButton.tabIndex = -1; _this.highlightTabByElement(moveTo); } }); this._tabListContainer.addEventListener("keydown", function (e) { var moveTo = null; if (e.keyCode === 40 /* ArrowDown */ || e.keyCode === 39 /* ArrowRight */) { moveTo = _this._highlightedElement.nextElementSibling; } else if (e.keyCode === 38 /* ArrowUp */ || e.keyCode === 37 /* ArrowLeft */) { moveTo = _this._highlightedElement.previousElementSibling; } else if (e.keyCode === 32 /* Space */ || e.keyCode === 13 /* Enter */) { var pluginId = parseInt(_this._highlightedElement.getAttribute("data-pluginId"), 10); if (pluginId > 0) { _this.onTabSelected(pluginId); } } if (moveTo) { if (_this.tabIsVisible(moveTo)) { _this.highlightTabByElement(moveTo); } else { _this._highlightedElement.tabIndex = -1; _this._highlightedElement = _this._overflowButton; _this._overflowButton.tabIndex = 1; _this._overflowButton.focus(); } } }); window.addEventListener("resize", (function (e) { return _this.onResize(); })); }; TabControl.prototype.highlightTabById = function (pluginId, setFocus) { if (typeof setFocus === "undefined") { setFocus = true; } if (this._highlightedElement) { this._highlightedElement.classList.remove("tabItemHighlighted"); this.highlightedElement.setAttribute("tabindex", "-1"); } var tabItem = this._tabItemsById[pluginId]; if (tabItem) { tabItem.rootElement.classList.add("tabItemHighlighted"); this._highlightedElement = tabItem.rootElement; var highlightedTabArea = this.highlightedElement; highlightedTabArea.setAttribute("tabindex", "1"); if (setFocus) { highlightedTabArea.focus(); } } }; TabControl.prototype.highlightTabByElement = function (element) { var pluginId = parseInt(element.getAttribute("data-pluginId"), 10); if (pluginId > 0) { this.highlightTabById(pluginId); } }; TabControl.prototype.onTabClicked = function (e, pluginId) { this.highlightTabByElement(e.currentTarget.parentElement); this.onTabSelected(pluginId); }; return TabControl; })(); Header.TabControl = TabControl; })(Host.Header || (Host.Header = {})); var Header = Host.Header; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); // header.ts var F12; (function (F12) { (function (Host) { (function (Header) { "use strict"; (function (PluginType) { PluginType[PluginType["Script"] = 0] = "Script"; PluginType[PluginType["Native"] = 1] = "Native"; })(Header.PluginType || (Header.PluginType = {})); var PluginType = Header.PluginType; var HeaderControl = (function () { function HeaderControl(dispatch) { this._testEventObject = new Common.EventHelperObject(); this._traceWriter = new Common.TraceWriter(); this._isReady = false; this._emulationMenu = document.getElementById("emulationMenu"); this._emulationText = document.getElementById("emulationText"); this._emulationIcon = document.getElementById("emulationIcon"); this._consoleButton = document.getElementById("consoleButton"); this._helpButton = document.getElementById("helpButton"); this._bringIEToForegroundButton = document.getElementById("bringIEToForegroundButton"); this._dockButton = document.getElementById("dockButton"); this._undockButton = document.getElementById("undockButton"); this._closeButton = document.getElementById("closeButton"); var createUI = false; if (!dispatch) { dispatch = window.external.header; createUI = true; } this._headerDispatch = dispatch; Common.blockBrowserAccelerators(); this._jmcService = new Header.JMCService(); this.initialize(createUI); } Object.defineProperty(HeaderControl.prototype, "isReady", { get: function () { return this._isReady; }, enumerable: true, configurable: true }); Object.defineProperty(HeaderControl.prototype, "testEventObject", { get: function () { return this._testEventObject; }, enumerable: true, configurable: true }); Object.defineProperty(HeaderControl.prototype, "jmcService", { get: function () { return this._jmcService; }, enumerable: true, configurable: true }); Object.defineProperty(HeaderControl.prototype, "currentTitle", { get: function () { return this._currentTitle; }, enumerable: true, configurable: true }); Object.defineProperty(HeaderControl.prototype, "selectedTabElement", { get: function () { return this._tabControl.selectedTab; }, enumerable: true, configurable: true }); Object.defineProperty(HeaderControl.prototype, "selectedTabName", { get: function () { return this._tabControl.selectedTabName; }, enumerable: true, configurable: true }); Object.defineProperty(HeaderControl.prototype, "selectedTabPluginId", { get: function () { return this._tabControl.selectedTabPluginId; }, enumerable: true, configurable: true }); HeaderControl.prototype.onAttached = function () { }; HeaderControl.prototype.onDetached = function () { this._jmcService.save().done(); }; HeaderControl.prototype.onInspectElement = function (elementId) { if (elementId) { Plugin.F12.setInspectElementId(elementId); } Plugin.F12.activateTab(Plugin.F12.PluginId.Dom); }; HeaderControl.prototype.onDocumentComplete = function (href) { this._currentTitle = Common.ToolWindowHelpers.createShortenedUrlText(href); this._headerDispatch.notifyPageChanged(this._currentTitle); }; HeaderControl.prototype.onConsoleErrorsUpdated = function (count) { if (count === 1) { this._tabControl.showBadge(Plugin.F12.PluginId.Console, 2 /* Error */, Plugin.Resources.getString("BadgeConsoleSingleError"), count); } else if (count > 0) { this._tabControl.showBadge(Plugin.F12.PluginId.Console, 2 /* Error */, Plugin.Resources.getString("BadgeConsoleErrorCount", count), count); } else { this._tabControl.hideBadge(Plugin.F12.PluginId.Console); } return true; }; HeaderControl.prototype.onProfilerStateUpdated = function (pluginId, profilingStarted) { if (profilingStarted) { this._tabControl.showBadge(pluginId, 0 /* Running */, Plugin.Resources.getString("BadgeProfilerActive")); } else { this._tabControl.hideBadge(pluginId); } return true; }; HeaderControl.prototype.onEmulationStateUpdated = function (isActive, text, tooltip) { if (isActive) { this._tabControl.showBadge(Plugin.F12.PluginId.Emulation, 3 /* Info */, Plugin.Resources.getString("BadgeEmulationActive")); } else { this._tabControl.hideBadge(Plugin.F12.PluginId.Emulation); } this._emulationText.textContent = (isActive ? text : tooltip); var tooltipFormat = this._headerDispatch.getLocalizedRCString((isActive ? HeaderControl.IDS_EMULATIONENABLED_BUTTON_TOOLTIP : HeaderControl.IDS_EMULATIONDISABLED_BUTTON_TOOLTIP)); tooltipFormat = tooltipFormat.replace("%1", tooltip); Common.ButtonHelpers.setButtonTooltip(this._emulationMenu, tooltipFormat, false); return true; }; HeaderControl.prototype.onCloseButtonClicked = function () { this._headerDispatch.closeF12(); }; HeaderControl.prototype.onDockButtonClicked = function () { if (!Plugin.F12.Debugger.getIsAtBreakpoint()) { this._headerDispatch.toggleDockedState(); } }; HeaderControl.prototype.onBringToForgroundButtonClicked = function () { if (!Plugin.F12.Debugger.getIsAtBreakpoint()) { this._headerDispatch.toggleForegroundWindow(); } }; HeaderControl.prototype.onHelpButtonClicked = function () { Plugin.F12.openBrowser(HeaderControl.HELP_LINK); }; HeaderControl.prototype.onConsoleButtonClicked = function () { this._headerDispatch.toggleConsole(); }; HeaderControl.prototype.onEmulationButtonClicked = function () { var _this = this; if (!Plugin.F12.Debugger.getIsAtBreakpoint()) { Plugin.F12.Communications.callMethod(Plugin.F12.PluginId.Emulation, "getemulationquickaccessmenuitems").done(function (items) { if (_this._emulationContextMenu) { _this._emulationContextMenu.dispose(); _this._emulationContextMenu = null; } var createCallback = function (isChecked) { return function () { return isChecked; }; }; var menuItems = []; for (var i = 0; i < items.length; i++) { var item = items[i]; menuItems.push({ id: JSON.stringify(item.id), label: item.label, type: 0 /* checkbox */, checked: createCallback(item.checked), cssClass: "headerMenuRow" }); } _this._emulationContextMenu = Plugin.ContextMenu.create(menuItems, "emulationContextMenu", null, null, function (menuId, menuItem) { if (!Plugin.F12.Debugger.getIsAtBreakpoint()) { Plugin.F12.Communications.callMethod(Plugin.F12.PluginId.Emulation, "setemulationdocmode", [menuItem.id]); } _this._emulationMenu.focus(); }); _this._emulationContextMenu.show(_this._emulationMenu.getBoundingClientRect().left, window.innerHeight); }); } }; HeaderControl.prototype.onHostInfoChanged = function (info) { if (info.isDocked) { document.body.classList.add("dockedWindow"); } else { document.body.classList.remove("dockedWindow"); } }; HeaderControl.prototype.onBreakStateChange = function (isBroken) { Common.ButtonHelpers.changeButtonStatus(this._bringIEToForegroundButton, !isBroken); Common.ButtonHelpers.changeButtonStatus(this._dockButton, !isBroken); Common.ButtonHelpers.changeButtonStatus(this._emulationMenu, !isBroken); if (isBroken) { this._tabControl.showBadge(Plugin.F12.PluginId.Debugger, 4 /* Break */, this._headerDispatch.getLocalizedString(HeaderControl.PAUSED_AT_BREAKPOINT_STRING)); } else { this._tabControl.hideBadge(Plugin.F12.PluginId.Debugger); } }; HeaderControl.prototype.onConsoleStateChanged = function (isShown) { Common.ButtonHelpers.changeButtonStatus(this._consoleButton, true, isShown); }; HeaderControl.prototype.createButtonHandlers = function (button, callback) { var _this = this; button.addEventListener("click", function () { callback.call(_this); }); button.addEventListener("keydown", function (e) { if (!button.disabled && (e.keyCode === 32 /* Space */ || e.keyCode === 13 /* Enter */)) { callback.call(_this); } }); }; HeaderControl.prototype.initialize = function (createUI) { var _this = this; this._tabControl = new Header.TabControl(); this._tabControl.addEventListener("tabClicked", function (pluginId) { return _this.onTabSelectedByControl(pluginId); }); Common.ButtonHelpers.setupButton(this._closeButton, this._headerDispatch.getLocalizedRCString(HeaderControl.IDS_SHOWCONSOLE_BUTTON_TOOLTIP), function (e) { return _this.onCloseButtonClicked(); }, true, false); Common.ButtonHelpers.setupButton(this._dockButton, this._headerDispatch.getLocalizedRCString(HeaderControl.IDS_DOCK_BUTTON_TOOLTIP), function (e) { return _this.onDockButtonClicked(); }, true, false); Common.ButtonHelpers.setupButton(this._undockButton, this._headerDispatch.getLocalizedRCString(HeaderControl.IDS_UNDOCK_BUTTON_TOOLTIP), function (e) { return _this.onDockButtonClicked(); }, true, false); Common.ButtonHelpers.setupButton(this._bringIEToForegroundButton, this._headerDispatch.getLocalizedRCString(HeaderControl.IDS_FOREGROUND_BUTTON_TOOLTIP), function (e) { return _this.onBringToForgroundButtonClicked(); }, true, false); Common.ButtonHelpers.setupButton(this._helpButton, this._headerDispatch.getLocalizedRCString(HeaderControl.IDS_HELP_BUTTON_TOOLTIP), function (e) { return _this.onHelpButtonClicked(); }, true, false); Common.ButtonHelpers.setupButton(this._consoleButton, this._headerDispatch.getLocalizedRCString(HeaderControl.IDS_SHOWCONSOLE_BUTTON_TOOLTIP), function (e) { return _this.onConsoleButtonClicked(); }, true, false); Common.ButtonHelpers.setupButton(this._emulationMenu, this._headerDispatch.getLocalizedRCString(HeaderControl.IDS_EMULATIONDISABLED_BUTTON_TOOLTIP), function (e) { return _this.onEmulationButtonClicked(); }, true, false); var overflowButton = document.getElementById("overflowButton"); Common.ButtonHelpers.setupButton(overflowButton, this._headerDispatch.getLocalizedString(HeaderControl.ELLIPSIS_STRING), function (e) { return _this._tabControl.onOverflowButtonClicked(); }, true, false); Plugin.F12.Communications.registerMethodHandler("tabSelected", function (pluginId) { return _this.onTabSelectedByFrame(pluginId); }); Plugin.F12.Communications.registerMethodHandler("windowActivation", function (isActiveWindow) { return _this.onWindowActivation(isActiveWindow); }); Plugin.F12.Communications.registerMethodHandler("toggleAlwaysRefreshFromServer", function (enable) { return _this.onToggleAlwaysRefreshFromServer(enable); }); Plugin.F12.Communications.registerMethodHandler("refreshPage", function () { return _this.onRefreshPage(); }); Plugin.F12.Communications.registerMethodHandler("consoleErrorsUpdated", function (count) { return _this.onConsoleErrorsUpdated(count); }); Plugin.F12.Communications.registerMethodHandler("profilerstarted", function (pluginId) { return _this.onProfilerStateUpdated(pluginId, true); }); Plugin.F12.Communications.registerMethodHandler("profilerstopped", function (pluginId) { return _this.onProfilerStateUpdated(pluginId, false); }); Plugin.F12.Communications.registerMethodHandler("emulationStateUpdated", function (isActive, text, tooltip) { return _this.onEmulationStateUpdated(isActive, text, tooltip); }); if (createUI) { this._rpcWrapper = new Header.RpcWrapper(); this._rpcWrapper.onLoadComplete(this); } Plugin.F12.Communications.registerMethodHandler("PopupHidden", function () { var overflowButton = document.getElementById("overflowButton"); overflowButton.classList.remove("menuOpen"); _this._emulationMenu.classList.remove("menuOpen"); return 0; }); Plugin.F12.Communications.registerMethodHandler("OverflowPopupShown", function () { var overflowButton = document.getElementById("overflowButton"); overflowButton.classList.add("menuOpen"); return 0; }); Plugin.F12.Communications.registerMethodHandler("EmulationPopupShown", function () { _this._emulationMenu.classList.add("menuOpen"); return 0; }); Common.NavigationUtilities.registerNavigationFrames([ Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body, function () { return _this._tabControl.selectedElement; }) ]); Common.NavigationUtilities.registerFocusHandlers(Plugin.F12.PluginId.Header); this._jmcService.initialize().done(function () { _this._traceWriter.raiseEvent(801 /* Header_InitializeTabs_Start */); _this.initializeTabs(); window.external.addEventListener("break", function () { return _this.onBreakStateChange(true); }); window.external.addEventListener("run", function () { return _this.onBreakStateChange(false); }); _this.onBreakStateChange(Plugin.F12.Debugger.getIsAtBreakpoint()); Plugin.F12.addEventListener("consolestatehidden", function () { return _this.onConsoleStateChanged(false); }); Plugin.F12.addEventListener("consolestateshown", function () { return _this.onConsoleStateChanged(true); }); _this.onConsoleStateChanged(Plugin.F12.getIsShowingConsole()); Plugin.F12.addEventListener("hostinfochanged", function (e) { return _this.onHostInfoChanged(e); }); _this.onHostInfoChanged(Plugin.F12.getHostInfo()); _this._traceWriter.raiseEvent(802 /* Header_InitializeTabs_Stop */); window.setImmediate(function () { Plugin.F12.notifyOnToolActivated(); }); _this._isReady = true; _this._testEventObject.fireEvent("headerReady"); Plugin.F12.TraceWriter.markToolReady(); }); }; HeaderControl.prototype.initializeTabs = function () { var initialTabId; var pluginInfos = this._headerDispatch.getPluginInfos(); for (var i = 0; i < pluginInfos.length; i++) { var id = pluginInfos[i].id; var type = pluginInfos[i].type; var scriptId = pluginInfos[i].scriptId; var localizedTooltip = pluginInfos[i].scriptId; var tabName = pluginInfos[i].scriptId; try { var manifestFile = this._headerDispatch.readManifestFile(scriptId + "/manifest.json"); var manifest = JSON.parse(manifestFile); if (manifest.name) { localizedTooltip = manifest.name; } if (manifest.f12 && typeof manifest.f12.localized_tooltip_id === "number") { var locTooltip = this._headerDispatch.getLocalizedString(manifest.f12.localized_tooltip_id); if (locTooltip) { tabName = locTooltip.replace("{0}", ""); tabName = tabName.trim(); var index = i + 1; localizedTooltip = locTooltip.replace("{0}", "(Ctrl+" + index + ")"); } } } catch (ex) { } var badgeDisplayType = 1 /* Icon */; if (id === Plugin.F12.PluginId.Dom || id === Plugin.F12.PluginId.Network) { badgeDisplayType = 0 /* None */; } else if (id === Plugin.F12.PluginId.Console) { badgeDisplayType = 2 /* IconAndCount */; } this._tabControl.addTab(id, scriptId, tabName, localizedTooltip, badgeDisplayType); } var id = this._headerDispatch.currentTabId; if (id !== -1) { this._tabControl.selectTabById(id); } this._tabControl.onResize(); }; HeaderControl.prototype.onTabSelectedByControl = function (pluginId) { this._headerDispatch.activateTab(pluginId); }; HeaderControl.prototype.onTabSelectedByFrame = function (pluginId) { this._tabControl.selectTabById(pluginId, false); return true; }; HeaderControl.prototype.onWindowActivation = function (isActiveWindow) { if (isActiveWindow) { document.body.classList.remove("inactiveWindow"); document.getElementById("overflowButton").classList.remove("inactiveWindow"); } else { document.body.classList.add("inactiveWindow"); document.getElementById("overflowButton").classList.add("inactiveWindow"); } return true; }; HeaderControl.prototype.onToggleAlwaysRefreshFromServer = function (enable) { this._rpcWrapper.toggleAlwaysRefreshFromServer(enable); return true; }; HeaderControl.prototype.onRefreshPage = function () { this._rpcWrapper.refreshPage(); return true; }; HeaderControl.HELP_LINK = "http://go.microsoft.com/fwlink/?LinkID=285879"; HeaderControl.IDS_CLOSE_BUTTON_TOOLTIP = 400; HeaderControl.IDS_DOCK_BUTTON_TOOLTIP = 404; HeaderControl.IDS_UNDOCK_BUTTON_TOOLTIP = 405; HeaderControl.IDS_FOREGROUND_BUTTON_TOOLTIP = 406; HeaderControl.IDS_HELP_BUTTON_TOOLTIP = 407; HeaderControl.IDS_SHOWCONSOLE_BUTTON_TOOLTIP = 410; HeaderControl.IDS_HIDECONSOLE_BUTTON_TOOLTIP = 411; HeaderControl.IDS_EMULATIONDISABLED_BUTTON_TOOLTIP = 416; HeaderControl.IDS_EMULATIONENABLED_BUTTON_TOOLTIP = 417; HeaderControl.ELLIPSIS_STRING = 846; HeaderControl.PAUSED_AT_BREAKPOINT_STRING = 484; return HeaderControl; })(); Header.HeaderControl = HeaderControl; })(Host.Header || (Host.Header = {})); var Header = Host.Header; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); // app.ts var F12; (function (F12) { (function (Host) { (function (Header) { "use strict"; var App = (function () { function App() { } App.main = function () { Plugin.addEventListener("pluginready", function () { App.Header = new Header.HeaderControl(); }); }; return App; })(); Header.App = App; })(Host.Header || (Host.Header = {})); var Header = Host.Header; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); PNG  IHDR80sRGBgAMA a pHYsodtEXtSoftwarepaint.net 4.0.3PIDATXG!nQE!!!(IJ,[%U5)}dL|q}羗z)2 +PլӅ !xPmȰ ,бFmPcAUG!Cg: zp lAML!CLf!|1~a@:P)Aҫ9x?0TH`Hv7,liZ >EY^v1]qq'Ox9fD_ D}".?)oNd(o2d-9(o4\K-"`.=.ǷE5!\l:IENDB`PNG  IHDR80 pHYs+8iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-10-02T15:36:26-07:00 2014-10-02T16:35:20-07:00 2014-10-02T16:35:20-07:00 image/png 3 xmp.did:9DE7018D4A8211E48151C8ACA4B7FDB4 xmp.iid:b84beedf-fbdb-9143-839b-76aeb68cb540 xmp.did:b84beedf-fbdb-9143-839b-76aeb68cb540 xmp.did:b84beedf-fbdb-9143-839b-76aeb68cb540 created xmp.iid:b84beedf-fbdb-9143-839b-76aeb68cb540 2014-10-02T15:36:26-07:00 Adobe Photoshop CC (Windows) 1 960000/10000 960000/10000 2 65535 28 56 Z: cHRMz%u0`:o_FIDATx!r0Eu#3!2f"3aEA% j*˲"7]`Ēw P,V pȷ -8:Nr& ,-JV(kQ pW/dUΞW@ #@_.`i;ti.ŇVj PU r0n 0ю5u*LI_ H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-8hiTXtXML:com.adobe.xmp Adobe Photoshop CC 2014 (Windows) 2014-10-06T14:03:10-07:00 2014-10-06T14:29:36-07:00 2014-10-06T14:29:36-07:00 image/png 3 sRGB IEC61966-2.1 xmp.iid:a9f7b251-3587-3f4f-a194-97f637b1b9da xmp.did:a9f7b251-3587-3f4f-a194-97f637b1b9da xmp.did:a9f7b251-3587-3f4f-a194-97f637b1b9da created xmp.iid:a9f7b251-3587-3f4f-a194-97f637b1b9da 2014-10-06T14:03:10-07:00 Adobe Photoshop CC 2014 (Windows) 1 720000/10000 720000/10000 2 1 28 56 &c cHRMz%u0`:o_FIDATxOHTQy39(9Eh[ f1QZ\Fa-YXC-Z UID)efozs?,fy=/L14p8y=0^^"ku9 h4OJ|#K` vI@NNuJ#-jta7y4Z7Lv DubϚ' \$j׹s=+K$dUVbUUO K/^ێ7@HO)y@0b6g"ڨd0'GFt׶/__lj44x%lczlͥ%t&L>sw5 mmF-6>}ҥ,q6jk_k8f⒡0Öi~̘ ?o2Rzļ%3_܍%B[ ۘVt7u r6m$+KȂI#w9iKKhayݻEt/Cyګ _Tz*aP'6-(oMsCyޢ5M V+VbOW."]Pj`ĴޢLGH7 +tf\[|>Jn!*==LnasaM [by6ϩ!)[,t:d7`j -V ;pQ[ZD'{j{ /F꽅ꤑQ՜4bꅢb֗N[_-V[.MGZLW-dc߽JM; {- 㡘x{IENDB`PNG  IHDR80 pHYs+8iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-10-02T15:02:38-07:00 2014-10-02T16:34:43-07:00 2014-10-02T16:34:43-07:00 image/png 3 xmp.did:BA7EA3C24A8211E48845E5F927598723 xmp.iid:c902999b-0f58-5241-8595-ee801f897e78 xmp.did:c902999b-0f58-5241-8595-ee801f897e78 xmp.did:c902999b-0f58-5241-8595-ee801f897e78 created xmp.iid:c902999b-0f58-5241-8595-ee801f897e78 2014-10-02T15:02:38-07:00 Adobe Photoshop CC (Windows) 1 960000/10000 960000/10000 2 65535 28 56 >*O cHRMz%u0`:o_FIDATx10E}TEH[ =k.H[m(5X2H!wĞyxfoa06@YmdOmVv2X;/ֲ6^;Y .8^-P=IVXm!Vb-_k>l&1ܟ; e퓵ALKά5@^w+,v+h$kHúүV^̍L +d,o/v= p <&C)u-g!leT  Ml[hm񓏶;| 8 ~bdyDey&fygybT[LW"؏-p}-@ Adobe Photoshop CC (Windows) 2014-10-02T15:08:44-07:00 2014-10-02T16:33:42-07:00 2014-10-02T16:33:42-07:00 image/png 3 xmp.did:ACCE4A7D4A8211E4929FD956B4C57C63 xmp.iid:2a80b317-5295-5347-b2c8-b754b4c0b987 xmp.did:2a80b317-5295-5347-b2c8-b754b4c0b987 xmp.did:2a80b317-5295-5347-b2c8-b754b4c0b987 created xmp.iid:2a80b317-5295-5347-b2c8-b754b4c0b987 2014-10-02T15:08:44-07:00 Adobe Photoshop CC (Windows) 1 960000/10000 960000/10000 2 65535 28 56 ^F cHRMz%u0`:o_FIDATx/O#A_A8,z9AU:DQ1ne>:0h$QA hȜy'L TI]`7_# q_p;K3c@.(s_c {̮ @aRq+o"0lÊe*tiޞ3F #wC*u{:tw0 #5c;FyPJ%,E0r.F&>(p'@0DUIv3T?3 [@+ nj66ƒ> #Aْrh^)MF^6-//Xk{Fam1}&i˼WcAu.'F>1Z3q-<izeKygY&[l79i{c-H+KZ=V5ͲnH٢՜ Z(:Hjle鞴j/[D-i^-"`U{"z%NIe([>H˦ekmOQcgN[l 7ZO2lIENDB`PNG  IHDR `|"p pHYs+;iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-09-25T17:55:50-07:00 2014-10-02T16:32:14-07:00 2014-10-02T16:32:14-07:00 image/png 3 xmp.iid:4ddf9ff1-562a-de43-9331-9b196c1de536 xmp.did:5b0954bf-2f2a-8345-94be-a55e7bdd0582 xmp.did:5b0954bf-2f2a-8345-94be-a55e7bdd0582 created xmp.iid:5b0954bf-2f2a-8345-94be-a55e7bdd0582 2014-09-25T17:55:50-07:00 Adobe Photoshop CC (Windows) saved xmp.iid:ea12544e-9bb0-f148-9ef0-19a5782e458a 2014-10-02T14:43:15-07:00 Adobe Photoshop CC (Windows) / saved xmp.iid:4ddf9ff1-562a-de43-9331-9b196c1de536 2014-10-02T16:32:14-07:00 Adobe Photoshop CC (Windows) / 1 960000/10000 960000/10000 2 65535 32 96 j cHRMz%u0`:o_FIDATxm0>#$#d F6 #$#t /|WHDƹAx`˱ƃ u pEdfGEPz^e'XѤ:a @9|QȚ/\~Zɏ"rOor!\'"*UbMܞK2}Xz~є>=Y gU0h"C.h&ZrVjrBg61h+p-y\ y4" @?@?@?@?@?@?@?@?@?W2 p3D纤~u]x?-u^˽E~@E~ 'yQϽ'~ ۓ%pQ@k=z3&r!6oD5ɽF-9hr纤Yպ(&~C=aIENDB`PNG  IHDR `|"p pHYs+;iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-10-02T14:48:50-07:00 2014-10-02T17:22:25-07:00 2014-10-02T17:22:25-07:00 image/png 3 xmp.iid:ad69ad98-dbad-f645-8697-0faeddba45bf xmp.did:18ee63a9-bbb3-a743-819e-ec495b86ca79 xmp.did:18ee63a9-bbb3-a743-819e-ec495b86ca79 created xmp.iid:18ee63a9-bbb3-a743-819e-ec495b86ca79 2014-10-02T14:48:50-07:00 Adobe Photoshop CC (Windows) saved xmp.iid:205e19f3-b2d7-4345-af1d-43ed7703e02c 2014-10-02T16:31:47-07:00 Adobe Photoshop CC (Windows) / saved xmp.iid:ad69ad98-dbad-f645-8697-0faeddba45bf 2014-10-02T17:22:25-07:00 Adobe Photoshop CC (Windows) / 1 960000/10000 960000/10000 2 65535 32 96 G" cHRMz%u0`:o_FIDATxm0E?V%l l [EIeI+*-MD$eXyl||@y=iBPxe>,?:fS ;凧b?4zyW~Pxت>'pep0XA8Ş5pʃ B}=E V S6! @,-k|x,pm/0 pMj'pM/}?Zވ~A "r0enVu;>ĭې ,B])Rr~ Їq~bH 64%SYS<8 >6XG~ [~"|O/0 pM/0  ~ u {zA^?vL?!>:ª5IENDB`PNG  IHDR `|"p pHYs+9iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-10-02T14:49:20-07:00 2014-10-02T16:45:33-07:00 2014-10-02T16:45:33-07:00 image/png 3 xmp.iid:b30bf637-9a4d-ab43-bd1f-5e0803f09014 xmp.did:7163c91d-bf23-c945-9540-98d4ccf0344d xmp.did:7163c91d-bf23-c945-9540-98d4ccf0344d created xmp.iid:7163c91d-bf23-c945-9540-98d4ccf0344d 2014-10-02T14:49:20-07:00 Adobe Photoshop CC (Windows) saved xmp.iid:b30bf637-9a4d-ab43-bd1f-5e0803f09014 2014-10-02T16:45:33-07:00 Adobe Photoshop CC (Windows) / 1 960000/10000 960000/10000 2 65535 32 96 w[ cHRMz%u0`:o_FIDATx;0 EQ2Ьl T4HbqTk]folSJZ9$buA[6) ĭ;!nF߆#f t}s>lٶБx;}@ܛ-H%aۯO RH}@j=30IENDB`PNG  IHDR$l  pHYs+9iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-09-25T17:55:50-07:00 2014-10-02T14:42:57-07:00 2014-10-02T14:42:57-07:00 image/png 3 xmp.iid:f3eb9c9d-cf33-b040-a1bf-c790180252e0 xmp.did:b8f5d62a-04e5-a14c-8506-27a3a14b772d xmp.did:b8f5d62a-04e5-a14c-8506-27a3a14b772d created xmp.iid:b8f5d62a-04e5-a14c-8506-27a3a14b772d 2014-09-25T17:55:50-07:00 Adobe Photoshop CC (Windows) saved xmp.iid:f3eb9c9d-cf33-b040-a1bf-c790180252e0 2014-10-02T14:42:57-07:00 Adobe Photoshop CC (Windows) / 1 960000/10000 960000/10000 2 65535 36 108 cHRMz%u0`:o_F1IDATxA 8(/xA{W(Ҁa|DլzmCj@dJ)e]wH 5Pru,RY\ĕM¡I13]\bݾ@BOa ^X:)=t(O M411'2 Adobe Photoshop CC (Windows) 2014-09-29T18:00:32-07:00 2014-10-02T16:31:13-07:00 2014-10-02T16:31:13-07:00 image/png 3 xmp.did:3d55df56-ba72-7d4b-bfd8-a919668cc922 xmp.iid:2f7b9aad-5ddb-044d-9458-25d80fcbb013 xmp.did:19fae623-d785-8f48-982c-d1267e02b5a2 xmp.did:19fae623-d785-8f48-982c-d1267e02b5a2 created xmp.iid:19fae623-d785-8f48-982c-d1267e02b5a2 2014-09-29T18:00:32-07:00 Adobe Photoshop CC 2014 (Windows) saved xmp.iid:2f7b9aad-5ddb-044d-9458-25d80fcbb013 2014-10-02T16:31:13-07:00 Adobe Photoshop CC (Windows) / 1 960000/10000 960000/10000 2 65535 54 108 `2 cHRMz%u0`:o_FIDATxm0_>&e2A  RO@6(#X^ PELIsIH\.OdM xBA0m|زG4c;t'slXc#cS壈d(B xkQوȗ+[K&"cGsD>ruծ+\eAXf+LΞ:bL| z#w~0{\fc8^Xo{;pYf3BCGþ&TR)X9F}{qH%ZMC}c I%X0(R6Bܬzw.c]l9ޝ-b zS N>nkzZIVi.fv,A90mΟi7xM P>v2S"j'^^p8"ښdr9%%%^o5#444JJ*% 1:&QRRbJa,QFdd 5mllt'&&+**b[CC;99RYY0<233 !*''Jjljj\~~4EGGB0x(wtf"lႂ)Ŷq|Cxva|Q;c5ƪ\HMM[8(fQQQmvVmq*,,5ZVV&t+`{<|,==p#8T\\\7 Y(wMlv#p$A5_Fv}ʮ>C!I3 C!~'IENDB`PNG  IHDR `|"p pHYs+8iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-10-02T15:58:46-07:00 2014-10-02T16:30:07-07:00 2014-10-02T16:30:07-07:00 image/png 3 xmp.iid:be7957b3-0d75-404b-b89a-25d20c4e0c83 xmp.did:be7957b3-0d75-404b-b89a-25d20c4e0c83 xmp.did:be7957b3-0d75-404b-b89a-25d20c4e0c83 created xmp.iid:be7957b3-0d75-404b-b89a-25d20c4e0c83 2014-10-02T15:58:46-07:00 Adobe Photoshop CC (Windows) 1 960000/10000 960000/10000 2 65535 32 96 (Y+ cHRMz%u0`:o_FIDATx ENH & H("H $OTUp֪X?(kX\`>X68s K7qh$/@?`6~J*z6ec@:=|6IENDB`PNG  IHDR `|"p pHYs+8iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-10-02T15:56:44-07:00 2014-10-02T16:29:44-07:00 2014-10-02T16:29:44-07:00 image/png 3 xmp.iid:45f685d5-d78e-524e-b215-ebdd2976599f xmp.did:45f685d5-d78e-524e-b215-ebdd2976599f xmp.did:45f685d5-d78e-524e-b215-ebdd2976599f created xmp.iid:45f685d5-d78e-524e-b215-ebdd2976599f 2014-10-02T15:56:44-07:00 Adobe Photoshop CC (Windows) 1 960000/10000 960000/10000 2 65535 32 96 l cHRMz%u0`:o_FIDATx 0 PF`F`/(ٌ2Bfp1jO!<ܙA~ @r$HFJ,gcɉd)\'zŷ=J<\jR9 <GC<)h.Ot!; @@~@П.$zP <X,rg?X)\'6'oY{x`sr`>:wogVkvY8JhMAt>.@o5UQIENDB`PNG  IHDR `|"p cHRMz%u0`:o_F pHYsodtEXtSoftwarepaint.net 4.0.3PIDAThCˍ@EQ@(0X !9zV#4~H5Bbc6MWat F'N08~hϿ0 N0J Adobe Photoshop CC (Windows) 2014-09-25T17:55:50-07:00 2014-10-02T16:35:40-07:00 2014-10-02T16:35:40-07:00 image/png 3 xmp.iid:6572d1fd-df70-434d-97d3-bef1cd9b3812 xmp.did:dafc98dc-ff9c-0746-b417-ddf4d13359a8 xmp.did:dafc98dc-ff9c-0746-b417-ddf4d13359a8 created xmp.iid:dafc98dc-ff9c-0746-b417-ddf4d13359a8 2014-09-25T17:55:50-07:00 Adobe Photoshop CC (Windows) saved xmp.iid:e8559068-f1ff-a042-a13d-92609d5f9f01 2014-10-02T14:41:22-07:00 Adobe Photoshop CC (Windows) / saved xmp.iid:6572d1fd-df70-434d-97d3-bef1cd9b3812 2014-10-02T16:35:40-07:00 Adobe Photoshop CC (Windows) / 1 960000/10000 960000/10000 2 65535 32 96 A cHRMz%u0`:o_FIDATxQDijғ6zjV|x3rnS)<$*!zH54HÄS0 %V9`?^B )`pJ6x 0RΰC:A&ԝX 0`K~@\ "IENDB`PNG  IHDRr ߔtEXtSoftwareAdobe ImageReadyqe<qiTXtXML:com.adobe.xmp ONIDATxڼVjA]k+&iL#BHs ! `^H>EIeaa+A&,&Ia/yF/\켉5M<"B ϾS˜0"  x$L( MT E Nm! 6pIx&8%Y첍]}6QF B+ȡqV'첫#:p)4 c ZD2V*_OeD>9ZHa9s" pe9sq .sHHB,߯&Gc.bqŜ {xѢU6lGk!{6\Wm~[WRGe̝[(tRG(p-42wJ6 Q"Qsiq\{EB2X>f۽Z\xi%p .Zۗ_oK AhմiOӖ2IYJYB]M߿i=j2,u(w0|7n%3!ľ3 sj*j!*)Tmjka1шM11!7}G | lӾ? \HOf,8-őjIENDB`PNG  IHDRr ߔtEXtSoftwareAdobe ImageReadyqe<qiTXtXML:com.adobe.xmp D%BIDATxڼVo@>.hR!$sL!&p 3d XGl0s?ޑko%_B{?}U BP#T e[9aJIdńw' /kN&'aHXš!!FSdUd]G5$D&@xGuRҩ gfI \]ǻ D"3S0rgBk]X"ΐBCuZ璖 $PYN%-1khh!{6 (D`sz]׸ :/cZB&&4cxc]MCb(mK-ҭ萹Zlh=G=6Z\xⲴ6 @GZ/T> 5mnq:ҴLj.YY\!ıh Qqm\=9LEg=8sL`!*FUMmfo זcbIaAHӾa>HO,GoQzIENDB`PNG  IHDRr ߔtEXtSoftwareAdobe ImageReadyqe<qiTXtXML:com.adobe.xmp IDATxڬ1A''BpAD$i8!x\"6bXBKF I,$Ło1gW\!i<,?ː.+6;y7LVs, ʠ 0rEˁRȚ%R@&4`c~ӌ{.2 % 6v q=ڟv_8-15n1F up.E^Zt\qet*焱I.w7 w.Fɛ쐾l~Hx"A ösOfҽqHD>Oa:Ye8v$GLn*5=rQ~3Y>5Zfgsnѷ(k!{p`6-s>}+j^\KL/];I]Ь$#Yy- H7VqWEϼ84[Mc_i}hqB _>ڭWsB> @/Ym,\8V =O-Sw!1 !۶l '`dIDATxb?=-d!U~}{ uu`,x!2F uMBhZie PvM|; hRX˟ab9T!wB@ }. P|X T A "¬,Z}Dc%B̀T + l) t . RdP[*c;((;f4 VBu-HS&EЇe@,F Šf" UHj& MR,䂚Qx RiĆ GmA(vGC7Ff3 Ob*E6ՇЀ,AE5  0`b;Mz!IENDB`PNG  IHDRw= pHYs+ cHRMz%u0`:o_FOIDATxڴ1@EQ@3bcr#cOb\``MTcS6Jсa(;>MόWU u.KOzcU$IPfn>^n"2ПeC;/T4!a"w_V0'I^D.U=~\&"W 0Ͳ<ϟvALMqkm5I㱮 }DQdoMQ>mzRE߷}G֢&C=]u|HM.<ߋȭWn…]]пظBo:*:] 7ɪmq%lL]zoSXx~/+IENDB`PNG  IHDR "p% pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATx @FUqhNhCܤBEQvg`ȾpRLFUԋ0m6gw|/H#ar=gMS% Ǩo L) z^z~=+d\DJ"J%?Wҿ8a5({%Z{P+]"%^w_ ~ox/ߧUͽZU׫-8ÿ*Vl42IENDB`PNG  IHDR "p% pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxK@{X5 mܰ0&"8LU‚D}<_EMZEy l1$\{v$"u?  .items { margin: 0px; padding: 0px; left: 0px; right: 0px; list-style-type: none; white-space: nowrap; position: absolute; } .scroll.virtualizing-list-view > .items { right: 18px; } .grid { box-sizing: border-box; overflow: hidden; position: relative; } .grid ::selection { background: transparent; } .grid-focus { top: 5px; width: 50%; height: 3px; position: absolute; outline: none; } .grid-canvas { left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: auto; position: absolute; box-sizing: border-box; } .has-header.grid .grid-canvas { top: 30px; } .grid-content-spacer { left: 0px; top: 0px; width: 1px; height: 1px; position: absolute; } .grid-header { left: 0px; top: 0px; height: 2.2em; right: 0px; overflow: hidden; position: absolute; z-index: 6; box-sizing: border-box; } .grid-header-canvas { left: 0px; top: 0px; width: 999999px; bottom: 0px; overflow: hidden; position: absolute; box-sizing: border-box; } .grid-header-column { height: 100%; overflow: visible; border-right-color: transparent; border-right-width: 1px; border-right-style: solid; float: left; position: relative; cursor: default; box-sizing: border-box; } .grid-header-column:hover { background-color: TRANSPARENT; /*[{plugin-perftools-grid-header-hover}]*/ } .grid-header-column:hover > .title { color: TRANSPARENT; /*[{plugin-perftools-grid-header-hover-text}]*/ } .grid-header-column:hover .sort-handle { background-position-y: -9px !important; } .grid-header-column > .separator { top: 0px; width: 12px; right: -6px; bottom: 0px; position: absolute; z-index: 6; cursor: e-resize; } .grid-header-column > .sort-handle { height: 9px; margin-left: auto; margin-right: auto; overflow: hidden; right: -5000px; top: 2px; width: 9px; z-index: 3; } .ascending.grid-header-column > .sort-handle { background: url("../Common/images/i_sort_up.png") no-repeat; /*[url({image-sort-up}) no-repeat]*/ background-size: 9px 18px; } .descending.grid-header-column > .sort-handle { background: url("../Common/images/i_sort_down.png") no-repeat; /*[url({image-sort-down}) no-repeat]*/ background-size: 9px 18px; } .grid-header-column > .title { padding: 4px; left: 0px; top: 3px; text-align: left; right: 0px; color: red; /*[{plugin-perftools-grid-header-text}]*/ overflow: hidden; vertical-align: middle; white-space: nowrap; position: absolute; cursor: default; -ms-text-overflow: ellipsis; } .grid-header-column > .indented-title { text-indent: 16px; } .ascending.grid-header-column > .title { } .descending.grid-header-column > .title { } .grid-column-sizing { width: 0px; border-left-color: rgb(204, 204, 204); /*[{plugin-perftools-grid-column-sizer}]*/ border-left-width: 1px; border-left-style: solid; position: absolute; z-index: 5; opacity: 0.5; } .grid-column-moving { padding: 7px 4px 4px; height: 100%; overflow: hidden; vertical-align: middle; white-space: nowrap; position: absolute; z-index: 5; cursor: pointer; -ms-text-overflow: ellipsis; opacity: 0.75; background-color: red !important; } .grid-gutter { left: 0px; top: 0px; width: 30px; height: 50px; overflow: hidden; position: absolute; z-index: 6; } .grid-gutter-canvas { left: 0px; top: 0px; width: 29px; height: 1px; position: absolute; z-index: 5; } .grid-gutter-header { bottom: 0px; left: 0px; position: absolute; top: 0px; width: 30px; z-index: 7; } .grid-gutter-row { height: 1em; overflow: hidden; padding-left: 10px; position: absolute; width: 100%; } .grid-gutter-cell { border: currentColor; cursor: default; display: table-cell; float: left; height: 100%; overflow: hidden; position: absolute; vertical-align: middle; } .grid-gutter-menu { margin: 0px 3px; width: 12px; } .grid-gutter-icon { height: 18px; width: 18px; } .grid-row { width: 100%; color: rgb(0, 0, 0); /*[{plugin-color}]*/ overflow: hidden; position: absolute; cursor: default; box-sizing: border-box; } .grid-row:hover { color: rgb(0, 0, 0); /*[{plugin-treeview-content-mouseover-color}]*/ background-color: rgb(242, 247, 253); /*[{plugin-treeview-content-mouseover-background-color}]*/ } .grid-row-normal { border: 1px solid transparent; } .grid-row-selected, .grid-row-selected:hover { color: rgb(0, 0, 0); /*[{plugin-treeview-content-selected-color}]*/ background-color: rgb(220, 235, 252); /*[{plugin-treeview-content-selected-background-color}]*/ } .grid-row-selected a { text-decoration: none; } .grid-row-selected a:hover { text-decoration: underline; } .grid-row-selected a:visited { } .grid-row-selected a:active { } .grid-row-selected-blur { color: rgb(0, 0, 0); /*[{plugin-treeview-content-inactive-selected-color}]*/ background-color: rgb(230, 230, 230); /*[{plugin-treeview-content-inactive-selected-background-color}]*/ } .grid-row-drop-active { border-top-color: blue; border-top-width: 2px; border-top-style: solid; } .grid-row-dragging { background-color: rgb(230, 230, 230); } .grid-row-group { width: 100%; color: rgb(0, 0, 0); overflow: hidden; font-weight: bold; border-bottom-color: rgb(240, 240, 240); border-bottom-width: 1px; border-bottom-style: solid; position: absolute; cursor: default; background-color: rgb(255, 255, 255); } .grid-cell { padding: 2px 4px 2px 4px; border: currentColor; width: 100px; text-align: left; text-indent: 2px; overflow: hidden; vertical-align: middle; float: left; display: table-cell; white-space: nowrap; position: relative; cursor: default; -ms-text-overflow: ellipsis; } .grid-cell input[type='checkbox'] { margin: 0px; } .grid-cell-first { width: 100%; height: 100%; text-align: left; overflow: hidden; vertical-align: middle; cursor: default; -ms-text-overflow: ellipsis; } .grid-edit-box { border: none; width: 100%; height: 100%; } .grid-tree-icon { text-indent: 0px; position: absolute; cursor: pointer; } .sample-containers { display: none; } .samples-main { left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; position: fixed; } .samples-main > .right { left: 200px; top: 0px; right: 0px; bottom: 0px; overflow: auto; position: absolute; } .samples-main > .right .demoview > div { height: 400px; overflow: auto; } var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (Common) { "use strict"; (function (KeyCodes) { KeyCodes._map = []; KeyCodes.Tab = 9; KeyCodes.Enter = 13; KeyCodes.Escape = 27; KeyCodes.Space = 32; KeyCodes.PageUp = 33; KeyCodes.PageDown = 34; KeyCodes.End = 35; KeyCodes.Home = 36; KeyCodes.ArrowLeft = 37; KeyCodes.ArrowFirst = 37; KeyCodes.ArrowUp = 38; KeyCodes.ArrowRight = 39; KeyCodes.ArrowDown = 40; KeyCodes.ArrowLast = 40; KeyCodes.Delete = 46; KeyCodes.B = 66; KeyCodes.C = 67; KeyCodes.Plus = 107; KeyCodes.Minus = 109; KeyCodes.F1 = 112; KeyCodes.F2 = 113; KeyCodes.F3 = 114; KeyCodes.F4 = 115; KeyCodes.F5 = 116; KeyCodes.F6 = 117; KeyCodes.F7 = 118; KeyCodes.F8 = 119; KeyCodes.F9 = 120; KeyCodes.F10 = 121; KeyCodes.F11 = 122; KeyCodes.F12 = 123; })(Common.KeyCodes || (Common.KeyCodes = {})); var KeyCodes = Common.KeyCodes; (function (MouseCodes) { MouseCodes._map = []; MouseCodes.Left = 1; MouseCodes.Right = 3; MouseCodes.Middle = 2; })(Common.MouseCodes || (Common.MouseCodes = {})); var MouseCodes = Common.MouseCodes; })(DiagnosticsHub.Common || (DiagnosticsHub.Common = {})); var Common = DiagnosticsHub.Common; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var RegisterNamespace = (function () { function RegisterNamespace() { } RegisterNamespace.RegisteredGraphs = { }; RegisterNamespace.register = function register(name) { if(name) { var main = window || this; var arr = name.split("."); var functionName = null; for(var i = 0; i < arr.length; i++) { functionName = main[arr[i]]; if(functionName) { main = functionName; } else { throw new Error("Invalid class name."); } } this.RegisteredGraphs[name] = functionName; } else { throw new Error("Invalid class name."); } }; RegisterNamespace.getRegisteredGraph = function getRegisteredGraph(name) { return this.RegisteredGraphs[name]; }; return RegisterNamespace; })(); DiagnosticsHub.RegisterNamespace = RegisterNamespace; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (Common) { "use strict"; var QpcTimeProperties = (function () { function QpcTimeProperties(collectionStartTime, frequency) { this._collectionStartTime = collectionStartTime; this._frequency = frequency; this._nanosecondToQpcRatio = QpcTimeProperties.NanosecondsInASecond / this._frequency; this._qpcToNanosecondRatio = this._frequency / QpcTimeProperties.NanosecondsInASecond; } QpcTimeProperties.NanosecondsInASecond = 1000000000; QpcTimeProperties.prototype.getCollectionStartTime = function () { return this._collectionStartTime; }; QpcTimeProperties.prototype.getFrequency = function () { return this._frequency; }; QpcTimeProperties.prototype.convertQpcTimestampToNanoseconds = function (qpcValue) { var qpcTicks = DiagnosticsHub.BigNumber.subtract(qpcValue, this._collectionStartTime); var nanoseconds = DiagnosticsHub.BigNumber.multiplyNumber(qpcTicks, this._nanosecondToQpcRatio); return nanoseconds; }; QpcTimeProperties.prototype.convertNanosecondsToQpcTimestamp = function (nanoseconds) { return DiagnosticsHub.BigNumber.multiplyNumber(nanoseconds, this._qpcToNanosecondRatio); }; return QpcTimeProperties; })(); Common.QpcTimeProperties = QpcTimeProperties; })(DiagnosticsHub.Common || (DiagnosticsHub.Common = {})); var Common = DiagnosticsHub.Common; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var __extends = this.__extends || function (d, b) { function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var SeriesType = (function () { function SeriesType() { } Object.defineProperty(SeriesType, "Line", { get: function () { return "Line"; }, enumerable: true, configurable: true }); Object.defineProperty(SeriesType, "StepLine", { get: function () { return "StepLine"; }, enumerable: true, configurable: true }); Object.defineProperty(SeriesType, "Mark", { get: function () { return "Mark"; }, enumerable: true, configurable: true }); return SeriesType; })(); DiagnosticsHub.SeriesType = SeriesType; var ViewType = (function () { function ViewType() { } Object.defineProperty(ViewType, "Graph", { get: function () { return "Graph"; }, enumerable: true, configurable: true }); Object.defineProperty(ViewType, "Ruler", { get: function () { return "Ruler"; }, enumerable: true, configurable: true }); return ViewType; })(); DiagnosticsHub.ViewType = ViewType; (function (GraphState) { GraphState._map = []; GraphState.None = 0; GraphState.Roll = 1; GraphState.Stop = 2; })(DiagnosticsHub.GraphState || (DiagnosticsHub.GraphState = {})); var GraphState = DiagnosticsHub.GraphState; (function (GraphBehaviourType) { GraphBehaviourType._map = []; GraphBehaviourType.None = 0; GraphBehaviourType.Live = 1; GraphBehaviourType.PostMortem = 2; })(DiagnosticsHub.GraphBehaviourType || (DiagnosticsHub.GraphBehaviourType = {})); var GraphBehaviourType = DiagnosticsHub.GraphBehaviourType; var SwimlaneEvents = (function () { function SwimlaneEvents() { } Object.defineProperty(SwimlaneEvents, "Graph", { get: function () { return "graphEvent"; }, enumerable: true, configurable: true }); Object.defineProperty(SwimlaneEvents, "Visibility", { get: function () { return "graphVisibility"; }, enumerable: true, configurable: true }); return SwimlaneEvents; })(); DiagnosticsHub.SwimlaneEvents = SwimlaneEvents; var GraphEvents = (function () { function GraphEvents() { } Object.defineProperty(GraphEvents, "HeaderInfoChanged", { get: function () { return "headerInfoChange"; }, enumerable: true, configurable: true }); Object.defineProperty(GraphEvents, "LegendInfoChanged", { get: function () { return "legendInfoChanged"; }, enumerable: true, configurable: true }); Object.defineProperty(GraphEvents, "ScaleInfoChanged", { get: function () { return "scaleInfoChanged"; }, enumerable: true, configurable: true }); return GraphEvents; })(); DiagnosticsHub.GraphEvents = GraphEvents; (function (AxisPositionType) { AxisPositionType._map = []; AxisPositionType.top = 0; AxisPositionType.middle = 1; AxisPositionType.bottom = 2; })(DiagnosticsHub.AxisPositionType || (DiagnosticsHub.AxisPositionType = {})); var AxisPositionType = DiagnosticsHub.AxisPositionType; (function (ScaleType) { ScaleType._map = []; ScaleType.Left = 0; ScaleType.Right = 1; })(DiagnosticsHub.ScaleType || (DiagnosticsHub.ScaleType = {})); var ScaleType = DiagnosticsHub.ScaleType; (function (GraphType) { GraphType._map = []; GraphType.Unknown = 0; GraphType.Standard = 1; GraphType.Custom = 2; })(DiagnosticsHub.GraphType || (DiagnosticsHub.GraphType = {})); var GraphType = DiagnosticsHub.GraphType; var TitleEvents = (function () { function TitleEvents() { } Object.defineProperty(TitleEvents, "Click", { get: function () { return "click"; }, enumerable: true, configurable: true }); Object.defineProperty(TitleEvents, "KeyPress", { get: function () { return "keydown"; }, enumerable: true, configurable: true }); return TitleEvents; })(); DiagnosticsHub.TitleEvents = TitleEvents; (function (MarkType) { MarkType._map = []; MarkType.LifeCycleEvent = 1; MarkType.UserMark = 2; MarkType.Custom = 3; })(DiagnosticsHub.MarkType || (DiagnosticsHub.MarkType = {})); var MarkType = DiagnosticsHub.MarkType; (function (TickMarkType) { TickMarkType._map = []; TickMarkType.Big = 0; TickMarkType.Medium = 1; TickMarkType.Small = 2; })(DiagnosticsHub.TickMarkType || (DiagnosticsHub.TickMarkType = {})); var TickMarkType = DiagnosticsHub.TickMarkType; (function (UnitFormat) { UnitFormat._map = []; UnitFormat._map[0] = "italicizedAbbreviations"; UnitFormat.italicizedAbbreviations = 0; UnitFormat._map[1] = "fullName"; UnitFormat.fullName = 1; })(DiagnosticsHub.UnitFormat || (DiagnosticsHub.UnitFormat = {})); var UnitFormat = DiagnosticsHub.UnitFormat; (function (ControlsCodeMarkers) { ControlsCodeMarkers._map = []; ControlsCodeMarkers.perfDiagnosticsHub_ToolbarZoomBegin = 25225; ControlsCodeMarkers.perfDiagnosticsHub_ToolbarZoomEnd = 25226; ControlsCodeMarkers.perfDiagnosticsHub_SwimlaneFullRenderBegin = 25227; ControlsCodeMarkers.perfDiagnosticsHub_SwimlaneFullRenderEnd = 25228; ControlsCodeMarkers.perfDiagnosticsHub_GraphContentFullRenderBegin = 25229; ControlsCodeMarkers.perfDiagnosticsHub_GraphContentFullRenderEnd = 25230; ControlsCodeMarkers.perfDiagnosticsHub_GraphContentPartialRenderBegin = 25231; ControlsCodeMarkers.perfDiagnosticsHub_GraphContentPartialRenderEnd = 25232; ControlsCodeMarkers.perfDiagnosticsHub_SwimlaneSelectionHandlingBegin = 25233; ControlsCodeMarkers.perfDiagnosticsHub_SwimlaneSelectionHandlingEnd = 25234; ControlsCodeMarkers.perfDiagnosticsHub_RulerSelectionHandlingBegin = 25235; ControlsCodeMarkers.perfDiagnosticsHub_RulerSelectionHandlingEnd = 25236; })(DiagnosticsHub.ControlsCodeMarkers || (DiagnosticsHub.ControlsCodeMarkers = {})); var ControlsCodeMarkers = DiagnosticsHub.ControlsCodeMarkers; var Padding = (function () { function Padding(left, top, right, bottom) { this.left = left; this.top = top; this.right = right; this.bottom = bottom; } return Padding; })(); DiagnosticsHub.Padding = Padding; var RectangleDimension = (function (_super) { __extends(RectangleDimension, _super); function RectangleDimension(left, top, right, bottom) { _super.call(this, left, top, right, bottom); if(this.left > this.right || this.top > this.bottom) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } } Object.defineProperty(RectangleDimension.prototype, "width", { get: function () { return this.right - this.left; }, enumerable: true, configurable: true }); Object.defineProperty(RectangleDimension.prototype, "height", { get: function () { return this.bottom - this.top; }, enumerable: true, configurable: true }); return RectangleDimension; })(Padding); DiagnosticsHub.RectangleDimension = RectangleDimension; var MinMaxTime = (function () { function MinMaxTime(min, max) { this.min = min; this.max = max; } Object.defineProperty(MinMaxTime.prototype, "range", { get: function () { return DiagnosticsHub.BigNumber.subtract(this.max, this.min); }, enumerable: true, configurable: true }); return MinMaxTime; })(); DiagnosticsHub.MinMaxTime = MinMaxTime; var MinMaxNumber = (function () { function MinMaxNumber(min, max) { this.min = min; this.max = max; } Object.defineProperty(MinMaxNumber.prototype, "range", { get: function () { if((this.min || this.min === 0) && (this.max || this.max === 0)) { return this.max - this.min; } return null; }, enumerable: true, configurable: true }); return MinMaxNumber; })(); DiagnosticsHub.MinMaxNumber = MinMaxNumber; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var ChartColorScheme = (function () { function ChartColorScheme(lineColorString, lineFillColorString) { this._lineColorString = "#FF0000"; this._lineFillColorString = "#FF0000"; this._lineColorString = lineColorString; this._lineFillColorString = lineFillColorString; } Object.defineProperty(ChartColorScheme.prototype, "lineColor", { get: function () { return this._lineColorString; }, enumerable: true, configurable: true }); Object.defineProperty(ChartColorScheme.prototype, "lineFillColor", { get: function () { return this._lineFillColorString; }, enumerable: true, configurable: true }); return ChartColorScheme; })(); DiagnosticsHub.ChartColorScheme = ChartColorScheme; var MultiLineGraph = (function () { function MultiLineGraph(config) { this._series = []; this._graphContainerCss = "graphContainer"; this._isCursorEnabled = false; this._index = 0; this._tabFocusPointList = []; this._graphState = DiagnosticsHub.GraphState.None; this._oldGridX = new DiagnosticsHub.MinMaxTime(DiagnosticsHub.BigNumber.zero, DiagnosticsHub.BigNumber.zero); this._oldValueMin = Number.MIN_VALUE; this._oldValueMax = Number.MIN_VALUE; this._dataWarehouse = null; this._colorSchemes = [ new ChartColorScheme("rgb(118, 174, 200)", "rgba(118, 174, 200, 0.65)"), new ChartColorScheme("rgb(158, 202, 0)", "rgba(158, 202, 0, 0.65)"), new ChartColorScheme("rgb(198, 198, 198)", "rgba(198, 198, 198, 0.75)"), new ChartColorScheme("rgb(167, 148, 50)", "rgba(167, 148, 50, 0.25)") ]; this.chartAxisCount = 5; this.chartAxisIncreaseRatio = 1.1; this.scaleForWhiteSpace = 0.05; this.maxSeriesValue = Number.MIN_VALUE; if(config) { this._config = config; } else { throw new Error("Invalid configuration"); } this._logger = Microsoft.VisualStudio.DiagnosticsHub.getLogger(); this.initialize(); } Object.defineProperty(MultiLineGraph.prototype, "containerClientWidth", { get: function () { if(this._container && (this._containerClientWidth === null || typeof (this._containerClientWidth) === "undefined")) { this._containerClientWidth = this._container.clientWidth; } return this._containerClientWidth; }, set: function (value) { this._containerClientWidth = value; }, enumerable: true, configurable: true }); Object.defineProperty(MultiLineGraph.prototype, "containerClientHeight", { get: function () { if(this._container && (this._containerClientHeight === null || typeof (this._containerClientHeight) === "undefined")) { this._containerClientHeight = this._container.clientHeight; } return this._containerClientHeight; }, set: function (value) { this._containerClientHeight = value; }, enumerable: true, configurable: true }); Object.defineProperty(MultiLineGraph.prototype, "canvasClientWidth", { get: function () { if(this._canvasDiv && (this._canvasClientWidth === null || typeof (this._canvasClientWidth) === "undefined")) { this._canvasClientWidth = this._canvasDiv.clientWidth; } return this._canvasClientWidth; }, set: function (value) { this._canvasClientWidth = value; }, enumerable: true, configurable: true }); MultiLineGraph.prototype.setGraphState = function (graphState) { this._graphState = graphState; }; MultiLineGraph.prototype.resize = function (evt) { if(this._container) { this.containerClientWidth = this._container.clientWidth; this.containerClientHeight = this._container.clientHeight; } if(this._canvasDiv) { this.canvasClientWidth = this._canvasDiv.clientWidth; } if(this.calculateChartSize()) { this.removeFocus(); if(this._refreshDataOnResizeAndZoom && DiagnosticsHub.GraphBehaviourType.PostMortem === this._graphBehaviour) { this.setData(this._config.timeRange); this._logger.debug("function: resize. Set new data for post mortem graph."); } else { this.renderGraph(); this._logger.debug("function: resize. render only. graph behaviour type: " + this._graphBehaviour); } } }; MultiLineGraph.prototype.removeInvalidPoints = function (base) { for(var i = 0; i < this._series.length; i++) { var series = this._series[i]; var finalPoints = series.data; if(finalPoints && finalPoints.length > 0) { var count = 0; for(var j = 0; j <= finalPoints.length; j++) { if(finalPoints[j].Timestamp.greaterOrEqual(base)) { break; } count++; } finalPoints.splice(0, count > 0 ? count - 1 : 0); } } }; MultiLineGraph.prototype.deinitialize = function () { }; MultiLineGraph.prototype.setViewPortTimeRange = function (viewPort) { var viewPortHasChanged = false; var gridX = new DiagnosticsHub.JsonTimespan(this._graphInfo.gridX.min, this._graphInfo.gridX.max); if(!gridX.equals(viewPort)) { viewPortHasChanged = true; this._graphInfo.gridX.min = viewPort.begin; this._graphInfo.gridX.max = viewPort.end; this._config.timeRange = viewPort; if(this.calculateChartSize()) { this.removeFocus(); if(this._refreshDataOnResizeAndZoom && DiagnosticsHub.GraphBehaviourType.PostMortem === this._graphBehaviour) { this.setData(this._config.timeRange); this._logger.debug("function: setViewPortTimeRange. Set new data for post mortem graph."); } else { this.renderGraph(viewPortHasChanged); this._logger.debug("function: setViewPortTimeRange. render only. graph behaviour type: " + this._graphBehaviour); } } } }; MultiLineGraph.prototype.getViewPortTimeRange = function () { return new DiagnosticsHub.JsonTimespan(this._graphInfo.gridX.min, this._graphInfo.gridX.max); }; MultiLineGraph.prototype.getGraphConfiguration = function () { return this._config; }; MultiLineGraph.prototype.addSeriesData = function (counterId, points, fullRender, dropOldData) { if (typeof fullRender === "undefined") { fullRender = true; } if (typeof dropOldData === "undefined") { dropOldData = false; } if(counterId && points && points.length > 0) { var series = null; for(var i = 0; i < this._series.length; i++) { series = this._series[i]; if(series.counterId === counterId) { if(!series.data || dropOldData) { series.data = []; } var newPoints = []; if(this._timeProperties && DiagnosticsHub.GraphBehaviourType.Live === this._graphBehaviour) { for(var j = 0; j < points.length; j++) { var toolTip = points[j].ToolTip; if((toolTip === null || typeof toolTip === "undefined") && this._unitConverter) { var formattedPoint = this.convertToUnits(points[j].Value); toolTip = formattedPoint ? formattedPoint.value + " " + formattedPoint.unit : undefined; var prependText = ""; if(formattedPoint && this._series.length > 1) { prependText = (series.legendText || Plugin.Resources.getString("TooltipValueLabel") || "Value") + ": "; } else if(formattedPoint) { prependText = (Plugin.Resources.getString("TooltipValueLabel") || "Value") + ": "; } toolTip = prependText + toolTip; } newPoints.push({ CustomData: points[j].CustomData, Timestamp: this._timeProperties.convertQpcTimestampToNanoseconds(points[j].Timestamp), ToolTip: toolTip, Value: points[j].Value }); } } else { newPoints = points; } series.data = series.data.concat(newPoints); break; } } if(series && series.data) { var maxPoint = this.getMaxPoint(series.data); this.maxSeriesValue = Math.max(maxPoint.Value, this.maxSeriesValue); this.calculateYRange(maxPoint); this.calculateYRange(this.getMinPoint(series.data)); if(this._oldValueMin !== this._graphInfo.gridY.min || this._oldValueMax !== this._graphInfo.gridY.max) { this._oldValueMin = this._graphInfo.gridY.min; this._oldValueMax = this._graphInfo.gridY.max; var maxNumber = this.convertToUnits(this._graphInfo.gridY.max); var minNumberValue = this.convertToUnits(this._graphInfo.gridY.min).value; this._config.invokeEventListener(DiagnosticsHub.GraphEvents.ScaleInfoChanged, { minimum: minNumberValue, maximum: maxNumber.value, unit: maxNumber.unit }); fullRender = true; } if(this._graphBehaviour === DiagnosticsHub.GraphBehaviourType.Live) { this.renderGraph(fullRender); } } } }; MultiLineGraph.prototype.render = function (fullRender, refresh) { if (typeof fullRender === "undefined") { fullRender = true; } if (typeof refresh === "undefined") { refresh = false; } if(this._container && refresh) { this.containerClientWidth = this._container.clientWidth; this.containerClientHeight = this._container.clientHeight; } this.renderGraph(fullRender); }; MultiLineGraph.prototype.convertToUnitsProcessor = function (value, desiredUnit) { var result = { value: value.toString(), unit: this._config.unit || "" }; if(this._unitConverter) { for(var i = 0; i < this._unitConverter.length; i++) { var units = this._unitConverter[i]; var unit = null; if(this._resource) { unit = this._resource[units.Unit]; } unit = unit || units.Unit; if((!desiredUnit && units.FromValue <= value && value <= units.ToValue) || (desiredUnit === unit)) { if(units.Divider !== 1) { value = value / units.Divider; } var decimals = Math.pow(10, units.Decimals); value = Math.round(value * decimals) / (decimals); result.value = value.toFixed(units.Decimals); result.unit = unit; break; } } } return result; }; MultiLineGraph.prototype.initializeGraphStructure = function () { var _this = this; this._container = document.getElementById(this._config.containerId); if(!this._container) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } this._container.classList.add(this._graphContainerCss); this._container.style.height = this._config.height + "px"; while(this._container.childNodes.length > 0) { this._container.removeChild(this._container.firstChild); } this._canvasDiv = document.createElement("div"); this._canvasDiv.className = "graph-canvas-div"; this._container.appendChild(this._canvasDiv); this._canvas = document.createElement("canvas"); this._canvas.tabIndex = 0; this._canvas.setAttribute("aria-label", this._config.description); if(this._keyPress) { this._canvasDiv.addEventListener("keydown", this._keyPress, true); this._canvasDiv.addEventListener("click", function (evt) { _this._keyPress({ keyCode: DiagnosticsHub.Common.KeyCodes.ArrowLeft }); }.bind(this)); } this._canvasDiv.appendChild(this._canvas); this._canvas.className = "graph-canvas"; this._canvas.addEventListener("mousemove", this.onMouseOver.bind(this)); this._canvas.addEventListener("mouseout", this.onMouseOut.bind(this)); if(!this._container.runtimeStyle.position || this._container.runtimeStyle.position === "static") { this._container.style.position = "relative"; } this._context = this._canvas.getContext("2d"); Plugin.Theme.addEventListener("themechanged", this.onThemeChanged.bind(this)); }; MultiLineGraph.prototype.initialize = function () { if(this._config.resources) { this._resource = this._config.resources; } var jsonObject = this._config.jsonConfig; this._setScaleValueViaAnalyzer = jsonObject.SetScaleValueViaAnalyzer || false; this._isScaleFixed = jsonObject.IsScaleFixed || false; this._config.scale.axes = jsonObject.Axes || []; this._graphInfo = { gridX: new DiagnosticsHub.MinMaxTime(this._config.timeRange.begin, this._config.timeRange.end), gridY: new DiagnosticsHub.MinMaxNumber(this._config.scale.minimum, this._config.scale.maximum), chartDrawFill: true, chartRect: null }; this._oldGridX = new DiagnosticsHub.MinMaxTime(this._config.timeRange.begin, this._config.timeRange.end); if(jsonObject.TimeProperties) { this._timeProperties = jsonObject.TimeProperties; } if(jsonObject.GraphBehaviour) { this._graphBehaviour = jsonObject.GraphBehaviour; } if(!this._config.legend) { this._config.legend = { data: [] }; } var colorIndex = 0; for(var i = 0; i < jsonObject.Series.length; i++) { var series = jsonObject.Series[i]; if(this._resource && this._resource[series.Legend]) { series.Legend = this._resource[series.Legend]; } if(this._resource && this._resource[series.LegendTooltip]) { series.LegendTooltip = this._resource[series.LegendTooltip]; } var color = series.Color ? new ChartColorScheme(series.Color.Line, series.Color.Fill) : colorIndex < this._colorSchemes.length ? this._colorSchemes[colorIndex++] : this._colorSchemes[colorIndex % this._colorSchemes.length]; this.addSeries(series.Legend, series.DataSource.CounterId, series.SeriesType, color); this._config.legend.data.push({ legendText: series.Legend, color: this._series[i].colorScheme.lineColor, legendTooltip: series.LegendTooltip }); } if(jsonObject.Unit && typeof jsonObject.Unit === "string") { this._config.unit = jsonObject.Unit; if(this._resource && this._resource[jsonObject.Unit]) { this._config.unit = this._resource[jsonObject.Unit]; } } if(jsonObject.Units) { this._unitConverter = jsonObject.Units; } if(jsonObject.RefreshDataOnResizeAndZoom) { this._refreshDataOnResizeAndZoom = jsonObject.RefreshDataOnResizeAndZoom || false; } this._keyPress = this.onKeyPress.bind(this); this._hideCursor = this.hideCursor.bind(this); if(this._config.loadCss) { this._config.loadCss("MultiLineGraph.css"); } }; MultiLineGraph.prototype.renderGraph = function (fullRender) { if (typeof fullRender === "undefined") { fullRender = true; } if(fullRender) { Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_GraphContentFullRenderBegin); } else { Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_GraphContentPartialRenderBegin); } if(!this._container) { this.initializeGraphStructure(); if(this._config.jsonConfig.GraphBehaviour === DiagnosticsHub.GraphBehaviourType.PostMortem) { this.setData(this._config.timeRange); } } if(fullRender) { this._container.style.backgroundColor = Plugin.Theme.getValue("plugin-background-color"); this.calculateChartSize(); if(0 <= this.containerClientWidth && 0 <= this._config.height) { this._graphInfo.chartRect = new DiagnosticsHub.RectangleDimension(0, 0, this.containerClientWidth, this._config.height); this.drawChartBackground(); this.renderSeries(fullRender); } } else { this.renderSeries(fullRender); } this.createPointIndexInfoList(fullRender); if(fullRender) { Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_GraphContentFullRenderEnd); } else { Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_GraphContentPartialRenderEnd); } }; MultiLineGraph.prototype.setData = function (timeRange) { var _this = this; if(!this._config || !this._config.jsonConfig || !this._config.jsonConfig.Series) { this._logger.warning("Configuration of current multiline graph is not initialized."); return; } this._logger.info("setData(..) call"); this._logger.info("Collect configurations from json configuration for which we expect to load data from data warehouse."); var dlConfiguration = []; var jsonConfig = this._config.jsonConfig; for(var i = 0; i < jsonConfig.Series.length; i++) { var series = jsonConfig.Series[i]; if(series) { var dataSource = series.DataSource; if(dataSource && dataSource.CounterId && dataSource.AnalyzerId) { var seriesConfig = { counterId: dataSource.CounterId, analyzerId: dataSource.AnalyzerId }; if(dataSource.CustomDomain) { seriesConfig.customDomain = dataSource.CustomDomain; } dlConfiguration.push(seriesConfig); this._logger.debug("Configuration for series: " + JSON.stringify(seriesConfig)); } } } if(dlConfiguration.length === 0) { this._logger.debug("Current multiline graph does not expect data from analyzers."); return; } var dwLoadTask = null; this._logger.info("Preloading data warehouse."); if(!this._dataWarehouse) { this._logger.debug("this._dataWarehouse is null, trying to load it first time on this view."); dwLoadTask = Microsoft.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().then(function (dw) { this._dataWarehouse = dw; return Plugin.Promise.wrap(this._dataWarehouse); }.bind(this)); } else { this._logger.debug("this._dataWarehouse is not null"); dwLoadTask = Plugin.Promise.wrap(this._dataWarehouse); } var convertToGraphDataPoints = function (counterId, dp) { var arr = []; var series = null; for(var i = 0; i < _this._series.length; i++) { series = _this._series[i]; if(series.counterId === counterId) { for(var i = 0; i < dp.length; i++) { var toolTipValue = dp[i].tt; if(!toolTipValue && typeof dp[i].v === "number") { var formattedPoint = _this.convertToUnits(dp[i].v); toolTipValue = formattedPoint.value + " " + formattedPoint.unit; var prependText = ""; if(_this._series.length > 1) { prependText = (series.legendText || Plugin.Resources.getString("TooltipValueLabel") || "Value") + ": "; } else { prependText = (Plugin.Resources.getString("TooltipValueLabel") || "Value") + ": "; } toolTipValue = prependText + toolTipValue; } arr.push({ Timestamp: new DiagnosticsHub.BigNumber(dp[i].t.h, dp[i].t.l), Value: dp[i].v, ToolTip: dp[i].tt || toolTipValue }); } break; } } return arr; }.bind(this); dwLoadTask.then(function (dw) { var _this = this; this._logger.info("Data warehouse is loaded. Starting to load the data."); var promises = []; for(var i = 0; i < dlConfiguration.length; i++) { this._logger.debug("Loading data for counter name '" + dlConfiguration[i].counterId + "' from analyzer '" + dlConfiguration[i].analyzerId + "'"); this._logger.debug("Graph height: " + JSON.stringify(this._config.height) + " Graph Width: " + this.containerClientWidth); var contextData = { customDomain: { CounterId: dlConfiguration[i].counterId, Height: this._config.height.toString(), Width: this.containerClientWidth.toString() }, timeDomain: timeRange }; this._logger.debug("Data Context: " + JSON.stringify(contextData)); if(dlConfiguration[i].customDomain) { for(var propertyName in dlConfiguration[i].customDomain) { if(dlConfiguration[i].customDomain.hasOwnProperty(propertyName)) { var value = dlConfiguration[i].customDomain[propertyName]; if(value !== null && typeof value !== "string") { this._logger.warning("Custom domain property '" + propertyName + "' is not a string, it will be converted to string"); value = value.toString(); } contextData.customDomain[propertyName] = value; } } } var pushPromise = function (config, context) { promises.push(dw.getFilteredData(context, config.analyzerId).then(function (data) { if(!data) { data = { }; } data.counterId = config.counterId; return data; }.bind(_this))); }.bind(this); pushPromise(dlConfiguration[i], contextData); } Plugin.Promise.join(promises).done(function (data) { if(data && data.length > 0) { for(var i = 0; i < data.length; i++) { if(data[i].p) { if(this._setScaleValueViaAnalyzer && (data[i].mn !== null && typeof data[i].mn !== "undefined") && (data[i].mx !== null && typeof data[i].mx !== "undefined")) { if((this._graphInfo.gridY.min === null || typeof this._graphInfo.gridY.min === "undefined") && (this._graphInfo.gridY.max === null || typeof this._graphInfo.gridY.max === "undefined")) { this._graphInfo.gridY.min = data[i].mn; this._graphInfo.gridY.max = data[i].mx; } else { this._graphInfo.gridY.min = Math.min(data[i].mn, this._graphInfo.gridY.min); this._graphInfo.gridY.max = Math.max(data[i].mx, this._graphInfo.gridY.max); } this._logger.debug("new scale min: " + this._graphInfo.gridY.min + " and max: " + this._graphInfo.gridY.max); } this.addSeriesData(data[i].counterId, convertToGraphDataPoints(data[i].counterId, data[i].p), true, true); } } this.renderGraph(true); } }.bind(this), function (err) { this._logger.error("Could not load data points for counter :" + dlConfiguration[i].counterId + ", error: " + JSON.stringify(err)); }.bind(this)); }.bind(this), function (err) { this._logger.error("Error on datawarehouse loading:" + JSON.stringify(err)); throw err; }.bind(this)); }; MultiLineGraph.prototype.renderSeries = function (fullRender) { for(var seriesIndex = 0; seriesIndex < this._series.length; seriesIndex++) { var series = this._series[seriesIndex]; series.render(this._context, this._graphInfo, fullRender); } }; MultiLineGraph.prototype.convertToUnits = function (value) { return this.convertToUnitsProcessor(value, this.graphUnitOverride); }; MultiLineGraph.prototype.onThemeChanged = function (args) { this._container.style.backgroundColor = Plugin.Theme.getValue("plugin-background-color"); this.renderGraph(); }; MultiLineGraph.prototype.calculateChartSize = function () { var isCalculated = false; if(this.containerClientWidth > 0 && this.containerClientHeight > 0) { var canvasWidth = this.containerClientWidth; var canvasHeight = this._config.height; this._canvas.height = canvasHeight; this._canvas.width = canvasWidth; isCalculated = true; } return isCalculated; }; MultiLineGraph.prototype.convertToChartAreaPercentage = function (event) { var rect = this._canvas.getBoundingClientRect(); var mouseX = event.clientX - rect.left; return (mouseX) / this.canvasClientWidth * 100; }; MultiLineGraph.prototype.drawChartBackground = function () { this._context.fillStyle = "rgba(0, 0, 0, 0)"; this._context.fillRect(0, 0, this._canvas.width, this._canvas.height); }; MultiLineGraph.prototype.convertChartAreaPercentToDataValue = function (percent) { percent *= 100; var gridXWidth = DiagnosticsHub.BigNumber.subtract(this._graphInfo.gridX.max, this._graphInfo.gridX.min); var distanceFromLeft = DiagnosticsHub.BigNumber.multiplyNumber(gridXWidth, percent); distanceFromLeft = DiagnosticsHub.BigNumber.divideNumber(distanceFromLeft, 10000); return DiagnosticsHub.BigNumber.add(distanceFromLeft, this._graphInfo.gridX.min); }; MultiLineGraph.prototype.calculateYRange = function (point) { if(this._isScaleFixed) { return; } if(point && !this._setScaleValueViaAnalyzer) { if(this._graphInfo.gridY.min > point.Value) { this._graphInfo.gridY.min = Math.floor((point.Value * this.chartAxisIncreaseRatio) / this.chartAxisCount) * this.chartAxisCount; } if(this._graphBehaviour === DiagnosticsHub.GraphBehaviourType.PostMortem) { if(this._graphInfo.gridY.max < point.Value) { this._graphInfo.gridY.max = Math.ceil((point.Value * this.chartAxisIncreaseRatio) / this.chartAxisCount) * this.chartAxisCount; } } else { if(this._graphInfo.gridY.max < point.Value + Math.ceil(this._graphInfo.gridY.max * this.scaleForWhiteSpace)) { this._graphInfo.gridY.max = Math.ceil((point.Value * this.chartAxisIncreaseRatio) / this.chartAxisCount) * this.chartAxisCount; } } } }; MultiLineGraph.prototype.addSeries = function (legendText, counterId, type, color) { var newSeries; if(type && type === DiagnosticsHub.SeriesType.StepLine) { newSeries = new StepLineSeries(this._series.length, counterId, legendText, this._graphBehaviour, color); } else { newSeries = new LineSeries(this._series.length, counterId, legendText, this._graphBehaviour, color); } this._series.push(newSeries); var filledLines = 0; for(var i = 0; i < this._series.length; i++) { filledLines++; if(filledLines > 1) { this._graphInfo.chartDrawFill = false; break; } } }; MultiLineGraph.prototype.createVerticalRulerLine = function (position) { var x = this.containerClientWidth * position / 100; x = Math.round(x) + 0.5; this._context.save(); this._context.beginPath(); this._context.strokeStyle = Plugin.Theme.getValue("diagnostics-host-graph-line"); this._context.lineWidth = 1; this._context.moveTo(x, 0); this._context.lineTo(x, this._config.height); this._context.closePath(); this._context.stroke(); this._context.restore(); }; MultiLineGraph.prototype.getMaxPoint = function (points) { var max; if(points) { if(points.length > 0) { max = points[0]; } for(var i = 1; i < points.length; i++) { if(points[i].Value > max.Value) { max = points[i]; } } } return max; }; MultiLineGraph.prototype.getMinPoint = function (points) { var min; if(points) { if(points.length > 0) { min = points[0]; } for(var i = 1; i < points.length; i++) { if(points[i].Value < min.Value) { min = points[i]; } } } return min; }; MultiLineGraph.prototype.drawToolTip = function (timestamp, points) { if(!points || points.length === 0) { return; } var pointsWithMessages = []; for(var i = 0; i < points.length; i++) { if(points[i].ToolTip !== null && typeof points[i].ToolTip !== "undefined" && points[i].ToolTip !== "undefined" && points[i].ToolTip !== "") { pointsWithMessages.push(points[i].ToolTip); } } if(pointsWithMessages.length > 0) { var message = (Plugin.Resources.getString("TooltipTimeLabel") || "Time") + ": " + DiagnosticsHub.RulerUtilities.formatTime(timestamp) + "\n" + pointsWithMessages.join("\n"); var config = { content: message, delay: 0 }; Plugin.Tooltip.show(config); } }; MultiLineGraph.prototype.getMousePosition = function (evt) { var rect = this._canvas.getBoundingClientRect(); var root = document.documentElement; return { MouseX: evt.clientX - rect.left, MouseY: evt.clientY - rect.top }; }; MultiLineGraph.prototype.onMouseOver = function (evt) { var mousePos = this.getMousePosition(evt); if((!this._oldMousePosition || this._oldMousePosition.MouseY !== mousePos.MouseY) && this.containerClientWidth - 2 > mousePos.MouseY && mousePos.MouseY <= this._config.height && mousePos.MouseY > 0) { (Plugin).Tooltip.dismiss(); var foundPoints = this.getPointsBelowMousePointer(mousePos); if(this._isCursorEnabled) { this.drawCursor(mousePos); } if(foundPoints && foundPoints.length !== 0) { var timeStamp = this.getTimestampForMouseCoordinates(mousePos); this.drawToolTip(timeStamp, foundPoints); } } this._oldMousePosition = mousePos; }; MultiLineGraph.prototype.hideCursor = function () { if(this._isCursorEnabled) { var mdiv = MultiLineGraph.Cursor; if(!mdiv) { mdiv = MultiLineGraph.Cursor = document.getElementById("mDiv"); } if(mdiv) { mdiv.style.visibility = "hidden"; } } (Plugin).Tooltip.dismiss(); }; MultiLineGraph.prototype.onMouseOut = function (evt) { var mousePos = this.getMousePosition(evt); if(mousePos.MouseX > this.containerClientWidth - 2 || mousePos.MouseY > this._config.height || mousePos.MouseY < 0) { this.hideCursor(); } }; MultiLineGraph.prototype.drawCursor = function (point) { var mdiv = MultiLineGraph.Cursor; if(!mdiv) { mdiv = MultiLineGraph.Cursor = document.getElementById("mDiv"); } if(!mdiv) { mdiv = document.createElement("div"); mdiv.className = "graph-cursor"; mdiv.id = "mDiv"; mdiv.style.left = point.MouseX.toString() + "px"; mdiv.style.top = "0px"; mdiv.style.height = (this._canvas.height).toString() + "px"; mdiv.style.visibility = "visible"; mdiv.style.zIndex = "2"; this._canvasDiv.appendChild(mdiv); } else { mdiv.style.left = point.MouseX.toString() + "px"; mdiv.style.top = "0px"; mdiv.style.visibility = "visible"; } }; MultiLineGraph.prototype.getTimestampForMouseCoordinates = function (mousePosition) { return this.convertChartAreaPercentToDataValue(100.0 * mousePosition.MouseX / this._canvas.width); }; MultiLineGraph.prototype.getPointsBelowMousePointer = function (mousePosition) { var cursorTimestamp = this.getTimestampForMouseCoordinates(mousePosition); var foundPoints = []; for(var i = 0; i < this._series.length; i++) { var seriesData = this._series[i].data; if(seriesData && seriesData.length > 0) { for(var j = 1; j < seriesData.length; j++) { var previousPoint = seriesData[j - 1]; var renderedPoint = seriesData[j]; if(typeof renderedPoint.xPx !== "undefined" && typeof previousPoint.xPx !== "undefined" && renderedPoint.Timestamp.greater(cursorTimestamp) && !previousPoint.Timestamp.greater(cursorTimestamp)) { foundPoints.push(previousPoint); break; } } } } return foundPoints; }; MultiLineGraph.prototype.onKeyPress = function (evt) { if(this._series && (DiagnosticsHub.Common.KeyCodes.ArrowLeft === evt.keyCode || DiagnosticsHub.Common.KeyCodes.ArrowRight === evt.keyCode)) { if(DiagnosticsHub.Common.KeyCodes.ArrowLeft === evt.keyCode) { this._index--; if(this._index < 0) { this._index = this._tabFocusPointList.length - 1; } } else if(DiagnosticsHub.Common.KeyCodes.ArrowRight === evt.keyCode) { this._index++; if(this._index >= this._tabFocusPointList.length) { this._index = 0; } } this.focusPoint(this._tabFocusPointList[this._index]); } else if(DiagnosticsHub.Common.KeyCodes.Tab === evt.keyCode) { this.removeFocus(); } }; MultiLineGraph.prototype.focusPoint = function (pointInfo) { var isMoved = false; var series = this._series[pointInfo.seriesIndex]; if(series && series.visiblePoints) { var point = series.visiblePoints[pointInfo.pointIndex]; var divs = this._canvasDiv.getElementsByClassName("graph-focus"); while(divs.length > 0) { this._canvasDiv.removeChild(divs[0]); } var focusDiv = document.createElement("div"); focusDiv.classList.add("graph-focus"); if(point.xPx <= 0) { focusDiv.style.left = "2px"; } else if(point.xPx >= this.containerClientWidth) { focusDiv.style.left = this.containerClientWidth - 2 + "px"; } else { focusDiv.style.left = point.xPx + "px"; } if(point.yPx <= 0) { focusDiv.style.top = "2px"; } else if(point.yPx >= this._config.height) { focusDiv.style.top = this._config.height - 2 + "px"; } else { focusDiv.style.top = point.yPx + "px"; } Plugin.Tooltip.dismiss(); var message = (Plugin.Resources.getString("TooltipTimeLabel") || "Time") + ": " + DiagnosticsHub.RulerUtilities.formatTime(point.Timestamp) + "\n" + point.ToolTip; var config = { content: message, delay: 0 }; focusDiv.addEventListener("keydown", this.showTooltip.bind(this, config)); focusDiv.addEventListener("blur", function () { Plugin.Tooltip.dismiss(); }); focusDiv.setAttribute("aria-label", message); this._canvasDiv.appendChild(focusDiv); focusDiv.focus(); isMoved = true; } return isMoved; }; MultiLineGraph.prototype.showTooltip = function (config, event) { if(event.keyCode === VisualStudio.DiagnosticsHub.Common.KeyCodes.Enter) { var element = event.currentTarget; config.x = window.screenLeft + element.offsetLeft + element.clientWidth + 4; config.y = window.screenTop + element.offsetTop + 4; Plugin.Tooltip.show(config); event.preventDefault(); event.stopPropagation(); return false; } return true; }; MultiLineGraph.prototype.createPointIndexInfoList = function (fullRender) { if (typeof fullRender === "undefined") { fullRender = false; } this._selectedTimeRange = new DiagnosticsHub.MinMaxTime(this._graphInfo.gridX.min, this._graphInfo.gridX.max); this._tabFocusPointList = this.getPointIndexInfoList(new DiagnosticsHub.JsonTimespan(this._graphInfo.gridX.min, this._graphInfo.gridX.max)); if(fullRender) { this._index = -1; } }; MultiLineGraph.prototype.getPointIndexInfoList = function (timespan) { var lists = []; if(this._series) { for(var i = 0; i < this._series.length; i++) { var series = this._series[i]; var seriesPoints = series.visiblePoints; var list = []; for(var j = 0; j < seriesPoints.length; j++) { var seriesPoint = seriesPoints[j]; if(timespan.contains(seriesPoint.Timestamp)) { list.push({ seriesIndex: i, pointIndex: j }); } if(seriesPoint.Timestamp.greater(timespan.end)) { break; } } lists.push(list); } } return this.sortPointIndexInfoList(lists); }; MultiLineGraph.prototype.sortPointIndexInfoList = function (lists) { var finalList = []; if(lists) { while(!this.areAllListEmpty(lists)) { var smallest = null; var index = null; for(var i = 0; i < lists.length; i++) { var list = lists[i]; if(list.length > 0) { var smallestInList = list[0]; if(smallestInList && (!smallest || this._series[smallest.seriesIndex].visiblePoints[smallest.pointIndex].Timestamp.greater(this._series[smallestInList.seriesIndex].visiblePoints[smallestInList.pointIndex].Timestamp))) { smallest = smallestInList; index = i; } } } if(smallest) { finalList.push(lists[index].shift()); } } } return finalList; }; MultiLineGraph.prototype.areAllListEmpty = function (lists) { var allListEmpty = true; if(lists) { for(var i = 0; i < lists.length; i++) { if(lists[i].length > 0) { allListEmpty = false; break; } } } return allListEmpty; }; MultiLineGraph.prototype.removeFocus = function () { this._index = -1; var divs = this._canvasDiv.getElementsByClassName("graph-focus"); for(var i = 0; i < divs.length; i++) { (divs[i]).classList.add("graph-unfocused"); } }; return MultiLineGraph; })(); DiagnosticsHub.MultiLineGraph = MultiLineGraph; var ChartSeries = (function () { function ChartSeries(index, counterId, legendText, type, graphBehaviour, color) { this.index = index; this.data = []; this.colorScheme = color; this.counterId = counterId; this.type = type; this.legendText = legendText; this.graphBehaviour = graphBehaviour; } ChartSeries.prototype.getVisiblePoints = function (chartRect) { return this.getPointsToRender(chartRect, true); }; ChartSeries.prototype.getPointsToRender = function (chartRect, fullRender) { var renderedPoints = []; var seriesPoints = this.data; var seriesIndex = this.index; if(seriesPoints.length > 0) { var startIndex = fullRender ? 0 : seriesPoints.length - 1; var endIndex = seriesPoints.length - 1; var startX = this.info.gridX.min; var rangeX = this.info.gridX.range; var endX = this.info.gridX.max; var scaleX = chartRect.width / parseInt(rangeX.value); if(this.type === DiagnosticsHub.SeriesType.Line || this.type === DiagnosticsHub.SeriesType.StepLine) { if(startIndex === 0) { if(this.type === DiagnosticsHub.SeriesType.Line) { renderedPoints.push({ Timestamp: this.info.gridX.min, Value: seriesPoints[startIndex].Value, ToolTip: seriesPoints[startIndex].ToolTip, CustomData: seriesPoints[startIndex].CustomData, isInView: false, seriesIndex: seriesIndex, xPx: 0, yPx: this.getYCoordinate(seriesPoints[startIndex].Value, chartRect.top, chartRect.height) }); } else if(this.type === DiagnosticsHub.SeriesType.StepLine) { renderedPoints.push({ Timestamp: seriesPoints[startIndex].Timestamp, Value: this.info.gridY.min, ToolTip: seriesPoints[startIndex].ToolTip, CustomData: seriesPoints[startIndex].CustomData, isInView: false, seriesIndex: seriesIndex, xPx: chartRect.left + parseInt(DiagnosticsHub.BigNumber.subtract(seriesPoints[startIndex].Timestamp, startX).value) * scaleX, yPx: this.getYCoordinate(this.info.gridY.min, chartRect.top, chartRect.height) }); } } else { startIndex--; } } var x = 0; var y = 0; var startPoint = seriesPoints[startIndex]; var hasMovedToStart = false; for(var i = startIndex; i <= endIndex; i++) { var point = seriesPoints[i]; var pointInView = point.Timestamp.greaterOrEqual(startX) && endX.greaterOrEqual(point.Timestamp); var requiresDrawing = pointInView; point.isInView = pointInView; point.seriesIndex = seriesIndex; if(!requiresDrawing) { if((startX.greater(point.Timestamp) && i < endIndex && seriesPoints[i + 1].Timestamp.greater(startX)) || (point.Timestamp.greater(endX) && i > 0 && endX.greater(seriesPoints[i - 1].Timestamp))) { requiresDrawing = true; } } if(requiresDrawing) { x = chartRect.left + parseInt(DiagnosticsHub.BigNumber.subtract(point.Timestamp, startX).value) * scaleX; y = this.getYCoordinate(point.Value, chartRect.top, chartRect.height); point.xPx = Math.floor(x); point.yPx = Math.floor(y); renderedPoints.push(point); } } } return renderedPoints; }; ChartSeries.prototype.getYCoordinate = function (y, top, height) { return top + ((this.info.gridY.max - y) / this.info.gridY.range) * height; }; return ChartSeries; })(); DiagnosticsHub.ChartSeries = ChartSeries; var StepLineSeries = (function (_super) { __extends(StepLineSeries, _super); function StepLineSeries(index, counterId, legendText, graphBehaviour, color) { _super.call(this, index, counterId, legendText, DiagnosticsHub.SeriesType.StepLine, graphBehaviour, color); } StepLineSeries.prototype.render = function (context, info, fullRender) { if(context && !this.context) { this.context = context; } if(info) { this.info = info; } if(this.graphBehaviour !== DiagnosticsHub.GraphBehaviourType.Live) { this.visiblePoints = this.renderedPoints = this.getPointsToRender(this.info.chartRect, fullRender); } else { this.renderedPoints = this.getPointsToRender(this.info.chartRect, fullRender); this.visiblePoints = this.getVisiblePoints(this.info.chartRect); } if(this.renderedPoints && this.renderedPoints.length > 0) { this.drawLineFill(this.renderedPoints, fullRender); this.drawLineSeries(this.renderedPoints, fullRender); } }; StepLineSeries.prototype.drawLineFill = function (renderedPoints, fullRender) { if(this.info.chartDrawFill && renderedPoints.length > 0) { var startIndex = 0; var endIndex = renderedPoints.length - 1; var startX = this.info.gridX.min; var rangeX = this.info.gridX.range; var endX = this.info.gridX.max; var x = 0; var y = 0; var hasMovedToStart = false; this.context.save(); this.context.beginPath(); var previousPoint = renderedPoints[0]; this.context.beginPath(); this.context.fillStyle = this.colorScheme.lineFillColor; this.context.strokeStyle = this.colorScheme.lineColor; for(var i = startIndex; i <= endIndex; i++) { var point = renderedPoints[i]; if(!hasMovedToStart) { this.context.moveTo(point.xPx, point.yPx); hasMovedToStart = true; } else { this.context.lineTo(point.xPx, previousPoint.yPx); this.context.lineTo(point.xPx, point.yPx); } previousPoint = point; } y = this.getYCoordinate(0, this.info.chartRect.top, this.info.chartRect.height); this.context.lineTo(previousPoint.xPx, y); this.context.lineTo(fullRender ? 0 : renderedPoints[0].xPx, y); this.context.closePath(); this.context.fill(); this.context.restore(); } }; StepLineSeries.prototype.drawLineSeries = function (renderedPoints, fullRender) { if(renderedPoints.length > 0) { this.context.save(); this.context.beginPath(); this.context.lineWidth = (this.info.chartRect.height < 100 ? 1 : 2); this.context.fillStyle = this.colorScheme.lineFillColor; this.context.strokeStyle = this.colorScheme.lineColor; var previousPoint = null; for(var i = 0; i < renderedPoints.length; i++) { var rp = renderedPoints[i]; if(i === 0) { this.context.moveTo(renderedPoints[i].xPx, renderedPoints[i].yPx - 0.5); } else { var yPos = this.context.canvas.height - 0.5; if(previousPoint && previousPoint.yPx) { yPos = Math.round(previousPoint.yPx) - 0.5; } this.context.lineTo(rp.xPx, yPos); this.context.lineTo(rp.xPx, Math.round(rp.yPx) - 0.5); } previousPoint = rp; } this.context.stroke(); this.context.restore(); } }; return StepLineSeries; })(ChartSeries); DiagnosticsHub.StepLineSeries = StepLineSeries; var LineSeries = (function (_super) { __extends(LineSeries, _super); function LineSeries(index, counterId, legendText, graphBehaviour, color) { _super.call(this, index, counterId, legendText, DiagnosticsHub.SeriesType.Line, graphBehaviour, color); } LineSeries.prototype.render = function (context, info, fullRender) { if(context && !this.context) { this.context = context; } if(info) { this.info = info; } if(this.graphBehaviour !== DiagnosticsHub.GraphBehaviourType.Live) { this.visiblePoints = this.renderedPoints = this.getPointsToRender(this.info.chartRect, fullRender); } else { this.renderedPoints = this.getPointsToRender(this.info.chartRect, fullRender); this.visiblePoints = this.getVisiblePoints(this.info.chartRect); } if(this.renderedPoints && this.renderedPoints.length > 0) { this.drawLineFill(this.renderedPoints, fullRender); this.drawLineSeries(this.renderedPoints, fullRender); } }; LineSeries.prototype.drawLineFill = function (renderedPoints, fullRender) { if(renderedPoints.length > 0) { var startIndex = 0; var endIndex = renderedPoints.length - 1; var startX = this.info.gridX.min; var rangeX = this.info.gridX.range; var endX = this.info.gridX.max; var x = 0; var y = 0; var hasMovedToStart = false; this.context.save(); this.context.beginPath(); var previousPoint = renderedPoints[0]; this.context.beginPath(); this.context.fillStyle = this.colorScheme.lineFillColor; this.context.strokeStyle = this.colorScheme.lineColor; for(var i = startIndex; i <= endIndex; i++) { var point = renderedPoints[i]; if(!hasMovedToStart) { this.context.moveTo(point.xPx, point.yPx); hasMovedToStart = true; } else { this.context.lineTo(point.xPx, point.yPx); } previousPoint = point; } if(this.info.chartDrawFill) { y = this.getYCoordinate(0, this.info.chartRect.top, this.info.chartRect.height); this.context.lineTo(previousPoint.xPx, y); this.context.lineTo(fullRender ? 0 : renderedPoints[0].xPx, y); this.context.closePath(); this.context.fill(); } else { this.context.stroke(); } this.context.restore(); } }; LineSeries.prototype.drawLineSeries = function (renderedPoints, fullRender) { if(renderedPoints.length > 0) { this.context.save(); if(this.info.chartDrawFill) { this.context.beginPath(); this.context.lineWidth = (this.info.chartRect.height < 100 ? 1 : 2); this.context.fillStyle = this.colorScheme.lineFillColor; this.context.strokeStyle = this.colorScheme.lineColor; for(var i = 0; i < renderedPoints.length; i++) { var rp = renderedPoints[i]; if(i === 0) { this.context.moveTo(renderedPoints[i].xPx, renderedPoints[i].yPx - 0.5); } else { this.context.lineTo(rp.xPx, Math.round(rp.yPx) - 0.5); } } this.context.stroke(); } this.context.restore(); } }; return LineSeries; })(ChartSeries); DiagnosticsHub.LineSeries = LineSeries; Microsoft.VisualStudio.DiagnosticsHub.RegisterNamespace.register("Microsoft.VisualStudio.DiagnosticsHub.MultiLineGraph"); })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (Common) { var Helper = (function () { function Helper() { } Helper.doesObjectExist = function doesObjectExist(objectName, type, context) { type = type || "object"; context = context || window; if(typeof objectName !== "string" || objectName.length === 0 || typeof context === "undefined" || typeof context !== "object" || context === null) { return false; } var names = objectName.split("."), length = names.length, obj = context, i = 0; for(; i < length - 1; i++) { obj = obj[names[i]]; if(typeof obj === "undefined" || typeof obj !== "object" || obj === null) { return false; } } obj = obj[names[i]]; if(typeof obj === type) { return true; } return false; }; return Helper; })(); Common.Helper = Helper; })(DiagnosticsHub.Common || (DiagnosticsHub.Common = {})); var Common = DiagnosticsHub.Common; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (Common) { (function (DependencyManagerStateType) { DependencyManagerStateType._map = []; DependencyManagerStateType.NotReady = -1; DependencyManagerStateType.Ready = 0; DependencyManagerStateType.Loading = 1; DependencyManagerStateType.Done = 2; })(Common.DependencyManagerStateType || (Common.DependencyManagerStateType = {})); var DependencyManagerStateType = Common.DependencyManagerStateType; var DependencyManager = (function () { function DependencyManager() { this._deps = []; this._loadedDeps = []; this._notLoadedDeps = []; this._totalDeps = 0; this._state = DependencyManagerStateType.Ready; } DependencyManager.prototype.addDependencies = function (dependencyArray) { if(this._state === DependencyManagerStateType.Loading) { throw new Error("DependencyManager loading other dependency."); } else if(dependencyArray && dependencyArray.length > 0) { this._deps = this._deps.concat(dependencyArray); this._totalDeps += dependencyArray.length; } }; DependencyManager.prototype.getState = function () { return this._state; }; DependencyManager.prototype.loadDependencies = function (callback, contextObject) { if(this._state === DependencyManagerStateType.Loading) { throw new Error("DependencyManager loading other dependency."); } else { this._callback = callback; this._loadNextDependency((contextObject || document)); } }; DependencyManager.prototype.loadCss = function (fullCssFilePath) { if(typeof fullCssFilePath !== "string" && fullCssFilePath.lastIndexOf(".css") !== fullCssFilePath.length - 4) { throw new Error("file name is null or undefined."); } var nameArr = fullCssFilePath.substring(fullCssFilePath.lastIndexOf("\\") + 1, fullCssFilePath.lastIndexOf(".css")); var oldCss = document.getElementById(nameArr); if(!oldCss) { var link = document.createElement("link"); link.rel = "stylesheet"; link.type = "text/css"; link.href = fullCssFilePath; link.media = "all"; link.id = nameArr; document.getElementsByTagName("head")[0].appendChild(link); } }; DependencyManager.prototype._isDone = function () { if(this._deps.length === 0 && (this._loadedDeps.length + this._notLoadedDeps.length) === this._totalDeps) { this._state = DependencyManagerStateType.Done; if(this._callback) { this._callback.apply(this, [ this._loadedDeps ], [ this._notLoadedDeps ]); } return true; } else { return false; } }; DependencyManager.prototype._loadNextDependency = function (contextObject) { if(!this._isDone() && this._deps.length !== 0) { this._state = DependencyManagerStateType.Loading; var dep = this._deps.shift(); if(dep.objType && Common.Helper.doesObjectExist(dep.objType, "function")) { this._loadedDeps.push(dep); this._loadNextDependency(contextObject); return; } var scr = contextObject.createElement("script"); scr.type = "text/javascript"; scr.src = dep.url; if(!dep.async) { if(scr.readyState) { scr.onreadystatechange = function () { if(scr.readyState === "loaded" || scr.readyState === "complete") { scr.onreadystatechange = null; this._loadedDeps.push(dep); DiagnosticsHub.RegisterNamespace.register(dep.objType); this._loadNextDependency(contextObject); } }.bind(this); } else { scr.onload = function () { this._loadedDeps.push(dep); DiagnosticsHub.RegisterNamespace.register(dep.objType); this._loadNextDependency(contextObject); }.bind(this); scr.onerror = function () { this._notLoadedDeps.push(dep); this._loadNextDependency(contextObject); }.bind(this); } } else { if(scr.readyState) { scr.onreadystatechange = function () { if(scr.readyState === "loaded" || scr.readyState === "complete") { scr.onreadystatechange = null; this._loadedDeps.push(dep); DiagnosticsHub.RegisterNamespace.register(dep.objType); this._isDone(); } }.bind(this); } else { scr.onload = function () { this._loadedDeps.push(dep); DiagnosticsHub.RegisterNamespace.register(dep.objType); this._isDone(); }.bind(this); scr.onerror = function () { this._notLoadedDeps.push(dep); this._isDone(); }.bind(this); } this._loadNextDependency(contextObject); } contextObject.getElementsByTagName("head")[0].appendChild(scr); } }; return DependencyManager; })(); Common.DependencyManager = DependencyManager; })(DiagnosticsHub.Common || (DiagnosticsHub.Common = {})); var Common = DiagnosticsHub.Common; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var Toolbar = (function () { function Toolbar(config) { this._containerCss = "toolbar-container"; this._buttonCss = "toolbar-button"; this._buttonDisabledCss = "toolbar-button-disabled"; this._zoomInButtonCss = "zoomin-button-image"; this._zoomOutButtonCss = "zoomout-button-image"; this._clearSelectionButtonCss = "clearselection-button-image"; this._zoomInButtonDisabledCss = "zoomin-button-image-disabled"; this._zoomOutButtonDisabledCss = "zoomout-button-image-disabled"; this._clearSelectionButtonDisabledCss = "clearselection-button-image-disabled"; this._buttonImageCss = "button-image"; this._buttonTextCss = "button-text"; this._buttonTextDisabledCss = "button-text-disabled"; this._focused = false; if(!config) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } this._config = config; this._zoomInClickHandler = this.zoomInHandler.bind(this); this._zoomInKeyDownHandler = this.onZoomInKeyDown.bind(this); this._zoomOutClickHandler = this.zoomOutHandler.bind(this); this._zoomOutKeyDownHandler = this.onZoomOutKeyDown.bind(this); this._clearSelectionClickHandler = this.selectionHandler.bind(this); this._clearSelectionKeyDownHandler = this.onClearSelectionKeyDown.bind(this); this._tabFocusHandler = this.onTabFocus.bind(this); this._tabBlurHandler = this.onTabBlur.bind(this); } Toolbar.prototype.render = function () { if(this._config && this._config.containerId) { var parent = document.getElementById(this._config.containerId); var container = document.createElement("div"); container.classList.add(this._containerCss); parent.appendChild(container); this._zoomIn = this.createButton(this._zoomInButtonDisabledCss, Plugin.Resources.getString("ToolbarZoomInButton"), this._zoomInClickHandler, this._zoomInKeyDownHandler, Plugin.Resources.getString("ToolbarZoomInAriaLabel")); container.appendChild(this._zoomIn); this._zoomReset = this.createButton(this._zoomOutButtonDisabledCss, Plugin.Resources.getString("ToolbarZoomOutButton"), this._zoomOutClickHandler, this._zoomOutKeyDownHandler, Plugin.Resources.getString("ToolbarZoomOutAriaLabel")); container.appendChild(this._zoomReset); this._clearSelection = this.createButton(this._clearSelectionButtonDisabledCss, Plugin.Resources.getString("ToolbarClearSelectionButton"), this._clearSelectionClickHandler, this._clearSelectionKeyDownHandler, Plugin.Resources.getString("ToolbarcClearSelectionAriaLabel")); container.appendChild(this._clearSelection); } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } }; Toolbar.prototype.addEventListener = function (element, clickHandler, keyboardHandler) { element.addEventListener("click", clickHandler); element.addEventListener("focus", this._tabFocusHandler); element.addEventListener("blur", this._tabBlurHandler); element.addEventListener("keydown", keyboardHandler); }; Toolbar.prototype.removeEventListener = function (element, clickHandler, keyboardHandler) { element.removeEventListener("click", clickHandler); element.removeEventListener("focus", this._tabFocusHandler); element.removeEventListener("blur", this._tabBlurHandler); element.removeEventListener("keydown", keyboardHandler); }; Toolbar.prototype.setButtonState = function (state) { if(state) { if(typeof state.isZoomInEnabled !== "undefined" && this._zoomIn) { if(state.isZoomInEnabled && this._zoomIn.disabled) { this._zoomIn.disabled = false; var image = this._zoomIn.getElementsByClassName(this._buttonImageCss)[0]; image.classList.remove(this._zoomInButtonDisabledCss); image.classList.add(this._zoomInButtonCss); var text = this._zoomIn.getElementsByClassName(this._buttonTextCss)[0]; text.classList.remove(this._buttonTextDisabledCss); this._zoomIn.tabIndex = 0; this._zoomIn.classList.remove(this._buttonDisabledCss); this._zoomIn.classList.add(this._buttonCss); this.addEventListener(this._zoomIn, this._zoomInClickHandler, this._zoomInKeyDownHandler); } else if(!state.isZoomInEnabled && !this._zoomIn.disabled) { this._zoomIn.disabled = true; var image = this._zoomIn.getElementsByClassName(this._buttonImageCss)[0]; image.classList.add(this._zoomInButtonDisabledCss); image.classList.remove(this._zoomInButtonCss); var text = this._zoomIn.getElementsByClassName(this._buttonTextCss)[0]; text.classList.add(this._buttonTextDisabledCss); this._zoomIn.tabIndex = -1; this._zoomIn.classList.add(this._buttonDisabledCss); this._zoomIn.classList.remove(this._buttonCss); this.removeEventListener(this._zoomIn, this._zoomInClickHandler, this._zoomInKeyDownHandler); } } if(typeof state.isResetZoomEnabled !== "undefined" && this._zoomReset) { if(state.isResetZoomEnabled && this._zoomReset.disabled) { this._zoomReset.disabled = false; var image = this._zoomReset.getElementsByClassName(this._buttonImageCss)[0]; image.classList.remove(this._zoomOutButtonDisabledCss); image.classList.add(this._zoomOutButtonCss); var text = this._zoomReset.getElementsByClassName(this._buttonTextCss)[0]; text.classList.remove(this._buttonTextDisabledCss); this._zoomReset.tabIndex = 0; this._zoomReset.classList.remove(this._buttonDisabledCss); this._zoomReset.classList.add(this._buttonCss); this.addEventListener(this._zoomReset, this._zoomOutClickHandler, this._zoomOutKeyDownHandler); } else if(!state.isResetZoomEnabled && !this._zoomReset.disabled) { this._zoomReset.disabled = true; var image = this._zoomReset.getElementsByClassName(this._buttonImageCss)[0]; image.classList.add(this._zoomOutButtonDisabledCss); image.classList.remove(this._zoomOutButtonCss); var text = this._zoomReset.getElementsByClassName(this._buttonTextCss)[0]; text.classList.add(this._buttonTextDisabledCss); this._zoomReset.tabIndex = -1; this._zoomReset.classList.add(this._buttonDisabledCss); this._zoomReset.classList.remove(this._buttonCss); this.removeEventListener(this._zoomReset, this._zoomOutClickHandler, this._zoomOutKeyDownHandler); } } if(typeof state.isClearSelectionEnabled !== "undefined" && this._clearSelection) { if(state.isClearSelectionEnabled && this._clearSelection.disabled) { this._clearSelection.disabled = false; var image = this._clearSelection.getElementsByClassName(this._buttonImageCss)[0]; image.classList.remove(this._clearSelectionButtonDisabledCss); image.classList.add(this._clearSelectionButtonCss); var text = this._clearSelection.getElementsByClassName(this._buttonTextCss)[0]; text.classList.remove(this._buttonTextDisabledCss); this._clearSelection.tabIndex = 0; this._clearSelection.classList.remove(this._buttonDisabledCss); this._clearSelection.classList.add(this._buttonCss); this.addEventListener(this._clearSelection, this._clearSelectionClickHandler, this._clearSelectionKeyDownHandler); } else if(!state.isClearSelectionEnabled && !this._clearSelection.disabled) { this._clearSelection.disabled = true; var image = this._clearSelection.getElementsByClassName(this._buttonImageCss)[0]; image.classList.add(this._clearSelectionButtonDisabledCss); image.classList.remove(this._clearSelectionButtonCss); var text = this._clearSelection.getElementsByClassName(this._buttonTextCss)[0]; text.classList.add(this._buttonTextDisabledCss); this._clearSelection.tabIndex = -1; this._clearSelection.classList.add(this._buttonDisabledCss); this._clearSelection.classList.remove(this._buttonCss); this.removeEventListener(this._clearSelection, this._clearSelectionClickHandler, this._clearSelectionKeyDownHandler); } } } }; Toolbar.prototype.zoomInHandler = function (evt) { if(this._config.zoomInHandler) { this._config.zoomInHandler(); } }; Toolbar.prototype.selectionHandler = function (evt) { if(this._config.selectionHandler) { this._config.selectionHandler(); } }; Toolbar.prototype.zoomOutHandler = function (evt) { if(this._config.zoomOutHandler) { this._config.zoomOutHandler(); } }; Toolbar.prototype.onTabFocus = function (e) { this._focused = true; }; Toolbar.prototype.onTabBlur = function (e) { this._focused = false; }; Toolbar.prototype.onZoomInKeyDown = function (e) { if(this._focused && DiagnosticsHub.Common.KeyCodes.Enter === e.keyCode) { this.zoomInHandler(null); } }; Toolbar.prototype.onZoomOutKeyDown = function (e) { if(this._focused && DiagnosticsHub.Common.KeyCodes.Enter === e.keyCode) { this.zoomOutHandler(null); } }; Toolbar.prototype.onClearSelectionKeyDown = function (e) { if(this._focused && DiagnosticsHub.Common.KeyCodes.Enter === e.keyCode) { this.selectionHandler(null); } }; Toolbar.prototype.createButton = function (imageCss, text, clickHandler, keyboardHandler, ariaLabel) { var element = document.createElement("div"); element.classList.add(this._buttonDisabledCss); element.disabled = true; var image = document.createElement("div"); image.classList.add(imageCss); image.classList.add(this._buttonImageCss); element.appendChild(image); var textDiv = document.createElement("div"); textDiv.innerHTML = text; textDiv.classList.add(this._buttonTextCss); textDiv.classList.add(this._buttonTextDisabledCss); element.appendChild(textDiv); element.setAttribute("role", "button"); element.setAttribute("aria-label", ariaLabel); return element; }; return Toolbar; })(); DiagnosticsHub.Toolbar = Toolbar; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (DragDirection) { DragDirection._map = []; DragDirection._map[0] = "None"; DragDirection.None = 0; DragDirection._map[1] = "Left"; DragDirection.Left = 1; DragDirection._map[2] = "Right"; DragDirection.Right = 2; })(DiagnosticsHub.DragDirection || (DiagnosticsHub.DragDirection = {})); var DragDirection = DiagnosticsHub.DragDirection; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var SwimLane = (function () { function SwimLane(config) { this._swimLaneHeaderCss = "swimlane-header"; this._swimLaneBodyCss = "swimlane-body"; this._graphDivCss = "graph-div"; this._verticalLineCss = "swimlane-vertical-line"; this._minSelectionWidthInPixels = 10; this._minimumGraphHeight = 50; this._maximumGraphHeight = 200; this._graphDataSource = []; this._thresholdLineTopMarginBuffer = 1.4; this._isVisible = true; if(config) { this._config = config; } if(this._config.containerId) { this._container = document.getElementById(this._config.containerId); } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } this.initialize(); this._sqmRuler = new DiagnosticsHub.Sqm.Ruler(); } Object.defineProperty(SwimLane.prototype, "isVisible", { get: function () { return this._isVisible; }, enumerable: true, configurable: true }); Object.defineProperty(SwimLane.prototype, "graphContainerClientWidth", { get: function () { if(this._graphContainer && (this._graphContainerClientWidth === null || typeof this._graphContainerClientWidth === "undefined")) { this._graphContainerClientWidth = this._graphContainer.clientWidth; } return this._graphContainerClientWidth; }, set: function (value) { this._graphContainerClientWidth = value; }, enumerable: true, configurable: true }); SwimLane.prototype.addEventListener = function (eventType, func) { if(this._publisher) { this._publisher.addEventListener(eventType, func); } }; SwimLane.prototype.removeEventListener = function (eventType, func) { if(this._publisher) { this._publisher.removeEventListener(eventType, func); } }; SwimLane.prototype.render = function () { Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_SwimlaneFullRenderBegin); while(this._container.hasChildNodes()) { this._container.removeChild(this._container.firstChild); } this._graphConfig = this._graph.getGraphConfiguration(); this.renderHeader(); this.renderBody(); if(this._config.header.title.isBodyExpanded === null || typeof this._config.header.title.isBodyExpanded === "undefined" || this._config.header.title.isBodyExpanded) { this._graph.render(); } else { this.setGraphVisibility(false); } Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_SwimlaneFullRenderEnd); }; SwimLane.prototype.zoom = function (current, selection) { if(current) { if(this._graph && this._graph.setViewPortTimeRange) { this._graph.setViewPortTimeRange(current); this._selectionTimeRange = current; if(selection) { this._selectionTimeRange = selection; } if(this._body.style.display !== "none") { this.calculateHandlerPosition(); this.drawSelection(); this.drawVerticalLines(); } } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1003")); } } }; SwimLane.prototype.setSelection = function (selection) { if(selection) { this._selectionTimeRange = selection; if(this._body.style.display !== "none") { this.calculateHandlerPosition(); this.drawSelection(); } } }; SwimLane.prototype.getSelection = function () { return this._selectionTimeRange; }; SwimLane.prototype.addGraphSeriesData = function (counterId, points, fullRender) { if(points) { this._graph.addSeriesData(counterId, points, fullRender); } }; SwimLane.prototype.updateTimeRange = function (viewPort) { if(viewPort) { this._graph.setViewPortTimeRange(viewPort); this.drawVerticalLines(); } }; SwimLane.prototype.setGraphState = function (state) { if(state && this._graph) { this._graph.setGraphState(state); } }; SwimLane.prototype.removeInvalidPoints = function (base) { if(this._graph && base) { this._graph.removeInvalidPoints(base); } }; SwimLane.prototype.resize = function (e) { if(this.graphContainerClientWidth === this._graphContainer.clientWidth) { return; } if(this._graphContainer) { this.graphContainerClientWidth = this._graphContainer.clientWidth; } if(this._config.isSelectionEnabled) { var handlePosition = this._selectionTimeRange; var current = this._graph.getViewPortTimeRange(); var lValue = this.convertTimestampToPixel(handlePosition.begin, current); var rValue = this.convertTimestampToPixel(handlePosition.end, current); var positionChanged = false; if(rValue - lValue < this._minSelectionWidthInPixels) { if(lValue + this._minSelectionWidthInPixels <= this.graphContainerClientWidth) { rValue = lValue + this._minSelectionWidthInPixels; positionChanged = true; } else if(rValue - this._minSelectionWidthInPixels >= 0) { lValue = rValue - this._minSelectionWidthInPixels; positionChanged = true; } } this._leftUnselectedRegion.style.width = lValue + "px"; this._rightUnselectedRegion.style.left = rValue + "px"; this._rightUnselectedRegion.style.width = Math.ceil(this.graphContainerClientWidth - rValue) + "px"; this._selectionPixelStartX = lValue; this._selectionPixelWidth = rValue - lValue; if(positionChanged) { this.raiseSelectionChanged(false); } } if(this._graph && this._graph.resize) { this._graph.resize(e); } this.drawVerticalLines(); }; SwimLane.prototype.deinitialize = function () { if(this._resizeHandler) { window.removeEventListener("resize", this._resizeHandler); } if(this._graph) { this._graph.deinitialize(); } }; SwimLane.prototype.processThresholdValueChange = function () { var multilineGraph = this._graph; if(!multilineGraph) { return; } var newGridYMaxValue = Math.max(this._thresholdValueSelector.currentThresholdValue * this._thresholdLineTopMarginBuffer, multilineGraph.maxSeriesValue * multilineGraph.chartAxisIncreaseRatio); var newGridYMaxValueInUnits = multilineGraph.convertToUnitsProcessor(newGridYMaxValue); var thresholdValueInGraphUnits = parseFloat(multilineGraph.convertToUnitsProcessor(this._thresholdValueSelector.currentThresholdValue, newGridYMaxValueInUnits.unit).value); var newAxes = [ { value: thresholdValueInGraphUnits, isThresholdAxis: true } ]; if(this._leftScale) { this._leftScale.config.maximum = parseFloat(newGridYMaxValueInUnits.value); this._leftScale.config.axes = newAxes; this._leftScale.render(); } if(this._rightScale) { this._rightScale.config.maximum = parseFloat(newGridYMaxValueInUnits.value); this._rightScale.config.axes = newAxes; this._rightScale.render(); } if(this._axes) { this._axes.config.axes = newAxes; this._axes.render(); } if(this._header) { this._header.title.setUnit(newGridYMaxValueInUnits.unit); } multilineGraph._graphInfo.gridY.max = newGridYMaxValue; multilineGraph.graphUnitOverride = newGridYMaxValueInUnits.unit; multilineGraph.render(true); }; SwimLane.getDragDirection = function getDragDirection(selectionWidth) { if(selectionWidth > 0) { return DiagnosticsHub.DragDirection.Right; } else if(selectionWidth < 0) { return DiagnosticsHub.DragDirection.Left; } return DiagnosticsHub.DragDirection.None; }; SwimLane.prototype.initialize = function () { if(this._config.isSelectionEnabled) { this._mouseupHandler = this.stopSelection.bind(this); this._dragHandler = this.drag.bind(this); this._startSelection = this.startSelection.bind(this); this._onDraggingAnimation = this.onDraggingAnimation.bind(this); } this._resizeHandler = this.resize.bind(this); this._titleClickHandler = this.setBodyVisibility.bind(this); window.addEventListener("resize", this._resizeHandler); if(this._config.body.events) { this._publisher = new DiagnosticsHub.Publisher(this._config.body.events); } if(this._config.minSelectionWidthInPixels) { this._minSelectionWidthInPixels = this._config.minSelectionWidthInPixels; } if(this._config.getVerticalRulerLinePositions) { this._getVerticalRulerLinePositions = this._config.getVerticalRulerLinePositions; } this._selectionTimeRange = this._config.timeRange; this._graphId = this._config.containerId + "_graph"; if(this._config.body && this._config.body.graph) { if(this._config.body.graph.height === null || typeof this._config.body.graph.height === "undefined" || this._config.body.graph.height < this._minimumGraphHeight) { this._config.body.graph.height = this._minimumGraphHeight; } else if(this._config.body.graph.height > this._maximumGraphHeight) { this._config.body.graph.height = this._maximumGraphHeight; } } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } var className = this._config.body.graph.registeredClass; var args = { timeRange: this._config.timeRange, containerId: this._graphId, events: [], height: this._config.body.graph.height, scale: { minimum: this._config.body.leftScale.minimum || this._config.body.rightScale.minimum, maximum: this._config.body.leftScale.maximum || this._config.body.rightScale.maximum, axes: [] }, invokeEventListener: this.invokeGraphEventListener.bind(this), loadCss: this._config.body.graph.loadCss, jsonConfig: this._config.body.graph.jsonConfig, legend: this._config.header.legend, unit: "", resources: this._config.body.graph.resources, description: this._config.body.graph.description, pathToScriptFolder: this._config.body.graph.pathToScriptFolder }; this._graph = new className(args); this._viewEventManager = Microsoft.VisualStudio.DiagnosticsHub.getViewEventManager(); this._viewEventManager.selectionChanged.addEventListener(this.setSelectionChanged.bind(this)); }; SwimLane.prototype.setSelectionChanged = function (args) { Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_SwimlaneSelectionHandlingBegin); if(args && args.invoker !== this._graphId && args.position && !args.position.equals(this._selectionTimeRange)) { this.setSelection(args.position); } Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_SwimlaneSelectionHandlingEnd); }; SwimLane.prototype.convertTimestampToPixel = function (time, currentTimeRange) { var pixels = 0; if(currentTimeRange.elapsed.greater(DiagnosticsHub.BigNumber.zero)) { var timeFromRangeStart = parseInt(DiagnosticsHub.BigNumber.subtract(time, currentTimeRange.begin).value); var range = parseInt(currentTimeRange.elapsed.value); pixels = (timeFromRangeStart / range) * this.graphContainerClientWidth; } return pixels; }; SwimLane.prototype.renderHeader = function () { var headerDiv = document.createElement("div"); headerDiv.classList.add(this._swimLaneHeaderCss); this._container.appendChild(headerDiv); this._config.header.title.titleText = this._config.header.title.titleText; this._config.header.title.unit = this._graphConfig.unit; this._config.header.legend = this._graphConfig.legend; this._header = new Header(this._config.header, headerDiv); this._header.render(); this._header.title.registerCallback(DiagnosticsHub.TitleEvents.Click, this._titleClickHandler); this._header.title.registerCallback(DiagnosticsHub.TitleEvents.KeyPress, this._titleClickHandler); }; SwimLane.prototype.renderBody = function () { if(this._config.body) { if(!this._body) { this._body = document.createElement("div"); this._body.classList.add(this._swimLaneBodyCss); this._body.style.height = this._config.body.graph.height + "px"; this._container.appendChild(this._body); } else { while(this._body.hasChildNodes()) { this._body.removeChild(this._body.firstChild); } } var scale; if(this._config.body.leftScale) { this._config.body.leftScale.minimum = this._graphConfig.scale.minimum; this._config.body.leftScale.maximum = this._graphConfig.scale.maximum; this._config.body.leftScale.axes = this._graphConfig.scale.axes; this._leftScale = new Scale(this._config.body.leftScale, this._body); this._leftScale.render(); scale = this._config.body.leftScale; } if(this._config.body.rightScale) { this._config.body.rightScale.minimum = this._graphConfig.scale.minimum; this._config.body.rightScale.maximum = this._graphConfig.scale.maximum; this._config.body.rightScale.axes = this._graphConfig.scale.axes; this._rightScale = new Scale(this._config.body.rightScale, this._body); this._rightScale.render(); scale = this._config.body.rightScale; } this._graphContainer = document.createElement("div"); this._graphContainer.classList.add(this._graphDivCss); if(typeof this._config.body.graph.jsonConfig.GraphBehaviour === "number" && this._config.body.graph.jsonConfig.GraphBehaviour === DiagnosticsHub.GraphBehaviourType.PostMortem) { this._graphContainer.addEventListener("mouseenter", this.addCursorStyle.bind(this)); this._graphContainer.addEventListener("mouseleave", this.removeCursorStyle.bind(this)); } if(this._config.isSelectionEnabled) { this._graphContainer.addEventListener("mousedown", this._startSelection); } this._body.appendChild(this._graphContainer); var graph = document.createElement("div"); graph.id = this._graphId; this._graphContainer.appendChild(graph); this.drawVerticalLines(); if(scale) { this._axes = new Axes(scale, this._graphContainer); this._axes.render(); } this.calculateHandlerPosition(); if(this._config.isSelectionEnabled) { this.initializeUnselectedRegions(); } if(this._config.body.graph.jsonConfig.ThresholdLines) { this._thresholdValueSelector = new ThresholdValueSelector(this, this._config, this._header); this._thresholdValueSelector.render(); this._header.title.registerCallback(VisualStudio.DiagnosticsHub.TitleEvents.Click, this._titleClickHandler); this._header.title.registerCallback(VisualStudio.DiagnosticsHub.TitleEvents.KeyPress, this._titleClickHandler); } } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } }; SwimLane.prototype.addCursorStyle = function (evt) { if(this._graphContainer) { this._graphContainer.style.cursor = "pointer"; } }; SwimLane.prototype.removeCursorStyle = function (evt) { if(this._graphContainer) { this._graphContainer.style.cursor = "auto"; } }; SwimLane.prototype.drawVerticalLines = function () { if(this._graphContainer) { var children = this._graphContainer.getElementsByClassName(this._verticalLineCss); while(children.length > 0) { this._graphContainer.removeChild(children[0]); } var current = this._graph.getViewPortTimeRange(); var lines = this._config.getVerticalRulerLinePositions(current, this.graphContainerClientWidth); for(var i = 0; i < lines.length; i++) { var line = document.createElement("div"); line.classList.add(this._verticalLineCss); line.style.left = lines[i] + "%"; this._graphContainer.appendChild(line); } } }; SwimLane.prototype.calculateHandlerPosition = function () { if(this._graph && this._graph.getViewPortTimeRange) { var current = this._graph.getViewPortTimeRange(); var timeFromRangeStart = parseInt(DiagnosticsHub.BigNumber.subtract(this._selectionTimeRange.begin, current.begin).value); this._selectionPixelStartX = (timeFromRangeStart / parseInt(current.elapsed.value)) * this.graphContainerClientWidth; this._selectionPixelWidth = parseInt(this._selectionTimeRange.elapsed.value) / parseInt(current.elapsed.value) * this.graphContainerClientWidth; } }; SwimLane.prototype.getSelectionStartWidth = function (event) { var mouseX = event.clientX - this._graphContainer.offsetLeft; return mouseX; }; SwimLane.prototype.drag = function (event) { var xPixel = this.getSelectionStartWidth(event); if(xPixel >= 0 && xPixel <= this.graphContainerClientWidth) { this._dragDirection = SwimLane.getDragDirection(xPixel - this._initialSelectionPixelStartX); this._selectionPixelWidth = Math.abs(xPixel - this._initialSelectionPixelStartX); if(this._dragDirection === DiagnosticsHub.DragDirection.Left) { this._selectionPixelStartX = this._initialSelectionPixelStartX - this._selectionPixelWidth; } } event.stopPropagation(); }; SwimLane.prototype.drawSelection = function () { this._leftUnselectedRegion.style.width = this._selectionPixelStartX + "px"; this._rightUnselectedRegion.style.left = (this._selectionPixelStartX + this._selectionPixelWidth) + "px"; this._rightUnselectedRegion.style.width = (this.graphContainerClientWidth - (this._selectionPixelStartX + this._selectionPixelWidth)) + "px"; }; SwimLane.prototype.ensureMinSelectionWidth = function () { if(typeof this._selectionPixelStartX === "undefined") { return; } if(Math.abs(this._selectionPixelWidth) < this._minSelectionWidthInPixels) { this._selectionPixelWidth = this._minSelectionWidthInPixels; switch(this._dragDirection) { case DiagnosticsHub.DragDirection.Right: if(this._selectionPixelStartX + this._selectionPixelWidth > this.graphContainerClientWidth) { this._selectionPixelStartX = this.graphContainerClientWidth - this._selectionPixelWidth; } break; case DiagnosticsHub.DragDirection.Left: if(this._selectionPixelStartX - this._selectionPixelWidth < 0) { this._selectionPixelStartX = 0; } else if(this._selectionPixelStartX + this._selectionPixelWidth > this.graphContainerClientWidth) { this._selectionPixelStartX = this.graphContainerClientWidth - this._selectionPixelWidth; } else { this._selectionPixelStartX = this._initialSelectionPixelStartX - this._selectionPixelWidth; } break; default: if(this._selectionPixelStartX + (this._selectionPixelWidth / 2) > this.graphContainerClientWidth) { this._selectionPixelStartX = this.graphContainerClientWidth - this._selectionPixelWidth; } else if(this._selectionPixelStartX - (this._selectionPixelWidth / 2) < 0) { this._selectionPixelStartX = 0; } else { this._selectionPixelStartX = this._selectionPixelStartX - (this._selectionPixelWidth / 2); } break; } } }; SwimLane.prototype.convertChartAreaPercentToDataValue = function (pixel) { var currentTimeRange = this._graph.getViewPortTimeRange(); return DiagnosticsHub.BigNumber.addNumber(currentTimeRange.begin, pixel * (parseInt(currentTimeRange.elapsed.value) / this._graphContainer.clientWidth)); }; SwimLane.prototype.initializeUnselectedRegions = function () { this._leftUnselectedRegion = this.createUnselectedRegion(0, this._selectionPixelStartX); this._rightUnselectedRegion = this.createUnselectedRegion(this._selectionPixelStartX + this._selectionPixelWidth, this.graphContainerClientWidth - this._selectionPixelStartX - this._selectionPixelWidth); this._graphContainer.appendChild(this._leftUnselectedRegion); this._graphContainer.appendChild(this._rightUnselectedRegion); }; SwimLane.prototype.startSelection = function (event) { if(event.which !== DiagnosticsHub.Common.MouseCodes.Left) { return; } this._initialSelectionPixelStartX = this._selectionPixelStartX = this.getSelectionStartWidth(event); this._selectionPixelWidth = 0; this._dragDirection = SwimLane.getDragDirection(this._selectionPixelWidth); this._graphContainer.addEventListener("mousemove", this._dragHandler); this._graphContainer.addEventListener("mouseup", this._mouseupHandler); this._graphContainer.setCapture(true); this._animationFrameHandle = window.requestAnimationFrame(this._onDraggingAnimation); }; SwimLane.prototype.stopSelection = function (event) { this._graphContainer.removeEventListener("mousemove", this._dragHandler); this._graphContainer.removeEventListener("mouseup", this._mouseupHandler); this._graphContainer.releaseCapture(); window.cancelAnimationFrame(this._animationFrameHandle); this._animationFrameHandle = null; this.ensureMinSelectionWidth(); this.drawSelection(); this._dragDirection = DiagnosticsHub.DragDirection.None; this.raiseSelectionChanged(false); this._sqmRuler.selectionChanged(DiagnosticsHub.Sqm.SelectionChangeSource.SwimLane, this._selectionPixelWidth === this._minSelectionWidthInPixels); }; SwimLane.prototype.onDraggingAnimation = function () { this.drawSelection(); this.raiseSelectionChanged(true); this._animationFrameHandle = window.requestAnimationFrame(this._onDraggingAnimation); }; SwimLane.prototype.createUnselectedRegion = function (left, width) { var rect = document.createElement("div"); rect.style.height = this._graphContainer.offsetHeight + "px"; rect.style.width = width + "px"; rect.style.left = left + "px"; rect.style.top = "0px"; rect.className = "unselected"; return rect; }; SwimLane.prototype.raiseSelectionChanged = function (isIntermittent) { if (typeof isIntermittent === "undefined") { isIntermittent = false; } if(this._selectionPixelWidth >= this._minSelectionWidthInPixels) { var minValue = this.convertChartAreaPercentToDataValue(this._selectionPixelStartX); var maxValue = this.convertChartAreaPercentToDataValue(this._selectionPixelStartX + this._selectionPixelWidth); if(this._selectionTimeRange && (!isIntermittent || !this._selectionTimeRange.begin.equals(minValue) || !this._selectionTimeRange.end.equals(maxValue))) { this._selectionTimeRange = new DiagnosticsHub.JsonTimespan(minValue, maxValue); var args = { position: this._selectionTimeRange, invoker: this._graphId, isIntermittent: isIntermittent }; if(this._viewEventManager) { this._viewEventManager.selectionChanged.raiseEvent(args); } } } }; SwimLane.prototype.setBodyVisibility = function (arg) { if(arg && arg.data && typeof arg.data.visible !== "undefined") { this.setGraphVisibility(arg.data.visible); } }; SwimLane.prototype.setGraphVisibility = function (visible) { this._body.style.display = visible ? "-ms-grid" : "none"; this._isVisible = visible; if(visible && this._graph) { this.graphContainerClientWidth = null; if(this._config.isSelectionEnabled) { this.calculateHandlerPosition(); this.drawSelection(); } this.drawVerticalLines(); this._graph.render(true, true); } if(this._publisher) { this._publisher.invokeListener(DiagnosticsHub.SwimlaneEvents.Visibility, { data: { visible: visible } }); } }; SwimLane.prototype.invokeEventListener = function (type, data) { switch(type) { case DiagnosticsHub.GraphEvents.ScaleInfoChanged: if(data) { if(this._leftScale) { this._leftScale.config = data; this._leftScale.render(); } if(this._rightScale) { this._rightScale.config.minimum = data.minimum; this._rightScale.render(); } if(this._axes) { this._axes.config = data; this._axes.render(); } } break; default: if(this._publisher) { this._publisher.invokeListener(type, { data: data }); } } }; SwimLane.prototype.invokeGraphEventListener = function (type, data) { if(type) { if(data) { switch(type) { case DiagnosticsHub.GraphEvents.ScaleInfoChanged: if(this._leftScale) { this._leftScale.minimum = data.minimum; this._leftScale.maximum = data.maximum; this._leftScale.render(); } if(this._rightScale) { this._rightScale.minimum = data.minimum; this._rightScale.maximum = data.maximum; this._rightScale.render(); } if(this._axes) { this._axes.minimum = data.minimum; this._axes.maximum = data.maximum; this._axes.render(); } if(this._header) { this._header.title.setUnit(data.unit); } if(this._thresholdValueSelector) { this.processThresholdValueChange(); } break; } } } }; return SwimLane; })(); DiagnosticsHub.SwimLane = SwimLane; var SwimLaneConfiguration = (function () { function SwimLaneConfiguration() { this.containerId = ""; this.header = { title: { isBodyExpanded: true, titleText: "Graph", unit: "unit", isGraphCollapsible: true }, legend: { data: [] } }; this.body = { leftScale: { width: 40, isVisible: true, type: DiagnosticsHub.ScaleType.Left, borderWidth: 1, axes: [] }, rightScale: { width: 40, isVisible: true, type: DiagnosticsHub.ScaleType.Right, borderWidth: 1, axes: [] }, graph: { height: 100, registeredClass: null, loadCss: null, jsonConfig: { }, description: null }, events: [ DiagnosticsHub.SwimlaneEvents.Graph, DiagnosticsHub.SwimlaneEvents.Visibility ] }; this.minSelectionWidthInPixels = 10; this.isSelectionEnabled = true; this.isZoomEnabled = true; } return SwimLaneConfiguration; })(); DiagnosticsHub.SwimLaneConfiguration = SwimLaneConfiguration; var Header = (function () { function Header(config, container) { this._legendContainerCss = "legend-container"; this._titleContainerCss = "title-container"; if(config) { this._config = config; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } if(container) { this._container = container; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1004")); } } Object.defineProperty(Header.prototype, "container", { get: function () { return this._container; }, enumerable: true, configurable: true }); Header.prototype.render = function () { this.renderTitle(); this.renderLegend(); }; Header.prototype.renderTitle = function () { var titleContainer = document.createElement("div"); titleContainer.className = this._titleContainerCss; this._container.appendChild(titleContainer); this.title = new Title(this._config.title, titleContainer); this.title.render(); }; Header.prototype.renderLegend = function () { var legendContainer = document.createElement("div"); legendContainer.className = this._legendContainerCss; this._container.appendChild(legendContainer); this.legend = new Legend(this._config.legend, legendContainer); this.legend.render(); }; return Header; })(); DiagnosticsHub.Header = Header; var Legend = (function () { function Legend(config, container) { this._legendDivCss = "legend-div"; this._legendTextDivCss = "legend-text-div"; this._legendColorCss = "legend-color"; this._legendColorDivCss = "legend-color-div"; this._thresholdLegendTextDivCss = "threshold-legend-text"; this._thresholdLegendColorCss = "threshold-legend-color"; if(config) { this._config = config; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } if(container) { this._container = container; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1004")); } } Legend.prototype.render = function () { if(this._config.data) { for(var i = 0; i < this._config.data.length; i++) { var legendColorDiv = document.createElement("div"); legendColorDiv.className = this._legendColorDivCss; var colorDiv = document.createElement("div"); colorDiv.className = this._legendColorCss; colorDiv.style.backgroundColor = (this._config.data[i]).color; legendColorDiv.appendChild(colorDiv); var legendTextDiv = document.createElement("div"); legendTextDiv.className = this._legendTextDivCss; legendTextDiv.innerText = this._config.data[i].legendText; if((this._config.data[i]).isThresholdLegend) { colorDiv.classList.add(this._thresholdLegendColorCss); legendTextDiv.classList.add(this._thresholdLegendTextDivCss); } var individualLegendBox = document.createElement("div"); individualLegendBox.className = this._legendDivCss; individualLegendBox.appendChild(legendColorDiv); individualLegendBox.appendChild(legendTextDiv); individualLegendBox.addEventListener("mouseover", this.showTooltip.bind(this, [ this._config.data[i].legendTooltip ])); individualLegendBox.addEventListener("mouseout", this.hideTooltip.bind(this)); this._container.appendChild(individualLegendBox); } } }; Legend.prototype.hideTooltip = function (evt) { Plugin.Tooltip.dismiss(); }; Legend.prototype.showTooltip = function (args, evt) { Plugin.Tooltip.dismiss(); if(args && args[0] !== null && typeof args[0] !== "undefined") { var config = { content: args[0], delay: 0 }; Plugin.Tooltip.show(config); } }; return Legend; })(); DiagnosticsHub.Legend = Legend; var Title = (function () { function Title(config, container) { this._callbackArr = []; this._focused = false; this._titleTextCss = "title-text"; this._titleExpandButtonCss = "title-expand-button"; this._titleCollapseButtonCss = "title-collapse-button"; this._titleButtonDisabledCss = "title-button-disabled"; if(config) { this._config = config; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } if(container) { this._container = container; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1004")); } this._publisher = new DiagnosticsHub.Publisher([ DiagnosticsHub.TitleEvents.Click, DiagnosticsHub.TitleEvents.KeyPress ]); } Title.prototype.render = function () { this.renderTitleCollapseExpandButton(); this.renderTitleText(); }; Title.prototype.registerCallback = function (evt, callback) { this._publisher.addEventListener(evt, callback); }; Title.prototype.setUnit = function (value) { if(this._titleText) { var text = this._config.titleText; this._config.unit = value; if(value) { text += " (" + value + ")"; } this._titleText.innerHTML = text; } }; Title.prototype.onTabFocus = function (e) { this._focused = true; }; Title.prototype.onTabBlur = function (e) { this._focused = false; }; Title.prototype.onKeyDown = function (e) { if(this._focused && DiagnosticsHub.Common.KeyCodes.Enter === e.keyCode) { this.setRegionState(DiagnosticsHub.TitleEvents.KeyPress); } }; Title.prototype.mouseClick = function (e) { this.setRegionState(DiagnosticsHub.TitleEvents.Click); }; Title.prototype.setRegionState = function (evt) { this._config.isBodyExpanded = !this._config.isBodyExpanded; this.setAraiLabelAndStylesheet(); this._publisher.invokeListener(evt, { data: { visible: this._config.isBodyExpanded } }); }; Title.prototype.setAraiLabelAndStylesheet = function () { if(this._config.isBodyExpanded === null || typeof this._config.isBodyExpanded === "undefined" || this._config.isBodyExpanded) { this._titleCollapseExpandButton.className = this._titleExpandButtonCss; this._titleCollapseExpandButton.setAttribute("aria-label", Plugin.Resources.getString("SwimlaneCollapseAriaLabel")); } else { this._titleCollapseExpandButton.className = this._titleCollapseButtonCss; this._titleCollapseExpandButton.setAttribute("aria-label", Plugin.Resources.getString("SwimlaneExpandAriaLabel")); } }; Title.prototype.renderTitleText = function () { this._titleText = document.createElement("div"); this._titleText.className = this._titleTextCss; var text = ""; if(this._config.titleText) { text = this._config.titleText; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1005")); } if(this._config.unit) { text += " (" + this._config.unit + ")"; } this._titleText.innerHTML = text; this._container.appendChild(this._titleText); }; Title.prototype.renderTitleCollapseExpandButton = function () { this._titleCollapseExpandButton = document.createElement("div"); if(this._config.isGraphCollapsible) { this._titleCollapseExpandButton.setAttribute("role", "button"); this.setAraiLabelAndStylesheet(); this._titleCollapseExpandButton.addEventListener("click", this.mouseClick.bind(this)); this._titleCollapseExpandButton.tabIndex = 0; this._titleCollapseExpandButton.addEventListener("focus", this.onTabFocus.bind(this)); this._titleCollapseExpandButton.addEventListener("blur", this.onTabBlur.bind(this)); this._titleCollapseExpandButton.addEventListener("keydown", this.onKeyDown.bind(this)); } else { this._titleCollapseExpandButton.classList.add(this._titleButtonDisabledCss); } this._container.appendChild(this._titleCollapseExpandButton); }; return Title; })(); DiagnosticsHub.Title = Title; var Scale = (function () { function Scale(config, container) { this._scaleLeftCss = "graph-scale-left"; this._scaleRightCss = "graph-scale-right"; this._axisLeftCss = "graph-axis-left"; this._axisRightCss = "graph-axis-right"; if(config) { this.config = config; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } if(container) { this._container = container; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1004")); } } Object.defineProperty(Scale.prototype, "minimum", { get: function () { var min; if(this.config) { min = this.config.minimum; } return min; }, set: function (value) { if(typeof value !== "undefined" && value !== null) { this.config.minimum = value; } }, enumerable: true, configurable: true }); Object.defineProperty(Scale.prototype, "maximum", { get: function () { var max; if(this.config) { max = this.config.maximum; } return max; }, set: function (value) { if(typeof value !== "undefined" && value !== null) { this.config.maximum = value; } }, enumerable: true, configurable: true }); Scale.prototype.render = function () { if(!this._graphScale) { this._graphScale = document.createElement("div"); this._graphScale.className = this.config.type === DiagnosticsHub.ScaleType.Left ? this._scaleLeftCss : this._scaleRightCss; this._graphScale.style.width = this.config.width + "px"; if(this.config.type === DiagnosticsHub.ScaleType.Left) { this._graphScale.style.borderRightWidth = this.config.borderWidth + "px"; } else { this._graphScale.style.borderLeftWidth = this.config.borderWidth + "px"; } this._container.appendChild(this._graphScale); } else { while(this._graphScale.childNodes.length > 0) { this._graphScale.removeChild(this._graphScale.firstChild); } } if((this.config.isVisible || this.config.isVisible === null || typeof this.config.isVisible === "undefined") && this.config.width) { if(this.config.minimum !== null && typeof this.config.minimum !== "undefined" && this.config.maximum !== null && typeof this.config.maximum !== "undefined") { var hasThresholdAxis; if(this.config.axes && this.config.axes.length > 0) { for(var i = 0; i < this.config.axes.length; i++) { var axis = this.config.axes[i]; this.drawAxisValue(DiagnosticsHub.AxisPositionType.middle, axis.value); if(axis.isThresholdAxis) { hasThresholdAxis = true; } } } else { this.drawAxisValue(DiagnosticsHub.AxisPositionType.top, this.config.maximum); this.drawAxisValue(DiagnosticsHub.AxisPositionType.bottom, this.config.minimum); } if(hasThresholdAxis) { this.drawAxisValue(DiagnosticsHub.AxisPositionType.top, this.config.maximum); } } } }; Scale.prototype.drawAxisValue = function (position, value) { var axisDiv = document.createElement("div"); axisDiv.className = this.config.type === DiagnosticsHub.ScaleType.Left ? this._axisLeftCss : this._axisRightCss; axisDiv.innerHTML = value.toString(); this._graphScale.appendChild(axisDiv); var top = 0; switch(position) { case DiagnosticsHub.AxisPositionType.top: axisDiv.style.top = "0px"; break; case DiagnosticsHub.AxisPositionType.middle: var y = Math.floor(((this.config.maximum - value) / (this.config.maximum - this.config.minimum)) * this._container.offsetHeight); axisDiv.style.top = y - (axisDiv.offsetHeight / 2) + "px"; break; case DiagnosticsHub.AxisPositionType.bottom: axisDiv.style.bottom = "0px"; break; } }; return Scale; })(); DiagnosticsHub.Scale = Scale; var Axes = (function () { function Axes(config, container) { this._axisLineCss = "graph-axis-line"; this._thresholdAxisLineCss = "threshold-axis"; if(config) { this.config = config; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } if(container) { this._container = container; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1004")); } } Object.defineProperty(Axes.prototype, "minimum", { get: function () { var min; if(this.config) { min = this.config.minimum; } return min; }, set: function (value) { if(typeof value !== "undefined" && value !== null) { this.config.minimum = value; } }, enumerable: true, configurable: true }); Object.defineProperty(Axes.prototype, "maximum", { get: function () { var max; if(this.config) { max = this.config.maximum; } return max; }, set: function (value) { if(typeof value !== "undefined" && value !== null) { this.config.maximum = value; } }, enumerable: true, configurable: true }); Axes.prototype.render = function () { var children = this._container.getElementsByClassName(this._axisLineCss); if(children) { while(children.length > 0) { this._container.removeChild(children[children.length - 1]); } } if(this.config.axes && this.config.axes.length > 0) { for(var i = 0; i < this.config.axes.length; i++) { var axis = this.config.axes[i]; this.drawAxisLine(axis.value, axis.isThresholdAxis); } } }; Axes.prototype.drawAxisLine = function (value, isThresholdAxis) { var axisLine = document.createElement("div"); axisLine.className = this._axisLineCss; if(isThresholdAxis) { axisLine.classList.add(this._thresholdAxisLineCss); } this._container.appendChild(axisLine); var y = Math.floor(((this.config.maximum - value) / (this.config.maximum - this.config.minimum)) * this._container.offsetHeight); axisLine.style.top = y - (axisLine.offsetHeight / 2) + "px"; }; return Axes; })(); DiagnosticsHub.Axes = Axes; var ThresholdValueSelector = (function () { function ThresholdValueSelector(swimlane, swimLaneConfig, header) { this._logger = Microsoft.VisualStudio.DiagnosticsHub.getLogger(); this._thresholdSelectorCss = "threshold-selector"; var thresholdLines = swimLaneConfig.body.graph.jsonConfig.ThresholdLines; if(thresholdLines && thresholdLines.length >= 1) { this._thresholdConfig = thresholdLines[0]; if(thresholdLines.length > 1) { this._logger.debug("Multiple threshold lines were defined in the config json. We will just pick the first one."); } } this._swimlane = swimlane; this._swimLaneConfig = swimLaneConfig; this._header = header; this._resources = swimLaneConfig.body.graph.resources; } Object.defineProperty(ThresholdValueSelector.prototype, "currentThresholdValue", { get: function () { if(this._select && this._select.childNodes.length > 0) { var option = this._select.childNodes[this._select.selectedIndex]; if(option) { var value = parseFloat(option.value); if(!isNaN(value)) { return value; } } } return 0; }, enumerable: true, configurable: true }); ThresholdValueSelector.prototype.render = function () { if(!this._thresholdConfig) { return; } var legendText = this.getResource(this._thresholdConfig.LegendText); this._swimLaneConfig.header.legend.data.push({ legendText: legendText, legendTooltip: this.getResource(this._thresholdConfig.LegendTooltip), isThresholdLegend: true }); this._header.render(); var legendDiv; var legendItems = this._header.container.getElementsByClassName("legend-text-div"); for(var i = 0; i < legendItems.length; i++) { if((legendItems[i]).innerText === legendText) { legendDiv = (legendItems[i].parentNode); break; } } if(legendDiv) { this._select = document.createElement("select"); this._select.className = this._thresholdSelectorCss; var defaultValueIndex = 0; for(var i = 0; i < this._thresholdConfig.Values.length; i++) { var option = document.createElement("option"); option.value = this._thresholdConfig.Values[i].Value.toString(); option.innerText = this.getResource(this._thresholdConfig.Values[i].Text); this._select.appendChild(option); if(option.value === this._thresholdConfig.DefaultValue.toString()) { defaultValueIndex = i; } } this._select.selectedIndex = defaultValueIndex; this._select.addEventListener("change", this.onThresholdSelectionChanged.bind(this)); legendDiv.appendChild(this._select); this._swimlane.processThresholdValueChange(); } }; ThresholdValueSelector.prototype.getResource = function (resource) { if(!this._resources) { return resource; } return this._resources[resource] || resource; }; ThresholdValueSelector.prototype.onThresholdSelectionChanged = function (e) { this._swimlane.processThresholdValueChange(); }; return ThresholdValueSelector; })(); DiagnosticsHub.ThresholdValueSelector = ThresholdValueSelector; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (Common) { var ElementRecyclerFactory = (function () { function ElementRecyclerFactory(container, elementCreator) { this._container = container; this._elementCreator = elementCreator; this._index = null; this._elements = []; this._recycledElements = []; } ElementRecyclerFactory.forDivWithClass = function forDivWithClass(container, className) { return new ElementRecyclerFactory(container, function () { var element = document.createElement("div"); element.className = className; return element; }); }; ElementRecyclerFactory.prototype.start = function () { this._index = 0; }; ElementRecyclerFactory.prototype.getNext = function () { if(this._index === null) { throw ""; } var element = this._elements[this._index]; if(!element) { if(this._recycledElements.length > 0) { element = this._recycledElements.pop(); } else { element = this._elementCreator(); } this._elements.push(element); this._container.appendChild(element); } this._index++; return element; }; ElementRecyclerFactory.prototype.stop = function () { if(this._index === null) { return; } for(var i = this._elements.length - 1; i >= this._index; --i) { var element = this._elements.pop(); this._recycledElements.push(element); this._container.removeChild(element); } this._index = null; }; ElementRecyclerFactory.prototype.recycleAll = function () { for(var i = this._elements.length - 1; i >= 0; --i) { var element = this._elements.pop(); this._recycledElements.push(element); this._container.removeChild(element); } }; ElementRecyclerFactory.prototype.removeAll = function () { for(var i = this._elements.length - 1; i >= 0; --i) { var element = this._elements.pop(); this._container.removeChild(element); } this._elements = []; this._recycledElements = []; }; return ElementRecyclerFactory; })(); Common.ElementRecyclerFactory = ElementRecyclerFactory; })(DiagnosticsHub.Common || (DiagnosticsHub.Common = {})); var Common = DiagnosticsHub.Common; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var RulerConfig = (function () { function RulerConfig(containerId) { this.containerId = "rulerContainer"; this.className = "ruler-container"; this.id = ""; this.doubleSlider = { containerId: "sliderContainer", className: "ruler-body", id: "rulerBody", height: 1.8, leftSlider: { left: 0, width: 5, className: "ruler-slider" }, rightSlider: { left: 0, width: 5, className: "ruler-slider" }, bar: { className: "ruler-bar", id: "rulerBar", left: 40, right: 40 }, timeRange: new DiagnosticsHub.JsonTimespan(DiagnosticsHub.BigNumber.zero, DiagnosticsHub.BigNumber.zero), step: 1, markSeries: [], minimumRangeInPixel: 10, minimumZoomLevelMsec: 50, isSelectionEnabled: true, isZoomEnabled: true }; this.header = { containerId: "rulerHeaderContainer", className: "ruler-header", titleConfig: { containerId: "rulerTitleContainer", className: "ruler-title-container", text: "Diagnostic Session", isExpanded: true, description: "" }, legendConfig: { containerId: "rulerLegendContainer", className: "ruler-legend-container", data: [] } }; if(containerId) { this.containerId = containerId; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } } return RulerConfig; })(); DiagnosticsHub.RulerConfig = RulerConfig; var Ruler = (function () { function Ruler(config) { this._rulerAreaCss = "ruler-area"; this._aggregatedMarkImageToken = "vs-image-graph-aggregated-event"; this._logger = Microsoft.VisualStudio.DiagnosticsHub.getLogger(); if(config && config.containerId) { this._parent = document.getElementById(config.containerId); if(this._parent) { this._config = config; this._imageTokenList = this.getImageTokens(); this._themeChangedHandler = this.onThemeChanged.bind(this); Plugin.Theme.addEventListener("themechanged", this._themeChangedHandler); this.initialize(this._config); } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } } Object.defineProperty(Ruler.prototype, "series", { get: function () { return this._config.doubleSlider.markSeries; }, enumerable: true, configurable: true }); Ruler.prototype.deinitialize = function () { if(this._doubleSlider) { this._doubleSlider.deinitialize(); } if(this._themeChangedHandler) { Plugin.Theme.removeEventListener("themechanged", this._themeChangedHandler); } }; Ruler.prototype.focus = function () { this._doubleSlider.focus(); }; Ruler.prototype.zoom = function (current, selection) { this._doubleSlider.zoom(current, selection); }; Ruler.prototype.setHandlePosition = function (timeRange) { if(!this._doubleSlider.sliderHandlePosition.equals(timeRange)) { this._doubleSlider.sliderHandlePosition = timeRange; } }; Ruler.prototype.render = function () { if(!this._container) { this._container = document.createElement("div"); this._container.style.width = "100%"; this._container.style.height = "100%"; this._parent.appendChild(this._container); } while(this._container.hasChildNodes()) { this._container.removeChild(this._container.firstChild); } this._container.classList.add(this._config.className); this._headerDiv = document.createElement("div"); this._headerDiv.className = this._config.header.className; this._headerDiv.id = this._config.header.containerId; this._container.appendChild(this._headerDiv); this._body = document.createElement("div"); this._body.id = this._config.doubleSlider.containerId; this._body.style.height = this._config.doubleSlider.height + "em"; this._container.appendChild(this._body); while(this._config.doubleSlider.markSeries.length > this._imageTokenList.length) { this._logger.error("Series removed due to excess count: " + JSON.stringify(this._config.doubleSlider.markSeries.pop())); } for(var i = 0; i < this._imageTokenList.length && i < this._config.doubleSlider.markSeries.length; i++) { var series = this._config.doubleSlider.markSeries[i]; if(series) { series.index = i; this._config.header.legendConfig.data.push({ text: series.label, imageToken: this._imageTokenList[series.index], tooltip: series.tooltip }); } } for(var i = 0; i < this._config.doubleSlider.markSeries.length; i++) { if(this._config.doubleSlider.markSeries[i].id === VisualStudio.DiagnosticsHub.MarkType.Custom) { this._config.header.legendConfig.data.push({ text: Plugin.Resources.getString("RulerAggregatedMarks") || "Merged mark", imageToken: this._aggregatedMarkImageToken, tooltip: Plugin.Resources.getString("MergedMarkTooltip") || "Indicates there are marks of two or more types" }); break; } } this._config.doubleSlider.bar.scaleConfig = { aggregatedImageToken: this._aggregatedMarkImageToken, imageTokenList: this._imageTokenList }; this._config.header.titleConfig.description = RulerUtilities.formatTotalTime(this._config.doubleSlider.timeRange.elapsed, DiagnosticsHub.UnitFormat.fullName); this._header = new RulerHeader(this._config.header); this._header.render(); this._doubleSlider = new DoubleSlider(this._config.doubleSlider); this._doubleSlider.render(); }; Ruler.prototype.addMark = function (id, timeStamp, toolTip, shouldRender) { if (typeof shouldRender === "undefined") { shouldRender = true; } if(this._doubleSlider) { var markData = new MarkData(timeStamp, toolTip); this._doubleSlider.addMark(id, markData, shouldRender); } }; Ruler.prototype.getHandlePosition = function () { return this._doubleSlider.sliderHandlePosition; }; Ruler.prototype.updateTimeRange = function (viewPort, original) { this._doubleSlider.updateTimeRange(viewPort); }; Ruler.prototype.setDiagnosticsSessionTimeRange = function (range) { if(this._header && range) { this._header.setTitle(RulerUtilities.formatTotalTime(range, DiagnosticsHub.UnitFormat.fullName, true)); } }; Ruler.prototype.setState = function (state) { this._doubleSlider.setState(state); }; Ruler.prototype.resize = function () { this._doubleSlider.resize(null); }; Ruler.prototype.onThemeChanged = function (args) { this._doubleSlider.resize(null); this._header.render(); }; Ruler.prototype.onSelectionChanged = function (args) { if(args && args.position && args.position.elapsed) { this._header.setTitle(RulerUtilities.formatTotalTime(this._config.doubleSlider.timeRange.elapsed, DiagnosticsHub.UnitFormat.fullName) + " (" + RulerUtilities.formatSelectionTime(args.position.elapsed) + ")"); } }; Ruler.prototype.initialize = function (object) { for(var property in object) { if(object[property] && (property === "id" || property === "containerId")) { object[property] += RulerUtilities.getRandomNumber(); } else if(typeof object[property] === "object" && property !== "data" && property !== "markSeries") { this.initialize(object[property]); } } this._viewEventManager = Microsoft.VisualStudio.DiagnosticsHub.getViewEventManager(); this._viewEventManager.selectionChanged.addEventListener(this.onSelectionChanged.bind(this)); }; Ruler.prototype.getImageTokens = function () { return [ "vs-image-graph-user-mark", "vs-image-graph-app-event", "vs-image-graph-third-event", "vs-image-graph-fourth-event", "vs-image-graph-fifth-event", "vs-image-graph-sixth-event" ]; }; return Ruler; })(); DiagnosticsHub.Ruler = Ruler; var DoubleSlider = (function () { function DoubleSlider(config) { this._containerClientWidth = null; this._focused = false; this._rulerUnselectedCss = "ruler-unselected"; this._rulerBodyCss = "ruler-body"; this._isZoomed = false; this._selectionPixelStartX = 0; this._selectionPixelWidth = 0; this._rulerState = DiagnosticsHub.GraphState.Roll; this._onResizeHandler = this.resize.bind(this); if(config && config.containerId) { this._container = document.getElementById(config.containerId); if(this._container) { this._config = config; this.initialize(); } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } this._sqmRuler = new DiagnosticsHub.Sqm.Ruler(); } Object.defineProperty(DoubleSlider.prototype, "sliderHandlePosition", { get: function () { return this._handlePosition; }, set: function (position) { if(position && this._config.isSelectionEnabled) { this._handlePosition = position; var lSliderLeft = this.convertToPixel(this._handlePosition.begin) + this._config.bar.left - this._config.leftSlider.width; this._lSlider.style.left = lSliderLeft + "px"; this._config.leftSlider.left = lSliderLeft; this._lUnselectedRegion.style.width = lSliderLeft - this._config.bar.left + this._config.leftSlider.width + "px"; this._lUnselectedRegion.style.left = this._config.bar.left + "px"; var rSliderLeft = this.convertToPixel(this._handlePosition.end) + this._config.bar.left; this._rSlider.style.left = rSliderLeft + "px"; this._config.rightSlider.left = rSliderLeft; this._rUnselectedRegion.style.width = Math.ceil(this.containerClientWidth - rSliderLeft - this._config.bar.right) + "px"; this._rUnselectedRegion.style.left = rSliderLeft + "px"; this.setAriaLabelForSliders(); } }, enumerable: true, configurable: true }); Object.defineProperty(DoubleSlider.prototype, "containerClientWidth", { get: function () { if(this._container && (this._containerClientWidth === null || typeof (this._containerClientWidth) === "undefined")) { this._containerClientWidth = this._container.clientWidth; } return this._containerClientWidth; }, set: function (value) { this._containerClientWidth = value; }, enumerable: true, configurable: true }); Object.defineProperty(DoubleSlider.prototype, "barClientWidth", { get: function () { if(this._bar && (this._barClientWidth === null || typeof this._barClientWidth === "undefined")) { this._barClientWidth = this._bar.clientWidth; } return this._barClientWidth; }, set: function (value) { this._barClientWidth = value; }, enumerable: true, configurable: true }); DoubleSlider.prototype.deinitialize = function () { window.removeEventListener("resize", this._onResizeHandler); if(this._scale) { this._scale.deinitialize(); } }; DoubleSlider.prototype.focus = function () { this._container.focus(); }; DoubleSlider.prototype.zoom = function (current, selection) { if(this._config.isZoomEnabled) { this._currentTimeRange = current; this.resetScale(); if(!selection) { this.sliderHandlePosition = current; } else { this.sliderHandlePosition = selection; } } }; DoubleSlider.prototype.invalidateSizeCache = function () { if(this._container) { this.containerClientWidth = this._container.clientWidth; } if(this._bar) { this.barClientWidth = this._bar.clientWidth; } if(this._scale) { this._scale.invalidateSizeCache(); } }; DoubleSlider.prototype.render = function () { while(this._container.hasChildNodes()) { this._container.removeChild(this._container.firstChild); } this._container.className = this._config.className = this._rulerBodyCss; this._containerWidth = this.containerClientWidth; this._container.tabIndex = 0; if(this._config.isSelectionEnabled) { this.renderLeftSliderHandle(); } this.renderRulerBar(); this.renderRulerScale(); if(this._config.isSelectionEnabled) { this.renderRightSliderHandle(); } this.setAriaLabelForRuler(); }; DoubleSlider.prototype.addMark = function (id, markData, shouldRender) { if (typeof shouldRender === "undefined") { shouldRender = true; } if(this._scale) { this._scale.addMark(id, markData, shouldRender); } }; DoubleSlider.prototype.updateTimeRange = function (viewPort) { if(viewPort && !this._currentTimeRange.equals(viewPort)) { this._currentTimeRange = viewPort; this._scale.setTimeRange(viewPort); this._scale.render(); } }; DoubleSlider.prototype.setState = function (state) { if(state) { this._rulerState = state; } }; DoubleSlider.prototype.resize = function (e) { if(this.containerClientWidth === this._container.clientWidth) { return; } this.invalidateSizeCache(); var newRulerBarWidth = this.containerClientWidth - this._config.bar.left - this._config.bar.right; if(this._bar) { this._bar.style.width = newRulerBarWidth + "px"; if(this._config.isSelectionEnabled) { var lValue = this.convertToPixel(this._handlePosition.begin); var rValue = this.convertToPixel(this._handlePosition.end); var positionChanged = false; if(rValue - lValue < this._config.minimumRangeInPixel) { if(lValue + this._config.minimumRangeInPixel <= newRulerBarWidth) { rValue = lValue + this._config.minimumRangeInPixel; positionChanged = true; } else if(rValue - this._config.minimumRangeInPixel >= 0) { lValue = rValue - this._config.minimumRangeInPixel; positionChanged = true; } } var lSliderLeft = lValue - this._config.leftSlider.width + this._config.bar.left; this._lSlider.style.left = lSliderLeft + "px"; this._config.leftSlider.left = lSliderLeft; this._lUnselectedRegion.style.width = lValue + "px"; var rSliderLeft = rValue + this._config.bar.left; this._rSlider.style.left = rSliderLeft + "px"; this._config.rightSlider.left = rSliderLeft; this._rUnselectedRegion.style.left = rSliderLeft + "px"; this._rUnselectedRegion.style.width = Math.ceil(this.containerClientWidth - rSliderLeft - this._config.bar.right) + "px"; if(positionChanged) { this._handlePosition = new DiagnosticsHub.JsonTimespan(this.convertToTime(lValue), this.convertToTime(rValue)); this.raiseSelectionTimeRangeChangedEvent(this._handlePosition, true); this.setAriaLabelForSliders(); } } this._scale.resize(); } }; DoubleSlider.getDragDirection = function getDragDirection(selectionWidth) { if(selectionWidth > 0) { return DiagnosticsHub.DragDirection.Right; } else if(selectionWidth < 0) { return DiagnosticsHub.DragDirection.Left; } return DiagnosticsHub.DragDirection.None; }; DoubleSlider.prototype.initialize = function () { window.addEventListener("resize", this._onResizeHandler); this._currentTimeRange = this._config.timeRange; this._handlePosition = this._currentTimeRange; if(this._config.isSelectionEnabled) { this._tabFocus = this.onTabFocus.bind(this); this._tabBlur = this.onTabBlur.bind(this); this._keyDown = this.onKeyDown.bind(this); this._keyUp = this.onKeyUp.bind(this); this._mouseMoveListener = this.onMouseMove.bind(this); this._mouseUpListener = this.onMouseUp.bind(this); this._startSelection = this.onStartSelection.bind(this); this._onDrag = this.onDrag.bind(this); this._onHandleAnimation = this.onHandleAnimation.bind(this); this._onDraggingAnimation = this.onDraggingAnimation.bind(this); this._container.addEventListener("mousedown", this._startSelection); } this._viewEventManager = Microsoft.VisualStudio.DiagnosticsHub.getViewEventManager(); this._viewEventManager.selectionChanged.addEventListener(this.setSelectionChanged.bind(this)); }; DoubleSlider.prototype.setSelectionChanged = function (args) { Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_RulerSelectionHandlingBegin); if(args && args.position && !args.position.equals(this.sliderHandlePosition)) { this.sliderHandlePosition = args.position; } Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_RulerSelectionHandlingEnd); }; DoubleSlider.prototype.raiseSelectionTimeRangeChangedEvent = function (position, isIntermittent) { if (typeof isIntermittent === "undefined") { isIntermittent = false; } var args = { position: position, isIntermittent: isIntermittent }; if(this._viewEventManager) { this._viewEventManager.selectionChanged.raiseEvent(args); } }; DoubleSlider.prototype.renderRulerBar = function () { var leftBar = document.createElement("div"); leftBar.classList.add("ruler-bar-left-side"); leftBar.style.width = this._config.bar.left + "px"; leftBar.style.left = "0px"; this._container.appendChild(leftBar); this._bar = document.createElement("div"); this._bar.id = this._config.bar.id; this._bar.className = this._config.bar.className; this._bar.style.left = (this._config.bar.left) + "px"; this._bar.style.width = (this.containerClientWidth - this._config.bar.left - this._config.bar.right) + "px"; this._container.appendChild(this._bar); var rightBar = document.createElement("div"); rightBar.classList.add("ruler-bar-right-side"); rightBar.style.width = this._config.bar.right + "px"; rightBar.style.right = "0px"; this._container.appendChild(rightBar); }; DoubleSlider.prototype.renderRulerScale = function () { var config = { timeRange: this._currentTimeRange, containerId: this._bar.id, series: this._config.markSeries, imageTokenList: this._config.bar.scaleConfig.imageTokenList, aggregatedImageToken: this._config.bar.scaleConfig.aggregatedImageToken }; this._scale = new RulerScale(config); this._scale.render(); this.setAriaLabelForRuler(); this.setAriaLabelForSliders(); }; DoubleSlider.prototype.renderLeftSliderHandle = function () { this._lSlider = document.createElement("div"); this._lSlider.className = this._config.leftSlider.className; this._lSlider.style.width = this._config.leftSlider.width + "px"; var sliderLeft = this._config.bar.left - this._config.leftSlider.width; this._lSlider.style.left = sliderLeft + "px"; this._lSlider.tabIndex = 0; this._container.appendChild(this._lSlider); this._config.leftSlider.left = sliderLeft; this._lSlider.addEventListener("mousedown", this.mouseDown.bind(this)); this._lSlider.addEventListener("focus", this._tabFocus); this._lSlider.addEventListener("blur", this._tabBlur); this.setAriaLabelForLeftSlider(); this._lUnselectedRegion = document.createElement("div"); this._lUnselectedRegion.className = this._rulerUnselectedCss; this._lUnselectedRegion.style.width = "0px"; this._lUnselectedRegion.style.left = this._config.bar.left + "px"; this._container.appendChild(this._lUnselectedRegion); }; DoubleSlider.prototype.setAriaLabelForLeftSlider = function () { if(this._lSlider) { this._lSlider.setAttribute("role", "slider"); this._lSlider.setAttribute("aria-label", Plugin.Resources.getString("RulerLeftSliderAriaLabel")); var label = Plugin.Resources.getString("RulerSliderAriaValueText", RulerUtilities.formatTime(this._handlePosition.begin, DiagnosticsHub.UnitFormat.fullName), RulerUtilities.formatTime(this._currentTimeRange.begin, DiagnosticsHub.UnitFormat.fullName), RulerUtilities.formatTime(this._handlePosition.end, DiagnosticsHub.UnitFormat.fullName)); this._lSlider.setAttribute("aria-valuetext", label); this._lSlider.setAttribute("aria-valuenow", RulerUtilities.formatTime(this._handlePosition.begin)); this._lSlider.setAttribute("aria-valuemin", RulerUtilities.formatTime(this._currentTimeRange.begin)); this._lSlider.setAttribute("aria-valuemax", RulerUtilities.formatTime(this._handlePosition.end)); } }; DoubleSlider.prototype.setAriaLabelForRightSlider = function () { if(this._rSlider) { this._rSlider.setAttribute("role", "slider"); this._rSlider.setAttribute("aria-label", Plugin.Resources.getString("RulerRightSliderAriaLabel")); var label = Plugin.Resources.getString("RulerSliderAriaValueText", RulerUtilities.formatTime(this._handlePosition.end, DiagnosticsHub.UnitFormat.fullName), RulerUtilities.formatTime(this._handlePosition.begin, DiagnosticsHub.UnitFormat.fullName), RulerUtilities.formatTime(this._currentTimeRange.end, DiagnosticsHub.UnitFormat.fullName)); this._rSlider.setAttribute("aria-valuetext", label); this._rSlider.setAttribute("aria-valuenow", RulerUtilities.formatTime(this._handlePosition.end)); this._rSlider.setAttribute("aria-valuemin", RulerUtilities.formatTime(this._handlePosition.begin)); this._rSlider.setAttribute("aria-valuemax", RulerUtilities.formatTime(this._currentTimeRange.end)); } }; DoubleSlider.prototype.setAriaLabelForSliders = function () { this.setAriaLabelForLeftSlider(); this.setAriaLabelForRightSlider(); }; DoubleSlider.prototype.renderRightSliderHandle = function () { this._rSlider = document.createElement("div"); this._rSlider.className = this._config.rightSlider.className; this._rSlider.style.width = this._config.rightSlider.width + "px"; var sliderLeft = this.containerClientWidth - this._config.bar.right; this._rSlider.style.left = sliderLeft + "px"; this._rSlider.tabIndex = 0; this._container.appendChild(this._rSlider); this._config.rightSlider.left = sliderLeft; this._rSlider.addEventListener("mousedown", this.mouseDown.bind(this)); this._rSlider.addEventListener("focus", this._tabFocus); this._rSlider.addEventListener("blur", this._tabBlur); this.setAriaLabelForRightSlider(); this._rUnselectedRegion = document.createElement("div"); this._rUnselectedRegion.className = this._rulerUnselectedCss; this._rUnselectedRegion.style.width = "0px"; this._rUnselectedRegion.style.left = sliderLeft + "px"; this._container.appendChild(this._rUnselectedRegion); }; DoubleSlider.prototype.onTabFocus = function (e) { if(e.srcElement === this._lSlider) { this._currentSlider = this._lSlider; this._lSlider.addEventListener("keydown", this._keyDown, false); this._lSlider.addEventListener("keyup", this._keyUp, false); } else if(e.srcElement === this._rSlider) { this._currentSlider = this._rSlider; this._rSlider.addEventListener("keydown", this._keyDown, false); this._rSlider.addEventListener("keyup", this._keyUp, false); } this._focused = true; }; DoubleSlider.prototype.onTabBlur = function (e) { if(e.srcElement === this._lSlider) { this._lSlider.removeEventListener("keydown", this._keyDown, false); this._lSlider.removeEventListener("keyup", this._keyUp, false); } else if(e.srcElement === this._rSlider) { this._rSlider.removeEventListener("keydown", this._keyDown, false); this._rSlider.removeEventListener("keyup", this._keyUp, false); } this._currentSlider = null; this._focused = false; }; DoubleSlider.prototype.onKeyDown = function (e) { this.handleKeyEvent(e, true); }; DoubleSlider.prototype.onKeyUp = function (e) { this.handleKeyEvent(e, false); }; DoubleSlider.prototype.handleKeyEvent = function (e, isDown) { var isIntermittent = isDown; if(this._focused && e.keyCode === DiagnosticsHub.Common.KeyCodes.ArrowLeft) { if(e.srcElement === this._lSlider) { this.setHandlePosition(parseFloat(this._lSlider.style.left) - this._config.step, isIntermittent); } else if(e.srcElement === this._rSlider) { this.setHandlePosition(parseFloat(this._rSlider.style.left) - this._config.step, isIntermittent); } } if(this._focused && e.keyCode === DiagnosticsHub.Common.KeyCodes.ArrowRight) { if(e.srcElement === this._lSlider) { this.setHandlePosition(parseFloat(this._lSlider.style.left) + this._config.step, isIntermittent); } else if(e.srcElement === this._rSlider) { this.setHandlePosition(parseFloat(this._rSlider.style.left) + this._config.step, isIntermittent); } } }; DoubleSlider.prototype.mouseDown = function (e) { this._mousePos = e.clientX; var rect = this._container.getBoundingClientRect(); var root = document.documentElement; var x = e.clientX - rect.left - root.scrollLeft; if(x >= parseFloat(this._lSlider.style.left) && x <= parseFloat(this._lSlider.style.left) + parseFloat(this._lSlider.style.width)) { this._currentSlider = this._lSlider; } else if(x >= parseFloat(this._rSlider.style.left) && x <= parseFloat(this._rSlider.style.left) + parseFloat(this._rSlider.style.width)) { this._currentSlider = this._rSlider; } if(this._currentSlider) { document.addEventListener("mousemove", this._mouseMoveListener, false); document.addEventListener("mouseup", this._mouseUpListener, false); this._animationFrameHandle = window.requestAnimationFrame(this._onHandleAnimation); } return false; }; DoubleSlider.prototype.renderHandles = function (isIntermittent) { if (typeof isIntermittent === "undefined") { isIntermittent = true; } var rect = this._container.getBoundingClientRect(); var root = document.documentElement; var mouseX = this._mousePos - rect.left - root.scrollLeft; if(this._currentSlider && (!isIntermittent || mouseX < parseFloat(this._currentSlider.style.left) || mouseX > parseFloat(this._currentSlider.style.left) + parseFloat(this._currentSlider.style.width))) { this.setHandlePosition(mouseX, isIntermittent); } }; DoubleSlider.prototype.onHandleAnimation = function () { this.renderHandles(); this._animationFrameHandle = window.requestAnimationFrame(this._onHandleAnimation); }; DoubleSlider.prototype.setHandlePosition = function (position, isIntermittent) { if(this._currentSlider) { var handle; if(this._currentSlider === this._lSlider) { var currentSlider = this._lSlider; var oppositeSlider = this._rSlider; var oppositeSliderLeftPosition = parseFloat(oppositeSlider.style.left); var configLeftSlider = this._config.leftSlider; var configLeftSliderWidth = configLeftSlider.width; var configBar = this._config.bar; var distanceBetweenSliders = oppositeSliderLeftPosition - position - configLeftSliderWidth; if(distanceBetweenSliders < this._config.minimumRangeInPixel) { var minPosition = position - (this._config.minimumRangeInPixel - distanceBetweenSliders); if(minPosition < configBar.left) { return; } currentSlider.style.left = minPosition + "px"; this._lUnselectedRegion.style.width = minPosition - configBar.left + "px"; configLeftSlider.left = minPosition; handle = new DiagnosticsHub.JsonTimespan(this.convertToTime(minPosition + configLeftSliderWidth - configBar.left), this._handlePosition.end); } else if(position >= configBar.left - configLeftSliderWidth && position <= oppositeSliderLeftPosition - parseFloat(currentSlider.style.width)) { currentSlider.style.left = position + "px"; this._lUnselectedRegion.style.width = position - configBar.left + "px"; configLeftSlider.left = position; handle = new DiagnosticsHub.JsonTimespan(this.convertToTime(position + configLeftSliderWidth - configBar.left), this._handlePosition.end); } else if(position < configBar.left) { currentSlider.style.left = configBar.left - configLeftSliderWidth + "px"; this._lUnselectedRegion.style.width = "0px"; configLeftSlider.left = configBar.left - configLeftSliderWidth; handle = new DiagnosticsHub.JsonTimespan(this._currentTimeRange.begin, this._handlePosition.end); } } else if(this._currentSlider === this._rSlider) { var currentSlider = this._rSlider; var oppositeSlider = this._lSlider; var oppositeSliderLeftPosition = parseFloat(oppositeSlider.style.left); var configLeftSlider = this._config.leftSlider; var configLeftSliderWidth = configLeftSlider.width; var configRightSlider = this._config.rightSlider; var configBar = this._config.bar; var distanceBetweenSliders = position - oppositeSliderLeftPosition - configLeftSliderWidth; if(distanceBetweenSliders < this._config.minimumRangeInPixel) { var maxPosition = position + (this._config.minimumRangeInPixel - distanceBetweenSliders); if(maxPosition > (this._containerClientWidth - configBar.right)) { return; } currentSlider.style.left = maxPosition + "px"; this._rUnselectedRegion.style.left = maxPosition + "px"; this._rUnselectedRegion.style.width = Math.ceil(this.containerClientWidth - configBar.right - maxPosition) + "px"; configRightSlider.left = maxPosition; handle = new DiagnosticsHub.JsonTimespan(this._handlePosition.begin, this.convertToTime(maxPosition - configBar.left)); } else if(position <= this.containerClientWidth - configBar.right && position >= oppositeSliderLeftPosition + parseFloat(oppositeSlider.style.width)) { currentSlider.style.left = position + "px"; this._rUnselectedRegion.style.left = position + "px"; this._rUnselectedRegion.style.width = Math.ceil(this.containerClientWidth - configBar.right - position) + "px"; configRightSlider.left = position; handle = new DiagnosticsHub.JsonTimespan(this._handlePosition.begin, this.convertToTime(position - configBar.left)); } else if(position > this.containerClientWidth - configBar.right) { currentSlider.style.left = this.containerClientWidth - configBar.right + "px"; this._rUnselectedRegion.style.left = this.containerClientWidth - configBar.right + "px"; this._rUnselectedRegion.style.width = "0px"; configRightSlider.left = this.containerClientWidth - configBar.right; handle = new DiagnosticsHub.JsonTimespan(this._handlePosition.begin, this._currentTimeRange.end); } } if(handle) { this._handlePosition = handle; this.raiseSelectionTimeRangeChangedEvent(this._handlePosition, isIntermittent); } else if(!isIntermittent && this._handlePosition) { this.raiseSelectionTimeRangeChangedEvent(this._handlePosition, isIntermittent); } this.setAriaLabelForSliders(); if(!isIntermittent) { this._sqmRuler.selectionChanged(DiagnosticsHub.Sqm.SelectionChangeSource.DoubleSliderHandles, distanceBetweenSliders <= this._config.minimumRangeInPixel); } } }; DoubleSlider.prototype.convertToTime = function (pixels) { if(this.containerClientWidth - this._config.bar.left - this._config.bar.right > 0) { return DiagnosticsHub.BigNumber.addNumber(this._currentTimeRange.begin, parseInt(this._currentTimeRange.elapsed.value) * (pixels / (this.containerClientWidth - this._config.bar.left - this._config.bar.right))); } return DiagnosticsHub.BigNumber.zero; }; DoubleSlider.prototype.onMouseMove = function (e) { this._mousePos = e.clientX; e.stopPropagation(); }; DoubleSlider.prototype.onMouseUp = function (e) { window.cancelAnimationFrame(this._animationFrameHandle); this._animationFrameHandle = null; this._mousePos = e.clientX; this.renderHandles(false); document.removeEventListener("mousemove", this._mouseMoveListener, false); document.removeEventListener("mouseup", this._mouseUpListener, false); if(!this._focused) { this._currentSlider = null; } }; DoubleSlider.prototype.checkIfMouseInsideValidSelectionArea = function (event) { var isValid = false; var rect = this._container.getBoundingClientRect(); var mouseX = event.clientX - rect.left - this._bar.offsetLeft; if(mouseX >= 0 && mouseX <= this.barClientWidth) { isValid = true; } return isValid; }; DoubleSlider.prototype.getSelectionStartWidth = function (event) { var rect = this._container.getBoundingClientRect(); var mouseX = event.clientX - rect.left - this._bar.offsetLeft; return mouseX; }; DoubleSlider.prototype.drawSelection = function () { this._lUnselectedRegion.style.width = this._selectionPixelStartX + "px"; this._lSlider.style.left = this._selectionPixelStartX - this._config.leftSlider.width + this._bar.offsetLeft + "px"; this._config.leftSlider.left = this._selectionPixelStartX + this._bar.offsetLeft; var left = this._selectionPixelStartX + this._selectionPixelWidth + this._bar.offsetLeft; this._rUnselectedRegion.style.left = left + "px"; this._rUnselectedRegion.style.width = (this.barClientWidth - this._selectionPixelStartX - this._selectionPixelWidth) + "px"; this._config.rightSlider.left = left; this._rSlider.style.left = left + "px"; if(this._dragDirection === DiagnosticsHub.DragDirection.Left) { this._lSlider.focus(); } else { this._rSlider.focus(); } this._handlePosition = new DiagnosticsHub.JsonTimespan(this.convertToTime(this._selectionPixelStartX), this.convertToTime(this._selectionPixelStartX + this._selectionPixelWidth)); }; DoubleSlider.prototype.ensureMinSelectionWidth = function () { if(typeof this._selectionPixelStartX === "undefined") { return; } if(Math.abs(this._selectionPixelWidth) < this._config.minimumRangeInPixel) { this._selectionPixelWidth = this._config.minimumRangeInPixel; switch(this._dragDirection) { case DiagnosticsHub.DragDirection.Right: if(this._selectionPixelStartX + this._selectionPixelWidth > this.barClientWidth) { this._selectionPixelStartX = this.barClientWidth - this._selectionPixelWidth; } break; case DiagnosticsHub.DragDirection.Left: if(this._selectionPixelStartX - this._selectionPixelWidth < 0) { this._selectionPixelStartX = 0; } else if(this._selectionPixelStartX + this._selectionPixelWidth > this.barClientWidth) { this._selectionPixelStartX = this.barClientWidth - this._selectionPixelWidth; } else { this._selectionPixelStartX = this._initialSelectionPixelStartX - this._selectionPixelWidth; } break; default: if(this._selectionPixelStartX + (this._selectionPixelWidth / 2) > this.barClientWidth) { this._selectionPixelStartX = this.barClientWidth - this._selectionPixelWidth; } else if(this._selectionPixelStartX - (this._selectionPixelWidth / 2) < 0) { this._selectionPixelStartX = 0; } else { this._selectionPixelStartX = this._selectionPixelStartX - (this._selectionPixelWidth / 2); } break; } } }; DoubleSlider.prototype.onStartSelection = function (event) { if(event.which !== DiagnosticsHub.Common.MouseCodes.Left) { return; } if((event.target !== this._lSlider && event.target !== this._rSlider) && this.checkIfMouseInsideValidSelectionArea(event)) { this._initialSelectionPixelStartX = this._selectionPixelStartX = this.getSelectionStartWidth(event); this._selectionPixelWidth = 0; this._dragDirection = DoubleSlider.getDragDirection(this._selectionPixelWidth); this._mouseupHandler = this.onStopSelection.bind(this); this._container.addEventListener("mousemove", this._onDrag); this._container.addEventListener("mouseup", this._mouseupHandler); this._container.setCapture(true); this._animationFrameHandle = window.requestAnimationFrame(this._onDraggingAnimation); } event.stopPropagation(); }; DoubleSlider.prototype.onStopSelection = function (event) { this._container.removeEventListener("mousemove", this._onDrag); this._container.removeEventListener("mouseup", this._mouseupHandler); this._container.releaseCapture(); window.cancelAnimationFrame(this._animationFrameHandle); this._animationFrameHandle = null; this.ensureMinSelectionWidth(); this.drawSelection(); this.raiseSelectionTimeRangeChangedEvent(this._handlePosition); this.setAriaLabelForSliders(); this._dragDirection = DiagnosticsHub.DragDirection.None; this._sqmRuler.selectionChanged(DiagnosticsHub.Sqm.SelectionChangeSource.DoubleSlider, this._selectionPixelWidth === this._config.minimumRangeInPixel); }; DoubleSlider.prototype.onDraggingAnimation = function () { this.drawSelection(); this.raiseSelectionTimeRangeChangedEvent(this._handlePosition, true); this._animationFrameHandle = window.requestAnimationFrame(this._onDraggingAnimation); }; DoubleSlider.prototype.onDrag = function (event) { if(this.checkIfMouseInsideValidSelectionArea(event)) { var xPixels = this.getSelectionStartWidth(event); this._dragDirection = DoubleSlider.getDragDirection(xPixels - this._initialSelectionPixelStartX); this._selectionPixelWidth = Math.abs(xPixels - this._initialSelectionPixelStartX); if(this._dragDirection === DiagnosticsHub.DragDirection.Left) { this._selectionPixelStartX = this._initialSelectionPixelStartX - this._selectionPixelWidth; } } event.stopPropagation(); }; DoubleSlider.prototype.resetHandlePosition = function () { this._lSlider.style.left = (this._config.bar.left - this._config.leftSlider.width) + "px"; this._config.leftSlider.left = (this._config.bar.left - this._config.leftSlider.width); this._lUnselectedRegion.style.width = "0px"; this._lUnselectedRegion.style.left = this._config.bar.left + "px"; var rSliderLeft = this.containerClientWidth - this._config.bar.right; this._rSlider.style.left = rSliderLeft + "px"; this._config.rightSlider.left = rSliderLeft; this._rUnselectedRegion.style.width = "0px"; this._rUnselectedRegion.style.left = rSliderLeft + "px"; }; DoubleSlider.prototype.resetScale = function () { this._scale.setTimeRange(this._currentTimeRange); this._scale.render(); this.setAriaLabelForRuler(); this.setAriaLabelForSliders(); }; DoubleSlider.prototype.convertToPixel = function (time) { var pixels = 0; if(this._currentTimeRange.elapsed.greater(DiagnosticsHub.BigNumber.zero)) { var timeFromRangeStart = parseInt(DiagnosticsHub.BigNumber.subtract(time, this._currentTimeRange.begin).value); var range = parseInt(this._currentTimeRange.elapsed.value); pixels = (timeFromRangeStart / range) * (this.containerClientWidth - this._config.bar.left - this._config.bar.right); } return pixels; }; DoubleSlider.prototype.setAriaLabelForRuler = function () { if(this._container) { var label = Plugin.Resources.getString("RulerAriaLabel", RulerUtilities.formatTime(this._currentTimeRange.begin, DiagnosticsHub.UnitFormat.fullName), RulerUtilities.formatTime(this._currentTimeRange.end, DiagnosticsHub.UnitFormat.fullName)); this._container.setAttribute("aria-label", label); } }; return DoubleSlider; })(); DiagnosticsHub.DoubleSlider = DoubleSlider; var MarkData = (function () { function MarkData(time, tooltip) { this.time = time; this.tooltip = tooltip; } return MarkData; })(); DiagnosticsHub.MarkData = MarkData; var AggregatedMarkData = (function () { function AggregatedMarkData() { this._content = []; this.marks = []; } AggregatedMarkData.prototype.getTooltipContent = function () { this.updateData(); return this._content.join("\r\n"); }; AggregatedMarkData.prototype.getAriaContent = function () { this.updateData(); return this._content.join(", "); }; AggregatedMarkData.prototype.length = function () { return this.marks.length; }; AggregatedMarkData.prototype.push = function (mark) { if(!this.time || this.time > mark.time) { this.time = mark.time; } this.marks.push(mark); }; AggregatedMarkData.prototype.updateData = function () { if(this._content.length === this.marks.length) { return; } this._content = []; for(var i = 0; i < this.marks.length; i++) { if(this.marks[i].tooltip !== null && typeof this.marks[i].tooltip !== "undefined") { var mark = this.marks[i]; var tooltip = mark.tooltip; tooltip += Plugin.Resources.getString("RulerMarkTooltipLabel", VisualStudio.DiagnosticsHub.RulerUtilities.formatTime(mark.time)); this._content.push(tooltip); } } }; return AggregatedMarkData; })(); DiagnosticsHub.AggregatedMarkData = AggregatedMarkData; var RulerScale = (function () { function RulerScale(config) { this._containerClientWidth = null; this._scaleMainDivClientWidth = null; this._scaleMarksImageWidth = 9; this._rulerScaleTickmarkBigCss = "ruler-scale-tickmark-big"; this._rulerScaleTickmarkMediumCss = "ruler-scale-tickmark-medium"; this._rulerScaleTickmarkSmallCss = "ruler-scale-tickmark-small"; this._rulerScaleMarkImageEventCss = "ruler-scale-mark-image-event"; this._rulerScaleLabelTextCss = "ruler-scale-label-text"; this._rulerScaleMainCss = "ruler-scale-main"; this._rulerScaleTickmarksCss = "ruler-scale-tickmarks"; this._rulerScaleMarkImagePositionCss = "ruler-scale-mark-image-position"; this._minimumMarkDistance = 7; this._onResizeHandler = this.resize.bind(this); if(config && config.containerId && config.timeRange) { this._timeRange = config.timeRange; this._container = document.getElementById(config.containerId); this._container.onresize = this._onResizeHandler; this._seriesList = config.series; this._imageTokenList = config.imageTokenList; this._aggregatedMarkImageToken = config.aggregatedImageToken; while(this._container.hasChildNodes()) { this._container.removeChild(this._container.firstChild); } } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } } Object.defineProperty(RulerScale.prototype, "containerClientWidth", { get: function () { if(this._container && (this._containerClientWidth === null || typeof (this._containerClientWidth) === "undefined")) { this._containerClientWidth = this._container.clientWidth; } return this._containerClientWidth; }, set: function (value) { this._containerClientWidth = value; }, enumerable: true, configurable: true }); Object.defineProperty(RulerScale.prototype, "scaleMainDivClientWidth", { get: function () { if(this._scaleMainDiv && (this._scaleMainDivClientWidth === null || typeof this._scaleMainDivClientWidth === "undefined")) { this._scaleMainDivClientWidth = this._scaleMainDiv.clientWidth; } return this._scaleMainDivClientWidth; }, set: function (value) { this._scaleMainDivClientWidth = value; }, enumerable: true, configurable: true }); RulerScale.prototype.setTimeRange = function (time) { this._timeRange = time; }; RulerScale.prototype.deinitialize = function () { window.removeEventListener("resize", this._onResizeHandler); if(this._container) { this._container.onresize = null; } }; RulerScale.prototype.resize = function () { if(this.containerClientWidth === this._container.clientWidth) { return; } this.invalidateSizeCache(); this.render(); }; RulerScale.prototype.invalidateSizeCache = function () { if(this._container) { this.containerClientWidth = this._container.clientWidth; } if(this._scaleMainDiv) { this._scaleMainDivClientWidth = this._scaleMainDiv.clientWidth; } }; RulerScale.prototype.getTimePerPixel = function (timeRangeOverride) { var time = DiagnosticsHub.BigNumber.zero; var timeRange = (timeRangeOverride) ? timeRangeOverride : this._timeRange; if(this._containerClientWidth > 0) { time = DiagnosticsHub.BigNumber.divideNumber(timeRange.elapsed, this._containerClientWidth); } return time; }; RulerScale.prototype.render = function () { var _this = this; if(this._container) { if(!this._scaleMainDiv) { this._scaleMainDiv = document.createElement("div"); this._scaleMainDiv.className = this._rulerScaleMainCss; window.addEventListener("resize", this._onResizeHandler); this._container.appendChild(this._scaleMainDiv); } if(!this._scaleTickMarksDiv) { this._scaleTickMarksDiv = document.createElement("div"); this._scaleTickMarksDiv.className = this._rulerScaleTickmarksCss; this._scaleMainDiv.appendChild(this._scaleTickMarksDiv); this._scaleBigTickMarkElementsFactory = DiagnosticsHub.Common.ElementRecyclerFactory.forDivWithClass(this._scaleTickMarksDiv, this._rulerScaleTickmarkBigCss); this._scaleMediumTickMarkElementsFactory = DiagnosticsHub.Common.ElementRecyclerFactory.forDivWithClass(this._scaleTickMarksDiv, this._rulerScaleTickmarkMediumCss); this._scaleSmallTickMarkElementsFactory = DiagnosticsHub.Common.ElementRecyclerFactory.forDivWithClass(this._scaleTickMarksDiv, this._rulerScaleTickmarkSmallCss); this._scaleTickMarkLabelElementsFactory = DiagnosticsHub.Common.ElementRecyclerFactory.forDivWithClass(this._scaleTickMarksDiv, this._rulerScaleLabelTextCss); this._scaleMarkElementsFactory = new DiagnosticsHub.Common.ElementRecyclerFactory(this._scaleTickMarksDiv, function () { return _this.createMarkVisual(_this._rulerScaleMarkImageEventCss); }); } this._tickMarkList = RulerUtilities.getTickMarksPosition(this._timeRange, this.containerClientWidth); this.renderTickMarks(); } }; RulerScale.prototype.addMark = function (id, markData, shouldRender) { if (typeof shouldRender === "undefined") { shouldRender = true; } if(this._seriesList && id && markData && markData.time && this._timeRange.contains(markData.time)) { var series; for(var j = 0; j < this._seriesList.length; j++) { if(this._seriesList[j].id === id) { series = this._seriesList[j]; if(!series.data) { series.data = []; } series.data.push(markData); break; } } if(shouldRender) { this.renderMarks(); } } }; RulerScale.prototype.renderTickMarks = function () { this._scaleBigTickMarkElementsFactory.start(); this._scaleMediumTickMarkElementsFactory.start(); this._scaleSmallTickMarkElementsFactory.start(); this._scaleTickMarkLabelElementsFactory.start(); for(var i = 0; i < this._tickMarkList.length; i++) { var tick; switch(this._tickMarkList[i].type) { case DiagnosticsHub.TickMarkType.Big: tick = this._scaleBigTickMarkElementsFactory.getNext(); break; case DiagnosticsHub.TickMarkType.Medium: tick = this._scaleMediumTickMarkElementsFactory.getNext(); break; case DiagnosticsHub.TickMarkType.Small: tick = this._scaleSmallTickMarkElementsFactory.getNext(); break; } if(tick) { tick.style.left = this.calculateElementPosition(this._tickMarkList[i].value) + "px"; if(DiagnosticsHub.TickMarkType.Big === this._tickMarkList[i].type) { var label = this._scaleTickMarkLabelElementsFactory.getNext(); label.innerText = this._tickMarkList[i].label; label.style.left = parseFloat(tick.style.left) + 1 + "px"; } } } this._scaleBigTickMarkElementsFactory.stop(); this._scaleMediumTickMarkElementsFactory.stop(); this._scaleSmallTickMarkElementsFactory.stop(); this._scaleTickMarkLabelElementsFactory.stop(); this.renderMarks(); }; RulerScale.prototype.renderMarks = function () { var _this = this; if(this._scaleTickMarksDiv) { this.createAggregateMarkList(); this._scaleMarkElementsFactory.start(); if(this._data) { for(var j = 0; j < this._data.length; j++) { var mark = this._data[j]; if(mark && mark.time && this._timeRange.contains(mark.time)) { (function (m) { var markDiv = _this._scaleMarkElementsFactory.getNext(); if(m.glyphIndex === null || typeof m.glyphIndex === "undefined" || m.glyphIndex === -1 || !_this._imageTokenList[m.glyphIndex]) { markDiv.style.backgroundImage = "url(" + Plugin.Theme.getValue(_this._aggregatedMarkImageToken) + ")"; } else { markDiv.style.backgroundImage = "url(" + Plugin.Theme.getValue(_this._imageTokenList[m.glyphIndex]) + ")"; } markDiv.style.left = m.pixelPosition + "px"; markDiv.onmouseover = function () { return _this.showMarkTooltip(m); }; markDiv.onmouseout = (Plugin).Tooltip.dismiss; markDiv.onfocus = function () { markDiv.setAttribute("aria-label", Plugin.Resources.getString("RulerMarkLabel", m.getAriaContent())); }; })(mark); } } } this._scaleMarkElementsFactory.stop(); } }; RulerScale.prototype.createAggregateMarkList = function () { this._data = []; var seriesList = this._seriesList; if(seriesList) { for(var i = 0; i < seriesList.length; i++) { var seriesData = seriesList[i].data; if(!seriesData) { continue; } var seriesIndex = seriesList[i].index; for(var j = 0; j < seriesData.length; j++) { var dataPoint = seriesData[j]; if(this._timeRange.contains(dataPoint.time)) { this.createAggregatedMark(dataPoint, seriesIndex); } } } } this._data.sort(function (a, b) { return a.time.compareTo(b.time); }); }; RulerScale.prototype.createAggregatedMark = function (mark, markGlyphIndex) { var markPosition = this.calculateElementPosition(mark.time) - (this._scaleMarksImageWidth / 2); var isNewAggregatedMark = true; for(var markIndex = 0; markIndex < this._data.length; ++markIndex) { var currentAggregatedMark = this._data[markIndex]; if(Math.abs(currentAggregatedMark.pixelPosition - markPosition) <= this._minimumMarkDistance) { currentAggregatedMark.push(mark); if(currentAggregatedMark.glyphIndex !== markGlyphIndex) { currentAggregatedMark.glyphIndex = (currentAggregatedMark.glyphIndex === 0 || currentAggregatedMark.glyphIndex === 1) && (markGlyphIndex === 0 || markGlyphIndex === 1) ? 0 : -1; } isNewAggregatedMark = false; break; } } if(isNewAggregatedMark) { var newAggregatedMark = new AggregatedMarkData(); newAggregatedMark.push(mark); newAggregatedMark.glyphIndex = markGlyphIndex; newAggregatedMark.pixelPosition = markPosition; this._data.push(newAggregatedMark); } }; RulerScale.prototype.showMarkTooltip = function (mark) { var toolTipContent = mark.getTooltipContent(); if(toolTipContent) { var config = { content: toolTipContent }; (Plugin).Tooltip.show(config); } }; RulerScale.prototype.createMarkVisual = function (className) { var markDiv = document.createElement("div"); markDiv.tabIndex = 0; markDiv.classList.add(className); markDiv.classList.add(this._rulerScaleMarkImagePositionCss); return markDiv; }; RulerScale.prototype.calculateElementPosition = function (time) { return Math.round((this.scaleMainDivClientWidth * parseInt(DiagnosticsHub.BigNumber.subtract(time, this._timeRange.begin).value) / parseInt(this._timeRange.elapsed.value))); }; return RulerScale; })(); DiagnosticsHub.RulerScale = RulerScale; var RulerUtilities = (function () { function RulerUtilities() { } RulerUtilities.OneMillisecond = 1000000; RulerUtilities.OneSecond = 1000 * 1000000; RulerUtilities.OneMinute = 60 * 1000 * 1000000; RulerUtilities.Counter = 0; RulerUtilities.getRandomNumber = function getRandomNumber() { return RulerUtilities.Counter++; }; RulerUtilities.getTickMarksPosition = function getTickMarksPosition(timeRange, width) { var range = timeRange.elapsed; var rangeNum = parseInt(range.value); var begin = timeRange.begin; var tickMarkList = []; var intervalDuration = Math.pow(10, Math.floor(Math.log(rangeNum) / Math.LN10)); var intervalWidth = (width / rangeNum) * intervalDuration; if(intervalWidth < 100) { if(intervalWidth < 25) { intervalDuration *= 8; } else if(intervalWidth < 50) { intervalDuration *= 4; } else if(intervalWidth < 100) { intervalDuration *= 2; } } else if(intervalWidth > 250) { if(intervalWidth < 400) { intervalDuration /= 2; } else if(intervalWidth < 800) { intervalDuration /= 4; } else if(intervalWidth < 1600) { intervalDuration /= 8; } else { intervalDuration /= 10; } } if(intervalDuration > 0) { var smallTickDuration = intervalDuration / 10; var mediumTickDuration = intervalDuration / 2; intervalWidth = (width / rangeNum) * intervalDuration; if(intervalWidth < 130) { smallTickDuration = intervalDuration / 5; } tickMarkList = RulerUtilities.generateTickMarks(timeRange, DiagnosticsHub.BigNumber.subtract(begin, DiagnosticsHub.BigNumber.moduloNumber(begin, intervalDuration)), DiagnosticsHub.BigNumber.convertFromNumber(intervalDuration), DiagnosticsHub.BigNumber.convertFromNumber(mediumTickDuration), DiagnosticsHub.BigNumber.convertFromNumber(smallTickDuration)); } return tickMarkList; }; RulerUtilities.getVerticalLinePositions = function getVerticalLinePositions(timeRange, width) { var positions = []; var marks = RulerUtilities.getTickMarksPosition(timeRange, width); for(var i = 0; i < marks.length; ++i) { var mark = marks[i]; if(mark.type === DiagnosticsHub.TickMarkType.Big) { var position = parseInt(DiagnosticsHub.BigNumber.subtract(mark.value, timeRange.begin).value) / parseInt(timeRange.elapsed.value) * 100; positions.push(position); } } return positions; }; RulerUtilities.formatTime = function formatTime(value, unitFormat) { if (typeof unitFormat === "undefined") { unitFormat = DiagnosticsHub.UnitFormat.italicizedAbbreviations; } var splitTime = RulerUtilities.getSplittedTime(value); var time = "0"; var nf = RulerUtilities.getNumberFormat(); if(parseInt(splitTime.minString)) { if(!parseInt(splitTime.secString) && !parseInt(splitTime.msString) && !parseInt(splitTime.nsString)) { time = splitTime.minString + ":00"; } else if(!parseInt(splitTime.msString) && !parseInt(splitTime.nsString)) { time = splitTime.minString + ":" + splitTime.secString; } else if(!parseInt(splitTime.nsString)) { splitTime.msString = splitTime.msString.replace(/0*$/, ""); time = splitTime.minString + ":" + splitTime.secString + nf.numberDecimalSeparator + splitTime.msString; } else { splitTime.nsString = splitTime.nsString.replace(/0*$/, ""); time = splitTime.minString + ":" + splitTime.secString + nf.numberDecimalSeparator + splitTime.msString + splitTime.nsString; } } else if(parseInt(splitTime.secString)) { if(!parseInt(splitTime.msString) && !parseInt(splitTime.nsString)) { time = splitTime.secString; } else if(!parseInt(splitTime.nsString)) { splitTime.msString = splitTime.msString.replace(/0*$/, ""); time = splitTime.secString + nf.numberDecimalSeparator + splitTime.msString; } else { splitTime.nsString = splitTime.nsString.replace(/0*$/, ""); time = splitTime.secString + nf.numberDecimalSeparator + splitTime.msString + splitTime.nsString; } } else if(parseInt(splitTime.msString)) { if(!parseInt(splitTime.nsString)) { time = splitTime.msString; } else { splitTime.nsString = splitTime.nsString.replace(/0*$/, ""); time = splitTime.msString + nf.numberDecimalSeparator + splitTime.nsString; } } else if(parseInt(splitTime.nsString)) { splitTime.nsString = splitTime.nsString.replace(/0*$/, ""); time = "0" + nf.numberDecimalSeparator + splitTime.nsString; } var unit = RulerUtilities.getUnit(parseInt(value.value), unitFormat); return time + unit; }; RulerUtilities.formatTitleTime = function formatTitleTime(value, unitFormat, isLive) { if (typeof unitFormat === "undefined") { unitFormat = DiagnosticsHub.UnitFormat.fullName; } if (typeof isLive === "undefined") { isLive = false; } var splitTime = RulerUtilities.getSplittedTime(value); var time = "0"; var nf = RulerUtilities.getNumberFormat(); if(isLive) { splitTime.msString = ""; splitTime.nsString = ""; } if(parseInt(splitTime.minString)) { if(!parseInt(splitTime.secString)) { time = splitTime.minString + ":00"; } else { time = splitTime.minString + ":" + splitTime.secString; } } else if(parseInt(splitTime.secString)) { if(!parseInt(splitTime.msString)) { time = splitTime.secString; } else { splitTime.msString = splitTime.msString.replace(/0*$/, ""); time = splitTime.secString + nf.numberDecimalSeparator + splitTime.msString; } } else if(parseInt(splitTime.msString)) { if(!parseInt(splitTime.nsString)) { time = splitTime.msString; } else { splitTime.nsString = splitTime.nsString.replace(/0*$/, ""); time = splitTime.msString + nf.numberDecimalSeparator + splitTime.nsString; } } else if(parseInt(splitTime.nsString)) { splitTime.nsString = splitTime.nsString.replace(/0*$/, ""); time = "0" + nf.numberDecimalSeparator + splitTime.nsString; } return time; }; RulerUtilities.formatSelectionTime = function formatSelectionTime(value) { var time = RulerUtilities.formatTitleTime(value, DiagnosticsHub.UnitFormat.fullName, false); var unit = RulerUtilities.getSelectedUnit(parseInt(value.value)); return time + unit; }; RulerUtilities.formatTotalTime = function formatTotalTime(value, unitFormat, isLive) { if (typeof unitFormat === "undefined") { unitFormat = DiagnosticsHub.UnitFormat.fullName; } if (typeof isLive === "undefined") { isLive = false; } var time = RulerUtilities.formatTitleTime(value, unitFormat, isLive); var unit = RulerUtilities.getUnit(parseInt(value.value), unitFormat, isLive); return time + unit; }; RulerUtilities.generateTickMarks = function generateTickMarks(timeRange, start, bigTick, mediumTick, step) { var tickMarkList = []; var beginNsec = timeRange.begin; var endNsec = timeRange.end; if(step.equals(DiagnosticsHub.BigNumber.zero)) { step = new DiagnosticsHub.BigNumber(0, 1); } for(var i = start; endNsec.greater(i); i = DiagnosticsHub.BigNumber.add(i, step)) { if(i.greater(beginNsec)) { var tickMarkTime = i; if(DiagnosticsHub.BigNumber.modulo(i, bigTick).equals(DiagnosticsHub.BigNumber.zero)) { tickMarkList.push({ type: DiagnosticsHub.TickMarkType.Big, value: tickMarkTime, label: RulerUtilities.formatTime(tickMarkTime) }); } else if(DiagnosticsHub.BigNumber.modulo(i, mediumTick).equals(DiagnosticsHub.BigNumber.zero)) { tickMarkList.push({ type: DiagnosticsHub.TickMarkType.Medium, value: tickMarkTime, label: RulerUtilities.formatTime(tickMarkTime) }); } else { tickMarkList.push({ type: DiagnosticsHub.TickMarkType.Small, value: tickMarkTime, label: RulerUtilities.formatTime(tickMarkTime) }); } } } return tickMarkList; }; RulerUtilities.getSelectedUnit = function getSelectedUnit(valueNs) { if(valueNs < RulerUtilities.OneSecond) { return " " + Plugin.Resources.getString("MillisecondsSelectedLabel"); } else if(valueNs < RulerUtilities.OneMinute) { return " " + Plugin.Resources.getString("SecondsSelectedLabel"); } else { return " " + Plugin.Resources.getString("MinutesSelectedLabel"); } }; RulerUtilities.getUnit = function getUnit(valueNs, unitFormat, isLive) { if (typeof isLive === "undefined") { isLive = false; } var units = this.getUnits(unitFormat); var unit; if(valueNs < RulerUtilities.OneSecond && !isLive) { unit = units.milliseconds; } else if(valueNs < RulerUtilities.OneMinute) { unit = units.seconds; } else { unit = units.minutes; } return unit; }; RulerUtilities.getUnits = function getUnits(unitFormat) { var unitLabelFormat; if(unitFormat === DiagnosticsHub.UnitFormat.fullName) { unitLabelFormat = { milliseconds: " " + Plugin.Resources.getString("MillisecondsLabel"), seconds: " " + Plugin.Resources.getString("SecondsLabel"), minutes: " " + Plugin.Resources.getString("MinutesLabel") }; } else { unitLabelFormat = { milliseconds: Plugin.Resources.getString("MillisecondsAbbreviation"), seconds: Plugin.Resources.getString("SecondsAbbreviation"), minutes: Plugin.Resources.getString("MinutesAbbreviation") }; } return unitLabelFormat; }; RulerUtilities.getSplittedTime = function getSplittedTime(value) { var nanoseconds = DiagnosticsHub.BigNumber.moduloNumber(value, RulerUtilities.OneMillisecond); var valueUnaccountedFor = DiagnosticsHub.BigNumber.subtract(value, nanoseconds); var milliseconds = DiagnosticsHub.BigNumber.moduloNumber(valueUnaccountedFor, RulerUtilities.OneSecond); valueUnaccountedFor = DiagnosticsHub.BigNumber.subtract(valueUnaccountedFor, milliseconds); var seconds = DiagnosticsHub.BigNumber.moduloNumber(valueUnaccountedFor, RulerUtilities.OneMinute); valueUnaccountedFor = DiagnosticsHub.BigNumber.subtract(valueUnaccountedFor, seconds); var minutes = valueUnaccountedFor; var nanosecondsNum = parseInt(nanoseconds.value); var minutesNum = parseInt(minutes.value) / RulerUtilities.OneMinute; var secondsNum = parseInt(seconds.value) / RulerUtilities.OneSecond; var millisecondsNum = parseInt(milliseconds.value) / RulerUtilities.OneMillisecond; var ns = ""; if(nanosecondsNum > 999) { ns = nanosecondsNum.toString().substr(0, 3); } var ms = ""; if(ns || millisecondsNum) { ms = millisecondsNum.toString(); if(secondsNum) { while(ms.length < 3) { ms = "0" + ms; } } } var sec = ""; if(ns || ms || secondsNum) { sec = secondsNum.toString(); if(minutesNum) { while(sec.length < 2) { sec = "0" + sec; } } } var min = ""; if(minutesNum) { min = minutesNum.toString(); } return { nsString: ns, msString: ms, secString: sec, minString: min }; }; RulerUtilities.getNumberFormat = function getNumberFormat() { var nf = (Plugin).Culture.NumberFormat; if(!nf || nf.length === 0) { nf = { numberDecimalSeparator: "." }; } return nf; }; return RulerUtilities; })(); DiagnosticsHub.RulerUtilities = RulerUtilities; var RulerLegend = (function () { function RulerLegend(config) { this._rulerLegendColorDivCss = "ruler-legend-color-div"; this._rulerLegendTextDivCss = "ruler-legend-text-div"; this._rulerLegendDivCss = "ruler-legend-div"; this._legendImageCss = "ruler-label-mark-image"; if(!config || !config.containerId) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } this._config = config; } RulerLegend.prototype.render = function () { for(var legendItemIndex = 0; legendItemIndex < this._config.data.length; legendItemIndex++) { var legendItem = this._config.data[legendItemIndex]; this.renderLegendItem(legendItem); } }; RulerLegend.prototype.renderLegendItem = function (legendItemData) { var legendColorDiv = document.createElement("div"); legendColorDiv.className = this._rulerLegendColorDivCss; var colorDiv = document.createElement("div"); colorDiv.className = this._legendImageCss; colorDiv.style.backgroundImage = "url(" + Plugin.Theme.getValue(legendItemData.imageToken) + ")"; legendColorDiv.appendChild(colorDiv); var legendTextDiv = document.createElement("div"); legendTextDiv.className = this._rulerLegendTextDivCss; legendTextDiv.innerHTML = legendItemData.text; var individualLegendBox = document.createElement("div"); individualLegendBox.className = this._rulerLegendDivCss; individualLegendBox.appendChild(legendColorDiv); individualLegendBox.appendChild(legendTextDiv); if(legendItemData.tooltip) { individualLegendBox.setAttribute("data-plugin-vs-tooltip", legendItemData.tooltip); } var container = document.getElementById(this._config.containerId); container.appendChild(individualLegendBox); }; return RulerLegend; })(); DiagnosticsHub.RulerLegend = RulerLegend; var RulerHeader = (function () { function RulerHeader(config) { this._rulerTitleTextCss = "ruler-title-text"; this._config = config; } RulerHeader.prototype.setTitle = function (value) { if(this._titleText) { var text = Plugin.Resources.getString("RulerTitle") || this._config.titleConfig.text || ""; if(this._config.titleConfig.description) { text += ": " + value; } this._titleText.innerHTML = text; } }; RulerHeader.prototype.render = function () { this._container = document.getElementById(this._config.containerId); while(this._container.hasChildNodes()) { this._container.removeChild(this._container.firstChild); } var titleContainer = document.createElement("div"); titleContainer.id = this._config.titleConfig.containerId; titleContainer.className = this._config.titleConfig.className; this._titleText = document.createElement("div"); this._titleText.className = this._rulerTitleTextCss; var text = Plugin.Resources.getString("RulerTitle") || this._config.titleConfig.text || ""; if(this._config.titleConfig.description) { text += ": " + this._config.titleConfig.description; } this._titleText.innerHTML = text; titleContainer.appendChild(this._titleText); var legendContainer = document.createElement("div"); legendContainer.id = this._config.legendConfig.containerId; legendContainer.className = this._config.legendConfig.className; this._container.appendChild(titleContainer); this._container.appendChild(legendContainer); this.legend = new RulerLegend(this._config.legendConfig); this.legend.render(); }; return RulerHeader; })(); DiagnosticsHub.RulerHeader = RulerHeader; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var DiagnosticsHubDataManager = (function () { function DiagnosticsHubDataManager() { this._graphConfigurationMarshaler = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SwimLanesViewMarshaler", { }, true); if(!this._graphConfigurationMarshaler) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1007")); } } DiagnosticsHubDataManager.prototype.getConfigurations = function (func) { this._graphConfigurationMarshaler._call("getConfigurations").done(func); }; DiagnosticsHubDataManager.prototype.dataUpdate = function (func) { this._graphConfigurationMarshaler.addEventListener("dataUpdate", func); }; return DiagnosticsHubDataManager; })(); DiagnosticsHub.DiagnosticsHubDataManager = DiagnosticsHubDataManager; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var Renderer = (function () { function Renderer(config) { this._logger = Microsoft.VisualStudio.DiagnosticsHub.getLogger(); this._swimLanes = []; this._swimLaneContainers = []; this._baseContainerId = "mainContainer"; this._rulerContainerId = "rulerContainer"; this._mainSwimlaneContainerId = "mainSwimlaneContainer"; this._mainSwimlaneMarginId = "mainSwimlaneMargin"; this._mainToolbarContainerId = "toolBarContainer"; this._mainInformationContainerId = "informationContainer"; this._mainSwimlaneContainerCss = "main-swimlane-container"; this._mainSwimlaneMarginCss = "main-swimlane-margin"; this._swimlaneDivCss = "swimlane-container"; this._swimlaneContainerIdPrefix = "swimlaneContainer"; this._mainContainerCss = "main-container"; this._mainRulerContainerCss = "main-ruler-container"; this._mainToolbarContainerCss = "main-toolbar-container"; this._mainInformationContainerCss = "main-information-container"; this._baseContainerCss = "base-container"; this._toolbarFloatContainerCss = "toolbar-float"; this._mainEmptyContainerCss = "main-empty"; this._divIndex = 0; this._markSeriesConfig = []; this._dataWarehouse = null; this._maxHeight = 600; this._minHeight = 200; this._isToolbarFloating = false; this._externalHyperlink = "http://go.microsoft.com/fwlink/p/?LinkId=391662"; this._defaultAnalyzerId = "89fb2d7a-1239-4952-811b-d77e2ee6f2aa"; this._minimumZoomWindow = DiagnosticsHub.BigNumber.convertFromNumber(10000); if(!config) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } if(!config.swimlane) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } if(!config.dataManager) { config.dataManager = new DiagnosticsHub.DiagnosticsHubDataManager(); } this._eventAggregator = Microsoft.VisualStudio.DiagnosticsHub.getEventAggregator(); this._viewEventManager = Microsoft.VisualStudio.DiagnosticsHub.getViewEventManager(); this._config = config; this._isToolbarFloating = this._config.isToolbarFloating; window.addEventListener("resize", this.resizeEmptyRulerSpace.bind(this)); this._sqmRuler = new DiagnosticsHub.Sqm.Ruler(); this._sqmCollectedData = new DiagnosticsHub.Sqm.CollectedData(); } Renderer.prototype.execute = function () { this._config.dataManager.getConfigurations(this.getTotalTimeRange.bind(this)); }; Renderer.prototype.resizeEmptyRulerSpace = function (args) { if(this._mainEmptyContainer) { if(this._isToolbarFloating && this._toolbarFloat) { this._mainEmptyContainer.style.height = this._toolbarFloat.clientHeight + "px"; } else { this._mainEmptyContainer.style.height = "0px"; } } if(this._toolbarFloat) { if(this._container && this._isToolbarFloating) { this._toolbarFloat.style.width = this._container.clientWidth + "px"; } else { this._toolbarFloat.style.width = "100%"; } } if(this._container && this._mainEmptyContainer) { this.resizeHost(); } }; Renderer.prototype.getTotalTimeRange = function (data) { var _this = this; return Microsoft.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().then(function (dw) { _this._dataWarehouse = dw; var contextService = dw.getContextService(); return contextService.getGlobalContext(); }.bind(this)).then(function (globalContext) { return globalContext.getTimeDomain(); }.bind(this)).then(function (timeDomain) { _this._logger.info("Got timespan, elapsed=" + timeDomain.elapsed.value); _this._viewableTimeRange = _this._viewportTimeRange = timeDomain; var args = { position: _this._viewportTimeRange }; _this._viewEventManager.selectionChanged.raiseEvent(args); for(var i = 0; i < data.GraphConfigurations.length; i++) { var config = data.GraphConfigurations[i]; config.JsonObject = JSON.parse(config.JsonConfiguration); } _this._graphsConfig = { data: data.GraphConfigurations }; _this.createContainers(); _this.getLostEvents(); }.bind(this), function (err) { _this._logger.error("getTotalTimeRange failed: " + JSON.stringify(err)); }.bind(this)); }; Renderer.prototype.getLostEvents = function () { if(this._dataWarehouse) { this._dataWarehouse.getFilteredData({ customDomain: { task: "get-total-lost-events" } }, this._defaultAnalyzerId).done(this.getTotalLostEventsComplete.bind(this), this.getTotalLostEventsErrorHandler.bind(this)); } }; Renderer.prototype.getTotalLostEventsComplete = function (args) { if(args && typeof args.lostEvents === "number" && args.lostEvents > 0) { this._lostEvents = args.lostEvents; } this.loadScripts(); }; Renderer.prototype.getTotalLostEventsErrorHandler = function (err) { this._logger.error("Could not get lost events, error: " + JSON.stringify(err)); this.loadScripts(); }; Renderer.prototype.createContainers = function () { this._baseContainerId = this._config.containerId || this._baseContainerId; this._container = document.getElementById(this._baseContainerId); this._container.classList.add(this._baseContainerCss); this._toolbarFloat = document.createElement("div"); this._toolbarFloat.classList.add(this._toolbarFloatContainerCss); if(this._isToolbarFloating) { this._toolbarFloat.style.position = "fixed"; } this._container.appendChild(this._toolbarFloat); this._mainContainer = document.createElement("div"); this._mainContainer.classList.add(this._mainContainerCss); this._container.appendChild(this._mainContainer); this._informationContainer = document.createElement("div"); this._informationContainer.id = this._mainInformationContainerId; this._informationContainer.classList.add(this._mainInformationContainerCss); this._informationContainer.style.display = "none"; this._toolbarFloat.appendChild(this._informationContainer); this._toolbarContainer = document.createElement("div"); this._toolbarContainer.id = this._mainToolbarContainerId; this._toolbarContainer.classList.add(this._mainToolbarContainerCss); this._toolbarFloat.appendChild(this._toolbarContainer); this._rulerContainer = document.createElement("div"); this._rulerContainer.id = this._rulerContainerId; this._rulerContainer.classList.add(this._mainRulerContainerCss); this._toolbarFloat.appendChild(this._rulerContainer); this._mainEmptyContainer = document.createElement("div"); this._mainEmptyContainer.classList.add(this._mainEmptyContainerCss); this._mainContainer.appendChild(this._mainEmptyContainer); this._mainSwimlaneContainer = document.createElement("div"); this._mainSwimlaneContainer.id = this._mainSwimlaneContainerId; this._mainContainer.appendChild(this._mainSwimlaneContainer); this._mainSwimlaneMargin = document.createElement("div"); this._mainSwimlaneMargin.id = this._mainSwimlaneMarginId; this._mainSwimlaneMargin.classList.add(this._mainSwimlaneMarginCss); this._mainContainer.appendChild(this._mainSwimlaneMargin); }; Renderer.prototype.loadScripts = function () { var deps = []; this._dependencyManager = new DiagnosticsHub.Common.DependencyManager(); for(var i = 0; i < this._graphsConfig.data.length; i++) { if(this._graphsConfig.data[i].PathToScript) { if(this._graphsConfig.data[i].PathToScript.lastIndexOf("\\") !== -1) { this._graphsConfig.data[i].PathToScriptFolder = this._graphsConfig.data[i].PathToScript.substring(0, this._graphsConfig.data[i].PathToScript.lastIndexOf("\\")); } deps.push({ async: false, objType: this._graphsConfig.data[i].JavaScriptClassName, url: this._graphsConfig.data[i].PathToScript }); } } this._dependencyManager.addDependencies(deps); this._dependencyManager.loadDependencies(this.render.bind(this)); }; Renderer.prototype.initializeContextMenuCommands = function () { var _this = this; var commands = new Array(); commands[0] = { id: "zoomin", callback: function () { if(this._toolbar) { this._toolbar.zoomInHandler(null); } }.bind(this), label: Plugin.Resources.getString("ToolbarZoomInButton"), type: Plugin.ContextMenu.MenuItemType.command, iconEnabled: null, iconDisabled: null, accessKey: null, hidden: function () { return false; }, disabled: function () { return !_this.getZoomInButtonState(); }.bind(this), checked: function () { return false; }, cssClass: null, submenu: null }; commands[1] = { id: "resetzoom", callback: function () { if(this._toolbar) { this._toolbar.zoomOutHandler(null); } }.bind(this), label: Plugin.Resources.getString("ToolbarZoomOutButton"), type: Plugin.ContextMenu.MenuItemType.command, iconEnabled: null, iconDisabled: null, accessKey: null, hidden: function () { return false; }, disabled: function () { return !_this.getResetZoomButtonState(); }.bind(this), checked: function () { return false; }, cssClass: null, submenu: null }; commands[2] = { id: "clearselection", callback: function () { if(this._toolbar) { this._toolbar.selectionHandler(null); } }.bind(this), label: Plugin.Resources.getString("ToolbarClearSelectionButton"), type: Plugin.ContextMenu.MenuItemType.command, iconEnabled: null, iconDisabled: null, accessKey: null, hidden: function () { return false; }, disabled: function () { return !_this.getClearSelectionButtonState(); }.bind(this), checked: function () { return false; }, cssClass: null, submenu: null }; this._contextMenu = Plugin.ContextMenu.create(commands, null, null, null, function () { }); }; Renderer.prototype.render = function () { if(this._toolbarFloat) { if(this._container && this._isToolbarFloating) { this._toolbarFloat.style.width = this._container.clientWidth + "px"; } else { this._toolbarFloat.style.width = "100%"; } } this.renderToolbar(); this.renderRuler(this._viewportTimeRange); this.createSwimlaneContainers(); this.renderSwimlanes(); this.resizeHost(); this.initializeContextMenuCommands(); if(this._lostEvents) { this.createInformationBar(); this._informationContainer.style.display = ""; this._sqmCollectedData.lostEvents(this._lostEvents); } }; Renderer.prototype.onRightClick = function (evt) { if(this._contextMenu && evt.which === DiagnosticsHub.Common.MouseCodes.Right) { var xPos = (evt).clientX; var yPos = (evt).clientY; this._contextMenu.show(xPos, yPos); return false; } return true; }; Renderer.prototype.resizeHost = function () { if(this._eventAggregator) { var height = Math.ceil(this._informationContainer.offsetHeight + this._toolbarContainer.offsetHeight + this._rulerContainer.offsetHeight + this._mainSwimlaneContainer.offsetHeight + this._mainSwimlaneMargin.offsetHeight); var maxValue = height; var minValue = Math.min(height, this._minHeight); var value = Math.min(this._maxHeight, height); this._eventAggregator.raiseEvent("Microsoft.DiagnosticsHub.SwimlaneResizeHeight", { MinValue: minValue, MaxValue: maxValue, Value: value }); } }; Renderer.prototype.createInformationBar = function () { if(this._informationContainer) { var icon = document.createElement("div"); icon.classList.add("information-icon"); this._informationContainer.appendChild(icon); var droppedEvents = document.createElement("div"); droppedEvents.classList.add("dropped-events"); droppedEvents.innerHTML = Plugin.Resources.getString("InformationDroppedEvents", this._lostEvents); this._informationContainer.appendChild(droppedEvents); var externalLinkDiv = document.createElement("div"); externalLinkDiv.classList.add("information-link"); this._informationContainer.appendChild(externalLinkDiv); var externalLink = document.createElement("a"); externalLink.href = this._externalHyperlink; externalLink.target = "blank"; externalLink.text = Plugin.Resources.getString("InformationLink"); externalLink.setAttribute("role", "link"); externalLink.setAttribute("aria-label", Plugin.Resources.getString("InformationLink")); externalLinkDiv.appendChild(externalLink); var closeDiv = document.createElement("div"); closeDiv.classList.add("information-close-div"); this._informationContainer.appendChild(closeDiv); var close = document.createElement("div"); close.classList.add("information-close"); close.innerHTML = "r"; close.tabIndex = 0; close.setAttribute("role", "button"); close.setAttribute("aria-label", Plugin.Resources.getString("InformationClose")); close.addEventListener("mouseenter", function () { var config = { content: Plugin.Resources.getString("InformationClose"), delay: 0 }; (Plugin).Tooltip.show(config); }.bind(this)); close.addEventListener("mouseleave", function () { (Plugin).Tooltip.dismiss(); }.bind(this)); close.addEventListener("focus", function () { this._isInformationCloseFocused = true; }.bind(this)); close.addEventListener("blur", function () { this._isInformationCloseFocused = false; }.bind(this)); close.addEventListener("keypress", function (evt) { if(this._isInformationCloseFocused && DiagnosticsHub.Common.KeyCodes.Enter === evt.keyCode) { this.collapseInformationBar(); } }.bind(this)); close.addEventListener("click", function (evt) { this.collapseInformationBar(); }.bind(this)); closeDiv.appendChild(close); } }; Renderer.prototype.collapseInformationBar = function () { if(this._informationContainer) { this._informationContainer.style.display = "none"; this.resizeHost(); } }; Renderer.prototype.createSwimlaneContainers = function () { if(this._mainEmptyContainer) { if(this._isToolbarFloating && this._toolbarFloat) { this._mainEmptyContainer.style.height = this._toolbarFloat.clientHeight + "px"; } else { this._mainEmptyContainer.style.height = "0px"; } } var msGridRowsArr = []; if(this._mainSwimlaneContainer) { this._mainSwimlaneContainer.classList.add(this._mainSwimlaneContainerCss); var swimLaneCount = 0; for(var i = 0; i < this._graphsConfig.data.length; i++) { if(!this._graphsConfig.data[i].JsonObject.View || this._graphsConfig.data[i].JsonObject.View === DiagnosticsHub.ViewType.Graph) { var swimlaneDiv = document.createElement("div"); swimlaneDiv.id = this._swimlaneContainerIdPrefix + swimLaneCount; swimlaneDiv.classList.add(this._swimlaneDivCss); swimlaneDiv.style.msGridRow = (swimLaneCount + 1).toString(); this._swimLaneContainers.push(swimlaneDiv); msGridRowsArr.push("auto"); swimLaneCount++; } } this._mainSwimlaneContainer.style.msGridRows = msGridRowsArr.join(" "); for(var j = 0; j < this._swimLaneContainers.length; j++) { this._mainSwimlaneContainer.appendChild(this._swimLaneContainers[j]); } this._divIndex = 0; this._mainSwimlaneContainer.addEventListener("mousedown", this.onRightClick.bind(this)); } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } }; Renderer.prototype.renderRuler = function (timeRange) { var config = new DiagnosticsHub.RulerConfig(this._rulerContainerId); config.doubleSlider.isSelectionEnabled = typeof this._config.swimlane.isSelectionEnabled !== "undefined" && this._config.swimlane.isSelectionEnabled !== null ? this._config.swimlane.isSelectionEnabled : config.doubleSlider.isSelectionEnabled; config.doubleSlider.isZoomEnabled = typeof this._config.swimlane.isZoomEnabled !== "undefined" && this._config.swimlane.isZoomEnabled !== null ? this._config.swimlane.isZoomEnabled : config.doubleSlider.isZoomEnabled; config.doubleSlider.timeRange = timeRange; config.doubleSlider.markSeries = []; config.doubleSlider.markSeries.push({ id: DiagnosticsHub.MarkType.UserMark, label: Plugin.Resources.getString("RulerUserMarkLabel"), tooltip: Plugin.Resources.getString("UserMarkTooltip") }); config.doubleSlider.markSeries.push({ id: DiagnosticsHub.MarkType.LifeCycleEvent, label: Plugin.Resources.getString("RulerLifecycleMarkLabel"), tooltip: Plugin.Resources.getString("LifecycleMarkTooltip") }); var markTypeIdCounter = 3; var dictionary = { }; var legendDictionary = { }; for(var i = 0; i < this._graphsConfig.data.length; i++) { if(this._graphsConfig.data[i].JsonObject.View && this._graphsConfig.data[i].JsonObject.View === DiagnosticsHub.ViewType.Ruler) { for(var j = 0; j < this._graphsConfig.data[i].JsonObject.Series.length; j++) { var series = this._graphsConfig.data[i].JsonObject.Series[j]; var cId = series.DataSource.CounterId || typeof series.DataSource.CounterId; var aId = series.DataSource.AnalyzerId || typeof series.DataSource.AnalyzerId; if(!dictionary[cId.toLowerCase() + "," + aId.toLowerCase()]) { dictionary[cId.toLowerCase() + "," + aId.toLowerCase()] = true; var id = 0; if(!series.MarkType || series.MarkType === DiagnosticsHub.MarkType.Custom) { id = markTypeIdCounter; } else { id = series.MarkType; } if(id !== DiagnosticsHub.MarkType.LifeCycleEvent && id !== DiagnosticsHub.MarkType.UserMark) { var legend = series.Legend; if(this._graphsConfig.data[i].Resources && this._graphsConfig.data[i].Resources[legend]) { legend = this._graphsConfig.data[i].Resources[legend]; } var tooltip = series.LegendTooltip; if(this._graphsConfig.data[i].Resources && this._graphsConfig.data[i].Resources[tooltip]) { tooltip = this._graphsConfig.data[i].Resources[tooltip]; } if(!legendDictionary[legend]) { legendDictionary[legend] = id; config.doubleSlider.markSeries.push({ id: id, label: legend, tooltip: tooltip || "" }); markTypeIdCounter++; } else { id = legendDictionary[legend]; } } series.MarkTypeId = id; this._markSeriesConfig.push(series); } } } } this._ruler = new DiagnosticsHub.Ruler(config); this._ruler.render(); this.setData(this._viewableTimeRange, this._markSeriesConfig); this._viewEventManager.selectionChanged.addEventListener(this.selectionChanged.bind(this)); this._rulerContainer.addEventListener("mousedown", this.onRightClick.bind(this)); }; Renderer.prototype.setData = function (timeRange, series) { var _this = this; var configuration = []; for(var i = 0; i < series.length; i++) { var currentSeries = series[i]; if(currentSeries) { var dataSource = currentSeries.DataSource; if(dataSource && dataSource.CounterId && dataSource.AnalyzerId) { var seriesConfig = { counterId: dataSource.CounterId, analyzerId: dataSource.AnalyzerId, markTypeId: currentSeries.MarkTypeId }; if(dataSource.CustomDomain) { seriesConfig.customDomain = dataSource.CustomDomain; } configuration.push(seriesConfig); this._logger.debug("Configuration for series: " + JSON.stringify(seriesConfig)); } } } if(configuration.length === 0) { this._logger.debug("Ruler does not expect data from analyzers."); return; } var dwLoadTask = null; this._logger.info("Preloading data warehouse."); if(this._dataWarehouse === null) { this._logger.debug("this._dataWarehouse is null, trying to load it first time on this view."); dwLoadTask = Microsoft.VisualStudio.DiagnosticsHub.DataWarehouse.loadDataWarehouse().then(function (dw) { this._dataWarehouse = dw; return Plugin.Promise.wrap(this._dataWarehouse); }.bind(this)); } else { this._logger.debug("this._dataWarehouse is not null"); dwLoadTask = Plugin.Promise.wrap(this._dataWarehouse); } var loadData = function (dw) { var loadSeries = function (config) { _this._logger.debug("Loading data for counter name '" + config.counterId + "' from analyzer '" + config.analyzerId + "'"); var contextData = { customDomain: { CounterId: config.counterId }, timeDomain: timeRange }; if(config.customDomain) { for(var propertyName in config.customDomain) { if(config.customDomain.hasOwnProperty(propertyName)) { var value = config.customDomain[propertyName]; if(value !== null && typeof value !== "string") { _this._logger.warning("Custom domain property '" + propertyName + "' is not a string, it will be converted to string"); value = value.toString(); } contextData.customDomain[propertyName] = value; } } } dw.getFilteredData(contextData, config.analyzerId).then(function (dataPoints) { this._logger.info("Got data points from analyzer: " + config.analyzerId + " for counter " + config.counterId); if(dataPoints && dataPoints.p) { var renderIndex = dataPoints.p.length - 1; for(var i = 0; i < dataPoints.p.length; i++) { this._ruler.addMark(config.markTypeId, new DiagnosticsHub.BigNumber(dataPoints.p[i].t.h, dataPoints.p[i].t.l), dataPoints.p[i].tt || ((Plugin.Resources.getString("TooltipTimeLabel") || "Time") + ": " + DiagnosticsHub.RulerUtilities.formatTime(new DiagnosticsHub.BigNumber(dataPoints.p[i].t.h, dataPoints.p[i].t.l), DiagnosticsHub.UnitFormat.italicizedAbbreviations)), (renderIndex === i)); } } }.bind(_this), function (err) { this._logger.error("Could not load data points for counter :" + config.counterId + ", error: " + JSON.stringify(err)); }.bind(_this)); }.bind(_this); for(var i = 0; i < configuration.length; i++) { loadSeries(configuration[i]); } }.bind(this); dwLoadTask.then(function (dw) { this._logger.info("Data warehouse is loaded. Starting to load the data."); loadData(dw); }.bind(this), function (err) { this._logger.error("Error on datawarehouse loading:" + JSON.stringify(err)); throw err; }.bind(this)); }; Renderer.prototype.renderToolbar = function () { var config = { containerId: this._mainToolbarContainerId, selectionHandler: this.clearSelectionHandler.bind(this), zoomInHandler: this.zoomInHandler.bind(this), zoomOutHandler: this.zoomOutHandler.bind(this) }; this._toolbar = new DiagnosticsHub.Toolbar(config); this._toolbar.render(); }; Renderer.prototype.renderSwimlanes = function () { for(var i = 0; i < this._graphsConfig.data.length; i++) { if(!this._graphsConfig.data[i].JsonObject.View || this._graphsConfig.data[i].JsonObject.View === DiagnosticsHub.ViewType.Graph) { var config = this._graphsConfig.data[i]; var swimLaneConfig = this.getSwimlaneConfiguration(config); var swimLane = new DiagnosticsHub.SwimLane(swimLaneConfig); swimLane.addEventListener(VisualStudio.DiagnosticsHub.SwimlaneEvents.Visibility, this.visibilityChanged.bind(this)); swimLane.render(); this._swimLanes.push({ swimLane: swimLane, config: swimLaneConfig, graphSeries: this._graphsConfig.data[i].JsonObject.Series }); } } }; Renderer.prototype.visibilityChanged = function (args) { this.resizeHost(); }; Renderer.prototype.getSwimlaneConfiguration = function (config) { var swimlaneConfig = new DiagnosticsHub.SwimLaneConfiguration(); swimlaneConfig.containerId = this._swimlaneContainerIdPrefix + this._divIndex; this._divIndex++; if(config.JavaScriptClassName) { swimlaneConfig.body.graph.registeredClass = DiagnosticsHub.RegisterNamespace.getRegisteredGraph(config.JavaScriptClassName); } else { swimlaneConfig.body.graph.registeredClass = DiagnosticsHub.RegisterNamespace.getRegisteredGraph("Microsoft.VisualStudio.DiagnosticsHub.MultiLineGraph"); } swimlaneConfig.body.graph.jsonConfig = config.JsonObject; swimlaneConfig.body.graph.jsonConfig.GraphBehaviour = DiagnosticsHub.GraphBehaviourType.PostMortem; swimlaneConfig.body.graph.resources = config.Resources; swimlaneConfig.body.graph.description = config.Description; swimlaneConfig.body.graph.height = config.JsonObject.Height || this._config.swimlane.graph.height; swimlaneConfig.body.graph.pathToScriptFolder = config.PathToScriptFolder; config.JsonObject.RefreshDataOnResizeAndZoom = config.JsonObject.RefreshDataOnResizeAndZoom || false; swimlaneConfig.body.leftScale.isVisible = this._config.swimlane.leftScale.isVisible; swimlaneConfig.body.leftScale.width = this._config.swimlane.leftScale.width; swimlaneConfig.body.leftScale.minimum = config.JsonObject.MinValue; swimlaneConfig.body.leftScale.maximum = config.JsonObject.MaxValue; swimlaneConfig.body.rightScale.isVisible = this._config.swimlane.rightScale.isVisible; swimlaneConfig.body.rightScale.width = this._config.swimlane.rightScale.width; swimlaneConfig.body.rightScale.minimum = config.JsonObject.MinValue; swimlaneConfig.body.rightScale.maximum = config.JsonObject.MaxValue; swimlaneConfig.minSelectionWidthInPixels = this._config.swimlane.minSelectionWidthInPixels; swimlaneConfig.timeRange = this._viewportTimeRange; swimlaneConfig.header.title.titleText = config.Title; swimlaneConfig.header.legend.data = []; swimlaneConfig.header.title.isGraphCollapsible = typeof this._config.swimlane.isGraphCollapsible !== "undefined" && this._config.swimlane.isGraphCollapsible !== null ? this._config.swimlane.isGraphCollapsible : swimlaneConfig.header.title.isGraphCollapsible; swimlaneConfig.getVerticalRulerLinePositions = DiagnosticsHub.RulerUtilities.getVerticalLinePositions; if(this._dependencyManager) { swimlaneConfig.body.graph.loadCss = this._dependencyManager.loadCss.bind(this); } swimlaneConfig.isSelectionEnabled = typeof this._config.swimlane.isSelectionEnabled !== "undefined" && this._config.swimlane.isSelectionEnabled !== null ? this._config.swimlane.isSelectionEnabled : swimlaneConfig.isSelectionEnabled; swimlaneConfig.isZoomEnabled = typeof this._config.swimlane.isZoomEnabled !== "undefined" && this._config.swimlane.isZoomEnabled !== null ? this._config.swimlane.isZoomEnabled : swimlaneConfig.isZoomEnabled; return swimlaneConfig; }; Renderer.prototype.selectionChanged = function (evt) { var newSelectionTimeRange = evt.position; if(!this._handlePosition || !this._handlePosition.equals(newSelectionTimeRange)) { this._handlePosition = newSelectionTimeRange; this._toolbar.setButtonState(this.getCommandsStatus()); } }; Renderer.prototype.zoomInHandler = function () { this._sqmRuler.zoomIn(); this.zoomHandler(this._handlePosition); }; Renderer.prototype.zoomOutHandler = function () { this._sqmRuler.resetZoom(); this.zoomHandler(this._viewableTimeRange, this._handlePosition); }; Renderer.prototype.zoomHandler = function (current, selection) { Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_ToolbarZoomBegin); for(var i = 0; i < this._swimLanes.length; i++) { var swimlane = this._swimLanes[i].swimLane; swimlane.zoom(current, selection); } this._ruler.zoom(current, selection); this._viewportTimeRange = current; this._toolbar.setButtonState(this.getCommandsStatus()); Plugin.VS.Internal.CodeMarkers.fire(VisualStudio.DiagnosticsHub.ControlsCodeMarkers.perfDiagnosticsHub_ToolbarZoomEnd); }; Renderer.prototype.clearSelectionHandler = function () { this._sqmRuler.clearSelection(); for(var i = 0; i < this._swimLanes.length; i++) { var swimlane = this._swimLanes[i].swimLane; swimlane.setSelection(this._viewportTimeRange); } this._ruler.setHandlePosition(this._viewportTimeRange); this._handlePosition = this._viewportTimeRange; this._toolbar.setButtonState(this.getCommandsStatus()); this.raiseSelectionChangedEvent(this._viewportTimeRange); }; Renderer.prototype.raiseSelectionChangedEvent = function (position) { if(this._viewEventManager) { var args = { position: position }; this._viewEventManager.selectionChanged.raiseEvent(args); } }; Renderer.prototype.getCommandsStatus = function () { return { isZoomInEnabled: this.getZoomInButtonState(), isResetZoomEnabled: this.getResetZoomButtonState(), isClearSelectionEnabled: this.getClearSelectionButtonState() }; }; Renderer.prototype.getZoomInButtonState = function () { var isEnabled = false; if(this._handlePosition && !this._handlePosition.equals(this._viewportTimeRange) && !this._minimumZoomWindow.greater(this._handlePosition.elapsed)) { isEnabled = true; } return isEnabled; }; Renderer.prototype.getResetZoomButtonState = function () { var isEnabled = false; if(this._viewableTimeRange && !this._viewableTimeRange.equals(this._viewportTimeRange)) { isEnabled = true; } return isEnabled; }; Renderer.prototype.getClearSelectionButtonState = function () { var isEnabled = false; if(this._viewableTimeRange && this._handlePosition && !this._handlePosition.equals(this._viewportTimeRange)) { isEnabled = true; } return isEnabled; }; return Renderer; })(); DiagnosticsHub.Renderer = Renderer; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var Scrollbar = (function () { function Scrollbar(config) { this._parentCss = "scrollbar-container"; this._containerCss = "scrollbar"; this._containerId = "scrollbar"; this._scrollbarCalculatorId = "scrollbarWidthCalculator"; this._scrollbarCalculatorCss = "scrollbar-width-calculator"; this._logger = Microsoft.VisualStudio.DiagnosticsHub.getLogger(); this._ignoreEvent = false; this._isScrollbarLive = true; this._isScrollbarAutoVisible = true; if(!config) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } this._config = config; } Scrollbar.prototype.render = function () { if(this._config && this._config.containerId) { var parent = document.getElementById(this._config.containerId); parent.classList.add(this._parentCss); this._container = document.createElement("div"); this._container.classList.add(this._containerCss); this._container.id = this._containerId; this._container.addEventListener("scroll", this.onScroll.bind(this)); parent.appendChild(this._container); this._scrollbarCalculator = document.createElement("div"); this._scrollbarCalculator.classList.add(this._scrollbarCalculatorCss); this._scrollbarCalculator.id = this._scrollbarCalculatorId; this._container.appendChild(this._scrollbarCalculator); this._scrollbarCalculator.style.left = this._container.offsetWidth - 1 + "px"; this._container.scrollLeft = this._container.scrollWidth - this._container.offsetWidth; } }; Scrollbar.prototype.updateScrollbar = function (viewport, viewable, force) { if (typeof force === "undefined") { force = false; } this.updateScrollbarInternal(viewport, viewable, force); }; Scrollbar.prototype.updateScrollPosition = function (forceUpdate) { if (typeof forceUpdate === "undefined") { forceUpdate = false; } if(this._isScrollbarLive || forceUpdate) { this._container.scrollLeft = this._container.scrollWidth - this._container.offsetWidth; this._ignoreEvent = true; } }; Scrollbar.prototype.hide = function () { this.hideInternal(); this._isScrollbarAutoVisible = false; }; Scrollbar.prototype.autoshow = function () { this._isScrollbarAutoVisible = true; }; Scrollbar.prototype.onScroll = function (evt) { if(this._config.scrollHandler && !this._ignoreEvent) { this._config.scrollHandler(this._container.scrollLeft, this._container.scrollWidth); } this._ignoreEvent = false; }; Scrollbar.prototype.updateScrollbarInternal = function (viewport, viewable, forcePosition) { var viewportElapsedValue = parseInt(viewport.elapsed.value); var viewableElapsedValue = parseInt(viewable.elapsed.value); if(isNaN(viewableElapsedValue) || isNaN(viewportElapsedValue) || viewportElapsedValue === 0) { var message = "Fatal issue in updateScrollbarInternal. "; message += "viewportElapsedValue = " + viewportElapsedValue.toString(); message += ", viewableElapsedValue = " + viewableElapsedValue.toString(); this._logger.error(message); return; } if(viewableElapsedValue > viewportElapsedValue) { this.showInternal(); } else { this.hideInternal(); } var pixelsPerPage = this._container.offsetWidth; var totalPages = viewableElapsedValue / viewportElapsedValue; var totalPixels = pixelsPerPage * totalPages; this._scrollbarCalculator.style.left = totalPixels + "px"; this.updateScrollPosition(forcePosition); }; Scrollbar.prototype.showInternal = function () { if(this._isScrollbarAutoVisible) { this._container.style.display = "-ms-grid"; } }; Scrollbar.prototype.hideInternal = function () { this._container.style.display = "none"; }; return Scrollbar; })(); DiagnosticsHub.Scrollbar = Scrollbar; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var LiveRenderer = (function () { function LiveRenderer(config) { this._logger = Microsoft.VisualStudio.DiagnosticsHub.getLogger(); this._swimLanes = []; this._swimLaneContainers = []; this._baseContainerId = "mainContainer"; this._rulerContainerId = "rulerContainer"; this._mainSwimlaneContainerId = "mainSwimlaneContainer"; this._mainSwimlaneMarginId = "mainSwimlaneMargin"; this._mainToolbarContainerId = "toolBarContainer"; this._mainScrollbarContainerId = "mainScrollContainer"; this._mainSwimlaneContainerCss = "main-swimlane-container"; this._mainSwimlaneMarginCss = "main-swimlane-margin"; this._swimlaneDivCss = "swimlane-container"; this._swimlaneContainerIdPrefix = "swimlaneContainer"; this._mainContainerCss = "main-container"; this._mainRulerContainerCss = "main-ruler-container"; this._mainToolbarContainerCss = "main-toolbar-container"; this._mainScrollbarContainerCss = "main-scrollbar"; this._baseContainerCss = "base-container"; this._toolbarFloatContainerCss = "toolbar-float"; this._mainEmptyContainerCss = "main-empty"; this._divIndex = 0; this._isGraphRolling = true; this._isInitialized = false; this._diagnosticsSessionLatestTime = DiagnosticsHub.BigNumber.zero; this._maxHeight = 600; this._minHeight = 200; this._isToolbarFloating = false; this._markSeriesConfig = []; this._oneHour = DiagnosticsHub.BigNumber.convertFromNumber(60 * 60 * 1000000000); if(!config) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } if(!config.swimlane) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1002")); } this._config = config; this._isToolbarFloating = this._config.isToolbarFloating || false; if(!this._config.dataManager) { this._config.dataManager = new DiagnosticsHub.DiagnosticsHubDataManager(); } this._resizeHandler = this.onResize.bind(this); } LiveRenderer.prototype.execute = function () { this._config.dataManager.getConfigurations(this.getConfigurationsCallback.bind(this)); }; LiveRenderer.prototype.refresh = function () { for(var i = 0; i < this._swimLanes.length; i++) { this._swimLanes[i].swimLane.resize(null); } this.onResize(null); this._ruler.resize(); }; LiveRenderer.prototype.deinitialize = function () { if(this._ruler) { this._ruler.deinitialize(); } if(this._resizeHandler) { window.removeEventListener("resize", this._resizeHandler); } for(var i = 0; i < this._swimLanes.length; i++) { this._swimLanes[i].swimLane.deinitialize(); } }; LiveRenderer.prototype.getConfigurationsCallback = function (data) { var graphConfigurations = data.GraphConfigurations; for(var i = 0; i < data.GraphConfigurations.length; i++) { var config = data.GraphConfigurations[i]; config.JsonObject = JSON.parse(config.JsonConfiguration); } if(data.QpcTimeProperties) { this._timeProperties = new DiagnosticsHub.Common.QpcTimeProperties(new DiagnosticsHub.BigNumber(data.QpcTimeProperties.CollectionStartTimeH, data.QpcTimeProperties.CollectionStartTimeL), data.QpcTimeProperties.Frequency); } else { this._timeProperties = new DiagnosticsHub.Common.QpcTimeProperties(DiagnosticsHub.BigNumber.zero, 1000); } this._graphsConfig = { data: graphConfigurations }; this.render(); }; LiveRenderer.prototype.onResize = function (e) { this.createTime(this._viewportTimeRange.begin); if(this._dataTimeRange) { this.adjustTimeRange(this._dataTimeRange.end); } var isLatestPointWithinTimeRange = this._viewportTimeRange.contains(this._diagnosticsSessionLatestTime); if(isLatestPointWithinTimeRange !== this._isGraphRolling) { this._isGraphRolling = this._scrollbar._isScrollbarLive = isLatestPointWithinTimeRange; this.setGraphState(this._isGraphRolling); } this.updateTimeRange(); this.setScrollPosition(); if(this._mainEmptyContainer) { if(this._isToolbarFloating && this._toolbarFloat) { this._mainEmptyContainer.style.height = this._toolbarFloat.clientHeight + "px"; } else { this._mainEmptyContainer.style.height = "0px"; } } if(this._toolbarFloat) { if(this._container && this._isToolbarFloating) { this._toolbarFloat.style.width = this._container.clientWidth + "px"; } else { this._toolbarFloat.style.width = "100%"; } } this.resizeHost(); }; LiveRenderer.prototype.render = function () { this._baseContainerId = this._config.containerId || this._baseContainerId; this._container = document.getElementById(this._baseContainerId); this._container.classList.add(this._baseContainerCss); this._toolbarFloat = document.createElement("div"); this._toolbarFloat.classList.add(this._toolbarFloatContainerCss); if(this._isToolbarFloating) { this._toolbarFloat.style.position = "fixed"; } this._container.appendChild(this._toolbarFloat); this._mainContainer = document.createElement("div"); this._mainContainer.classList.add(this._mainContainerCss); this._container.appendChild(this._mainContainer); this._toolbarContainer = document.createElement("div"); this._toolbarContainer.id = this._mainToolbarContainerId; this._toolbarContainer.classList.add(this._mainToolbarContainerCss); this._toolbarFloat.appendChild(this._toolbarContainer); this._rulerContainer = document.createElement("div"); this._rulerContainer.id = this._rulerContainerId; this._rulerContainer.classList.add(this._mainRulerContainerCss); this._toolbarFloat.appendChild(this._rulerContainer); this._mainEmptyContainer = document.createElement("div"); this._mainEmptyContainer.classList.add(this._mainEmptyContainerCss); this._mainContainer.appendChild(this._mainEmptyContainer); this._swimlaneContainer = document.createElement("div"); this._swimlaneContainer.id = this._mainSwimlaneContainerId; this._mainContainer.appendChild(this._swimlaneContainer); this._mainSwimlaneMargin = document.createElement("div"); this._mainSwimlaneMargin.id = this._mainSwimlaneMarginId; this._mainSwimlaneMargin.classList.add(this._mainSwimlaneMarginCss); this._mainContainer.appendChild(this._mainSwimlaneMargin); this._mainScrollbarContainer = document.createElement("div"); this._mainScrollbarContainer.id = this._mainScrollbarContainerId; this._mainScrollbarContainer.classList.add(this._mainScrollbarContainerCss); this._mainContainer.appendChild(this._mainScrollbarContainer); this.renderToolArea(); this._config.dataManager.dataUpdate(this.dataUpdateListener.bind(this)); }; LiveRenderer.prototype.dataUpdateListener = function (eventArgs) { if(!this._isInitialized) { this.renderToolArea(); } if(this._isInitialized) { if(eventArgs.TimestampL || eventArgs.TimestampH) { eventArgs = eventArgs; var nsTimeStamp = this._timeProperties.convertQpcTimestampToNanoseconds(new DiagnosticsHub.BigNumber(eventArgs.TimestampH, eventArgs.TimestampL)); if(this.adjustTimeRange(nsTimeStamp)) { if(this._isGraphRolling) { this.updateTimeRange(); } this.setScrollPosition(); this.resizeHost(); } } this.addSeriesData(eventArgs); this.addMarkData(eventArgs); } }; LiveRenderer.prototype.renderToolArea = function () { if(this._container.clientWidth > this._config.swimlane.leftScale.width + this._config.swimlane.rightScale.width + 2) { this.createTime(DiagnosticsHub.BigNumber.zero); window.addEventListener("resize", this._resizeHandler); if(this._toolbarFloat) { if(this._container && this._isToolbarFloating) { this._toolbarFloat.style.width = this._container.clientWidth + "px"; } else { this._toolbarFloat.style.width = "100%"; } } this.renderRuler(); this.createSwimlaneContainers(); this.renderSwimlanes(); this.renderScrollbar(); this._isInitialized = true; if(this._config.isResizeHandlerRequired) { this._eventAggregator = VisualStudio.DiagnosticsHub.getEventAggregator(); this.resizeHost(); } } }; LiveRenderer.prototype.createTime = function (start) { if(this._container.clientWidth > this._config.swimlane.leftScale.width + this._config.swimlane.rightScale.width + 2) { var width = this._container.clientWidth - this._config.swimlane.leftScale.width - this._config.swimlane.rightScale.width - 2; this._viewportTimeRange = new DiagnosticsHub.JsonTimespan(start, DiagnosticsHub.BigNumber.addNumber(start, (width * 200000000))); if(this._isGraphRolling) { if(this._viewableTimeRange) { this._viewableTimeRange = new DiagnosticsHub.JsonTimespan(this._viewableTimeRange.begin, this._viewportTimeRange.end); } else { this._viewableTimeRange = this._viewportTimeRange; } } } }; LiveRenderer.prototype.createSwimlaneContainers = function () { if(this._mainEmptyContainer) { if(this._isToolbarFloating && this._toolbarFloat) { this._mainEmptyContainer.style.height = this._toolbarFloat.clientHeight + "px"; } else { this._mainEmptyContainer.style.height = "0px"; } } this._mainSwimlaneContainer = document.getElementById(this._mainSwimlaneContainerId); var msGridRowsArr = []; if(this._mainSwimlaneContainer) { this._mainSwimlaneContainer.classList.add(this._mainSwimlaneContainerCss); var swimLaneCount = 0; for(var i = 0; i < this._graphsConfig.data.length; i++) { if(!this._graphsConfig.data[i].JsonObject.View || this._graphsConfig.data[i].JsonObject.View === DiagnosticsHub.ViewType.Graph) { var swimlaneDiv = document.createElement("div"); swimlaneDiv.id = this._swimlaneContainerIdPrefix + swimLaneCount; swimlaneDiv.classList.add(this._swimlaneDivCss); swimlaneDiv.style.msGridRow = (swimLaneCount + 1).toString(); this._swimLaneContainers.push(swimlaneDiv); msGridRowsArr.push("auto"); swimLaneCount++; } } this._mainSwimlaneContainer.style.msGridRows = msGridRowsArr.join(" "); for(var j = 0; j < this._swimLaneContainers.length; j++) { this._mainSwimlaneContainer.appendChild(this._swimLaneContainers[j]); } this._divIndex = 0; } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1001")); } }; LiveRenderer.prototype.renderRuler = function () { var config = new DiagnosticsHub.RulerConfig(this._rulerContainerId); config.doubleSlider.isSelectionEnabled = typeof this._config.swimlane.isSelectionEnabled !== "undefined" && this._config.swimlane.isSelectionEnabled !== null ? this._config.swimlane.isSelectionEnabled : config.doubleSlider.isSelectionEnabled; config.doubleSlider.isZoomEnabled = typeof this._config.swimlane.isZoomEnabled !== "undefined" && this._config.swimlane.isZoomEnabled !== null ? this._config.swimlane.isZoomEnabled : config.doubleSlider.isZoomEnabled; config.doubleSlider.timeRange = this._viewportTimeRange; config.doubleSlider.markSeries = [ { id: DiagnosticsHub.MarkType.UserMark, label: Plugin.Resources.getString("RulerUserMarkLabel"), tooltip: Plugin.Resources.getString("UserMarkTooltip") } ]; var markTypeIdCounter = 3; var dictionary = { }; var legendDictionary = { }; for(var i = 0; i < this._graphsConfig.data.length; i++) { if(this._graphsConfig.data[i].JsonObject.View && this._graphsConfig.data[i].JsonObject.View === DiagnosticsHub.ViewType.Ruler) { for(var j = 0; j < this._graphsConfig.data[i].JsonObject.Series.length; j++) { var series = this._graphsConfig.data[i].JsonObject.Series[j]; if(!dictionary[series.DataSource.CounterId + "," + series.DataSource.AnalyzerId]) { dictionary[series.DataSource.CounterId + "," + series.DataSource.AnalyzerId] = true; this._logger.debug(series.DataSource.CounterId + "," + series.DataSource.AnalyzerId); var id = 0; if(!series.MarkType || series.MarkType === DiagnosticsHub.MarkType.Custom) { id = markTypeIdCounter; } else { id = series.MarkType; } if(id !== DiagnosticsHub.MarkType.UserMark) { if(id === DiagnosticsHub.MarkType.LifeCycleEvent) { var appLegend = Plugin.Resources.getString("RulerLifecycleMarkLabel"); if(!legendDictionary[appLegend]) { legendDictionary[appLegend] = id; config.doubleSlider.markSeries.push({ id: id, label: appLegend, tooltip: Plugin.Resources.getString("LifecycleMarkTooltip") }); } else { id = legendDictionary[legend]; } } else { var legend = series.Legend; if(this._graphsConfig.data[i].Resources && this._graphsConfig.data[i].Resources[legend]) { legend = this._graphsConfig.data[i].Resources[legend]; } if(!legendDictionary[legend]) { legendDictionary[legend] = id; config.doubleSlider.markSeries.push({ id: id, label: legend, tooltip: "" }); markTypeIdCounter++; } else { id = legendDictionary[legend]; } } } series.MarkTypeId = id; this._markSeriesConfig.push(series); } } } } this._ruler = new DiagnosticsHub.Ruler(config); this._ruler.render(); }; LiveRenderer.prototype.renderSwimlanes = function () { for(var i = 0; i < this._graphsConfig.data.length; i++) { if(!this._graphsConfig.data[i].JsonObject.View || this._graphsConfig.data[i].JsonObject.View === DiagnosticsHub.ViewType.Graph) { var config = this._graphsConfig.data[i]; var swimLaneConfig = this.getSwimlaneConfiguration(config); var swimLane = new DiagnosticsHub.SwimLane(swimLaneConfig); swimLane.addEventListener(VisualStudio.DiagnosticsHub.SwimlaneEvents.Visibility, this.visibilityChanged.bind(this)); swimLane.render(); this._swimLanes.push({ swimLane: swimLane, config: swimLaneConfig, graphSeries: this._graphsConfig.data[i].JsonObject.Series }); } } }; LiveRenderer.prototype.resizeHost = function () { if(this._eventAggregator) { var height = Math.ceil(this._toolbarContainer.offsetHeight + this._rulerContainer.offsetHeight + this._swimlaneContainer.offsetHeight + this._mainSwimlaneMargin.offsetHeight + this._mainScrollbarContainer.offsetHeight); var maxValue = height; var minValue = Math.min(height, this._minHeight); var value = Math.min(this._maxHeight, height); this._eventAggregator.raiseEvent("Microsoft.DiagnosticsHub.SwimlaneResizeHeight", { MinValue: minValue, MaxValue: maxValue, Value: value }); } }; LiveRenderer.prototype.renderScrollbar = function () { var config = { containerId: this._mainScrollbarContainerId, scrollHandler: this.onScroll.bind(this) }; this._scrollbar = new DiagnosticsHub.Scrollbar(config); this._scrollbar.render(); }; LiveRenderer.prototype.convertDtoToIPoint = function (dto) { var convertedPoint = { Timestamp: new DiagnosticsHub.BigNumber(dto.TimestampH, dto.TimestampL), Value: dto.Value, ToolTip: dto.ToolTip, CustomData: dto.CustomData }; return convertedPoint; }; LiveRenderer.prototype.addSeriesData = function (eventArgs) { if(this._swimLanes && eventArgs.UpdatedSeries) { for(var i = 0; i < this._swimLanes.length; i++) { var swimlaneInfo = this._swimLanes[i]; for(var j = 0; j < swimlaneInfo.graphSeries.length; j++) { var series = swimlaneInfo.graphSeries[j]; for(var k = 0; k < eventArgs.UpdatedSeries.length; k++) { var newSeries = eventArgs.UpdatedSeries[k]; if(series.DataSource.CounterId === newSeries.DataSource.CounterId && newSeries.NewPoints) { for(var l = 0; l < newSeries.NewPoints.length; l++) { var convertedPoint = this.convertDtoToIPoint(newSeries.NewPoints[l]); swimlaneInfo.swimLane.addGraphSeriesData(newSeries.DataSource.CounterId, [ convertedPoint ], false); var newRange = this._timeProperties.convertQpcTimestampToNanoseconds(convertedPoint.Timestamp); if(this._ruler && newRange.greater(this._diagnosticsSessionLatestTime)) { this._diagnosticsSessionLatestTime = newRange; this._ruler.setDiagnosticsSessionTimeRange(newRange); } } break; } } } } } }; LiveRenderer.prototype.addMarkData = function (eventArgs) { if(this._markSeriesConfig && eventArgs.UpdatedSeries) { for(var i = 0; i < this._markSeriesConfig.length; i++) { var series = this._markSeriesConfig[i]; for(var k = 0; k < eventArgs.UpdatedSeries.length; k++) { var newSeries = eventArgs.UpdatedSeries[k]; if(series.DataSource.CounterId === newSeries.DataSource.CounterId && newSeries.NewPoints) { for(var l = 0; l < newSeries.NewPoints.length; l++) { var convertedPoint = this.convertDtoToIPoint(newSeries.NewPoints[l]); var newTimeStamp = this._timeProperties.convertQpcTimestampToNanoseconds(convertedPoint.Timestamp); this._ruler.addMark(series.MarkTypeId, newTimeStamp, newSeries.NewPoints[l].ToolTip || ((Plugin.Resources.getString("TooltipTimeLabel") || "Time") + ": " + DiagnosticsHub.RulerUtilities.formatTime(newTimeStamp, DiagnosticsHub.UnitFormat.italicizedAbbreviations))); if(this._ruler && newTimeStamp.greater(this._diagnosticsSessionLatestTime)) { this._diagnosticsSessionLatestTime = newTimeStamp; this._ruler.setDiagnosticsSessionTimeRange(newTimeStamp); } } break; } } } } }; LiveRenderer.prototype.adjustTimeRange = function (time) { var isAdjusted = false; if(time) { while(time.greater(this._viewableTimeRange.end) || (time.greater(this._viewportTimeRange.end) && this._viewableTimeRange.end.greaterOrEqual(this._viewportTimeRange.end) && this._isGraphRolling)) { if(this._isGraphRolling) { var elapsed = DiagnosticsHub.BigNumber.divideNumber(this._viewportTimeRange.elapsed, 3); this._viewableTimeRange = new DiagnosticsHub.JsonTimespan(this._viewableTimeRange.begin, DiagnosticsHub.BigNumber.add(this._viewportTimeRange.end, elapsed)); this._viewportTimeRange = new DiagnosticsHub.JsonTimespan(DiagnosticsHub.BigNumber.add(this._viewportTimeRange.begin, elapsed), DiagnosticsHub.BigNumber.add(this._viewportTimeRange.end, elapsed)); } else { this._viewableTimeRange = new DiagnosticsHub.JsonTimespan(this._viewableTimeRange.begin, time); } isAdjusted = true; } if(!isAdjusted) { this._dataTimeRange = new DiagnosticsHub.JsonTimespan(this._viewportTimeRange.begin, time); } } return isAdjusted; }; LiveRenderer.prototype.updateTimeRange = function () { var pointRequiredToBeDropped = false; if(this._diagnosticsSessionLatestTime && (DiagnosticsHub.BigNumber.subtract(this._diagnosticsSessionLatestTime, this._oneHour).greater(this._viewableTimeRange.begin))) { this._viewableTimeRange = new DiagnosticsHub.JsonTimespan(DiagnosticsHub.BigNumber.subtract(this._diagnosticsSessionLatestTime, this._oneHour), this._viewableTimeRange.end); if(this._viewableTimeRange.begin.greater(this._viewportTimeRange.begin)) { this._viewportTimeRange = new DiagnosticsHub.JsonTimespan(this._viewableTimeRange.begin, this._viewportTimeRange.end); } pointRequiredToBeDropped = true; } for(var i = 0; i < this._swimLanes.length; i++) { var swimlaneInfo = this._swimLanes[i]; for(var j = 0; j < swimlaneInfo.graphSeries.length; j++) { var series = swimlaneInfo.graphSeries[j]; if(pointRequiredToBeDropped) { swimlaneInfo.swimLane.removeInvalidPoints(this._viewableTimeRange.begin); } swimlaneInfo.swimLane.updateTimeRange(this._viewportTimeRange); } } this._ruler.updateTimeRange(this._viewportTimeRange, this._viewableTimeRange); }; LiveRenderer.prototype.setScrollPosition = function () { if(this._scrollbar) { this._scrollbar.updateScrollbar(this._viewportTimeRange, this._viewableTimeRange); } }; LiveRenderer.prototype.getSwimlaneConfiguration = function (config) { var swimlaneConfig = new DiagnosticsHub.SwimLaneConfiguration(); swimlaneConfig.containerId = this._swimlaneContainerIdPrefix + this._divIndex; this._divIndex++; swimlaneConfig.body.graph.jsonConfig = config.JsonObject; swimlaneConfig.body.graph.jsonConfig.GraphBehaviour = DiagnosticsHub.GraphBehaviourType.Live; swimlaneConfig.body.graph.jsonConfig.TimeProperties = this._timeProperties; swimlaneConfig.body.graph.registeredClass = DiagnosticsHub.RegisterNamespace.getRegisteredGraph("Microsoft.VisualStudio.DiagnosticsHub.MultiLineGraph"); swimlaneConfig.body.graph.resources = config.Resources; swimlaneConfig.body.graph.description = config.Description; swimlaneConfig.body.graph.height = config.JsonObject.Height || this._config.swimlane.graph.height; swimlaneConfig.body.leftScale.isVisible = this._config.swimlane.leftScale.isVisible; swimlaneConfig.body.leftScale.width = this._config.swimlane.leftScale.width; swimlaneConfig.body.leftScale.minimum = config.JsonObject.MinValue; swimlaneConfig.body.leftScale.maximum = config.JsonObject.MaxValue; swimlaneConfig.body.rightScale.isVisible = this._config.swimlane.rightScale.isVisible; swimlaneConfig.body.rightScale.width = this._config.swimlane.rightScale.width; swimlaneConfig.body.rightScale.minimum = config.JsonObject.MinValue; swimlaneConfig.body.rightScale.maximum = config.JsonObject.MaxValue; swimlaneConfig.minSelectionWidthInPixels = this._config.swimlane.minSelectionWidthInPixels; swimlaneConfig.timeRange = this._viewportTimeRange; swimlaneConfig.header.title.titleText = config.Title; swimlaneConfig.header.legend.data = []; swimlaneConfig.header.title.isGraphCollapsible = typeof this._config.swimlane.isGraphCollapsible !== "undefined" && this._config.swimlane.isGraphCollapsible !== null ? this._config.swimlane.isGraphCollapsible : swimlaneConfig.header.title.isGraphCollapsible; swimlaneConfig.getVerticalRulerLinePositions = DiagnosticsHub.RulerUtilities.getVerticalLinePositions; if(this._dependencyManager) { swimlaneConfig.body.graph.loadCss = this._dependencyManager.loadCss.bind(this); } swimlaneConfig.isSelectionEnabled = typeof this._config.swimlane.isSelectionEnabled !== "undefined" && this._config.swimlane.isSelectionEnabled !== null ? this._config.swimlane.isSelectionEnabled : swimlaneConfig.isSelectionEnabled; swimlaneConfig.isZoomEnabled = typeof this._config.swimlane.isZoomEnabled !== "undefined" && this._config.swimlane.isZoomEnabled !== null ? this._config.swimlane.isZoomEnabled : swimlaneConfig.isZoomEnabled; return swimlaneConfig; }; LiveRenderer.prototype.onScroll = function (left, totalLength) { var time = (parseInt(this._viewableTimeRange.elapsed.value) * left) / totalLength; var originalRangePlusTime = DiagnosticsHub.BigNumber.addNumber(this._viewableTimeRange.begin, time); this._viewportTimeRange = new DiagnosticsHub.JsonTimespan(originalRangePlusTime, DiagnosticsHub.BigNumber.add(originalRangePlusTime, this._viewportTimeRange.elapsed)); var isLatestPointWithinTimeRange = this._viewportTimeRange.contains(this._diagnosticsSessionLatestTime); if(isLatestPointWithinTimeRange !== this._isGraphRolling) { this._isGraphRolling = this._scrollbar._isScrollbarLive = isLatestPointWithinTimeRange; this.setGraphState(this._isGraphRolling); } this.updateTimeRange(); }; LiveRenderer.prototype.setGraphState = function (isGraphRolling) { for(var i = 0; i < this._swimLanes.length; i++) { var swimlaneInfo = this._swimLanes[i]; for(var j = 0; j < swimlaneInfo.graphSeries.length; j++) { var series = swimlaneInfo.graphSeries[j]; swimlaneInfo.swimLane.setGraphState(isGraphRolling ? DiagnosticsHub.GraphState.Roll : DiagnosticsHub.GraphState.Stop); } } this._ruler.setState(isGraphRolling ? DiagnosticsHub.GraphState.Roll : DiagnosticsHub.GraphState.Stop); }; LiveRenderer.prototype.visibilityChanged = function (args) { if(args.data && typeof args.data.visible !== "undefined" && args.data.visible !== null) { if(args.data.visible) { this._scrollbar.autoshow(); this._scrollbar.updateScrollbar(this._viewportTimeRange, this._viewableTimeRange, true); } else { var hideScrollbar = true; for(var i = 0; i < this._swimLanes.length; i++) { if(this._swimLanes[i].swimLane.isVisible) { hideScrollbar = false; break; } } if(hideScrollbar) { this._scrollbar.hide(); } } } this.resizeHost(); }; return LiveRenderer; })(); DiagnosticsHub.LiveRenderer = LiveRenderer; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); .menuControl { background-color: TRANSPARENT; /*[{plugin-perftools-menu}]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-perftools-menu-border}]*/ box-shadow: 2px 2px 2px TRANSPARENT; /*[2px 2px 2px {plugin-perftools-menu-drop-shadow rgba(0.5)}]*/ display: none; list-style-type: none; padding: 2px; position: absolute; white-space: nowrap; width: auto; z-index: 99999; } .menuControl > li { padding: 2px 5px 2px 5px; width: 100%; } .menuControl > li:hover { background-color: TRANSPARENT; /*[{plugin-perftools-menu-hover}]*/ color: TRANSPARENT; /*[{plugin-perftools-menu-hover-text}]*/ cursor: pointer; } .menuControl > li:focus { background-color: TRANSPARENT; /*[{plugin-perftools-menu-focus}]*/ color: TRANSPARENT; /*[{plugin-perftools-menu-focus-text}]*/ } .menuControl > li > .menuToggleIcon { height: 12px; margin-top: -2px; margin-right: 5px; vertical-align: middle; width: 12px; } .menuControl > li > .menuToggleIcon.hiddenCheckMark { visibility: hidden; } .menuControlActive { background-color: TRANSPARENT !important; /*[{plugin-perftools-drop-down-button-focus} !important]*/ border-bottom: 1px solid TRANSPARENT !important; border-left: 1px solid TRANSPARENT !important; /*[1px solid {plugin-perftools-drop-down-button-focus-border} !important]*/ border-right: 1px solid TRANSPARENT !important; /*[1px solid {plugin-perftools-drop-down-button-focus-border} !important]*/ border-top: 1px solid TRANSPARENT !important; /*[1px solid {plugin-perftools-drop-down-button-focus-border} !important]*/ }.graph-canvas-div { height: 100%; width: 100%; -ms-grid-row: 1; -ms-grid-column: 1; position: relative; } .graph-canvas-div:focus { outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/ } .graph-canvas { left: 0px; top: 0px; height: 100%; width: 100%; position: absolute; } .line-separator { height: 1px; background: black; padding: 0px 0px 0px 0px; } .graph-cursor { position: absolute; width: 1px; z-index: 100; background-color: black; /*[{diagnostics-host-graph-cursor}]*/ } .graphContainer { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; display: -ms-grid; -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; color: black; /*[{plugin-color}]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ } .graph-focus { position: absolute; } .graph-focus:focus { outline: 2px solid grey; /*[2px solid {plugin-treeview-content-selected-border-color}]*/ } .graph-unfocused { outline: none !important; } .base-container { width: 100%; height: 100%; -ms-grid-columns: 1fr; -ms-grid-rows: auto auto 15; display: -ms-grid; } .toolbar-float { margin: 0; padding: 0; -ms-grid-columns: 1fr; -ms-grid-rows: auto auto auto; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; z-index: 1000; } .toolbar-float .main-information-container { -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-columns: auto auto auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; background-color: lightyellow; /*[{diagnostics-information-background}]*/ border-top: 1px black solid; /*[1px {diagnostics-information-border solid} solid]*/ border-bottom: 1px black solid; /*[1px {diagnostics-information-border solid} solid]*/ padding: 5px; } .toolbar-float .main-information-container .information-icon { -ms-grid-row: 1; -ms-grid-column: 1; background: url("../images/Information_blue.png") no-repeat; /*[url({vs-image-information-icon}) no-repeat]*/ background-size: 1.333em 1.333em; width: 1.333em; height: 1.333em; background-position-x: left; background-position-y: left; background-color: transparent; } .toolbar-float .main-information-container .dropped-events { -ms-grid-row: 1; -ms-grid-column: 2; color: black; /*[{diagnostics-information-foreground}]*/ padding-left: 5px; padding-right: 5px; background-color: transparent; } .toolbar-float .main-information-container .information-link { -ms-grid-row: 1; -ms-grid-column: 3; padding-left: 5px; padding-right: 5px; background-color: transparent; } .toolbar-float .main-information-container .information-close-div { -ms-grid-row: 1; -ms-grid-column: 4; background-color: transparent; vertical-align: middle; padding-top: 2px; } .toolbar-float .main-information-container .information-close-div .information-close { background-color: transparent; font-family: Marlett !important; color: black; /*[{diagnostics-information-foreground}]*/ float: right; } .toolbar-float .main-toolbar-container { -ms-grid-row: 2; -ms-grid-column: 1; } .toolbar-float .main-ruler-container { -ms-grid-row: 3; -ms-grid-column: 1; } .main-container { -ms-grid-columns: 1fr; -ms-grid-rows: auto auto; display: -ms-grid; height: 100%; width: 100%; -ms-grid-row: 2; -ms-grid-column: 1; } .main-container .main-empty { -ms-grid-row: 1; -ms-grid-column: 1; } .main-container .main-swimlane-container { -ms-grid-row: 2; -ms-grid-column: 1; display: -ms-grid; -ms-grid-columns: 1fr; } .main-container .main-swimlane-container .swimlane-container { -ms-grid-row: 1; -ms-grid-column: 1; } .main-container .main-swimlane-margin { -ms-grid-row: 4; -ms-grid-column: 1; height: 5px; } .main-container .main-scrollbar { -ms-grid-row: 3; -ms-grid-column: 1; } a:link { text-decoration: none; color: lightblue; /*[{diagnostics-information-link-foreground}]*/ background-color: transparent; } a:visited { text-decoration: none; color: lightblue; /*[{diagnostics-information-link-foreground}]*/ background-color: transparent; } a:hover { text-decoration: none; color: lightblue; /*[{diagnostics-information-link-foreground-hover}]*/ background-color: transparent; } a:active { text-decoration: none; color: lightblue; /*[{diagnostics-information-link-foreground-pressed}]*/ background-color: transparent; } .ruler-body { width: 100%; position: relative; margin: 0; padding: 0; overflow: hidden; z-index: 97; -ms-user-select: none; user-select: none; -ms-grid-row: 2; -ms-grid-column: 1; -ms-grid-row-align: center; border-bottom: 1px solid #c0c0c0; /*[1px solid {diagnostics-host-border}]*/ } .ruler-body:focus { outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/ } .ruler-container { width: 100%; margin: 0; padding: 0; overflow: hidden; display: -ms-grid; -ms-grid-columns: 1fr; -ms-grid-rows: auto 1fr; color: black; /*[{plugin-color}]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ } .ruler-bar { position: absolute; margin: 0; padding: 0; overflow: hidden; top: 0; height: 100%; z-index: 98; } .ruler-bar-left-side { position: absolute; top: 0px; border-right: 1px solid black; /*[1px solid {diagnostics-host-ruler-tickmark}]*/ height: 100%; } .ruler-bar-right-side { position: absolute; top: 0px; border-left: 1px solid black; /*[1px solid {diagnostics-host-ruler-tickmark}]*/ height: 100%; } .ruler-slider { cursor: col-resize !important; height: 100%; position: absolute; top: 0px; background-color: black; /*[{diagnostics-host-ruler-slider}]*/ margin: 0; padding: 0; overflow: hidden; z-index: 100; } .ruler-slider:hover { outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/ background-color: blue; /*[{diagnostics-host-ruler-slider-active}]*/ } .ruler-slider:focus { outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/ background-color: blue; /*[{diagnostics-host-ruler-slider-active}]*/ } .ruler-unselected { height: 100%; position: absolute; top: 0px; background-color: rgba(200,200,200,0.50); margin: 0; padding: 0; overflow: hidden; z-index: 99; } .ruler-scale-main { width: 100%; height: 1.8em; display: block; margin: 0; padding: 0; } .ruler-scale-tickmarks { width: 100%; display: block; height: 100%; margin: 0; padding: 0; position: relative; } .ruler-scale-tickmark-big { position: absolute; margin: 0; padding: 0; top: 0; width: 0px; height: 100%; border-left-width: 1px; border-left-style: solid; border-left-color: black; /*[{diagnostics-host-ruler-tickmark}]*/ z-index: 74; } .ruler-scale-tickmark-medium { position: absolute; margin: 0; padding: 0; top: 1em; width: 0px; height: 0.833em; border-left-width: 1px; border-left-style: solid; border-left-color: black; /*[{diagnostics-host-ruler-tickmark}]*/ z-index: 74; } .ruler-scale-tickmark-small { position: absolute; margin: 0; padding: 0; top: 1.333em; width: 0px; height: 0.500em; border-left-width: 1px; border-left-style: solid; border-left-color: black; /*[{diagnostics-host-ruler-tickmark}]*/ z-index: 74; } .ruler-scale-label-text { position: absolute; margin: 0; padding: 0px 2px 0px 2px; top: 0; line-height: 1em; text-overflow: clip; white-space: nowrap; } .ruler-scale-mark-image-event { width: 0.750em; height: 0.750em; background-position-x: left; background-position-y: bottom; background-size: 9px 9px; z-index: 75; background-color: transparent; } .ruler-scale-mark-image-position { position: absolute; top: 1.083em; } .ruler-legend-div { -ms-grid-columns: auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row-align: center; } .ruler-legend-color-div { width: 9px; height: 9px; -ms-grid-column: 1; -ms-grid-row: 1; -ms-grid-row-align: center; } .ruler-legend-text-div { -ms-grid-column: 2; -ms-grid-row: 1; -ms-grid-row-align: center; margin-right: 10px; margin-left: 2px; } .ruler-legend-container { margin-right: 5px; -ms-grid-row: 1; -ms-grid-column: 2; -ms-grid-row-align: center; -ms-flex-direction: row; -ms-flex-wrap: wrap; -ms-grid-column: 3; -ms-grid-column-align: end; display: -ms-flexbox; } .ruler-legend-color { width: 20px; height: 16px; padding: 0px 0px 0px 0px; vertical-align: middle; } .ruler-label-mark-image { width: 9px; height: 9px; background-size: 9px 9px; background-repeat: no-repeat } .ruler-title-container { -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .ruler-title-expand { width: 10px; height: 10px; padding-right: 2px; display: table-cell; } .ruler-title-text { -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; font-weight: 600; margin-left: 10px; } .ruler-header { border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-border}]*/ padding-top: 4px; padding-bottom: 4px; -ms-grid-columns: auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .ruler-area { width: 100%; display: block; vertical-align: middle; } .scrollbar-container { width:100%; height: 100%; } .scrollbar-container .scrollbar { width: 100%; height: 100%; position: relative; overflow-x: scroll !important; display: none; border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-swimlane-border}]*/ } .scrollbar-container .scrollbar .scrollbar-width-calculator { position: relative; height: 1px; width: 1px; } .sourceInfoTooltip { -ms-grid-columns: auto 5px auto; -ms-grid-rows: 4; display: -ms-grid; width: 237px; } .sourceInfoTooltip .sourceInfoNameLabel { -ms-grid-column: 1; -ms-grid-row: 1; } .sourceInfoTooltip .sourceInfoName { -ms-grid-column: 3; -ms-grid-row: 1; word-break: break-all; } .sourceInfoTooltip .sourceInfoFileLabel { -ms-grid-column: 1; -ms-grid-row: 2; } .sourceInfoTooltip .sourceInfoFile { -ms-grid-column: 3; -ms-grid-row: 2; word-break: break-all; } .sourceInfoTooltip .sourceInfoLineLabel { -ms-grid-column: 1; -ms-grid-row: 3; } .sourceInfoTooltip .sourceInfoLine { -ms-grid-column: 3; -ms-grid-row: 3; word-break: break-all; } .sourceInfoTooltip .sourceInfoColumnLabel { -ms-grid-column: 1; -ms-grid-row: 4; } .sourceInfoTooltip .sourceInfoColumn { -ms-grid-column: 3; -ms-grid-row: 4; word-break: break-all; }.graphDiv { width: 100%; height: 100%; } .line-separator { height: 1px; background: black; } .legend-div { -ms-grid-columns: auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row-align: center; } .legend-color-div { width: 12px; height: 12px; -ms-grid-column: 1; -ms-grid-row: 1; -ms-grid-row-align: center; -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; display: -ms-grid; } .legend-text-div { -ms-grid-column: 2; -ms-grid-row: 1; -ms-grid-row-align: center; margin-left: 2px; margin-right: 10px; white-space: nowrap; } .legend-container { -ms-grid-row: 1; -ms-grid-column: 2; -ms-grid-row-align: center; -ms-flex-direction: row; -ms-flex-wrap: wrap; -ms-grid-column-align: end; display: -ms-flexbox; margin-left: 20px; } .legend-color { width: 12px; height: 12px; -ms-grid-column: 1; -ms-grid-row: 1; -ms-grid-row-align: center; } .title-container { margin-left: 5px; -ms-grid-columns: 25px 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .title-expand { -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .title-text { -ms-grid-row: 1; -ms-grid-column: 2; -ms-grid-row-align: center; font-weight: 600; margin-left: 2px; } .title-expand-button { background: url("../images/itemExpandedIcon.png") no-repeat; /*[url({vs-image-icon-tree-expanded}) no-repeat]*/ background-size: 10px 10px; width: 10px; height: 10px; background-repeat: no-repeat; background-position-x: left; background-position-y: left; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .title-collapse-button { background: url("../images/itemCollapsedIcon.png") no-repeat; /*[url({vs-image-icon-tree-collapsed}) no-repeat]*/ background-size: 10px 10px; width: 10px; height: 10px; background-repeat: no-repeat; background-position-x: left; background-position-y: left; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .title-button-disabled { width: 10px; height: 10px; background-repeat: no-repeat; background-position-x: left; background-position-y: left; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .swimlane-header { border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-swimlane-border}]*/ padding-bottom: 2px; padding-top: 5px; -ms-grid-columns: auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .swimlane-body { width: 100%; display: -ms-grid; -ms-grid-columns: auto 1fr auto; -ms-grid-rows: 1fr; border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-swimlane-border}]*/ -ms-grid-row: 2; -ms-grid-column: 1; -ms-grid-row-align: center; box-sizing: content-box; } .graph-scale-left { border-right-style: solid; border-right-color: grey; /*[{diagnostics-host-graph-scale}]*/ -ms-grid-row: 1; -ms-grid-column: 1; position: relative; } .graph-scale-right { border-left-style: solid; border-left-color: grey; /*[{diagnostics-host-graph-scale}]*/ -ms-grid-row: 1; -ms-grid-column: 3; position: relative; } .graph-axis-left { position: absolute; text-align: right; right: 5px; } .graph-axis-right { position: absolute; text-align: left; left: 5px; } .graph-div { -ms-grid-row: 1; -ms-grid-column: 2; position: relative; } .graph-div .unselected { background-color: rgba(200, 200, 200, 0.50); position: absolute; z-index: 110; } .graph-div .focused { outline: 1px dotted gray !important; /*[1px dotted {plugin-treeview-content-selected-border-color} !important]*/ stroke: #C0C0C0 !important; /*[{plugin-treeview-content-selected-border-color} !important]*/ stroke-dasharray: 2, 1 !important; stroke-width: 1px !important; } .graph-canvas { left: 0px; top: 0px; height: 100%; width: 100%; position: absolute; } .graph-axis-line { position: absolute; width: 100%; height: 0px; left: 0px; z-index: 99; border-bottom-color: #c0c0c0; /*[{diagnostics-host-graph-line}]*/ border-bottom-width: 1px; border-bottom-style: dashed; } .swimlane-vertical-line { position: absolute; height: 100%; width: 0px; border-right-color: #c0c0c0; /*[{diagnostics-host-graph-line}]*/ border-right-width: 1px; border-right-style: solid; top: 0px; } .threshold-selector { -ms-grid-column: 3; margin-right: 10px; } .threshold-axis { border-bottom-color: #ff0000; /* Threshold axis line color */ } .threshold-legend-color { border-bottom-color: #ff0000; /* Threshold legend color */ border-bottom-width: 1px; border-bottom-style: dashed; height: 1px; } .threshold-legend-text { margin-right: 4px; } /* Styles overriding hub styles */ .ruler-title-text { margin-left: 0px; } /** * Token color values * From the Console common "console.css" */ .valueStringToken-String { color: TRANSPARENT; /*[{plugin-font-editor-string-color}]*/ } .valueStringToken-Number { color: TRANSPARENT; /*[{plugin-font-editor-number-color}]*/ } .perftools-Html-Element-Tag { color: TRANSPARENT; /*[{plugin-font-editor-html-element-color}]*/ } .perftools-Html-Tag { color: TRANSPARENT; /*[{plugin-font-editor-html-tag-color}]*/ } .perftools-Html-Attribute { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-name-color}]*/ } .perftools-Html-Value { color: TRANSPARENT; /*[{plugin-font-editor-html-attribute-value-color}]*/ } .perftools-Html-Operator { color: TRANSPARENT; /*[{plugin-font-editor-html-operator-color}]*/ } var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var Logger = (function () { function Logger() { this._loggerProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.LoggerPortMarshaler", { }, true); var that = this; try { var apex = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.Test.Apex.DiagnosticsHub.ApexJSExtension", { }, true); if(apex !== null) { apex._call("getApexJavaScript").done(function (result) { if(result) { that.debug("got apex javascript files"); var scriptObj = document.createElement("script"); scriptObj.setAttribute("type", "text/javascript"); scriptObj.setAttribute("src", result); var head = document.getElementsByTagName("head"); if(!head) { that.debug("Unable to add apex script to document"); } else { head[0].appendChild(scriptObj); that.debug("Added ApexJSExtension '" + result + "' to document"); } } else { that.debug("no file was returned by getApexJavaScript, cannot inject TestExtension.ts for ApexJS framework"); } }, function (error) { that.debug("Error when calling getApexJavaScript function:" + String(error)); }); } else { that.debug("Unable to connect to port marshaler 'Microsoft.Test.Apex.DiagnosticsHub.ApexJSExtension'"); } } catch (e) { that.error(e.toString()); } } Logger.prototype.info = function (message) { this._loggerProxy._call("logInfo", message); }; Logger.prototype.debug = function (message) { this._loggerProxy._call("logDebug", message); }; Logger.prototype.warning = function (message) { this._loggerProxy._call("logWarning", message); }; Logger.prototype.error = function (message) { this._loggerProxy._call("logError", message); }; return Logger; })(); var _logger = null; function getLogger() { if(_logger === null) { _logger = new Logger(); } return _logger; } DiagnosticsHub.getLogger = getLogger; Plugin.addEventListener("pluginready", function () { getLogger(); }); })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var DiagnosticsHubNativeHost = (function () { function DiagnosticsHubNativeHost(logger) { this._externalObject = null; this._logger = logger; var hostObj = (Plugin).F12 || (Plugin).VS; if(!hostObj) { this._logger.error("External object creator does not exist"); throw "Unable to determine the ScriptedSandbox host"; } this._externalObject = hostObj.Utilities.createExternalObject("DiagnosticsHub.DataWarehouseHost", "{339B3787-FC17-4BF5-A0DC-CBEF24DB2EDE}"); this._automationManager = DiagnosticsHub.getAutomationManager(this._logger); } DiagnosticsHubNativeHost.prototype.requestSync = function (controllerId, actionId, sessionId, request) { if(this._externalObject) { this._externalObject.requestSync(controllerId, actionId, sessionId, (typeof request === "string") ? request : (request !== null && (typeof request !== "undefined")) ? JSON.stringify(request) : ""); } else { this._logger.warning("External object is null. Verify that DiagnosticsHub.ScriptedSandboxPlugin.dll was loaded into ScriptedSandbox."); } }; DiagnosticsHubNativeHost.prototype.request = function (controllerId, actionId, sessionId, request) { var _this = this; var that = this; var requestArgs = { controllerId: controllerId, actionId: actionId, sessionId: sessionId, request: request }; var safeInvoke = function (callback, response) { try { callback(response); } catch (e) { _this._logger.error(JSON.stringify(e)); } }.bind(this); var result = null; var response = null; var oncancel = function () { if(_this._externalObject && _this._externalObject.cancel && response && response.requestId) { _this._externalObject.cancel(response.requestId); } }.bind(this); var dispatchCallback = function (promiseHandler, jsonResponse, promiseType) { if(promiseHandler !== null) { var result = null; if(jsonResponse !== null) { try { result = (jsonResponse === null || jsonResponse === "" || (typeof jsonResponse !== "string")) ? jsonResponse : JSON.parse(jsonResponse); } catch (e) { this._logger.error("Could not parse " + promiseType + " response: " + jsonResponse); this._logger.error(e.Message); } } safeInvoke(promiseHandler, result); } else { this._logger.warning("DiagnosticsHubNativeHost: " + promiseType + " callback is null."); } }.bind(this); var promiseInitialization = function (completePromise, errorPromise, progressPromise) { if(_this._externalObject) { result = _this._externalObject.request(controllerId, actionId, sessionId, (typeof request === "string") ? request : (request !== null && (typeof request !== "undefined")) ? JSON.stringify(request) : "", function (jsonResponse) { dispatchCallback(completePromise, jsonResponse, "completePromise"); }.bind(_this), function (jsonResponse) { dispatchCallback(errorPromise, jsonResponse, "errorPromise"); }.bind(_this), function (jsonResponse) { dispatchCallback(progressPromise, jsonResponse, "progressPromise"); }.bind(_this)); } else { that._logger.warning("External object is null. Verify that DiagnosticsHub.ScriptedSandboxPlugin.dll was loaded into ScriptedSandbox."); } if(result === null || typeof result !== "string") { response = { hresult: 1 }; } else { response = JSON.parse(result); } if(response.hresult !== 0) { _this._logger.error("Could not invoke request method of native host: " + result); var error = new Error(); error.message = error.name = response.hresult.toString(16); errorPromise(error); } }.bind(this); var resultPromise = this._automationManager.getAutomationPromise("Microsoft.VisualStudio.DiagnosticsHub.DiagnosticsHubNativeHost.request", promiseInitialization, oncancel, requestArgs); return resultPromise; }; return DiagnosticsHubNativeHost; })(); DiagnosticsHub.DiagnosticsHubNativeHost = DiagnosticsHubNativeHost; var NativeHostController = (function () { function NativeHostController(sessionId, controllerId) { this._sessionId = sessionId; this._controllerId = controllerId; this._nativeHost = getNativeHost(); } NativeHostController.prototype.request = function (actionId, requestData) { return this._nativeHost.request(this._controllerId, actionId, this._sessionId, requestData); }; NativeHostController.prototype.requestSync = function (actionId, requestData) { return this._nativeHost.requestSync(this._controllerId, actionId, this._sessionId, requestData); }; return NativeHostController; })(); DiagnosticsHub.NativeHostController = NativeHostController; var _host = null; function getNativeHost() { if(_host === null) { _host = new DiagnosticsHubNativeHost(DiagnosticsHub.getLogger()); } return _host; } DiagnosticsHub.getNativeHost = getNativeHost; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; (function (SessionState) { SessionState._map = []; SessionState.Unknown = 0; SessionState.Created = 100; SessionState.SetupTargets = 150; SessionState.CollectionStarting = 200; SessionState.CollectionStarted = 300; SessionState.CollectionPausing = 325; SessionState.CollectionPauseCanceling = 330; SessionState.CollectionPaused = 350; SessionState.CollectionResuming = 375; SessionState.CollectionResumeCanceling = 380; SessionState.CollectionFinishing = 400; SessionState.CollectionFinished = 500; SessionState.Analyzing = 530; SessionState.AnalyzingFinished = 560; SessionState.CollectionTerminating = 600; SessionState.CollectionTerminated = 700; SessionState.CollectionStartFailed = 10000; SessionState.CollectionStartCanceling = 10100; SessionState.CollectionFinishFailed = 20000; SessionState.CollectionFinishCanceling = 20100; })(DiagnosticsHub.SessionState || (DiagnosticsHub.SessionState = {})); var SessionState = DiagnosticsHub.SessionState; var EventDeferral = (function () { function EventDeferral(onHandlerCompleted) { this._onHandlerCompleted = onHandlerCompleted; } EventDeferral.prototype.complete = function () { this._onHandlerCompleted(); }; return EventDeferral; })(); var StateChangedEventArgs = (function () { function StateChangedEventArgs(eventArgs, onHandlerCompleted) { this._eventArgs = eventArgs; this._waitHandler = false; this._onHandlerCompleted = onHandlerCompleted; this._eventDeferral = null; } Object.defineProperty(StateChangedEventArgs.prototype, "currentState", { get: function () { return this._eventArgs.CurrentState; }, enumerable: true, configurable: true }); Object.defineProperty(StateChangedEventArgs.prototype, "previousState", { get: function () { return this._eventArgs.PreviousState; }, enumerable: true, configurable: true }); Object.defineProperty(StateChangedEventArgs.prototype, "waitHandler", { get: function () { return this._eventDeferral !== null; }, enumerable: true, configurable: true }); StateChangedEventArgs.prototype.getDeferral = function () { if(this._eventDeferral === null) { this._eventDeferral = new EventDeferral(this._onHandlerCompleted); } return this._eventDeferral; }; return StateChangedEventArgs; })(); var Session = (function () { function Session(logger) { var that = this; this._eventsListeners = new Array(); this._logger = logger; this._sessionProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SessionPortMarshaler", { }, true); this._sessionProxy._call("initialize").done(function () { that._logger.debug("JavaScript session object connected to host. Ready to get session state notification events."); }, function (error) { that._logger.error("Cannot initialize session, error name: '" + error.name + "', error message: '" + error.message + "'"); }); this._sessionProxy.addEventListener("sessionStateChanged", function (eventArgs) { that.stateChangedHandler(eventArgs); }); } Session.prototype.getState = function (callback, onError) { var that = this; this._logger.debug("Calling get state"); return this._sessionProxy._call("getState").done(function (result) { that._logger.debug("On getstate done, state value: " + result); if(callback !== null) { callback(result); } }, function (error) { that._logger.error("Cannot get state, error name: '" + error.name + "', error message: '" + error.message + "'"); if(onError !== null) { onError(error); } }); }; Session.prototype.addStateChangedEventListener = function (listener) { this._eventsListeners.push(listener); this._logger.debug("State changed event handler added."); }; Session.prototype.removeStateChangedEventListener = function (listener) { for(var i = 0; i < this._eventsListeners.length; i++) { if(this._eventsListeners[i] === listener) { this._logger.debug("State changed event handler removed."); this._eventsListeners.splice(i, 1); break; } } }; Session.prototype.stateChangedHandler = function (eventArgs) { var that = this; this._logger.debug("Invoking JavaScript handlers for State Change Event."); var handlersCount = 0; var onCompleted = function () { handlersCount--; if(handlersCount <= 0) { that._sessionProxy._call("sessionStateChangedCompleted", eventArgs.Token); } else { that._logger.debug("Still waiting when all event state change handlers will complete their work. Handlers count: " + handlersCount); } }; for(var propertyName in this._eventsListeners) { var handler = this._eventsListeners[propertyName]; if(this._eventsListeners.hasOwnProperty(propertyName)) { if(typeof handler === "function") { try { var jsEventArgs = new StateChangedEventArgs(eventArgs, onCompleted); handler(jsEventArgs); if(jsEventArgs.waitHandler) { handlersCount++; that._logger.debug("JavaScipt handlers for event state changed asked to wait while they will finish. Handlers count: " + handlersCount); } } catch (e) { this._logger.error(e.toString()); } } else { this._logger.warning("One of the listeners not a 'function', it has type " + (typeof handler)); } } } if(handlersCount === 0) { onCompleted(); } }; return Session; })(); var _currentSession = null; function getCurrentSession() { if(_currentSession === null) { _currentSession = new Session(DiagnosticsHub.getLogger()); } return _currentSession; } DiagnosticsHub.getCurrentSession = getCurrentSession; Plugin.addEventListener("pluginready", function () { getCurrentSession(); }); })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (DataWarehouse) { "use strict"; (function (DataSourceInfoType) { DataSourceInfoType._map = []; DataSourceInfoType.Unknown = 0; DataSourceInfoType.File = 1; DataSourceInfoType.Directory = 2; DataSourceInfoType.Package = 3; })(DataWarehouse.DataSourceInfoType || (DataWarehouse.DataSourceInfoType = {})); var DataSourceInfoType = DataWarehouse.DataSourceInfoType; var DataSourceInfo = (function () { function DataSourceInfo(id, type, identity, path) { this.id = id; this.type = type; this.identity = identity; this.path = path; } return DataSourceInfo; })(); DataWarehouse.DataSourceInfo = DataSourceInfo; var DataWarehouseService = (function () { function DataWarehouseService() { this._serviceProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DataWarehouseServiceMarshaler", { }, true); this._logger = DiagnosticsHub.getLogger(); } DataWarehouseService.prototype.getAllDataSourceInfos = function (callback) { var that = this; this._serviceProxy._call("getAllDataSourceInfos").done(function (result) { var infos = new Array(); for(var i = 0; i < result.length; i++) { var dataSource = result[i]; if(dataSource.Type === DataSourceInfoType.File || dataSource.Type === DataSourceInfoType.Directory || dataSource.Type === DataSourceInfoType.Package) { infos.push(new DataSourceInfo(dataSource.Id, dataSource.Type, dataSource.Identity, dataSource.Path)); } else { that._logger.error("Unknown type of data source info type: " + dataSource.Type); } } callback(infos); }); }; return DataWarehouseService; })(); var _service = null; function getDataWarehouseService() { if(_service === null) { _service = new DataWarehouseService(); } return _service; } DataWarehouse.getDataWarehouseService = getDataWarehouseService; Plugin.addEventListener("pluginready", function () { getDataWarehouseService(); }); })(DiagnosticsHub.DataWarehouse || (DiagnosticsHub.DataWarehouse = {})); var DataWarehouse = DiagnosticsHub.DataWarehouse; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var Publisher = (function () { function Publisher(events) { if (typeof events === "undefined") { events = null; } this._events = { }; this._listeners = { }; if(events && events.length > 0) { for(var i = 0; i < events.length; i++) { var type = events[i]; if(type) { this._events[type] = type; } } } else { this._events = null; } } Publisher.prototype.addEventListener = function (eventType, func) { if(eventType && func) { if(this._events === null || this._events[eventType]) { var callbacks = this._listeners[eventType] ? this._listeners[eventType] : this._listeners[eventType] = []; callbacks.push(func); } } }; Publisher.prototype.removeEventListener = function (eventType, func) { if(eventType && func) { if(this._events === null || this._events[eventType]) { var callbacks = this._listeners[eventType]; if(callbacks) { for(var i = 0; i < callbacks.length; i++) { if(func === callbacks[i]) { callbacks.splice(i, 1); break; } } if(callbacks.length === 0) { delete this._listeners[eventType]; } } } } }; Publisher.prototype.invokeListener = function (eventType, args) { if(eventType) { if(this._events === null || this._events[eventType]) { var callbacks = this._listeners[eventType]; if(callbacks) { for(var i = 0; i < callbacks.length; i++) { var func = callbacks[i]; if(func) { func(args); } } } } } }; return Publisher; })(); DiagnosticsHub.Publisher = Publisher; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var EventAggregator = (function () { function EventAggregator(logger) { this._eventsListeners = { }; this._publisher = new DiagnosticsHub.Publisher(); this._logger = logger; this._eventAggregatorProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.EventAggregatorMarshaler", { }, true); this._eventAggregatorProxy.addEventListener("globalEventHandler", function (eventArgs) { this.globalEventHandler(eventArgs); }.bind(this)); } EventAggregator.prototype.addEventListener = function (eventType, listener) { this._publisher.addEventListener(eventType, listener); this._logger.debug("EventAggregator:: Event listener added for event type '" + eventType + "'"); }; EventAggregator.prototype.removeEventListener = function (eventType, listener) { this._publisher.removeEventListener(eventType, listener); this._logger.debug("EventAggregator:: Event listener removed for event type '" + eventType + "'"); }; EventAggregator.prototype.globalEventHandler = function (eventArgs) { var eventType = eventArgs.EventType; this._logger.debug("EventAggregator:: Handling event type " + eventType + "."); var dataString = eventArgs.HubEventArgs.Data; this._logger.debug("EventAggregator:: Raise handler for event type " + eventType + " with data " + dataString + "."); try { var data = null; if(dataString !== null && typeof dataString === "string") { data = JSON.parse(dataString); } this._publisher.invokeListener(eventType, data); } catch (e) { this._logger.error(e.toString()); } }; EventAggregator.prototype.raiseEvent = function (eventType, data) { var dataString = null; if(data !== null && typeof data !== "undefined") { dataString = JSON.stringify(data); } this._logger.debug("EventAggregator:: Raising event type " + eventType + " with data " + dataString + "."); this._eventAggregatorProxy._call("raiseEvent", eventType, dataString); }; return EventAggregator; })(); var LocalEventAggregator = (function () { function LocalEventAggregator() { this._publisher = new DiagnosticsHub.Publisher(); } LocalEventAggregator.prototype.addEventListener = function (eventType, listener) { this._publisher.addEventListener(eventType, listener); }; LocalEventAggregator.prototype.removeEventListener = function (eventType, listener) { this._publisher.removeEventListener(eventType, listener); }; LocalEventAggregator.prototype.raiseEvent = function (eventType, data) { this._publisher.invokeListener(eventType, data); }; return LocalEventAggregator; })(); DiagnosticsHub.LocalEventAggregator = LocalEventAggregator; var _eventAggregator = null; function getEventAggregator() { if(_eventAggregator === null) { if((Plugin).F12) { _eventAggregator = new LocalEventAggregator(); } else { _eventAggregator = new EventAggregator(DiagnosticsHub.getLogger()); } } return _eventAggregator; } DiagnosticsHub.getEventAggregator = getEventAggregator; Plugin.addEventListener("pluginready", function () { getEventAggregator(); }); })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var GraphDataUpdateService = (function () { function GraphDataUpdateService(logger) { this._logger = logger; this._serviceProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.GraphDataUpdateServiceMarshaler", { }, true); } GraphDataUpdateService.prototype.addNewPoints = function (counterId, points) { var that = this; this._serviceProxy._call("addNewPoints", counterId, points).done(function () { }, function (error) { that._logger.error(error.message); }); }; return GraphDataUpdateService; })(); var _graphDataUpdateService = null; function getGraphDataUpdateService() { if(_graphDataUpdateService === null) { _graphDataUpdateService = new GraphDataUpdateService(DiagnosticsHub.getLogger()); } return _graphDataUpdateService; } DiagnosticsHub.getGraphDataUpdateService = getGraphDataUpdateService; Plugin.addEventListener("pluginready", function () { getGraphDataUpdateService(); }); })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var OutputWindowsService = (function () { function OutputWindowsService() { this._loggerProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.OutputWindowServiceMarshaler", { }, true); } OutputWindowsService.prototype.outputLine = function (message) { this._loggerProxy._call("outputLine", message); }; OutputWindowsService.prototype.outputLineAndShow = function (message) { this._loggerProxy._call("outputLineAndShow", message); }; OutputWindowsService.prototype.outputString = function (message) { this._loggerProxy._call("outputString", message); }; OutputWindowsService.prototype.outputStringAndShow = function (message) { this._loggerProxy._call("outputStringAndShow", message); }; return OutputWindowsService; })(); var _outputWindowService = null; function getOutputWindowsService() { if(_outputWindowService === null) { _outputWindowService = new OutputWindowsService(); } return _outputWindowService; } DiagnosticsHub.getOutputWindowsService = getOutputWindowsService; Plugin.addEventListener("pluginready", function () { getOutputWindowsService(); }); })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (Collectors) { "use strict"; var StandardTransportService = (function () { function StandardTransportService(logger) { var that = this; this._messageListeners = { }; this._logger = logger; this._proxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.StandardTransportServicePortMarshaller", { }, true); this._proxy.addEventListener("stringMessageReceived", function (eventArgs) { that._logger.debug("StandardTransportService.stringMessageReceived"); that.onStringMessageReceived(eventArgs); }); } StandardTransportService.prototype.getIsRemoteConnection = function () { return this._proxy._call("getIsRemoteConnection"); }; StandardTransportService.prototype.sendStringToCollectionAgent = function (agentClassId, request) { this._logger.debug("StandardTransportService.sendStringToCollectionAgent"); return this._proxy._call("sendStringToCollectionAgent", agentClassId, request); }; StandardTransportService.prototype.downloadFile = function (targetFilePath, localFilePath) { this._logger.debug("StandardTransportService.downloadFile"); return this._proxy._call("downloadFile", targetFilePath, localFilePath); }; StandardTransportService.prototype.addMessageListener = function (listenerGuid, listener) { var _this = this; this._logger.debug("StandardTransportService.addMessageListener(" + listenerGuid + ")"); if(typeof listenerGuid !== "string" || (listenerGuid.length !== 38 && listenerGuid.length !== 36)) { throw new Error("'listenerGuid' must be a Guid string"); } if(listenerGuid.length === 38 && listenerGuid[0] === "{" && listenerGuid[37] === "}") { listenerGuid = listenerGuid.substr(1, 36); } listenerGuid = listenerGuid.toLowerCase(); var lowerCaseGuidRegEx = new RegExp("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"); if(!lowerCaseGuidRegEx.test(listenerGuid)) { throw new Error("'listenerGuid' must be a Guid string"); } if(this._messageListeners[listenerGuid]) { throw new Error("Listener already exists with guid = " + listenerGuid); } this._messageListeners[listenerGuid] = listener; return this._proxy._call("enableEventsForListenerId", listenerGuid).then(null, function (value) { _this._messageListeners[listenerGuid] = null; }); }; StandardTransportService.prototype.onStringMessageReceived = function (eventArgs) { this._logger.debug("StandardTransportService.onStringMessageReceived"); var listenerGuid = eventArgs.ListenerId; var message = eventArgs.Message; if(this._messageListeners[listenerGuid]) { var listener = this._messageListeners[listenerGuid]; listener(message); } else { this._logger.warning("Unexpected message received without a message listener. listenerGuid=" + listenerGuid); } }; return StandardTransportService; })(); var _standardTransportService = null; function getStandardTransportService() { if(_standardTransportService === null) { _standardTransportService = new StandardTransportService(DiagnosticsHub.getLogger()); } return _standardTransportService; } Collectors.getStandardTransportService = getStandardTransportService; })(DiagnosticsHub.Collectors || (DiagnosticsHub.Collectors = {})); var Collectors = DiagnosticsHub.Collectors; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (DataWarehouse) { "use strict"; var ResourceIdentity = (function () { function ResourceIdentity() { } ResourceIdentity.DiagnosticsPackage = "DiagnosticsHub.Resource.DiagnosticsPackage"; ResourceIdentity.EtlFile = "DiagnosticsHub.Resource.EtlFile"; ResourceIdentity.JavaScriptSource = "DiagnosticsHub.Resource.JavaScript.SourceDirectory"; ResourceIdentity.SymbolCache = "DiagnosticsHub.Resource.SymbolCache"; ResourceIdentity.UserNativeImageDirectory = "DiagnosticsHub.Resource.UserNativeImageDirectory"; ResourceIdentity.PlatformNativeImage = "DiagnosticsHub.Resource.PlatformNativeImage"; ResourceIdentity.PlatformWinmd = "DiagnosticsHub.Resource.PlatformWinmd"; ResourceIdentity.UnknownFile = "DiagnosticsHub.Resource.File"; ResourceIdentity.UnknownDirectory = "DiagnosticsHub.Resource.Directory"; return ResourceIdentity; })(); DataWarehouse.ResourceIdentity = ResourceIdentity; })(DiagnosticsHub.DataWarehouse || (DiagnosticsHub.DataWarehouse = {})); var DataWarehouse = DiagnosticsHub.DataWarehouse; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var BigNumber = (function () { function BigNumber(high, low) { this._isHighNegative = false; this._isLowNegative = false; if(!Microsoft.VisualStudio.DiagnosticsHub.BigNumber.validate(high) || !Microsoft.VisualStudio.DiagnosticsHub.BigNumber.validate(low)) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } if(high < 0) { high = (high >>> 0); this._isHighNegative = true; } if(low < 0) { low = (low >>> 0); this._isLowNegative = true; } this._value = { h: high, l: low }; } BigNumber.OldestTimestampFormat = { h: 0, l: 0 }; BigNumber.LatestTimestampFormat = { h: 0xffffffff, l: 0xffffffff }; Object.defineProperty(BigNumber, "oldest", { get: function () { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.OldestTimestampFormat; }, enumerable: true, configurable: true }); Object.defineProperty(BigNumber, "latest", { get: function () { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.LatestTimestampFormat; }, enumerable: true, configurable: true }); Object.defineProperty(BigNumber, "zero", { get: function () { if(!Microsoft.VisualStudio.DiagnosticsHub.BigNumber.Zero) { Microsoft.VisualStudio.DiagnosticsHub.BigNumber.Zero = new Microsoft.VisualStudio.DiagnosticsHub.BigNumber(0, 0); } return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.Zero; }, enumerable: true, configurable: true }); Object.defineProperty(BigNumber, "one", { get: function () { if(!Microsoft.VisualStudio.DiagnosticsHub.BigNumber.One) { Microsoft.VisualStudio.DiagnosticsHub.BigNumber.One = new Microsoft.VisualStudio.DiagnosticsHub.BigNumber(0, 1); } return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.One; }, enumerable: true, configurable: true }); Object.defineProperty(BigNumber.prototype, "jsonValue", { get: function () { if(!this._jsonValue) { var high = this._value.h; if(this._isHighNegative || high > 0x7fffffff) { high = high << 0; } var low = this._value.l; if(this._isLowNegative || low > 0x7fffffff) { low = low << 0; } this._jsonValue = { h: high, l: low }; } return this._jsonValue; }, enumerable: true, configurable: true }); Object.defineProperty(BigNumber.prototype, "value", { get: function () { if(!this._stringValue) { if(this._value.h > 0) { this._stringValue = "0x" + this._value.h.toString(16) + Microsoft.VisualStudio.DiagnosticsHub.BigNumber.padLeadingZeros(this._value.l.toString(16), 8); } else { this._stringValue = "0x" + this._value.l.toString(16); } } return this._stringValue; }, enumerable: true, configurable: true }); BigNumber.max = function max(first, second) { return first.greaterOrEqual(second) ? first : second; }; BigNumber.min = function min(first, second) { return first.greaterOrEqual(second) ? second : first; }; BigNumber.add = function add(first, second) { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.addition(first, second); }; BigNumber.subtract = function subtract(first, second) { if(second.greater(first)) { return BigNumber.zero; } var otherTime = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertToManagedTimeFormat(second.jsonValue); var negateHigh = ~(otherTime.h); var negateLow = ~(otherTime.l); var twosComplement = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.addition(new Microsoft.VisualStudio.DiagnosticsHub.BigNumber(negateHigh, negateLow), Microsoft.VisualStudio.DiagnosticsHub.BigNumber.one, true); return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.addition(first, twosComplement, true); }; BigNumber.multiply = function multiply(first, second) { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.multiplication(first, second); }; BigNumber.divide = function divide(first, second) { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.division(first, second, false); }; BigNumber.modulo = function modulo(first, second) { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.division(first, second, true); }; BigNumber.addNumber = function addNumber(first, second) { if(second < 0) { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.subtract(first, BigNumber.convertFromNumber(-second)); } else { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.addition(first, BigNumber.convertFromNumber(second)); } return null; }; BigNumber.subtractNumber = function subtractNumber(first, second) { if(second < 0) { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.addition(first, BigNumber.convertFromNumber(-second)); } else { return Microsoft.VisualStudio.DiagnosticsHub.BigNumber.subtract(first, BigNumber.convertFromNumber(second)); } return null; }; BigNumber.multiplyNumber = function multiplyNumber(first, second) { if(second < 0) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } return BigNumber.multiply(first, BigNumber.convertFromNumber(second)); }; BigNumber.divideNumber = function divideNumber(first, second) { if(second < 0) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } return BigNumber.divide(first, BigNumber.convertFromNumber(second)); }; BigNumber.moduloNumber = function moduloNumber(first, second) { if(second < 0) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } return BigNumber.modulo(first, BigNumber.convertFromNumber(second)); }; BigNumber.convertFromNumber = function convertFromNumber(num) { if((num < 0) || !(num < 0x20000000000000)) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } num = Math.floor(num); var low = num & 0xFFFFFFFF; if(num <= 0xFFFFFFFF) { return new BigNumber(0, low); } var highStr = num.toString(16); highStr = highStr.substring(0, highStr.length - 8); var high = Number("0x" + highStr); return new BigNumber(high, low); }; BigNumber.prototype.equals = function (other) { var isEqual = false; var otherTime = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertToManagedTimeFormat(other.jsonValue); isEqual = (this._value.h === otherTime.h && this._value.l === otherTime.l); return isEqual; }; BigNumber.prototype.greater = function (other) { var isGreater = false; var otherTime = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertToManagedTimeFormat(other.jsonValue); if(this._value.h > otherTime.h) { isGreater = true; } else if(this._value.h === otherTime.h) { if(this._value.l > otherTime.l) { isGreater = true; } } return isGreater; }; BigNumber.prototype.greaterOrEqual = function (other) { var isGreaterOrEqual = false; var otherTime = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertToManagedTimeFormat(other.jsonValue); if(this._value.h > otherTime.h) { isGreaterOrEqual = true; } else if(this._value.h === otherTime.h) { if(this._value.l >= otherTime.l) { isGreaterOrEqual = true; } } return isGreaterOrEqual; }; BigNumber.prototype.compareTo = function (other) { if(this.greater(other)) { return 1; } else if(this.equals(other)) { return 0; } else { return -1; } }; BigNumber.convertFromBinaryString = function convertFromBinaryString(bits) { if(!bits || bits.match("[^10]") || bits.length > 64) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000" + " " + bits)); } var high = 0; var low = 0; if(bits.length <= 32) { low = parseInt(bits, 2); } else { low = parseInt(bits.slice(bits.length - 32), 2); high = parseInt(bits.slice(0, bits.length - 32), 2); } return new BigNumber(high, low); }; BigNumber.getBinaryString = function getBinaryString(timestamp) { var lowPart = timestamp._value.l.toString(2); if(timestamp._value.h > 0) { return timestamp._value.h.toString(2) + Microsoft.VisualStudio.DiagnosticsHub.BigNumber.padLeadingZeros(lowPart, 32); } else { return lowPart; } }; BigNumber.convertToManagedTimeFormat = function convertToManagedTimeFormat(time) { var high = time.h < 0 ? time.h >>> 0 : time.h; var low = time.l < 0 ? time.l >>> 0 : time.l; return { h: high, l: low }; }; BigNumber.addition = function addition(first, second, ignoreOverflow) { if (typeof ignoreOverflow === "undefined") { ignoreOverflow = false; } var firstTime = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertToManagedTimeFormat(first.jsonValue); var secondTime = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertToManagedTimeFormat(second.jsonValue); var low = 0; var high = 0; var low0 = (firstTime.l & 0xff) + (secondTime.l & 0xff); var low8 = (low0 >>> 8) + ((firstTime.l >>> 8) & 0xff) + ((secondTime.l >>> 8) & 0xff); low0 = low0 & 0xff; var low16 = (low8 >>> 8) + ((firstTime.l >>> 16) & 0xff) + ((secondTime.l >>> 16) & 0xff); low8 = low8 & 0xff; var low24 = (low16 >>> 8) + ((firstTime.l >>> 24) & 0xff) + ((secondTime.l >>> 24) & 0xff); low16 = low16 & 0xff; var high0 = (low24 >>> 8) + (firstTime.h & 0xff) + (secondTime.h & 0xff); low24 = low24 & 0xff; var high8 = (high0 >>> 8) + ((firstTime.h >>> 8) & 0xff) + ((secondTime.h >>> 8) & 0xff); high0 = high0 & 0xff; var high16 = (high8 >>> 8) + ((firstTime.h >>> 16) & 0xff) + ((secondTime.h >>> 16) & 0xff); high8 = high8 & 0xff; var high24 = (high16 >>> 8) + ((firstTime.h >>> 24) & 0xff) + ((secondTime.h >>> 24) & 0xff); high16 = high16 & 0xff; if(!ignoreOverflow && (high24 >>> 8) > 0) { Microsoft.VisualStudio.DiagnosticsHub.getLogger().error("Addition overflow. Lost upper bits from: 0x" + high24.toString(16)); return new BigNumber(0xffffffff, 0xffffffff); } high24 = high24 & 0xff; var finalLow16 = low24 << 8 | low16; var finalLow0 = low8 << 8 | low0; var finalHigh16 = high24 << 8 | high16; var finalHigh0 = high8 << 8 | high0; low = Number("0x" + Microsoft.VisualStudio.DiagnosticsHub.BigNumber.padLeadingZeros(finalLow16.toString(16), 4) + Microsoft.VisualStudio.DiagnosticsHub.BigNumber.padLeadingZeros(finalLow0.toString(16), 4)); high = Number("0x" + Microsoft.VisualStudio.DiagnosticsHub.BigNumber.padLeadingZeros(finalHigh16.toString(16), 4) + Microsoft.VisualStudio.DiagnosticsHub.BigNumber.padLeadingZeros(finalHigh0.toString(16), 4)); return new BigNumber(high, low); }; BigNumber.multiplication = function multiplication(first, second) { var firstTime = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertToManagedTimeFormat(first.jsonValue); var secondTime = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertToManagedTimeFormat(second.jsonValue); if(firstTime.h === 0 && secondTime.h === 0 && 0 < firstTime.l && firstTime.l <= 0x4000000 && 0 < secondTime.l && secondTime.l <= 0x4000000) { var product = firstTime.l * secondTime.l; return BigNumber.convertFromNumber(product); } var a1 = firstTime.l & 0xFFFF; var a2 = firstTime.l >>> 0x10; var a3 = firstTime.h & 0xFFFF; var a4 = firstTime.h >>> 0x10; var b1 = secondTime.l & 0xFFFF; var b2 = secondTime.l >>> 0x10; var b3 = secondTime.h & 0xFFFF; var b4 = secondTime.h >>> 0x10; var c1 = a1 * b1; var c2 = c1 >>> 0x10; c1 &= 0xFFFF; c2 += a2 * b1; var c3 = c2 >>> 0x10; c2 &= 0xFFFF; c2 += a1 * b2; c3 += c2 >>> 0x10; c2 &= 0xFFFF; c3 += a3 * b1; var c4 = c3 >>> 0x10; c3 &= 0xFFFF; c3 += a2 * b2; c4 += c3 >>> 0x10; c3 &= 0xFFFF; c3 += a1 * b3; c4 += c3 >>> 0x10; c3 &= 0xFFFF; c4 += a4 * b1 + a3 * b2 + a2 * b3 + a1 * b4; if(c4 > 0xFFFF) { Microsoft.VisualStudio.DiagnosticsHub.getLogger().error("Multiplication overflow. Lost upper 16-bits from: 0x" + c4.toString(16)); } c4 &= 0xFFFF; var productHigh = (c4 << 0x10) | c3; var productLow = (c2 << 0x10) | c1; return new BigNumber(productHigh, productLow); }; BigNumber.division = function division(dividend, divisor, wantRemainder) { if(divisor.greater(dividend)) { return wantRemainder ? dividend : Microsoft.VisualStudio.DiagnosticsHub.BigNumber.zero; } if(divisor.equals(Microsoft.VisualStudio.DiagnosticsHub.BigNumber.zero)) { if(wantRemainder) { return dividend; } throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } var dividendBits = BigNumber.getBinaryString(dividend); var divisorBits = BigNumber.getBinaryString(divisor); var divisorLength = divisorBits.length; var dividendLength = dividendBits.length; var timeStamp2toThe53 = new BigNumber(0x200000, 0); if(timeStamp2toThe53.greater(dividend)) { var dividendNum = parseInt(dividend.value); var divisorNum = parseInt(divisor.value); return wantRemainder ? BigNumber.convertFromNumber(dividendNum % divisorNum) : BigNumber.convertFromNumber(dividendNum / divisorNum); } var quotientString = ""; var nextIndex = divisorLength; var currDividend = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromBinaryString(dividendBits.substr(0, divisorLength)); while(nextIndex <= dividendLength) { if(currDividend.greater(divisor) || currDividend.equals(divisor)) { quotientString += "1"; currDividend = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.subtract(currDividend, divisor); } else { quotientString += "0"; } if(nextIndex !== dividendLength) { currDividend = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromBinaryString(BigNumber.getBinaryString(currDividend) + dividendBits[nextIndex]); } nextIndex++; } return wantRemainder ? currDividend : Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromBinaryString(quotientString); }; BigNumber.padLeadingZeros = function padLeadingZeros(value, totalLength) { var padded = value; var zeros = "00000000"; if(padded && totalLength && totalLength > 0) { while(totalLength - padded.length >= 8) { padded = zeros + padded; } padded = zeros.substr(0, totalLength - padded.length) + padded; } return padded; }; BigNumber.validate = function validate(value) { return typeof value === "number" && value < 0x100000000 && value > -1 * 0x80000000; }; return BigNumber; })(); DiagnosticsHub.BigNumber = BigNumber; var JsonTimespan = (function () { function JsonTimespan(begin, end) { if(begin.greater(end)) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } this._begin = begin; this._end = end; } Object.defineProperty(JsonTimespan.prototype, "begin", { get: function () { return this._begin; }, enumerable: true, configurable: true }); Object.defineProperty(JsonTimespan.prototype, "end", { get: function () { return this._end; }, enumerable: true, configurable: true }); Object.defineProperty(JsonTimespan.prototype, "elapsed", { get: function () { if(!this._elapsed) { this._elapsed = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.subtract(this.end, this.begin); } return this._elapsed; }, enumerable: true, configurable: true }); JsonTimespan.prototype.equals = function (other) { return this.begin.equals(other.begin) && this.end.equals(other.end); }; JsonTimespan.prototype.contains = function (time) { return time.greaterOrEqual(this.begin) && this.end.greaterOrEqual(time); }; return JsonTimespan; })(); DiagnosticsHub.JsonTimespan = JsonTimespan; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (DataWarehouse) { "use strict"; var DhContextData = (function () { function DhContextData() { } return DhContextData; })(); DataWarehouse.DhContextData = DhContextData; (function (AnalyzerConfigurationType) { AnalyzerConfigurationType._map = []; AnalyzerConfigurationType.Standard = 1; AnalyzerConfigurationType.Custom = 2; })(DataWarehouse.AnalyzerConfigurationType || (DataWarehouse.AnalyzerConfigurationType = {})); var AnalyzerConfigurationType = DataWarehouse.AnalyzerConfigurationType; (function (PrivateDataId) { PrivateDataId._map = []; PrivateDataId.JmcJavaScript = 1; PrivateDataId.SolutionExecutableCodeOutputs = 2; })(DataWarehouse.PrivateDataId || (DataWarehouse.PrivateDataId = {})); var PrivateDataId = DataWarehouse.PrivateDataId; var Constants = (function () { function Constants() { } Constants.CONTROLLER_ID_DATAWAREHOUSE = 1; Constants.CONTROLLER_ID_DATAWAREHOUSECONTEXTSERVICE = 2; Constants.CONTROLLER_ID_DATAWAREHOUSECONTEXT = 3; Constants.CONTROLLER_ID_DATAWAREHOUSEJMCSERVICE = 4; Constants.ACTION_DATAWAREHOUSE_BEGININITIALIZATION = 1; Constants.ACTION_DATAWAREHOUSE_ENDINITIALIZATION = 2; Constants.ACTION_DATAWAREHOUSE_GETDATA = 3; Constants.ACTION_DATAWAREHOUSE_GETRESULT = 4; Constants.ACTION_DATAWAREHOUSE_DISPOSERESULT = 5; Constants.ACTION_DATAWAREHOUSE_INITIALIZATION_DEPRECATED = 100; Constants.ACTION_DATAWAREHOUSE_CLOSE = 400; Constants.ACTION_DATAWAREHOUSE_GETPRIVATEDATA = 401; Constants.ACTION_DATAWAREHOUSE_SETPRIVATEDATA = 402; Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_CREATECONTEXT = 1; Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_DELETECONTEXT = 2; Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_COPYCONTEXT = 3; Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETCONTEXT = 4; Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETGLOBALCONTEXT = 5; Constants.ACTION_DATAWAREHOUSECONTEXT_GETTIMEDOMAIN = 1; Constants.ACTION_DATAWAREHOUSECONTEXT_SETTIMEDOMAIN = 2; Constants.ACTION_DATAWAREHOUSECONTEXT_GETMACHINEDOMAIN = 3; Constants.ACTION_DATAWAREHOUSECONTEXT_ADDTOMACHINEDOMAIN = 4; Constants.ACTION_DATAWAREHOUSECONTEXT_CLEARMACHINEDOMAIN = 5; Constants.ACTION_DATAWAREHOUSECONTEXT_GETPROCESSDOMAIN = 6; Constants.ACTION_DATAWAREHOUSECONTEXT_ADDTOPROCESSDOMAIN = 7; Constants.ACTION_DATAWAREHOUSECONTEXT_CLEARPROCESSDOMAIN = 8; Constants.ACTION_DATAWAREHOUSECONTEXT_GETTHREADDOMAIN = 9; Constants.ACTION_DATAWAREHOUSECONTEXT_ADDTOTHREADDOMAIN = 10; Constants.ACTION_DATAWAREHOUSECONTEXT_CLEARTHREADDOMAIN = 11; Constants.ACTION_DATAWAREHOUSECONTEXT_GETCUSTOMDOMAIN = 12; Constants.ACTION_DATAWAREHOUSECONTEXT_SETCUSTOMDOMAIN = 13; Constants.ACTION_DATAWAREHOUSECONTEXT_SETDATA = 14; Constants.ACTION_DATAWAREHOUSECONTEXT_GETDATA = 15; Constants.ACTION_DATAWAREHOUSEJMCSERVICE_GETJMCENABLED = 1; Constants.ACTION_DATAWAREHOUSEJMCSERVICE_SETJMCENABLED = 2; return Constants; })(); var DhJsonResult = (function () { function DhJsonResult(resultId, sessionId, controller) { this._resultId = resultId; this._sessionId = sessionId; this._controller = controller; } DhJsonResult.prototype.getResult = function (customData) { var that = this; var requestObject = null; if(customData !== null) { requestObject = { resultId: that._resultId, customData: JSON.stringify(customData) }; } else { requestObject = { resultId: that._resultId }; } return that._controller.request(Constants.ACTION_DATAWAREHOUSE_GETRESULT, requestObject); }; DhJsonResult.prototype.dispose = function () { var that = this; return that._controller.request(Constants.ACTION_DATAWAREHOUSE_DISPOSERESULT, { resultId: that._resultId }); }; return DhJsonResult; })(); var DataWarehouseFactory = (function () { function DataWarehouseFactory() { this._getConfigurationPromise = null; this._serviceProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DataWarehouseServiceMarshaler", { }, true); this._logger = DiagnosticsHub.getLogger(); } DataWarehouseFactory.prototype.getDataWarehouse = function (configuration) { if (typeof configuration === "undefined") { configuration = null; } if(this._getConfigurationPromise === null || configuration) { if(configuration === null) { this._getConfigurationPromise = this._serviceProxy._call("getDataWarehouseConfiguration"); } else { this._getConfigurationPromise = Plugin.Promise.wrap(configuration); } } return this._getConfigurationPromise.then(function (configuration) { this._logger.debug("Got the sessionId '" + configuration.sessionId + "'. Creating datawarehouse..."); return new DataWarehouseInstance(configuration); }.bind(this)); }; return DataWarehouseFactory; })(); var DataWarehouseInstance = (function () { function DataWarehouseInstance(dwConfiguration) { this._logger = null; this._dwConfiguration = null; this._controller = null; this._contextService = null; this._jmcService = null; this._logger = DiagnosticsHub.getLogger(); this._dwConfiguration = dwConfiguration; this._controller = new DiagnosticsHub.NativeHostController(this._dwConfiguration.sessionId, Constants.CONTROLLER_ID_DATAWAREHOUSE); } DataWarehouseInstance.prototype.getConfiguration = function () { return this._dwConfiguration; }; DataWarehouseInstance.prototype.getData = function (contextId, analyzerId) { var jsonRequest = null; if(!contextId) { jsonRequest = { analyzerId: analyzerId }; } else { jsonRequest = { contextId: contextId, analyzerId: analyzerId }; } return this.getDataFromAnalyzer(jsonRequest); }; DataWarehouseInstance.prototype.getFilteredData = function (filter, analyzerId) { return this.getDataFromAnalyzer({ filter: serializeDhContextData(null, filter), analyzerId: analyzerId }); }; DataWarehouseInstance.prototype.getContextService = function () { if(!this._contextService) { this._contextService = new DhContextService(this._dwConfiguration.sessionId); } return this._contextService; }; DataWarehouseInstance.prototype.getJmcService = function () { if(!this._jmcService) { this._jmcService = new JmcService(this._dwConfiguration.sessionId); } return this._jmcService; }; DataWarehouseInstance.prototype.close = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSE_CLOSE); }; DataWarehouseInstance.prototype.closeSynchronous = function () { if((Plugin).F12) { this._controller.requestSync(Constants.ACTION_DATAWAREHOUSE_CLOSE); } else { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1009")); } }; DataWarehouseInstance.prototype.initialize = function () { this._logger.debug("Initializing DataWarehouse..."); var jsonConfiguration = { analyzers: this._dwConfiguration.analyzers, dataSources: this._dwConfiguration.dataSources, symbolStorePath: this._dwConfiguration.symbolStorePath || "", symbolCachePath: this._dwConfiguration.symbolCachePath || "", isJmcEnabled: (typeof this._dwConfiguration.isJmcEnabled === "undefined") ? true : this._dwConfiguration.isJmcEnabled }; this._logger.debug("DataWarehouse configuration: " + JSON.stringify(jsonConfiguration)); return this._controller.request(Constants.ACTION_DATAWAREHOUSE_INITIALIZATION_DEPRECATED, jsonConfiguration); }; DataWarehouseInstance.prototype.beginInitialization = function () { this._logger.debug("Begin initializing DataWarehouse"); var jsonConfiguration = { analyzers: this._dwConfiguration.analyzers, dataSources: this._dwConfiguration.dataSources, symbolStorePath: this._dwConfiguration.symbolStorePath || "", symbolCachePath: this._dwConfiguration.symbolCachePath || "", isJmcEnabled: (typeof this._dwConfiguration.isJmcEnabled === "undefined") ? true : this._dwConfiguration.isJmcEnabled }; this._logger.debug("DataWarehouse configuration: " + JSON.stringify(jsonConfiguration)); return this._controller.request(Constants.ACTION_DATAWAREHOUSE_BEGININITIALIZATION, jsonConfiguration); }; DataWarehouseInstance.prototype.endInitialization = function () { this._logger.debug("End initializing DataWarehouse"); return this._controller.request(Constants.ACTION_DATAWAREHOUSE_ENDINITIALIZATION); }; DataWarehouseInstance.prototype.getPrivateData = function (dataId, privateDataArg) { this._logger.debug("Getting private data from DataWarehouse..."); var privateDataRequest = { id: dataId, dataArg: privateDataArg }; return this._controller.request(Constants.ACTION_DATAWAREHOUSE_GETPRIVATEDATA, privateDataRequest); }; DataWarehouseInstance.prototype.setPrivateData = function (dataId, privateData) { this._logger.debug("Setting private data in DataWarehouse..."); var privateDataRequest = { id: dataId, data: privateData }; return this._controller.request(Constants.ACTION_DATAWAREHOUSE_SETPRIVATEDATA, privateDataRequest); }; DataWarehouseInstance.prototype.getDataFromAnalyzer = function (jsonRequest) { var _this = this; var completePromise; var errorPromise; var progressPromise; var promiseInitialization = function (completed, error, progress) { completePromise = completed; errorPromise = error; progressPromise = progress; }; var requestPromise = this._controller.request(Constants.ACTION_DATAWAREHOUSE_GETDATA, jsonRequest).then(function (result) { if(completePromise) { var val = null; if(result !== null && typeof result !== "undefined" && typeof result.dh_r_id === "string" && result.dh_r_id.length === 36) { val = new DhJsonResult(result.dh_r_id, _this._dwConfiguration.sessionId, _this._controller); } else { val = result; } completePromise(val); } }.bind(this), function (error) { if(errorPromise) { errorPromise(error); } }.bind(this), function (progress) { if(progress) { progressPromise(progress); } }.bind(this)); var oncancel = function () { requestPromise.cancel(); }; return new Plugin.Promise(promiseInitialization, oncancel); }; return DataWarehouseInstance; })(); function serializeDhContextData(contextId, data) { var result = { }; if(contextId) { result["contextId"] = contextId; } if(data.timeDomain) { result["timeDomain"] = { begin: data.timeDomain.begin.jsonValue, end: data.timeDomain.end.jsonValue }; } if(data.machineDomain) { result["machineDomain"] = data.machineDomain; } if(data.processDomain) { result["processDomain"] = data.processDomain; } if(data.threadDomain) { result["threadDomain"] = data.threadDomain; } if(data.customDomain) { result["customDomain"] = data.customDomain; } return result; } var DhContextService = (function () { function DhContextService(sessionId) { this._controller = new DiagnosticsHub.NativeHostController(sessionId, Constants.CONTROLLER_ID_DATAWAREHOUSECONTEXTSERVICE); this._sessionId = sessionId; } DhContextService.prototype.createContext = function (data) { var that = this; var request = { }; if(data !== null && typeof data !== "undefined") { request["data"] = serializeDhContextData(null, data); } return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_CREATECONTEXT, request).then(function (contextInfo) { return new DhContext(contextInfo, that._sessionId); }); }; DhContextService.prototype.deleteContext = function (contextId) { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_DELETECONTEXT, { contextId: contextId }); }; DhContextService.prototype.copyContext = function (contextId) { var that = this; return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_COPYCONTEXT, { contextId: contextId }).then(function (contextInfo) { return new DhContext(contextInfo, that._sessionId); }); }; DhContextService.prototype.getContext = function (contextId) { var that = this; return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETCONTEXT, { contextId: contextId }).then(function (contextInfo) { return new DhContext(contextInfo, that._sessionId); }); }; DhContextService.prototype.getGlobalContext = function () { var that = this; return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXTSERVICE_GETGLOBALCONTEXT).then(function (contextInfo) { return new DhContext(contextInfo, that._sessionId); }); }; return DhContextService; })(); var DhContext = (function () { function DhContext(contextInfo, sessionId) { this._info = contextInfo; this._sessionId = sessionId; this._controller = new DiagnosticsHub.NativeHostController(this._sessionId, Constants.CONTROLLER_ID_DATAWAREHOUSECONTEXT); } DhContext.prototype.getContextId = function () { return this._info.contextId; }; DhContext.prototype.getParentContextId = function () { return this._info.parentContextId; }; DhContext.prototype.setData = function (data) { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_SETDATA, serializeDhContextData(this._info.contextId, data)); }; DhContext.prototype.getData = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_GETDATA, { contextId: this._info.contextId }).then(function (result) { return { timeDomain: new DiagnosticsHub.JsonTimespan(new DiagnosticsHub.BigNumber(result.timeDomain.begin.h, result.timeDomain.begin.l), new DiagnosticsHub.BigNumber(result.timeDomain.end.h, result.timeDomain.end.l)), machineDomain: result.machineDomain, processDomain: result.processDomain, threadDomain: result.threadDomain, customDomain: result.customDomain }; }); }; DhContext.prototype.getTimeDomain = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_GETTIMEDOMAIN, { contextId: this._info.contextId }).then(function (result) { return new DiagnosticsHub.JsonTimespan(new DiagnosticsHub.BigNumber(result.begin.h, result.begin.l), new DiagnosticsHub.BigNumber(result.end.h, result.end.l)); }); }; DhContext.prototype.setTimeDomain = function (timeDomain) { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_SETTIMEDOMAIN, { contextId: this._info.contextId, timeDomain: { begin: timeDomain.begin.jsonValue, end: timeDomain.end.jsonValue } }); }; DhContext.prototype.getMachineDomain = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_GETMACHINEDOMAIN, { contextId: this._info.contextId }); }; DhContext.prototype.addToMachineDomain = function (machineName) { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_ADDTOMACHINEDOMAIN, { contextId: this._info.contextId, machineName: machineName }); }; DhContext.prototype.clearMachineDomain = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_CLEARMACHINEDOMAIN, { contextId: this._info.contextId }); }; DhContext.prototype.getProcessDomain = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_GETPROCESSDOMAIN, { contextId: this._info.contextId }); }; DhContext.prototype.addToProcessDomain = function (processId) { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_ADDTOPROCESSDOMAIN, { contextId: this._info.contextId, processId: processId }); }; DhContext.prototype.clearProcessDomain = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_CLEARPROCESSDOMAIN, { contextId: this._info.contextId }); }; DhContext.prototype.getThreadDomain = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_GETTHREADDOMAIN, { contextId: this._info.contextId }); }; DhContext.prototype.addToThreadDomain = function (threadId) { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_ADDTOTHREADDOMAIN, { contextId: this._info.contextId, threadId: threadId }); }; DhContext.prototype.clearThreadDomain = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_CLEARTHREADDOMAIN, { contextId: this._info.contextId }); }; DhContext.prototype.getCustomDomain = function (name) { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_GETCUSTOMDOMAIN, { contextId: this._info.contextId, name: name }).then(function (result) { return result.value; }); }; DhContext.prototype.setCustomDomain = function (name, value) { return this._controller.request(Constants.ACTION_DATAWAREHOUSECONTEXT_SETCUSTOMDOMAIN, { contextId: this._info.contextId, name: name, value: value }); }; return DhContext; })(); var JmcService = (function () { function JmcService(sessionId) { this._controller = new DiagnosticsHub.NativeHostController(sessionId, Constants.CONTROLLER_ID_DATAWAREHOUSEJMCSERVICE); this._logger = DiagnosticsHub.getLogger(); this._viewEventManager = Microsoft.VisualStudio.DiagnosticsHub.getViewEventManager(); } JmcService.prototype.getJmcEnabledState = function () { return this._controller.request(Constants.ACTION_DATAWAREHOUSEJMCSERVICE_GETJMCENABLED).then(this.processGetJmcEnabledStateResult.bind(this)); }; JmcService.prototype.setJmcEnabledState = function (enabledState) { return this._controller.request(Constants.ACTION_DATAWAREHOUSEJMCSERVICE_SETJMCENABLED, { jmcOn: enabledState }).then(this.processSetJmcEnabledStateResult.bind(this)); }; JmcService.prototype.processGetJmcEnabledStateResult = function (result) { if(typeof result.jmcOn === "undefined") { this._logger.error("getJmcEnabledState() result is ill-formed"); throw new Error(Plugin.Resources.getErrorString("JSProfiler.9999")); } return result.jmcOn; }; JmcService.prototype.processSetJmcEnabledStateResult = function (result) { if(typeof result.prevEnabledState === "undefined" || typeof result.currEnabledState === "undefined") { this._logger.error("setJmcEnabledState() result is ill-formed"); throw new Error(Plugin.Resources.getErrorString("JSProfiler.9999")); } if(result.prevEnabledState !== result.currEnabledState) { this._viewEventManager.jmcEnabledStateChanged.raiseEvent(result); } }; return JmcService; })(); var _dwFactory = null; function loadDataWarehouse(configuration) { if (typeof configuration === "undefined") { configuration = null; } if(_dwFactory === null) { _dwFactory = new DataWarehouseFactory(); } return _dwFactory.getDataWarehouse(configuration); } DataWarehouse.loadDataWarehouse = loadDataWarehouse; })(DiagnosticsHub.DataWarehouse || (DiagnosticsHub.DataWarehouse = {})); var DataWarehouse = DiagnosticsHub.DataWarehouse; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (Controllers) { "use strict"; var F12_JMCType; (function (F12_JMCType) { F12_JMCType._map = []; F12_JMCType._map[0] = "UserCode"; F12_JMCType.UserCode = 0; F12_JMCType._map[1] = "Library"; F12_JMCType.Library = 1; F12_JMCType._map[2] = "Unrelated"; F12_JMCType.Unrelated = 2; F12_JMCType._map[3] = "Unsure"; F12_JMCType.Unsure = 3; })(F12_JMCType || (F12_JMCType = {})); var JavaScriptJmc = (function () { function JavaScriptJmc() { this._serviceProxy = getVisualStudioService(); } JavaScriptJmc.prototype.getJmcTypeForUrls = function (urls) { if((Plugin).F12) { return (Plugin).F12.JMC.getJMCTypeForUrls(urls).then(function (jmcTypes) { if(!jmcTypes) { return []; } for(var i = 0; i < jmcTypes.length; ++i) { switch(jmcTypes[i]) { case F12_JMCType.UserCode: jmcTypes[i] = 0; break; case F12_JMCType.Library: jmcTypes[i] = 1; break; case F12_JMCType.Unrelated: jmcTypes[i] = 2; break; case F12_JMCType.Unsure: default: jmcTypes[i] = -1; } } return jmcTypes; }); } else { return this._serviceProxy._call("getJMCTypeForUrls", urls); } }; return JavaScriptJmc; })(); Controllers.JavaScriptJmc = JavaScriptJmc; var SolutionService = (function () { function SolutionService() { this._serviceProxy = getVisualStudioService(); } SolutionService.prototype.getAllExecutableCodeOutputs = function () { return this._serviceProxy._call("getSolutionExecutableCodeOutputs"); }; return SolutionService; })(); Controllers.SolutionService = SolutionService; var SourceService = (function () { function SourceService() { this._serviceProxy = getVisualStudioService(); } SourceService.prototype.showDocument = function (filename, linenumber) { return this._serviceProxy._call("showDocument", filename, linenumber); }; return SourceService; })(); Controllers.SourceService = SourceService; var _visualStudioServiceProxy = null; function getVisualStudioService() { if(_visualStudioServiceProxy === null) { _visualStudioServiceProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.VisualStudioServiceMarshaler", { }, true); } return _visualStudioServiceProxy; } })(DiagnosticsHub.Controllers || (DiagnosticsHub.Controllers = {})); var Controllers = DiagnosticsHub.Controllers; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; (function (AlternateFormat) { AlternateFormat._map = []; AlternateFormat.Vspx = 1; })(DiagnosticsHub.AlternateFormat || (DiagnosticsHub.AlternateFormat = {})); var AlternateFormat = DiagnosticsHub.AlternateFormat; var DocumentClosingEventDeferral = (function () { function DocumentClosingEventDeferral(onHandlerCompleted) { this._onHandlerCompleted = onHandlerCompleted; } DocumentClosingEventDeferral.prototype.complete = function (result) { this._onHandlerCompleted(result); }; return DocumentClosingEventDeferral; })(); DiagnosticsHub.DocumentClosingEventDeferral = DocumentClosingEventDeferral; var DocumentClosingEventArgs = (function () { function DocumentClosingEventArgs(onHandlerCompleted) { this._waitHandler = false; this._onHandlerCompleted = onHandlerCompleted; this._eventDeferral = null; } Object.defineProperty(DocumentClosingEventArgs.prototype, "waitHandler", { get: function () { return this._eventDeferral !== null; }, enumerable: true, configurable: true }); DocumentClosingEventArgs.prototype.getDeferral = function () { if(this._eventDeferral === null) { this._eventDeferral = new DocumentClosingEventDeferral(this._onHandlerCompleted); } return this._eventDeferral; }; return DocumentClosingEventArgs; })(); DiagnosticsHub.DocumentClosingEventArgs = DocumentClosingEventArgs; var Document = (function () { function Document() { this._onCloseHandlers = []; this._documentProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.DocumentPortMarshaler", { }, true); this._logger = DiagnosticsHub.getLogger(); this._documentProxy._call("connected").then(function () { this._logger.debug("JavaScript Document object connected to host. Ready to get onClosingEvent."); }.bind(this), function (error) { this._logger.error("Cannot connect DocumentPortMarshaler, error name: '" + error.name + "', error message: '" + error.message + "'"); }.bind(this)).then(function () { this._documentProxy.addEventListener("onClosing", function (eventArgs) { this.onClosingHandler(); }.bind(this)); }.bind(this)); } Document.prototype.getTools = function () { return this._documentProxy._call("getTools"); }; Document.prototype.openInAlternateFormat = function (format) { if(format === AlternateFormat.Vspx) { this._logger.debug("Opening current document as a Vspx"); return this._documentProxy._call("openAsVspx"); } throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); }; Document.prototype.addOnClosingHandler = function (handler) { this._onCloseHandlers.push(handler); this._logger.debug("New on closing handler was added."); }; Document.prototype.onClosingHandler = function () { this._logger.debug("Invoking JavaScript handlers for document on closing event."); var finalResult = true; var handlersCount = 0; var onCompleted = function (handlerResult) { finalResult = finalResult && handlerResult; handlersCount--; if(handlersCount <= 0) { this._documentProxy._call("onClosingCompleted", finalResult); } else { this._logger.debug("Still waiting when all on closing handlers will complete their work. Handlers count: " + handlersCount); } }.bind(this); for(var propertyName in this._onCloseHandlers) { if(this._onCloseHandlers.hasOwnProperty(propertyName)) { var handler = this._onCloseHandlers[propertyName]; if(typeof handler === "function") { try { var jsEventArgs = new DocumentClosingEventArgs(onCompleted); handler(jsEventArgs); if(jsEventArgs.waitHandler) { handlersCount++; this._logger.debug("JavaScipt handlers for on closing asked to wait while they will finish. Handlers count: " + handlersCount); } } catch (e) { this._logger.error(e.toString()); } } else { this._logger.warning("One of the listeners not a 'function', it has type " + (typeof handler)); } } } if(handlersCount === 0) { onCompleted(finalResult); } }; return Document; })(); var _currentDocument = null; function getCurrentDocument() { if(_currentDocument === null) { _currentDocument = new Document(); } return _currentDocument; } DiagnosticsHub.getCurrentDocument = getCurrentDocument; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { (function (Sqm) { "use strict"; var CpuUsage = (function () { function CpuUsage() { this._isSetCreateDetailedReport = false; this._isSetSearchIsUsed = false; this._isSetSearchOptionsChanged = false; this._serviceProxy = getSqmService(); } CpuUsage.prototype.filterViewOpen = function () { this._serviceProxy._call("cpuUsageCountFilterViewOpen"); }; CpuUsage.prototype.createDetailedReport = function () { if(!this._isSetCreateDetailedReport) { this._isSetCreateDetailedReport = true; this._serviceProxy._call("cpuUsageSetCreateDetailedReport"); } }; CpuUsage.prototype.searchIsUsed = function () { if(!this._isSetSearchIsUsed) { this._isSetSearchIsUsed = true; this._serviceProxy._call("cpuUsageSetSearchIsUsed"); } }; CpuUsage.prototype.searchOptionsChanged = function () { if(!this._isSetSearchOptionsChanged) { this._isSetSearchOptionsChanged = true; this._serviceProxy._call("cpuUsageSetSearchOptionsChanged"); } }; CpuUsage.prototype.jmcToggle = function (state) { this._serviceProxy._call("countJmcToggle", state); }; return CpuUsage; })(); Sqm.CpuUsage = CpuUsage; (function (SelectionChangeSource) { SelectionChangeSource._map = []; SelectionChangeSource.SwimLane = 0; SelectionChangeSource.DoubleSlider = 1; SelectionChangeSource.DoubleSliderHandles = 2; })(Sqm.SelectionChangeSource || (Sqm.SelectionChangeSource = {})); var SelectionChangeSource = Sqm.SelectionChangeSource; var Ruler = (function () { function Ruler() { this._serviceProxy = getSqmService(); } Ruler.prototype.zoomIn = function () { this._serviceProxy._call("rulerCountZoomIn"); }; Ruler.prototype.resetZoom = function () { this._serviceProxy._call("rulerCountResetZoom"); }; Ruler.prototype.clearSelection = function () { this._serviceProxy._call("rulerCountClearSelection"); }; Ruler.prototype.selectionChanged = function (source, isMinSize) { this._serviceProxy._call("rulerCountSelectionChanged", source, isMinSize); }; return Ruler; })(); Sqm.Ruler = Ruler; var CollectedData = (function () { function CollectedData() { this._serviceProxy = getSqmService(); } CollectedData.prototype.lostEvents = function (counter) { this._serviceProxy._call("countLostEvents", counter); }; return CollectedData; })(); Sqm.CollectedData = CollectedData; var _sqmServiceProxy = null; function getSqmService() { if(_sqmServiceProxy === null) { _sqmServiceProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SqmServiceMarshaler", { }, true); } return _sqmServiceProxy; } })(DiagnosticsHub.Sqm || (DiagnosticsHub.Sqm = {})); var Sqm = DiagnosticsHub.Sqm; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var TimeStamp = (function () { function TimeStamp(nsec) { if (typeof nsec === "undefined") { nsec = 0; } this._nsec = nsec; } TimeStamp.NanosecInMillisec = 1000 * 1000; TimeStamp.NanosecInSec = 1000 * 1000 * 1000; Object.defineProperty(TimeStamp.prototype, "nsec", { get: function () { return this._nsec; }, enumerable: true, configurable: true }); Object.defineProperty(TimeStamp.prototype, "msec", { get: function () { return this._nsec / TimeStamp.NanosecInMillisec; }, enumerable: true, configurable: true }); Object.defineProperty(TimeStamp.prototype, "sec", { get: function () { return this._nsec / TimeStamp.NanosecInSec; }, enumerable: true, configurable: true }); TimeStamp.fromNanoseconds = function fromNanoseconds(nsec) { return new TimeStamp(nsec); }; TimeStamp.fromMilliseconds = function fromMilliseconds(msec) { return new TimeStamp(msec * TimeStamp.NanosecInMillisec); }; TimeStamp.fromSeconds = function fromSeconds(sec) { return new TimeStamp(sec * TimeStamp.NanosecInSec); }; TimeStamp.prototype.equals = function (other) { return this._nsec === other.nsec; }; return TimeStamp; })(); DiagnosticsHub.TimeStamp = TimeStamp; var TimeSpan = (function () { function TimeSpan(begin, end) { if (typeof begin === "undefined") { begin = new TimeStamp(); } if (typeof end === "undefined") { end = new TimeStamp(); } this._begin = begin; this._end = end; if(this._begin.nsec > this._end.nsec) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1000")); } } Object.defineProperty(TimeSpan.prototype, "begin", { get: function () { return this._begin; }, enumerable: true, configurable: true }); Object.defineProperty(TimeSpan.prototype, "end", { get: function () { return this._end; }, enumerable: true, configurable: true }); Object.defineProperty(TimeSpan.prototype, "elapsed", { get: function () { return new TimeStamp(this._end.nsec - this.begin.nsec); }, enumerable: true, configurable: true }); TimeSpan.prototype.equals = function (other) { return this.begin.equals(other.begin) && this.end.equals(other.end); }; return TimeSpan; })(); DiagnosticsHub.TimeSpan = TimeSpan; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var SelectionTimeRangeChangedEvent = (function () { function SelectionTimeRangeChangedEvent() { this._publisher = new DiagnosticsHub.Publisher([ SelectionTimeRangeChangedEvent.EventName ]); this._eventAggregator = Microsoft.VisualStudio.DiagnosticsHub.getEventAggregator(); this._eventAggregator.addEventListener(SelectionTimeRangeChangedEvent.EventGlobalName, this.forwardSelectionTimeRangeEvent.bind(this)); this._timeRangeMarshaler = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.DiagnosticsHub.VisualStudio.Presentation.JavaScriptModels.SwimlaneDataServiceMarshaler", { }, true); if(!this._timeRangeMarshaler) { throw new Error(Plugin.Resources.getErrorString("JSProfiler.1007")); } } SelectionTimeRangeChangedEvent.EventGlobalName = "DiagnosticsHub.EventAggregator.SelectionTimeRangeChanged"; SelectionTimeRangeChangedEvent.EventName = "DiagnosticsHub.SelectionTimeRangeChanged"; SelectionTimeRangeChangedEvent.prototype.addEventListener = function (listener) { this._publisher.addEventListener(SelectionTimeRangeChangedEvent.EventName, listener); }; SelectionTimeRangeChangedEvent.prototype.removeEventListener = function (listener) { this._publisher.removeEventListener(SelectionTimeRangeChangedEvent.EventName, listener); }; SelectionTimeRangeChangedEvent.prototype.raiseEvent = function (eventArgs) { this.setTimeRange(eventArgs.position); var dto = { isIntermittent: eventArgs.isIntermittent, invoker: eventArgs.invoker, beginH: eventArgs.position.begin.jsonValue.h, beginL: eventArgs.position.begin.jsonValue.l, endH: eventArgs.position.end.jsonValue.h, endL: eventArgs.position.end.jsonValue.l }; this._eventAggregator.raiseEvent(SelectionTimeRangeChangedEvent.EventGlobalName, dto); }; SelectionTimeRangeChangedEvent.prototype.getTimeRange = function (func) { var currentTimeRange; this._timeRangeMarshaler._call("getCurrentTimeRange").done(function (time) { if(time && time.begin && time.end) { currentTimeRange = new DiagnosticsHub.JsonTimespan(new DiagnosticsHub.BigNumber(time.begin._value.h, time.begin._value.l), new DiagnosticsHub.BigNumber(time.end._value.h, time.end._value.l)); if(func) { func(currentTimeRange); } } }); }; SelectionTimeRangeChangedEvent.prototype.setTimeRange = function (time) { this._timeRangeMarshaler._call("setCurrentTimeRange", time); }; SelectionTimeRangeChangedEvent.prototype.forwardSelectionTimeRangeEvent = function (dto) { var selectionTimeRange = new DiagnosticsHub.JsonTimespan(new DiagnosticsHub.BigNumber(dto.beginH, dto.beginL), new DiagnosticsHub.BigNumber(dto.endH, dto.endL)); var args = { position: selectionTimeRange, isIntermittent: dto.isIntermittent, invoker: dto.invoker }; this._publisher.invokeListener(SelectionTimeRangeChangedEvent.EventName, args); }; return SelectionTimeRangeChangedEvent; })(); var JmcEnabledStateChangedEvent = (function () { function JmcEnabledStateChangedEvent() { this._publisher = new DiagnosticsHub.Publisher([ JmcEnabledStateChangedEvent.EventName ]); this._eventAggregator = Microsoft.VisualStudio.DiagnosticsHub.getEventAggregator(); this._eventAggregator.addEventListener(JmcEnabledStateChangedEvent.EventGlobalName, this.forwardJmcEnabledStateChangedEvent.bind(this)); } JmcEnabledStateChangedEvent.EventGlobalName = "DiagnosticsHub.EventAggregator.JmcEnabledStateChanged"; JmcEnabledStateChangedEvent.EventName = "DiagnosticsHub.JmcEnabledStateChanged"; JmcEnabledStateChangedEvent.prototype.addEventListener = function (listener) { this._publisher.addEventListener(JmcEnabledStateChangedEvent.EventName, listener); }; JmcEnabledStateChangedEvent.prototype.removeEventListener = function (listener) { this._publisher.removeEventListener(JmcEnabledStateChangedEvent.EventName, listener); }; JmcEnabledStateChangedEvent.prototype.raiseEvent = function (args) { this._eventAggregator.raiseEvent(JmcEnabledStateChangedEvent.EventGlobalName, args); }; JmcEnabledStateChangedEvent.prototype.forwardJmcEnabledStateChangedEvent = function (args) { this._publisher.invokeListener(JmcEnabledStateChangedEvent.EventName, args); }; return JmcEnabledStateChangedEvent; })(); var DetailsViewSelectionChangedEvent = (function () { function DetailsViewSelectionChangedEvent() { this._publisher = new DiagnosticsHub.Publisher([ DetailsViewSelectionChangedEvent.EventName ]); this._eventAggregator = Microsoft.VisualStudio.DiagnosticsHub.getEventAggregator(); this._eventAggregator.addEventListener(DetailsViewSelectionChangedEvent.EventGlobalName, this.forwardDetailsViewSelectionChangedEvent.bind(this)); } DetailsViewSelectionChangedEvent.EventGlobalName = "DiagnosticsHub.EventAggregator.DetailsViewSelectionChangedEvent"; DetailsViewSelectionChangedEvent.EventName = "DiagnosticsHub.DetailsViewSelectionChangedEvent"; DetailsViewSelectionChangedEvent.prototype.addEventListener = function (listener) { this._publisher.addEventListener(DetailsViewSelectionChangedEvent.EventName, listener); }; DetailsViewSelectionChangedEvent.prototype.removeEventListener = function (listener) { this._publisher.removeEventListener(DetailsViewSelectionChangedEvent.EventName, listener); }; DetailsViewSelectionChangedEvent.prototype.raiseEvent = function (args) { this._eventAggregator.raiseEvent(DetailsViewSelectionChangedEvent.EventGlobalName, args); }; DetailsViewSelectionChangedEvent.prototype.forwardDetailsViewSelectionChangedEvent = function (args) { this._publisher.invokeListener(DetailsViewSelectionChangedEvent.EventName, args); }; return DetailsViewSelectionChangedEvent; })(); var DetailsViewReadyEvent = (function () { function DetailsViewReadyEvent() { this._publisher = new DiagnosticsHub.Publisher([ DetailsViewReadyEvent.EventName ]); this._eventAggregator = Microsoft.VisualStudio.DiagnosticsHub.getEventAggregator(); this._eventAggregator.addEventListener(DetailsViewReadyEvent.EventGlobalName, this.forwardDetailsViewSelectionChangedEvent.bind(this)); } DetailsViewReadyEvent.EventGlobalName = "DiagnosticsHub.EventAggregator.DetailsViewReadyEvent"; DetailsViewReadyEvent.EventName = "DiagnosticsHub.DetailsViewReadyEvent"; DetailsViewReadyEvent.prototype.addEventListener = function (listener) { this._publisher.addEventListener(DetailsViewReadyEvent.EventName, listener); }; DetailsViewReadyEvent.prototype.removeEventListener = function (listener) { this._publisher.removeEventListener(DetailsViewReadyEvent.EventName, listener); }; DetailsViewReadyEvent.prototype.raiseEvent = function (args) { this._eventAggregator.raiseEvent(DetailsViewReadyEvent.EventGlobalName, args); }; DetailsViewReadyEvent.prototype.forwardDetailsViewSelectionChangedEvent = function (args) { this._publisher.invokeListener(DetailsViewReadyEvent.EventName, args); }; return DetailsViewReadyEvent; })(); var ViewEventManager = (function () { function ViewEventManager() { this._selectionChanged = new SelectionTimeRangeChangedEvent(); this._jmcEnabledStateChanged = new JmcEnabledStateChangedEvent(); this._detailsViewSelectionChangedEvent = new DetailsViewSelectionChangedEvent(); this._detailsViewReady = new DetailsViewReadyEvent(); } Object.defineProperty(ViewEventManager.prototype, "selectionChanged", { get: function () { return this._selectionChanged; }, enumerable: true, configurable: true }); Object.defineProperty(ViewEventManager.prototype, "jmcEnabledStateChanged", { get: function () { return this._jmcEnabledStateChanged; }, enumerable: true, configurable: true }); Object.defineProperty(ViewEventManager.prototype, "detailsViewSelectionChanged", { get: function () { return this._detailsViewSelectionChangedEvent; }, enumerable: true, configurable: true }); Object.defineProperty(ViewEventManager.prototype, "detailsViewReady", { get: function () { return this._detailsViewReady; }, enumerable: true, configurable: true }); return ViewEventManager; })(); var _viewEventManager = null; function getViewEventManager() { if(_viewEventManager === null) { _viewEventManager = new ViewEventManager(); } return _viewEventManager; } DiagnosticsHub.getViewEventManager = getViewEventManager; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var ErrorCodes = (function () { function ErrorCodes() { } ErrorCodes.VSHUB_E_INVALID_REGEX = 0xE111E001; return ErrorCodes; })(); DiagnosticsHub.ErrorCodes = ErrorCodes; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); var Microsoft; (function (Microsoft) { (function (VisualStudio) { (function (DiagnosticsHub) { "use strict"; var Automation = (function () { function Automation(logger) { this._postFilters = { }; this._preFilters = { }; this._alertFilters = { }; this._confirmationFilters = { }; this._logger = logger; } Automation.prototype.getAutomationPromise = function (key, promiseFunc, oncancel, args) { var postFilter = this._postFilters[key]; var preFilter = this._preFilters[key]; this._logger.debug("getting automation promise for key '" + key + "'"); var currentPromise = null; if(preFilter) { currentPromise = this.getPreFilterPromise(preFilter, args); if(postFilter) { currentPromise = currentPromise.then(function () { return this.getPostFilterPromise(postFilter, promiseFunc, oncancel, args); }.bind(this), function (error) { this._logger.debug("Error '" + JSON.stringify(error) + "' while executing prefiler'"); }.bind(this)); } else { currentPromise = currentPromise.then(function () { return new Plugin.Promise(function (comp, err, prog) { promiseFunc(comp, err, prog, args); }, oncancel); }, function (error) { this._logger.debug("Error '" + JSON.stringify(error) + "' while executing prefiler'"); }.bind(this)); } } else { if(postFilter) { this._logger.debug("only injecting postFilter"); currentPromise = this.getPostFilterPromise(postFilter, promiseFunc, oncancel, args); } else { this._logger.debug("not injecting any filters"); currentPromise = new Plugin.Promise(function (comp, err, prog) { promiseFunc(comp, err, prog, args); }.bind(this), oncancel); } } return currentPromise; }; Automation.prototype.getAlertPromise = function (key, message) { var alertFilter = this._alertFilters[key]; if(!alertFilter) { return new Plugin.Promise(function (comp, err, prog) { window.alert(message); comp(true); }); } else { return alertFilter.bypass(message); } }; Automation.prototype.getConfirmationPromise = function (key, message) { var confirmationFilter = this._confirmationFilters[key]; if(!confirmationFilter) { return new Plugin.Promise(function (comp, err, prog) { comp(window.confirm(message)); }); } else { return confirmationFilter.bypass(message); } }; Automation.prototype.addAutomationPostFilter = function (key, filter) { this.addAutomationFilter(this._postFilters, key, "IAutomationPostFilter", filter); }; Automation.prototype.removeAutomationPostFilter = function (key) { this.removeAutomationFilter(this._postFilters, key, "IAutomationPostFilter"); }; Automation.prototype.addAutomationPreFilter = function (key, filter) { this.addAutomationFilter(this._preFilters, key, "IAutomationPreFilter", filter); }; Automation.prototype.removeAutomationPreFilter = function (key) { this.removeAutomationFilter(this._preFilters, key, "IAutomationPreFilter"); }; Automation.prototype.addAutomationAlertBypassFilter = function (key, filter) { this.addAutomationFilter(this._alertFilters, key, "IAutomationAlertBypassFilter", filter); }; Automation.prototype.removeIAutomationAlertBypassFilter = function (key) { this.removeAutomationFilter(this._alertFilters, key, "IAutomationAlertBypassFilter"); }; Automation.prototype.addAutomationConfirmationBypassFilter = function (key, filter) { this.addAutomationFilter(this._confirmationFilters, key, "IAutomationConfirmationBypassFilter", filter); }; Automation.prototype.removeAutomationConfirmationBypassFilter = function (key) { this.removeAutomationFilter(this._confirmationFilters, key, "IAutomationConfirmationBypassFilter"); }; Automation.prototype.getPreFilterPromise = function (preFilter, args) { if(preFilter) { return preFilter.onFilter(args); } throw "preFilter is null or undefined"; }; Automation.prototype.removeAutomationFilter = function (filterStore, key, automationFilterType) { if(!key) { throw new Error("key is null, undefined or evaluates to false"); } if(!filterStore) { throw new Error("key is null, undefined or evaluates to false"); } if(!automationFilterType) { throw new Error("automationFilterType is null, undefined or evaluates to false"); } delete filterStore[key]; this._logger.debug(automationFilterType + " with key '" + key + "' has been removed"); }; Automation.prototype.addAutomationFilter = function (filterStore, key, automationFilterType, filter) { if(!filterStore) { throw new Error("filterStore is null or undefined"); } if(!filter) { throw new Error("filter is null or undefined"); } if(!key) { throw new Error("key is null, undefined or evaluates to false"); } if(!automationFilterType) { throw new Error("automationFilterType is null, undefined or evaluates to false"); } if(filterStore[key]) { this._logger.debug("Replacing existing " + automationFilterType + " with key '" + key + "'"); } filterStore[key] = filter; this._logger.debug(automationFilterType + " with key '" + key + "' has been added"); }; Automation.prototype.getPostFilterPromise = function (filter, promiseFunc, oncancel, args) { var that = this; return new Plugin.Promise(function (complete, err, prog) { var filterComplete = function (value) { that._logger.debug("filterComplete called"); return filter.onComplete(value, args).then(function () { complete(value); }, function () { that._logger.error("error occured during exection of postfilter onComplete handler"); }); }; var filterError = function (value) { return filter.onError(value, args).then(function () { err(value); }, function () { that._logger.error("error occured during exection of postfilter onError handler"); }); }; var filterProgress = function (value) { return filter.onProgress(value, args).then(function () { prog(value); }, function () { that._logger.error("error occured during exection of postfilter onProgess handler"); }); }; promiseFunc(filterComplete, filterError, filterProgress, args); }, oncancel); }; return Automation; })(); var automationManager = null; function getAutomationManager(logger) { if(automationManager === null) { automationManager = new Automation(logger); } return automationManager; } DiagnosticsHub.getAutomationManager = getAutomationManager; })(VisualStudio.DiagnosticsHub || (VisualStudio.DiagnosticsHub = {})); var DiagnosticsHub = VisualStudio.DiagnosticsHub; })(Microsoft.VisualStudio || (Microsoft.VisualStudio = {})); var VisualStudio = Microsoft.VisualStudio; })(Microsoft || (Microsoft = {})); PNG  IHDRw= pHYs+ cHRMz%u0`:o_FOIDATxڴ1@EQ@3bcr#cOb\``MTcS6Jсa(;>MόWU u.KOzcU$IPfn>^n"2ПeC;/T4!a"w_V0'I^D.U=~\&"W 0Ͳ<ϟvALMqkm5I㱮 }DQdoMQ>mzRE߷}G֢&C=]u|HM.<ߋȭWn…]]пظBo:*:] 7ɪmq%lL]zoSXx~/+IENDB`PNG  IHDRVΎW pHYs+IDATx^ @ Qۍ@ ' .P%Љ%}#4=$=\yW!%"~Ed aDsAa0 d0 d0 C;>yp*9 ޗOt+ `5@VAXa/bA_OYIENDB`PNG  IHDRVΎW pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxڤ ῎ A'r=8 E *PH/ J-U/U9j}!tn݆h腠a1D$ NL&L &j'"hN v붿?@H("!huaN1/Bքc?wTIENDB`PNG  IHDR$l  pHYs+IDATx^OHT]6LhSPD+[ J6 3Zr! 5-0%T"LEmjR &0Jܸx3q3p^~0 V\n2j&>PB,Go.d$rD_}C$c@&Mvd@j@&A%jL/c"{Up (SA3Ƹ岼$IrmdZ@Ϊ#vC&0uig>VwHyKz:gt%:S}ZQ3X@s k?[OCI'c^ ĝqCdʌzf,fS)tb׽COrܶY;PE@*@- ڞ4? dsGu}Pc#7rΆ g-%j| 얾GLL?aϖǕ^kW ~yޡ%rBXK?{8ò` 唟#$w<*Y- Iϟ2 ǶLeyzC> EҸ"SHr"#.4. -u8[/X +G~(dkgc$8F;1ƎL wcT_31zmyr/_Zsl;Fh͹}1rg;#Ќ?Ljl*L;cWq,͌$G^ kJ[SHBlIّ^k PbO~1r'Z#-G1ҒHK9F"96m"iIc%141r[uZc 51cd8FX 15J3#PbgH;z#);F`di՛cF/H9FXcREc;#ջF41TYi<Tc$9Fgw+`sH,91rD1|;F.";i9B8FZ21ȱisHK#-q'no=,fIENDB`PNG  IHDR$l  pHYs+7IDATx^i0\$$11w3$d u= O?2С\W y%a_O1;UݼdLjP@r2TۧdSYodZ2@Č|\~~ۗSNJvP@bX`It'"!fr _ @ajA_dA_h.\,S/⳾f<:P[1&kbd @^R@~rz&IENDB`PNG  IHDR$jgAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEVnV+d-n=$aR!9wSC0l%jJ;K5#ʫ|$*9 hVVnꮝ%xM@F7{;m >IENDB`PNG  IHDR$jgAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV) h/re2EaLjuzެb@d_@h.}Y@GQzoӃj_<ErhTC rVpxREvnyɅn4IV2AVvWVxP 4 t^V:v+x 1[AhIX&d2C3_7us:[_bK?PyWb |}\]@Q 2RsL7 _,t9)_4U{?`Ͳ"\u4db ,ҭ 4AZAX(5d+  Ы B1 DkI ǟL&< .{Xn~sv :v0P49#Ө_!F:Eo~H ł,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxڬ0 @WN  pNPN/汗|/Ѷ-)"#Qm' 8EBcߣ-fKc+,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEVR;www0e'777(1X_ӭ>A؎^m--1;FK);F3KxǎQג׎Q^߯f {fb{f6OGLlc)u8jfd3KxXQ33Y|w8jXm I~9j(*s̜bKX #/IDATxb?5.@L,A ȂWƮ[&",{ @ u Ȇ&PlC~~>;x~ Z^^ Y cccdC d l `H3ٳ 0.("%$0G!@FFFͰP}y"aȆ%B 8/mQ.(QbOYVIwps&BDIENDB`PNG  IHDR tEXtSoftwareAdobe ImageReadyqe<fiTXtXML:com.adobe.xmp {:IDATxڬAP{`۸6 7ca^&SJ Y0ìl1cĔR/P`lle=HV")X9~Oƴ,@zkĺ WD`7 !X v)rD:" \4YIENDB`// // Copyright (C) Microsoft. All rights reserved. // // // gridControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var Common; (function (Common) { "use strict"; (function (Controls) { (function (Legacy) { (function (Grid) { var Utility; (function (Utility) { var TreeNodeSort = (function () { function TreeNodeSort() { } TreeNodeSort.stableReverse = function (array, comparer) { var result = []; var reverseIndex = array.length - 1; if (reverseIndex >= 0 && array[reverseIndex].data.hasMoreText) { reverseIndex--; } for (; reverseIndex >= 0; reverseIndex--) { var firstDiffIndex = reverseIndex - 1; for (; firstDiffIndex >= 0; firstDiffIndex--) { if (0 !== comparer(array[firstDiffIndex], array[reverseIndex])) { break; } } for (var equalIndex = firstDiffIndex + 1; equalIndex <= reverseIndex; equalIndex++) { result.push(array[equalIndex]); } reverseIndex = firstDiffIndex + 1; } for (var index = 0; index < result.length; index++) { array[index] = result[index]; } }; TreeNodeSort.defaultComparer = function (column, order, rowA, rowB) { var v1 = rowA[column.index], v2 = rowB[column.index]; if (typeof v1 === "undefined" || v1 === null) { if (typeof v2 === "undefined" || v2 === null) { return 0; } else { return -1; } } return v1.toString().toLocaleUpperCase().localeCompare(v2.toString().toLocaleUpperCase()); }; TreeNodeSort.sortComparer = function (sortOrder, sortColumns, rowA, rowB) { if (rowA.hasMoreText) { return 1; } if (rowB.hasMoreText) { return -1; } for (var i = 0; i < sortOrder.length; i++) { var orderInfo = sortOrder[i]; var column = sortColumns[i]; var comparer = column.comparer || Utility.TreeNodeSort.defaultComparer; var result = comparer(column, orderInfo.order, rowA, rowB); if (result === 0) { continue; } else if (orderInfo.order === "desc") { return -result; } else { return result; } } return 0; }; return TreeNodeSort; })(); Utility.TreeNodeSort = TreeNodeSort; })(Utility || (Utility = {})); var TreeInfo = (function () { function TreeInfo(gridData, expandStates, toggleFunction) { this.gridData = gridData; this.expandStates = expandStates; this.toggleFunction = toggleFunction; } return TreeInfo; })(); Grid.TreeInfo = TreeInfo; var ColumnInfo = (function () { function ColumnInfo(index, text, tooltip, width, canSortBy, getColumnValue, getCellCSSClass, comparer, variableWidth) { this.index = index; this.text = text; this.tooltip = tooltip; this.width = width; this.canSortBy = canSortBy; this.getColumnValue = getColumnValue; this.getCellCSSClass = getCellCSSClass; this.comparer = comparer; this.hasHTMLContent = false; this.variableWidth = variableWidth; } return ColumnInfo; })(); Grid.ColumnInfo = ColumnInfo; var SortOrderInfo = (function () { function SortOrderInfo(index, order) { this.index = index; this.order = order; } return SortOrderInfo; })(); Grid.SortOrderInfo = SortOrderInfo; var TreeNode = (function () { function TreeNode(data, expandState) { this.data = data; this.expandState = expandState; this.children = []; } return TreeNode; })(); Grid.TreeNode = TreeNode; var GutterOptions = (function () { function GutterOptions(backgroundColor, icon, checkbox, headerClickSortColumn, getTooltip) { this.backgroundColor = backgroundColor; this.icon = icon; this.checkbox = checkbox; this.headerClickSortColumn = headerClickSortColumn; this.getTooltip = getTooltip; } return GutterOptions; })(); Grid.GutterOptions = GutterOptions; var GridOptions = (function () { function GridOptions(childDataCallback, loadMoreChildDataCallback, columns, sortOrders, editCellCallback, rowSelectedCallback) { this.childDataCallback = childDataCallback; this.loadMoreChildDataCallback = loadMoreChildDataCallback; this.columns = columns; this.sortOrders = sortOrders; this.allowMultiSelect = false; this.allowSortOnMultiColumns = false; this.ariaTitle = ""; this.asyncInit = true; this.autoSort = true; this.coreCssClass = "grid"; this.cssClass = ""; this.expandStates = []; this.extendViewportBy = 3; this.gutter = new GutterOptions(); this.header = true; this.height = "100%"; this.initialSelection = false; this.keepSelection = false; this.payloadSize = 200; this.source = null; this.editCellCallback = editCellCallback; this.rowSelectedCallback = rowSelectedCallback; this.disableRightClickSelection = true; this.isGridDisabled = false; this.sizeColumns(); } GridOptions.prototype.sizeColumns = function () { if (this.columns) { var maxWidth = document.documentElement.offsetWidth - 66; var usedWidth = 0; var variableWidthIndex = -1; for (var i = 0; i < this.columns.length; i++) { if (this.columns[i].variableWidth && variableWidthIndex === -1) { variableWidthIndex = i; } else { usedWidth += this.columns[i].width; } } if (variableWidthIndex >= 0) { var targetWidth = maxWidth - usedWidth; if (targetWidth > this.columns[variableWidthIndex].width) { this.columns[variableWidthIndex].width = targetWidth; } } } }; return GridOptions; })(); Grid.GridOptions = GridOptions; var RowIndexInfo = (function () { function RowIndexInfo(rowIndex, dataIndex) { this.rowIndex = rowIndex; this.dataIndex = dataIndex; } return RowIndexInfo; })(); Grid.RowIndexInfo = RowIndexInfo; var Size = (function () { function Size(width, height) { this.width = width; this.height = height; } return Size; })(); var Range = (function () { function Range(start, end) { this.start = start; this.end = end; } return Range; })(); var ColumnSizing = (function () { function ColumnSizing(active, index, originalWidth, origin) { this.active = active; this.index = index; this.originalWidth = originalWidth; this.origin = origin; } return ColumnSizing; })(); var GridControl = (function (_super) { __extends(GridControl, _super); function GridControl(root, options) { _super.call(this, root); this._gridInstanceNumber = GridControl.GlobalGridInstanceNumber++; this._options = options; this._canvas = null; this._contentSpacer = null; this._element = null; this._gutter = null; this._gutterHeader = null; this._header = null; this._headerCanvas = null; this._dataSource = []; this._rows = {}; this._columns = []; this._expandStates = null; this._expandedCount = 0; this._sortOrder = []; this._rowInfoMap = {}; this._editCellCallback = null; this._selectedRows = null; this._selectionStart = -1; this._selectionCount = 0; this._selectedIndex = -1; this._active = false; this._activeAriaId = null; this._getChildDataCallback = null; this._getLoadMoreChildDataCallback = null; this._rowSelectedCallback = null; this._canvasHeight = 300; this._canvasWidth = 300; this._contentSize = null; this._measurements = {}; this._count = 0; this._indentIndex = 0; this._indentLevels = null; this._visibleRange = []; this._columnSizing = null; this._sizingElement = null; this._copyInProgress = false; this._resetScroll = false; this._ignoreScroll = false; this._scrollTop = 0; this._scrollLeft = 0; this._cancelable = null; this._onAriaExpandedModifiedHandler = this.onAriaExpandedModified.bind(this); this.initialize(); } GridControl.prototype.getSelectionCount = function () { return this._selectionCount; }; GridControl.prototype.getElement = function () { return this._element; }; GridControl.prototype.setAriaDescription = function (description) { this._ariaDescription = description; this._updateGridAriaLabel(); }; GridControl.prototype.setGutterHeaderClickSortColumn = function (headerClickSortColumn) { this._options.gutter.headerClickSortColumn = headerClickSortColumn; }; GridControl.prototype.initializeDataSource = function () { var canvas; if (this._resetScroll) { this._ignoreScroll = true; try { canvas = this._canvas; canvas.scrollTop = 0; canvas.scrollLeft = 0; this._scrollLeft = 0; this._scrollTop = 0; this._resetScroll = false; } finally { this._ignoreScroll = false; } } this.setDataSource(this._options.source, this._options.expandStates, this._options.columns, this._options.sortOrders); if (this._expandedCount > 0) { if (this._options.keepSelection && this._selectedIndex >= 0) { this._selectRow(Math.min(this._selectedIndex, this._expandedCount - 1)); } else { this._selectRow(this._options.initialSelection !== false ? 0 : -1); } } else { this.setSelectedRowIndex(-1); } }; GridControl.prototype.setDataSource = function (source, expandStates, columns, sortOrder, selectedIndex) { var _this = this; var i, l, count; this._rowInfoMap = {}; this._dataSource = source || []; this._count = count = this._dataSource.length; if (expandStates) { this._expandStates = expandStates; this._indentLevels = GridControl.expand(expandStates); } else { this._indentLevels = null; this._expandStates = null; } this._expandedCount = count; this._updateRanges(); this._columns = []; if (columns) { var defaultGetCellContents = function (rowInfo, dataIndex, expandedState, level, column, indentIndex, columnOrder) { return _this._drawCell(rowInfo, dataIndex, expandedState, level, column, indentIndex, columnOrder); }; var defaultGetHeaderCellContents = function (column, columnOrder) { return _this._drawHeaderCellValue(column, columnOrder); }; var defaultGetColumnValue = function (dataIndex, columnIndex, columnOrder) { return _this.getColumnValue(dataIndex, columnIndex, columnOrder); }; for (i = 0, l = columns.length; i < l; i++) { var column = columns[i]; column.index = typeof (column.index) !== "undefined" ? column.index : String(i); column.canSortBy = column.canSortBy !== false; column.canMove = column.canMove !== false; column.width = typeof (column.width) !== "undefined" ? column.width : 100; column.getCellContents = column.getCellContents || defaultGetCellContents; column.getHeaderCellContents = column.getHeaderCellContents || defaultGetHeaderCellContents; column.getColumnValue = column.getColumnValue || defaultGetColumnValue; this._columns.push(column); } } this._sortOrder = []; if (sortOrder) { for (i = 0, l = sortOrder.length; i < l; i++) { var columnSortOrder = sortOrder[i]; if (columnSortOrder.order !== "desc") { columnSortOrder.order = "asc"; } this._sortOrder.push(columnSortOrder); } this.setGutterHeaderSortOrder(); } this._clearSelection(); this._determineIndentIndex(); if (this._options.asyncInit) { window.setTimeout(function () { return _this._layoutAfterSetDataSource(selectedIndex); }, 0); } else { this._layoutAfterSetDataSource(selectedIndex); } }; GridControl.prototype.updateGetChildDataCallback = function (callback) { this._getChildDataCallback = callback; }; GridControl.prototype.getRowInfo = function (dataIndex) { return this._rows[dataIndex]; }; GridControl.prototype.getRowData = function (dataIndex) { return this._dataSource[dataIndex]; }; GridControl.prototype.getColumns = function () { return this._columns || []; }; GridControl.prototype.getSortOrder = function () { return this._sortOrder || []; }; GridControl.prototype.expandNode = function (dataIndex) { var _this = this; if (this._dataSource[dataIndex + 1].isPlaceholder) { var expansionPath = this.getExpansionPath(dataIndex); this._getChildDataCallback(this._dataSource[dataIndex], expansionPath, function (dynamicData, hasMoreText) { if (dynamicData !== null) { var dummyChildPlaceholderIndex = dataIndex + 1; _this._adjustForDynamicData(dynamicData.itemsWithPlaceholders, dynamicData.expandStates, dataIndex, dummyChildPlaceholderIndex, hasMoreText); } }); } if (this._expandStates) { var state = this._expandStates[dataIndex]; if (state < 0) { this._expandStates[dataIndex] = -state; this._updateRanges(); var row = this._rows[dataIndex]; if (row) { row.isDirty = true; } } } }; GridControl.prototype.collapseNode = function (dataIndex) { if (this._expandStates) { var state = this._expandStates[dataIndex]; if (state > 0) { this._expandStates[dataIndex] = -state; this._updateRanges(); var row = this._rows[dataIndex]; if (row) { row.isDirty = true; } } } }; GridControl.prototype.expandAllNodes = function () { var i = 0, l = this._count, states = this._expandStates, result = false, rows = this._rows; if (states) { while (i < l) { var state = states[i]; if (state < 0) { states[i] = -state; result = true; var row = rows[i]; if (row) { row.isDirty = true; } } i++; } if (result) { this._updateRanges(); } } return result; }; GridControl.prototype.collapseAllNodes = function () { var i = 0, l = this._count, states = this._expandStates, result = false, rows = this._rows; if (states) { while (i < l) { var state = states[i]; if (state > 0) { states[i] = -state; result = true; var row = rows[i]; if (row) { row.isDirty = true; } } i++; } if (result) { this._updateRanges(); } } return result; }; GridControl.prototype.expandAll = function () { var _this = this; this._updateExpansionStateAndRedraw(function () { return _this.expandAllNodes; }); }; GridControl.prototype.collapseAll = function () { var _this = this; this._updateExpansionStateAndRedraw(function () { return _this.collapseAllNodes; }); }; GridControl.prototype.tryToggle = function (expand, shiftKey, rowDataIndex) { var state; if (!this._expandStates || this._selectedIndex < 0 || this._expandedCount <= 0) { return false; } var dataIndex = typeof rowDataIndex !== "undefined" ? rowDataIndex : this._getDataIndex(this._selectedIndex); var row = this._rows[dataIndex]; if (!row) { return false; } { state = this._expandStates[dataIndex]; if (state !== 0) { if (expand) { if (state < 0) { this.expandNode(dataIndex); } else { return false; } } else { if (state > 0) { this.collapseNode(dataIndex); } else { return false; } } this._clearSelection(); this._addSelection(this._getRowIndex(dataIndex)); this._layoutContentSpacer(); this._redraw(); return true; } } return false; }; GridControl.prototype.getSelectedRowIntoView = function (force) { return this._getRowIntoView(this._selectedIndex, force); }; GridControl.prototype.cacheRows = function (aboveRange, visibleRange, belowRange) { }; GridControl.prototype.updateRow = function (rowIndex, dataIndex) { var expandedState = 0, level = 0; if (typeof dataIndex === "undefined" || dataIndex < 0) { dataIndex = this._getDataIndex(rowIndex); } else if (typeof rowIndex === "undefined" || rowIndex < 0) { rowIndex = this._getRowIndex(dataIndex); } var rowInfo = this._rows[dataIndex]; if (rowInfo) { if (this._expandStates) { expandedState = this._expandStates[dataIndex]; level = this._indentLevels[dataIndex]; } this._updateRow(rowInfo, rowIndex, dataIndex, expandedState, level); } }; GridControl.prototype.layout = function () { this._measureCanvasSize(); this._cleanUpRows(); this._fixScrollPos(); this._layoutContentSpacer(); this._updateViewport(); this._layoutHeader(); this._drawHeader(); }; GridControl.prototype.redraw = function () { this._fixScrollPos(); this._redraw(true); }; GridControl.prototype.getColumnValue = function (dataIndex, columnIndex, columnOrder) { return this._dataSource[dataIndex][columnIndex]; }; GridControl.prototype.getColumnText = function (dataIndex, column, columnOrder, isForTooltip) { var text; var value = column.getColumnValue(dataIndex, column.index, columnOrder, this._dataSource, isForTooltip); if (typeof value !== "string") { text = GridControl.convertValueToDisplayString(value, column.format); } else { text = value; } column.maxLength = Math.max(column.maxLength || 0, text.length); return text; }; GridControl.prototype.getSelectedRowIndex = function () { if (this._selectionCount === 0) { return -1; } return this._selectedIndex; }; GridControl.prototype.setSelectedRowIndex = function (selectedRowIndex) { this._clearSelection(); this._addSelection(selectedRowIndex); }; GridControl.prototype.getSelectedDataIndex = function () { return this._getDataIndex(this._selectedIndex); }; GridControl.prototype.getSelectedDataIndices = function () { var index, rows = this._selectedRows, indices = []; if (rows) { for (index in rows) { indices[indices.length] = rows[index]; } } return indices; }; GridControl.prototype.ensureDataIndexExpanded = function (dataIndex) { var rowIndex = this._getRowIndex(dataIndex); while (rowIndex < 0 || (dataIndex > 0 && rowIndex === 0)) { this.expandNode(this._getDataIndex(-rowIndex)); rowIndex = this._getRowIndex(dataIndex); } return rowIndex; }; GridControl.prototype.setSelectedDataIndex = function (dataIndex, expandNodes) { var rowIndex = expandNodes ? this.ensureDataIndexExpanded(dataIndex) : this._getRowIndex(dataIndex); this.setSelectedRowIndex(rowIndex); }; GridControl.prototype.setFocusToSelectedRow = function () { this._updateAriaAttribute(); this.getSelectedRowIntoView(true); }; GridControl.prototype.selectionChanged = function (selectedIndex, selectedCount, selectedRows) { }; GridControl.prototype.selectedIndexChanged = function (selectedRowIndex, selectedDataIndex) { }; GridControl.prototype.onSort = function (sortOrder, sortColumns) { this.fireCustomEvent(this._element, "sortStarted"); if (this._options.autoSort) { this._trySorting(sortOrder, sortColumns); this._sortOrder = sortOrder; this.layout(); } return true; }; GridControl.prototype.getRowInfoFromEvent = function (e, selector) { var element = this.findClosestElement(e.target, selector); return this._rowInfoMap[element.uniqueID]; }; GridControl.prototype.getExpandStates = function () { return this._expandStates; }; GridControl.prototype.getExpansionPath = function (dataIndex) { if (dataIndex < 0 || dataIndex >= this._expandStates.length) { throw new Error("Item does not exist"); } var path = []; var currentIndex = 0; while (currentIndex < dataIndex) { var lastSubtreeElement = currentIndex + Math.abs(this._expandStates[currentIndex]); if (dataIndex <= lastSubtreeElement) { path.push(this._dataSource[currentIndex]); currentIndex++; } else { currentIndex = lastSubtreeElement + 1; } } if (currentIndex != dataIndex) { throw new Error("Invalid expandStates format or incorrect assumption"); } path.push(this._dataSource[dataIndex]); return path; }; GridControl.prototype.ensureSelectedIndex = function (index) { this._ensureSelectedIndex(index, true); }; GridControl.expand = function (states) { var result = []; if (states.length > 0) { var stack = []; var currState = { level: 1, origCount: states.length, remainingCount: states.length }; stack.push(currState); var i = 0; while (i < states.length) { result.push(currState.level); currState.remainingCount--; while (currState.remainingCount === 0) { stack.pop(); if (stack.length == 0) { if (i === (states.length - 1)) { break; } else { throw new Error("invalid descendant counts, nesting not possible"); } } var newState = stack[stack.length - 1]; newState.remainingCount -= currState.origCount; currState = newState; if (currState.remainingCount < 0) { throw new Error("invalid descendant counts, cannot convert to indentation levels"); } } var nextCount = Math.abs(states[i]); if (nextCount > 0) { var nextItem = { level: result[result.length - 1] + 1, origCount: nextCount, remainingCount: nextCount }; stack.push(nextItem); currState = nextItem; } i++; } if (stack.length > 0) { throw new Error("invalid descendant counts, more input expected"); } } return result; }; GridControl.addItemsToTree = function (dataSource, expandStates, start, count, parentNode) { var end = Math.min(start + count, dataSource.length); for (var i = start; i < end; i++) { var node = new TreeNode(dataSource[i], expandStates[i]); var childrenCount = Math.abs(node.expandState); if (childrenCount > 0) { GridControl.addItemsToTree(dataSource, expandStates, i + 1, childrenCount, node); i += childrenCount; } parentNode.children.push(node); } }; GridControl.walkTree = function (tree, visit) { if (visit) { visit(tree); var numChildren = 0; var children = tree.children; if (children && (numChildren = children.length)) { for (var i = 0; i < numChildren; i++) { var item = children[i]; GridControl.walkTree(item, visit); } } } }; GridControl.makeElementUnselectable = function (element) { element.setAttribute("unselectable", "on"); var elements = element.querySelectorAll("*"); for (var i = 0; i < elements.length; i++) { var e = elements[i]; switch (e.tagName) { case "IFRAME": case "TEXTAREA": case "INPUT": case "SELECT": break; default: e.setAttribute("unselectable", "on"); } } }; GridControl.toDecimalLocaleString = function (value, includeGroupSeparators, cultureInfo) { var zeroPad = function (str, count, left) { for (var l = str.length; l < count; l++) { str = (left ? ("0" + str) : (str + "0")); } return str; }; var exponent, nf, split, numberString = value.toString(), right = ""; if (cultureInfo) { nf = cultureInfo.numberFormat; } else { nf = Plugin.Culture.NumberFormat; } split = numberString.split(/e/i); numberString = split[0]; exponent = (split.length > 1 ? parseInt(split[1], 10) : 0); split = numberString.split("."); numberString = split[0]; right = split.length > 1 ? split[1] : ""; if (exponent > 0) { right = zeroPad(right, exponent, false); numberString += right.slice(0, exponent); right = right.substr(exponent); } else if (exponent < 0) { exponent = -exponent; numberString = zeroPad(numberString, exponent + 1, true); right = numberString.slice(-exponent, numberString.length) + right; numberString = numberString.slice(0, -exponent); } if (right.length > 0) { right = nf.numberDecimalSeparator + right; } if (includeGroupSeparators === true) { var groupSizes = nf.numberGroupSizes, sep = nf.numberGroupSeparator, curSize = groupSizes[0], curGroupIndex = 1, stringIndex = numberString.length - 1, ret = ""; while (stringIndex >= 0) { if (curSize === 0 || curSize > stringIndex) { if (ret.length > 0) { return numberString.slice(0, stringIndex + 1) + sep + ret + right; } else { return numberString.slice(0, stringIndex + 1) + right; } } if (ret.length > 0) { ret = numberString.slice(stringIndex - curSize + 1, stringIndex + 1) + sep + ret; } else { ret = numberString.slice(stringIndex - curSize + 1, stringIndex + 1); } stringIndex -= curSize; if (curGroupIndex < groupSizes.length) { curSize = groupSizes[curGroupIndex]; curGroupIndex++; } } return numberString.slice(0, stringIndex + 1) + sep + ret + right; } else { return numberString + right; } }; GridControl.convertValueToDisplayString = function (value, format) { if (value != null) { if (typeof value === "string") { return value; } else if (value instanceof Date) { return value.localeFormat(format || "G"); } else if (typeof value === "number") { if (format) { return value.localeFormat(format); } else { return GridControl.toDecimalLocaleString(value); } } else if (typeof value === "boolean") { return value ? "True" : "False"; } else { return value.toString(); } } return ""; }; GridControl._setTooltip = function (element, value, height) { var content = value.trim(); if (content) { var tooltip = { content: content, height: height }; element.setAttribute("data-plugin-vs-tooltip", JSON.stringify(tooltip)); } }; GridControl.prototype.initialize = function () { this._element = document.createElement("div"); this._element.className = this._options.coreCssClass; this._element.style.height = this._options.height; this.rootElement.appendChild(this._element); this._buildDom(); this._contentSize = new Size(300, 400); this._takeMeasurements(); this._getChildDataCallback = this._options.childDataCallback || null; this._getLoadMoreChildDataCallback = this._options.loadMoreChildDataCallback || null; this._editCellCallback = this._options.editCellCallback || null; this._rowSelectedCallback = this._options.rowSelectedCallback || null; if (this._options.asyncInit) { window.setTimeout(function () { this._attachEvents(); }.bind(this), 10); } else { this._attachEvents(); } this.initializeDataSource(); }; GridControl.prototype.findClosestElement = function (element, selector) { var stop = this._element.parentNode; var closest = element; while (closest && closest !== stop) { if (closest.msMatchesSelector(selector)) { return closest; } closest = closest.parentNode; } return closest; }; GridControl.prototype.fireCustomEvent = function (element, eventName, args) { var customEvent = document.createEvent("Event"); customEvent.initEvent(eventName, true, true); customEvent.customData = args; element.dispatchEvent(customEvent); }; GridControl.prototype.onAriaExpandedModified = function (event) { if (event.attrName === "aria-expanded") { var rowInfo = this.getRowInfoFromEvent(event, ".grid-row"); if (rowInfo) { this.tryToggle(event.newValue === "true", false, rowInfo.dataIndex); } } }; GridControl.prototype.createElementWithClass = function (tagName, className) { var element = document.createElement(tagName); if (className) { element.className = className; } return element; }; GridControl.prototype._getId = function () { return GridControl.TYPE_NAME + this._gridInstanceNumber; }; GridControl.prototype._enhance = function (element) { this._buildDom(); }; GridControl.prototype._buildDom = function () { var fragment = document.createDocumentFragment(); var gutterOptions = this._options.gutter; var gutterVisible = gutterOptions && (gutterOptions.icon || gutterOptions.checkbox); this._canvas = document.createElement("div"); this._canvas.className = "grid-canvas"; this._contentSpacer = document.createElement("div"); this._contentSpacer.className = "grid-content-spacer"; this._canvas.appendChild(this._contentSpacer); if (this._options.header) { this._element.classList.add("has-header"); this._header = document.createElement("div"); this._header.className = "grid-header"; this._headerCanvas = document.createElement("div"); this._headerCanvas.className = "grid-header-canvas"; this._header.appendChild(this._headerCanvas); fragment.appendChild(this._header); } if (gutterVisible) { this._element.classList.add("has-gutter"); this._gutter = document.createElement("div"); this._gutter.className = "grid-gutter"; if (gutterOptions && gutterOptions.backgroundColor) { this._gutter.style.backgroundColor = gutterOptions.backgroundColor; } this._canvas.appendChild(this._gutter); if (this._header) { this._gutterHeader = document.createElement("div"); this._gutterHeader.className = "grid-gutter-header"; this._gutterHeader.classList.add("grid-header-column"); this._header.appendChild(this._gutterHeader); var sortElement = this.createElementWithClass("div", "sort-handle"); this._gutterHeader.appendChild(sortElement); this.setGutterHeaderSortOrder(); } } fragment.appendChild(this._canvas); this._element.appendChild(fragment); this._ariaColumns = ""; for (var cIndex = 0; cIndex < this._options.columns.length; cIndex++) { var columnInfo = this._options.columns[cIndex]; if (this._ariaColumns) { this._ariaColumns += ", "; } this._ariaColumns += columnInfo.text; } this._updateGridAriaLabel(); }; GridControl.prototype._updateGridAriaLabel = function () { var ariaLabel = ""; ariaLabel += this._options.ariaTitle || ""; if (ariaLabel) { ariaLabel += ", "; } ariaLabel += this._ariaColumns || ""; if (ariaLabel) { ariaLabel += ", "; } ariaLabel += this._ariaDescription || ""; this._element.setAttribute("aria-label", ariaLabel); }; GridControl.prototype.setGutterHeaderSortOrder = function () { if (!this._sortOrder || this._sortOrder.length === 0 || !this._options.gutter.headerClickSortColumn) { return; } if (!this._options.allowSortOnMultiColumns) { var currentSortOrder = this._sortOrder[0]; if (currentSortOrder.index === this._options.gutter.headerClickSortColumn.index) { this._setSortOrderClass(this._gutterHeader, currentSortOrder.order); } else { this._setSortOrderClass(this._gutterHeader, "none"); } } else { var sortOrderFound = false; for (var i = 0; i < this._sortOrder.length; i++) { var currentSortOrder = this._sortOrder[i]; if (currentSortOrder.index === this._options.gutter.headerClickSortColumn.index) { sortOrderFound = true; this._setSortOrderClass(this._gutterHeader, currentSortOrder.order); } } if (!sortOrderFound) { this._setSortOrderClass(this._gutterHeader, "none"); } } }; GridControl.prototype._attachEvents = function () { var _this = this; window.addEventListener("resize", function (e) { return _this._onContainerResize(e); }); this._element.addEventListener("keydown", function (e) { return _this._onKeyDown(e); }); this._canvas.addEventListener("mousedown", function (e) { return _this._onRowMouseDown(e); }); this._canvas.addEventListener("dblclick", function (e) { return _this._onEditCell(e); }); this._canvas.addEventListener("scroll", function (e) { return _this._onCanvasScroll(e); }); this._canvas.addEventListener("selectstart", function () { return false; }); this._canvas.addEventListener("focusin", function (e) { _this._canvasContainsFocus = true; }); this._canvas.addEventListener("focusout", function (e) { _this._canvasContainsFocus = false; }); if (this._header) { this._header.addEventListener("mousedown", function (e) { return _this._onHeaderMouseDown(e); }); this._header.addEventListener("mouseup", function (e) { return _this._onHeaderMouseUp(e); }); this._header.addEventListener("click", function (e) { return _this._onHeaderClick(e); }); this._header.addEventListener("dblclick", function (e) { return _this._onHeaderDblClick(e); }); } if (this._gutter) { if (this._gutterHeader) { this._gutterHeader.addEventListener("click", function (e) { _this._sortBy(_this._options.gutter.headerClickSortColumn, false); _this.setGutterHeaderSortOrder(); }); } this._gutter.addEventListener("click", function (e) { return _this._onGutterClick(e); }); this._gutter.addEventListener("mouseover", function (e) { var row = this.findClosestElement(e.target, ".grid-gutter-row"); if (row) { row.classList.add("grid-gutter-row-hover"); } }.bind(this)); this._gutter.addEventListener("mouseout", function (e) { var row = this.findClosestElement(e.target, ".grid-gutter-row"); if (row) { row.classList.remove("grid-gutter-row-hover"); } }.bind(this)); } }; GridControl.prototype._mergeExpandStates = function (parentIndex, childPlaceholderIndex, oldExpandStates, newExpandStates) { var netIncreaseInExpandStates = newExpandStates.length - 1; oldExpandStates.splice(childPlaceholderIndex, 1); for (var i = 0; i <= netIncreaseInExpandStates; i++) { oldExpandStates.splice(childPlaceholderIndex + i, 0, newExpandStates[i]); } var countSinceLastParent = 0; for (var i = parentIndex; i >= 0; i--) { var origValue = oldExpandStates[i]; if (Math.abs(origValue) > countSinceLastParent) { if (origValue < 0) { oldExpandStates[i] = origValue - netIncreaseInExpandStates; } else { oldExpandStates[i] = origValue + netIncreaseInExpandStates; } countSinceLastParent = 0; } else { countSinceLastParent++; } } }; GridControl.prototype._takeMeasurements = function () { var cssClass = this._options.coreCssClass; if (this._options.cssClass) { cssClass += " " + this._options.cssClass; } var measurementContainer = this.createElementWithClass("div", cssClass); measurementContainer.style.position = "absolute"; measurementContainer.style.left = "-5000px"; measurementContainer.style.top = "-5000px"; measurementContainer.style.width = "1000px"; measurementContainer.style.height = "500px"; document.body.appendChild(measurementContainer); var row = this.createElementWithClass("div", "grid-row grid-row-normal"); measurementContainer.appendChild(row); var cell = this.createElementWithClass("div", "grid-cell"); cell.style.width = "100px"; cell.innerText = "1"; row.appendChild(cell); this._measurements.rowHeight = row.offsetHeight; this._measurements.cellOffset = cell.offsetWidth - 100; var textUnit = this.createElementWithClass("div"); textUnit.style.overflow = "hidden"; textUnit.style.width = "1em"; textUnit.style.height = "1ex"; cell.appendChild(textUnit); this._measurements.unitEx = textUnit.offsetHeight; var gutter = this.createElementWithClass("div", "grid-gutter"); gutter.appendChild(this.createElementWithClass("div", "grid-gutter-row")); measurementContainer.appendChild(gutter); if (this._gutter) { this._measurements.gutterWidth = gutter.clientWidth; } else { this._measurements.gutterWidth = 0; } document.body.removeChild(measurementContainer); }; GridControl.prototype._layoutAfterSetDataSource = function (selectedIndex) { this.layout(); if (selectedIndex !== -1) { this._ensureSelectedIndex(selectedIndex); } }; GridControl.prototype._adjustForDynamicData = function (newRows, newExpandStates, parentIndex, childPlaceholderIndex, hasMoreText) { if (hasMoreText) { var hasMoreItem = { hasMoreText: hasMoreText }; newRows.push(hasMoreItem); newExpandStates.push(0); } this._dataSource.splice(childPlaceholderIndex, 1); for (var i = 0; i < newRows.length; i++) { this._dataSource.splice(childPlaceholderIndex + i, 0, newRows[i]); } this._mergeExpandStates(parentIndex, childPlaceholderIndex, this._expandStates, newExpandStates); var count = this._dataSource.length; this._count = count; if (this._expandStates) { this._indentLevels = GridControl.expand(this._expandStates); } else { this._indentLevels = null; } this._expandedCount = count; this._updateRanges(); this._clearSelection(); this._determineIndentIndex(); this.layout(); }; GridControl.prototype._ensureSelectedIndex = function (index, forceSettingSelection) { var oldSelectedIndex = this._selectedIndex; if (typeof index === "number") { this._selectedIndex = index; } if (this._selectedIndex >= 0) { if (this._count <= this._selectedIndex) { this._selectedIndex = this._count - 1; } if (this._selectedIndex !== oldSelectedIndex || forceSettingSelection) { this._addSelection(this._selectedIndex); } } }; GridControl.prototype._determineIndentIndex = function () { var _columns = this._columns, i, l; for (i = 0, l = _columns.length; i < l; i++) { if (_columns[i].indent) { this._indentIndex = i; return; } } this._indentIndex = 0; }; GridControl.prototype._getDataIndex = function (visibleIndex) { var i, l, lastIndex = -1; var ranges = this._visibleRange; var range; if (visibleIndex < 0) { return -1; } for (i = 0, l = ranges.length; i < l; i++) { range = ranges[i]; lastIndex += range.end - range.start + 1; if (visibleIndex <= lastIndex) { return range.end - lastIndex + visibleIndex; } } return visibleIndex; }; GridControl.prototype._getRowIndex = function (dataIndex) { var i, l, result = 0; var ranges = this._visibleRange; var range; for (i = 0, l = ranges.length; i < l; i++) { range = ranges[i]; if (dataIndex >= range.start) { if (dataIndex <= range.end) { return result + dataIndex - range.start; } } else { break; } result += range.end - range.start + 1; } return -Math.max(0, result - 1); }; GridControl.prototype._updateRanges = function () { var i = 0, first = 0, l = this._count, newRanges = [], count = 0; if (this._expandStates) { while (i < l) { var state = this._expandStates[i]; if (state < 0) { newRanges[newRanges.length] = new Range(first, i); count += (i - first) + 1; i += 1 - state; first = i; } else { i++; } } if (first < l) { newRanges[newRanges.length] = new Range(first, l - 1); count += (l - first); } } else { count = l; newRanges[newRanges.length] = new Range(0, count); } this._expandedCount = count; this._visibleRange = newRanges; }; GridControl.prototype._updateExpansionStateAndRedraw = function (action) { var dataIndex, oldSelectedIndex = this._selectedIndex; if (oldSelectedIndex >= 0) { dataIndex = this._getDataIndex(oldSelectedIndex); } action(); if (oldSelectedIndex >= 0) { this._clearSelection(); this._addSelection(Math.abs(this._getRowIndex(dataIndex))); } this._layoutContentSpacer(); this._redraw(); }; GridControl.prototype._getVisibleRowIndices = function () { var top = this._scrollTop, bottom = top + this._canvasHeight, count = this._expandedCount - 1, rh = this._measurements.rowHeight; return { first: Math.min(count, Math.max(0, Math.ceil(top / rh))), last: Math.min(count, Math.floor(bottom / rh) - 1) }; }; GridControl.prototype._getRowIntoView = function (rowIndex, force) { if (force) { this._canvas.scrollTop = Math.max(0, Math.min(rowIndex || 0, this._expandedCount - 1)) * this._measurements.rowHeight; return true; } var visibleIndices = this._getVisibleRowIndices(); var firstIndex = visibleIndices.first; var lastIndex = visibleIndices.last; var count = lastIndex - firstIndex; if (rowIndex < firstIndex || rowIndex > lastIndex) { if (this._selectedIndex > firstIndex) { firstIndex = Math.max(rowIndex - count, 0); } else { firstIndex = Math.max(0, Math.min(rowIndex + count, this._expandedCount - 1) - count); } this._canvas.scrollTop = firstIndex * this._measurements.rowHeight; return true; } return false; }; GridControl.prototype._updateViewport = function (includeNonDirtyRows) { var resultCount = this._count, above = [], below = [], visible = [], states = this._expandStates || [], maxIndex = this._expandedCount - 1; var visibleIndices = this._getVisibleRowIndices(); var firstIndex = visibleIndices.first; var lastIndex = visibleIndices.last; firstIndex = Math.max(0, firstIndex - this._options.extendViewportBy); lastIndex = Math.min(maxIndex, lastIndex + this._options.extendViewportBy); var cachingStart = Math.max(0, firstIndex - this._options.payloadSize); var cachingEnd = Math.min(maxIndex, lastIndex + this._options.payloadSize); var dataIndex = this._getDataIndex(cachingStart); var lastVisible = firstIndex; for (var i = cachingStart; i <= cachingEnd && dataIndex < resultCount; i++) { if (i < firstIndex) { above[above.length] = new RowIndexInfo(i, dataIndex); } else if (i > lastIndex) { below[below.length] = new RowIndexInfo(i, dataIndex); } else { visible[visible.length] = new RowIndexInfo(i, dataIndex); lastVisible = i; } var nodeState = states[dataIndex]; if (nodeState < 0) { dataIndex += (1 - nodeState); } else { dataIndex++; } } this.cacheRows(above, visible, below); this._drawRows(visible, includeNonDirtyRows); if (this._updateAriaOnViewportUpdate) { this._updateAriaOnViewportUpdate = false; this._updateAriaAttribute(); } }; GridControl.prototype._cleanUpRows = function () { var rows = this._rows, gutterDiv = this._gutter; for (var dataIndex in rows) { var row = rows[dataIndex]; if (row.row.parentElement) { row.row.parentElement.removeChild(row.row); } if (gutterDiv && row.gutterRow.parentElement) { row.gutterRow.parentElement.removeChild(row.gutterRow); } } this._rows = {}; }; GridControl.prototype._drawRows = function (visibleRange, includeNonDirtyRows) { var states = this._expandStates, expandedState = 0, levels = this._indentLevels, level = 0, hasGutter = this._gutter, canvasDom = this._canvas, gutterCanvasDom, updateRow; var fragment = document.createDocumentFragment(); var gutterFragment = null; if (hasGutter) { gutterCanvasDom = this._gutter; gutterFragment = document.createDocumentFragment(); } var existingRows = this._rows; var newRows = {}; this._rows = newRows; var visibleRowCount = visibleRange.length; for (var i = 0; i < visibleRowCount; i++) { var range = visibleRange[i]; var rowIndex = range.rowIndex; var dataIndex = range.dataIndex; var row = existingRows[dataIndex]; if (row) { updateRow = (row.rowIndex !== rowIndex); if (updateRow) { row.rowIndex = rowIndex; } else { updateRow = row.isDirty; delete row.isDirty; } if (includeNonDirtyRows) { updateRow = true; } delete existingRows[dataIndex]; } else { updateRow = true; var rowElement = this.createElementWithClass("div", "grid-row grid-row-normal"); rowElement.id = "row_" + this._getId() + "_" + rowIndex; fragment.appendChild(rowElement); var rowInfo = { rowIndex: rowIndex, dataIndex: dataIndex, row: rowElement }; if (hasGutter) { var gutterRowElement = this.createElementWithClass("div", "grid-gutter-row"); gutterFragment.appendChild(gutterRowElement); this._rowInfoMap[gutterRowElement.uniqueID] = rowInfo; rowInfo.gutterRow = gutterRowElement; } this._rowInfoMap[rowElement.uniqueID] = rowInfo; row = rowInfo; rowElement.onfocus = this._onFocus.bind(this); rowElement.onblur = this._onBlur.bind(this); rowElement.ondblclick = this._onToggle.bind(this, rowInfo); } newRows[dataIndex] = row; if (updateRow) { if (states) { expandedState = states[dataIndex]; level = levels[dataIndex]; } this._updateRow(row, rowIndex, dataIndex, expandedState, level); } } for (var existingRowIdx in existingRows) { row = existingRows[existingRowIdx]; if (hasGutter) { delete this._rowInfoMap[row.gutterRow.uniqueID]; row.gutterRow.parentElement.removeChild(row.gutterRow); } delete this._rowInfoMap[row.row.uniqueID]; row.row.parentElement.removeChild(row.row); } canvasDom.appendChild(fragment); if (hasGutter) { gutterCanvasDom.appendChild(gutterFragment); } }; GridControl.prototype._setSortOrderClass = function (element, sortOrder) { if (sortOrder === "asc") { element.classList.remove("descending"); element.classList.add("ascending"); } else if (sortOrder === "desc") { element.classList.remove("ascending"); element.classList.add("descending"); } else if (sortOrder === "none") { element.classList.remove("ascending"); element.classList.remove("descending"); } }; GridControl.prototype._updateRow = function (rowInfo, rowIndex, dataIndex, expandedState, level) { var indentIndex = this._indentIndex; if (this._gutter) { var gutterOptions = this._options.gutter; var gutterRowElem = rowInfo.gutterRow; gutterRowElem.style.top = (rowIndex * this._measurements.rowHeight) + "px"; gutterRowElem.style.left = "0px"; gutterRowElem.style.width = (this._measurements.gutterWidth) + "px"; gutterRowElem.style.height = (this._measurements.rowHeight) + "px"; gutterRowElem.innerHTML = ""; if (gutterOptions.checkbox) { var gutterCheckbox = this.createElementWithClass("input", "checkbox " + (gutterOptions.checkbox.cssClass || "")); gutterCheckbox.setAttribute("type", "checkbox"); var gutterCheckboxCellElem = this.createElementWithClass("div", "grid-gutter-cell grid-gutter-checkbox"); gutterCheckboxCellElem.appendChild(gutterCheckbox[0]); gutterRowElem.appendChild(gutterCheckboxCellElem); } if (gutterOptions.icon) { var gutterIconCss = "grid-gutter-cell grid-gutter-icon "; if (typeof gutterOptions.icon.cssClass !== "undefined") { gutterIconCss += gutterOptions.icon.cssClass + " "; } if (typeof gutterOptions.icon.index !== "undefined") { gutterIconCss += (this.getColumnValue(dataIndex, gutterOptions.icon.index, -1) || "") + " "; } if (gutterOptions.icon.gutterIconCssCallback) { gutterIconCss += (gutterOptions.icon.gutterIconCssCallback(dataIndex, this._dataSource) || ""); } var gutterIconElem = this.createElementWithClass("div", gutterIconCss); if (gutterOptions.getTooltip) { var toolTip = gutterOptions.getTooltip(dataIndex, this._dataSource); if (toolTip) { GridControl._setTooltip(gutterIconElem, toolTip, 16); } } gutterRowElem.appendChild(gutterIconElem); } this._drawGutterCell(rowInfo, rowIndex, dataIndex, expandedState, level); } var rowElement = rowInfo.row; rowElement.innerHTML = ""; rowElement.style.top = (rowIndex * this._measurements.rowHeight) + "px"; rowElement.style.left = this._measurements.gutterWidth + "px"; rowElement.style.height = (this._measurements.rowHeight) + "px"; rowElement.style.width = isNaN(this._contentSize.width) ? "" : (this._contentSize.width + 2) + "px"; var columns = this._columns; for (var i = 0, columnsLength = columns.length; i < columnsLength; i++) { var column = columns[i]; if (column.hidden) { continue; } var cellElement = column.getCellContents(rowInfo, dataIndex, expandedState, level, column, indentIndex, i); if (cellElement) { rowElement.appendChild(cellElement); } } GridControl.makeElementUnselectable(rowElement); if (this._gutter) { GridControl.makeElementUnselectable(gutterRowElem); } this._updateRowSelectionStyle(rowInfo, this._selectedRows, this._selectedIndex); rowElement.removeEventListener("DOMAttrModified", this._onAriaExpandedModifiedHandler); if (expandedState !== 0) { rowElement.setAttribute("aria-expanded", expandedState > 0 ? "true" : "false"); rowElement.addEventListener("DOMAttrModified", this._onAriaExpandedModifiedHandler); } }; GridControl.prototype._drawGutterCell = function (rowInfo, rowIndex, dataIndex, expandedState, level) { }; GridControl.prototype._drawCell = function (rowInfo, dataIndex, expandedState, level, column, indentIndex, columnOrder) { var width = column.width || 20, href, value; var cellElement = this.createElementWithClass("div", "grid-cell"); cellElement.style.width = isNaN(width) ? String(width) : width + "px"; var item = this._dataSource[dataIndex]; var tooltip; var hasMoreTextEnabled = !!(column.hasMoreColumn && item && item.hasMoreText); if (column.cellDecorator && !hasMoreTextEnabled) { var dataItem = this._dataSource[dataIndex]; column.cellDecorator(cellElement, dataItem); } else { if (hasMoreTextEnabled) { href = this._onHasMoreClick.bind(this, item); value = item.hasMoreText; } else { if (typeof column.hrefIndex !== "undefined") { href = this.getColumnValue(dataIndex, column.hrefIndex, -1); } value = this.getColumnText(dataIndex, column, columnOrder); tooltip = this.getColumnText(dataIndex, column, columnOrder, true); } if (!column.hasHTMLContent) { GridControl._setTooltip(cellElement, tooltip ? tooltip : value, 65); } if (href) { var link = document.createElement("a"); if (typeof href === "function") { link.onclick = href; } else { link.setAttribute("href", href); } link.textContent = value; cellElement.appendChild(link); } else { if (value) { if (column.hasHTMLContent) { cellElement.innerHTML = value; } else { cellElement.textContent = value; } } else { cellElement.innerHTML = " "; } } } if (columnOrder === indentIndex && level > 0) { var indent = ((level * 16) - 13); column.indentOffset = indent; if (expandedState !== 0) { var treeSign = this.createElementWithClass("div", "icon grid-tree-icon"); treeSign.style.left = indent + "px"; cellElement.appendChild(treeSign); if (expandedState > 0) { treeSign.classList.add("icon-tree-expanded"); } else { treeSign.classList.add("icon-tree-collapsed"); } } cellElement.style.textIndent = (level * 16) + "px"; } if (column.getCellCSSClass) { var cellStyle = column.getCellCSSClass(dataIndex, column.index, columnOrder, this._dataSource); if (cellStyle) { var styles = cellStyle.trim().split(" "); for (var index = 0; index < styles.length; index++) { cellElement.classList.add(styles[index]); } } } if (column.rowCss) { cellElement.classList.add(column.rowCss); } return cellElement; }; GridControl.prototype._drawHeader = function () { var _this = this; var columns = this._columns, sortOrder = this._sortOrder; if (this._header) { var fragment = document.createDocumentFragment(); for (var i = 0, l = columns.length; i < l; i++) { var column = columns[i]; if (column.hidden) { continue; } var headerElement = this.createElementWithClass("div", "grid-header-column"); GridControl._setTooltip(headerElement, column.tooltip, 65); headerElement.style.width = (column.width || 20) + "px"; headerElement._data = { columnIndex: i, header: true }; var seperatorElement = this.createElementWithClass("div", "separator"); if (column.fixed) { seperatorElement.style.cursor = "auto"; } seperatorElement._data = { columnIndex: i, separator: true }; headerElement.appendChild(seperatorElement); var headerCellElement = column.getHeaderCellContents(column, i); if (column.headerCss) { headerCellElement.classList.add(column.headerCss); } if (column.tooltip) { GridControl._setTooltip(headerCellElement, column.tooltip, 65); } headerElement.appendChild(headerCellElement); var sortElement = this.createElementWithClass("div", "sort-handle"); sortOrder.forEach(function (element, index, array) { if (element.index === column.index) { _this._setSortOrderClass(headerElement, element.order); return false; } }); this.setGutterHeaderSortOrder(); headerElement.appendChild(sortElement); fragment.appendChild(headerElement); } this._headerCanvas.innerHTML = ""; this._headerCanvas.appendChild(fragment); GridControl.makeElementUnselectable(this._header); } }; GridControl.prototype._drawHeaderCellValue = function (column, columnOrder) { var cellElement = document.createElement("div"); cellElement.classList.add("title"); cellElement.innerText = column.text || ""; if (columnOrder === this._indentIndex && !(typeof this._indentLevels === "undefined" || this._indentLevels === null)) { cellElement.classList.add("indented-title"); } return cellElement; }; GridControl.prototype._layoutContentSpacer = function () { var width = 0, columns = this._columns; for (var i = 0, l = columns.length; i < l; i++) { if (columns[i].hidden) { continue; } width += (columns[i].width || 20) + this._measurements.cellOffset; } width = width + 2; var height = Math.max(1, this._expandedCount * this._measurements.rowHeight); this._contentSpacer.style.width = width + "px"; this._contentSpacer.style.height = height + "px"; if (this._gutter) { this._gutter.style.height = height + "px"; } this._ignoreScroll = true; try { var scrollTop = Math.max(0, Math.min(this._scrollTop, height - this._canvasHeight)); if (scrollTop !== this._scrollTop) { this._scrollTop = scrollTop; this._canvas.scrollTop = scrollTop; } var scrollLeft = Math.max(0, Math.min(this._scrollLeft, width - this._canvasWidth)); if (scrollLeft !== this._scrollLeft) { this._scrollLeft = scrollLeft; this._canvas.scrollLeft = scrollLeft; } } finally { this._ignoreScroll = false; } this._contentSize.width = width; this._contentSize.height = height; }; GridControl.prototype._layoutHeader = function () { if (this._header) { this._headerCanvas.style.left = this._measurements.gutterWidth - this._scrollLeft + "px"; } if (this._gutter) { this._gutter.style.left = this._scrollLeft + "px"; } }; GridControl.prototype._fixScrollPos = function () { var oldIgnoreScroll = this._ignoreScroll; this._ignoreScroll = true; try { this._canvas.scrollLeft = this._scrollLeft; this._canvas.scrollTop = this._scrollTop; } finally { this._ignoreScroll = oldIgnoreScroll; } }; GridControl.prototype._redraw = function (includeNonDirtyRows) { this._layoutHeader(); this._updateViewport(includeNonDirtyRows); }; GridControl.prototype._getExpandState = function (dataIndex) { var result = 0; if (this._expandStates) { if (typeof (this._expandStates[dataIndex]) === "number") { result = this._expandStates[dataIndex]; } } return result; }; GridControl.prototype._selectRow = function (rowIndex, dataIndex, options) { var ctrl = options && options.ctrl, shift = options && options.shift, rightClick = options && options.rightClick; if (ctrl) { this._addSelection(rowIndex, dataIndex, { toggle: true }); } else if (shift) { this._clearSelection(); this._addSelectionRange(rowIndex, dataIndex); } else if (rightClick) { if (!this._selectedRows || !(this._selectedRows.hasOwnProperty(rowIndex))) { this._clearSelection(); this._addSelection(rowIndex, dataIndex); } else { this._selectedIndex = rowIndex; this._updateAriaAttribute(); } } else { this._clearSelection(); this._addSelection(rowIndex, dataIndex); } }; GridControl.prototype._selectAll = function () { if (this._count > 0 && this._options.allowMultiSelect !== false) { this._clearSelection(); this._selectionStart = 0; var prevIndex = Math.max(0, this._selectedIndex); this._addSelectionRange(this._count - 1, undefined, { doNotFireEvent: true }); this._selectedIndex = prevIndex; this._updateSelectionStyles(); this._selectionChanged(); } }; GridControl.prototype._clearSelection = function () { this._selectionCount = 0; this._selectedRows = null; }; GridControl.prototype._addSelection = function (rowIndex, dataIndex, options) { var keepSelectionStart = options && options.keepSelectionStart, doNotFireEvent = options && options.doNotFireEvent, toggle = options && options.toggle; if (this._options.allowMultiSelect === false) { keepSelectionStart = false; this._clearSelection(); } if (!this._selectedRows) { this._selectedRows = {}; } if (rowIndex >= 0) { var add = true; if (!(this._selectedRows.hasOwnProperty(rowIndex))) { this._selectionCount++; } else if (toggle) { add = false; this._selectionCount = Math.max(0, this._selectionCount - 1); delete this._selectedRows[rowIndex]; } if (typeof (dataIndex) !== "number") { dataIndex = this._getDataIndex(rowIndex); } if (add) { this._selectedRows[rowIndex] = dataIndex; } this._selectedIndex = rowIndex; this._updateAriaAttribute(); if (this._selectionStart < 0 || !keepSelectionStart) { this._selectionStart = rowIndex; } } else { dataIndex = -1; this._selectedIndex = -1; } if (!doNotFireEvent) { this._updateSelectionStyles(); this._selectionChanged(); this._selectedIndexChanged(this._selectedIndex, dataIndex); } }; GridControl.prototype._addSelectionRange = function (rowIndex, dataIndex, options) { var doNotFireEvent = options && options.doNotFireEvent, prevSelectedDataIndex = -1, selectedDataIndex; if (this._options.allowMultiSelect === false) { this._addSelection(rowIndex, dataIndex); } else { if (this._selectedRows) { prevSelectedDataIndex = this._selectedRows[this._selectedIndex]; } if (this._selectionStart < 0) { this._selectionStart = rowIndex; } var start = Math.min(this._selectionStart, rowIndex); var end = Math.max(this._selectionStart, rowIndex); if (typeof (dataIndex) !== "number" || start !== rowIndex) { dataIndex = this._getDataIndex(start); } for (var i = start; i <= end; i++) { this._addSelection(i, dataIndex, { keepSelectionStart: true, doNotFireEvent: true }); if (i === rowIndex) { selectedDataIndex = dataIndex; } var nodeState = this._getExpandState(dataIndex); if (nodeState < 0) { dataIndex += (1 - nodeState); } else { dataIndex++; } } this._selectedIndex = rowIndex; this._updateAriaAttribute(); if (!doNotFireEvent) { this._updateSelectionStyles(); this._selectionChanged(); if (prevSelectedDataIndex !== selectedDataIndex) { this._selectedIndexChanged(this._selectedIndex, selectedDataIndex); } } } }; GridControl.prototype._updateAriaAttribute = function () { var dataIndex = this._getDataIndex(this._selectedIndex); if (dataIndex >= 0) { var rowInfo = this.getRowInfo(dataIndex); if (!rowInfo || !rowInfo.row) { this._updateAriaOnViewportUpdate = true; } else { var id = rowInfo.row.getAttribute("id"); if (id !== this._activeAriaId) { var ariaLabel = this._getAriaLabelForRow(rowInfo); rowInfo.row.setAttribute("aria-label", ariaLabel); this._activeAriaId = id; } try { if (this._canvasContainsFocus) { rowInfo.row.setActive(); } else { rowInfo.row.focus(); } } catch (err) { } } } }; GridControl.prototype._getAriaLabelForRow = function (rowInfo) { var ariaLabel = ""; var rowIndex = rowInfo.rowIndex; var dataIndex = rowInfo.dataIndex; var expandedState = 0, level = 0; if (this._expandStates) { expandedState = this._expandStates[dataIndex]; level = this._indentLevels[dataIndex]; } if (this._gutter) { var gutterOptions = this._options.gutter; if (gutterOptions.getTooltip) { var toolTip = gutterOptions.getTooltip(dataIndex, this._dataSource); if (toolTip) { if (ariaLabel) { ariaLabel += ", "; } ariaLabel += toolTip; } } } var columns = this._columns; for (var i = 0, l = columns.length; i < l; i++) { var column = columns[i]; if (column.hidden) { continue; } var cellText = this.getColumnText(dataIndex, column, i); if (ariaLabel) { ariaLabel += ", "; } ariaLabel += cellText; } return ariaLabel; }; GridControl.prototype._updateSelectionStyles = function () { var _this = this; if (this._delayedUpdateCookie) { window.clearTimeout(this._delayedUpdateCookie); } this._delayedUpdateCookie = window.setTimeout(function () { var dataIndex, selectedRows = _this._selectedRows, focusIndex = _this._selectedIndex, rows = _this._rows; for (dataIndex in rows) { var rowInfo = rows[dataIndex]; _this._updateRowSelectionStyle(rowInfo, selectedRows, focusIndex); } }, 10); }; GridControl.prototype._selectionChanged = function () { this.selectionChanged(this._selectedIndex, this._selectionCount, this._selectedRows); this.fireCustomEvent(this._element, "selectionchanged", [{ selectedIndex: this._selectedIndex, selectedCount: this._selectionCount, selectedRows: this._selectedRows }]); }; GridControl.prototype._selectedIndexChanged = function (selectedRowIndex, selectedDataIndex) { this.selectedIndexChanged(selectedRowIndex, selectedDataIndex); this.fireCustomEvent(this._element, GridControl.EVENT_SELECTED_INDEX_CHANGED, [selectedRowIndex, selectedDataIndex]); }; GridControl.prototype._updateRowSelectionStyle = function (rowInfo, selectedRows, focusIndex) { var rowIndex = rowInfo.rowIndex; var rowElement = rowInfo.row; var gutterElement = rowInfo.gutterRow; rowElement.classList.remove("grid-row-selected"); rowElement.classList.remove("grid-row-selected-blur"); rowElement.classList.remove("grid-row-current"); if (gutterElement) { var checkbox = gutterElement.querySelector("input.checkbox"); if (checkbox) { checkbox.setAttribute("checked", String(false)); } } if (selectedRows && selectedRows.hasOwnProperty(rowIndex)) { if (gutterElement) { var checkbox = gutterElement.querySelector("input.checkbox"); if (checkbox) { checkbox.setAttribute("checked", String(false)); } } if (this._active) { rowElement.classList.add("grid-row-selected"); } else { rowElement.classList.add("grid-row-selected-blur"); } } if (rowIndex === focusIndex) { rowElement.classList.add("grid-row-current"); if (this._rowSelectedCallback) { this._rowSelectedCallback(); } } }; GridControl.prototype._measureCanvasSize = function () { this._canvasHeight = this._canvas.clientHeight; this._canvasWidth = this._canvas.clientWidth; }; GridControl.prototype._onContainerResize = function (e) { this.layout(); }; GridControl.prototype._setupMoveEvents = function () { var _this = this; document.addEventListener("mousemove", function (e) { return _this._onDocumentMouseMove(e); }); document.addEventListener("mouseup", function (e) { return _this._onDocumentMouseUp(e); }); }; GridControl.prototype._clearMoveEvents = function () { document.removeEventListener("mousemove", null, true); document.removeEventListener("mouseup", null, true); }; GridControl.prototype._onDocumentMouseMove = function (e) { var columnSizing = this._columnSizing; if (columnSizing && columnSizing.active === true) { var delta = e.pageX - columnSizing.origin; var newWidth = Math.max(15, columnSizing.originalWidth + delta); var column = this._columns[columnSizing.index]; column.width = newWidth; this._applyColumnSizing(columnSizing.index); this._moveSizingElement(columnSizing.index); } }; GridControl.prototype._onDocumentMouseUp = function (e) { var _this = this; window.setTimeout(function () { _this._tryFinishColumnSizing(false); }, 0); return false; }; GridControl.prototype._onHeaderMouseDown = function (e) { if (e.which !== 1) { return true; } var separator = this.findClosestElement(e.target, ".separator"); if (separator && separator._data) { var columnIndex = separator._data.columnIndex; var column = this._columns[columnIndex]; if (!column.fixed) { this._columnSizing = new ColumnSizing(true, columnIndex, column.width, e.pageX); this._moveSizingElement(columnIndex); this._setupMoveEvents(); e.stopImmediatePropagation(); e.preventDefault(); return false; } } }; GridControl.prototype._onHeaderMouseUp = function (e) { return false; }; GridControl.prototype._onHeaderClick = function (e) { var headerColumn = this.findClosestElement(e.target, ".grid-header-column"); if (headerColumn) { if (!this._columnSizing) { var separator = this.findClosestElement(e.target, ".separator"); if (separator && separator._data) { return false; } else if (headerColumn._data) { var columnIndex = headerColumn._data.columnIndex; var column = this._columns[columnIndex]; if (column.canSortBy && !column.fixed) { this._sortBy(column, e.shiftKey); } } } } }; GridControl.prototype._onHeaderDblClick = function (e) { var separator = this.findClosestElement(e.target, ".separator"); if (separator && separator._data) { this._tryFinishColumnSizing(true); var columnIndex = separator._data.columnIndex; var column = this._columns[columnIndex]; var maxLength = Math.max(column.maxLength || 0, 3); var ratio = 1.1 + 0.7 * Math.exp(-maxLength / 20); var originalWidth = column.width; column.width = (column.indentOffset || 0) + Math.round(maxLength * ratio * this._measurements.unitEx); this._applyColumnSizing(columnIndex, originalWidth, true); return false; } }; GridControl.prototype._onHasMoreClick = function (hasMoreItem) { var _this = this; var parentItem; var parentIndex; var hasMoreIndex; for (var i = 0; i < this._dataSource.length; i++) { if (this._dataSource[i] === hasMoreItem) { hasMoreIndex = i; break; } } if (typeof hasMoreIndex === "undefined") { return; } if (hasMoreIndex < this._expandStates.length) { for (var i = hasMoreIndex - 1; i >= 0; i--) { var expandState = Math.abs(this._expandStates[i]); if (expandState >= hasMoreIndex - i) { parentIndex = i; break; } } } if (typeof parentIndex === "undefined") { return; } parentItem = this._dataSource[parentIndex]; var expansionPath = this.getExpansionPath(parentIndex); this._getLoadMoreChildDataCallback(parentItem, expansionPath, function (dynamicData, hasMoreText) { if (dynamicData !== null) { _this._adjustForDynamicData(dynamicData.itemsWithPlaceholders, dynamicData.expandStates, parentIndex, hasMoreIndex, hasMoreText); } }); }; GridControl.prototype._moveSizingElement = function (columnIndex) { var left = this._measurements.gutterWidth; if (!this._sizingElement) { if (columnIndex < 0) { return; } this._sizingElement = this.createElementWithClass("div", "grid-column-sizing"); this._canvas.appendChild(this._sizingElement); } this._sizingElement.style.height = (this._canvas.clientHeight - 1) + "px"; this._sizingElement.style.top = this._scrollTop + "px"; if (columnIndex < 0) { this._sizingElement.style.left = "-5000px"; this._sizingElement.style.top = "-5000px"; this._sizingElement.style.height = 0 + "px"; } else { var i = 0; while (i <= columnIndex) { var column = this._columns[i++]; if (!column.hidden) { left += column.width; } } this._sizingElement.style.left = (left - 1) + "px"; } }; GridControl.prototype._getVisibleColumnIndex = function (columnIndex) { var columnCounter = 0, visibleColumnIndex = 0, length = this._columns.length; if (this._columns[columnIndex].hidden) { return -1; } while (columnCounter < columnIndex) { if (!this._columns[columnCounter].hidden) { visibleColumnIndex++; } columnCounter++; } return visibleColumnIndex; }; GridControl.prototype._applyColumnSizing = function (columnIndex, initialWidth, finish) { var domColumnIndex = this._getVisibleColumnIndex(columnIndex) + 1, column = this._columns[columnIndex], columnSizeChanged = false; initialWidth = initialWidth || -1; if (column) { columnSizeChanged = column.width !== initialWidth; var columnDiv = this.rootElement.querySelector(".grid-header-canvas .grid-header-column:nth-child(" + domColumnIndex + ")"); columnDiv.style.width = column.width + "px"; } if (finish === true) { if (columnSizeChanged) { this.layout(); } this._onColumnResize(column); } }; GridControl.prototype._onColumnResize = function (column) { this.fireCustomEvent(this._element, "columnresize", [column]); }; GridControl.prototype._tryFinishColumnSizing = function (cancel) { var columnSizing = this._columnSizing; if (columnSizing) { if (columnSizing.active === true) { if (!cancel) { this._applyColumnSizing(columnSizing.index, columnSizing.originalWidth, true); } this._moveSizingElement(-1); } this._columnSizing = null; this._clearMoveEvents(); } }; GridControl.prototype._getSortColumns = function (sortOrder) { var columns = this._columns, sortColumns = []; for (var i = 0, l = sortOrder.length; i < l; i++) { var c; var sc = sortOrder[i]; columns.forEach(function (element, index, array) { if (element.index === sc.index) { c = element; return false; } }); sortColumns.push(c); } return sortColumns; }; GridControl.prototype._sortBy = function (column, add) { var sortOrder = this._sortOrder.slice(0), found = false; if (column) { for (var i = 0, l = sortOrder.length; i < l; i++) { var sc = sortOrder[i]; if (sc.index === column.index) { sortOrder.splice(i, 1); found = true; break; } } var sc; if (found) { sc = new SortOrderInfo(sc.index, sc.order === "asc" ? "desc" : "asc"); } else { sc = new SortOrderInfo(column.index, "asc"); } if (add && this._options.allowSortOnMultiColumns) { sortOrder.push(sc); } else { sortOrder = [sc]; } } var sortColumns = this._getSortColumns(sortOrder); this._onSort(sortOrder, sortColumns); }; GridControl.prototype._onSort = function (sortOrder, sortColumns) { if (this.onSort(sortOrder, sortColumns) !== false) { this.fireCustomEvent(this._element, "sort", [{ sortOrder: sortOrder, sortColumns: sortColumns }]); } }; GridControl.prototype._trySorting = function (sortOrder, sortColumns) { var _this = this; if (!sortColumns) { sortColumns = this._getSortColumns(sortOrder); } var selectedDatas = [], sumOfSelectedRowIndices = 0; for (var rowIndex in this._selectedRows) { var dataIndex = this._selectedRows[rowIndex]; var data = this._dataSource[dataIndex]; if (data) { selectedDatas.push(data); sumOfSelectedRowIndices += parseInt(rowIndex); } } var rootNode = new TreeNode(null, null); GridControl.addItemsToTree(this._dataSource, this._expandStates, 0, this._dataSource.length, rootNode); if (this._sortOrder && this._sortOrder.length === 1 && sortOrder.length === 1 && this._sortOrder[0] !== sortOrder[0] && this._sortOrder[0].index === sortOrder[0].index) { if (this._sortOrder[0].order !== sortOrder[0].order) { GridControl.walkTree(rootNode, function (node) { Utility.TreeNodeSort.stableReverse(node.children, function (v1, v2) { return Utility.TreeNodeSort.sortComparer(sortOrder, sortColumns, v1.data, v2.data); }); }); } } else { GridControl.walkTree(rootNode, function (node) { node.children.sort(function (v1, v2) { return Utility.TreeNodeSort.sortComparer(sortOrder, sortColumns, v1.data, v2.data); }); }); } this._dataSource = []; this._expandStates = []; for (var i = 0; i < rootNode.children.length; i++) { GridControl.walkTree(rootNode.children[i], function (node) { _this._dataSource.push(node.data); _this._expandStates.push(node.expandState); }); } this._indentLevels = GridControl.expand(this._expandStates); this._updateRanges(); if (this._selectionCount > 0) { this._clearSelection(); var sumOfNewSelectedRowIndices = 0; for (var i = 0; i < selectedDatas.length; i++) { var dataIndex = this._dataSource.indexOf(selectedDatas[i]); if (dataIndex >= 0) { var dataRowIndex = this._getRowIndex(dataIndex); this._addSelection(dataRowIndex, dataIndex); sumOfNewSelectedRowIndices += dataRowIndex; } } this._scrollTop += (sumOfNewSelectedRowIndices - sumOfSelectedRowIndices) / this._selectionCount * this._measurements.rowHeight; } }; GridControl.prototype._onCanvasScroll = function (e) { var canvas = this._canvas; this._resetScroll = true; this._scrollLeft = canvas.scrollLeft; this._scrollTop = canvas.scrollTop; if (!this._ignoreScroll) { this._redraw(); } return false; }; GridControl.prototype._getClickedCell = function (e) { return this.findClosestElement(e.target, ".grid-cell"); }; GridControl.prototype._createEditCellBox = function (rowDataIndex, columnIndex, editElement, editCallback) { var previousValue = editElement.innerText; var editBox = this.createElementWithClass("input", "grid-edit-box"); editBox.setAttribute("type", "text"); editBox.setAttribute("value", previousValue); function commitValue(e) { var data = editBox.value; editElement.innerText = data; if (editCallback) { editCallback(data, rowDataIndex, columnIndex); e.stopPropagation(); e.preventDefault(); return false; } } editBox.addEventListener("focusout", function (e) { commitValue(e); }); editBox.addEventListener("keydown", function (e) { if (e.keyCode === 13 /* Enter */) { commitValue(e); } else if (e.keyCode === 27 /* Escape */) { editElement.innerText = previousValue; e.stopPropagation(); e.preventDefault(); return false; } }); editElement.innerHTML = ""; editElement.appendChild(editBox); editBox.select(); editBox.focus(); }; GridControl.prototype._onEditCell = function (e) { var targetElement = e.target; if (!targetElement.classList.contains("grid-tree-icon")) { var cellElement = this._getClickedCell(e); if (cellElement && cellElement.classList.contains("grid-cell-editable")) { var rowInfo = this.getRowInfoFromEvent(e, ".grid-row"); if (rowInfo) { var cells = rowInfo.row.children; var totalCells = cells.length; var columnIndex = -1; for (var index = 0; index < totalCells; index++) { if (cellElement === cells[index]) { columnIndex = index; } } this._createEditCellBox(rowInfo.dataIndex, columnIndex, cellElement, this._editCellCallback); } } } }; GridControl.prototype._onRowMouseDown = function (e) { var rowInfo = this.getRowInfoFromEvent(e, ".grid-row"); if (rowInfo) { var targetElement = e.target; if (e.which === 1 && targetElement.classList.contains("grid-tree-icon")) { this._onToggle(rowInfo); } else if (!(e.which === 3 && this._options && this._options.disableRightClickSelection)) { this._selectRow(rowInfo.rowIndex, rowInfo.dataIndex, { ctrl: e.ctrlKey, shift: e.shiftKey, rightClick: e.which === 3 }); } } }; GridControl.prototype._onGutterClick = function (e) { var rowInfo = this.getRowInfoFromEvent(e, ".grid-gutter-row"); if (rowInfo) { if (!this._selectedRows || typeof (this._selectedRows[rowInfo.rowIndex]) !== "number") { this._selectRow(rowInfo.rowIndex, rowInfo.dataIndex); } } }; GridControl.prototype._onBlur = function (e) { var targetElement = e.target; if (targetElement.classList.contains("grid-edit-box")) { e.stopPropagation(); return; } this._active = false; this._updateSelectionStyles(); }; GridControl.prototype._onFocus = function (e) { var targetElement = e.target; if (targetElement.classList.contains("grid-edit-box")) { e.stopPropagation(); return; } this._active = true; this._updateSelectionStyles(); this._updateAriaAttribute(); }; GridControl.prototype._onKeyDown = function (e) { var bounds = { lo: -1, hi: -1 }, keyCode = Common.KeyCodes, canvas = this._canvas; if (this._options.isGridDisabled) { return false; } if (this._copyInProgress) { if (e.keyCode === 27 /* Escape */) { if (this._cancelable) { this._cancelable.cancel(); } } return false; } if (this._count > 0) { bounds = { lo: 0, hi: this._expandedCount - 1 }; } if (this._selectedIndex < 0) { this._addSelection(bounds.lo); } var bubbleUp = false; switch (e.keyCode) { case 65 /* A */: if (e.ctrlKey) { this._selectAll(); } else { return true; } break; case 40 /* ArrowDown */: this._clearSelection(); if (e.ctrlKey) { if (e.shiftKey) { this._addSelectionRange(bounds.hi); } else { this._addSelection(bounds.hi); } } else { if (e.shiftKey) { this._addSelectionRange(Math.min(this._selectedIndex + 1, bounds.hi)); } else { this._addSelection(Math.min(this._selectedIndex + 1, bounds.hi)); } } break; case 38 /* ArrowUp */: this._clearSelection(); if (e.ctrlKey) { if (e.shiftKey) { this._addSelectionRange(bounds.lo); } else { this._addSelection(bounds.lo); } } else { if (e.shiftKey) { this._addSelectionRange(Math.max(this._selectedIndex - 1, bounds.lo)); } else { this._addSelection(Math.max(this._selectedIndex - 1, bounds.lo)); } } break; case 34 /* PageDown */: case 33 /* PageUp */: var span = canvas.clientHeight; var rowsPerPage = Math.floor(span / this._measurements.rowHeight); this._clearSelection(); if (e.keyCode === 34 /* PageDown */) { if (e.shiftKey) { this._addSelectionRange(Math.min(this._selectedIndex + rowsPerPage, bounds.hi)); } else { this._addSelection(Math.min(this._selectedIndex + rowsPerPage, bounds.hi)); } } else { if (e.shiftKey) { this._addSelectionRange(Math.max(this._selectedIndex - rowsPerPage, bounds.lo)); } else { this._addSelection(Math.max(this._selectedIndex - rowsPerPage, bounds.lo)); } } break; case 39 /* ArrowRight */: if (!this.tryToggle(true, e.shiftKey) && this._expandStates[this._getDataIndex(this._selectedIndex)] !== 0) { this._addSelection(Math.min(this._selectedIndex + 1, bounds.hi)); } else { this._clearSelection(); this._addSelection(this._selectedIndex); } break; case 37 /* ArrowLeft */: if (!this.tryToggle(false, e.shiftKey)) { var newSelection = this._selectedIndex; if (this._indentLevels !== null) { var currIndentLevel = this._indentLevels[this._getDataIndex(this._selectedIndex)]; while (currIndentLevel > 1 && newSelection > bounds.lo && this._indentLevels[this._getDataIndex(newSelection)] >= currIndentLevel) { --newSelection; } } this._addSelection(Math.max(newSelection, bounds.lo)); } else { this._clearSelection(); this._addSelection(this._selectedIndex); } break; case 36 /* Home */: this._clearSelection(); if (e.shiftKey) { this._addSelectionRange(bounds.lo); } else { this._addSelection(bounds.lo); } break; case 35 /* End */: this._clearSelection(); if (e.shiftKey) { this._addSelectionRange(bounds.hi); } else { this._addSelection(bounds.hi); } break; case 9 /* Tab */: if (document.activeElement !== this.getElement()) { this.getElement().setActive(); } bubbleUp = true; break; default: bubbleUp = true; } this.getSelectedRowIntoView(); if (!bubbleUp) { e.preventDefault(); } return false; }; GridControl.prototype._onToggle = function (rowInfo) { if (this._expandStates) { var state = this._expandStates[rowInfo.dataIndex]; if (state !== 0) { if (state > 0) { this.collapseNode(rowInfo.dataIndex); } else if (state < 0) { this.expandNode(rowInfo.dataIndex); } this._clearSelection(); this._addSelection(Math.min(rowInfo.rowIndex, this._expandedCount - 1), rowInfo.dataIndex); this._layoutContentSpacer(); this._redraw(); } } }; GridControl.TYPE_NAME = "GridControl"; GridControl.MAX_COPY_SIZE = 1000; GridControl.PAYLOAD_SIZE = 200; GridControl.EVENT_SELECTED_INDEX_CHANGED = "selectedIndexChanged"; GridControl.GlobalGridInstanceNumber = 0; return GridControl; })(Legacy.Control); Grid.GridControl = GridControl; })(Legacy.Grid || (Legacy.Grid = {})); var Grid = Legacy.Grid; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // SourceInfoTooltip.ts var Common; (function (Common) { (function (Controls) { (function (Legacy) { "use strict"; var SourceInfoTooltip = (function () { function SourceInfoTooltip(sourceInfo, name, nameLabelResourceId) { this._rootContainer = document.createElement("div"); this._rootContainer.className = "sourceInfoTooltip"; if (name && nameLabelResourceId) { this.addDiv("sourceInfoNameLabel", Plugin.Resources.getString(nameLabelResourceId)); this.addDiv("sourceInfoName", name); } this.addDiv("sourceInfoFileLabel", Plugin.Resources.getString("SourceInfoFileLabel")); this.addDiv("sourceInfoFile", sourceInfo.source); this.addDiv("sourceInfoLineLabel", Plugin.Resources.getString("SourceInfoLineLabel")); this.addDiv("sourceInfoLine", Common.FormattingHelpers.getDecimalLocaleString(sourceInfo.line, true)); this.addDiv("sourceInfoColumnLabel", Plugin.Resources.getString("SourceInfoColumnLabel")); this.addDiv("sourceInfoColumn", Common.FormattingHelpers.getDecimalLocaleString(sourceInfo.column, true)); } Object.defineProperty(SourceInfoTooltip.prototype, "html", { get: function () { return this._rootContainer.outerHTML; }, enumerable: true, configurable: true }); SourceInfoTooltip.prototype.addDiv = function (className, textContent) { var div = document.createElement("div"); div.className = className; div.textContent = textContent; this._rootContainer.appendChild(div); }; return SourceInfoTooltip; })(); Legacy.SourceInfoTooltip = SourceInfoTooltip; })(Controls.Legacy || (Controls.Legacy = {})); var Legacy = Controls.Legacy; })(Common.Controls || (Common.Controls = {})); var Controls = Common.Controls; })(Common || (Common = {})); // Diagnostics.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (Diagnostics) { var HelperProxy = (function () { function HelperProxy() { this._proxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.PerformanceToolHost.Package.Extensions.DiagnosticsHelper", {}, true); } HelperProxy.prototype.getFileContents = function (filePath) { return this._proxy._call("getFileContents", filePath); }; return HelperProxy; })(); Diagnostics.HelperProxy = HelperProxy; var HubDiagnosticSession = (function () { function HubDiagnosticSession() { this._agentGuid = "B9B36E3F-BC87-440C-901E-7FC364FC5BBB"; this._eventManager = new Plugin.Utilities.EventManager(); this._isAttached = false; this._privatePorts = {}; this._helper = new HelperProxy(); this._standardCollector = Microsoft.VisualStudio.DiagnosticsHub.Collectors.getStandardTransportService(); if (this._standardCollector) { this._standardCollector.addMessageListener(this._agentGuid, this.onMessageReceived.bind(this)); } } HubDiagnosticSession.prototype.addEventListener = function (type, listener) { this._eventManager.addEventListener(type, listener); }; HubDiagnosticSession.prototype.createPort = function (portName) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1028")); }; HubDiagnosticSession.prototype.isAttached = function () { return Plugin.Promise.wrap(this._isAttached); }; HubDiagnosticSession.prototype.loadScriptInProc = function (scriptFileName) { var _this = this; var baseDir = document.location.href.substring(0, document.location.href.lastIndexOf("/")); var filePath = baseDir + "/" + scriptFileName; var fileName = HubDiagnosticSession.getFileName(scriptFileName); this._helper.getFileContents(filePath).done(function (contents) { var obj = { commandName: "loadScriptInProc", fileName: fileName, script: contents }; var message = JSON.stringify(obj); _this.sendMessage(message); }); }; HubDiagnosticSession.prototype.removeEventListener = function (type, listener) { this._eventManager.removeEventListener(type, listener); }; HubDiagnosticSession.getFileName = function (filePath) { var index = filePath.lastIndexOf("/"); if (index == -1) { index = filePath.lastIndexOf("\\"); } if (index > -1) { filePath = filePath.substring(index + 1); } return filePath; }; HubDiagnosticSession.prototype.createPortInternal = function (portName) { var _this = this; if (this._privatePorts.hasOwnProperty(portName)) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1029")); } var internalData = { isConnected: false, eventManager: new Plugin.Utilities.EventManager() }; var port = { name: portName, postMessage: function (data) { if (internalData.isConnected) { var obj = { commandName: "message", portName: portName, jsonData: data }; var message = JSON.stringify(obj); _this.sendMessage(message); } else { throw new Error(Plugin.Resources.getErrorString("JSPerf.1030")); } }, addEventListener: internalData.eventManager.addEventListener.bind(internalData.eventManager), removeEventListener: internalData.eventManager.removeEventListener.bind(internalData.eventManager) }; var privatePort = { internalData: internalData, port: port }; this._privatePorts[portName] = privatePort; return privatePort; }; HubDiagnosticSession.prototype.onMessageReceived = function (message) { if (message) { var obj = JSON.parse(message); var args = null; if (obj.eventName) { switch (obj.eventName) { case "attach": this._isAttached = true; this._eventManager.dispatchEvent(obj.eventName); break; case "connect": var connectEvent = obj; if (!connectEvent.portName) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1031")); } var privatePort = this.createPortInternal(connectEvent.portName); privatePort.internalData.isConnected = true; this._eventManager.dispatchEvent(obj.eventName, privatePort.port); break; case "detach": this._isAttached = false; this._eventManager.dispatchEvent(obj.eventName); break; case "message": args = obj; if (!args.portName) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1032")); } var privatePort = this._privatePorts[args.portName]; if (privatePort) { args = { data: args.jsonData }; privatePort.internalData.eventManager.dispatchEvent("message", args); } break; default: this._eventManager.dispatchEvent(obj.eventName); break; } } } }; HubDiagnosticSession.prototype.sendMessage = function (message) { this._standardCollector.sendStringToCollectionAgent(this._agentGuid, message).done(function (response) { if (response) { var obj = JSON.parse(response); if (!obj.succeeded) { throw new Error(obj.errorMessage); } } }); }; return HubDiagnosticSession; })(); Diagnostics.HubDiagnosticSession = HubDiagnosticSession; var F12DiagnosticsSession = (function () { function F12DiagnosticsSession(externalObj) { this._externalObj = externalObj; } F12DiagnosticsSession.prototype.addEventListener = function (type, listener) { this._externalObj.addEventListener(type, listener); }; F12DiagnosticsSession.prototype.createPort = function (portName) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1028")); }; F12DiagnosticsSession.prototype.isAttached = function () { return Plugin.Promise.wrap(this._externalObj.isAttached); }; F12DiagnosticsSession.prototype.loadScriptInProc = function (fileName) { this._externalObj.loadScriptInProc(fileName); }; F12DiagnosticsSession.prototype.removeEventListener = function (type, listener) { this._externalObj.removeEventListener(type, listener); }; return F12DiagnosticsSession; })(); Diagnostics.F12DiagnosticsSession = F12DiagnosticsSession; })(MemoryAnalyzer.Diagnostics || (MemoryAnalyzer.Diagnostics = {})); var Diagnostics = MemoryAnalyzer.Diagnostics; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // enumHelper.ts var Common; (function (Common) { "use strict"; var Enum = (function () { function Enum() { } Enum.GetName = function (enumType, value) { var result; if (enumType) { for (var enumKey in enumType) { if (enumType.hasOwnProperty(enumKey)) { var enumValue = enumType[enumKey]; if (enumValue === value) { result = enumKey; break; } } } } if (!result) { result = value.toString(); } return result; }; Enum.Parse = function (enumType, name, ignoreCase) { if (typeof ignoreCase === "undefined") { ignoreCase = true; } var result; if (enumType) { if (ignoreCase) { name = name.toLowerCase(); } for (var enumKey in enumType) { if (enumType.hasOwnProperty(enumKey)) { var compareAginst = enumKey.toString(); if (ignoreCase) { compareAginst = compareAginst.toLowerCase(); } if (name === compareAginst) { result = enumType[enumKey]; break; } } } } return result; }; Enum.GetValues = function (enumType) { var result = []; if (enumType) { for (var enumKey in enumType) { if (enumType.hasOwnProperty(enumKey)) { var enumValue = enumType[enumKey]; if (typeof enumValue === "number") { result.push(enumValue); } } } } return result; }; return Enum; })(); Common.Enum = Enum; })(Common || (Common = {})); // eventHelper.ts var Common; (function (Common) { "use strict"; var Publisher = (function () { function Publisher(events) { this._events = {}; this._listeners = {}; if (events && events.length > 0) { for (var i = 0; i < events.length; i++) { var type = events[i]; if (type) { this._events[type] = type; } } } else { throw Error("Events are null or empty."); } } Publisher.prototype.addEventListener = function (eventType, func) { if (eventType && func) { var type = this._events[eventType]; if (type) { var callbacks = this._listeners[type] ? this._listeners[type] : this._listeners[type] = []; callbacks.push(func); } } }; Publisher.prototype.removeEventListener = function (eventType, func) { if (eventType && func) { var callbacks = this._listeners[eventType]; if (callbacks) { for (var i = 0; i < callbacks.length; i++) { if (func === callbacks[i]) { callbacks.splice(i, 1); break; } } } } }; Publisher.prototype.invokeListener = function (args) { if (args.type) { var callbacks = this._listeners[args.type]; if (callbacks) { for (var i = 0; i < callbacks.length; i++) { var func = callbacks[i]; if (func) { func(args); } } } } }; return Publisher; })(); Common.Publisher = Publisher; })(Common || (Common = {})); // formattingHelpers.ts var Common; (function (Common) { "use strict"; var FormattingHelpers = (function () { function FormattingHelpers() { } FormattingHelpers.getDecimalLocaleString = function (numberToConvert, includeGroupSeparators) { var numberString = Math.abs(numberToConvert).toString(); var split = numberString.split(/e/i); numberString = split[0]; var exponent = (split.length > 1 ? parseInt(split[1], 10) : 0); split = numberString.split("."); numberString = (numberToConvert < 0 ? "-" : "") + split[0]; var right = split.length > 1 ? split[1] : ""; if (exponent > 0) { right = FormattingHelpers.zeroPad(right, exponent, false); numberString += right.slice(0, exponent); right = right.substr(exponent); } else if (exponent < 0) { exponent = -exponent; numberString = FormattingHelpers.zeroPad(numberString, exponent + 1, true); right = numberString.slice(-exponent, numberString.length) + right; numberString = numberString.slice(0, -exponent); } var nf = Plugin.Culture.NumberFormat; if (!nf) { nf = { numberDecimalSeparator: ".", numberGroupSizes: [3], numberGroupSeparator: "," }; } if (right.length > 0) { right = nf.numberDecimalSeparator + right; } if (includeGroupSeparators === true) { var groupSizes = nf.numberGroupSizes, sep = nf.numberGroupSeparator, curSize = groupSizes[0], curGroupIndex = 1, stringIndex = numberString.length - 1, ret = ""; while (stringIndex >= 0) { if (curSize === 0 || curSize > stringIndex) { if (ret.length > 0) { return numberString.slice(0, stringIndex + 1) + sep + ret + right; } else { return numberString.slice(0, stringIndex + 1) + right; } } if (ret.length > 0) { ret = numberString.slice(stringIndex - curSize + 1, stringIndex + 1) + sep + ret; } else { ret = numberString.slice(stringIndex - curSize + 1, stringIndex + 1); } stringIndex -= curSize; if (curGroupIndex < groupSizes.length) { curSize = groupSizes[curGroupIndex]; curGroupIndex++; } } return numberString.slice(0, stringIndex + 1) + sep + ret + right; } else { return numberString + right; } }; FormattingHelpers.stripNewLine = function (text) { return text.replace(/[\r?\n]/g, ""); }; FormattingHelpers.zeroPad = function (stringToPad, newLength, padLeft) { var zeros = []; for (var i = stringToPad.length; i < newLength; i++) { zeros.push("0"); } return (padLeft ? (zeros.join("") + stringToPad) : (stringToPad + zeros.join(""))); }; return FormattingHelpers; })(); Common.FormattingHelpers = FormattingHelpers; })(Common || (Common = {})); // TokenExtractor.ts var Common; (function (Common) { "use strict"; (function (TokenType) { TokenType[TokenType["General"] = 0] = "General"; TokenType[TokenType["String"] = 1] = "String"; TokenType[TokenType["Number"] = 2] = "Number"; TokenType[TokenType["Html"] = 3] = "Html"; TokenType[TokenType["HtmlTagName"] = 4] = "HtmlTagName"; TokenType[TokenType["HtmlTagDelimiter"] = 5] = "HtmlTagDelimiter"; TokenType[TokenType["HtmlAttributeName"] = 6] = "HtmlAttributeName"; TokenType[TokenType["HtmlAttributeValue"] = 7] = "HtmlAttributeValue"; TokenType[TokenType["EqualOperator"] = 8] = "EqualOperator"; })(Common.TokenType || (Common.TokenType = {})); var TokenType = Common.TokenType; (function (HtmlRegexGroup) { HtmlRegexGroup[HtmlRegexGroup["PreHtmlString"] = 1] = "PreHtmlString"; HtmlRegexGroup[HtmlRegexGroup["StartDelimiter"] = 2] = "StartDelimiter"; HtmlRegexGroup[HtmlRegexGroup["TagName"] = 3] = "TagName"; HtmlRegexGroup[HtmlRegexGroup["IdAttribute"] = 4] = "IdAttribute"; HtmlRegexGroup[HtmlRegexGroup["IdEqualToToken"] = 5] = "IdEqualToToken"; HtmlRegexGroup[HtmlRegexGroup["IdAttributeValue"] = 6] = "IdAttributeValue"; HtmlRegexGroup[HtmlRegexGroup["ClassAttribute"] = 7] = "ClassAttribute"; HtmlRegexGroup[HtmlRegexGroup["ClassEqualToToken"] = 8] = "ClassEqualToToken"; HtmlRegexGroup[HtmlRegexGroup["ClassAttributeValue"] = 9] = "ClassAttributeValue"; HtmlRegexGroup[HtmlRegexGroup["SrcAttribute"] = 10] = "SrcAttribute"; HtmlRegexGroup[HtmlRegexGroup["SrcEqualToToken"] = 11] = "SrcEqualToToken"; HtmlRegexGroup[HtmlRegexGroup["SrcAttributeValue"] = 12] = "SrcAttributeValue"; HtmlRegexGroup[HtmlRegexGroup["EndDelimiter"] = 13] = "EndDelimiter"; HtmlRegexGroup[HtmlRegexGroup["PostHtmlString"] = 14] = "PostHtmlString"; })(Common.HtmlRegexGroup || (Common.HtmlRegexGroup = {})); var HtmlRegexGroup = Common.HtmlRegexGroup; (function (AssignmentRegexGroup) { AssignmentRegexGroup[AssignmentRegexGroup["LeftHandSide"] = 1] = "LeftHandSide"; AssignmentRegexGroup[AssignmentRegexGroup["EqualToOperator"] = 2] = "EqualToOperator"; AssignmentRegexGroup[AssignmentRegexGroup["RightHandSide"] = 3] = "RightHandSide"; AssignmentRegexGroup[AssignmentRegexGroup["PostString"] = 4] = "PostString"; })(Common.AssignmentRegexGroup || (Common.AssignmentRegexGroup = {})); var AssignmentRegexGroup = Common.AssignmentRegexGroup; var TokenExtractor = (function () { function TokenExtractor() { } TokenExtractor.getHtmlTokens = function (text) { var tokenTypeMap = []; if (!text) { return tokenTypeMap; } var tokens = TokenExtractor.HTML_REGEX.exec(text); if (tokens) { if (tokens[1 /* PreHtmlString */]) { tokenTypeMap.push({ type: 0 /* General */, value: tokens[1 /* PreHtmlString */].toString() }); } if (tokens[2 /* StartDelimiter */]) { tokenTypeMap.push({ type: 5 /* HtmlTagDelimiter */, value: tokens[2 /* StartDelimiter */].toString() }); } if (tokens[3 /* TagName */]) { tokenTypeMap.push({ type: 4 /* HtmlTagName */, value: tokens[3 /* TagName */].toString() }); } if (tokens[4 /* IdAttribute */]) { tokenTypeMap.push({ type: 6 /* HtmlAttributeName */, value: tokens[4 /* IdAttribute */].toString() }); } if (tokens[5 /* IdEqualToToken */]) { tokenTypeMap.push({ type: 8 /* EqualOperator */, value: tokens[5 /* IdEqualToToken */].toString() }); } if (tokens[6 /* IdAttributeValue */] !== undefined) { tokenTypeMap.push({ type: 7 /* HtmlAttributeValue */, value: tokens[6 /* IdAttributeValue */].toString() }); } if (tokens[7 /* ClassAttribute */]) { tokenTypeMap.push({ type: 6 /* HtmlAttributeName */, value: tokens[7 /* ClassAttribute */].toString() }); } if (tokens[8 /* ClassEqualToToken */]) { tokenTypeMap.push({ type: 8 /* EqualOperator */, value: tokens[8 /* ClassEqualToToken */].toString() }); } if (tokens[9 /* ClassAttributeValue */] !== undefined) { tokenTypeMap.push({ type: 7 /* HtmlAttributeValue */, value: tokens[9 /* ClassAttributeValue */].toString() }); } if (tokens[10 /* SrcAttribute */]) { tokenTypeMap.push({ type: 6 /* HtmlAttributeName */, value: tokens[10 /* SrcAttribute */].toString() }); } if (tokens[11 /* SrcEqualToToken */]) { tokenTypeMap.push({ type: 8 /* EqualOperator */, value: tokens[11 /* SrcEqualToToken */].toString() }); } if (tokens[12 /* SrcAttributeValue */] !== undefined) { tokenTypeMap.push({ type: 7 /* HtmlAttributeValue */, value: tokens[12 /* SrcAttributeValue */].toString() }); } if (tokens[13 /* EndDelimiter */]) { tokenTypeMap.push({ type: 5 /* HtmlTagDelimiter */, value: tokens[13 /* EndDelimiter */].toString() }); } if (tokens[14 /* PostHtmlString */]) { tokenTypeMap.push({ type: 0 /* General */, value: tokens[14 /* PostHtmlString */].toString() }); } } else { tokenTypeMap.push({ type: 0 /* General */, value: text }); } return tokenTypeMap; }; TokenExtractor.getStringTokens = function (text) { var tokenTypeMap = []; if (!text) { return tokenTypeMap; } var tokens = TokenExtractor.STRING_REGEX.exec(text); if (tokens) { if (tokens[1 /* LeftHandSide */]) { tokenTypeMap.push({ type: 0 /* General */, value: tokens[1 /* LeftHandSide */].toString() }); } if (tokens[2 /* EqualToOperator */]) { tokenTypeMap.push({ type: 0 /* General */, value: tokens[2 /* EqualToOperator */].toString() }); } if (tokens[3 /* RightHandSide */]) { tokenTypeMap.push({ type: 1 /* String */, value: tokens[3 /* RightHandSide */].toString() }); } if (tokens[4 /* PostString */]) { tokenTypeMap.push({ type: 0 /* General */, value: tokens[4 /* PostString */].toString() }); } } else { tokenTypeMap.push({ type: 0 /* General */, value: text }); } return tokenTypeMap; }; TokenExtractor.getNumberTokens = function (text) { var tokenTypeMap = []; if (!text) { return tokenTypeMap; } var tokens = TokenExtractor.NUMBER_REGEX.exec(text); if (tokens) { if (tokens[1 /* LeftHandSide */]) { tokenTypeMap.push({ type: 0 /* General */, value: tokens[1 /* LeftHandSide */].toString() }); } if (tokens[2 /* EqualToOperator */]) { tokenTypeMap.push({ type: 0 /* General */, value: tokens[2 /* EqualToOperator */].toString() }); } if (tokens[3 /* RightHandSide */]) { tokenTypeMap.push({ type: 2 /* Number */, value: tokens[3 /* RightHandSide */].toString() }); } if (tokens[4 /* PostString */]) { tokenTypeMap.push({ type: 0 /* General */, value: tokens[4 /* PostString */].toString() }); } } else { tokenTypeMap.push({ type: 0 /* General */, value: text }); } return tokenTypeMap; }; TokenExtractor.getCssClass = function (tokenType) { switch (tokenType) { case 1 /* String */: return "valueStringToken-String"; case 2 /* Number */: return "valueStringToken-Number"; case 4 /* HtmlTagName */: return "perftools-Html-Element-Tag"; case 6 /* HtmlAttributeName */: return "perftools-Html-Attribute"; case 7 /* HtmlAttributeValue */: return "perftools-Html-Value"; case 5 /* HtmlTagDelimiter */: return "perftools-Html-Tag"; case 8 /* EqualOperator */: return "perftools-Html-Operator"; default: return ""; } }; TokenExtractor.isHtmlExpression = function (text) { return TokenExtractor.GENERAL_HTML_REGEX.test(text); }; TokenExtractor.isStringExpression = function (text) { return TokenExtractor.STRING_REGEX.test(text); }; TokenExtractor.GENERAL_HTML_REGEX = /^<.*>/; TokenExtractor.HTML_REGEX = /(^.*)?(<)([^\s]+)(?:( id)(=)(\".*?\"))?(?:( class)(=)(\".*?\"))?(?:( src)(=)(\".*?\"))?(>)(.*$)?/; TokenExtractor.NUMBER_REGEX = /(.*)?(=)( ?-?\d+(?:.\d+)?)(.*$)?/; TokenExtractor.STRING_REGEX = /(^.*?)(=)( ?\".*\")(.*$)?/; return TokenExtractor; })(); Common.TokenExtractor = TokenExtractor; })(Common || (Common = {})); // hostShell.ts var Common; (function (Common) { (function (Extensions) { "use strict"; var HostShellProxy = (function () { function HostShellProxy() { this._hostShellProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.PerformanceToolHost.Package.Extensions.Core.HostShell", {}, true); } HostShellProxy.prototype.setStatusBarText = function (text, highlight) { return this._hostShellProxy._call("setStatusBarText", text, highlight || false); }; return HostShellProxy; })(); Extensions.HostShellProxy = HostShellProxy; var LocalHostShell = (function () { function LocalHostShell() { } LocalHostShell.prototype.setStatusBarText = function (statusText, highlight) { return Plugin.Promise.as(null); }; return LocalHostShell; })(); Extensions.LocalHostShell = LocalHostShell; })(Common.Extensions || (Common.Extensions = {})); var Extensions = Common.Extensions; })(Common || (Common = {})); // Notifications.ts "use strict"; var Notifications = (function () { function Notifications() { } Object.defineProperty(Notifications, "isTestMode", { get: function () { return window["TestMode"]; }, enumerable: true, configurable: true }); Object.defineProperty(Notifications, "notifications", { get: function () { if (!Notifications._notifications) { Notifications._notifications = new Plugin.Utilities.EventManager(); } return Notifications._notifications; }, enumerable: true, configurable: true }); Notifications.subscribe = function (type, listener) { if (Notifications.isTestMode) { Notifications.notifications.addEventListener(type, listener); } }; Notifications.unsubscribe = function (type, listener) { if (Notifications.isTestMode) { Notifications.notifications.removeEventListener(type, listener); } }; Notifications.subscribeOnce = function (type, listener) { if (Notifications.isTestMode) { function onNotify() { Notifications.unsubscribe(type, onNotify); listener.apply(this, arguments); } Notifications.subscribe(type, onNotify); } }; Notifications.notify = function (type, details) { if (Notifications.isTestMode) { Notifications.notifications.dispatchEvent(type, details); } }; return Notifications; })(); // Packager.ts var Common; (function (Common) { (function (Data) { "use strict"; var F12Packager = (function () { function F12Packager(packagerProxy) { this._proxy = packagerProxy; if (!this._proxy) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1074")); } } F12Packager.prototype.openPackage = function (streamId) { try { this._proxy.openPackage(streamId); } catch (e) { if (console) { console.log("failed openPackage call on packager. Message: " + e.message); } throw new Error(Plugin.Resources.getErrorString("JSPerf.1077")); } }; F12Packager.prototype.createPackage = function (toolId, packagePath) { if (!packagePath) { packagePath = this.generateRandomName() + F12Packager.DIAGSESSION_EXTENSION; } try { this._proxy.createPackage(toolId, packagePath); } catch (e) { if (console) { console.log("failed createPackage call on packager. Message: " + e.message); } throw new Error(Plugin.Resources.getErrorString("JSPerf.1077")); } return packagePath; }; F12Packager.prototype.hasToolData = function (toolId) { try { return this._proxy.hasToolData(toolId); } catch (e) { if (console) { console.log("failed hadToolData call on packager. Message: " + e.message); } throw new Error(Plugin.Resources.getErrorString("JSPerf.1077")); } }; F12Packager.prototype.addResource = function (resourceType, path, resourceName) { try { this._proxy.addResourceToPackage(resourceType, path, resourceName); } catch (e) { if (console) { console.log("failed addResource call on packager. Message: " + e.message); } throw new Error(Plugin.Resources.getErrorString("JSPerf.1077")); } }; F12Packager.prototype.getResourcePathsByType = function (resourceType) { try { return this._proxy.getResourcePathsByType(resourceType); } catch (e) { if (console) { console.log("failed getResourcePathsByType call on packager. Message: " + e.message); } throw new Error(Plugin.Resources.getErrorString("JSPerf.1077")); } }; F12Packager.prototype.commit = function () { try { this._proxy.commitPackage(); } catch (e) { if (console) { console.log("failed commit call on packager. Message: " + e.message); } throw new Error(Plugin.Resources.getErrorString("JSPerf.1077")); } }; F12Packager.prototype.closePackage = function () { try { this._proxy.closePackage(); } catch (e) { if (console) { console.log("failed closePackage call on packager. Message: " + e.message); } throw new Error(Plugin.Resources.getErrorString("JSPerf.1077")); } }; F12Packager.prototype.generateRandomName = function () { return Math.random().toString(36).substring(2); }; F12Packager.DIAGSESSION_EXTENSION = ".diagsession"; return F12Packager; })(); Data.F12Packager = F12Packager; })(Common.Data || (Common.Data = {})); var Data = Common.Data; })(Common || (Common = {})); // Constants.ts var Common; (function (Common) { "use strict"; var Constants = (function () { function Constants() { } Constants.E_ABORT = -2147467260; Constants.MINIMUM_REQUIRED_DOCUMENT_MODE = 10; Constants.MEMORY_ANALYZER_SNAPSHOT_RESOURCE_TYPE = "MemoryAnalyzer.Resource.Snapshot"; Constants.MEMORY_ANALYZER_SNAPSHOT_ROOT_PATH = "%temp%\\Microsoft\\F12\\perftools\\memory\\"; Constants.MEMORY_ANALYZER_TOOL_GUID = "BE2D5223-40F7-4428-A9A0-AF888725C1FB"; Constants.UI_RESPONSIVENESS_TOOL_GUID = "{0615D892-30B0-4ADA-AFAB-93BFE13D9538}"; return Constants; })(); Common.Constants = Constants; })(Common || (Common = {})); /* CSS file for the plugin's base styles and themes (light / dark / high contrast) Light theme values are used as defaults but token replacement occurs to provide the correct property for the active theme. Tokens must appear as comments on the same line as the property to replace and are in the following format: [] - indicates token replacement will occur for this css declaration {} - indicates the token value to replace. Anything inside the square brackets ([]) that is not a token will remain as is Example: border-right: 1px solid #8591A2; /*[1px solid {plugin-background-color}] Base plugin tokens available to all hosts: plugin-background-color plugin-color plugin-contextmenu-active-color plugin-contextmenu-background-color plugin-contextmenu-border-color plugin-contextmenu-color plugin-contextmenu-hover-color plugin-contextmenu-hover-text-color plugin-contextmenu-icon-checkbox plugin-contextmenu-inactive-text-color plugin-contextmenu-separator-color plugin-font-family plugin-font-size plugin-font-weight plugin-highlight-background-color plugin-highlight-color plugin-inactive-color plugin-link-color plugin-link-active-color plugin-link-hover-color plugin-scrollbar-arrow-color plugin-scrollbar-background-color plugin-scrollbar-face-color plugin-select-option-background-color plugin-select-option-color plugin-select-option-checked-background-color plugin-select-option-checked-border-color plugin-select-option-checked-foreground-color plugin-select-option-hover-background-color plugin-select-option-hover-border-color plugin-select-option-hover-foreground-color plugin-select-border-color plugin-select-background-color plugin-select-foreground-color plugin-select-hover-background-color plugin-select-hover-border-color plugin-select-hover-foreground-color plugin-table-border-color plugin-table-header-background-color plugin-table-header-color plugin-textbox-border-color plugin-textbox-background-color plugin-textbox-color plugin-textbox-disabled-background-color plugin-textbox-disabled-border-color plugin-textbox-disabled-color plugin-treeview-content-background-color plugin-treeview-content-color plugin-treeview-content-inactive-selected-color plugin-treeview-content-mouseover-background-color plugin-treeview-content-mouseover-color plugin-treeview-content-inactive-selected-color plugin-treeview-content-selected-background-color plugin-treeview-content-selected-border-color plugin-treeview-content-selected-color VS host also has access to all VS themed color key tokens (EnvironmentColors) and category specific tokens. http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.platformui.environmentcolors_properties Please see product documentation for instructions on how to add these tokens to the plugin manifest. */ /* HTML and body styles */ html, body { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family, Arial, sans-serif}]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-weight: normal; /*[{plugin-font-weight}]*/ color: #1E1E1E; /*[{plugin-color}]*/ background-color: #F6F6F6; /*[{plugin-background-color}]*/ scrollbar-3dlight-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-darkshadow-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-highlight-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-shadow-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-track-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-arrow-color: #868999; /*[{plugin-scrollbar-arrow-color}]*/ scrollbar-face-color: #D0D1D7; /*[{plugin-scrollbar-face-color}]*/ } /* Select styles */ select { color: #1E1E1E; /*[{plugin-select-foreground-color}]*/ background-color: #FFFFFF; /*[{plugin-select-background-color}]*/ font: normal 9pt "Segoe UI", Arial, sans-serif; /*[{plugin-font-weight} {plugin-font-size} {plugin-font-family}, Arial, sans-serif]*/ border: 1px solid #CCCEDB; /*[1px solid {plugin-select-border-color}]*/ } select:hover { color: #1E1E1E; /*[{plugin-select-hover-foreground-color}]*/ background-color: #FFFFFF; /*[{plugin-select-hover-background-color}]*/ border: 1px solid #007ACC; /*[1px solid {plugin-select-hover-border-color}]*/ } select[multiple], select option { color: #1E1E1E; /*[{plugin-select-option-color}]*/ background-color: #F6F6F6; /*[{plugin-select-option-background-color}]*/ } select option:hover { color: #1E1E1E; /*[{plugin-select-option-hover-foreground-color}]*/ background-color: #C9DEF5; /*[{plugin-select-option-hover-background-color}]*/ border: 1px solid #C9DEF5; /*[1px solid {plugin-select-option-hover-border-color}]*/ } select option:checked { color: #1E1E1E; /*[{plugin-select-option-checked-foreground-color}]*/ background-color: #C9DEF5; /*[{plugin-select-option-checked-background-color}]*/ border: 1px solid #C9DEF5; /*[1px solid {plugin-select-option-checked-border-color}]*/ } /* Input styles */ input { font: normal 9pt "Segoe UI", Arial, sans-serif; /*[{plugin-font-weight} {plugin-font-size} {plugin-font-family}, Arial, sans-serif]*/ color: #1E1E1E; /*[{plugin-textbox-color}]*/ background-color: #FFFFFF; /*[{plugin-textbox-background-color}]*/ border: 1px solid #DBDDE6; /*[1px solid {plugin-textbox-border-color}]*/ padding: 0 3px; } input:disabled { color: #A2A4A5; /*[{plugin-textbox-disabled-color}]*/ background-color: #FFFFFF; /*[{plugin-textbox-disabled-background-color}]*/ border: 1px solid #DBDDE6; /*[1px solid {plugin-textbox-disabled-border-color}]*/ } input[type="checkbox"], input[type="radio"] { border: none; background-color: inherit; margin-right: 4px; vertical-align: middle; } input[type="file"], input[type="image"] { border: none; background-color: inherit; padding: 0; } /* TextArea styles */ textarea { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family}, Arial, sans-serif]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-weight: normal; /*[{plugin-font-weight}]*/ color: #1E1E1E; /*[{plugin-color}]*/ background-color: #F6F6F6; /*[{plugin-textbox-background-color}]*/ border: 1px solid #DBDDE6; /*[1px solid {plugin-textbox-border-color}]*/ padding: 0 3px; } /* Button styles */ button, input[type="button"], input[type="reset"], input[type="submit"] { color: #000000; background-image: -ms-linear-gradient(top, #F0F0F0 0%, #E5E5E5 100%); border: 1px solid #ACACAC; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family}, Arial, sans-serif]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-weight: normal; /*[{plugin-font-weight}]*/ min-width: 73px; padding: 1px 19px 2px 19px; } button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover { background-image: -ms-linear-gradient(top, #ECF4FC 0%, #DCECFC 100%); border: 1px solid #7EB4EA; } button:focus, input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus { border: 1px solid #569DE5; } button:active, input[type="button"]:active, input[type="reset"]:active, input[type="submit"]:active { background-image: -ms-linear-gradient(top, #DAECFC 0%, #C4E0FC 100%); border: 1px solid #569DE5; } button[disabled], input[type="button"][disabled], input[type="reset"][disabled], input[type="submit"][disabled] { color: #838383; background: #F4F4F4 none; border: 1px solid #B1B1B2; } /* Other form styles */ fieldset { border: 1px solid #DBDDE6; /*[1px solid {plugin-textbox-border-color}]*/ } /* Link styles */ a, a:link, a:visited, a:focus { color: #0E70C0; /*[{plugin-link-color}]*/ text-decoration: none; } a:hover { color: #0E70C0; /*[{plugin-link-hover-color}]*/ text-decoration: underline; } a:active { color: #0E70C0; /*[{plugin-link-active-color}]*/ } /* Table styles */ th { color: #1E1E1E; /*[{plugin-table-header-color}]*/ background-color: #EFEFE2; /*[{plugin-table-header-background-color}]*/ } td, th { border-color: #F0F0F0; /*[{plugin-table-border-color}]*/ } /* Disabled styles */ :disabled { color: #A2A4A5; /*[{plugin-inactive-color}]*/ } /* Highlight styles Use this class when you have a highlighted item, for example a highlighted row in a grid */ .plugin-highlight { color: #FFFFFF; /*[{plugin-highlight-color}]*/ background-color: #3399FF; /*[{plugin-highlight-background-color}]*/ } /* Tooltip styles This class will be included automatically on all tooltips In VS tooltips aren't, by default, themed, so we just copy the WPF tooltip defaults, which is what VS uses for its tooltips. The one exception is that under system high-contrast themes tooltips are in fact themed, so we use the !HCOnly to indicate we only want our color tokens substituted under high-contrast themes. We set its initial display style to none and its initial position to (-500,-500) just to ensure that when we insert it into the document (for measuring) it isn't visible until we have done the layout and calculated its final position. */ #plugin-vs-tooltip { display: none; position: absolute; top: -500px; left: -500px; -ms-high-contrast-adjust: none; color: #575757; /*[{plugin-tooltip-text-color !HCOnly}]*/ background-color: #F1F2F7; /*[{plugin-tooltip-background-color !HCOnly}]*/ border: thin solid #767676; /*[1px solid {plugin-tooltip-border-color !HCOnly}]*/ padding: 1px 5px 4px 5px; line-height: normal; } #plugin-vs-tooltip > #plugin-vs-tooltip-nested-cell { display: table-cell; vertical-align: middle; -ms-high-contrast-adjust: none; color: #575757; /*[{plugin-tooltip-text-color !HCOnly}]*/ background-color: #F1F2F7; /*[{plugin-tooltip-background-color !HCOnly}]*/ } #plugin-vs-tooltip > #plugin-vs-tooltip-nested-cell > #plugin-vs-tooltip-content { -ms-high-contrast-adjust: none; color: #575757; /*[{plugin-tooltip-text-color !HCOnly}]*/ background-color: #F1F2F7; /*[{plugin-tooltip-background-color !HCOnly}]*/ } /* Selection styles */ .selectNone { -ms-user-select: none; } .selectElement { -ms-user-select: element; } /* Context Menu styles */ ul.plugin-contextmenu { background-color: #e9e8ea; /*[{plugin-contextmenu-background-color}]*/ border: thin solid #cdd0d6; /*[thin solid {plugin-contextmenu-border-color}]*/ color: #1E1E1E; /*[{plugin-contextmenu-color}]*/ padding: 1px 2px 2px 2px; margin: 0; position: absolute; display: none; outline: none; z-index: 100; white-space: nowrap; -ms-high-contrast-adjust: none; line-height: normal; } .plugin-contextmenu .menuitem { position: relative; cursor: default; outline: none; list-style: none; margin-top: 1px; } .plugin-contextmenu .menuitem:focus { background-color: #f9f9fa; /*[{plugin-contextmenu-hover-color}]*/ color: #1E1E1E; /*[{plugin-contextmenu-hover-text-color}]*/ } .plugin-contextmenu .menuitem:active, .plugin-contextmenu .active { background-color: #f9f9fa; /*[{plugin-contextmenu-active-color}]*/ color: #1E1E1E; /*[{plugin-contextmenu-hover-text-color}]*/ } .plugin-contextmenu .disabled:hover, .plugin-contextmenu .disabled:active, .plugin-contextmenu .disabled:focus, .plugin-contextmenu .disabled { background-color: #e9e8ea; /*[{plugin-contextmenu-background-color}]*/ color: #a2a4a5; /*[{plugin-contextmenu-inactive-text-color}]*/ } .plugin-contextmenu .menuitem .icon { margin: 0 10px 0 6px; background-color: transparent; width: 16px; height: 16px; position: absolute; top: 4px; left: 0; } .plugin-contextmenu .menuitem .checkbox { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/PbtGwMpgAWIfXx8iFS9ZcsWJgYSAQuctW7tejzqgoIDIQx8Nrx69QqobvKUyciC+DSsXLUSSIaHhROlAWj8/v37HB2dxMTEiNKA1Xh0DR2dHUBHvwIDrMajhBIQJCUmnTp1EmI2VuPRNQDNA5oKNBvIxmo8Fj/ATcVqPLoNEEvwxyALZlziBySnJUZSkzdAgAEAfm84vuieuk0AAAAASUVORK5CYII=); /*[url({plugin-contextmenu-icon-checkbox})]*/ } .plugin-contextmenu .hidden { display: none; } .plugin-contextmenu .disabled { color: #a2a4a5; /*[{plugin-contextmenu-inactive-text-color}]*/ } .plugin-contextmenu .menuitem .main { margin-left: 32px; padding: 4px 0 5px 0; } .plugin-contextmenu .menuitem .shortcut { min-width: 25px; position: absolute; padding-right: 25px; top: 4px; right: 0; } .plugin-contextmenu .menuitem .arrow { width: 5px; height: 7px; position: absolute; top: 4px; right: 8px; overflow: visible; } .plugin-contextmenu .menuitem .arrow:before, .plugin-contextmenu .menuitem.disabled:hover .arrow:before, .plugin-contextmenu .menuitem.disabled:active .arrow:before, .plugin-contextmenu .menuitem.disabled:focus .arrow:before, .plugin-contextmenu .menuitem.disabled .arrow:before { content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFZJREFUeNpiWL5i5X8gYEDGTKdOnmCYOXP2fwYkwAQibt68ztDXP+E/iiAIPHn8iGHChIn/UQSFhIQZCgryGUFsFhAhIyvHUFRYwAg3dMaMWRi2AwQYAAcRMJwq3CX+AAAAAElFTkSuQmCC); } .plugin-contextmenu .menuitem:hover .arrow:before, .plugin-contextmenu .menuitem:active .arrow:before, .plugin-contextmenu .menuitem:focus .arrow:before, .plugin-contextmenu .active .arrow:before { content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFRJREFUeNpiKNzy6D8QMCBjBoaqM/+DltxGkWACCjOsu/aRwXrmDZASMGCCMY49+spgP/vmfxRBdRF2hoOp6oxwQSs5boYbhTqMMAUM6JaAMECAAQDqqjmrw1gHVwAAAABJRU5ErkJggg==); } .plugin-contextmenu .menuitem .hr, .plugin-contextmenu .menuitem:hover .hr, .plugin-contextmenu .menuitem:active .hr, .plugin-contextmenu .menuitem:focus .hr, .plugin-contextmenu .active .hr { height: 1px; background-color: #cdd0d6; /*[{plugin-contextmenu-separator-color}]*/ padding: 0; } (function () { var cookie, pluginUrl = window.external.pluginUrl || (cookie = document.cookie.match(/(?:^|;)\s?pluginUrl=(.*?)(?:;|$)/)) && unescape(cookie[1]) || "plugin.b.js", scripts = document.getElementsByTagName('script'); if (scripts && pluginUrl) { for (var i = 0; i < scripts.length; i++) { var script = scripts[i]; var src = script.src; if (/(^|\\|\/)plugin.js$/.test(src)) { var newScript = document.createElement("script"); newScript.src = pluginUrl; script.parentElement.insertBefore(newScript, script.nextSibling); break; } } } })(); var expectedWindowProperty; var Common; (function (Common) { (function (PerfTools) { "use strict"; var __BROWSERTOOLS_RemoteHelper = (function () { function __BROWSERTOOLS_RemoteHelper(messageHandlers) { this._messageHandlers = []; this._pendingMessages = []; this._pendingMessagesMap = {}; this._portId = 0; this._uid = 0; this.childrenElementLimit = 200; this.initializeDocumentMaxTries = 15; this.initializeDocumentTries = 0; this.isEvalModified = false; this.isExecScriptModified = false; this.onDetachCallback = null; this.port = null; this.portReady = false; this._messageHandlers = messageHandlers; } Object.defineProperty(__BROWSERTOOLS_RemoteHelper.prototype, "errorHandler", { get: function () { return this._errorHandler; }, enumerable: true, configurable: true }); __BROWSERTOOLS_RemoteHelper.prototype.getUid = function () { return "uid" + (this._uid++).toString(36); }; __BROWSERTOOLS_RemoteHelper.prototype.initialize = function (portName, handshakeCallback, onDetachCallback) { this._errorHandler = new __BROWSERTOOLS_ErrorHandler(this); this.onDetachCallback = onDetachCallback; browser.addEventListener("documentComplete", this.onDocumentComplete.bind(this)); toolUI.addEventListener("detach", this.onDetach.bind(this)); toolUI.addEventListener("breakpointhit", this.onBreak.bind(this)); ++this._portId; this.port = toolUI.createPort(portName + this._portId); if (this.port) { this.port.addEventListener("message", this.processMessages.bind(this)); toolUI.connect(this.port); handshakeCallback(); } this._handshakeCallback = handshakeCallback; }; __BROWSERTOOLS_RemoteHelper.prototype.initializeScriptEngines = function (window) { if (window) { if (window.document && window.document.scripts && window.document.scripts.length === 0) { browser.executeScript("void(0);" + __BROWSERTOOLS_RemoteHelper.JMCScriptUrl, window); } if (window.frames) { for (var i = 0; i < window.frames.length; i++) { var frame = window.frames[i]; if (frame) { var iframe = dom.getCrossSiteWindow(window, frame); this.initializeScriptEngines(iframe); } } } } }; __BROWSERTOOLS_RemoteHelper.prototype.postAllMessages = function () { for (var key in this._pendingMessagesMap) { this._pendingMessages.push(this._pendingMessagesMap[key]); } if (this._pendingMessages.length > 0) { var messageString = JSON.stringify(this._pendingMessages); this._pendingMessages = []; this._pendingMessagesMap = {}; try { this.port.postMessage(messageString); } catch (ex) { return; } } }; __BROWSERTOOLS_RemoteHelper.prototype.processMessages = function (args) { var _this = this; if (args.data === "InitializeDocument") { this._handshakeCallback(); return; } var createVSPostFunction = function (uid) { return function (arg, hash) { _this.postObject({ uid: uid, args: [arg] }, hash); }; }; var payload = JSON.parse(args.data); for (var i = 0; i < payload.length; ++i) { var obj = payload[i]; if (this._messageHandlers[obj.command]) { var messageHandlerArgs = obj.args; for (var j = 0; j < messageHandlerArgs.length; ++j) { if (messageHandlerArgs[j] && messageHandlerArgs[j].type === "callback") { messageHandlerArgs[j] = createVSPostFunction(messageHandlerArgs[j].uid); } } var returnValue = this._messageHandlers[obj.command].apply(this, messageHandlerArgs); this.postObject({ uid: obj.uid, args: (returnValue !== undefined ? [returnValue] : undefined) }); } } }; __BROWSERTOOLS_RemoteHelper.prototype.onBreak = function () { this.postAllMessages(); }; __BROWSERTOOLS_RemoteHelper.prototype.onDetach = function () { this._uid = 0; this._pendingMessages = []; this._pendingMessagesMap = {}; this.isEvalModified = false; this.isExecScriptModified = false; if (this.onDetachCallback) { this.onDetachCallback(); } }; __BROWSERTOOLS_RemoteHelper.prototype.onDocumentComplete = function (dispatchWindow) { if (expectedWindowProperty) { var doc = null; if (dispatchWindow) { try { if (dispatchWindow.browserOrWindow) { dispatchWindow = dispatchWindow.browserOrWindow; } if (dispatchWindow.document) { doc = dispatchWindow.document; } else if (dispatchWindow.Document) { doc = dispatchWindow.Document; } if (!doc || doc.parentWindow[expectedWindowProperty]) { return; } browser.executeScript("void(0);" + __BROWSERTOOLS_RemoteHelper.JMCScriptUrl, doc.parentWindow); } catch (ex) { } } } }; __BROWSERTOOLS_RemoteHelper.prototype.postObject = function (obj, hash, postImmediately) { if (typeof postImmediately === "undefined") { postImmediately = true; } if (hash) { this._pendingMessagesMap[hash] = obj; } else { this._pendingMessages.push(obj); } this.postAllMessages(); }; __BROWSERTOOLS_RemoteHelper.JMCScriptUrl = "\\r\\n//# sourceURL=browsertools://browsertools.performance.js"; return __BROWSERTOOLS_RemoteHelper; })(); PerfTools.__BROWSERTOOLS_RemoteHelper = __BROWSERTOOLS_RemoteHelper; var __BROWSERTOOLS_ErrorHandler = (function () { function __BROWSERTOOLS_ErrorHandler(remoteHelper) { this._remoteHelper = remoteHelper; this.initializeListeners(); } __BROWSERTOOLS_ErrorHandler.prototype.handleError = function (message, file, line, column) { this.onScriptError({ message: message, file: file, line: line, column: column }); }; __BROWSERTOOLS_ErrorHandler.getArgumentString = function (argument) { var type = (typeof argument); if (argument === undefined) { type = "undefined"; } else { if (type === "object") { if (argument) { if (typeof argument.length === "number" && typeof argument.propertyIsEnumerable === "function" && !(argument.propertyIsEnumerable("length")) && typeof argument.splice === "function") { type = "array"; } try { if (argument.constructor === Array) { type = "array"; } else if (argument.constructor === Date) { type = "date"; } else if (argument.constructor === RegExp) { type = "regex"; } } catch (ex) { } } else { type = "null"; } type = "object"; } } switch (type) { case "boolean": return argument; case "date": return "[date] " + argument; case "function": return "" + argument; case "null": return "null"; case "number": return argument; case "regex": return "[regex] " + argument; case "string": return "\"" + argument + "\""; case "undefined": return "undefined"; case "htmlElement": case "array": case "object": return JSON.stringify(argument); } }; __BROWSERTOOLS_ErrorHandler.prototype.onScriptError = function (errorDetails) { if (this._remoteHelper && this._remoteHelper.port) { var info = []; try { info.push("BreakFlags: " + toolUI.getBreakFlags()); info.push("IsEvalModified: " + this._remoteHelper.isEvalModified); info.push("IsExecScriptModified: " + this._remoteHelper.isExecScriptModified); info.push("Url: " + browser.document.parentWindow.location.href); } catch (ex) { } errorDetails.additionalInfo = info.join("\r\n\r\n"); var messageString = JSON.stringify([{ uid: "scriptError", args: [errorDetails] }]); try { this._remoteHelper.port.postMessage(messageString); } catch (ex) { } } }; __BROWSERTOOLS_ErrorHandler.prototype.initializeListeners = function () { var _this = this; this._onErrorHandler = this.onScriptError.bind(this); toolUI.addEventListener("scripterror", this._onErrorHandler); toolUI.addEventListener("detach", function () { toolUI.removeEventListener("scripterror", _this._onErrorHandler); }); if (browser && browser.document && browser.document.parentWindow) { this._remoteHelper.initializeScriptEngines(browser.document.parentWindow); } }; return __BROWSERTOOLS_ErrorHandler; })(); PerfTools.__BROWSERTOOLS_ErrorHandler = __BROWSERTOOLS_ErrorHandler; })(Common.PerfTools || (Common.PerfTools = {})); var PerfTools = Common.PerfTools; })(Common || (Common = {})); { "start_url": "PerfTools\\MemoryAnalyzer\\memoryAnalyzer.html", "domain": "http://microsoft.com", "name":"JavaScript Memory Analyzer", "version":"1.1", "f12": { "start_url": "memoryAnalyzer.html", "file_aliases": { "MemoryAnalyzerExtension": { "path": "MemoryAnalyzer.dll" }, "PerformanceTraceExtension": { "path": "PerformanceTrace.dll", "optional": true } }, "localized_tab_resource": "F12ToolTitle", "localized_tooltip_id": 2158, "resource_aliases" : { "MemoryAnalyzer": { "is_default" : true }, "Common":{ } }, "themed_images": { "f12-image-host-error-alert": { "bitmap_source": "..\\..\\pluginhost\\theme\\i_alerterror.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-host-error-close": { "bitmap_source": "..\\..\\pluginhost\\theme\\closeErrorBox.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-host-error-help": { "bitmap_source": "..\\..\\pluginhost\\theme\\helpErrorBox.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-toolbar-open": { "bitmap_source": "..\\Common\\images\\i_open.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-save": { "bitmap_source": "..\\Common\\images\\i_save.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-snapshot": { "bitmap_source": "images\\i_snapshot.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-start": { "bitmap_source": "..\\Common\\images\\i_start.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-stop": { "bitmap_source": "..\\Common\\images\\i_stop.png", "background_color": "plugin-background-color" }, "image-checkmark": { "bitmap_source": "..\\Common\\images\\checkmark.png", "background_color": "plugin-memory-drop-down-button" }, "image-detached-dom-node-warning": { "bitmap_source": "images\\i_info.png", "background_color": "plugin-background-color" }, "image-heap-decrease": { "bitmap_source": "images\\status_heap_decrease.png", "background_color": "plugin-background-color" }, "image-heap-increase": { "bitmap_source": "images\\status_heap_increase.png", "background_color": "plugin-background-color" }, "image-settings": { "bitmap_source": "images\\i_table_options.png", "background_color": "plugin-background-color" }, "image-snapshot": { "bitmap_source": "images\\takeSnapshot.png", "background_color": "plugin-background-color" }, "image-sort-down": { "bitmap_source": "..\\Common\\images\\i_sort_down.png", "background_color": "plugin-background-color" }, "image-sort-up": { "bitmap_source": "..\\Common\\images\\i_sort_up.png", "background_color": "plugin-background-color" }, "image-warning": { "bitmap_source": "..\\Common\\images\\i_warning.png", "background_color": "plugin-background-color" }, "vs-image-graph-user-mark": { "bitmap_source": "..\\Common\\images\\i_usermark.png", "background_color": "plugin-background-color" }, "vs-image-graph-app-event": { "bitmap_source": "..\\Common\\images\\i_appevent.png", "background_color": "plugin-background-color" }, "vs-image-graph-aggregated-event": { "bitmap_source": "..\\Common\\Images\\CustomMark5_18x.png", "background_color": "plugin-background-color" }, "vs-image-icon-tree-expanded": { "bitmap_source": "..\\Common\\images\\itemExpandedIcon.png", "background_color": "plugin-background-color" }, "vs-image-icon-tree-collapsed": { "bitmap_source": "..\\Common\\images\\itemCollapsedIcon.png", "background_color": "plugin-background-color" } } }, "file_aliases": { "MemoryAnalyzerExtension": { "path_x86": "PerfTools\\MemoryAnalyzer\\x86\\MemoryAnalyzer.dll", "path_amd64": "PerfTools\\MemoryAnalyzer\\amd64\\MemoryAnalyzer.dll" }, "PerformanceTraceExtension": { "path": "PerfTools\\PerformanceTrace.dll", "optional": true } }, "vs": { "resource_aliases": { "MemoryAnalyzer": { "path": "PerfTools\\MemoryAnalyzer\\Resources\\Resources", "is_default": true } }, "guid_symbols": { "GuidPerfToolHostCmdSet": "5D4B80C3-23AB-4391-9F90-794C201831CE", "GuidPerfToolGridContextMenu": "DB731D4D-421B-4944-9695-28538DD8A563" }, "command_aliases": { "takesnapshotcommand": { "guid": "GuidPerfToolHostCmdSet", "id": 264, "focus": false }, "showinrootsviewcommand": { "guid": "GuidPerfToolHostCmdSet", "id": 256, "focus": true } }, "menu_aliases": { "gridcontextmenu": { "guid": "GuidPerfToolGridContextMenu", "id": 257 } }, "theme_token_aliases": { "diagnostics-host-border": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "Border" }, "diagnostics-host-graph-cursor": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "GraphCursor" }, "diagnostics-host-graph-line": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "GraphLine" }, "diagnostics-host-graph-scale": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "GraphScale" }, "diagnostics-host-ruler-slider": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "RulerSlider" }, "diagnostics-host-ruler-slider-active": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "RulerSliderActive" }, "diagnostics-host-ruler-tickmark": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "RulerTickmark" }, "diagnostics-host-swimlane-border": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "SwimlaneBorder" }, "plugin-memory-drop-down-button": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "DropDownButton" }, "plugin-perftools-drop-down-button-focus": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBackgroundMiddle" }, "plugin-perftools-drop-down-button-focus-border": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBorder" }, "plugin-memory-drop-down-button-hover": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "DropDownButtonHover" }, "plugin-memory-snapshot-button": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotButton" }, "plugin-memory-snapshot-button-active": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotButtonActive" }, "plugin-memory-snapshot-button-active-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "SnapshotButtonActive" }, "plugin-memory-snapshot-button-border": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotButtonBorder" }, "plugin-memory-snapshot-button-border-active": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotButtonBorderActive" }, "plugin-memory-snapshot-button-border-hover": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotButtonBorderHover" }, "plugin-memory-snapshot-button-disabled": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotButtonDisabled" }, "plugin-memory-snapshot-button-disabled-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "SnapshotButtonDisabledText" }, "plugin-memory-snapshot-button-hover": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotButtonHover" }, "plugin-memory-snapshot-button-hover-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "SnapshotButtonHover" }, "plugin-memory-snapshot-diff-added-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "SnapshotDiffAddedText" }, "plugin-memory-snapshot-diff-modified-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "SnapshotDiffModifiedText" }, "plugin-memory-snapshot-messages-border": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotMessagesBorder" }, "plugin-memory-snapshot-tile": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotTile" }, "plugin-memory-snapshot-tile-baseline-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "SnapshotTileBaselineText" }, "plugin-memory-snapshot-tile-border": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotTileBorder" }, "plugin-memory-snapshot-tile-error-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "SnapshotTileErrorText" }, "plugin-memory-snapshot-tile-header": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "SnapshotTileHeader" }, "plugin-memory-tab-header": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "TabHeader" }, "plugin-memory-tab-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "TabText" }, "plugin-memory-tab-hover": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "BackgroundColor", "name": "TabHover" }, "plugin-memory-tab-hover-text": { "category": "A5441C8F-ED08-40E1-AB04-BA3281D84770", "key_type": "ForegroundColor", "name": "TabHover" }, "plugin-menucontrol-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "Menu" }, "plugin-perftools-detail-pane": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "DetailPane" }, "plugin-perftools-focusdots": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "FocusDots" }, "plugin-perftools-grid-column-sizer": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "GridColumnSizer" }, "plugin-perftools-grid-header-hover": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "GridHeaderHover" }, "plugin-perftools-grid-header-hover-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "GridHeaderHover" }, "plugin-perftools-grid-header-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "GridHeaderText" }, "plugin-perftools-menu": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "Menu" }, "plugin-perftools-menu-border": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "MenuBorder" }, "plugin-perftools-menu-drop-shadow": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ThreeDLightShadow" }, "plugin-perftools-menu-focus": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "MenuFocus" }, "plugin-perftools-menu-focus-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "MenuFocus" }, "plugin-perftools-menu-hover": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "MenuHover" }, "plugin-perftools-menu-hover-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "MenuHover" }, "plugin-perftools-progress": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "Progress" }, "plugin-perftools-splitter": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "Splitter" }, "plugin-perftools-watermark-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "WatermarkText" }, "plugin-perftools-detail-pane": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "DetailPane" }, "plugin-perftools-grid-border-color": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "GridCellBorder" }, "plugin-searchcontrol-mouseover-background-background-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "MouseOverBackground" }, "plugin-searchcontrol-mouseover-watermark-text-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "MouseOverWatermarkText" }, "plugin-searchcontrol-unfocused-background-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "Unfocused" }, "plugin-searchcontrol-unfocused-watermark-text-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "UnfocusedWatermarkText" }, "plugin-font-editor-string-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "String" }, "plugin-font-editor-number-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "Number" }, "plugin-font-editor-html-element-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Element Name" }, "plugin-font-editor-html-tag-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Tag Delimiter" }, "plugin-font-editor-html-attribute-name-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Attribute" }, "plugin-font-editor-html-attribute-value-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Attribute Value" }, "plugin-font-editor-html-operator-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Operator" } }, "themed_images": { "image-checkmark": { "bitmap_source": "PerfTools\\Common\\images\\checkmark.png", "background_color": "plugin-memory-drop-down-button" }, "image-detached-dom-node-warning": { "bitmap_source": "PerfTools\\MemoryAnalyzer\\images\\i_info.png", "background_color": "plugin-background-color" }, "image-heap-decrease": { "bitmap_source": "PerfTools\\MemoryAnalyzer\\images\\status_heap_decrease.png", "background_color": "plugin-background-color" }, "image-heap-increase": { "bitmap_source": "PerfTools\\MemoryAnalyzer\\images\\status_heap_increase.png", "background_color": "plugin-background-color" }, "image-settings": { "bitmap_source": "PerfTools\\MemoryAnalyzer\\images\\i_table_options.png", "background_color": "plugin-background-color" }, "image-snapshot": { "bitmap_source": "PerfTools\\MemoryAnalyzer\\images\\takeSnapshot.png", "background_color": "plugin-background-color" }, "image-sort-down": { "bitmap_source": "PerfTools\\Common\\images\\i_sort_down.png", "background_color": "plugin-background-color" }, "image-sort-up": { "bitmap_source": "PerfTools\\Common\\images\\i_sort_up.png", "background_color": "plugin-background-color" }, "image-warning": { "bitmap_source": "PerfTools\\Common\\images\\i_warning.png", "background_color": "plugin-background-color" }, "vs-image-icon-tree-expanded": { "bitmap_source": "PerfTools\\Common\\images\\itemExpandedIcon.png", "background_color": "plugin-background-color" }, "vs-image-icon-tree-collapsed": { "bitmap_source": "PerfTools\\Common\\images\\itemCollapsedIcon.png", "background_color": "plugin-background-color" } } } } html, body { -ms-high-contrast-adjust: none; cursor: default; height: 100%; margin: 0px; } input:-ms-input-placeholder { color: TRANSPARENT; /*[{plugin-perftools-watermark-text}]*/ } #mainContainer { height: 100%; width: 100%; } .warningMessage { -ms-grid-row: 1; background-image: url('../common/images/i_warning.png'); /*[url({image-warning})]*/ background-position-y: -18px; background-repeat: no-repeat; background-size: 18px 54px; color: TRANSPARENT; /*[{plugin-color}]*/ display: none; height: 18px; margin-top: 2px; padding-left: 21px; width: 18px; } input { padding: 2px; } .controlDropdown { padding: 0; margin: 0; } .additionalSeperator { display: none; } .heapOverviewGraph { display: none; /* Initial state is display:none, but becomes visible on control initialization */ height: 100%; position: relative; width: 100%; } .datatypeSelection { width: 90px; } .gridSplitter { position: relative; background-color: TRANSPARENT; /*[{plugin-perftools-splitter}]*/ } .gridSplitter-Vertical { width: 100%; height: 3px; cursor: ns-resize; } .gridSplitter-Horizontal { width: 3px; height: 100%; cursor: ew-resize; } .summaryView { -ms-grid-columns: 1fr; -ms-grid-rows: auto auto 1fr; border-top: 1px solid TRANSPARENT; /*[1px solid {plugin-memory-snapshot-tile-border}]*/ display: -ms-grid; height: 100%; overflow-y: auto; width: 100%; } .summaryView > .giveFeedbackContainer { position: absolute; bottom: 2px; left: 2px; } .mainSection { -ms-grid-row: 2; padding-left: 14px; padding-right: 14px; } .snapshotScrollableContainer { border-top: 1px solid TRANSPARENT; /*[1px solid {plugin-memory-snapshot-tile-border}]*/ height: 100%; overflow-y: auto; width: 100%; } .snapshotView { -ms-grid-columns: 1fr; -ms-grid-rows: .7fr .3fr auto; box-sizing: border-box; display: -ms-grid; height: 100%; min-height: 21em; width: 100%; } .snapshotView > .snapshotGridContainer { -ms-grid-column: 1; -ms-grid-row: 1; box-sizing: border-box; } .snapshotView > .gridSplitter { -ms-grid-column: 1; -ms-grid-row: 2; z-index: 10; box-sizing: border-box; } .snapshotView > .referenceView { -ms-grid-column: 1; -ms-grid-row: 2; display: -ms-grid; -ms-grid-columns: 1fr; -ms-grid-rows: auto 1fr; box-sizing: border-box; } .snapshotView > .snapshotMessagesContainer { -ms-grid-column: 1; -ms-grid-row: 3; border-top: 1px solid TRANSPARENT; /*[1px solid {plugin-memory-snapshot-messages-border}]*/ box-sizing: border-box; cursor: default; } .snapshotView > .snapshotMessagesContainer > .reachedItemsCapMessageContainer { box-sizing: border-box; display: none; margin: 5px 0px 5px 10px; } .analysisContainer { display: -ms-flexbox; margin-left: 14px; margin-right: 10px; } .analysisContainer > .scopeFilterBox { vertical-align: top; } .analysisContainer > .scopeFilterBox > .scopeFilter { margin-right: 5px; } .analysisContainer > .scopeFilterBox > .scopeFilterLabel { display: inline-block; margin-right: 3px; padding-top: 1px; vertical-align: top; } .analysisContainer > .filterInput { font-size: 88%; height: 88%; margin-right: 5px; } .analysisContainer > .settingsMenuButton > .buttonIcon { background-image: url('images/i_table_options.png'); /*[url({image-settings})]*/ } .analysisContainer > .foldObjectsByDominatorButton { height: 20px; margin-right: 5px; } .analysisContainer > .foldObjectsByDominatorButton > .buttonIcon { background-image: url('images/i_foldin.png'); /*[url({image-foldin})]*/ } .referenceView > .referenceGraphTitle { -ms-grid-column: 1; -ms-grid-row: 1; background-color: TRANSPARENT; /*[{plugin-memory-tab-header}]*/ border-bottom: 1px solid TRANSPARENT; /*[1px solid {plugin-memory-snapshot-tile-border}]*/ box-sizing: border-box; font-weight: 600; padding: 5px 0px 5px 10px; } .referenceView > .referenceViewContainer { -ms-grid-column: 1; -ms-grid-row: 2; box-sizing: border-box; } .snapshotTab { height: 100%; } .snapshotTab > .snapshotDataNavigation { height: 100%; } .snapshotTab > .snapshotDataNavigationHidden { display: none; } .snapshotTab > .snapshotErrorProgress { height: 100%; width: 100%; margin-left: 10px; margin-right: 10px; } .snapshotTab > .snapshotErrorProgress > .snapshotError { font-size: 20px; } .snapshotTab > .snapshotErrorProgress > .snapshotError > .snapshotProcessingErrorFrown { font-size: 100px; margin-bottom: 20px; } .snapshotTab > .snapshotErrorProgress > .snapshotProcessingProgressDiv { -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; display: -ms-grid; height: 100%; width: 100%; } .snapshotTab > .snapshotErrorProgress > .snapshotProcessingProgressDivHidden { display: none; } .snapshotTab > .snapshotErrorProgress > .snapshotProcessingProgressDiv > .progressContent { -ms-grid-column: 1; -ms-grid-column-align: center; -ms-grid-row: 1; -ms-grid-row-align: center; max-width: 300px; text-align: center; } .grid-row > .unmatchedScopeObject { color: grey; font-style: italic; } .headerAndTabContainer { -ms-grid-columns: 1fr; -ms-grid-rows: auto 1fr; display: -ms-grid; height: 100%; width: 100%; } .tabContainer { -ms-grid-columns: 1fr; -ms-grid-row: 2; -ms-grid-rows: 1fr; background-color: TRANSPARENT; /*[{plugin-background-color}]*/ display: -ms-grid; } .tabContainer .startProfilingPrompt { -ms-grid-column-align: center; -ms-grid-row-align: center; } .tabContainer .startProfilingPrompt .startProfilingMessage { font-size: 14px; } .BPT-Toolbar .BPT-button.startToolbarButton .buttonIcon { background-image: url('../Common/images/i_start.png'); /*[url({f12-image-toolbar-start})]*/ } .BPT-Toolbar .BPT-button.stopToolbarButton .buttonIcon { background-image: url('../Common/images/i_stop.png'); /*[url({f12-image-toolbar-stop})]*/ } .BPT-Toolbar .BPT-button.openSessionButton .buttonIcon { background-image: url('../Common/images/i_open.png'); /*[url({f12-image-toolbar-open})]*/ } .BPT-Toolbar .BPT-button.saveSessionButton .buttonIcon { background-image: url('../Common/images/i_save.png'); /*[url({f12-image-toolbar-save})]*/ } .BPT-Toolbar .BPT-button.takeSnapshotToolbarButton .buttonIcon { background-image: url('images/i_snapshot.png'); /*[url({f12-image-toolbar-snapshot})]*/ } .detachedDomNodeWarning { background: url('images/i_info.png') no-repeat 0px 0px; /*[url({image-detached-dom-node-warning}) no-repeat 0px 0px]*/ background-size: 15px 15px; } .detachedDomNodeChildrenWarning { background: url('images/i_info.png') no-repeat 0px 0px; /*[url({image-detached-dom-node-warning}) no-repeat 0px 0px]*/ background-size: 15px 15px; opacity: 0.5; } .grid-gutter-row { padding-top: 4px; } /*From the DOM/Console common "toolwindow.css"*/ .BPT-FileLink, .BPT-HelpLink { border: 1px solid transparent; color: TRANSPARENT; /*[{plugin-link-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextColorKey*/ cursor: pointer; } .BPT-FileLink:hover, .BPT-HelpLink:hover { color: TRANSPARENT; /*[{plugin-link-hover-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextHoverColorKey*/ text-decoration: underline; } /* * Datagrid style overrides */ .has-header.grid .grid-canvas { top: 25px; } .grid-header { background-color: transparent; /*[{plugin-perftools-detail-pane}]*/ border-bottom: 1px solid transparent; /*[1px solid {plugin-perftools-grid-border-color rgba(0.07)}]*/ height: 2.1em; } .grid-header-column { border-right: 1px solid transparent; /*[1px solid {plugin-perftools-grid-border-color rgba(0.07)}]*/ } .grid-header-column:hover > .title { color: rgb(0, 0, 0); /*[{plugin-color}]*/ } .grid-header-column > .title { padding: 2px 4px 4px 4px; color: rgb(0, 0, 0); /*[{plugin-color}]*/ } .grid-gutter-header { background-color: transparent; /*[{plugin-perftools-detail-pane}]*/ } .grid-gutter-row { padding-left: 7px; padding-top: 3px; } .grid-row-normal { border: none; } .grid-row { border-bottom: 1px solid transparent; /*[1px solid {plugin-perftools-grid-border-color rgba(0.07)}]*/ } .grid-cell:not(:last-child) { border-right: 1px solid transparent; /*[1px solid {plugin-perftools-grid-border-color rgba(0.07)}]*/ } .numeric-data { text-align: right; }/* We only show a blue hover state for icons in f12 */ .analysisContainer > .settingsMenuButton:hover > .settingsIcon { background-position-y: -18px !important; } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton:hover:enabled .takeSnapshotIcon { background-position-y: -32px; } /* * Overriden from the hub, reduce the margin on title text */ .title-container { -ms-grid-columns: 15px 1fr; margin-left: 0px; } .ruler-legend-container { margin-right: 0px; } .ruler-legend-text-div { margin-right: 0px; } .ruler-legend-color-div { margin-left: 10px; } .legend-text-div { margin-right: 0px; } .scrollbar-container .scrollbar .scrollbar-width-calculator { margin-top: -1px; } .grid-row:hover { background-color: rgba(191, 205, 219, 0.25); /*[{plugin-font-editor-inactive-selected-background-color rgba(0.05)}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .grid-row-selected, .grid-row-selected:hover { background: rgba(51, 153, 255, 0.18); /*[{plugin-perftools-list-item-selected-active-background-color rgba(0.18)}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .grid-row-selected-blur { background-color: rgba(191, 205, 219, 0.25); /*[{plugin-font-editor-inactive-selected-background-color rgba(0.05)}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ }  Memory
        // // Copyright (C) Microsoft. All rights reserved. // // // MemoryAnalyzer.templates.ts var ControlTemplates; (function (ControlTemplates) { var MemoryAnalyzer = (function () { function MemoryAnalyzer() { } MemoryAnalyzer.toolbarButtonsPanel = "\
        \
        \
        \
        \
        \
        \
        \ "; MemoryAnalyzer.scopeFilterTemplate = "\
        \ \
        \
        \ "; MemoryAnalyzer.analysisBarTemplate = "\
        \
        \
        \
        \
        \
        \ "; MemoryAnalyzer.settingsDropDownMenu = "\
          \
          \
          \
          \
        \ "; return MemoryAnalyzer; })(); ControlTemplates.MemoryAnalyzer = MemoryAnalyzer; })(ControlTemplates || (ControlTemplates = {})); // canvasChartControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (Controls) { (function (Charting) { (function (ChartViewType) { ChartViewType[ChartViewType["Scale"] = 0] = "Scale"; ChartViewType[ChartViewType["Expand"] = 1] = "Expand"; ChartViewType[ChartViewType["Roll"] = 2] = "Roll"; ChartViewType[ChartViewType["Fixed"] = 3] = "Fixed"; })(Charting.ChartViewType || (Charting.ChartViewType = {})); var ChartViewType = Charting.ChartViewType; (function (SeriesRenderType) { SeriesRenderType[SeriesRenderType["Points"] = 1] = "Points"; SeriesRenderType[SeriesRenderType["Line"] = 2] = "Line"; SeriesRenderType[SeriesRenderType["PointsAndLine"] = SeriesRenderType.Points | SeriesRenderType.Line] = "PointsAndLine"; SeriesRenderType[SeriesRenderType["VerticalLines"] = 4] = "VerticalLines"; SeriesRenderType[SeriesRenderType["Triangles"] = 8] = "Triangles"; })(Charting.SeriesRenderType || (Charting.SeriesRenderType = {})); var SeriesRenderType = Charting.SeriesRenderType; (function (SeriesOrderType) { SeriesOrderType[SeriesOrderType["Sort"] = 0] = "Sort"; SeriesOrderType[SeriesOrderType["Remove"] = 1] = "Remove"; })(Charting.SeriesOrderType || (Charting.SeriesOrderType = {})); var SeriesOrderType = Charting.SeriesOrderType; var ChartColorType; (function (ChartColorType) { ChartColorType[ChartColorType["Background"] = 0] = "Background"; ChartColorType[ChartColorType["Foreground"] = 1] = "Foreground"; ChartColorType[ChartColorType["Grid"] = 2] = "Grid"; ChartColorType[ChartColorType["LegendBackground"] = 3] = "LegendBackground"; ChartColorType[ChartColorType["ViewSelection"] = 4] = "ViewSelection"; ChartColorType[ChartColorType["ViewSelectionOutside"] = 5] = "ViewSelectionOutside"; })(ChartColorType || (ChartColorType = {})); var ChartFontType; (function (ChartFontType) { ChartFontType[ChartFontType["Foreground"] = 0] = "Foreground"; })(ChartFontType || (ChartFontType = {})); var Point2d = (function () { function Point2d(x, y) { this.x = x; this.y = y; } return Point2d; })(); var Point2dWithData = (function (_super) { __extends(Point2dWithData, _super); function Point2dWithData(x, y, data) { _super.call(this, x, y); this.data = data; } return Point2dWithData; })(Point2d); var Point2dRendered = (function (_super) { __extends(Point2dRendered, _super); function Point2dRendered(x, y, isInView, seriesIndex) { _super.call(this, x, y); this.isInView = isInView; this.seriesIndex = seriesIndex; } return Point2dRendered; })(Point2d); var Padding = (function () { function Padding(left, top, right, bottom) { this.left = left; this.top = top; this.right = right; this.bottom = bottom; } return Padding; })(); var Rect = (function (_super) { __extends(Rect, _super); function Rect(left, top, right, bottom) { _super.call(this, left, top, right, bottom); if (this.left > this.right || this.top > this.bottom) { throw "Invalid rectange size"; } } Object.defineProperty(Rect.prototype, "width", { get: function () { return this.right - this.left; }, enumerable: true, configurable: true }); Object.defineProperty(Rect.prototype, "height", { get: function () { return this.bottom - this.top; }, enumerable: true, configurable: true }); return Rect; })(Padding); var MinMax = (function () { function MinMax(min, max) { this.min = min; this.max = max; } return MinMax; })(); var ChartSeries = (function () { function ChartSeries(index, legendText, seriesRenderType) { this._lineColorString = "#FF0000"; this._lineFillColorString = "#FF0000"; this._pointColorString = "#FF0000"; this._pointStrokeColorString = "#FF0000"; this.index = index; this.legendText = legendText; this.seriesRenderType = seriesRenderType; this.data = []; switch (index) { case 0: this._lineColorString = "rgb(180, 180, 255)"; this._lineFillColorString = "rgba(200, 200, 255, 0.3)"; this._pointColorString = "rgb(0, 0, 255)"; this._pointStrokeColorString = "rgb(0, 0, 0)"; break; case 1: this._lineColorString = "rgb(255, 180, 180)"; this._lineFillColorString = "rgba(255, 200, 200, 0.3)"; this._pointColorString = "rgb(255, 0, 0)"; this._pointStrokeColorString = "rgb(0, 0, 0)"; break; case 2: this._lineColorString = "rgb(180, 200, 100)"; this._lineFillColorString = "rgba(200, 255, 200, 0.3)"; this._pointColorString = "rgb(0, 200, 0)"; this._pointStrokeColorString = "rgb(0, 0, 0)"; break; case 3: this._lineColorString = "rgb(180, 255, 255)"; this._lineFillColorString = "rgba(200, 255, 255, 0.3)"; this._pointColorString = "rgb(0, 255, 255)"; this._pointStrokeColorString = "rgb(0, 0, 0)"; break; case 4: this._lineColorString = "rgb(255, 255, 180)"; this._lineFillColorString = "rgba(255, 255, 200, 0.3)"; this._pointColorString = "rgb(255, 255, 0)"; this._pointStrokeColorString = "rgb(0, 0, 0)"; break; default: break; } } Object.defineProperty(ChartSeries.prototype, "lineColor", { get: function () { return this._lineColorString; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "lineFillColor", { get: function () { return this._lineFillColorString; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "pointColor", { get: function () { return this._pointColorString; }, enumerable: true, configurable: true }); Object.defineProperty(ChartSeries.prototype, "pointStrokeColor", { get: function () { return this._pointStrokeColorString; }, enumerable: true, configurable: true }); return ChartSeries; })(); var CanvasChartControl = (function (_super) { __extends(CanvasChartControl, _super); function CanvasChartControl(containerId) { _super.call(this, "CanvasChartTemplate"); this._chartInitialStartSet = false; this._chartAxisPadding = new Padding(50, 40, 5, 5); this._chartAxisCount = 5; this._chartAxisIncreaseRatio = 1.5; this._chartDrawFill = true; this._chartOverviewPadding = 4; this._chartViewOverview = false; this._chartViewX = 0; this._chartViewWidth = 60; this._chartViewType = 2 /* Roll */; this._gridX = new MinMax(0, 0); this._gridY = new MinMax(0, 0); this._gridRange = new Point2d(0, 0); this._triangleSize = 7; this._containerId = containerId; this._series = []; this._container = document.getElementById(this._containerId); if (this._container !== null) { this._container.appendChild(this.rootElement); this._canvas = this.findElement("mainCanvas"); this._context = this._canvas.getContext("2d"); if (!this._container.runtimeStyle.position || this._container.runtimeStyle.position === "static") { this._container.style.position = "relative"; } window.addEventListener("resize", this.onResize.bind(this)); this.onResize(null); } else { throw "An element with id " + this._containerId + " could not be found"; } } CanvasChartControl.prototype.setViewType = function (viewType, viewStartX, viewWidth, viewHeight) { if (viewStartX < this._gridX.min) { viewStartX = this._gridX.min; } this._chartViewType = viewType; this._chartViewX = viewStartX; this._chartViewWidth = viewWidth; if (typeof viewHeight === "number") { this._gridY.max = viewHeight; this._gridRange.y = viewHeight; } this.drawChart(); }; CanvasChartControl.prototype.addSeries = function (legendText, seriesRenderType) { var newSeries = new ChartSeries(this._series.length, legendText, seriesRenderType); this._series.push(newSeries); var filledLines = 0; for (var i = 0; i < this._series.length; i++) { if (this._series[i].seriesRenderType & 2 /* Line */) { filledLines++; if (filledLines >= 2) { this._chartDrawFill = false; break; } } } return this._series.length - 1; }; CanvasChartControl.prototype.addPointToSeries = function (seriesIndex, x, y, tooltip, orderType, skipRender) { if (typeof orderType === "undefined") { orderType = 0 /* Sort */; } if (seriesIndex >= 0 && seriesIndex < this._series.length) { var newPoint = new Point2dWithData(x, y, tooltip); var seriesData = this._series[seriesIndex].data; seriesData.push(newPoint); if (newPoint.x < this._gridX.max) { switch (orderType) { case 1 /* Remove */: for (var deleteIndex = seriesData.length - 2; deleteIndex >= 0; deleteIndex--) { if (seriesData[deleteIndex].x < x) { break; } } deleteIndex++; seriesData.splice(deleteIndex, seriesData.length - deleteIndex - 1); this._gridX.max = newPoint.x; break; case 0 /* Sort */: default: seriesData.sort(function (a, b) { return a.x - b.x; }); break; } } if (!this._chartInitialStartSet) { this._chartInitialStartSet = true; this._gridX.min = newPoint.x; this._chartViewX = newPoint.x; } this.calculateRange(newPoint); if (!skipRender) { this.drawChart(); } } }; CanvasChartControl.prototype.onResize = function (event) { if (this._container.clientWidth > 0 && this._container.clientHeight > 0) { this._canvas.width = this._container.clientWidth; this._canvas.height = this._container.clientHeight; this._chartWidth = this._canvas.width - this._chartAxisPadding.right; this._chartHeight = this._canvas.height - this._chartAxisPadding.bottom; this.drawChart(); } }; CanvasChartControl.prototype.getColor = function (colorId) { switch (colorId) { case 0 /* Background */: return "rgb(255, 255, 255)"; case 1 /* Foreground */: return "rgb(0, 0, 0)"; case 2 /* Grid */: return "rgb(200, 200, 200)"; case 3 /* LegendBackground */: return "rgba(250, 250, 250, 0.75)"; case 4 /* ViewSelection */: return "rgb(120, 120, 120)"; case 5 /* ViewSelectionOutside */: return "rgba(255, 255, 255, 0.6)"; } return "rgb(255, 0, 0)"; }; CanvasChartControl.prototype.getFontString = function (fontId) { switch (fontId) { case 0 /* Foreground */: return "7.5pt \"Segoe UI\", Arial, sans-serif"; } return "7.5pt \"Segoe UI\", Arial, sans-serif"; }; CanvasChartControl.prototype.getYCoord = function (y, top, height) { return top + ((this._gridY.max - y) / this._gridRange.y) * height; }; CanvasChartControl.prototype.drawXAxesValue = function (value, offsetY) { this._context.save(); this._context.fillStyle = this.getColor(1 /* Foreground */); this._context.font = this.getFontString(0 /* Foreground */); this._context.fillText("" + value.toFixed(2), this._chartAxisPadding.left - 5, this._chartAxisPadding.top + offsetY + 1.5); this._context.restore(); }; CanvasChartControl.prototype.drawChartBackground = function () { this._context.fillStyle = this.getColor(0 /* Background */); this._context.fillRect(0, 0, this._canvas.width, this._canvas.height); }; CanvasChartControl.prototype.drawChartAxes = function (chartRect) { this._context.fillStyle = this.getColor(2 /* Grid */); this._context.strokeStyle = this.getColor(2 /* Grid */); this._context.textAlign = "right"; var step = (this._gridRange.y / this._chartAxisCount); this.drawXAxesValue(this._gridY.max, 0); for (var i = 1; i < this._chartAxisCount; i++) { var y = ((step * i) / this._gridRange.y) * chartRect.height; var lineY = chartRect.top + Math.floor(y) + 0.5; this._context.beginPath(); this._context.moveTo(chartRect.left, lineY); this._context.lineTo(chartRect.left + chartRect.width, lineY); this._context.stroke(); this.drawXAxesValue(this._gridY.max - (step * i), y); } this.drawXAxesValue(this._gridY.min, chartRect.height); }; CanvasChartControl.prototype.drawChartBorder = function (chartRect) { this._context.fillStyle = "transparent"; this._context.strokeStyle = this.getColor(1 /* Foreground */); this._context.strokeRect(chartRect.left - 0.5, chartRect.top - 0.5, chartRect.width, chartRect.height); }; CanvasChartControl.prototype.drawChartLegend = function (chartRect) { if (!this._legendDiv) { this._legendDiv = document.createElement("div"); this._legendDiv.className = "chartLegend"; this._legendDiv.style.position = "absolute"; this._legendDiv.style.right = "20px"; this._legendDiv.style.bottom = (this._canvas.height - chartRect.bottom + 10) + "px"; this._legendDiv.style.backgroundColor = this.getColor(3 /* LegendBackground */); this._legendDiv.style.color = this.getColor(1 /* Foreground */); this._legendDiv.style.padding = "2px 5px 2px 5px"; this._legendDiv.style.font = this.getFontString(0 /* Foreground */); this._legendDiv.style.borderRadius = "3px"; if (this._container !== null) { this._container.appendChild(this._legendDiv); } } if (this._legendDiv.children.length !== this._series.length) { for (var i = 0; i < this._series.length; i++) { var seriesDiv = document.createElement("div"); seriesDiv.className = "chartLegendSeries"; var colorSpan = document.createElement("span"); colorSpan.style.display = "inline-block"; colorSpan.style.width = "16px"; colorSpan.style.height = "10px"; colorSpan.style.margin = "0 4px 2px 0"; colorSpan.style.verticalAlign = "middle"; colorSpan.style.border = "solid " + this._series[i].lineColor + " 1px"; if (this._series[i].seriesRenderType & 2 /* Line */) { colorSpan.style.backgroundColor = this._series[i].lineFillColor; } var innerColorSpan = document.createElement("span"); innerColorSpan.style.display = "inline-block"; innerColorSpan.style.width = "12px"; innerColorSpan.style.height = "8px"; innerColorSpan.style.margin = "0 0 10px 1px"; innerColorSpan.style.verticalAlign = "middle"; innerColorSpan.style.backgroundColor = this._series[i].pointColor; colorSpan.appendChild(innerColorSpan); seriesDiv.appendChild(colorSpan); var textSpan = document.createElement("span"); textSpan.innerText = this._series[i].legendText; seriesDiv.appendChild(textSpan); this._legendDiv.appendChild(seriesDiv); } } }; CanvasChartControl.prototype.drawChartType = function (chartViewType, chartRect, isOverview) { var renderedPoints = new Array(); for (var seriesIndex = 0; seriesIndex < this._series.length; seriesIndex++) { var series = this._series[seriesIndex]; var seriesPoints = series.data; if (seriesPoints.length > 0) { var startIndex = 0; var endIndex = seriesPoints.length - 1; var startX = 0; var rangeX = 0; switch (chartViewType) { case 0 /* Scale */: startX = this._gridX.min; rangeX = this._gridRange.x; break; case 1 /* Expand */: startX = this._gridX.min; rangeX = Math.max(this._gridRange.x, this._chartViewWidth); break; case 3 /* Fixed */: startX = this._chartViewX; rangeX = this._chartViewWidth; break; case 2 /* Roll */: this._chartViewX = Math.max(this._gridX.max - this._chartViewWidth, this._gridX.min); startX = this._chartViewX; rangeX = this._chartViewWidth; break; } var endX = startX + rangeX; var scaleX = chartRect.width / rangeX; var x = 0; var y = 0; var startPoint = seriesPoints[startIndex]; var hasMovedToStart = false; this._context.save(); this._context.beginPath(); this._context.rect(chartRect.left, chartRect.top, chartRect.width, chartRect.height); this._context.clip(); this._context.fillStyle = series.lineFillColor; this._context.strokeStyle = series.lineColor; this._context.beginPath(); for (var i = startIndex; i <= endIndex; i++) { var point = seriesPoints[i]; var pointInView = (point.x >= startX && point.x <= endX); var requiresDrawing = pointInView; if (!requiresDrawing) { if ((point.x < startX && i < endIndex && seriesPoints[i + 1].x > startX) || (point.x > endX && i > 0 && seriesPoints[i - 1].x < endX)) { requiresDrawing = true; } } if (requiresDrawing) { x = chartRect.left + (point.x - startX) * scaleX; y = this.getYCoord(point.y, chartRect.top, chartRect.height); if (!hasMovedToStart) { this._context.moveTo(x, this.getYCoord(0, chartRect.top, chartRect.height)); hasMovedToStart = true; } if (series.seriesRenderType & 2 /* Line */) { this._context.lineTo(x, y); } renderedPoints.push({ x: x, y: y, isInView: pointInView, seriesIndex: seriesIndex }); } } if (series.seriesRenderType & 2 /* Line */) { if (this._chartDrawFill) { var y = this.getYCoord(0, chartRect.top, chartRect.height); this._context.lineTo(x, y); this._context.closePath(); this._context.fill(); } else { this._context.stroke(); } if (this._chartDrawFill) { this._context.lineWidth = (chartRect.height < 100 ? 1 : 2); this._context.strokeStyle = series.lineColor; this._context.beginPath(); for (var i = 0; i < renderedPoints.length; i++) { var rp = renderedPoints[i]; if (i === 0) { this._context.moveTo(rp.x, Math.round(rp.y) - 0.5); } this._context.lineTo(rp.x, Math.round(rp.y) - 0.5); } this._context.stroke(); } } this._context.restore(); } } this.drawChartBorder(chartRect); var overviewStartX = chartRect.left + (this._chartViewX - this._gridX.min) * scaleX; var overviewEndX = overviewStartX + Math.min(this._chartViewWidth * scaleX, chartRect.width); var seriesIndexForColor = -1; for (var i = 0; i < renderedPoints.length; i++) { if (renderedPoints[i].isInView) { var si = renderedPoints[i].seriesIndex; if (seriesIndexForColor !== si) { this._context.fillStyle = this._series[si].pointColor; this._context.strokeStyle = this._series[si].pointStrokeColor; seriesIndexForColor = si; } if (this._series[si].seriesRenderType & 1 /* Points */) { this._context.beginPath(); this._context.arc(renderedPoints[i].x - 0.5, renderedPoints[i].y - 0.5, 3, 0, Math.PI * 2); this._context.fill(); } if (this._series[si].seriesRenderType & 4 /* VerticalLines */) { this._context.beginPath(); this._context.rect(Math.round(renderedPoints[i].x), chartRect.top, 1, chartRect.height); this._context.fill(); } if (this._series[si].seriesRenderType & 8 /* Triangles */) { this._context.beginPath(); this._context.moveTo(renderedPoints[i].x, chartRect.bottom - 2 * this._triangleSize); this._context.lineTo(renderedPoints[i].x - this._triangleSize, chartRect.bottom); this._context.lineTo(renderedPoints[i].x + this._triangleSize, chartRect.bottom); this._context.lineTo(renderedPoints[i].x, chartRect.bottom - 2 * this._triangleSize); this._context.closePath(); this._context.fill(); } } } }; CanvasChartControl.prototype.drawChartViewSelection = function (chartRect) { var padding = this._chartOverviewPadding; var doublePadding = padding * 2; var scaleX = (chartRect.width / this._gridRange.x); var x = (this._chartViewX - this._gridX.min) * scaleX; var y = chartRect.top - padding; var w = Math.min(this._chartViewWidth * scaleX, chartRect.width); var h = chartRect.height + doublePadding; this._context.fillStyle = this.getColor(5 /* ViewSelectionOutside */); this._context.fillRect(chartRect.left - padding, y, Math.max(x, 0), h); this._context.fillRect(chartRect.left + x + w + padding, y, Math.max(chartRect.width - (x + w), 0), h); var snappedX = Math.floor(chartRect.left + x - padding) - 0.5; var snappedY = Math.floor(chartRect.top - padding) - 0.5; var snappedW = Math.ceil(w + doublePadding); var snappedH = Math.ceil(chartRect.height + doublePadding); this._context.save(); this._context.strokeStyle = this.getColor(4 /* ViewSelection */); this._context.lineWidth = 1; this._context.strokeRect(snappedX, snappedY, snappedW, snappedH); this._context.restore(); }; CanvasChartControl.prototype.drawChart = function () { if (this._chartViewType === 0 /* Scale */ || this._chartViewType === 1 /* Expand */) { this._chartViewX = this._gridX.min; this._chartViewWidth = Math.max(this._gridRange.x, this._chartViewWidth); } this.drawChartBackground(); var chartRect = new Rect(this._chartAxisPadding.left, this._chartAxisPadding.top, this._chartWidth, this._chartHeight - (this._chartViewOverview ? 40 : 0)); this.drawChartAxes(chartRect); this.drawChartType(this._chartViewType, chartRect, false); this.drawChartLegend(chartRect); if (this._chartViewOverview) { chartRect.top += chartRect.height + 10; chartRect.bottom = chartRect.top + 30; this.drawChartType(1 /* Expand */, chartRect, true); this.drawChartViewSelection(chartRect); } }; CanvasChartControl.prototype.calculateRange = function (point) { if (this._gridX.max < point.x) { this._gridX.max = point.x; } if (this._gridX.min > point.x) { this._gridX.min = point.x; } if (this._gridY.min > point.y) { this._gridY.min = Math.floor((point.y * this._chartAxisIncreaseRatio) / this._chartAxisCount) * this._chartAxisCount; } if (this._gridY.max < point.y) { this._gridY.max = Math.ceil((point.y * this._chartAxisIncreaseRatio) / this._chartAxisCount) * this._chartAxisCount; } this._gridRange.x = this._gridX.max - this._gridX.min; this._gridRange.y = this._gridY.max - this._gridY.min; }; return CanvasChartControl; })(Common.Controls.Legacy.TemplateControl); Charting.CanvasChartControl = CanvasChartControl; })(Controls.Charting || (Controls.Charting = {})); var Charting = Controls.Charting; })(MemoryAnalyzer.Controls || (MemoryAnalyzer.Controls = {})); var Controls = MemoryAnalyzer.Controls; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // componentModel.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (Controls) { var ObservableViewModel = (function () { function ObservableViewModel() { this._propertyChangedObservers = []; } ObservableViewModel.prototype.registerPropertyChanged = function (observer) { this._propertyChangedObservers.push(observer); }; ObservableViewModel.prototype.removePropertyChanged = function (observer) { var index = this._propertyChangedObservers.indexOf(observer); if (index >= 0) { this._propertyChangedObservers = this._propertyChangedObservers.splice(index, 1); } }; ObservableViewModel.prototype.raisePropertyChanged = function (propertyName) { for (var i = 0; i < this._propertyChangedObservers.length; i++) { this._propertyChangedObservers[i].onPropertyChanged(propertyName); } }; return ObservableViewModel; })(); Controls.ObservableViewModel = ObservableViewModel; (function (NotifyCollectionChangedAction) { NotifyCollectionChangedAction[NotifyCollectionChangedAction["Add"] = 0] = "Add"; NotifyCollectionChangedAction[NotifyCollectionChangedAction["Reset"] = 1] = "Reset"; })(Controls.NotifyCollectionChangedAction || (Controls.NotifyCollectionChangedAction = {})); var NotifyCollectionChangedAction = Controls.NotifyCollectionChangedAction; var NotifyCollectionChangedEventArgs = (function () { function NotifyCollectionChangedEventArgs(action, newItems, newStartingIndex, oldItems, oldStartingIndex) { this._action = action; this._newItems = newItems; this._newStartingIndex = newStartingIndex; this._oldItems = oldItems; this._oldStartingIndex = oldStartingIndex; } Object.defineProperty(NotifyCollectionChangedEventArgs.prototype, "action", { get: function () { return this._action; }, enumerable: true, configurable: true }); Object.defineProperty(NotifyCollectionChangedEventArgs.prototype, "newItems", { get: function () { return this._newItems; }, enumerable: true, configurable: true }); Object.defineProperty(NotifyCollectionChangedEventArgs.prototype, "newStartingIndex", { get: function () { return this._newStartingIndex; }, enumerable: true, configurable: true }); Object.defineProperty(NotifyCollectionChangedEventArgs.prototype, "oldItems", { get: function () { return this._oldItems; }, enumerable: true, configurable: true }); Object.defineProperty(NotifyCollectionChangedEventArgs.prototype, "oldStartingIndex", { get: function () { return this._oldStartingIndex; }, enumerable: true, configurable: true }); return NotifyCollectionChangedEventArgs; })(); Controls.NotifyCollectionChangedEventArgs = NotifyCollectionChangedEventArgs; var ObservableCollection = (function () { function ObservableCollection() { this._items = []; this._collectionChangedObservers = []; } Object.defineProperty(ObservableCollection.prototype, "length", { get: function () { return this._items.length; }, enumerable: true, configurable: true }); ObservableCollection.prototype.registerCollectionChanged = function (observer) { this._collectionChangedObservers.push(observer); }; ObservableCollection.prototype.removeCollectionChanged = function (observer) { var index = this._collectionChangedObservers.indexOf(observer); if (index >= 0) { this._collectionChangedObservers = this._collectionChangedObservers.splice(index, 1); } }; ObservableCollection.prototype.add = function (item) { this._items.push(item); var args = new NotifyCollectionChangedEventArgs(0 /* Add */, [item], this._items.length - 1, [], 0); this.onCollectionChanged(args); }; ObservableCollection.prototype.clear = function () { var oldItems = this._items; this._items = []; var args = new NotifyCollectionChangedEventArgs(1 /* Reset */, [], 0, oldItems, oldItems.length - 1); this.onCollectionChanged(args); }; ObservableCollection.prototype.getItem = function (index) { return this._items[index]; }; ObservableCollection.prototype.onCollectionChanged = function (eventArgs) { for (var i = 0; i < this._collectionChangedObservers.length; i++) { this._collectionChangedObservers[i].onCollectionChanged(eventArgs); } }; return ObservableCollection; })(); Controls.ObservableCollection = ObservableCollection; })(MemoryAnalyzer.Controls || (MemoryAnalyzer.Controls = {})); var Controls = MemoryAnalyzer.Controls; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // gridSplitterControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (Controls) { (function (GridSplitterDirection) { GridSplitterDirection[GridSplitterDirection["Horizontal"] = 0] = "Horizontal"; GridSplitterDirection[GridSplitterDirection["Vertical"] = 1] = "Vertical"; })(Controls.GridSplitterDirection || (Controls.GridSplitterDirection = {})); var GridSplitterDirection = Controls.GridSplitterDirection; var GridSplitterControl = (function (_super) { __extends(GridSplitterControl, _super); function GridSplitterControl(splitterElement, minSize, scrollableContainer, callback) { _super.call(this, splitterElement); this._direction = null; this._minSize = (typeof minSize === "number" && minSize > 0) ? minSize : GridSplitterControl._gridSplitterDefaultMinSize; this._scrollableContainer = scrollableContainer; this._callback = callback; if (!this.rootElement.contains(GridSplitterControl._gridSplitterClass)) { this.rootElement.classList.add(GridSplitterControl._gridSplitterClass); } this._resizerDisplay = document.createElement("div"); this._resizerDisplay.className = GridSplitterControl._gridSplitterClass + " " + GridSplitterControl._gridSplitterResizerClass; this._resizerDisplay.style.position = "relative"; this._resizerDisplay.style.display = "none"; this.rootElement.appendChild(this._resizerDisplay); this.rootElement.addEventListener("mousedown", this.onMouseDown.bind(this)); } Object.defineProperty(GridSplitterControl.prototype, "direction", { get: function () { if (this._direction === null) { this._direction = this.getSplitterDirection(); } return this._direction; }, enumerable: true, configurable: true }); Object.defineProperty(GridSplitterControl.prototype, "gridCSS", { get: function () { if (!this._gridCSS) { this._gridCSS = this.getParentGridCSS(); } return this._gridCSS; }, enumerable: true, configurable: true }); GridSplitterControl.prototype.getSplitterDirection = function () { var direction; if (this.rootElement.classList.contains(GridSplitterControl._gridSplitterVerticalClass)) { direction = 1 /* Vertical */; } else if (this.rootElement.classList.contains(GridSplitterControl._gridSplitterHorizontalClass)) { direction = 0 /* Horizontal */; } else { if (this.rootElement.clientWidth > this.rootElement.clientHeight) { direction = 1 /* Vertical */; } else { direction = 0 /* Horizontal */; } } if (direction == 1 /* Vertical */) { this._gridIndex = parseInt(this.rootElement.currentStyle.msGridRow, 10) - 1; this._resizerDisplay.className += " " + GridSplitterControl._gridSplitterClass + "-Vertical"; } else { this._gridIndex = parseInt(this.rootElement.currentStyle.msGridColumn, 10) - 1; this._resizerDisplay.className += " " + GridSplitterControl._gridSplitterClass + "-Horizontal"; } return direction; }; GridSplitterControl.prototype.getParentGridCSS = function () { if (this.direction === 1 /* Vertical */) { return this.rootElement.parentElement.currentStyle.msGridRows; } else { return this.rootElement.parentElement.currentStyle.msGridColumns; } }; GridSplitterControl.prototype.calculateGridInfo = function () { this._gridCSS = this.getParentGridCSS(); if (!this._gridCSS) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1019")); } this._gridCSSParts = this._gridCSS.split(" "); if (this._gridCSSParts.length >= this._gridIndex && this._gridIndex > 0) { var previous = this._gridCSSParts[this._gridIndex - 1]; var current = this._gridCSSParts[this._gridIndex]; if (previous.indexOf("fr") === -1 || current.indexOf("fr") === -1) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1020")); } this._gridCSSTotal = (parseFloat(previous) + parseFloat(current)); } else { throw new Error(Plugin.Resources.getErrorString("JSPerf.1021")); } }; GridSplitterControl.prototype.onMouseMove = function (e) { var mousePosition = (this.direction === 1 /* Vertical */ ? e.pageY : e.pageX); var previous = this.rootElement.previousElementSibling; var next = this.rootElement.nextElementSibling; var min = 0; var max = 0; if (this.direction === 1 /* Vertical */) { min = previous.offsetTop + this._minSize; max = next.offsetTop + next.offsetHeight - this._minSize; } else { min = previous.offsetLeft + this._minSize; max = next.offsetLeft + next.offsetWidth - this._minSize; } if (!this._scrollableContainer) { var scrollOffset = this._scrollableContainer.scrollTop; min -= scrollOffset; max -= scrollOffset; } var newPostion = mousePosition; if (mousePosition < min) { newPostion = min; } else if (mousePosition > max) { newPostion = max; } this._endPosition = newPostion; var displayPosition = newPostion - this._startPosition; if (this.direction === 1 /* Vertical */) { this._resizerDisplay.style.top = displayPosition + "px"; } else { this._resizerDisplay.style.left = displayPosition + "px"; } e.stopImmediatePropagation(); e.preventDefault(); }; GridSplitterControl.prototype.onMouseUp = function (e) { this._resizerDisplay.style.display = "none"; this.rootElement.style.removeProperty("background-color"); document.body.style.cursor = this._previousCursor; var sizePrevious = 0; var sizeCurrent = 0; if (this.direction === 1 /* Vertical */) { sizePrevious = this.rootElement.previousElementSibling.clientHeight; sizeCurrent = this.rootElement.nextElementSibling.clientHeight; } else { sizePrevious = this.rootElement.previousElementSibling.clientWidth; sizeCurrent = this.rootElement.nextElementSibling.clientWidth; } var changeInPosition = (this._endPosition - this._startPosition); var ratioCurrent = (sizeCurrent - changeInPosition) / (sizePrevious + sizeCurrent); if (ratioCurrent > 0 && ratioCurrent < 1) { var newSizePrevious = (1 - ratioCurrent) * this._gridCSSTotal; var newSizeCurrent = ratioCurrent * this._gridCSSTotal; var newGridCSS = ""; for (var i = 0; i < this._gridCSSParts.length; i++) { if (i === this._gridIndex - 1) { newGridCSS += newSizePrevious + "fr"; } else if (i === this._gridIndex) { newGridCSS += newSizeCurrent + "fr"; } else { newGridCSS += this._gridCSSParts[i]; } if (i < this._gridCSSParts.length - 1) { newGridCSS += " "; } } if (this.direction === 1 /* Vertical */) { this.rootElement.parentElement.style.msGridRows = newGridCSS; } else { this.rootElement.parentElement.style.msGridColumns = newGridCSS; } this._gridCSS = newGridCSS; if (this._callback && typeof (this._callback) == "function") { this._callback(); } } document.removeEventListener("mousemove", this._mouseMoveListener, true); document.removeEventListener("mouseup", this._mouseUpListener, true); e.stopImmediatePropagation(); e.preventDefault(); }; GridSplitterControl.prototype.onMouseDown = function (e) { this.calculateGridInfo(); this._previousCursor = document.body.style.cursor; document.body.style.cursor = this.rootElement.currentStyle.cursor; this._startPosition = (this.direction === 1 /* Vertical */ ? e.pageY : e.pageX); this.rootElement.style.backgroundColor = "transparent"; this._resizerDisplay.style.display = "block"; this._resizerDisplay.style.top = "0"; this._resizerDisplay.style.left = "0"; this._mouseMoveListener = this.onMouseMove.bind(this); this._mouseUpListener = this.onMouseUp.bind(this); document.addEventListener("mousemove", this._mouseMoveListener, true); document.addEventListener("mouseup", this._mouseUpListener, true); e.stopImmediatePropagation(); e.preventDefault(); }; GridSplitterControl._gridSplitterClass = "gridSplitter"; GridSplitterControl._gridSplitterResizerClass = "gridSplitter-Resizer"; GridSplitterControl._gridSplitterVerticalClass = "gridSplitter-Vertical"; GridSplitterControl._gridSplitterHorizontalClass = "gridSplitter-Horizontal"; GridSplitterControl._gridSplitterDefaultMinSize = 100; return GridSplitterControl; })(Common.Controls.Legacy.Control); Controls.GridSplitterControl = GridSplitterControl; })(MemoryAnalyzer.Controls || (MemoryAnalyzer.Controls = {})); var Controls = MemoryAnalyzer.Controls; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // tabControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (Controls) { var TabControl = (function (_super) { __extends(TabControl, _super); function TabControl() { _super.call(this); this._items = []; this.setTemplateFromHTML("
        " + "
        " + "
        " + "
        " + "
          " + "
          " + "
          " + "
          " + "
          " + "
          "); this._barPanel = new Common.Controls.Legacy.Control(this.rootElement.getElementsByClassName("tabBar")[0]); this._barPanel.rootElement.setAttribute("role", "tabList"); this._barPanel.rootElement.onkeydown = this.onKeyDown.bind(this); this._contentPane = new Common.Controls.Legacy.Control(this.rootElement.getElementsByClassName("tabContentPane")[0]); this.beforeBarContainer = new Common.Controls.Legacy.Control(this.rootElement.getElementsByClassName("beforeBarContainer")[0]); this.afterBarContainer = this.rootElement.getElementsByClassName("afterBarContainer")[0]; this._tabBarContainer = this.findElement("tabBarContainer"); } Object.defineProperty(TabControl.prototype, "tabsLeftAligned", { get: function () { return this._tabBarContainer.classList.contains("tabBarContainerLeftAlign"); }, set: function (v) { if (v) { this._tabBarContainer.classList.add("tabBarContainerLeftAlign"); } else { this._tabBarContainer.classList.remove("tabBarContainerLeftAlign"); } }, enumerable: true, configurable: true }); Object.defineProperty(TabControl.prototype, "selectedItem", { get: function () { return this._selectedItem; }, set: function (tabItem) { if (this._selectedItem !== tabItem) { if (!this.containsTab(tabItem)) { return; } if (this._selectedItem) { this._selectedItem.active = false; } this._selectedItem = tabItem; if (this._selectedItem) { this._selectedItem.active = true; } if (this.selectedItemChanged) { this.selectedItemChanged(); } } }, enumerable: true, configurable: true }); TabControl.prototype.addTab = function (tabItem) { this._items.push(tabItem); tabItem.ownerTabControl = this; this._barPanel.appendChild(tabItem.header); this._contentPane.appendChild(tabItem); if (!this._selectedItem) { this.selectedItem = tabItem; } }; TabControl.prototype.removeTab = function (tabItem) { var indexOfItem = this._items.indexOf(tabItem); if (indexOfItem < 0) { return; } if (this.selectedItem === tabItem) { this.selectedItem = null; } this._items.splice(indexOfItem, 1); var newSelectedItemIndex = Math.min(this._items.length - 1, indexOfItem); if (newSelectedItemIndex >= 0) { this.selectedItem = this._items[newSelectedItemIndex]; } this._barPanel.removeChild(tabItem.header); this._contentPane.removeChild(tabItem); tabItem.ownerTabControl = null; }; TabControl.prototype.containsTab = function (tabItem) { return this._items.indexOf(tabItem) >= 0; }; TabControl.prototype.getTabIndex = function (tabItem) { return this._items.indexOf(tabItem); }; TabControl.prototype.getTab = function (index) { return this._items[index]; }; TabControl.prototype.length = function () { return this._items.length; }; TabControl.prototype.onTabItemSelected = function (item) { this.selectedItem = item; }; TabControl.prototype.onKeyDown = function (e) { var activeTabIndex = this.getTabIndex(this._selectedItem); if (activeTabIndex >= 0) { if (e.keyCode === 39 /* ArrowRight */ || e.keyCode === 40 /* ArrowDown */) { this.selectedItem = this.getTab((activeTabIndex + 1) % this.length()); } else if (e.keyCode === 37 /* ArrowLeft */ || e.keyCode === 38 /* ArrowUp */) { this.selectedItem = this.getTab(activeTabIndex - 1 < 0 ? this.length() - 1 : activeTabIndex - 1); } } else { this.selectedItem = this.getTab(0); } this._selectedItem.header.rootElement.focus(); }; return TabControl; })(Common.Controls.Legacy.TemplateControl); Controls.TabControl = TabControl; })(MemoryAnalyzer.Controls || (MemoryAnalyzer.Controls = {})); var Controls = MemoryAnalyzer.Controls; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // tabItem.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (Controls) { var TabItem = (function (_super) { __extends(TabItem, _super); function TabItem() { _super.call(this); this.header = new Common.Controls.Legacy.Control(document.createElement("li")); this.header.rootElement.onclick = this.onHeaderClicked.bind(this); this.header.rootElement.setAttribute("role", "tab"); this.header.rootElement.addEventListener("keydown", this.onKeyDown.bind(this)); this.rootElement.className = "tabItemContent"; } Object.defineProperty(TabItem.prototype, "ownerTabControl", { get: function () { return this._ownerTabControl; }, set: function (v) { if (this._ownerTabControl !== v) { if (this._ownerTabControl && v) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1022")); } this._ownerTabControl = v; } }, enumerable: true, configurable: true }); Object.defineProperty(TabItem.prototype, "active", { get: function () { return this._active; }, set: function (this_active) { if (this._active !== this_active) { this._active = this_active; this.header.rootElement.classList.toggle("active"); if (this_active) { this.header.rootElement.setAttribute("tabIndex", "2"); } else { this.header.rootElement.removeAttribute("tabIndex"); } this.rootElement.classList.toggle("active"); this.onActiveChanged(); } }, enumerable: true, configurable: true }); Object.defineProperty(TabItem.prototype, "title", { get: function () { return this.header.rootElement.innerText; }, set: function (v) { this.header.rootElement.innerText = v; }, enumerable: true, configurable: true }); Object.defineProperty(TabItem.prototype, "tooltipString", { get: function () { return this.header.rootElement.getAttribute("data-plugin-vs-tooltip"); }, set: function (v) { var tooltip = { content: v }; this.header.rootElement.setAttribute("data-plugin-vs-tooltip", JSON.stringify(tooltip)); }, enumerable: true, configurable: true }); TabItem.prototype.onActiveChanged = function () { }; TabItem.prototype.onHeaderClicked = function () { if (this.ownerTabControl) { this.ownerTabControl.selectedItem = this; } MemoryAnalyzer.Program.onIdle(); }; TabItem.prototype.onKeyDown = function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { this.onHeaderClicked(); } }; return TabItem; })(Common.Controls.Legacy.ContentControl); Controls.TabItem = TabItem; })(MemoryAnalyzer.Controls || (MemoryAnalyzer.Controls = {})); var Controls = MemoryAnalyzer.Controls; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // internalFeedback.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { (function (Extensions) { "use strict"; var InternalFeedbackProxy = (function () { function InternalFeedbackProxy() { this._proxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.PerformanceToolHost.Package.Extensions.InternalFeedback", {}, true); } InternalFeedbackProxy.prototype.isEnabled = function () { return this._proxy._call("isEnabled"); }; InternalFeedbackProxy.prototype.sendData = function (showDialog, titleText, feedbackText, viewName, trace, sessionFilePath) { return this._proxy._call("sendData", showDialog, titleText, feedbackText, viewName, trace, sessionFilePath); }; InternalFeedbackProxy.instance = new InternalFeedbackProxy(); return InternalFeedbackProxy; })(); Extensions.InternalFeedbackProxy = InternalFeedbackProxy; var NoOperationInternalFeedback = (function () { function NoOperationInternalFeedback() { } NoOperationInternalFeedback.prototype.isEnabled = function () { return Plugin.Promise.as(false); }; NoOperationInternalFeedback.prototype.sendData = function (showDialog, titleText, feedbackText, viewName, trace, sessionFilePath) { return Plugin.Promise.as(null); }; return NoOperationInternalFeedback; })(); Extensions.NoOperationInternalFeedback = NoOperationInternalFeedback; })(MemoryAnalyzer.Extensions || (MemoryAnalyzer.Extensions = {})); var Extensions = MemoryAnalyzer.Extensions; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // session.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { (function (Extensions) { "use strict"; (function (SessionType) { SessionType[SessionType["session"] = 0] = "session"; SessionType[SessionType["snapshot"] = 1] = "snapshot"; SessionType[SessionType["snapshotDiff"] = 2] = "snapshotDiff"; })(Extensions.SessionType || (Extensions.SessionType = {})); var SessionType = Extensions.SessionType; var Session = (function () { function Session() { this._snapshotId = 1; } Session.prototype.getNewSnapshotRelativePath = function () { return "snapshot" + (this._snapshotId++) + ".snapjs"; }; return Session; })(); Extensions.Session = Session; var HostSessionProxy = (function (_super) { __extends(HostSessionProxy, _super); function HostSessionProxy() { _super.call(this); this._sessionProxy = Plugin.Utilities.JSONMarshaler.attachToPublishedObject("Microsoft.VisualStudio.WebClient.Diagnostics.PerformanceToolHost.Package.Extensions.Session", {}, true); } HostSessionProxy.prototype.addViewTypeEventListener = function (callback) { this._sessionProxy.addEventListener("viewtypechange", callback); }; HostSessionProxy.prototype.getSessionInfo = function () { return this._sessionProxy._call("getSessionInfo"); }; HostSessionProxy.prototype.openSnapshotDetails = function (relativePath, targetView, tabName, sortProperty) { return this._sessionProxy._call("openSnapshotDetails", relativePath, targetView, tabName, 0, 0, sortProperty); }; HostSessionProxy.prototype.openSnapshotDiff = function (relativePaths, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty) { return this._sessionProxy._call("openSnapshotDiff", relativePaths, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty); }; HostSessionProxy.prototype.save = function (addToProject) { return this._sessionProxy._call("save", addToProject); }; return HostSessionProxy; })(Session); Extensions.HostSessionProxy = HostSessionProxy; var LocalSession = (function (_super) { __extends(LocalSession, _super); function LocalSession(storageId, isOffline) { if (typeof isOffline === "undefined") { isOffline = false; } _super.call(this); this._sessionInfo = { filePaths: [], isOffline: isOffline, sessionType: 0 /* session */, sortProperty: "", storageId: (storageId ? storageId : LocalSession.getUniqueStorageId()), targetView: "" }; } LocalSession.prototype.addViewTypeEventListener = function (callback) { }; LocalSession.prototype.getSessionInfo = function () { return Plugin.Promise.as(this._sessionInfo); }; LocalSession.prototype.openSnapshotDetails = function (relativePath, targetView, tabName, sortProperty) { var _this = this; return new Plugin.Promise(function (completed, error) { completed({ filePaths: [relativePath], isOffline: true, sessionType: 1 /* snapshot */, sortProperty: sortProperty, storageId: _this._sessionInfo.storageId, targetView: targetView }); }); }; LocalSession.prototype.openSnapshotDiff = function (relativePaths, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty) { var _this = this; return new Plugin.Promise(function (completed, error) { completed({ filePaths: relativePaths, isOffline: true, sessionType: 2 /* snapshotDiff */, sortProperty: sortProperty, storageId: _this._sessionInfo.storageId, targetView: targetView, firstSnapshotId: firstSnapshotId, lastSnapshotId: lastSnapshotId }); }); }; LocalSession.prototype.save = function (addToProject) { var _this = this; return new Plugin.Promise(function (completed, error) { var snapshotDirectory = Common.Constants.MEMORY_ANALYZER_SNAPSHOT_ROOT_PATH + _this._sessionInfo.storageId; try { var tempPath = MemoryAnalyzer.Program.packager.createPackage(Common.Constants.MEMORY_ANALYZER_TOOL_GUID); var splitStorageId = _this._sessionInfo.storageId.split("\\"); var sessionStorageIdOnly; if (splitStorageId.length > 1) { sessionStorageIdOnly = splitStorageId[splitStorageId.length - 1]; } else { sessionStorageIdOnly = _this._sessionInfo.storageId; } MemoryAnalyzer.Program.packager.addResource(Common.Constants.MEMORY_ANALYZER_SNAPSHOT_RESOURCE_TYPE, snapshotDirectory, sessionStorageIdOnly); MemoryAnalyzer.Program.packager.commit(); completed(tempPath); } catch (e) { if (error) { error(e); } } }); }; LocalSession.getUniqueStorageId = function () { return Math.floor(Math.random() * 2821109907455).toString(36) + "." + Math.floor(Math.random() * 46655).toString(36); }; return LocalSession; })(Session); Extensions.LocalSession = LocalSession; })(MemoryAnalyzer.Extensions || (MemoryAnalyzer.Extensions = {})); var Extensions = MemoryAnalyzer.Extensions; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // userSettings.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { (function (Extensions) { "use strict"; var UserSettingsProxy = (function () { function UserSettingsProxy() { } UserSettingsProxy.prototype.getUserSettings = function () { return new Plugin.Promise(function (completed) { Plugin.Settings.get("JavaScriptPerfTools").done(function (result) { completed(result); }, function (error) { completed({}); }); }, null); }; return UserSettingsProxy; })(); Extensions.UserSettingsProxy = UserSettingsProxy; })(MemoryAnalyzer.Extensions || (MemoryAnalyzer.Extensions = {})); var Extensions = MemoryAnalyzer.Extensions; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // errorFormatter.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var ErrorFormatter = (function () { function ErrorFormatter() { } ErrorFormatter.format = function (error) { if (MemoryAnalyzer.Program.userSettings.showDetailedErrors) { var message = "Error description: " + (error.message || error.description); if (error.number) { message += "\r\nError number: " + error.number; } if (error.stack) { message += "\r\nError stack: " + error.stack; } return message; } else { return (error.message || error.description); } }; return ErrorFormatter; })(); MemoryAnalyzer.ErrorFormatter = ErrorFormatter; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // formattingHelpers.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var FormattingHelpers = (function () { function FormattingHelpers() { } FormattingHelpers.getPrettyPrintSize = function (bytes) { var size = 0; var unitAbbreviation; if (Math.abs(bytes) > (1024 * 1024 * 1024)) { size = bytes / (1024 * 1024 * 1024); unitAbbreviation = Plugin.Resources.getString("GigabyteUnits"); } else if (Math.abs(bytes) > (1024 * 1024)) { size = bytes / (1024 * 1024); unitAbbreviation = Plugin.Resources.getString("MegabyteUnits"); } else if (Math.abs(bytes) > 1024) { size = bytes / 1024; unitAbbreviation = Plugin.Resources.getString("KilobyteUnits"); } else { size = bytes; unitAbbreviation = Plugin.Resources.getString("ByteUnits"); } return Common.FormattingHelpers.getDecimalLocaleString(parseFloat(size.toFixed(2)), true) + " " + unitAbbreviation; }; return FormattingHelpers; })(); MemoryAnalyzer.FormattingHelpers = FormattingHelpers; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // heapObject.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (ExternalObjectKind) { ExternalObjectKind[ExternalObjectKind["Default"] = 1] = "Default"; ExternalObjectKind[ExternalObjectKind["Unknown"] = 2] = "Unknown"; ExternalObjectKind[ExternalObjectKind["Dispatch"] = 3] = "Dispatch"; })(MemoryAnalyzer.ExternalObjectKind || (MemoryAnalyzer.ExternalObjectKind = {})); var ExternalObjectKind = MemoryAnalyzer.ExternalObjectKind; (function (WinRTObjectKind) { WinRTObjectKind[WinRTObjectKind["Instance"] = 1] = "Instance"; WinRTObjectKind[WinRTObjectKind["RuntimeClass"] = 2] = "RuntimeClass"; WinRTObjectKind[WinRTObjectKind["Delegate"] = 3] = "Delegate"; WinRTObjectKind[WinRTObjectKind["Namespace"] = 4] = "Namespace"; })(MemoryAnalyzer.WinRTObjectKind || (MemoryAnalyzer.WinRTObjectKind = {})); var WinRTObjectKind = MemoryAnalyzer.WinRTObjectKind; (function (HeapObjectFlags) { HeapObjectFlags[HeapObjectFlags["ExternalOffset"] = 0] = "ExternalOffset"; HeapObjectFlags[HeapObjectFlags["ExternalMask"] = 7] = "ExternalMask"; HeapObjectFlags[HeapObjectFlags["WinRtOffset"] = 3] = "WinRtOffset"; HeapObjectFlags[HeapObjectFlags["WinRtMask"] = 7] = "WinRtMask"; HeapObjectFlags[HeapObjectFlags["IsNew"] = 1 << 6] = "IsNew"; HeapObjectFlags[HeapObjectFlags["IsRoot"] = 1 << 7] = "IsRoot"; HeapObjectFlags[HeapObjectFlags["IsSiteClosed"] = 1 << 8] = "IsSiteClosed"; HeapObjectFlags[HeapObjectFlags["IsBuiltIn"] = 1 << 9] = "IsBuiltIn"; HeapObjectFlags[HeapObjectFlags["IsMarkup"] = 1 << 10] = "IsMarkup"; HeapObjectFlags[HeapObjectFlags["IsSizeApproximate"] = 1 << 11] = "IsSizeApproximate"; HeapObjectFlags[HeapObjectFlags["IsChanged"] = 1 << 12] = "IsChanged"; HeapObjectFlags[HeapObjectFlags["IsDetachedDomNode"] = 1 << 13] = "IsDetachedDomNode"; HeapObjectFlags[HeapObjectFlags["IsWinJsDisposable"] = 1 << 14] = "IsWinJsDisposable"; HeapObjectFlags[HeapObjectFlags["IsAdded"] = 1 << 15] = "IsAdded"; HeapObjectFlags[HeapObjectFlags["IsBaseline"] = 1 << 16] = "IsBaseline"; HeapObjectFlags[HeapObjectFlags["IsRelatedToAddedScopedObject"] = 1 << 17] = "IsRelatedToAddedScopedObject"; HeapObjectFlags[HeapObjectFlags["IsRelatedToLeftoverScopedObject"] = 1 << 18] = "IsRelatedToLeftoverScopedObject"; HeapObjectFlags[HeapObjectFlags["IsFabricatedObject"] = 1 << 19] = "IsFabricatedObject"; HeapObjectFlags[HeapObjectFlags["HasDetachedDomNodeChildren"] = 1 << 20] = "HasDetachedDomNodeChildren"; })(MemoryAnalyzer.HeapObjectFlags || (MemoryAnalyzer.HeapObjectFlags = {})); var HeapObjectFlags = MemoryAnalyzer.HeapObjectFlags; var MaskOperations = (function () { function MaskOperations() { } MaskOperations.getValue = function (input, offset, mask) { return (input >> offset) & mask; }; MaskOperations.setValue = function (input, newValue, offset, mask) { return (~(mask << offset) & input) | ((newValue & mask) << offset); }; MaskOperations.isFlagSet = function (input, flag) { return (input & flag) !== 0 ? true : false; }; MaskOperations.setFlag = function (input, newValue, flag) { return newValue ? (input | flag) : (input & (~flag)); }; return MaskOperations; })(); MemoryAnalyzer.MaskOperations = MaskOperations; var NamedHeapObject = (function () { function NamedHeapObject(node, displayObjectIDs, isCircularReference) { this._innerObj = node.object; this._isCircularReference = isCircularReference; this.name = this.initName(node.name, displayObjectIDs); if (!isCircularReference) { this._hasChildren = node.hasChildren; } if (this.isFabricatedObject) { this._diffOperation = null; } else if (this.isAdded) { this._diffOperation = Plugin.Resources.getString("DiffColumnOperationAdded"); } else if (this.isChanged) { this._diffOperation = Plugin.Resources.getString("DiffColumnOperationModified"); if (this.isBaseline) { this._diffOperation += " (" + Plugin.Resources.getString("Baseline") + ")"; } } else { this._diffOperation = Plugin.Resources.getString("DiffColumnOperationUnchanged"); if (this.isBaseline) { this._diffOperation += " (" + Plugin.Resources.getString("Baseline") + ")"; } } } Object.defineProperty(NamedHeapObject.prototype, "id", { get: function () { return this.objectId; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "flags", { get: function () { return this._innerObj.flags; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "kind", { get: function () { return this._innerObj.kind; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "objectId", { get: function () { return this._innerObj.objectId; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "retainedSize", { get: function () { return this._innerObj.retainedSize; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "size", { get: function () { return this._innerObj.size; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "sourceInfo", { get: function () { return this._innerObj.sourceInfo; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "type", { get: function () { return this._innerObj.type; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "value", { get: function () { return this._innerObj.value; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "diffOperation", { get: function () { return this._diffOperation; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "sizeDiff", { get: function () { return this._innerObj.sizeDiff; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "retainedSizeDiff", { get: function () { return this._innerObj.retainedSizeDiff; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "hasChildren", { get: function () { return this._hasChildren; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isCircularReference", { get: function () { return this._isCircularReference; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "containsDetachedDomNode", { get: function () { return this.isDetachedDomNode || this.hasDetachedDomNodeChildren; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "hasDetachedDomNodeChildren", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.HasDetachedDomNodeChildren); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isDetachedDomNode", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsDetachedDomNode); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isSizeApproximate", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsSizeApproximate); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isNew", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsNew); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isRoot", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsRoot); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isSiteClosed", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsSiteClosed); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isBuiltIn", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsBuiltIn); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "external", { get: function () { var val = MaskOperations.getValue(this._innerObj.flags, 0 /* ExternalOffset */, 7 /* ExternalMask */); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "winrt", { get: function () { var val = MaskOperations.getValue(this._innerObj.flags, 3 /* WinRtOffset */, 7 /* WinRtMask */); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isMarkup", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsMarkup); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isAdded", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsAdded); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isBaseline", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsBaseline); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isChanged", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsChanged); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isFabricatedObject", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsFabricatedObject); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isRelatedToAddedScopedObject", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsRelatedToAddedScopedObject); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isRelatedToLeftoverScopedObject", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsRelatedToLeftoverScopedObject); return val; }, enumerable: true, configurable: true }); Object.defineProperty(NamedHeapObject.prototype, "isWinJsDisposable", { get: function () { var val = MaskOperations.isFlagSet(this._innerObj.flags, HeapObjectFlags.IsWinJsDisposable); return val; }, enumerable: true, configurable: true }); NamedHeapObject.prototype.initName = function (nameOverride, displayObjectIDs) { var name = ""; if (typeof nameOverride !== "undefined") { name += nameOverride; } if (this.winrt) { switch (this.winrt) { case 2: name += "{Runtime Class} "; break; case 3: name += "{Delegate} "; break; case 4: name += "{Namespace} "; break; } } if (this.external) { if (name) { name += ": "; } else { name = ""; } var externalPostfix = "External"; switch (this.external) { case 2: externalPostfix += " IUnknown"; break; case 3: externalPostfix += " IDispatch"; break; } name += externalPostfix; } if (typeof this.value !== "undefined") { if (name) { name += " = "; } else { name = ""; } var isString = typeof (this.value) === "string"; if (isString) { name += "\""; } name += this.value; if (isString) { name += "\""; } } if (name === "" && this.type) { name += "(" + this.type + ") "; } if (displayObjectIDs && this.objectId && !this.isFabricatedObject) { name += " @" + this.objectId; } return name; }; return NamedHeapObject; })(); MemoryAnalyzer.NamedHeapObject = NamedHeapObject; var ReferenceDataObject = (function (_super) { __extends(ReferenceDataObject, _super); function ReferenceDataObject(innerObj, displayObjectIDs, parentObjectId, nodeId) { if (typeof nodeId === "undefined") { nodeId = 0; } _super.call(this, innerObj, displayObjectIDs); this.nodeId = nodeId; this.parentObjectId = parentObjectId; } return ReferenceDataObject; })(NamedHeapObject); MemoryAnalyzer.ReferenceDataObject = ReferenceDataObject; var TypeDataObject = (function () { function TypeDataObject(objectHeapType) { this.objectHeapType = objectHeapType; this._name = this.objectHeapType.type; } Object.defineProperty(TypeDataObject.prototype, "isAdded", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isBaseline", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isRelatedToAddedScopedObject", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isRelatedToLeftoverScopedObject", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isFabricatedObject", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isChanged", { get: function () { return this.objectHeapType.hasModifiedChildren; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "id", { get: function () { return this.objectHeapType.type; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isDetachedDomNode", { get: function () { return this.objectHeapType.hasDetachedDomNodeChildrenOfSameType; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "name", { get: function () { return this._name; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "retainedSize", { get: function () { return this.objectHeapType.retainedSize; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "sizeDiff", { get: function () { return this.objectHeapType.sizeDiff; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "retainedSizeDiff", { get: function () { return this.objectHeapType.retainedSizeDiff; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "size", { get: function () { return this.objectHeapType.size; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isSizeApproximate", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isNew", { get: function () { return true; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "type", { get: function () { return ""; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "isBuiltIn", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "childrenCount", { get: function () { return this.objectHeapType.childrenCount; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "hasChildren", { get: function () { return this.objectHeapType.childrenCount > 0; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "hasDetachedDomNodeChildren", { get: function () { return this.objectHeapType.hasDetachedDomNodeChildren; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "containsDetachedDomNode", { get: function () { return this.isDetachedDomNode || this.hasDetachedDomNodeChildren; }, enumerable: true, configurable: true }); Object.defineProperty(TypeDataObject.prototype, "diffOperation", { get: function () { return null; }, enumerable: true, configurable: true }); return TypeDataObject; })(); MemoryAnalyzer.TypeDataObject = TypeDataObject; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // navigationHelpers.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var NavigationHelpers = (function () { function NavigationHelpers() { } NavigationHelpers.getNextId = function () { return NavigationHelpers.idCounter++; }; NavigationHelpers.reset = function () { NavigationHelpers.frameMap = []; NavigationHelpers.currentNavigationId = -1; }; NavigationHelpers.setToolbar = function (toolbar) { NavigationHelpers.toolbarFrame = Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body, function () { return toolbar.getActiveElement(); }); NavigationHelpers.registerNavigation(); }; NavigationHelpers.switchNavigationView = function (navigationId) { NavigationHelpers.currentNavigationId = navigationId; NavigationHelpers.registerNavigation(); }; NavigationHelpers.updateAdditionalNavigationFrames = function (navigationId, frames) { if (typeof frames === "undefined") { frames = []; } NavigationHelpers.frameMap[navigationId] = frames; if (navigationId === NavigationHelpers.currentNavigationId) { NavigationHelpers.registerNavigation(); } }; NavigationHelpers.registerNavigation = function () { var navigationFrames = []; var additionalFrames; if (NavigationHelpers.toolbarFrame) { navigationFrames = [NavigationHelpers.toolbarFrame]; } if (NavigationHelpers.currentNavigationId >= 0) { additionalFrames = NavigationHelpers.frameMap[NavigationHelpers.currentNavigationId]; if (additionalFrames) { navigationFrames = navigationFrames.concat(additionalFrames); } } Common.NavigationUtilities.registerNavigationFrames(navigationFrames); }; NavigationHelpers.currentNavigationId = -1; NavigationHelpers.frameMap = []; NavigationHelpers.idCounter = 0; return NavigationHelpers; })(); MemoryAnalyzer.NavigationHelpers = NavigationHelpers; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshot.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var Snapshot = (function () { function Snapshot(snapshotData, isDiff, firstSnapshotId, lastSnapshotId) { this._snapshotData = snapshotData; this._isDiff = isDiff; this._firstSnapshotId = firstSnapshotId; this._lastSnapshotId = lastSnapshotId; } Object.defineProperty(Snapshot.prototype, "isDiff", { get: function () { return this._isDiff; }, enumerable: true, configurable: true }); Object.defineProperty(Snapshot.prototype, "firstSnapshotId", { get: function () { return this._firstSnapshotId; }, enumerable: true, configurable: true }); Object.defineProperty(Snapshot.prototype, "lastSnapshotId", { get: function () { return this._lastSnapshotId; }, enumerable: true, configurable: true }); Object.defineProperty(Snapshot.prototype, "hasDetachedDomNodes", { get: function () { return this._snapshotData.hasDetachedDomNodes(); }, enumerable: true, configurable: true }); Snapshot.prototype.getAllObjects = function (filter, sorter, startIndex, maxResult, scopeFilter) { if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } return this._snapshotData.getDominators(startIndex, maxResult, filter.filterString, scopeFilter, filter).then(function (dataSet) { var objNodes = dataSet.result; var ret = []; for (var i = 0; i < objNodes.length; i++) { var objNode = objNodes[i]; var namedHeapObject = new MemoryAnalyzer.NamedHeapObject(objNode, filter.displayObjectIDs); ret.push(namedHeapObject); } ret.sort(sorter.sortComparer); return { items: ret, totalCount: dataSet.totalCount }; }); }; Snapshot.prototype.getAllRootObjects = function (filter, sorter, scopeFilter) { var dataSet = this._snapshotData.getRootObjects(scopeFilter, filter); var objNodes = dataSet.result; var ret = []; for (var i = 0; i < objNodes.length; i++) { var objNode = objNodes[i]; var namedHeapObject = new MemoryAnalyzer.NamedHeapObject(objNode, filter.displayObjectIDs); ret.push(namedHeapObject); } ret.sort(sorter.sortComparer); return { items: ret, totalCount: dataSet.totalCount }; }; Snapshot.prototype.getAllTypes = function (filter, sorter, scopeFilter) { return this._snapshotData.getTypes(filter.filterString, scopeFilter, filter).then(function (types) { var ret = []; for (var i = 0; i < types.length; i++) { var typeNode = types[i]; var typeDataObject = new MemoryAnalyzer.TypeDataObject(typeNode); ret.push(typeDataObject); } ret.sort(sorter.sortComparer); return { items: ret, totalCount: ret.length }; }); }; Snapshot.prototype.getAllChildrenForObjectOrType = function (id, expansionPath, filter, sorter, startIndex, maxResult, scopeFilter, isScopeRelated) { if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } if (typeof isScopeRelated === "undefined") { isScopeRelated = false; } var objectId = parseInt(id); if (!isNaN(objectId)) { return this.getAllChildrenForObject(objectId, expansionPath, filter, sorter, startIndex, maxResult, scopeFilter, isScopeRelated); } else { return this.getAllObjectsByType(id, filter, sorter, startIndex, maxResult, scopeFilter); } }; Snapshot.prototype.getAllObjectsByType = function (typeName, filter, sorter, startIndex, maxResult, scopeFilter) { if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } var dataSet = this._snapshotData.getObjectsByType(typeName, startIndex, maxResult, scopeFilter, filter); var objNodes = dataSet.result; var ret = []; for (var i = 0; i < objNodes.length; i++) { var objNode = objNodes[i]; var namedHeapObject = new MemoryAnalyzer.NamedHeapObject(objNode, filter.displayObjectIDs); ret.push(namedHeapObject); } ret.sort(sorter.sortComparer); return { items: ret, totalCount: dataSet.totalCount }; }; Snapshot.prototype.getAllChildrenForObject = function (objectId, expansionPath, filter, sorter, startIndex, maxResult, scopeFilter, isScopeRelated) { if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } if (typeof isScopeRelated === "undefined") { isScopeRelated = false; } var dataSet = this._snapshotData.getChildrenForObject(objectId, startIndex, maxResult, scopeFilter, isScopeRelated, filter); var objNodes = dataSet.result; var ret = []; var isVisited = new Set(); for (var i = 0; i < expansionPath.length; i++) { isVisited.add(expansionPath[i].id); } for (var i = 0; i < objNodes.length; i++) { var objNode = objNodes[i]; var namedHeapObject = new MemoryAnalyzer.NamedHeapObject(objNode, filter.displayObjectIDs, isVisited.has(objNode.objectId)); ret.push(namedHeapObject); } ret.sort(sorter.sortComparer); return { items: ret, totalCount: dataSet.totalCount }; }; Snapshot.prototype.getRetainedDescendants = function (objectId, scopeFilter, filter, sorter, startIndex, maxResult) { if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } var dataSet = this._snapshotData.getRetainedDescendants(objectId, startIndex, maxResult, scopeFilter, filter); var objNodes = dataSet.result; var ret = []; for (var i = 0; i < objNodes.length; i++) { var objNode = objNodes[i]; var namedHeapObject = new MemoryAnalyzer.NamedHeapObject(objNode, filter.displayObjectIDs); ret.push(namedHeapObject); } ret.sort(sorter.sortComparer); return { items: ret, totalCount: dataSet.totalCount }; }; Snapshot.prototype.getReferenceTreeItems = function (rootObjectId, objectId, nodeId, sorter, displayObjectIds, includeCircularReferences) { var dataSet = this._snapshotData.getReferenceTreeItems(rootObjectId, objectId, nodeId, includeCircularReferences); var objNodes = dataSet.result; var ret = []; for (var i = 0; i < objNodes.length; i++) { var objNode = objNodes[i]; var namedHeapObject = new MemoryAnalyzer.ReferenceDataObject(objNode, displayObjectIds, objNode.parentId, objNode.nodeId); ret.push(namedHeapObject); } ret.sort(sorter.sortComparer); return { items: ret, totalCount: dataSet.totalCount }; }; Snapshot.prototype.getPathToDominator = function (objectId, scopeFilter, filter) { return this._snapshotData.getPathToDominator(objectId, scopeFilter, filter); }; Snapshot.prototype.getPathToRoot = function (objectId, filter, parentObjectId) { return this._snapshotData.getPathToRoot(objectId, parentObjectId, filter); }; Snapshot.prototype.getSnapshotDiffStats = function () { return this._snapshotData.getSnapshotDiffStats(); }; return Snapshot; })(); MemoryAnalyzer.Snapshot = Snapshot; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotDataSource.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (DataViewType) { DataViewType[DataViewType["types"] = 0] = "types"; DataViewType[DataViewType["roots"] = 1] = "roots"; DataViewType[DataViewType["dominators"] = 2] = "dominators"; })(MemoryAnalyzer.DataViewType || (MemoryAnalyzer.DataViewType = {})); var DataViewType = MemoryAnalyzer.DataViewType; (function (SortOrderType) { SortOrderType[SortOrderType["ascending"] = 0] = "ascending"; SortOrderType[SortOrderType["descending"] = 1] = "descending"; })(MemoryAnalyzer.SortOrderType || (MemoryAnalyzer.SortOrderType = {})); var SortOrderType = MemoryAnalyzer.SortOrderType; var SnapshotDataSource = (function () { function SnapshotDataSource() { } SnapshotDataSource.getDataSource = function (viewType, snapshot) { switch (viewType) { case 1 /* roots */: return new SnapshotRootDataSource(snapshot); case 0 /* types */: return new SnapshotTypeDataSource(snapshot); case 2 /* dominators */: return new SnapshotDominatorDataSource(snapshot); default: { throw new Error(Plugin.Resources.getErrorString("JSPerf.1002")); } } }; return SnapshotDataSource; })(); MemoryAnalyzer.SnapshotDataSource = SnapshotDataSource; var SnapshotRootDataSource = (function () { function SnapshotRootDataSource(snapshot) { this.snapshot = snapshot; } Object.defineProperty(SnapshotRootDataSource.prototype, "hasDetachedDomNodes", { get: function () { return this.snapshot.hasDetachedDomNodes; }, enumerable: true, configurable: true }); SnapshotRootDataSource.prototype.getRootHeapDataTreeItem = function (filter, sorter, startIndex, maxResult, scopeFilter) { return Plugin.Promise.as(this.snapshot.getAllRootObjects(filter, sorter, scopeFilter)); }; SnapshotRootDataSource.prototype.getHeapDataTreeItem = function (filter, sorter, parentId, expansionPath, startIndex, maxResult, scopeFilter) { return this.snapshot.getAllChildrenForObject(parentId, expansionPath, filter, sorter, startIndex, maxResult, scopeFilter, true); }; SnapshotRootDataSource.prototype.getReferenceTreeItems = function (rootObjectId, objectId, nodeId, sorter, displayObjectIds, includeCircularReferences, startIndex, maxResult) { return this.snapshot.getReferenceTreeItems(rootObjectId, objectId, nodeId, sorter, displayObjectIds, includeCircularReferences); }; SnapshotRootDataSource.prototype.getAvailableFields = function (isFoldingEnabled) { var fields = []; fields.push("name"); fields.push("type"); fields.push("size"); if (isFoldingEnabled) { fields.push("containsDetachedDomNode"); } else { fields.push("isDetachedDomNode"); } if (this.snapshot.isDiff) { fields.push("sizeDiff"); } fields.push("retainedSize"); if (this.snapshot.isDiff) { fields.push("retainedSizeDiff"); } return fields; }; SnapshotRootDataSource.prototype.getAvailableFieldsForReferenceTree = function (isFoldingEnabled) { return this.getAvailableFields(isFoldingEnabled); }; return SnapshotRootDataSource; })(); var SnapshotTypeDataSource = (function () { function SnapshotTypeDataSource(snapshot) { this.snapshot = snapshot; } Object.defineProperty(SnapshotTypeDataSource.prototype, "hasDetachedDomNodes", { get: function () { return this.snapshot.hasDetachedDomNodes; }, enumerable: true, configurable: true }); SnapshotTypeDataSource.prototype.getRootHeapDataTreeItem = function (filter, sorter, startIndex, maxResult, scopeFilter) { return this.snapshot.getAllTypes(filter, sorter, scopeFilter); }; SnapshotTypeDataSource.prototype.getHeapDataTreeItem = function (filter, sorter, parentId, expansionPath, startIndex, maxResult, scopeFilter) { return this.snapshot.getAllChildrenForObjectOrType(parentId, expansionPath, filter, sorter, startIndex, maxResult, scopeFilter, true); }; SnapshotTypeDataSource.prototype.getReferenceTreeItems = function (rootObjectId, objectId, nodeId, sorter, displayObjectIds, includeCircularReferences, startIndex, maxResult) { return this.snapshot.getReferenceTreeItems(rootObjectId, objectId, nodeId, sorter, displayObjectIds, includeCircularReferences); }; SnapshotTypeDataSource.prototype.getAvailableFields = function (isFoldingEnabled) { var fields = []; fields.push("name"); fields.push("type"); fields.push("size"); if (isFoldingEnabled) { fields.push("containsDetachedDomNode"); } else { fields.push("isDetachedDomNode"); } if (this.snapshot.isDiff) { fields.push("sizeDiff"); } fields.push("retainedSize"); if (this.snapshot.isDiff) { fields.push("retainedSizeDiff"); } fields.push("childrenCount"); return fields; }; SnapshotTypeDataSource.prototype.getAvailableFieldsForReferenceTree = function (isFoldingEnabled) { var fields = []; fields.push("name"); fields.push("type"); fields.push("size"); if (this.snapshot.isDiff) { fields.push("sizeDiff"); } fields.push("retainedSize"); return fields; }; return SnapshotTypeDataSource; })(); var SnapshotDominatorDataSource = (function () { function SnapshotDominatorDataSource(snapshot) { this.snapshot = snapshot; } Object.defineProperty(SnapshotDominatorDataSource.prototype, "hasDetachedDomNodes", { get: function () { return this.snapshot.hasDetachedDomNodes; }, enumerable: true, configurable: true }); SnapshotDominatorDataSource.prototype.getRootHeapDataTreeItem = function (filter, sorter, startIndex, maxResult, scopeFilter) { return this.snapshot.getAllObjects(filter, sorter, startIndex, maxResult, scopeFilter); }; SnapshotDominatorDataSource.prototype.getHeapDataTreeItem = function (filter, sorter, parentId, expansionPath, startIndex, maxResult, scopeFilter) { return this.snapshot.getRetainedDescendants(parentId, scopeFilter, filter, sorter, startIndex, maxResult); }; SnapshotDominatorDataSource.prototype.getReferenceTreeItems = function (rootObjectId, objectId, nodeId, sorter, displayObjectIds, includeCircularReferences, startIndex, maxResult) { return this.snapshot.getReferenceTreeItems(rootObjectId, objectId, nodeId, sorter, displayObjectIds, includeCircularReferences); }; SnapshotDominatorDataSource.prototype.getAvailableFields = function (isFoldingEnabled) { var fields = []; fields.push("name"); fields.push("type"); fields.push("size"); if (isFoldingEnabled) { fields.push("containsDetachedDomNode"); } else { fields.push("isDetachedDomNode"); } if (this.snapshot.isDiff) { fields.push("sizeDiff"); } fields.push("retainedSize"); if (this.snapshot.isDiff) { fields.push("retainedSizeDiff"); } return fields; }; SnapshotDominatorDataSource.prototype.getAvailableFieldsForReferenceTree = function (isFoldingEnabled) { return this.getAvailableFields(isFoldingEnabled); }; return SnapshotDominatorDataSource; })(); })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotDataView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var TreeInfo = (function () { function TreeInfo(gridData, expandStates, toggleFunction, loadMoreFunction) { this.gridData = gridData; this.expandStates = expandStates; this.toggleFunction = toggleFunction; this.loadMoreFunction = loadMoreFunction; } return TreeInfo; })(); MemoryAnalyzer.TreeInfo = TreeInfo; var GridContextMenuData = (function () { function GridContextMenuData(view, item) { this.view = view; this._item = item; } Object.defineProperty(GridContextMenuData.prototype, "object", { get: function () { return this._item; }, enumerable: true, configurable: true }); Object.defineProperty(GridContextMenuData.prototype, "objectId", { get: function () { return this._item.objectId; }, enumerable: true, configurable: true }); Object.defineProperty(GridContextMenuData.prototype, "parentObjectId", { get: function () { return this._item.parentObjectId; }, enumerable: true, configurable: true }); Object.defineProperty(GridContextMenuData.prototype, "sourceInfo", { get: function () { return this._item.sourceInfo; }, enumerable: true, configurable: true }); return GridContextMenuData; })(); MemoryAnalyzer.GridContextMenuData = GridContextMenuData; var SnapshotDataViewController = (function () { function SnapshotDataViewController(viewType, model, viewSwitcher) { this.viewType = viewType; this.snapshotViewModel = model; this._dataSource = MemoryAnalyzer.SnapshotDataSource.getDataSource(viewType, this.snapshotViewModel.snapshot); this._viewSwitcher = viewSwitcher; this.dataViewModel = new SnapshotDataViewModel(this.viewType, this.snapshotViewModel.snapshot.isDiff); this.dataViewModel.showUnknownTypes = MemoryAnalyzer.Program.userSettings.showUnknownTypes; this.dataViewModel.showUnknownSizes = MemoryAnalyzer.Program.userSettings.showUnknownSizes; this.view = new SnapshotDataView(this, this.dataViewModel, this.snapshotViewModel); Notifications.notify(MemoryAnalyzer.MemoryNotifications.SnapshotDataViewReady, { viewModel: this.dataViewModel, snapshotDataSource: this._dataSource }); } Object.defineProperty(SnapshotDataViewController.prototype, "currentDataView", { get: function () { return this._viewSwitcher.currentDataView; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotDataViewController.prototype, "isTextFilterSupported", { get: function () { return this.viewType !== 1 /* roots */; }, enumerable: true, configurable: true }); SnapshotDataViewController.prototype.setFocusOnGrid = function () { this.view.setFocusOnGrid(); }; SnapshotDataViewController.prototype.setSnapshotDataSource = function () { this.dataViewModel.snapshotDataSource = this._dataSource; this.view.refreshGrids(); }; SnapshotDataViewController.prototype.showPathToDominator = function (objectId, scopeFilter) { this._viewSwitcher.switchToDataView(2 /* dominators */); this._viewSwitcher.currentDataView.showPathToDominator(objectId, scopeFilter); }; SnapshotDataViewController.prototype.showPathToRoot = function (objectId, parentObjectId) { this._viewSwitcher.switchToDataView(1 /* roots */); this._viewSwitcher.currentDataView.showPathToRoot(objectId, parentObjectId); }; return SnapshotDataViewController; })(); MemoryAnalyzer.SnapshotDataViewController = SnapshotDataViewController; var SnapshotDataViewModel = (function (_super) { __extends(SnapshotDataViewModel, _super); function SnapshotDataViewModel(viewType, isDiff) { if (typeof isDiff === "undefined") { isDiff = false; } _super.call(this); this.viewType = viewType; this.isDiff = isDiff; this.isTextSearchable = this.viewType !== 1 /* roots */; this.isDominatorFoldingPossible = this.viewType !== 1 /* roots */; } Object.defineProperty(SnapshotDataViewModel.prototype, "hasDetachedDomNodes", { get: function () { return this.snapshotDataSource.hasDetachedDomNodes; }, enumerable: true, configurable: true }); SnapshotDataViewModel.initialize = function () { Common.ObservableHelpers.defineProperty(SnapshotDataViewModel, SnapshotDataViewModel.IsDiffPropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotDataViewModel, SnapshotDataViewModel.IsDominatorFoldingPossiblePropertyname, true); Common.ObservableHelpers.defineProperty(SnapshotDataViewModel, SnapshotDataViewModel.IsTextSearchablePropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotDataViewModel, SnapshotDataViewModel.FilterStringPropertyName, ""); Common.ObservableHelpers.defineProperty(SnapshotDataViewModel, SnapshotDataViewModel.ShowUnknownSizesPropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotDataViewModel, SnapshotDataViewModel.ShowUnknownTypesPropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotDataViewModel, SnapshotDataViewModel.SnapshotDataSourcePropertyName, null); }; SnapshotDataViewModel.FilterStringPropertyName = "filterString"; SnapshotDataViewModel.IsDiffPropertyName = "isDiff"; SnapshotDataViewModel.IsDominatorFoldingPossiblePropertyname = "isDominatorFoldingPossible"; SnapshotDataViewModel.IsTextSearchablePropertyName = "isTextSearchable"; SnapshotDataViewModel.ShowUnknownSizesPropertyName = "showUnknownSizes"; SnapshotDataViewModel.ShowUnknownTypesPropertyName = "showUnknownTypes"; SnapshotDataViewModel.SnapshotDataSourcePropertyName = "snapshotDataSource"; return SnapshotDataViewModel; })(Common.Observable); MemoryAnalyzer.SnapshotDataViewModel = SnapshotDataViewModel; SnapshotDataViewModel.initialize(); var SnapshotDataView = (function (_super) { __extends(SnapshotDataView, _super); function SnapshotDataView(controller, dataModel, snapshotModel, sortProperty) { _super.call(this, "SnapshotDataViewTemplate"); this._fieldNameToColumnMapMainGrid = {}; this._fieldNameToColumnMapReferenceGrid = {}; this._controller = controller; this._dataViewModel = dataModel; this._snapshotViewModel = snapshotModel; this._dataViewModel.propertyChanged.addHandler(this.onPropertyChanged.bind(this)); this._snapshotViewModel.propertyChanged.addHandler(this.onPropertyChanged.bind(this)); this._referenceViewContainer = this.findElement("referenceViewContainer"); this._snapshotGridContainer = this.findElement("snapshotGridContainer"); this._reachedItemsCapMessageContainer = this.findElement("reachedItemsCapMessageContainer"); this.findElement("referenceGraphTitleLabel").innerText = Plugin.Resources.getString("ReferenceGraph"); this._snapshotViewGridSplitter = new MemoryAnalyzer.Controls.GridSplitterControl(this.findElement("snapshotViewGridSplitter"), 27, this.findElement("snapshotScrollableContainer"), this.refreshGrids.bind(this)); if (!SnapshotDataView.GridContextMenu) { var showInDominatorsViewMenuItem = { callback: SnapshotDataView.onShowInDominatorsViewCommand, hidden: SnapshotDataView.isShowInDominatorsViewCommandHidden, disabled: this.isShowInDominatorsViewCommandDisabled.bind(this), label: Plugin.Resources.getString("ShowInDominatorsViewLabel"), type: 1 /* command */ }; var showInRootsViewMenuItem = { callback: SnapshotDataView.onShowInRootsViewCommand, hidden: SnapshotDataView.isShowInRootsViewCommandHidden, label: Plugin.Resources.getString("ShowInRootsViewLabel"), type: 1 /* command */ }; var separatorMenuItem = { type: 3 /* separator */ }; var viewSourceMenuItem = { accessKey: Plugin.Resources.getString("EnterKey"), callback: SnapshotDataView.onViewSourceCommand, disabled: SnapshotDataView.isViewSourceCommandDisabled, label: Plugin.Resources.getString("ViewSourceLabel"), type: 1 /* command */ }; SnapshotDataView.GridContextMenu = Plugin.ContextMenu.create([showInDominatorsViewMenuItem, showInRootsViewMenuItem, separatorMenuItem, viewSourceMenuItem]); } if (sortProperty) { this._sortOrder = new Common.Controls.Legacy.Grid.SortOrderInfo(sortProperty, "desc"); } else if (this._dataViewModel.isDiff) { if (this._dataViewModel.viewType === 0 /* types */) { this._sortOrder = new Common.Controls.Legacy.Grid.SortOrderInfo("childrenCount", "desc"); } else { this._sortOrder = new Common.Controls.Legacy.Grid.SortOrderInfo("retainedSizeDiff", "desc"); } } else if (this._dataViewModel.viewType === 0 /* types */) { this._sortOrder = new Common.Controls.Legacy.Grid.SortOrderInfo("childrenCount", "desc"); } else { this._sortOrder = new Common.Controls.Legacy.Grid.SortOrderInfo("retainedSize", "desc"); } this._sortOrderForReferences = new Common.Controls.Legacy.Grid.SortOrderInfo("retainedSize", "desc"); this.uiUpdateSnapshotDataSource(); } Object.defineProperty(SnapshotDataView.prototype, "navigationContainer", { get: function () { return this._referenceViewContainer; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotDataView.prototype, "navigationTarget", { get: function () { if (this._gridReference) { return this._gridReference.getElement(); } return null; }, enumerable: true, configurable: true }); SnapshotDataView.getSortComparer = function (sortOrder, fieldNameToColumnMap) { var column = fieldNameToColumnMap[sortOrder.index], comparer = column.comparer, isAsc = sortOrder.order === "asc"; return function (v1, v2) { var result = comparer(column, sortOrder.order, v1, v2); return isAsc ? result : -result; }; }; SnapshotDataView.columnComparerForStrings = function (column, order, rowA, rowB) { return SnapshotDataView.naturalSort(rowA[column.index], rowB[column.index]); }; SnapshotDataView.naturalSort = function (a, b) { var regexSortGroup = /(\d+)|(\D+)/g; var aGroups = String(a).toLocaleLowerCase().match(regexSortGroup); var bGroups = String(b).toLocaleLowerCase().match(regexSortGroup); if (!aGroups) { if (!bGroups) { return 0; } else { return -1; } } else if (!bGroups) { return 1; } while (aGroups.length > 0 && bGroups.length > 0) { var aFront = aGroups.shift(); var bFront = bGroups.shift(); var aAsDigit = parseInt(aFront, 10); var bAsDigit = parseInt(bFront, 10); if (isNaN(aAsDigit) && isNaN(bAsDigit)) { if (aFront !== bFront) { return aFront.localeCompare(bFront) > 0 ? 1 : -1; } } else if (isNaN(aAsDigit)) { return 1; } else if (isNaN(bAsDigit)) { return -1; } else { if (aAsDigit !== bAsDigit) { return (aAsDigit - bAsDigit); } } } return aGroups.length - bGroups.length; }; SnapshotDataView.columnComparerForNumbers = function (column, order, rowA, rowB) { var n1 = rowA[column.index] || 0, n2 = rowB[column.index] || 0; return n1 - n2; }; SnapshotDataView.formatChildrenCount = function (dataIndex, columnIndex, columnOrder, dataSource, isForTooltip) { var originalItem = dataSource[dataIndex]; if (originalItem.childrenCount) { return Common.FormattingHelpers.getDecimalLocaleString(originalItem.childrenCount, true); } else { return ""; } }; SnapshotDataView.formatSize = function (dataIndex, columnIndex, columnOrder, dataSource, isForTooltip) { var originalItem = dataSource[dataIndex]; if (originalItem.size) { var text = MemoryAnalyzer.FormattingHelpers.getPrettyPrintSize(originalItem.size) + (originalItem.isSizeApproximate ? "*" : " "); if (isForTooltip && originalItem.isSizeApproximate) { text = Plugin.Resources.getString("ApproximateSizeTooltip", text); } return text; } else { return ""; } }; SnapshotDataView.formatRetainedSize = function (dataIndex, columnIndex, columnOrder, dataSource, isForTooltip) { var namedHeapObject = dataSource[dataIndex]; if (namedHeapObject.retainedSize) { return MemoryAnalyzer.FormattingHelpers.getPrettyPrintSize(namedHeapObject.retainedSize); } else { return ""; } }; SnapshotDataView.formatRetainedSizeDiff = function (dataIndex, columnIndex, columnOrder, dataSource, isForTooltip) { var namedHeapObject = dataSource[dataIndex]; if (namedHeapObject.retainedSizeDiff) { return (namedHeapObject.retainedSizeDiff > 0 ? "+" : "-") + MemoryAnalyzer.FormattingHelpers.getPrettyPrintSize(Math.abs(namedHeapObject.retainedSizeDiff)); } else { return ""; } }; SnapshotDataView.formatSizeDiff = function (dataIndex, columnIndex, columnOrder, dataSource, isForTooltip) { var namedHeapObject = dataSource[dataIndex]; if (namedHeapObject.sizeDiff) { return (namedHeapObject.sizeDiff > 0 ? "+" : "-") + MemoryAnalyzer.FormattingHelpers.getPrettyPrintSize(Math.abs(namedHeapObject.sizeDiff)); } else { return ""; } }; SnapshotDataView.prototype.populateFieldNameToColumnMap = function (isDiff) { var fieldNameToColumnMap = {}; fieldNameToColumnMap["name"] = new Common.Controls.Legacy.Grid.ColumnInfo("name", Plugin.Resources.getString("Identifiers"), Plugin.Resources.getString("IdentifiersTooltip"), 350, true, null, isDiff ? this.getDiffNameCellCSSClass.bind(this) : null, SnapshotDataView.columnComparerForStrings, true); fieldNameToColumnMap["name"].cellDecorator = this.decorateNameCell.bind(this); fieldNameToColumnMap["name"].hasMoreColumn = true; fieldNameToColumnMap["type"] = new Common.Controls.Legacy.Grid.ColumnInfo("type", Plugin.Resources.getString("Type"), Plugin.Resources.getString("TypeTooltip"), 115, true, null, isDiff ? this.getDiffNameCellCSSClass.bind(this) : null, SnapshotDataView.columnComparerForStrings); fieldNameToColumnMap["size"] = new Common.Controls.Legacy.Grid.ColumnInfo("size", Plugin.Resources.getString("Size"), Plugin.Resources.getString("SizeTooltip"), 65, true, SnapshotDataView.formatSize, this.getNumericCellCSSClass.bind(this, isDiff), SnapshotDataView.columnComparerForNumbers); fieldNameToColumnMap["retainedSize"] = new Common.Controls.Legacy.Grid.ColumnInfo("retainedSize", Plugin.Resources.getString("RetainedSize"), Plugin.Resources.getString("RetainedSizeTooltip"), 80, true, SnapshotDataView.formatRetainedSize, this.getNumericCellCSSClass.bind(this, isDiff), SnapshotDataView.columnComparerForNumbers); fieldNameToColumnMap["childrenCount"] = new Common.Controls.Legacy.Grid.ColumnInfo("childrenCount", Plugin.Resources.getString("Count"), Plugin.Resources.getString("CountTooltip"), 50, true, SnapshotDataView.formatChildrenCount, this.getNumericCellCSSClass.bind(this, isDiff), SnapshotDataView.columnComparerForNumbers); fieldNameToColumnMap["sizeDiff"] = new Common.Controls.Legacy.Grid.ColumnInfo("sizeDiff", Plugin.Resources.getString("SizeDiff"), Plugin.Resources.getString("SizeDiffTooltip"), 65, true, SnapshotDataView.formatSizeDiff, this.getNumericCellCSSClass.bind(this, isDiff), SnapshotDataView.columnComparerForNumbers); fieldNameToColumnMap["retainedSizeDiff"] = new Common.Controls.Legacy.Grid.ColumnInfo("retainedSizeDiff", Plugin.Resources.getString("RetainedSizeDiff"), Plugin.Resources.getString("RetainedSizeDiffTooltip"), 105, true, SnapshotDataView.formatRetainedSizeDiff, this.getNumericCellCSSClass.bind(this, isDiff), SnapshotDataView.columnComparerForNumbers); fieldNameToColumnMap["containsDetachedDomNode"] = new Common.Controls.Legacy.Grid.ColumnInfo("containsDetachedDomNode", "", "", 0, true, null, null, SnapshotDataView.columnComparerForStrings); fieldNameToColumnMap["containsDetachedDomNode"].hidden = true; fieldNameToColumnMap["isDetachedDomNode"] = new Common.Controls.Legacy.Grid.ColumnInfo("isDetachedDomNode", "", "", 0, true, null, null, SnapshotDataView.columnComparerForStrings); fieldNameToColumnMap["isDetachedDomNode"].hidden = true; return fieldNameToColumnMap; }; SnapshotDataView.prototype.onPropertyChanged = function (propertyName) { switch (propertyName) { case "isDiff": case "showBuiltIns": case "showUnknownTypes": case "showUnknownSizes": case "scopeFilter": case "snapshotDataSource": case "filterString": case "displayCircularReferences": case "displayObjectIDs": case "showNonMatchingReferences": this.uiUpdateSnapshotDataSource(); break; case "foldObjectsByDominator": this.updateSortOrders(); this.uiUpdateSnapshotDataSource(); break; } }; SnapshotDataView.prototype.refreshGrids = function () { if (this._grid) { this._grid.layout(); } if (this._gridReference) { this._gridReference.layout(); } }; SnapshotDataView.prototype.setFocusOnGrid = function () { if (this._grid) { var currentSelection = this._grid.getSelectedRowIndex(); if (typeof currentSelection !== "number" || currentSelection <= 0) { this._grid.ensureSelectedIndex(0); } this._grid.setFocusToSelectedRow(); } }; SnapshotDataView.prototype.showPathToDominator = function (objectId, scopeFilter) { var _this = this; var path = this._dataViewModel.snapshotDataSource.snapshot.getPathToDominator(objectId, scopeFilter, this.getFilter()); if (this._rootQueryPromise) { this._rootQueryPromise.done(function () { return _this.navigateToObjectForPath(path); }); } }; SnapshotDataView.prototype.showPathToRoot = function (objectId, parentObjectId) { var _this = this; var path = this._dataViewModel.snapshotDataSource.snapshot.getPathToRoot(objectId, this.getFilter(), parentObjectId); if (this._rootQueryPromise) { this._rootQueryPromise.done(function () { return _this.navigateToObjectForPath(path); }); } }; SnapshotDataView.prototype.sortBy = function (sortProperty, sortOrder) { this._sortOrder.index = sortProperty; this._sortOrder.order = sortOrder; this.updateTree(); }; SnapshotDataView.isShowInRootsViewCommandHidden = function () { return !SnapshotDataView.GridContextMenuData || !SnapshotDataView.GridContextMenuData.view || (SnapshotDataView.GridContextMenuData.view._dataViewModel.viewType === 1 /* roots */ && SnapshotDataView.GridContextMenuData.view._focusedGrid === SnapshotDataView.GridContextMenuData.view._grid); }; SnapshotDataView.isViewSourceCommandDisabled = function () { return !(SnapshotDataView.GridContextMenuData && SnapshotDataView.GridContextMenuData.view && SnapshotDataView.GridContextMenuData.sourceInfo); }; SnapshotDataView.onRequestViewSource = function (sourceInfo) { SnapshotDataView.viewSource(sourceInfo.source, sourceInfo.line, sourceInfo.column); }; SnapshotDataView.onShowInRootsViewCommand = function () { if (SnapshotDataView.GridContextMenuData && SnapshotDataView.GridContextMenuData.view) { SnapshotDataView.GridContextMenuData.view._controller.showPathToRoot(SnapshotDataView.GridContextMenuData.objectId, SnapshotDataView.GridContextMenuData.parentObjectId); SnapshotDataView.GridContextMenuData = null; } }; SnapshotDataView.onViewSourceCommand = function () { if (SnapshotDataView.GridContextMenuData && SnapshotDataView.GridContextMenuData.view && SnapshotDataView.GridContextMenuData.sourceInfo) { var sourceInfo = SnapshotDataView.GridContextMenuData.sourceInfo; window.setImmediate(function () { SnapshotDataView.viewSource(sourceInfo.source, sourceInfo.line, sourceInfo.column); }); } }; SnapshotDataView.showSourceInfoTooltip = function (identifier, sourceInfo) { if (sourceInfo) { var tooltip = new Common.Controls.Legacy.SourceInfoTooltip(sourceInfo, identifier, "SourceInfoIdentifierLabel"); var config = { content: tooltip.html, contentContainsHTML: true }; Plugin.Tooltip.show(config); } }; SnapshotDataView.viewSource = function (unshortenedUrl, line, column) { Plugin.Host.showDocument(unshortenedUrl, line, column).done(function () { }, function (err) { MemoryAnalyzer.Program.shell.hostShell.setStatusBarText(Plugin.Resources.getString("UnableToViewSource"), true); }); }; SnapshotDataView.onShowInDominatorsViewCommand = function () { if (SnapshotDataView.GridContextMenuData && SnapshotDataView.GridContextMenuData.view) { SnapshotDataView.GridContextMenuData.view._controller.showPathToDominator(SnapshotDataView.GridContextMenuData.objectId, SnapshotDataView.contextMenuScopeFilter()); SnapshotDataView.GridContextMenuData = null; } }; SnapshotDataView.isShowInDominatorsViewCommandHidden = function () { return !SnapshotDataView.GridContextMenuData || !SnapshotDataView.GridContextMenuData.view || (SnapshotDataView.GridContextMenuData.view._dataViewModel.viewType === 2 /* dominators */ && SnapshotDataView.GridContextMenuData.view._focusedGrid === SnapshotDataView.GridContextMenuData.view._grid); }; SnapshotDataView.isObjectScopeConformed = function (obj, scope) { if (!obj.diffOperation && !obj.isFabricatedObject) { return false; } switch (scope) { case 1 /* ObjectsAddedBetweenSnapshots */: return obj.isAdded; case 0 /* ObjectsLeftFromPreviousSnapshot */: return !obj.isAdded && !obj.isBaseline; case 2 /* AllObjects */: default: return true; } return false; }; SnapshotDataView.contextMenuScopeFilter = function () { if (SnapshotDataView.GridContextMenuData && SnapshotDataView.GridContextMenuData.view && SnapshotDataView.GridContextMenuData.view._dataViewModel.isDiff) { return SnapshotDataView.GridContextMenuData.view._snapshotViewModel.scopeFilter; } return 2 /* AllObjects */; }; SnapshotDataView.prototype.decorateNameCell = function (cell, dataItem) { var namedHeapObject = dataItem; var nameText = namedHeapObject.name; var tooltipText = namedHeapObject.name; var nameContainer = document.createElement("span"); var tokens; if (SnapshotDataView.isObjectScopeConformed(namedHeapObject, this.getScopeFilter())) { if (SnapshotDataView.HTMLRegex.test(namedHeapObject.kind)) { tokens = Common.TokenExtractor.getHtmlTokens(nameText); } else if ("String" === namedHeapObject.kind) { tokens = Common.TokenExtractor.getStringTokens(nameText); } else if ("Number" === namedHeapObject.kind) { tokens = Common.TokenExtractor.getNumberTokens(nameText); } } if (tokens && tokens.length > 0) { for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; var tokenSpan = document.createElement("span"); tokenSpan.className = Common.TokenExtractor.getCssClass(token.type); tokenSpan.textContent = token.value; nameContainer.appendChild(tokenSpan); } } else { nameContainer.textContent = nameText; } if (namedHeapObject.isCircularReference) { nameContainer.textContent += Plugin.Resources.getString("CircularReferenceMarker"); tooltipText += Plugin.Resources.getString("CircularReferenceMarker") + " " + Plugin.Resources.getString("CircularReferenceMessage"); } var sourceInfo = namedHeapObject.sourceInfo; if (sourceInfo) { nameContainer.className = "BPT-FileLink"; nameContainer.onclick = SnapshotDataView.onRequestViewSource.bind(this, sourceInfo); cell.addEventListener("mouseover", SnapshotDataView.showSourceInfoTooltip.bind(this, tooltipText, sourceInfo)); } else { cell.setAttribute("data-plugin-vs-tooltip", " " + tooltipText); cell.setAttribute("aria-label", namedHeapObject.name); } cell.appendChild(nameContainer); }; SnapshotDataView.prototype.getWarningCss = function (dataIndex, dataSource) { var item = dataSource[dataIndex]; if (item.isDetachedDomNode) { if (item instanceof MemoryAnalyzer.TypeDataObject) { return "detachedDomNodeChildrenWarning"; } else { return "detachedDomNodeWarning"; } } else if (item.hasDetachedDomNodeChildren && this._snapshotViewModel.foldObjectsByDominator) { return "detachedDomNodeChildrenWarning"; } }; SnapshotDataView.prototype.isShowInDominatorsViewCommandDisabled = function () { return !(SnapshotDataView.GridContextMenuData && SnapshotDataView.GridContextMenuData.view && SnapshotDataView.isObjectScopeConformed(SnapshotDataView.GridContextMenuData.object, SnapshotDataView.contextMenuScopeFilter())); }; SnapshotDataView.prototype.navigateToObjectForPath = function (path) { var _this = this; if (path && path.length > 0 && this._grid) { var pathFromRoot = path.reverse(); var dataSource = this._grid._dataSource; var expandStates = this._grid.getExpandStates(); var dataSourceIndex = 0; for (var pathIndex = 0; pathIndex < pathFromRoot.length; pathIndex++) { for (; dataSourceIndex < dataSource.length; dataSourceIndex++) { if (dataSource[dataSourceIndex].objectId === pathFromRoot[pathIndex]) { if (pathIndex === pathFromRoot.length - 1) { this._grid.setSelectedDataIndex(dataSourceIndex); } else { if (expandStates[dataSourceIndex] < 0) { this._grid.expandNode(dataSourceIndex); } dataSourceIndex++; } break; } else { if (expandStates[dataSourceIndex] !== 0) { dataSourceIndex += Math.abs(expandStates[dataSourceIndex]) - 1; } } } } this._grid.layout(); window.setImmediate(function () { _this._grid.setFocusToSelectedRow(); }); } }; SnapshotDataView.prototype.getDiffNameCellCSSClass = function (dataIndex, columnIndex, columnOrder, dataSource) { var item = dataSource[dataIndex]; var scope = this.getScopeFilter(); if (!item.diffOperation && !item.isFabricatedObject) { return null; } switch (scope) { case 1 /* ObjectsAddedBetweenSnapshots */: if (item.isAdded) { return null; } else { return "unmatchedScopeObject"; } break; case 0 /* ObjectsLeftFromPreviousSnapshot */: if (item.isChanged && !item.isBaseline) { return null; } else if (item.isAdded || item.isBaseline) { return "unmatchedScopeObject"; } break; case 2 /* AllObjects */: default: return null; break; } return null; }; SnapshotDataView.prototype.getNumericCellCSSClass = function (isDiff, dataIndex, columnIndex, columnOrder, dataSource) { var className = "numeric-data"; if (isDiff) { className += " " + this.getDiffNameCellCSSClass(dataIndex, columnIndex, columnOrder, dataSource); } return className; }; SnapshotDataView.prototype.onGridContextMenu = function (grid, e) { this._focusedGrid = grid; var dataIndex = grid.getSelectedDataIndex(); var foundRow = false; var menuX = e.pageX; var menuY = e.pageY; if (e.clientX === 0 && e.clientY === 0) { foundRow = (dataIndex > -1); var row = grid.getRowInfo(dataIndex).row; if (row) { var rect = row.getBoundingClientRect(); menuX = Math.round(rect.left + (rect.width / 4)); menuY = Math.round(rect.top + (rect.height / 2)); } else { foundRow = false; } } else { var clickedElement = document.elementFromPoint(e.clientX, e.clientY); while (clickedElement) { if (clickedElement && clickedElement.classList) { if (clickedElement.classList.contains("grid-row")) { foundRow = true; break; } else if (clickedElement.classList.contains("grid-canvas")) { break; } } clickedElement = clickedElement.parentElement; } } if (foundRow) { var objectId = -1; var item; if (typeof dataIndex === "number" && dataIndex >= 0) { item = grid.getRowData(dataIndex); if (!(item instanceof MemoryAnalyzer.TypeDataObject)) { objectId = item.objectId; } } if (objectId >= 0) { if (SnapshotDataView.GridContextMenu) { SnapshotDataView.GridContextMenuData = new GridContextMenuData(this, item); SnapshotDataView.GridContextMenu.show(menuX, menuY); } } else { SnapshotDataView.GridContextMenuData = null; } } e.preventDefault(); e.stopImmediatePropagation(); return false; }; SnapshotDataView.prototype.uiUpdateAll = function () { this.uiUpdateSnapshotDataSource(); }; SnapshotDataView.prototype.uiUpdateSnapshotDataSource = function () { if (this._dataViewModel.snapshotDataSource) { var isDiff = this._dataViewModel.snapshotDataSource.snapshot.isDiff; this._fieldNameToColumnMapMainGrid = this.populateFieldNameToColumnMap(isDiff); this._fieldNameToColumnMapReferenceGrid = this.populateFieldNameToColumnMap(isDiff); } this._referenceViewContainer.style.display = "none"; this.updateTree(); }; SnapshotDataView.prototype.updateSortOrders = function () { if (!this._snapshotViewModel.foldObjectsByDominator) { if (this._sortOrder && this._sortOrder.index === "containsDetachedDomNode") { this._sortOrder.index = "isDetachedDomNode"; } if (this._sortOrderForReferences && this._sortOrderForReferences.index === "containsDetachedDomNode") { this._sortOrderForReferences.index = "isDetachedDomNode"; } } else { if (this._sortOrder && this._sortOrder.index === "isDetachedDomNode") { this._sortOrder.index = "containsDetachedDomNode"; } if (this._sortOrderForReferences && this._sortOrderForReferences.index === "isDetachedDomNode") { this._sortOrderForReferences.index = "containsDetachedDomNode"; } } }; SnapshotDataView.prototype.getFilter = function () { return { displayObjectIDs: this._snapshotViewModel.displayObjectIDs, foldObjectsByDominator: this._snapshotViewModel.foldObjectsByDominator, showNonMatchingReferences: this._snapshotViewModel.showNonMatchingReferences, showBuiltIns: this._snapshotViewModel.showBuiltIns, showUnknownTypes: this._dataViewModel.showUnknownTypes, showUnknownSizes: this._dataViewModel.showUnknownSizes, filterString: this._dataViewModel.filterString }; }; SnapshotDataView.prototype.getScopeFilter = function () { if (!this._dataViewModel.isDiff) { return 2 /* AllObjects */; } else { if (isNaN(this._snapshotViewModel.scopeFilter)) { return 1 /* ObjectsAddedBetweenSnapshots */; } else { return this._snapshotViewModel.scopeFilter; } } }; SnapshotDataView.prototype.getUpdatedSorter = function (sortOrder, fieldNameToColumnMapMainGrid) { return { sortProperty: sortOrder.index, sortOrder: sortOrder.order === "asc" ? 0 /* ascending */ : 1 /* descending */, sortComparer: SnapshotDataView.getSortComparer(sortOrder, fieldNameToColumnMapMainGrid) }; }; SnapshotDataView.prototype.getSorter = function () { return this.getUpdatedSorter(this._sortOrder, this._fieldNameToColumnMapMainGrid); }; SnapshotDataView.prototype.getSorterForReferences = function () { return this.getUpdatedSorter(this._sortOrderForReferences, this._fieldNameToColumnMapReferenceGrid); }; SnapshotDataView.prototype.markAllObjectsScopeConformed = function (dataSet) { var items = dataSet.items; for (var i = 0; i < items.length; i++) { items[i].isScopeConformed = true; } }; SnapshotDataView.prototype.updateTree = function () { var _this = this; if (!this._dataViewModel.snapshotDataSource) { return; } if (this._rootQueryPromise) { MemoryAnalyzer.Program.traceWriter.raiseEvent(210 /* Memory_DisplayFirstLevelSnapshotData_Stop */); this._rootQueryPromise.cancel(); } MemoryAnalyzer.Program.traceWriter.raiseEvent(210 /* Memory_DisplayFirstLevelSnapshotData_Stop */); this._rootQueryPromise = this._dataViewModel.snapshotDataSource.getRootHeapDataTreeItem(this.getFilter(), this.getSorter(), 0, SnapshotDataView.ROOTS_LOAD_CAP, this.getScopeFilter()).then(function (dataSet) { var roots = dataSet.items; var ariaDescription; if (dataSet.totalCount > dataSet.items.length) { _this._reachedItemsCapMessageContainer.style.display = "block"; ariaDescription = Plugin.Resources.getString("ReachedItemsCapMessage", Common.FormattingHelpers.getDecimalLocaleString(dataSet.items.length, true), Common.FormattingHelpers.getDecimalLocaleString(dataSet.totalCount, true)); _this._reachedItemsCapMessageContainer.innerText = ariaDescription; } else { _this._reachedItemsCapMessageContainer.style.display = "none"; } var treeInfo = _this.getTreeInfo(roots, (function (item, expansionPath, startIndex, maxResult) { var scopeFilter = _this.getScopeFilter(); var scopeConformed = false; if (_this._snapshotViewModel.showNonMatchingReferences && (SnapshotDataView.isObjectScopeConformed(item, scopeFilter) || item.isScopeConformed)) { scopeFilter = 2 /* AllObjects */; scopeConformed = true; } var dataset = _this._dataViewModel.snapshotDataSource.getHeapDataTreeItem(_this.getFilter(), _this.getSorter(), item.id, expansionPath, startIndex, maxResult, scopeFilter); if (scopeConformed) { _this.markAllObjectsScopeConformed(dataset); } return dataset; }).bind(_this)); var columns = _this.getColumnInfoForMainGrid(_this._dataViewModel.snapshotDataSource.getAvailableFields(_this._snapshotViewModel.foldObjectsByDominator)); var gridOptions = new Common.Controls.Legacy.Grid.GridOptions(treeInfo.toggleFunction, treeInfo.loadMoreFunction, columns, [_this._sortOrder], null, _this.notifyRowSelected.bind(_this)); gridOptions.disableRightClickSelection = false; var headerClickSortColumn; if (_this._snapshotViewModel.foldObjectsByDominator) { headerClickSortColumn = _this._fieldNameToColumnMapMainGrid["containsDetachedDomNode"]; } else { headerClickSortColumn = _this._fieldNameToColumnMapMainGrid["isDetachedDomNode"]; } if (!_this._grid) { var gutterIcon = { cssClass: "", index: "", gutterIconCssCallback: _this.getWarningCss.bind(_this) }; gridOptions.gutter.backgroundColor = Plugin.Theme.getValue("plugin-background-color"); gridOptions.gutter.icon = gutterIcon; gridOptions.gutter.headerClickSortColumn = headerClickSortColumn; gridOptions.gutter.getTooltip = _this.detachedDomNodeTooltip.bind(_this); _this._grid = _this.createGrid(treeInfo.gridData, treeInfo.expandStates, gridOptions, _this._snapshotGridContainer); _this._grid.getElement().tabIndex = 4; _this._grid.getElement().addEventListener("sort", _this.sortCompleted.bind(_this)); _this._grid.getElement().addEventListener("sortStarted", _this.sortStarted.bind(_this)); _this._grid.getElement().addEventListener("selectionchanged", _this.onGridSelectionChanged.bind(_this)); _this._grid.setAriaDescription(ariaDescription); } else { _this._grid.setDataSource(treeInfo.gridData, treeInfo.expandStates, gridOptions.columns, gridOptions.sortOrders, -1); _this._grid.setGutterHeaderClickSortColumn(headerClickSortColumn); _this._grid.setAriaDescription(ariaDescription); } MemoryAnalyzer.Program.traceWriter.raiseEvent(210 /* Memory_DisplayFirstLevelSnapshotData_Stop */); }); }; SnapshotDataView.prototype.detachedDomNodeTooltip = function (dataIndex, dataSource) { var originalItem = dataSource[dataIndex]; if (originalItem.isDetachedDomNode) { if (originalItem.isWinJsDisposable) { return Plugin.Resources.getString("DetachedDomNodeDisposableTooltip"); } else if (originalItem instanceof MemoryAnalyzer.TypeDataObject) { return Plugin.Resources.getString("DetachedDomNodeTypeObjectTooltip"); } else { return Plugin.Resources.getString("DetachedDomNodeTooltip"); } } else if (originalItem.hasDetachedDomNodeChildren && this._snapshotViewModel.foldObjectsByDominator) { if (originalItem instanceof MemoryAnalyzer.TypeDataObject) { return Plugin.Resources.getString("DetachedDomNodeRetainingTypeObjectTooltip"); } else { return Plugin.Resources.getString("HasDetachedDomNodeChildrenTooltip"); } } else { return null; } }; SnapshotDataView.prototype.onGridSelectionChanged = function (args) { var item; var customArgs = args.customData[0]; if (customArgs.selectedCount === 1) { var dataIndex = customArgs.selectedRows[customArgs.selectedIndex]; if (typeof dataIndex !== "undefined") { item = this._grid.getRowData(dataIndex); } } this.showReferences(item); }; SnapshotDataView.prototype.notifyRowSelected = function () { Notifications.notify(MemoryAnalyzer.MemoryNotifications.DetailsViewRowSelected); }; SnapshotDataView.prototype.showReferences = function (item) { var _this = this; var items; MemoryAnalyzer.Program.traceWriter.raiseEvent(215 /* Memory_UpdateObjectReferenceGraph_Start */); if (item && item.id && !isNaN(item.id)) { items = this._dataViewModel.snapshotDataSource.getReferenceTreeItems(item.id, item.id, 0, this.getSorterForReferences(), this._snapshotViewModel.displayObjectIDs, this._snapshotViewModel.displayCircularReferences, 0, -1).items; } if (!items || items.length === 0) { this._referenceViewContainer.style.display = "none"; MemoryAnalyzer.Program.traceWriter.raiseEvent(216 /* Memory_UpdateObjectReferenceGraph_Stop */); return; } var rootItemId = item.id; var treeInfo = this.getTreeInfo(items, function (parentItem, expansionPath, startIndex, maxResult) { return _this._dataViewModel.snapshotDataSource.getReferenceTreeItems(rootItemId, parentItem.parentObjectId, parentItem.nodeId, _this.getSorterForReferences(), _this._snapshotViewModel.displayObjectIDs, _this._snapshotViewModel.displayCircularReferences, 0, -1); }); var columns = this.getColumnInfoForReferenceGrid(this._dataViewModel.snapshotDataSource.getAvailableFieldsForReferenceTree(this._snapshotViewModel.foldObjectsByDominator)); var gridOptions = new Common.Controls.Legacy.Grid.GridOptions(treeInfo.toggleFunction, treeInfo.loadMoreFunction, columns, [this._sortOrderForReferences], null, this.notifyRowSelected.bind(this)); gridOptions.disableRightClickSelection = false; gridOptions.ariaTitle = Plugin.Resources.getString("ReferenceGraph"); var headerClickSortColumn; if (this._snapshotViewModel.foldObjectsByDominator) { headerClickSortColumn = this._fieldNameToColumnMapMainGrid["containsDetachedDomNode"]; } else { headerClickSortColumn = this._fieldNameToColumnMapMainGrid["isDetachedDomNode"]; } if (!this._gridReference) { var gutterIcon = { cssClass: "", index: "", gutterIconCssCallback: this.getWarningCss.bind(this) }; gridOptions.gutter.backgroundColor = Plugin.Theme.getValue("plugin-background-color"); gridOptions.gutter.icon = gutterIcon; gridOptions.gutter.headerClickSortColumn = headerClickSortColumn; gridOptions.gutter.getTooltip = this.detachedDomNodeTooltip.bind(this); this._gridReference = this.createGrid(treeInfo.gridData, treeInfo.expandStates, gridOptions, this._referenceViewContainer); this._gridReference.getElement().tabIndex = 4; this._gridReference.getElement().addEventListener("sort", this.sortCompletedForReferences.bind(this)); } else { this._gridReference.setDataSource(treeInfo.gridData, treeInfo.expandStates, gridOptions.columns, gridOptions.sortOrders, -1); this._gridReference.setGutterHeaderClickSortColumn(headerClickSortColumn); this._gridReference.updateGetChildDataCallback(treeInfo.toggleFunction); } this._referenceViewContainer.style.removeProperty("display"); if (items.length === 1 && items[0].hasChildren) { this._gridReference.expandNode(0); } MemoryAnalyzer.Program.traceWriter.raiseEvent(216 /* Memory_UpdateObjectReferenceGraph_Stop */); }; SnapshotDataView.prototype.getMoreText = function (totalLoaded, totalCount, capCount) { var hasMoreText; if (totalLoaded < totalCount) { var toLoadCount = Math.min(capCount, totalCount - totalLoaded); hasMoreText = Plugin.Resources.getString("ChildrenLoadNext", Common.FormattingHelpers.getDecimalLocaleString(toLoadCount, true)); } return hasMoreText; }; SnapshotDataView.prototype.getTreeInfo = function (roots, getChildren) { var _this = this; var rowsAndExpandStates = this.getPlaceholderRowsAndExpandStates(roots); var items = rowsAndExpandStates.itemsWithPlaceholders; var expandStates = rowsAndExpandStates.expandStates; var toggleFunction = function (parentTreeItem, expansionPath, complete) { var dataSet = getChildren(parentTreeItem, expansionPath, 0, SnapshotDataView.CHILDREN_LOAD_CAP); var hasMoreText = _this.getMoreText(dataSet.items.length, dataSet.totalCount, SnapshotDataView.CHILDREN_LOAD_CAP); if (hasMoreText) { parentTreeItem.nextStartIndex = dataSet.items.length; } complete(_this.getPlaceholderRowsAndExpandStates(dataSet.items), hasMoreText); }; var loadMoreFunction = function (parentTreeItem, expansionPath, complete) { var startIndex = parentTreeItem.nextStartIndex; if (!startIndex) { return; } var dataSet = getChildren(parentTreeItem, expansionPath, startIndex, SnapshotDataView.CHILDREN_LOAD_CAP); var hasMoreText = _this.getMoreText(startIndex + dataSet.items.length, dataSet.totalCount, SnapshotDataView.CHILDREN_LOAD_CAP); if (hasMoreText) { parentTreeItem.nextStartIndex = startIndex + dataSet.items.length; } complete(_this.getPlaceholderRowsAndExpandStates(dataSet.items), hasMoreText); }; return new TreeInfo(items, expandStates, toggleFunction, loadMoreFunction); }; SnapshotDataView.prototype.getPlaceholderRowsAndExpandStates = function (roots) { var items = []; var placeHolderRow = { name: "", value: "", isPlaceholder: true }; var expandStates = []; for (var i = 0; roots && i < roots.length; i++) { items.push(roots[i]); if (roots[i].hasChildren) { expandStates.push(-1); items.push(placeHolderRow); expandStates.push(0); } else { expandStates.push(0); } } return { itemsWithPlaceholders: items, expandStates: expandStates }; }; SnapshotDataView.prototype.createGrid = function (gridData, expandStates, gridOptions, container) { container.innerHTML = ""; var grid = new Common.Controls.Legacy.Grid.GridControl(container, gridOptions); grid.setDataSource(gridData, expandStates, gridOptions.columns, gridOptions.sortOrders, -1); container.addEventListener("contextmenu", this.onGridContextMenu.bind(this, grid)); container.addEventListener("keydown", this.onKeyDown.bind(this, grid)); return grid; }; SnapshotDataView.prototype.getColumnInfo = function (fieldNames, fieldNamesToColumnInfo) { var columnInfo = []; for (var i = 0; i < fieldNames.length; i++) { if (fieldNamesToColumnInfo.hasOwnProperty(fieldNames[i])) { columnInfo.push(fieldNamesToColumnInfo[fieldNames[i]]); } else { throw new Error(Plugin.Resources.getErrorString("JSPerf.1003")); } } return columnInfo; }; SnapshotDataView.prototype.getColumnInfoForMainGrid = function (fieldNames) { return this.getColumnInfo(fieldNames, this._fieldNameToColumnMapMainGrid); }; SnapshotDataView.prototype.getColumnInfoForReferenceGrid = function (fieldNames) { return this.getColumnInfo(fieldNames, this._fieldNameToColumnMapReferenceGrid); }; SnapshotDataView.prototype.onKeyDown = function (grid, e) { this._focusedGrid = grid; if (e.keyCode === 121 /* F10 */ && !e.altKey && !e.ctrlKey && e.shiftKey) { var evt = document.createEvent("MouseEvent"); evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); this.onGridContextMenu(grid, evt); } else if (e.keyCode === 13 /* Enter */ && !e.altKey && !e.ctrlKey && !e.shiftKey) { this.tryViewSource(); } }; SnapshotDataView.prototype.sortCompleted = function (event) { var customData = event.customData[0]; this._sortOrder = customData.sortOrder[0]; MemoryAnalyzer.Program.onIdle(); MemoryAnalyzer.Program.traceWriter.raiseEvent(208 /* Memory_GridSort_Stop */); }; SnapshotDataView.prototype.sortStarted = function (event) { MemoryAnalyzer.Program.traceWriter.raiseEvent(207 /* Memory_GridSort_Start */); }; SnapshotDataView.prototype.sortCompletedForReferences = function (event) { var customData = event.customData[0]; this._sortOrderForReferences = customData.sortOrder[0]; }; SnapshotDataView.prototype.tryViewSource = function () { var dataIndex = this._grid.getSelectedDataIndex(); if (dataIndex > -1) { var namedHeapObject = this._grid.getRowData(dataIndex); var sourceInfo = namedHeapObject.sourceInfo; if (sourceInfo) { SnapshotDataView.onRequestViewSource(sourceInfo); } } }; SnapshotDataView.ROOTS_LOAD_CAP = 2000; SnapshotDataView.CHILDREN_LOAD_CAP = 2000; SnapshotDataView.HTMLRegex = /HTML.*Element/; return SnapshotDataView; })(Common.Controls.Legacy.TemplateControl); MemoryAnalyzer.SnapshotDataView = SnapshotDataView; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotDataViewTab.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SnapshotDataViewTab = (function (_super) { __extends(SnapshotDataViewTab, _super); function SnapshotDataViewTab(snapshotDataViewController) { _super.call(this); this._snapshotDataViewController = snapshotDataViewController; this.title = Plugin.Resources.getString(Common.Enum.GetName(MemoryAnalyzer.DataViewType, this._snapshotDataViewController.dataViewModel.viewType)); this.tooltipString = Plugin.Resources.getString(Common.Enum.GetName(MemoryAnalyzer.DataViewType, this._snapshotDataViewController.dataViewModel.viewType) + "Tooltip"); this.content = this._snapshotDataViewController.view; } Object.defineProperty(SnapshotDataViewTab.prototype, "controller", { get: function () { return this._snapshotDataViewController; }, enumerable: true, configurable: true }); SnapshotDataViewTab.prototype.onActiveChanged = function () { var _this = this; if (this.active) { this._snapshotDataViewController.setSnapshotDataSource(); window.setImmediate(function () { var headerHasFocus = _this.header.rootElement === document.activeElement; if (!headerHasFocus) { _this._snapshotDataViewController.setFocusOnGrid(); } }); } }; return SnapshotDataViewTab; })(MemoryAnalyzer.Controls.TabItem); MemoryAnalyzer.SnapshotDataViewTab = SnapshotDataViewTab; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotDiffController.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SnapshotDiffController = (function () { function SnapshotDiffController(storageId, firstSnapshotId, lastSnapshotId) { this._storageId = storageId; this._firstSnapshotId = firstSnapshotId; this._lastSnapshotId = lastSnapshotId; this._navigationId = MemoryAnalyzer.NavigationHelpers.getNextId(); this.model = new MemoryAnalyzer.SnapshotViewModel(); this.model.progressText = Plugin.Resources.getString("GeneratingComparisonView"); this.view = new MemoryAnalyzer.SnapshotView(this, this.model); } Object.defineProperty(SnapshotDiffController.prototype, "currentDataViewController", { get: function () { return this.view.currentDataViewController; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotDiffController.prototype, "navigationId", { get: function () { return this._navigationId; }, enumerable: true, configurable: true }); SnapshotDiffController.prototype.getSnapshotDataViewController = function (viewType) { var controller = new MemoryAnalyzer.SnapshotDataViewController(viewType, this.model, this.view); return controller; }; SnapshotDiffController.prototype.diffSnapshots = function (storageId, relativePaths, targetView, sortProperty) { var _this = this; this.setTargetView(targetView, sortProperty); var snapshotPaths = []; var traceEventKey = 0; for (var i = 0; i < relativePaths.length; i++) { var path = MemoryAnalyzer.Program.shell.getSnapshotFullPath(storageId, relativePaths[i]); snapshotPaths.push(path); traceEventKey += MemoryAnalyzer.SnapshotViewController.getHashKey(path); } MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(219 /* Memory_ProcessingDiffSnapshot_Start */, traceEventKey); MemoryAnalyzer.Program.memoryAnalyzerData.processSnapshotDiff(snapshotPaths).done(this.onDiffCompleted.bind(this, traceEventKey), this.onDiffFailed.bind(this, traceEventKey), function (progress) { _this.model.progressText = Plugin.Resources.getString(progress.stringId); _this.model.progressValue = progress.percentage; }); }; SnapshotDiffController.prototype.setTargetView = function (targetView, sortProperty) { this.model.targetView = targetView; this.model.sortProperty = sortProperty; }; SnapshotDiffController.prototype.onDiffCompleted = function (traceEventKey, snapshotData) { var snapshot = new MemoryAnalyzer.Snapshot(snapshotData, true, this._firstSnapshotId, this._lastSnapshotId); this.model.snapshot = snapshot; MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(220 /* Memory_ProcessingDiffSnapshot_Stop */, traceEventKey); MemoryAnalyzer.Program.onIdle(); }; SnapshotDiffController.prototype.onDiffFailed = function (traceEventKey, error) { this.model.latestSnapshotError = error; MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(220 /* Memory_ProcessingDiffSnapshot_Stop */, traceEventKey); MemoryAnalyzer.Program.onIdle(); }; return SnapshotDiffController; })(); MemoryAnalyzer.SnapshotDiffController = SnapshotDiffController; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotFile.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SnapshotFile = (function () { function SnapshotFile(storageId, relativePath) { this.storageId = storageId; this.relativePath = relativePath; } return SnapshotFile; })(); MemoryAnalyzer.SnapshotFile = SnapshotFile; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotSummary.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SnapshotSummary = (function () { function SnapshotSummary(snapshotDataSummary, snapshotFile, timeTaken, id) { this.detachedDomNodeCount = snapshotDataSummary.detachedDomNodeCount; this.id = id; this.objectsCount = snapshotDataSummary.objectsCount; this.processPrivateBytes = snapshotDataSummary.privateBytes.toString(); this.pointerSize = snapshotDataSummary.pointerSize; this.screenshotData = snapshotDataSummary.base64Image; this.snapshotFile = snapshotFile; this.statsAddedObjects = snapshotDataSummary.statsAddedObjects; this.statsDeletedObjects = snapshotDataSummary.statsDeletedObjects; this.taken = timeTaken; this.totalObjectSize = snapshotDataSummary.totalObjectSize; } Object.defineProperty(SnapshotSummary, "fileExtension", { get: function () { return ".snapshotsummary"; }, enumerable: true, configurable: true }); SnapshotSummary.load = function (storageId, relativePath, completed, failed) { var stream; var snapshotSummary; Plugin.Storage.openFile(storageId + "\\" + relativePath, { access: 1 /* read */, encoding: "UTF-8", persistence: 1 /* temporary */, type: 1 /* text */ }).then(function (file) { stream = file; return file.read(); }).then(function (snapshotResultString) { snapshotSummary = JSON.parse(snapshotResultString); snapshotSummary.snapshotFile.storageId = storageId; return stream.close(); }).done(function () { completed(snapshotSummary); }, function (error) { if (failed) { failed(error); } }); }; SnapshotSummary.prototype.save = function (completed, failed) { var _this = this; var summaryRelativePath = this.snapshotFile.relativePath + SnapshotSummary.fileExtension; Plugin.Storage.createFile(this.snapshotFile.storageId + "\\" + summaryRelativePath, { access: 2 /* write */, encoding: "UTF-8", persistence: 1 /* temporary */, type: 1 /* text */ }).done(function (file) { file.write(JSON.stringify(_this)).done(function () { file.close(); completed(); }, function (error) { file.close(); if (failed) { failed(error); } }); }, function (error) { if (failed) { failed(error); } }); }; return SnapshotSummary; })(); MemoryAnalyzer.SnapshotSummary = SnapshotSummary; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotTab.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SnapshotTab = (function (_super) { __extends(SnapshotTab, _super); function SnapshotTab(controller) { _super.call(this); this._snapshotViewController = controller; this.content = controller.view; } SnapshotTab.prototype.onActiveChanged = function () { if (this.active) { var currentDataView = this._snapshotViewController.view.currentDataView; if (currentDataView) { currentDataView.refreshGrids(); } MemoryAnalyzer.NavigationHelpers.switchNavigationView(this._snapshotViewController.navigationId); } }; return SnapshotTab; })(MemoryAnalyzer.Controls.TabItem); MemoryAnalyzer.SnapshotTab = SnapshotTab; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotTileView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SnapshotTileViewModel = (function () { function SnapshotTileViewModel(summary, snapshotSummaryCollection) { this._summary = summary; this._snapshotSummaryCollection = snapshotSummaryCollection; } Object.defineProperty(SnapshotTileViewModel.prototype, "summaryData", { get: function () { return this._summary; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotTileViewModel.prototype, "snapshotSummaryCollection", { get: function () { return this._snapshotSummaryCollection; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotTileViewModel.prototype, "timeTaken", { get: function () { var date = new Date(this._summary.taken); return "(" + date.toLocaleTimeString() + ")"; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotTileViewModel.prototype, "detachedDomNodeCount", { get: function () { return this._summary.detachedDomNodeCount; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotTileViewModel.prototype, "processPrivateBytes", { get: function () { return MemoryAnalyzer.FormattingHelpers.getPrettyPrintSize(parseInt(this.summaryData.processPrivateBytes)); }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotTileViewModel.prototype, "totalObjectSize", { get: function () { return MemoryAnalyzer.FormattingHelpers.getPrettyPrintSize(this.summaryData.totalObjectSize); }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotTileViewModel.prototype, "objectsCount", { get: function () { return this.summaryData.objectsCount; }, enumerable: true, configurable: true }); SnapshotTileViewModel.prototype.getComparableSnapshots = function () { var result = []; var currentSnapshotDate = this._summary.taken; for (var i = 0; i < this._snapshotSummaryCollection.length; i++) { var snapshot = this._snapshotSummaryCollection.getItem(i); if (snapshot.id !== this._summary.id) { result.push(snapshot); } } result = result.sort(function (a, b) { return a.id - b.id; }); return result; }; return SnapshotTileViewModel; })(); MemoryAnalyzer.SnapshotTileViewModel = SnapshotTileViewModel; var SnapshotTileView = (function (_super) { __extends(SnapshotTileView, _super); function SnapshotTileView(controller, model) { _super.call(this, "SnapshotTileTemplate"); this._controller = controller; this._model = model; this._tileContextMenuItems = []; this._snapshotTile = this.findElement("snapshotTile"); this._comparableSnapshots = this._model.getComparableSnapshots(); this._tileHeader = this.findElement("snapshotTileHeader"); this.findElement("snapshotTileTitle").innerText = Plugin.Resources.getString("SnapshotNumber", this._model.summaryData.id); var imgHolder = this.findElement("snapshotTileImage"); if (this._model.summaryData.screenshotData) { imgHolder.src = "data:image/jpeg;base64," + this._model.summaryData.screenshotData.replace(/\r\n/g, ""); imgHolder.alt = Plugin.Resources.getString("Screenshot"); } else { imgHolder.style.display = "none"; } var objectsCountText = Common.FormattingHelpers.getDecimalLocaleString(this._model.objectsCount, true); this.findElement("snapshotTakenDate").innerText = this._model.timeTaken; this.findElement("heapSizeLink").innerText = this._model.totalObjectSize; this.findElement("objectsCountLink").innerText = Plugin.Resources.getString("ObjectsCount", objectsCountText); this.findElement("heapSizeLink").setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("HeapSizeLinkTooltip")); this.findElement("objectsCountLink").setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("ObjectsCountLinkTooltip")); this.setupSizeDiff(this.findElement("heapDiffLink"), this.findElement("heapDiffIndicatorIcon")); this.setupCountDiff(this.findElement("objectsDiffLink"), this.findElement("objectDiffIndicatorIcon")); this.findElement("heapSizeLink").onclick = this.onSizeClick.bind(this); this.findElement("objectsCountLink").onclick = this.onObjectCountClick.bind(this); this.findElement("heapDiffLink").onclick = this.onDiffClick.bind(this); this.findElement("objectsDiffLink").onclick = this.onObjectDiffClick.bind(this); if (model.detachedDomNodeCount > 0) { var detachedDomNodeCount = this.findElement("snapshotTileDetachedDomNodeCount"); detachedDomNodeCount.innerText = model.detachedDomNodeCount.toString(); detachedDomNodeCount.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("PotentialIssuesTooltip", model.detachedDomNodeCount)); detachedDomNodeCount.setAttribute("aria-label", Plugin.Resources.getString("PotentialIssuesTooltip", model.detachedDomNodeCount)); detachedDomNodeCount.onclick = this.onDetachedDomNodesClick.bind(this); this.findElement("snapshotTileDetachedDomNodeInfo").style.visibility = "visible"; } var links = this.findElementsByClassName("BPT-FileLink"); for (var linkIndex = 0; linkIndex < links.length; linkIndex++) { var linkElement = links[linkIndex]; (function (link) { link.onkeydown = function (e) { if ((e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) && !e.ctrlKey && !e.altKey && !e.shiftKey) { link.click(); } }; })(linkElement); } this.populateContextMenu(); this._model.snapshotSummaryCollection.collectionChanged.addHandler(this.onCollectionChanged.bind(this)); } Object.defineProperty(SnapshotTileView.prototype, "navigationElement", { get: function () { return this._tileHeader; }, enumerable: true, configurable: true }); SnapshotTileView.prototype.setFocus = function () { this._tileHeader.focus(); }; SnapshotTileView.prototype.onCollectionChanged = function (eventArgs) { if (eventArgs.action === 0 /* Add */) { var newSummary = eventArgs.newItems[0]; if (this._model.summaryData.id !== newSummary.id) { var contextMenuItem = { callback: this.diffTo.bind(this, newSummary.id), label: Plugin.Resources.getString("SnapshotNumber", newSummary.id), type: 1 /* command */ }; this._tileContextMenuItems.push(contextMenuItem); } this.createContextMenu(); } }; SnapshotTileView.prototype.createContextMenu = function () { if (this._tileContextMenu) { this._tileContextMenu.detach(this._snapshotTile); } if (this._tileContextMenuItems.length > 0) { var compareToMenuItem = { callback: function () { }, label: Plugin.Resources.getString("CompareTo"), submenu: this._tileContextMenuItems, type: 1 /* command */ }; this._tileContextMenu = Plugin.ContextMenu.create([compareToMenuItem]); this._tileContextMenu.attach(this._snapshotTile); } }; SnapshotTileView.prototype.populateContextMenu = function () { this._comparableSnapshots = this._model.getComparableSnapshots(); for (var i = 0; i < this._comparableSnapshots.length; i++) { var comparable = this._comparableSnapshots[i]; var contextMenuItem = { callback: this.diffTo.bind(this, comparable.id), label: Plugin.Resources.getString("SnapshotNumber", comparable.id), type: 1 /* command */ }; this._tileContextMenuItems.push(contextMenuItem); } this.createContextMenu(); }; SnapshotTileView.prototype.setupSizeDiff = function (element, iconElement) { var toSnapshot = this._comparableSnapshots[this._model.summaryData.id - 2]; if (toSnapshot) { var size = (this._model.summaryData.totalObjectSize - toSnapshot.totalObjectSize); if (size > 0) { iconElement.classList.add("heapIncreaseIcon"); } else if (size < 0) { iconElement.classList.add("heapDecreaseIcon"); } if (size === 0) { element.innerText = Plugin.Resources.getString("NoDiff"); } else { element.innerText = (size > 0 ? "+" : "-") + MemoryAnalyzer.FormattingHelpers.getPrettyPrintSize(Math.abs(size)); } element.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("HeapSizeDiffLinkTooltip")); } else { element.classList.remove("BPT-FileLink"); element.classList.add("baselineText"); element.innerText = Plugin.Resources.getString("Baseline"); element.tabIndex = -1; } }; SnapshotTileView.prototype.setupCountDiff = function (element, iconElement) { if (this._comparableSnapshots.length >= 1) { var addedCount = this._model.summaryData.statsAddedObjects; var deletedCount = this._model.summaryData.statsDeletedObjects; var delta = addedCount - deletedCount; if (delta > 0) { iconElement.classList.add("heapIncreaseIcon"); } else if (delta < 0) { iconElement.classList.add("heapDecreaseIcon"); } if (addedCount === 0 && deletedCount === 0) { element.innerText = Plugin.Resources.getString("NoDiff"); } else { var diffText; diffText = "+" + Common.FormattingHelpers.getDecimalLocaleString(addedCount, true) + " / " + "-" + Common.FormattingHelpers.getDecimalLocaleString(deletedCount, true); element.innerText = diffText; } element.setAttribute("data-plugin-vs-tooltip", Plugin.Resources.getString("ObjectsCountDiffLinkTooltip")); } else { element.classList.remove("BPT-FileLink"); element.classList.add("baselineText"); element.innerText = Plugin.Resources.getString("Baseline"); element.tabIndex = -1; } }; SnapshotTileView.prototype.onDetachedDomNodesClick = function (e) { this._controller.viewSnapshot(this._model.summaryData.id, "Types", "containsDetachedDomNode"); }; SnapshotTileView.prototype.onSizeClick = function (e) { this._controller.viewSnapshot(this._model.summaryData.id, "Types", "retainedSize"); }; SnapshotTileView.prototype.onObjectCountClick = function (e) { this._controller.viewSnapshot(this._model.summaryData.id, "Types", "childrenCount"); }; SnapshotTileView.prototype.diffTo = function (id) { this._controller.compareSnapshots(this._model.summaryData.id, id, "Types", "retainedSize"); }; SnapshotTileView.prototype.onDiffClick = function (e) { var toSnapshot = this._comparableSnapshots[this._model.summaryData.id - 2]; if (toSnapshot) { this._controller.compareSnapshots(this._model.summaryData.id, toSnapshot.id, "Types", "retainedSizeDiff"); } }; SnapshotTileView.prototype.onObjectDiffClick = function (e, target) { var toSnapshot = this._comparableSnapshots[this._model.summaryData.id - 2]; if (toSnapshot) { this._controller.compareSnapshots(this._model.summaryData.id, toSnapshot.id, "Types", "childrenCount"); } }; return SnapshotTileView; })(Common.Controls.Legacy.TemplateControl); MemoryAnalyzer.SnapshotTileView = SnapshotTileView; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // snapshotView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SnapshotViewController = (function () { function SnapshotViewController(storageId) { this._storageId = storageId; this._navigationId = MemoryAnalyzer.NavigationHelpers.getNextId(); this.model = new SnapshotViewModel(); this.model.progressText = Plugin.Resources.getString("ProcessingSnapshot"); this.view = new SnapshotView(this, this.model); } Object.defineProperty(SnapshotViewController.prototype, "currentDataViewController", { get: function () { return this.view.currentDataViewController; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotViewController.prototype, "navigationId", { get: function () { return this._navigationId; }, enumerable: true, configurable: true }); SnapshotViewController.getHashKey = function (value) { var hash = 0; for (var index = 0; index < value.length; index++) { hash += value.charCodeAt(index); } return hash; }; SnapshotViewController.prototype.getSnapshotDataViewController = function (viewType) { return new MemoryAnalyzer.SnapshotDataViewController(viewType, this.model, this.view); }; SnapshotViewController.prototype.giveFeedback = function () { var _this = this; MemoryAnalyzer.Program.internalFeedback.isEnabled().done(function (enabled) { if (enabled) { var viewTypeName = ""; if (_this.view.currentDataViewController) { viewTypeName = Common.Enum.GetName(MemoryAnalyzer.DataViewType, _this.view.currentDataViewController.viewType); } MemoryAnalyzer.Program.shell.save(false).done(function (fileLocation) { MemoryAnalyzer.Program.internalFeedback.sendData(true, "", "", viewTypeName, "", fileLocation); }); } }); }; SnapshotViewController.prototype.loadSnapshot = function (storageId, relativePaths, targetView, sortProperty) { if (!relativePaths || relativePaths.length !== 1) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1012")); } this.setTargetView(targetView, sortProperty); var snapshotPath = MemoryAnalyzer.Program.shell.getSnapshotFullPath(storageId, relativePaths[0]); var traceEventKey = SnapshotViewController.getHashKey(snapshotPath); MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(217 /* Memory_ProcessingSnapshot_Start */, traceEventKey); MemoryAnalyzer.Program.memoryAnalyzerData.processSnapshot(snapshotPath).done(this.onSnapshotProcessingCompleted.bind(this, traceEventKey), this.onSnapshotProcessingFailed.bind(this, traceEventKey)); }; SnapshotViewController.prototype.setTargetView = function (targetView, sortProperty) { this.model.targetView = targetView; this.model.sortProperty = sortProperty; }; SnapshotViewController.prototype.onSnapshotProcessingCompleted = function (traceEventKey, snapshotData) { var snapshot = new MemoryAnalyzer.Snapshot(snapshotData, false, 0, 0); this.model.snapshot = snapshot; MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(218 /* Memory_ProcessingSnapshot_Stop */, traceEventKey); MemoryAnalyzer.Program.onIdle(); }; SnapshotViewController.prototype.onSnapshotProcessingFailed = function (traceEventKey, error) { if (!error) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1013")); } this.model.latestSnapshotError = error; MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(218 /* Memory_ProcessingSnapshot_Stop */, traceEventKey); MemoryAnalyzer.Program.onIdle(); }; SnapshotViewController.prototype.onSnapshotProgress = function (progress) { this.model.progressText = Plugin.Resources.getString(progress.stringId); this.model.progressValue = progress.percentage; }; return SnapshotViewController; })(); MemoryAnalyzer.SnapshotViewController = SnapshotViewController; var SnapshotViewModel = (function (_super) { __extends(SnapshotViewModel, _super); function SnapshotViewModel() { _super.call(this); } SnapshotViewModel.initialize = function () { Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.DataTabModelPropertyName, null); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.DisplayCircularReferencesPropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.DisplayObjectIDsPropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.FoldObjectsByDominatorPropertyName, true); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.IsDiffPropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.LatestSnapshotErrorPropertyName, null); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.ProgressTextPropertyName, ""); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.ProgressValuePropertyName, ""); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.ScopeFilterOptionsPropertyName, null); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.ScopeFilterPropertyName, 2 /* AllObjects */); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.ShowBuiltInsPropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.ShowNonMatchingReferencesPropertyName, false); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.SnapshotPropertyName, null, function (obj) { return obj.onSnapshotChanged(); }); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.SortPropertyPropertyName, ""); Common.ObservableHelpers.defineProperty(SnapshotViewModel, SnapshotViewModel.TargetViewPropertyName, ""); }; SnapshotViewModel.prototype.onSnapshotChanged = function () { this.setScopeFilterOptions(); }; SnapshotViewModel.prototype.onFilterStringChanging = function () { MemoryAnalyzer.Program.traceWriter.raiseEvent(213 /* Memory_GridFilterResponse_Start */); }; SnapshotViewModel.prototype.onFilterStringChanged = function () { MemoryAnalyzer.Program.traceWriter.raiseEvent(214 /* Memory_GridFilterResponse_Stop */); }; SnapshotViewModel.prototype.setScopeFilterOptions = function () { if (this.snapshot) { var stats = this.snapshot.getSnapshotDiffStats(); var scopeFilterOptions = [ { value: 0 /* ObjectsLeftFromPreviousSnapshot */.toString(), text: Plugin.Resources.getString("ScopeObjectsLeftFromPreviousSnapshot", this.snapshot.firstSnapshotId, Common.FormattingHelpers.getDecimalLocaleString(stats.leftOverObjectsCount, true)) }, { value: 1 /* ObjectsAddedBetweenSnapshots */.toString(), text: Plugin.Resources.getString("ScopeObjectsAddedBetweenSnapshots", this.snapshot.firstSnapshotId, this.snapshot.lastSnapshotId, Common.FormattingHelpers.getDecimalLocaleString(stats.addedObjectsCount, true)) }, { value: 2 /* AllObjects */.toString(), text: Plugin.Resources.getString("ScopeAllObjects", this.snapshot.lastSnapshotId, Common.FormattingHelpers.getDecimalLocaleString(stats.objectsCount, true)) } ]; this.scopeFilterOptions = scopeFilterOptions; this.scopeFilter = 1 /* ObjectsAddedBetweenSnapshots */; this.isDiff = this.snapshot.isDiff; } else { this.scopeFilterOptions = []; } }; SnapshotViewModel.DataTabModelPropertyName = "dataTabModel"; SnapshotViewModel.DisplayCircularReferencesPropertyName = "displayCircularReferences"; SnapshotViewModel.DisplayObjectIDsPropertyName = "displayObjectIDs"; SnapshotViewModel.FoldObjectsByDominatorPropertyName = "foldObjectsByDominator"; SnapshotViewModel.IsDiffPropertyName = "isDiff"; SnapshotViewModel.LatestSnapshotErrorPropertyName = "latestSnapshotError"; SnapshotViewModel.ProgressTextPropertyName = "progressText"; SnapshotViewModel.ProgressValuePropertyName = "progressValue"; SnapshotViewModel.ScopeFilterPropertyName = "scopeFilter"; SnapshotViewModel.ScopeFilterOptionsPropertyName = "scopeFilterOptions"; SnapshotViewModel.ShowBuiltInsPropertyName = "showBuiltIns"; SnapshotViewModel.ShowNonMatchingReferencesPropertyName = "showNonMatchingReferences"; SnapshotViewModel.SnapshotPropertyName = "snapshot"; SnapshotViewModel.SortPropertyPropertyName = "sortProperty"; SnapshotViewModel.TargetViewPropertyName = "targetView"; return SnapshotViewModel; })(Common.Observable); MemoryAnalyzer.SnapshotViewModel = SnapshotViewModel; SnapshotViewModel.initialize(); var SnapshotView = (function (_super) { __extends(SnapshotView, _super); function SnapshotView(controller, model) { _super.call(this, "SnapshotTabTemplate"); this._controller = controller; this._model = model; this._snapshotAnalysisView = new SnapshotAnalysisView(this._controller, this._model); this._model.propertyChanged.addHandler(this.onPropertyChanged.bind(this)); this._snapshotDataNavigation = new Common.Controls.Legacy.Control(this.findElement("snapshotDataNavigation")); this._snapshotProcessingProgressDiv = this.findElement("snapshotProcessingProgressDiv"); this._progressText = this.findElement("progressText"); this._progressBar = this.findElement("progressBar"); this._snapshotProcessingError = this.findElement("snapshotProcessingError"); this._snapshotProcessingErrorMsg = this.findElement("snapshotProcessingErrorMsg"); this.findElement("snapshotProcessingErrorLabel").innerText = Plugin.Resources.getString("ErrorWhileProcessing"); this.uiUpdateViews(); this.updateProgress(); } Object.defineProperty(SnapshotView.prototype, "currentDataView", { get: function () { var currentTab = this.currentDataViewTab; if (currentTab) { return currentTab.content; } return null; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotView.prototype, "currentDataViewController", { get: function () { var currentTab = this.currentDataViewTab; if (currentTab) { return currentTab.controller; } return null; }, enumerable: true, configurable: true }); Object.defineProperty(SnapshotView.prototype, "currentDataViewTab", { get: function () { if (this._tabControl && this._tabControl.selectedItem) { return this._tabControl.selectedItem; } return null; }, enumerable: true, configurable: true }); SnapshotView.prototype.switchToDataView = function (viewType) { var tab = this._tabControl.getTab(viewType); if (tab) { tab.controller.dataViewModel.filterString = ""; } this._tabControl.selectedItem = tab; }; SnapshotView.prototype.onPropertyChanged = function (propertyName) { var _this = this; switch (propertyName) { case SnapshotViewModel.LatestSnapshotErrorPropertyName: this.updateSnapshotError(); break; case SnapshotViewModel.ProgressTextPropertyName: case SnapshotViewModel.ProgressValuePropertyName: this.updateProgress(); break; case SnapshotViewModel.ShowBuiltInsPropertyName: this.forEachTab(function (tab) { tab.controller.snapshotViewModel.showBuiltIns = _this._model.showBuiltIns; }); break; case SnapshotViewModel.SnapshotPropertyName: this.uiUpdateViews(); break; case SnapshotViewModel.SortPropertyPropertyName: this.updateSort(); break; case SnapshotViewModel.TargetViewPropertyName: this.updateTargetView(); break; } }; SnapshotView.prototype.forEachTab = function (action) { for (var i = 0; i < this._tabControl.length(); i++) { var tab = this._tabControl.getTab(i); action(tab); } }; SnapshotView.prototype.updateProgress = function () { if (this._model.progressText) { this._progressText.innerText = this._model.progressText; } if (this._model.progressValue) { this._progressBar.value = this._model.progressValue; } }; SnapshotView.prototype.updateTargetView = function () { if (this._tabControl) { var title = this._model.targetView; for (var i = 0; i < this._tabControl.length(); i++) { var tabItem = this._tabControl.getTab(i); if (tabItem.title === title) { this._tabControl.selectedItem = tabItem; } } } }; SnapshotView.prototype.updateSort = function () { if (this.currentDataView) { this.currentDataView.sortBy(this._model.sortProperty, "desc"); } }; SnapshotView.prototype.updateSnapshotError = function () { var error = this._model.latestSnapshotError; if (error) { this.showProgress(false); this._snapshotProcessingErrorMsg.innerText = MemoryAnalyzer.ErrorFormatter.format(error); this._snapshotProcessingError.style.display = "block"; } else { this._snapshotProcessingErrorMsg.innerText = ""; this._snapshotProcessingError.style.display = "none"; } }; SnapshotView.prototype.getNewTab = function (dataViewType) { return new MemoryAnalyzer.SnapshotDataViewTab(this._controller.getSnapshotDataViewController(dataViewType)); }; SnapshotView.prototype.uiUpdateViews = function () { var _this = this; this.updateSnapshotError(); if (this._tabControl) { for (var i = 0; i < this._tabControl.length(); i++) { var tabToRemove = this._tabControl.getTab(i); } this._snapshotDataNavigation.removeChild(this._tabControl); } if (this._model.snapshot) { this._snapshotDataNavigation.rootElement.classList.remove("snapshotDataNavigationHidden"); this.showProgress(false); this._tabControl = new MemoryAnalyzer.Controls.TabControl(); this._tabControl.tabsLeftAligned = true; this._tabControl.afterBarContainer.appendChild(this._snapshotAnalysisView.rootElement); var dataViewTypes = Common.Enum.GetValues(MemoryAnalyzer.DataViewType); for (var i = 0; i < dataViewTypes.length; i++) { var dataViewType = dataViewTypes[i]; var tabItem = this.getNewTab(dataViewType); this._tabControl.addTab(tabItem); } this.updateTargetView(); this.updateSort(); this._snapshotAnalysisView.setupSettingsMenu(); this._snapshotAnalysisView.onTabChanged(); this._tabControl.selectedItemChanged = function () { _this._model.targetView = _this._tabControl.selectedItem.title; _this._snapshotAnalysisView.onTabChanged(); _this.updateNavigationFrames(); }; this._snapshotDataNavigation.appendChild(this._tabControl); Plugin.VS.Internal.CodeMarkers.fire(23589 /* perfBrowserTools_MemoryAnalyzerViewLoaded */); this.updateNavigationFrames(); } else { this._snapshotDataNavigation.rootElement.classList.add("snapshotDataNavigationHidden"); this.showProgress(true); MemoryAnalyzer.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.navigationId); } }; SnapshotView.prototype.showProgress = function (show) { if (show) { this._snapshotProcessingProgressDiv.classList.remove("snapshotProcessingProgressDivHidden"); } else { this._snapshotProcessingProgressDiv.classList.add("snapshotProcessingProgressDivHidden"); } }; SnapshotView.prototype.updateNavigationFrames = function () { var _this = this; MemoryAnalyzer.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.navigationId, [ Common.NavigationUtilities.makeNavigationFrameFromTarget(this._tabControl.rootElement, this.currentDataViewTab.header.rootElement), Common.NavigationUtilities.makeNavigationFrameFromCallback(this.currentDataView.navigationContainer, function () { if (_this.currentDataView.navigationContainer.style.display !== "none") { return _this.currentDataView.navigationTarget; } return null; }) ]); }; return SnapshotView; })(Common.Controls.Legacy.TemplateControl); MemoryAnalyzer.SnapshotView = SnapshotView; var SnapshotAnalysisView = (function (_super) { __extends(SnapshotAnalysisView, _super); function SnapshotAnalysisView(controller, model) { _super.call(this, "MemoryAnalyzer.analysisBarTemplate"); this._controller = controller; this.model = model; this.model.displayObjectIDs = MemoryAnalyzer.Program.userSettings.displayObjectIDs; this.model.foldObjectsByDominator = MemoryAnalyzer.Program.userSettings.foldObjectsByDominator; this.model.showBuiltIns = MemoryAnalyzer.Program.userSettings.showBuiltIns; this.model.showNonMatchingReferences = MemoryAnalyzer.Program.userSettings.showNonMatchingReferences; this._filterInput = this.getNamedControl("filterInput"); } SnapshotAnalysisView.prototype.setupSettingsMenu = function () { if (this.model.snapshot && !this._settingsMenu) { var settingsMenuButton = this.getNamedControl("settingsMenuButton"); this._settingsMenu = new Common.Controls.MenuControl(); this._settingsMenu.menuItemsTemplateId = "MemoryAnalyzer.settingsDropDownMenu"; this._settingsMenu.targetButtonElement = settingsMenuButton.rootElement; this._settingsMenu.dismissOnTargetButtonClick = true; this.model.isDiff = this.model.snapshot.isDiff; this._settingsMenu.model = this.model; this.rootElement.appendChild(this._settingsMenu.rootElement); } }; SnapshotAnalysisView.prototype.onTabChanged = function () { var currentViewController = this._controller.currentDataViewController; if (currentViewController) { this.model.dataTabModel = currentViewController.dataViewModel; } }; return SnapshotAnalysisView; })(Common.TemplateControl); MemoryAnalyzer.SnapshotAnalysisView = SnapshotAnalysisView; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // summaryTab.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SummaryTab = (function (_super) { __extends(SummaryTab, _super); function SummaryTab(summaryViewController) { _super.call(this); this._summaryViewController = summaryViewController; this.title = Plugin.Resources.getString("Summary").toLocaleUpperCase(); this.tooltipString = Plugin.Resources.getString("SummaryTabTooltip"); this.content = summaryViewController.view; } SummaryTab.prototype.onActiveChanged = function () { if (this.active) { MemoryAnalyzer.NavigationHelpers.switchNavigationView(this._summaryViewController.navigationId); } }; return SummaryTab; })(MemoryAnalyzer.Controls.TabItem); MemoryAnalyzer.SummaryTab = SummaryTab; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // summaryView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var SummaryViewController = (function () { function SummaryViewController(memoryAnalyzer, storageId, isOffline) { this._screenshotHeight = 150; this._screenshotKeepAspectRatio = true; this._screenshotWidth = 200; this._memoryAnalyzer = memoryAnalyzer; this._storageId = storageId; this._navigationId = MemoryAnalyzer.NavigationHelpers.getNextId(); this.model = new SummaryViewModel(isOffline); this.view = new SummaryView(this, this.model); } Object.defineProperty(SummaryViewController.prototype, "navigationId", { get: function () { return this._navigationId; }, enumerable: true, configurable: true }); SummaryViewController.prototype.giveFeedback = function () { MemoryAnalyzer.Program.internalFeedback.isEnabled().done(function (enabled) { if (enabled) { MemoryAnalyzer.Program.shell.save(false).done(function (fileLocation) { MemoryAnalyzer.Program.internalFeedback.sendData(true, "", "", "", "", fileLocation); }); } }); }; SummaryViewController.prototype.loadExistingSnapshots = function () { var _this = this; var fileExtension = ".snapjs" + MemoryAnalyzer.SnapshotSummary.fileExtension; var snapshotSummaries = []; var snapshotCount = 0; Plugin.Storage.getFileList(this._storageId, 1 /* temporary */).done(function (files) { files = files.filter(function (file) { return file.slice(-fileExtension.length) === fileExtension; }); for (var i = 0; i < files.length; i++) { MemoryAnalyzer.SnapshotSummary.load(_this._storageId, files[i], function (snapshotNumber, snapshotSummary) { snapshotSummaries.push(snapshotSummary); snapshotCount++; if (snapshotCount === files.length) { snapshotSummaries = snapshotSummaries.sort(function (a, b) { return a.id - b.id; }); for (var snapshot = 0; snapshot < snapshotSummaries.length; snapshot++) { this.model.snapshotSummaryCollection.push(snapshotSummaries[snapshot]); } } }.bind(_this, i), _this.onSnapshotFailed.bind(_this)); } Plugin.VS.Internal.CodeMarkers.fire(23589 /* perfBrowserTools_MemoryAnalyzerViewLoaded */); MemoryAnalyzer.Program.onIdle(); }, this.onSnapshotFailed.bind(this)); }; SummaryViewController.prototype.save = function () { if (this.model.snapshotSummaryCollection.length > 0) { return MemoryAnalyzer.Program.shell.save(true); } return Plugin.Promise.as(null); }; SummaryViewController.prototype.startGraphCollectorSession = function () { var _this = this; if (!MemoryAnalyzer.Program.shell.isGraphCollectionSupported) { return; } if (!this._graphCollectorSession) { this.model.isStarting = true; MemoryAnalyzer.Program.shell.startGraphCollection().done(function (newSession) { _this._graphCollectorSession = newSession; _this.model.graphCollectorSession = newSession; _this.view.startGraph(); _this.model.isStarting = false; _this.model.isOffline = false; }, function (err) { _this.model.isStarting = false; MemoryAnalyzer.Program.reportError(err, Plugin.Resources.getErrorString("JSPerf.1064")); }); } }; SummaryViewController.prototype.stopGraphCollectorSession = function () { var _this = this; if (this._graphCollectorSession) { this.model.isStopping = true; this.view.stopGraph(); this._graphCollectorSession.stop().done(function () { _this._graphCollectorSession = null; if (_this.model.snapshotSummaryCollection.length === 0) { _this.view.removeExistingGraph(); } _this.model.isStopping = false; _this.model.isOffline = true; }, function (err) { _this.model.isStopping = false; }); } }; SummaryViewController.prototype.takeSnapshot = function () { var _this = this; if (!this.model.isTakeSnapshotEnabled) { return; } this.model.isTakingSnapshot = true; MemoryAnalyzer.Program.traceWriter.raiseEvent(201 /* Memory_TakeSnapshot_Start */); MemoryAnalyzer.Program.shell.createSnapshot().done(function (fileAndPath) { var args = [SummaryViewController._snapshotChunkSize, _this._screenshotWidth, _this._screenshotHeight, _this._screenshotKeepAspectRatio]; var takeSnapshotCommand = new MemoryAnalyzer.TakeSnapshotCommand(args, fileAndPath.file); takeSnapshotCommand.completedHandler = function () { var previousSnapshotPath; if (_this.model.snapshotSummaryCollection.length > 0) { var snapshotSummary = _this.model.snapshotSummaryCollection.getItem(_this.model.snapshotSummaryCollection.length - 1); if (snapshotSummary) { previousSnapshotPath = snapshotSummary.snapshotFile.relativePath; } } return fileAndPath.file.close().done(function () { return _this.onSnapshotResult(fileAndPath.relativePath, previousSnapshotPath); }); }; takeSnapshotCommand.errorHandler = function (error) { return fileAndPath.file.close().done(function () { return _this.onSnapshotFailed(error); }); }; _this._memoryAnalyzer.callProxy(takeSnapshotCommand); }, this.onSnapshotFailed.bind(this)); }; SummaryViewController.prototype.cancelPendingSnapshots = function () { if (this._snapshotSummaryPromise) { this._snapshotSummaryPromise.cancel(); this._snapshotSummaryPromise = null; } }; SummaryViewController.prototype.viewSnapshot = function (snapshotId, target, sortProperty) { var foundSnapshotSummary = this.getSnapshotSummary(snapshotId); if (foundSnapshotSummary) { MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(205 /* Memory_ViewSnapshot_Start */, snapshotId); this._memoryAnalyzer.showSnapshotTab(foundSnapshotSummary.snapshotFile.relativePath, target, Plugin.Resources.getString("SnapshotNumber", foundSnapshotSummary.id), sortProperty).done(function () { MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(206 /* Memory_ViewSnapshot_Stop */, snapshotId); }); } }; SummaryViewController.prototype.compareSnapshots = function (lastSnapshotId, firstSnapshotId, target, sortProperty) { var traceEventKey = lastSnapshotId * 1000000 + firstSnapshotId; MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(203 /* Memory_CompareSnapshot_Start */, traceEventKey); if (lastSnapshotId < firstSnapshotId) { var tempId = lastSnapshotId; lastSnapshotId = firstSnapshotId; firstSnapshotId = tempId; } var snapshotsInfo = []; var lastSnapshotInfo = this.getSnapshotSummary(lastSnapshotId); var firstSnapshotInfo = this.getSnapshotSummary(firstSnapshotId); if (lastSnapshotInfo && firstSnapshotInfo) { for (var i = 0; i < this.model.snapshotSummaryCollection.length; i++) { var s = this.model.snapshotSummaryCollection.getItem(i); if (s.taken >= firstSnapshotInfo.taken && s.taken <= lastSnapshotInfo.taken) { snapshotsInfo.push(s); } } snapshotsInfo = snapshotsInfo.sort(function (a, b) { return a.taken - b.taken; }); } var snapshotFiles = []; for (var i = 0; i < snapshotsInfo.length; i++) { snapshotFiles.push(snapshotsInfo[i].snapshotFile.relativePath); } this._memoryAnalyzer.showDiffSnapshotTab(snapshotFiles, target, Plugin.Resources.getString("SnapshotNumberDiff", lastSnapshotId, firstSnapshotId), firstSnapshotId, lastSnapshotId, sortProperty).done(function () { MemoryAnalyzer.Program.traceWriter.raiseEventWithKey(204 /* Memory_CompareSnapshot_Stop */, traceEventKey); }); }; SummaryViewController.prototype.setScreenshotSize = function (targetWidth, targetHeight, keepAspectRatio) { this._screenshotWidth = targetWidth; this._screenshotHeight = targetHeight; this._screenshotKeepAspectRatio = keepAspectRatio; }; SummaryViewController.prototype.createTileView = function (snapshotSummary) { var model = new MemoryAnalyzer.SnapshotTileViewModel(snapshotSummary, this.model.snapshotSummaryCollection); var view = new MemoryAnalyzer.SnapshotTileView(this, model); return view; }; SummaryViewController.prototype.reset = function () { SummaryViewController._nextIdentifier = 0; this.model.snapshotSummaryCollection.clear(); MemoryAnalyzer.Program.onIdle(); }; SummaryViewController.prototype.removeExistingGraph = function () { this.view.removeExistingGraph(); }; SummaryViewController.prototype.getSnapshotSummary = function (snapshotId) { var foundSnapshotSummary = null; for (var i = 0; i < this.model.snapshotSummaryCollection.length; i++) { var snapshotSummary = this.model.snapshotSummaryCollection.getItem(i); if (snapshotSummary.id === snapshotId) { foundSnapshotSummary = snapshotSummary; break; } } return foundSnapshotSummary; }; SummaryViewController.prototype.onSnapshotResult = function (relativePath, prevSnapshotRelativePath) { var _this = this; var timeTaken = new Date().getTime(); var snapshotPath = MemoryAnalyzer.Program.shell.getSnapshotFullPath(this._storageId, relativePath); var prevSnapshotPath; if (prevSnapshotRelativePath) { prevSnapshotPath = MemoryAnalyzer.Program.shell.getSnapshotFullPath(this._storageId, prevSnapshotRelativePath); } this._snapshotSummaryPromise = MemoryAnalyzer.Program.memoryAnalyzerData.processSnapshotSummary(snapshotPath, prevSnapshotPath).then(function (snapshotSummary) { _this._snapshotSummaryPromise = null; _this.onSnapshotCompleted(relativePath, snapshotSummary, timeTaken); }, function (err) { _this._snapshotSummaryPromise = null; _this.onSnapshotFailed(err); }); }; SummaryViewController.prototype.onSnapshotCompleted = function (relativePath, snapshotSummary, timeTaken) { if (!snapshotSummary) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1014")); } var id = ++SummaryViewController._nextIdentifier; var summary = new MemoryAnalyzer.SnapshotSummary(snapshotSummary, new MemoryAnalyzer.SnapshotFile(this._storageId, relativePath), timeTaken, id); this.model.snapshotSummaryCollection.push(summary); this.model.isTakingSnapshot = false; if (window.console && window.console.log) { window.console.log("Snapshot taken: " + summary.objectsCount + " objects."); } summary.save(function () { Notifications.notify(MemoryAnalyzer.MemoryNotifications.OnSnapshotProcessingCompleted, summary); Plugin.VS.Internal.CodeMarkers.fire(23590 /* perfBrowserTools_MemoryAnalyzerIdle */); MemoryAnalyzer.Program.traceWriter.raiseEvent(202 /* Memory_TakeSnapshot_Stop */); }, this.onSnapshotFailed.bind(this)); }; SummaryViewController.prototype.onSnapshotFailed = function (error) { if (!error) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1015")); } error.message = Plugin.Resources.getString("SnapshotCreationFailed", error.message); this.model.latestSnapshotError = error; this.model.isTakingSnapshot = false; MemoryAnalyzer.Program.onIdle(); }; SummaryViewController._nextIdentifier = 0; SummaryViewController._snapshotChunkSize = 32768; return SummaryViewController; })(); MemoryAnalyzer.SummaryViewController = SummaryViewController; var SummaryViewModel = (function (_super) { __extends(SummaryViewModel, _super); function SummaryViewModel(isOffline) { _super.call(this); this.isOffline = isOffline; this._snapshotSummaryCollection = new Common.ObservableCollection(); this._snapshotSummaryCollection.propertyChanged.addHandler(this.onPropertyChanged.bind(this)); this.propertyChanged.addHandler(this.onPropertyChanged.bind(this)); } Object.defineProperty(SummaryViewModel.prototype, "isOpenSessionEnabled", { get: function () { return MemoryAnalyzer.Program.packager !== null; }, enumerable: true, configurable: true }); Object.defineProperty(SummaryViewModel.prototype, "isSaveSessionEnabled", { get: function () { return this._snapshotSummaryCollection.length > 0 && MemoryAnalyzer.Program.packager !== null; }, enumerable: true, configurable: true }); Object.defineProperty(SummaryViewModel.prototype, "isStartEnabled", { get: function () { return !this.isStarting && this.isOffline && this.isTargetCompatible && this.isAttached && this.isRunning; }, enumerable: true, configurable: true }); Object.defineProperty(SummaryViewModel.prototype, "isStopEnabled", { get: function () { return !this.isStopping && !this.isOffline && this.isAttached && this.isRunning; }, enumerable: true, configurable: true }); Object.defineProperty(SummaryViewModel.prototype, "isTakeSnapshotEnabled", { get: function () { return !this.isOffline && this.isAttached && this.isRunning && !this.isTakingSnapshot && this.isTargetCompatible; }, enumerable: true, configurable: true }); Object.defineProperty(SummaryViewModel.prototype, "snapshotSummaryCollection", { get: function () { return this._snapshotSummaryCollection; }, enumerable: true, configurable: true }); SummaryViewModel.initialize = function () { Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.IsAttachedPropertyName, false); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.IsOfflinePropertyName, true, function (obj) { obj.onIsOfflineChanged(); }); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.IsRunningPropertyName, true); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.IsStartingPropertyName, false); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.IsStartProfilingPromptVisiblePropertyName, true); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.IsStoppingPropertyName, false); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.IsTakingSnapshotPropertyName, false); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.IsTargetCompatiblePropertyName, true); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.WarningMessagePropertyName, ""); Common.ObservableHelpers.defineProperty(SummaryViewModel, SummaryViewModel.LatestSnapshotErrorPropertyName, null); }; SummaryViewModel.prototype.getGraphUpdates = function (updateCallback) { this.graphCollectorSession.getGraphDataUpdate("Heap").done(function (data) { if (!data || data.length === 0) { return; } var newPoints = []; var hubJsonTimestamp = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromNumber(data[0].timestamp); newPoints.push({ TimestampH: hubJsonTimestamp.jsonValue.h, TimestampL: hubJsonTimestamp.jsonValue.l, Value: data[0].value, ToolTip: null, CustomData: null }); var updatedSeries = [{ DataSource: { CounterId: SummaryView.PrivateBytesCounterId }, NewPoints: newPoints }]; var updateEventArgs = { TimestampH: hubJsonTimestamp.jsonValue.h, TimestampL: hubJsonTimestamp.jsonValue.l, UpdatedSeries: updatedSeries }; updateCallback(updateEventArgs); }, function (err) { MemoryAnalyzer.Program.reportError(err, Plugin.Resources.getErrorString("JSPerf.1062")); }); this.graphCollectorSession.getGraphDataUpdate("performancemark").done(function (data) { if (!data || data.length === 0) { return; } var newPoints = []; var maxTimestamp = data[0].timestamp; for (var i = 0; i < data.length; i++) { maxTimestamp = Math.max(maxTimestamp, data[i].timestamp); var hubJsonTimestamp = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromNumber(data[i].timestamp); newPoints.push({ TimestampH: hubJsonTimestamp.jsonValue.h, TimestampL: hubJsonTimestamp.jsonValue.l, Value: data[i].value, ToolTip: data[i].toolTip, CustomData: null }); } var hubJsonMaxTimestamp = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromNumber(maxTimestamp); var updatedSeries = [{ DataSource: { CounterId: SummaryView.ProfilerMarkCounterId }, NewPoints: newPoints }]; var updateEventArgs = { TimestampH: hubJsonMaxTimestamp.jsonValue.h, TimestampL: hubJsonMaxTimestamp.jsonValue.l, UpdatedSeries: updatedSeries }; updateCallback(updateEventArgs); }, function (err) { MemoryAnalyzer.Program.reportError(err, Plugin.Resources.getErrorString("JSPerf.1063")); }); }; SummaryViewModel.prototype.onIsOfflineChanged = function () { if (this.isOffline) { this.isTakingSnapshot = false; } }; SummaryViewModel.prototype.onPropertyChanged = function (propertyName) { switch (propertyName) { case SummaryViewModel.IsAttachedPropertyName: case SummaryViewModel.IsOfflinePropertyName: case SummaryViewModel.IsRunningPropertyName: case SummaryViewModel.IsStartingPropertyName: case SummaryViewModel.IsTargetCompatiblePropertyName: this.propertyChanged.invoke(SummaryViewModel.StartProfilingEnabledPropertyName); break; } switch (propertyName) { case SummaryViewModel.IsAttachedPropertyName: case SummaryViewModel.IsOfflinePropertyName: case SummaryViewModel.IsRunningPropertyName: case SummaryViewModel.IsStoppingPropertyName: this.propertyChanged.invoke(SummaryViewModel.StopProfilingEnabledPropertyName); break; } switch (propertyName) { case Common.ObservableCollection.LengthProperty: this.propertyChanged.invoke(SummaryViewModel.SaveSessionEnabledPropertyName); break; } switch (propertyName) { case SummaryViewModel.IsAttachedPropertyName: case SummaryViewModel.IsOfflinePropertyName: case SummaryViewModel.IsRunningPropertyName: case SummaryViewModel.IsTakingSnapshotPropertyName: case SummaryViewModel.IsTargetCompatiblePropertyName: this.propertyChanged.invoke(SummaryViewModel.TakeSnapshotEnabledPropertyName); break; } }; SummaryViewModel.IsAttachedPropertyName = "isAttached"; SummaryViewModel.IsOfflinePropertyName = "isOffline"; SummaryViewModel.IsRunningPropertyName = "isRunning"; SummaryViewModel.IsStartingPropertyName = "isStarting"; SummaryViewModel.IsStartProfilingPromptVisiblePropertyName = "isStartProfilingPromptVisible"; SummaryViewModel.IsStoppingPropertyName = "isStopping"; SummaryViewModel.IsTakingSnapshotPropertyName = "isTakingSnapshot"; SummaryViewModel.IsTargetCompatiblePropertyName = "isTargetCompatible"; SummaryViewModel.LatestSnapshotErrorPropertyName = "latestSnapshotError"; SummaryViewModel.OpenSessionEnabledPropertyName = "isOpenSessionEnabled"; SummaryViewModel.SaveSessionEnabledPropertyName = "isSaveSessionEnabled"; SummaryViewModel.StartProfilingEnabledPropertyName = "isStartEnabled"; SummaryViewModel.StopProfilingEnabledPropertyName = "isStopEnabled"; SummaryViewModel.TakeSnapshotEnabledPropertyName = "isTakeSnapshotEnabled"; SummaryViewModel.WarningMessagePropertyName = "warningMessage"; return SummaryViewModel; })(Common.Observable); MemoryAnalyzer.SummaryViewModel = SummaryViewModel; SummaryViewModel.initialize(); var SummaryView = (function (_super) { __extends(SummaryView, _super); function SummaryView(controller, model) { var _this = this; _super.call(this, "SummaryTabTemplate"); this._graphUpdateDelayMilliseconds = 100; this._screenshotWidth = 280; this._screenshotHeight = 160; this._screenshotKeepAspectRatio = true; this._controller = controller; this._model = model; this._model.propertyChanged.addHandler(this.onPropertyChanged.bind(this)); this._model.snapshotSummaryCollection.collectionChanged.addHandler(this.onCollectionChanged.bind(this)); this._heapGraphContainer = this.findElement("heapOverviewGraph"); this._tilesContainer = this.findElement("tilesContainer"); this._warningSection = this.findElement("warningSection"); this._onSnapshotClickHandler = this.onSnapshotClick.bind(this); var giveFeedbackButton = this.findElement("giveFeedbackButton_Summary"); giveFeedbackButton.classList.add("hidden"); MemoryAnalyzer.Program.internalFeedback.isEnabled().done(function (isEnabled) { if (isEnabled) { giveFeedbackButton.classList.remove("hidden"); giveFeedbackButton.addEventListener("click", _this.onGiveFeedbackClick.bind(_this)); } }); this._takeSnapshotTile = this.findElement("takeSnapshotTile"); this._snapshotError = this.findElement("snapshotError"); this._snapshotErrorMsg = this.findElement("snapshotErrorMsg"); this._snapshotProgress = this.findElement("takeSnapshotProgress"); this._snapshotTile = this.findElement("takeSnapshotButton"); this._snapshotLabel = this.findElement("takeSnapshotLabel"); this._snapshotIcon = this.findElement("takeSnapshotIcon"); var snapshotLabel = Plugin.Resources.getString("TakeSnapshot"); if (MemoryAnalyzer.Program.hostType === 1 /* F12 */) { snapshotLabel += "
          " + Plugin.Resources.getString("TakeSnapshotShortcut"); } this._snapshotLabel.innerHTML = snapshotLabel; this._snapshotProgress.innerText = Plugin.Resources.getString("Loading"); this.toggleProgress(this._model.isTakingSnapshot); this.toggleAttached(this._model.isAttached); this.updateTakeSnapshotTile(); this._snapshotTile.addEventListener("click", this._onSnapshotClickHandler); if (this._model.isOffline) { this._takeSnapshotTile.style.display = "none"; } else { this.updateNavigationTarget(this._snapshotTile); } this._controller.setScreenshotSize(this._screenshotWidth, this._screenshotHeight, this._screenshotKeepAspectRatio); } SummaryView.prototype.refreshGraph = function () { if (this._graphRenderer) { this._graphRenderer.refresh(); } }; SummaryView.prototype.removeExistingGraph = function () { if (this._graphRenderer) { this._graphRenderer.deinitialize(); this._graphRenderer = null; } this._heapGraphContainer.innerHTML = ""; this._heapGraphContainer.style.display = "none"; }; SummaryView.prototype.startGraph = function () { var _this = this; var qpcStartTime = Plugin.F12.getQpcTime(); var qpcFrequency = Plugin.F12.getQpcFrequency(); this.removeExistingGraph(); var jsonConfig = { Series: [{ SeriesType: "Line", Legend: Plugin.Resources.getString("HubGraphHeapLegend"), DataSource: { CounterId: SummaryView.PrivateBytesCounterId } }], MinValue: 0, MaxValue: 100, Unit: "", Units: [ { Unit: Plugin.Resources.getString("ByteUnits"), FromValue: Number.MIN_VALUE, ToValue: 1023, Divider: 1, Decimals: 1 }, { Unit: Plugin.Resources.getString("KilobyteUnits"), FromValue: Number.MIN_VALUE, ToValue: 1048575, Divider: 1024, Decimals: 1 }, { Unit: Plugin.Resources.getString("MegabyteUnits"), FromValue: Number.MIN_VALUE, ToValue: 1073741823, Divider: 1048576, Decimals: 1 }, { Unit: Plugin.Resources.getString("GigabyteUnits"), FromValue: Number.MIN_VALUE, ToValue: Number.MAX_VALUE, Divider: 1073741824, Decimals: 1 }], Axes: null }; var markJsonConfig = { View: "Ruler", Series: [{ SeriesType: "Mark", MarkType: 2, Legend: "", DataSource: { CounterId: SummaryView.ProfilerMarkCounterId } }], MinValue: undefined, MaxValue: undefined, Unit: undefined, Units: undefined, Axes: undefined }; var liveGraphConfig = { Title: Plugin.Resources.getString("GraphTitle"), Description: Plugin.Resources.getString("GraphTitle") + ", " + Plugin.Resources.getString("HubGraphHeapLegend"), JsonConfiguration: JSON.stringify(jsonConfig) }; var markConfig = { JsonConfiguration: JSON.stringify(markJsonConfig) }; var hubJsonCollectionStartTimestamp = Microsoft.VisualStudio.DiagnosticsHub.BigNumber.convertFromNumber(qpcStartTime); var liveConfig = { GraphConfigurations: [liveGraphConfig, markConfig], WindowsZoomLevel: { X: 1, Y: 1 }, QpcTimeProperties: { CollectionStartTimeH: hubJsonCollectionStartTimestamp.jsonValue.h, CollectionStartTimeL: hubJsonCollectionStartTimestamp.jsonValue.l, Frequency: qpcFrequency } }; var dataManager = { getConfigurations: function (configCallback) { configCallback(liveConfig); }, dataUpdate: function (dataUpdateCallback) { _this._graphUpdateIntervalId = window.setInterval(function () { return _this._model.getGraphUpdates(dataUpdateCallback); }, _this._graphUpdateDelayMilliseconds); } }; var rendererArgs = { swimlane: { leftScale: { isVisible: true, width: 40 }, rightScale: { isVisible: true, width: 40 }, graph: { height: 88 }, minSelectionWidthInPixels: 10, isSelectionEnabled: false, isZoomEnabled: false }, isToolbarRequired: false, dataManager: dataManager, containerId: this._heapGraphContainer.id }; this._graphRenderer = new Microsoft.VisualStudio.DiagnosticsHub.LiveRenderer(rendererArgs); this._graphRenderer.execute(); this._heapGraphContainer.style.display = "-ms-grid"; }; SummaryView.prototype.stopGraph = function () { window.clearInterval(this._graphUpdateIntervalId); }; SummaryView.prototype.onPropertyChanged = function (propertyName) { switch (propertyName) { case SummaryViewModel.WarningMessagePropertyName: this.showWarningMessage(this._model.warningMessage); break; case SummaryViewModel.LatestSnapshotErrorPropertyName: this.showSnapshotError(this._model.latestSnapshotError); break; case SummaryViewModel.IsTakingSnapshotPropertyName: this.toggleProgress(this._model.isTakingSnapshot); this.updateTakeSnapshotTile(); break; case SummaryViewModel.IsAttachedPropertyName: case SummaryViewModel.IsTargetCompatiblePropertyName: this.toggleAttached(this._model.isAttached); this.updateTakeSnapshotTile(); break; case SummaryViewModel.IsRunningPropertyName: this.toggleRunning(this._model.isOffline, this._model.isAttached, this._model.isRunning); this.updateTakeSnapshotTile(); break; case SummaryViewModel.IsOfflinePropertyName: this.toggleOffline(this._model.isOffline, this._model.isAttached, this._model.isRunning); this.updateTakeSnapshotTile(); break; } }; SummaryView.prototype.onCollectionChanged = function (eventArgs) { switch (eventArgs.action) { case 0 /* Add */: this.createTile(eventArgs.newItems[0]); break; case 3 /* Clear */: this.removeSnapshotTiles(); break; } }; SummaryView.prototype.onGiveFeedbackClick = function (e) { this._controller.giveFeedback(); }; SummaryView.prototype.createTile = function (snapshotSummary) { var newTile = this._controller.createTileView(snapshotSummary); this._tilesContainer.insertBefore(newTile.rootElement, this._takeSnapshotTile); newTile.rootElement.scrollIntoView(true); newTile.setFocus(); this.updateNavigationTarget(newTile.navigationElement); }; SummaryView.prototype.removeSnapshotTiles = function () { while (this._tilesContainer.hasChildNodes()) { this._tilesContainer.removeChild(this._tilesContainer.firstChild); } this._tilesContainer.appendChild(this._takeSnapshotTile); this.updateNavigationTarget(this._snapshotTile); }; SummaryView.prototype.toggleAttached = function (isAttached) { if (!isAttached) { this._controller.cancelPendingSnapshots(); } }; SummaryView.prototype.toggleOffline = function (isOffline, isAttached, isRunning) { this._takeSnapshotTile.style.display = isOffline ? "none" : "block"; }; SummaryView.prototype.toggleProgress = function (show) { if (this._snapshotProgress && this._snapshotError) { if (show) { this._snapshotLabel.style.display = "none"; this._snapshotIcon.style.display = "none"; this._snapshotProgress.style.display = "block"; this._snapshotError.style.display = "none"; this._snapshotTile.setAttribute("aria-label", Plugin.Resources.getString("Loading")); } else { this._snapshotLabel.style.display = ""; this._snapshotIcon.style.display = ""; this._snapshotProgress.style.display = "none"; this._snapshotTile.setAttribute("aria-label", Plugin.Resources.getString("TakeSnapshot")); } } }; SummaryView.prototype.toggleRunning = function (isOffline, isAttached, isRunning) { if (!isOffline && isAttached && isRunning) { this._controller.startGraphCollectorSession(); } else { this._controller.stopGraphCollectorSession(); } }; SummaryView.prototype.showSnapshotError = function (error) { if (this._snapshotErrorMsg && this._snapshotError) { if (error) { this._snapshotErrorMsg.innerText = MemoryAnalyzer.ErrorFormatter.format(error); this._snapshotError.style.display = "block"; } else { this._snapshotErrorMsg.innerText = ""; this._snapshotError.style.display = "none"; } } }; SummaryView.prototype.showWarningMessage = function (warning) { if (!this._warningSection) { return; } if (warning) { this._warningSection.innerHTML = warning; this._warningSection.style.display = "inline"; } else { this._warningSection.innerHTML = ""; this._warningSection.style.display = "none"; } }; SummaryView.prototype.onSnapshotClick = function (e) { this._controller.takeSnapshot(); }; SummaryView.prototype.updateTakeSnapshotTile = function () { if (this._snapshotTile) { if (this._model.isTakeSnapshotEnabled) { this._snapshotTile.classList.remove("disabled"); this._snapshotTile.disabled = false; } else { if (!this._model.isTakingSnapshot) { this._snapshotTile.classList.add("disabled"); } this._snapshotTile.disabled = true; } } }; SummaryView.prototype.updateNavigationTarget = function (target) { var _this = this; MemoryAnalyzer.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.navigationId, [ Common.NavigationUtilities.makeNavigationFrameFromCallback(this._tilesContainer, function () { if (target === _this._snapshotTile && _this._snapshotProgress.style.display !== "none") { return null; } return target; }) ]); }; SummaryView.PrivateBytesCounterId = "PrivateBytes"; SummaryView.ProfilerMarkCounterId = "performancemark"; return SummaryView; })(Common.Controls.Legacy.TemplateControl); MemoryAnalyzer.SummaryView = SummaryView; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // CodeMarkerValues.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (CodeMarkerValues) { CodeMarkerValues[CodeMarkerValues["perfBrowserTools_MemoryAnalyzerViewLoaded"] = 23589] = "perfBrowserTools_MemoryAnalyzerViewLoaded"; CodeMarkerValues[CodeMarkerValues["perfBrowserTools_MemoryAnalyzerIdle"] = 23590] = "perfBrowserTools_MemoryAnalyzerIdle"; CodeMarkerValues[CodeMarkerValues["perfBrowserTools_MemoryAnalyzerWindowClose"] = 23591] = "perfBrowserTools_MemoryAnalyzerWindowClose"; CodeMarkerValues[CodeMarkerValues["perfBrowserTools_MemoryAnalyzerSessionEnd"] = 23592] = "perfBrowserTools_MemoryAnalyzerSessionEnd"; })(MemoryAnalyzer.CodeMarkerValues || (MemoryAnalyzer.CodeMarkerValues = {})); var CodeMarkerValues = MemoryAnalyzer.CodeMarkerValues; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // memoryNotifications.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var MemoryNotifications = (function () { function MemoryNotifications() { } MemoryNotifications.DetailsViewRowSelected = "MemoryNotifications.DetailsViewRowSelected"; MemoryNotifications.Idle = "MemoryNotifications.Idle"; MemoryNotifications.OnSnapshotProcessingCompleted = "MemoryNotifications.OnSnapshotProcessingCompleted"; MemoryNotifications.SessionEnd = "MemoryNotifications.SessionEnd"; MemoryNotifications.SessionLoadCompleted = "MemoryNotifications.SessionLoadCompleted"; MemoryNotifications.SessionSaveCompleted = "MemoryNotifications.SessionSaveCompleted"; MemoryNotifications.SnapshotDataViewReady = "MemoryNotifications.SnapshotDataViewReady"; MemoryNotifications.WindowClose = "MemoryNotifications.WindowClose"; return MemoryNotifications; })(); MemoryAnalyzer.MemoryNotifications = MemoryNotifications; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // diagnosticsToolWindow.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var DiagnosticsToolWindowController = (function () { function DiagnosticsToolWindowController(isOffline, diagSession) { var _this = this; this._callbacks = {}; this._pendingMessages = []; this._pendingTimeout = null; this._listeningToMessages = true; this._diagnosticSession = diagSession; if (!isOffline) { this.DiagnosticSession.addEventListener("break", this.onBreakCallback.bind(this)); this.DiagnosticSession.addEventListener("run", this.onRunCallback.bind(this)); this.DiagnosticSession.addEventListener("detach", this.onDetachCallback.bind(this)); this.DiagnosticSession.addEventListener("connect", this.onConnectCallback.bind(this)); this.DiagnosticSession.addEventListener("attach", this.onAttachCallback.bind(this)); window.setImmediate(function () { if (!_this._isAttached) { _this.DiagnosticSession.isAttached().done(function (isAttached) { if (isAttached) { _this.onAttachCallback(); } else { _this.showWarning(Plugin.Resources.getString("WarningNotAttached")); } }, function (err) { _this.showWarning(Plugin.Resources.getString("WarningNotAttached")); }); } }); } } Object.defineProperty(DiagnosticsToolWindowController.prototype, "DiagnosticSession", { get: function () { return this._diagnosticSession; }, enumerable: true, configurable: true }); DiagnosticsToolWindowController.prototype.onAttach = function () { }; DiagnosticsToolWindowController.prototype.onDetach = function () { }; DiagnosticsToolWindowController.prototype.onBreak = function () { }; DiagnosticsToolWindowController.prototype.onRun = function () { }; DiagnosticsToolWindowController.prototype.onConnect = function (port) { }; DiagnosticsToolWindowController.prototype.onMessage = function (data) { }; DiagnosticsToolWindowController.prototype.onHandshake = function (connectionInfo) { }; DiagnosticsToolWindowController.prototype.showWarning = function (message) { }; DiagnosticsToolWindowController.prototype.callProxy = function (command) { var _this = this; var uidString = DiagnosticsToolWindowController.getUid(); if (command.executedHandler) { this._callbacks[uidString] = { command: command, callback: command.executedHandler, deleteAfterCallback: true }; } var newArgs = []; if (command.args) { for (var i = 0; i < command.args.length; i++) { var arg = command.args[i]; newArgs.push(arg); } } if (command.dataReceivedHandler) { var callbackUid = DiagnosticsToolWindowController.getUid(); this._callbacks[callbackUid] = { command: command, callback: command.dataReceivedHandler, deleteAfterCallback: false }; newArgs.push({ uid: callbackUid, type: "callback" }); } var jsonObj = { uid: uidString, command: command.name, args: newArgs }; var sendMessageToRemote = function (message) { if (_this._remotePort) { _this._remotePort.postMessage(message); } }; this._pendingMessages.push(jsonObj); if (!this._pendingTimeout) { this._pendingTimeout = window.setImmediate(function () { var message = JSON.stringify(_this._pendingMessages); _this._pendingMessages = []; _this._pendingTimeout = null; sendMessageToRemote(message); }); } }; DiagnosticsToolWindowController.prototype.startListeningToMessages = function () { this._listeningToMessages = true; }; DiagnosticsToolWindowController.prototype.stopListeningToMessages = function () { this._listeningToMessages = false; }; DiagnosticsToolWindowController.getUid = function () { return "uid" + (DiagnosticsToolWindowController._uid++).toString(36); }; DiagnosticsToolWindowController.prototype.fireCallbacks = function (data) { var msgs = JSON.parse(data); for (var i = 0; i < msgs.length; i++) { var obj = msgs[i]; var callback = this._callbacks[obj.uid]; if (callback) { if (obj.args !== undefined) { callback.callback.apply(this, obj.args); } if (callback.deleteAfterCallback || callback.command.hasCompleted) { delete this._callbacks[obj.uid]; } } else if (obj.uid === "scriptError") { Plugin.Diagnostics.reportError(obj.args[0].message, obj.args[0].file, obj.args[0].line, obj.args[0].additionalInfo); } } }; DiagnosticsToolWindowController.prototype.onAttachCallback = function () { if (!this._isAttached) { this._isAttached = true; this.showWarning(null); this.onAttach(); } }; DiagnosticsToolWindowController.prototype.onDetachCallback = function () { this._remotePort = null; this._callbacks = {}; this._pendingMessages = []; this._pendingTimeout = null; this._isAttached = false; this.showWarning(Plugin.Resources.getString("WarningNotAttached")); this.onDetach(); }; DiagnosticsToolWindowController.prototype.onBreakCallback = function () { this.onBreak(); }; DiagnosticsToolWindowController.prototype.onRunCallback = function () { this.onRun(); }; DiagnosticsToolWindowController.prototype.onMessageCallback = function (args) { var _this = this; var data = args.data; var isHandshake = this.processHandshakeMessage(data); if (this._listeningToMessages) { if (data === "DocumentNotYetReady") { window.setTimeout(function () { _this._remotePort.postMessage("InitializeDocument"); }, 100); } else if (!isHandshake) { this.fireCallbacks(data); } this.onMessage(data); } }; DiagnosticsToolWindowController.prototype.onConnectCallback = function (port) { this._remotePort = port; this._remotePort.addEventListener("message", this.onMessageCallback.bind(this)); this.onConnect(port); }; DiagnosticsToolWindowController.prototype.processHandshakeMessage = function (data) { if (data.substr(0, 10) === "Handshake:") { var connectionInfo = JSON.parse(data.substring(10)); this.onHandshake(connectionInfo); return true; } return false; }; DiagnosticsToolWindowController._uid = 0; return DiagnosticsToolWindowController; })(); MemoryAnalyzer.DiagnosticsToolWindowController = DiagnosticsToolWindowController; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // memoryAnalyzer.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var MemoryAnalyzerController = (function (_super) { __extends(MemoryAnalyzerController, _super); function MemoryAnalyzerController(sessionInfo, diagSession) { _super.call(this, sessionInfo.isOffline, diagSession); this.setSession(sessionInfo); } Object.defineProperty(MemoryAnalyzerController.prototype, "summaryViewController", { get: function () { return this._summaryViewController; }, enumerable: true, configurable: true }); Object.defineProperty(MemoryAnalyzerController.prototype, "view", { get: function () { return this._view; }, enumerable: true, configurable: true }); MemoryAnalyzerController.prototype.clearSummaryTab = function () { this._summaryViewController.reset(); }; MemoryAnalyzerController.prototype.goOffline = function () { if (!this._summaryViewController.model.isOffline) { this.stopListeningToMessages(); this._summaryViewController.stopGraphCollectorSession(); } }; MemoryAnalyzerController.prototype.goOnline = function () { if (this._summaryViewController.model.isOffline) { this.startListeningToMessages(); this._summaryViewController.startGraphCollectorSession(); } }; MemoryAnalyzerController.prototype.removeExistingGraph = function () { this._summaryViewController.removeExistingGraph(); }; MemoryAnalyzerController.prototype.setSession = function (sessionInfo) { var isOffline = sessionInfo.isOffline; var isInitialSession = !!this._summaryViewController; var isAttached; var isRunning; var isTakingSnapshot; var isTargetCompatible; if (isInitialSession) { isAttached = this._summaryViewController.model.isAttached; isRunning = this._summaryViewController.model.isRunning; isTakingSnapshot = this._summaryViewController.model.isTakingSnapshot; isTargetCompatible = this._summaryViewController.model.isTargetCompatible; } this._summaryViewController = new MemoryAnalyzer.SummaryViewController(this, sessionInfo.storageId, isOffline); if (isOffline) { this._view = new MemoryAnalyzer.SummaryTab(this.summaryViewController); this.summaryViewController.loadExistingSnapshots(); } else { this._view = new MemoryAnalyzerView(this); this.initCommands(); var hubSession = DiagnosticsHub.getCurrentSession(); if (hubSession) { hubSession.addStateChangedEventListener(this.onDiagnosticsHubStateChanged.bind(this, hubSession)); } } if (isInitialSession) { this._summaryViewController.model.isAttached = isAttached; this._summaryViewController.model.isRunning = isRunning; this._summaryViewController.model.isTakingSnapshot = isTakingSnapshot; this._summaryViewController.model.isTargetCompatible = isTargetCompatible; } }; MemoryAnalyzerController.prototype.takeSnapshot = function () { this._summaryViewController.takeSnapshot(); }; MemoryAnalyzerController.prototype.showWarning = function (message) { if (this._summaryViewController) { this._summaryViewController.model.warningMessage = message; } }; MemoryAnalyzerController.prototype.onAttach = function () { this.DiagnosticSession.loadScriptInProc("../Common/PerfRemoteHelpers.js"); this.DiagnosticSession.loadScriptInProc("Remote.js"); }; MemoryAnalyzerController.prototype.onDetach = function () { this._summaryViewController.model.isAttached = false; this.goOffline(); }; MemoryAnalyzerController.prototype.onBreak = function () { this._summaryViewController.model.isRunning = false; }; MemoryAnalyzerController.prototype.onRun = function () { this._summaryViewController.model.isRunning = true; }; MemoryAnalyzerController.prototype.onHandshake = function (connectionInfo) { this._summaryViewController.model.isAttached = true; if (connectionInfo.docMode < Common.Constants.MINIMUM_REQUIRED_DOCUMENT_MODE) { if (!this._summaryViewController.model.isOffline) { this.showWarning(MemoryAnalyzer.Program.shell.getHostSpecificString("WarningIncompatibleStandardsMode")); } this._summaryViewController.model.isTargetCompatible = false; } else { MemoryAnalyzer.Program.traceWriter.raiseEvent(211 /* Memory_ToolReady_Start */); if (!this._summaryViewController.model.isOffline) { this.showWarning(null); } this._summaryViewController.model.isTargetCompatible = true; this._summaryViewController.model.isTakingSnapshot = false; if (!this._summaryViewController.model.isOffline) { MemoryAnalyzer.Program.shell.closeAllSnapshots(); this._summaryViewController.reset(); } else if (this._summaryViewController.model.snapshotSummaryCollection.length === 0) { this._summaryViewController.reset(); MemoryAnalyzer.Program.shell.closeAllSnapshots(); MemoryAnalyzer.Program.shell.resetView(); } var command = new MemoryAnalyzer.RegisterConsoleCallbacksCommand(this.consoleNotifyCallback); this.callProxy(command); MemoryAnalyzer.Program.traceWriter.raiseEvent(212 /* Memory_ToolReady_Stop */); } }; MemoryAnalyzerController.prototype.showSnapshotTab = function (relativePath, targetView, tabName, sortProperty) { if (!relativePath) { return Plugin.Promise.as(null); } return MemoryAnalyzer.Program.shell.openSnapshot(relativePath, targetView, tabName, sortProperty); }; MemoryAnalyzerController.prototype.showDiffSnapshotTab = function (snapshotNames, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty) { if (!snapshotNames || snapshotNames.length < 2) { return Plugin.Promise.as(null); } return MemoryAnalyzer.Program.shell.openSnapshotDiff(snapshotNames, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty); }; MemoryAnalyzerController.prototype.updateCommandState = function () { if (Plugin.VS && Plugin.VS.Commands) { Plugin.VS.Commands.setStates({ command: this._takeSnapshotCommand, enabled: this.canTakeSnapshot(), visible: this.canShowTakeSnapshot() }); } }; MemoryAnalyzerController.prototype.consoleNotifyCallback = function (args) { if (!this.summaryViewController.model.isTargetCompatible) { return; } var functionId = args.notifyType; var data = args.message; if (functionId === "takeHeapSnapshot") { this.takeSnapshot(); } }; MemoryAnalyzerController.prototype.canTakeSnapshot = function () { var summaryModel = this._summaryViewController.model; return summaryModel.isAttached && summaryModel.isRunning && !summaryModel.isTakingSnapshot && !summaryModel.isOffline; }; MemoryAnalyzerController.prototype.canShowTakeSnapshot = function () { var summaryModel = this._summaryViewController.model; return summaryModel.isAttached && summaryModel.isRunning && !summaryModel.isOffline; }; MemoryAnalyzerController.prototype.initCommands = function () { if (Plugin.VS && Plugin.VS.Commands) { this._takeSnapshotCommand = Plugin.VS.Commands.bindCommand({ name: "takesnapshotcommand", onexecute: this.onTakeSnapshotCommand.bind(this), enabled: this.canTakeSnapshot(), visible: this.canShowTakeSnapshot() }); } }; MemoryAnalyzerController.prototype.onDiagnosticsHubStateChanged = function (hubSession, args) { if (args.previousState === 300 /* CollectionStarted */ && args.currentState === 400 /* CollectionFinishing */) { hubSession.removeStateChangedEventListener(this.onDiagnosticsHubStateChanged.bind(this, hubSession)); var eventCompleteDeferral = args.getDeferral(); var onSaveCompleted = function () { Notifications.notify(MemoryAnalyzer.MemoryNotifications.SessionEnd); MemoryAnalyzer.Program.fireCodeMarker(23592 /* perfBrowserTools_MemoryAnalyzerSessionEnd */); eventCompleteDeferral.complete(); }; this._summaryViewController.save().done(onSaveCompleted, onSaveCompleted); } }; MemoryAnalyzerController.prototype.onTakeSnapshotCommand = function () { this.takeSnapshot(); }; return MemoryAnalyzerController; })(MemoryAnalyzer.DiagnosticsToolWindowController); MemoryAnalyzer.MemoryAnalyzerController = MemoryAnalyzerController; var MemoryAnalyzerView = (function (_super) { __extends(MemoryAnalyzerView, _super); function MemoryAnalyzerView(controller) { _super.call(this); this._controller = controller; this.title = Plugin.Resources.getString("Summary").toLocaleUpperCase(); this.tooltipString = Plugin.Resources.getString("SummaryTabTooltip"); this.content = new MemoryAnalyzer.SummaryTab(this._controller.summaryViewController); this._controller.summaryViewController.model.propertyChanged.addHandler(this.onPropertyChanged.bind(this)); } MemoryAnalyzerView.prototype.onActiveChanged = function () { if (this.active) { var summaryView = this._controller.summaryViewController.view; if (summaryView) { summaryView.refreshGraph(); } MemoryAnalyzer.NavigationHelpers.switchNavigationView(this._controller.summaryViewController.navigationId); } }; MemoryAnalyzerView.prototype.onPropertyChanged = function (propertyName) { var model = this._controller.summaryViewController.model; switch (propertyName) { case MemoryAnalyzer.SummaryViewModel.IsTakingSnapshotPropertyName: case MemoryAnalyzer.SummaryViewModel.IsAttachedPropertyName: case MemoryAnalyzer.SummaryViewModel.IsRunningPropertyName: case MemoryAnalyzer.SummaryViewModel.IsOfflinePropertyName: this._controller.updateCommandState(); break; } }; return MemoryAnalyzerView; })(MemoryAnalyzer.Controls.TabItem); MemoryAnalyzer.MemoryAnalyzerView = MemoryAnalyzerView; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // memoryAnalyzerData.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { (function (Data) { "use strict"; (function (ScopeFilter) { ScopeFilter[ScopeFilter["ObjectsLeftFromPreviousSnapshot"] = 0] = "ObjectsLeftFromPreviousSnapshot"; ScopeFilter[ScopeFilter["ObjectsAddedBetweenSnapshots"] = 1] = "ObjectsAddedBetweenSnapshots"; ScopeFilter[ScopeFilter["AllObjects"] = 2] = "AllObjects"; })(Data.ScopeFilter || (Data.ScopeFilter = {})); var ScopeFilter = Data.ScopeFilter; var MemoryAnalyzerData = (function () { function MemoryAnalyzerData(memoryAnalyzerProxy) { this._proxy = memoryAnalyzerProxy; if (!this._proxy) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1065")); } } MemoryAnalyzerData.GetErrorFromHr = function (hr) { if (hr < 0) { hr = 0xFFFFFFFF + hr + 1; } switch (hr) { case 0x8007000E: case 0x89790008: return new Error(Plugin.Resources.getString("ERRoutOfMemory")); case 0x89790001: return new Error(Plugin.Resources.getString("ERRbadHexDigit")); case 0x89790002: return new Error(Plugin.Resources.getString("ERRbadNumber")); case 0x89790003: return new Error(Plugin.Resources.getString("ERRillegalChar")); case 0x89790005: return new Error(Plugin.Resources.getString("ERRnoColon")); case 0x89790006: return new Error(Plugin.Resources.getString("ERRnoRbrack")); case 0x89790007: return new Error(Plugin.Resources.getString("ERRnoRcurly")); case 0x89790009: return new Error(Plugin.Resources.getString("ERRnoStrEnd")); case 0x8979000a: return new Error(Plugin.Resources.getString("ERRsyntax")); case 0x8979000c: return new Error(Plugin.Resources.getString("ERRmissingObjectId")); case 0x8979000d: return new Error(Plugin.Resources.getString("ERRinvalidObjectID")); } return new Error(Plugin.Resources.getString("ERRunknownError", "0x" + hr.toString(16).toUpperCase())); }; MemoryAnalyzerData.prototype.processSnapshotSummary = function (snapshotFile, prevSnapshotFile) { var _this = this; if (typeof prevSnapshotFile === "undefined") { prevSnapshotFile = ""; } return new Plugin.Promise(function (completed, error) { _this._proxy.processSnapshotSummary(snapshotFile, prevSnapshotFile, function (localSnapshotSummary) { completed(localSnapshotSummary); }, function (hr) { if (error) { error(MemoryAnalyzerData.GetErrorFromHr(hr)); } }, function () { }); }); }; MemoryAnalyzerData.prototype.processSnapshot = function (snapshotFile) { var _this = this; return new Plugin.Promise(function (completed, error, progress) { _this._proxy.processSnapshot(snapshotFile, function (proxy) { completed(new SnapshotData(proxy)); }, function (hr) { if (error) { error(MemoryAnalyzerData.GetErrorFromHr(hr)); } }, function (progValue) { if (progress) { progress(progValue); } }); }); }; MemoryAnalyzerData.prototype.processSnapshotDiff = function (snapshotFiles) { var _this = this; return new Plugin.Promise(function (completed, error, progress) { _this._proxy.processSnapshotDiff(snapshotFiles, function (proxy) { completed(new SnapshotData(proxy)); }, function (hr) { if (error) { error(MemoryAnalyzerData.GetErrorFromHr(hr)); } }, function (progValue) { if (progress) { progress(progValue); } }); }); }; return MemoryAnalyzerData; })(); Data.MemoryAnalyzerData = MemoryAnalyzerData; var SnapshotData = (function () { function SnapshotData(proxy) { this._heapObjectCache = {}; this._proxy = proxy; if (!this._proxy) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1066")); } } SnapshotData.prototype.getChildrenForObject = function (objectId, startIndex, maxResult, scopeFilter, isScopeRelated, filter) { if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } filter = this.getFilter(filter); var dataSet = this._proxy.getChildrenForObject(objectId, startIndex, maxResult, scopeFilter, isScopeRelated, filter); this.performObjectCaching(dataSet); return dataSet; }; SnapshotData.prototype.getDominators = function (startIndex, maxResult, textFilter, scopeFilter, filter) { var _this = this; if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } if (typeof textFilter === "undefined") { textFilter = ""; } if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } var requestId; return new Plugin.Promise(function (completed, error) { requestId = _this._proxy.getDominators(startIndex, maxResult, textFilter, scopeFilter, filter, function (dataSetArg) { _this.performObjectCaching(dataSetArg); completed(dataSetArg); }, function (hr) { if (error) { error(MemoryAnalyzerData.GetErrorFromHr(hr)); } }); }, function () { if (typeof requestId !== "undefined") { _this._proxy.cancelRequest(requestId); } }); }; SnapshotData.prototype.getObjectsByType = function (type, startIndex, maxResult, scopeFilter, filter) { if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } filter = this.getFilter(filter); var dataSet = this._proxy.getObjectsByType(type, startIndex, maxResult, scopeFilter, filter); this.performObjectCaching(dataSet); return dataSet; }; SnapshotData.prototype.getPathToDominator = function (objectId, scopeFilter, filter) { if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } filter = this.getFilter(filter); return this._proxy.getPathToDominator(objectId, scopeFilter, filter); }; SnapshotData.prototype.getPathToRoot = function (objectId, parentObjectId, filter) { if (typeof parentObjectId === "undefined") { parentObjectId = 0; } filter = this.getFilter(filter); return this._proxy.getPathToRoot(objectId, parentObjectId, filter); }; SnapshotData.prototype.getRootObjects = function (scopeFilter, filter) { filter = this.getFilter(filter); var dataSet = this._proxy.getRootObjects(scopeFilter, filter); this.performObjectCaching(dataSet); return dataSet; }; SnapshotData.prototype.getTypes = function (textFilter, scopeFilter, filter) { var _this = this; if (typeof textFilter === "undefined") { textFilter = ""; } if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } filter = this.getFilter(filter); var requestId; return new Plugin.Promise(function (completed, error) { requestId = _this._proxy.getTypes(textFilter, scopeFilter, filter, function (typesArg) { completed(typesArg); }, function (hr) { if (error) { error(MemoryAnalyzerData.GetErrorFromHr(hr)); } }); }, function () { if (typeof requestId !== "undefined") { _this._proxy.cancelRequest(requestId); } }); }; SnapshotData.prototype.getRetainedDescendants = function (objectId, startIndex, maxResult, scopeFilter, filter) { if (typeof startIndex === "undefined") { startIndex = 0; } if (typeof maxResult === "undefined") { maxResult = -1; } if (typeof scopeFilter === "undefined") { scopeFilter = 2 /* AllObjects */; } filter = this.getFilter(filter); var dataSet = this._proxy.getRetainedDescendants(objectId, startIndex, maxResult, scopeFilter, filter); this.performObjectCaching(dataSet); return dataSet; }; SnapshotData.prototype.getReferenceTreeItems = function (rootObjectId, objectId, nodeId, includeCircularReferences) { var dataSet = this._proxy.getReferenceTreeItems(rootObjectId, objectId, nodeId || 0, includeCircularReferences); this.performObjectCaching(dataSet); return dataSet; }; SnapshotData.prototype.hasDetachedDomNodes = function () { return this._proxy.hasDetachedDomNodes(); }; SnapshotData.prototype.getSnapshotDiffStats = function () { return this._proxy.getSnapshotDiffStats(); }; SnapshotData.prototype.getFilter = function (filter) { var newFilter = {}; filter = filter || {}; newFilter.foldObjectsByDominator = filter.foldObjectsByDominator || false; newFilter.showNonMatchingReferences = filter.showNonMatchingReferences || false; newFilter.showBuiltIns = filter.showBuiltIns || false; newFilter.showUnknownSizes = filter.showUnknownSizes || false; newFilter.showUnknownTypes = filter.showUnknownTypes || false; return newFilter; }; SnapshotData.prototype.performObjectCaching = function (dataSet) { var nodes = dataSet.result; if (nodes && nodes.length > 0) { for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; if (typeof node.object !== "undefined") { var obj = node.object; this._heapObjectCache[obj.objectId] = obj; } else if (typeof node.objectId !== "undefined") { node.object = this._heapObjectCache[node.objectId]; } } } }; return SnapshotData; })(); Data.SnapshotData = SnapshotData; })(MemoryAnalyzer.Data || (MemoryAnalyzer.Data = {})); var Data = MemoryAnalyzer.Data; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // memoryAnalyzerShell.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var MemoryAnalyzerShell = (function () { function MemoryAnalyzerShell(session) { this.session = session; } MemoryAnalyzerShell.prototype.createSnapshot = function () { var _this = this; return new Plugin.Promise(function (completed, failed) { _this.session.getSessionInfo().then(function (sessionInfo) { var relativePath = _this.session.getNewSnapshotRelativePath(); var filePath = sessionInfo.storageId + "\\" + relativePath; return Plugin.Storage.openFile(filePath, { access: 2 /* write */, encoding: "UTF-8", mode: 6 /* append */, persistence: 1 /* temporary */, type: 1 /* text */ }).then(function (file) { completed({ file: file, relativePath: relativePath }); }, function (error) { if (failed) { failed(error); } }); }, function (error) { if (failed) { failed(error); } }); }); }; MemoryAnalyzerShell.prototype.save = function (addToProject) { return this.session.save(addToProject); }; return MemoryAnalyzerShell; })(); MemoryAnalyzer.MemoryAnalyzerShell = MemoryAnalyzerShell; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // memoryAnalyzerShell.vs.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var VsMemoryAnalyzerShell = (function (_super) { __extends(VsMemoryAnalyzerShell, _super); function VsMemoryAnalyzerShell(session, sessionInfo) { _super.call(this, session); this.session.addViewTypeEventListener(this.onViewTypeChange.bind(this)); this._sessionInfo = sessionInfo; this._hostShell = new Common.Extensions.HostShellProxy(); } Object.defineProperty(VsMemoryAnalyzerShell.prototype, "hostShell", { get: function () { return this._hostShell; }, enumerable: true, configurable: true }); VsMemoryAnalyzerShell.prototype.changeSession = function (newSession) { }; VsMemoryAnalyzerShell.prototype.closeAllSnapshots = function () { return Plugin.Promise.as(null); }; VsMemoryAnalyzerShell.prototype.getHostSpecificString = function (resourceId) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } return Plugin.Resources.getString(resourceId + "VS", args); }; VsMemoryAnalyzerShell.prototype.getSnapshotFullPath = function (storageId, relativePath) { return "%temp%\\ScriptedHost\\" + storageId + "\\" + relativePath; }; VsMemoryAnalyzerShell.prototype.initializeView = function () { switch (this._sessionInfo.sessionType) { case 0 /* session */: var diagSession = new MemoryAnalyzer.Diagnostics.HubDiagnosticSession(); this._view = new VsMemoryAnalyzerShellSessionView(this._sessionInfo, diagSession); break; case 1 /* snapshot */: this._view = new VsMemoryAnalyzerShellSnapshotView(this._sessionInfo); break; case 2 /* snapshotDiff */: this._view = new VsMemoryAnalyzerShellSnapshotDiffView(this._sessionInfo); break; default: throw new Error(Plugin.Resources.getErrorString("JSPerf.1000")); } }; VsMemoryAnalyzerShell.prototype.isGraphCollectionSupported = function () { return false; }; VsMemoryAnalyzerShell.prototype.openSnapshot = function (relativePath, targetView, tabName, sortProperty) { return this.session.openSnapshotDetails(relativePath, targetView, tabName, sortProperty); }; VsMemoryAnalyzerShell.prototype.openSnapshotDiff = function (relativePaths, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty) { return this.session.openSnapshotDiff(relativePaths, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty); }; VsMemoryAnalyzerShell.prototype.resetView = function () { }; VsMemoryAnalyzerShell.prototype.startGraphCollection = function () { MemoryAnalyzer.Program.reportError(new Error("not implemented"), "startGraphCollection is not implemented"); return null; }; VsMemoryAnalyzerShell.prototype.onViewTypeChange = function (args) { this._view.changeViewType(args.viewType, args.sortProperty); }; return VsMemoryAnalyzerShell; })(MemoryAnalyzer.MemoryAnalyzerShell); MemoryAnalyzer.VsMemoryAnalyzerShell = VsMemoryAnalyzerShell; var VsMemoryAnalyzerShellSessionView = (function (_super) { __extends(VsMemoryAnalyzerShellSessionView, _super); function VsMemoryAnalyzerShellSessionView(sessionInfo, diagSession) { _super.call(this, document.getElementById("mainContainer")); this._controller = new MemoryAnalyzer.MemoryAnalyzerController(sessionInfo, diagSession); this.appendChild(this._controller.view); Plugin.addEventListener("close", this.onClose.bind(this)); } VsMemoryAnalyzerShellSessionView.prototype.changeViewType = function (viewType) { }; VsMemoryAnalyzerShellSessionView.prototype.onClose = function () { this._controller.goOffline(); }; return VsMemoryAnalyzerShellSessionView; })(Common.Controls.Legacy.Control); MemoryAnalyzer.VsMemoryAnalyzerShellSessionView = VsMemoryAnalyzerShellSessionView; var VsMemoryAnalyzerShellSnapshotView = (function (_super) { __extends(VsMemoryAnalyzerShellSnapshotView, _super); function VsMemoryAnalyzerShellSnapshotView(sessionInfo) { _super.call(this, document.getElementById("mainContainer")); var controller = new MemoryAnalyzer.SnapshotViewController(sessionInfo.storageId); controller.loadSnapshot(sessionInfo.storageId, sessionInfo.filePaths, sessionInfo.targetView, sessionInfo.sortProperty); this._controller = controller; this._snapshotTab = new MemoryAnalyzer.SnapshotTab(controller); this.appendChild(this._snapshotTab); } VsMemoryAnalyzerShellSnapshotView.prototype.changeViewType = function (viewType, sortProperty) { this._controller.setTargetView(viewType, sortProperty); }; return VsMemoryAnalyzerShellSnapshotView; })(Common.Controls.Legacy.Control); MemoryAnalyzer.VsMemoryAnalyzerShellSnapshotView = VsMemoryAnalyzerShellSnapshotView; var VsMemoryAnalyzerShellSnapshotDiffView = (function (_super) { __extends(VsMemoryAnalyzerShellSnapshotDiffView, _super); function VsMemoryAnalyzerShellSnapshotDiffView(sessionInfo) { _super.call(this, document.getElementById("mainContainer")); var diffController = new MemoryAnalyzer.SnapshotDiffController(sessionInfo.storageId, sessionInfo.firstSnapshotId, sessionInfo.lastSnapshotId); diffController.diffSnapshots(sessionInfo.storageId, sessionInfo.filePaths, sessionInfo.targetView, sessionInfo.sortProperty); this._diffController = diffController; this._snapshotTab = new MemoryAnalyzer.SnapshotTab(diffController); this.appendChild(this._snapshotTab); } VsMemoryAnalyzerShellSnapshotDiffView.prototype.changeViewType = function (viewType, sortType) { this._diffController.setTargetView(viewType, sortType); }; return VsMemoryAnalyzerShellSnapshotDiffView; })(Common.Controls.Legacy.Control); MemoryAnalyzer.VsMemoryAnalyzerShellSnapshotDiffView = VsMemoryAnalyzerShellSnapshotDiffView; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // memoryAnalyzerShell.f12.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var MemoryAnalyzerToolbarControl = (function (_super) { __extends(MemoryAnalyzerToolbarControl, _super); function MemoryAnalyzerToolbarControl(shellView) { _super.call(this); this.title = Plugin.Resources.getString("F12ToolTitle"); this.panelTemplateId = "MemoryAnalyzer.toolbarButtonsPanel"; this._shellView = shellView; this.addClickHandlerToButton("openSessionButton", this.onOpenSessionToolbarButtonClick.bind(this)); this.addClickHandlerToButton("saveSessionButton", this.onSaveSessionToolbarButtonClick.bind(this)); this.addClickHandlerToButton("startToolbarButton", this.onStartToolbarButtonClick.bind(this)); this.addClickHandlerToButton("stopToolbarButton", this.onStopToolbarButtonClick.bind(this)); this.addClickHandlerToButton("takeSnapshotToolbarButton", this.onTakeSnapshotToolbarButtonClick.bind(this)); } MemoryAnalyzerToolbarControl.prototype.onOpenSessionToolbarButtonClick = function () { if (this._shellView) { this._shellView.openSession(); } }; MemoryAnalyzerToolbarControl.prototype.onSaveSessionToolbarButtonClick = function () { if (this._shellView) { this._shellView.saveSession(); } }; MemoryAnalyzerToolbarControl.prototype.onStartToolbarButtonClick = function () { if (this._shellView) { this._shellView.startProfiling(); } }; MemoryAnalyzerToolbarControl.prototype.onStopToolbarButtonClick = function () { if (this._shellView) { this._shellView.stopProfiling(); } }; MemoryAnalyzerToolbarControl.prototype.onTakeSnapshotToolbarButtonClick = function () { if (this._shellView) { this._shellView.takeSnapshot(); } }; return MemoryAnalyzerToolbarControl; })(Common.Controls.ToolbarControl); MemoryAnalyzer.MemoryAnalyzerToolbarControl = MemoryAnalyzerToolbarControl; var F12MemoryAnalyzerShell = (function (_super) { __extends(F12MemoryAnalyzerShell, _super); function F12MemoryAnalyzerShell(externalObj, session, sessionInfo) { var _this = this; _super.call(this, session); this._openedDocs = {}; var diagSession = new MemoryAnalyzer.Diagnostics.F12DiagnosticsSession(externalObj); var controller = new MemoryAnalyzer.MemoryAnalyzerController(sessionInfo, diagSession); this._controller = controller; var external = window.external; external.addEventListener("closing", function () { _this.closeAllSnapshots(); MemoryAnalyzer.Program.etwDataCollector.stopCollection(); }); this._hostShell = new Common.Extensions.LocalHostShell(); } Object.defineProperty(F12MemoryAnalyzerShell.prototype, "hostShell", { get: function () { return this._hostShell; }, enumerable: true, configurable: true }); Object.defineProperty(F12MemoryAnalyzerShell.prototype, "view", { get: function () { return this._view; }, enumerable: true, configurable: true }); F12MemoryAnalyzerShell.load = function () { Plugin.Storage.openFileDialog({ name: "", extensions: ["diagsession"] }, { access: 1 /* read */, encoding: "BINARY", persistence: 1 /* temporary */, type: 0 /* binary */ }).then(function (stream) { return F12MemoryAnalyzerShell.loadFromStream(stream); }).done(function (resourcePath) { var newSession = new MemoryAnalyzer.Extensions.LocalSession(resourcePath, true); MemoryAnalyzer.Program.changeSession(newSession); }, function (error) { if (error.number !== undefined && error.number === Common.Constants.E_ABORT) { return; } Plugin.F12.ErrorDisplay.show(Plugin.Resources.getString("OpenSessionFailedMessage")); }); }; F12MemoryAnalyzerShell.loadFromStream = function (stream) { return new Plugin.Promise(function (completed, error) { try { MemoryAnalyzer.Program.packager.openPackage(stream.streamId); var resourcePath = MemoryAnalyzer.Program.packager.getResourcePathsByType(Common.Constants.MEMORY_ANALYZER_SNAPSHOT_RESOURCE_TYPE); if (resourcePath.length < 1 || resourcePath[0] === "") { throw new Error(Plugin.Resources.getErrorString("JSPerf.1075")); } var pathParts = resourcePath[0].split("\\"); var storageId = pathParts[pathParts.length - 2] + "\\" + pathParts[pathParts.length - 1]; if (completed) { completed(storageId); } } catch (e) { if (error) { error(e); } } finally { MemoryAnalyzer.Program.packager.closePackage(); } }); }; F12MemoryAnalyzerShell.save = function () { Plugin.Storage.saveFileDialog({ name: "", extensions: ["diagsession"] }, { access: 3 /* readWrite */, encoding: "BINARY", persistence: 1 /* temporary */, type: 0 /* binary */ }).done(function (stream) { MemoryAnalyzer.Program.saveSession().done(function (tempPath) { Plugin.F12.copyFileToStream(tempPath, stream.streamId); stream.close(); Plugin.F12.deleteFile(tempPath); Notifications.notify(MemoryAnalyzer.MemoryNotifications.SessionSaveCompleted); }); }, function (error) { if (error.number !== undefined && error.number === Common.Constants.E_ABORT) { return; } Plugin.F12.ErrorDisplay.show(Plugin.Resources.getString("SaveSessionFailedMessage")); }); }; F12MemoryAnalyzerShell.prototype.changeSession = function (newSession) { var _this = this; this.closeAllSnapshots(); this.session = newSession; this.session.getSessionInfo().done(function (sessionInfo) { _this._controller.setSession(sessionInfo); var model = _this._controller.summaryViewController.model; _this._controller.summaryViewController.removeExistingGraph(); if (_this._view) { _this._view.closeView(); _this._view = null; } _this.initializeView(); if (model.snapshotSummaryCollection) { model.isStartProfilingPromptVisible = model.snapshotSummaryCollection.length === 0; } }); }; F12MemoryAnalyzerShell.prototype.closeAllSnapshots = function () { for (var tabName in this._openedDocs) { if (this._openedDocs.hasOwnProperty(tabName)) { this._view.removeDoc(this._openedDocs[tabName]); } } this._openedDocs = {}; var filesPaths = []; var summaries = this._controller.summaryViewController.model.snapshotSummaryCollection; for (var i = 0; i < summaries.length; ++i) { var summary = summaries.getItem(i); var snapshotFile = summary.snapshotFile; var filePath = this.getSnapshotFullPath(snapshotFile.storageId, snapshotFile.relativePath); filesPaths.push(filePath); filesPaths.push(filePath + MemoryAnalyzer.SnapshotSummary.fileExtension); } this._controller.clearSummaryTab(); while (filesPaths.length > 0) { var filesPath = filesPaths.pop(); Plugin.F12.deleteFile(filesPath); } return Plugin.Promise.as(null); }; F12MemoryAnalyzerShell.prototype.getHostSpecificString = function (resourceId) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } return Plugin.Resources.getString(resourceId + "F12", args); }; F12MemoryAnalyzerShell.prototype.getSnapshotFullPath = function (storageId, relativePath) { return Common.Constants.MEMORY_ANALYZER_SNAPSHOT_ROOT_PATH + storageId + "\\" + relativePath; }; F12MemoryAnalyzerShell.prototype.initializeView = function () { if (this._view) { F12.Tools.Utility.Assert.fail("Tried to initialize a view when one already exists!"); } this._view = new F12MemoryAnalyzerShellView(this._controller); }; F12MemoryAnalyzerShell.prototype.isGraphCollectionSupported = function () { return true; }; F12MemoryAnalyzerShell.prototype.openSnapshot = function (relativePath, targetView, tabName, sortProperty) { var _this = this; tabName = tabName.toLocaleUpperCase(); return this.session.openSnapshotDetails(relativePath, targetView, tabName, sortProperty).then(function (newSessionInfo) { var doc = _this._openedDocs[tabName]; if (!doc) { var controller = new MemoryAnalyzer.SnapshotViewController(newSessionInfo.storageId); controller.loadSnapshot(newSessionInfo.storageId, newSessionInfo.filePaths, newSessionInfo.targetView, newSessionInfo.sortProperty); doc = { controller: controller, sessionInfo: newSessionInfo, title: tabName, view: new MemoryAnalyzer.SnapshotTab(controller) }; doc.view.title = tabName; _this._openedDocs[tabName] = doc; } doc.controller.setTargetView(newSessionInfo.targetView, newSessionInfo.sortProperty); _this._view.addOrActivateDoc(doc); return Plugin.Promise.as(null); }); }; F12MemoryAnalyzerShell.prototype.openSnapshotDiff = function (relativePaths, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty) { var _this = this; tabName = tabName.toLocaleUpperCase(); return this.session.openSnapshotDiff(relativePaths, targetView, tabName, firstSnapshotId, lastSnapshotId, sortProperty).then(function (newSessionInfo) { var doc = _this._openedDocs[tabName]; if (!doc) { var diffController = new MemoryAnalyzer.SnapshotDiffController(newSessionInfo.storageId, firstSnapshotId, lastSnapshotId); diffController.diffSnapshots(newSessionInfo.storageId, newSessionInfo.filePaths, newSessionInfo.targetView, newSessionInfo.sortProperty); doc = { controller: diffController, sessionInfo: newSessionInfo, title: tabName, view: new MemoryAnalyzer.SnapshotTab(diffController) }; doc.view.title = tabName; _this._openedDocs[tabName] = doc; } doc.controller.setTargetView(newSessionInfo.targetView, newSessionInfo.sortProperty); _this._view.addOrActivateDoc(doc); return Plugin.Promise.as(null); }); }; F12MemoryAnalyzerShell.prototype.resetView = function () { this._view.resetView(); }; F12MemoryAnalyzerShell.prototype.startGraphCollection = function () { return MemoryAnalyzer.Program.etwDataCollector.startSession("JavaScriptCollectionAgent.dll", "{37012E99-CDE8-4D9F-B228-CF98BC27B424}"); }; return F12MemoryAnalyzerShell; })(MemoryAnalyzer.MemoryAnalyzerShell); MemoryAnalyzer.F12MemoryAnalyzerShell = F12MemoryAnalyzerShell; var F12MemoryAnalyzerShellView = (function (_super) { __extends(F12MemoryAnalyzerShellView, _super); function F12MemoryAnalyzerShellView(memAnalyzerController) { _super.call(this, "f12ViewTemplate"); this._controller = memAnalyzerController; this._isProfiling = false; this._startProfilingLink = this.findElement("startProfilingMessage"); this._startProfilingLink.innerText = Plugin.Resources.getString("F12StartProfilingMessage"); this._startProfilingLink.addEventListener("click", this.onStartClick.bind(this)); this._startProfilingLink.addEventListener("keydown", this.onStartClick.bind(this)); this._model = memAnalyzerController.summaryViewController.model; this._model.propertyChanged.addHandler(this.onPropertyChanged.bind(this)); this._model.isOffline = true; this._model.isRunning = !Plugin.F12.Debugger.getIsAtBreakpoint(); this._toolbarControl = new MemoryAnalyzerToolbarControl(this); this._toolbarControl.model = this._model; this.findElement("toolbarContainer").appendChild(this._toolbarControl.rootElement); MemoryAnalyzer.NavigationHelpers.setToolbar(this._toolbarControl); MemoryAnalyzer.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.summaryViewController.navigationId); MemoryAnalyzer.NavigationHelpers.switchNavigationView(this._controller.summaryViewController.navigationId); try { Common.NavigationUtilities.registerFocusHandlers(Plugin.F12.PluginId.Memory); } catch (e) { } this._tabControl = new MemoryAnalyzer.Controls.TabControl(); this._tabControl.tabsLeftAligned = true; this._tabControl.addTab(this._controller.view); this._startProfilingPrompt = this.findElement("startProfilingPrompt"); this.updateStartProfilingPrompt(); this.findElement("tabContainer").appendChild(this._tabControl.rootElement); this._parentContainer = document.getElementById("mainContainer"); this._keyDownHandler = this.onKeyDown.bind(this); Plugin.F12.addEventListener("keydown", this._keyDownHandler); Plugin.F12.addEventListener("browsershortcut", this._keyDownHandler); document.addEventListener("keydown", this._keyDownHandler); this._parentContainer.appendChild(this.rootElement); } Object.defineProperty(F12MemoryAnalyzerShellView.prototype, "summaryViewModel", { get: function () { return this._model; }, enumerable: true, configurable: true }); F12MemoryAnalyzerShellView.prototype.addOrActivateDoc = function (doc) { if (!this._tabControl.containsTab(doc.view)) { this._tabControl.addTab(doc.view); } this._tabControl.selectedItem = doc.view; }; F12MemoryAnalyzerShellView.prototype.closeView = function () { Plugin.F12.removeEventListener("keydown", this._keyDownHandler); Plugin.F12.removeEventListener("browsershortcut", this._keyDownHandler); document.removeEventListener("keydown", this._keyDownHandler); this._parentContainer.innerHTML = ""; }; F12MemoryAnalyzerShellView.prototype.removeDoc = function (doc) { this._tabControl.removeTab(doc.view); }; F12MemoryAnalyzerShellView.prototype.resetView = function () { this._model.isStartProfilingPromptVisible = true; MemoryAnalyzer.NavigationHelpers.reset(); MemoryAnalyzer.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.summaryViewController.navigationId); MemoryAnalyzer.NavigationHelpers.switchNavigationView(this._controller.summaryViewController.navigationId); }; F12MemoryAnalyzerShellView.prototype.startProfiling = function () { if (this._controller) { MemoryAnalyzer.Program.shell.closeAllSnapshots(); F12.Tools.Utility.Assert.isTrue(this._model.isTargetCompatible); MemoryAnalyzer.Program.traceWriter.raiseEvent(211 /* Memory_ToolReady_Start */); Plugin.F12.Profiler.notifyOnStartProfiling(); this._isProfiling = true; this._controller.goOnline(); MemoryAnalyzer.Program.traceWriter.raiseEvent(212 /* Memory_ToolReady_Stop */); this._model.isStartProfilingPromptVisible = false; this.updateUIState(); this._toolbarControl.getNamedControl("takeSnapshotToolbarButton").rootElement.focus(); } }; F12MemoryAnalyzerShellView.prototype.stopProfiling = function () { if (this._controller) { Plugin.F12.Profiler.notifyOnStopProfiling(); this._isProfiling = false; this._controller.showWarning(null); this._controller.goOffline(); if (this._model.snapshotSummaryCollection.length === 0) { this.resetView(); } this.updateUIState(); } }; F12MemoryAnalyzerShellView.prototype.openSession = function () { if (this._isProfiling) { this.stopProfiling(); } F12MemoryAnalyzerShell.load(); }; F12MemoryAnalyzerShellView.prototype.saveSession = function () { F12MemoryAnalyzerShell.save(); }; F12MemoryAnalyzerShellView.prototype.takeSnapshot = function () { if (this._controller) { this._controller.takeSnapshot(); this.updateUIState(); } }; F12MemoryAnalyzerShellView.prototype.onPropertyChanged = function (propertyName) { switch (propertyName) { case MemoryAnalyzer.SummaryViewModel.StartProfilingEnabledPropertyName: case MemoryAnalyzer.SummaryViewModel.IsRunningPropertyName: this.updateUIState(); break; case MemoryAnalyzer.SummaryViewModel.IsStartProfilingPromptVisiblePropertyName: this.updateStartProfilingPrompt(); break; case MemoryAnalyzer.SummaryViewModel.IsTargetCompatiblePropertyName: if (this._controller) { if (this._model.isTargetCompatible) { this._controller.showWarning(null); } else { this._controller.showWarning(MemoryAnalyzer.Program.shell.getHostSpecificString("WarningIncompatibleStandardsMode")); this._model.isStartProfilingPromptVisible = false; } } this.updateUIState(); break; } if (propertyName === MemoryAnalyzer.SummaryViewModel.IsOfflinePropertyName && this._model.isOffline && this._isProfiling) { Plugin.F12.Profiler.notifyOnStopProfiling(); this._isProfiling = false; } }; F12MemoryAnalyzerShellView.prototype.onStartClick = function (event) { if ((this._model.isOffline && Common.ButtonHelpers.isValidEvent(event)) || (event.keyCode === 32 /* Space */) || (event.keyCode === 13 /* Enter */)) { this.startProfiling(); } }; F12MemoryAnalyzerShellView.prototype.onKeyDown = function (event) { switch (event.keyCode) { case 69 /* E */: if (event.ctrlKey && !event.altKey && !event.shiftKey) { if (this._model.isOffline) { if (this._model.isStartEnabled) { this.startProfiling(); } } else { if (this._model.isStopEnabled) { this.stopProfiling(); } } } break; case 79 /* O */: if (event.ctrlKey && !event.altKey && !event.shiftKey && this._model.isOpenSessionEnabled) { this.openSession(); } break; case 83 /* S */: if (event.ctrlKey && !event.altKey && !event.shiftKey && this._model.isSaveSessionEnabled) { this.saveSession(); } break; case 84 /* T */: if (event.ctrlKey && event.shiftKey && !event.altKey) { this.takeSnapshot(); } break; default: break; } }; F12MemoryAnalyzerShellView.prototype.updateStartProfilingPrompt = function () { this._startProfilingPrompt.style.display = this._model.isStartProfilingPromptVisible ? "" : "none"; this._tabControl.rootElement.style.display = this._model.isStartProfilingPromptVisible ? "none" : ""; if (this._model.isStartProfilingPromptVisible) { MemoryAnalyzer.NavigationHelpers.updateAdditionalNavigationFrames(this._controller.summaryViewController.navigationId); } }; F12MemoryAnalyzerShellView.prototype.updateUIState = function () { this._startProfilingLink.style.display = this._model.isStartEnabled ? "" : "none"; if (!this._model.isRunning) { Plugin.F12.ErrorDisplay.show(Plugin.Resources.getString("MemoryDisabledAtBreakpoint")); } else { Plugin.F12.ErrorDisplay.close(); } }; return F12MemoryAnalyzerShellView; })(Common.Controls.Legacy.TemplateControl); MemoryAnalyzer.F12MemoryAnalyzerShellView = F12MemoryAnalyzerShellView; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // Program.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; (function (HostType) { HostType[HostType["VS"] = 0] = "VS"; HostType[HostType["F12"] = 1] = "F12"; HostType[HostType["Test"] = 2] = "Test"; })(MemoryAnalyzer.HostType || (MemoryAnalyzer.HostType = {})); var HostType = MemoryAnalyzer.HostType; })(MemoryAnalyzer || (MemoryAnalyzer = {})); // Program.main.ts var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var ProgramMain = (function () { function ProgramMain() { this._traceWriter = new Common.DefaultTraceWriter(); } Object.defineProperty(ProgramMain.prototype, "etwDataCollector", { get: function () { return this._etwDataCollector; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "hostType", { get: function () { return this._hostType; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "internalFeedback", { get: function () { return this._internalFeedback; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "memoryAnalyzerData", { get: function () { return this._memoryAnalyzerData; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "packager", { get: function () { return this._packager; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "shell", { get: function () { return this._shell; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "traceWriter", { get: function () { return this._traceWriter; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "userSettings", { get: function () { return this._userSettings; }, enumerable: true, configurable: true }); ProgramMain.prototype.changeSession = function (newSession) { this._session = newSession; this._shell.changeSession(this._session); if (Plugin.F12) { Plugin.F12.TraceWriter.markToolReady(); } this.onIdle(); }; ProgramMain.prototype.fireCodeMarker = function (codeMarker) { Plugin.VS.Internal.CodeMarkers.fire(codeMarker); }; ProgramMain.prototype.main = function () { var _this = this; if (window.parent && window.parent.getExternalObj) { this._externalObj = window.parent.getExternalObj(); } else if (window.external) { this._externalObj = window.external; } if (Plugin.F12) { this._hostType = 1 /* F12 */; } else { this._hostType = 0 /* VS */; } Plugin.addEventListener("pluginready", function () { var session; var diagSession; var memAnalyzerProxy; var perfTrace; Plugin.Tooltip.defaultTooltipContentToHTML = false; switch (_this.hostType) { case 0 /* VS */: session = new MemoryAnalyzer.Extensions.HostSessionProxy(); _this._internalFeedback = new MemoryAnalyzer.Extensions.InternalFeedbackProxy(); memAnalyzerProxy = Plugin.VS.Utilities.createExternalObject("MemoryAnalyzerExtension", "{81ACDD7F-96B1-46DC-8971-424AABD93C69}"); perfTrace = Plugin.VS.Utilities.createExternalObject("PerformanceTraceExtension", "{D76A409F-7234-4B71-9BFD-DEF3DC4CCCA6}"); break; case 1 /* F12 */: session = new MemoryAnalyzer.Extensions.LocalSession(); _this._internalFeedback = new MemoryAnalyzer.Extensions.NoOperationInternalFeedback(); _this._etwDataCollector = new Common.Data.F12EtwDataCollector(_this._externalObj.etwDataCollector); try { _this._packager = new Common.Data.F12Packager(_this._externalObj.packager); } catch (e) { _this._packager = null; } memAnalyzerProxy = Plugin.F12.Utilities.createExternalObject("MemoryAnalyzerExtension", "{81ACDD7F-96B1-46DC-8971-424AABD93C69}"); perfTrace = Plugin.F12.TraceWriter; break; default: throw new Error(Plugin.Resources.getErrorString("JSPerf.1027")); } if (perfTrace) { _this._traceWriter = new Common.TraceWriter(perfTrace); } _this._memoryAnalyzerData = new MemoryAnalyzer.Data.MemoryAnalyzerData(memAnalyzerProxy); var userSettingsProxy = new MemoryAnalyzer.Extensions.UserSettingsProxy(); userSettingsProxy.getUserSettings().then(function (userSettings) { _this._userSettings = userSettings; _this._session = session; _this.initializeErrorReporting(); Plugin.addEventListener("close", _this.onClose); session.getSessionInfo().done(function (sessionInfo) { _this._shell = _this.getShell(session, sessionInfo); _this._shell.initializeView(); if (Plugin.F12) { Plugin.F12.TraceWriter.markToolReady(); } _this.onIdle(); }); }); }); }; ProgramMain.prototype.initializeErrorReporting = function () { var _this = this; window.onerror = function (e, url, line) { var column; var additionalInfo; if (arguments && arguments[3] && typeof arguments[3] === "number") { column = arguments[3]; } if (arguments && arguments[4] && arguments[4] instanceof Error) { additionalInfo = "Error number: " + arguments[4].number; additionalInfo += "\r\nStack: " + arguments[4].stack; } else { additionalInfo = "Unhandled Error"; } _this.reportError(new Error(e), additionalInfo, url, line, column); return true; }; }; ProgramMain.prototype.onIdle = function () { Notifications.notify(MemoryAnalyzer.MemoryNotifications.Idle); Plugin.VS.Internal.CodeMarkers.fire(23590 /* perfBrowserTools_MemoryAnalyzerIdle */); }; ProgramMain.prototype.reportError = function (error, additionalInfo, source, line, column) { var _this = this; if (!this.userSettings.disableWER) { var message = (error.message || error.description); var url = source || "MemoryAnalyzer"; var lineNumber = line || 0; var columnNumber = column || 0; var errorInfo = "Error description: " + message; if (error.number) { errorInfo += "\r\nError number: " + error.number; } if (source) { errorInfo += "\r\nSource: " + source; } if (error.stack) { var stack = error.stack; errorInfo += "\r\nError stack: " + stack; if (!message) { var index = stack.indexOf("\n"); if (index > 0) { index = Math.min(index, 50); message = stack.substring(0, index); } } if (typeof source === "undefined") { var matchInfo = stack.match(/(file|res):?([^)]+)\)/); if (matchInfo && matchInfo.length > 2) { url = matchInfo[2]; } } if (typeof line === "undefined") { matchInfo = stack.match(/line ?(\d+)/); if (!matchInfo || matchInfo.length <= 1) { matchInfo = stack.match(/js:?(\d+):/); } if (matchInfo && matchInfo.length > 1) { lineNumber = parseInt(matchInfo[1]); } } } if (additionalInfo) { errorInfo += "\r\nAdditional Info: " + additionalInfo; } Plugin.Diagnostics.reportError(message, url, lineNumber, errorInfo, columnNumber); this.internalFeedback.isEnabled().done(function (enabled) { if (enabled) { _this._session.save(false).done(function (fileLocation) { _this.internalFeedback.sendData(true, "", "", "", errorInfo, fileLocation); }); } }); } }; ProgramMain.prototype.saveSession = function () { return this._session.save(false); }; ProgramMain.prototype.getShell = function (session, sessionInfo) { switch (this.hostType) { case 0 /* VS */: return new MemoryAnalyzer.VsMemoryAnalyzerShell(session, sessionInfo); case 1 /* F12 */: return new MemoryAnalyzer.F12MemoryAnalyzerShell(this._externalObj, session, sessionInfo); default: throw new Error(Plugin.Resources.getErrorString("JSPerf.1027")); } }; ProgramMain.prototype.onClose = function () { Notifications.notify(MemoryAnalyzer.MemoryNotifications.WindowClose); Plugin.VS.Internal.CodeMarkers.fire(23591 /* perfBrowserTools_MemoryAnalyzerWindowClose */); }; return ProgramMain; })(); MemoryAnalyzer.ProgramMain = ProgramMain; MemoryAnalyzer.Program = new ProgramMain(); })(MemoryAnalyzer || (MemoryAnalyzer = {})); MemoryAnalyzer.Program.main(); // RemoteCommands.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var RegisterConsoleCallbacksCommand = (function () { function RegisterConsoleCallbacksCommand(callback) { this._dataReceivedHandler = callback; } Object.defineProperty(RegisterConsoleCallbacksCommand.prototype, "args", { get: function () { return []; }, enumerable: true, configurable: true }); Object.defineProperty(RegisterConsoleCallbacksCommand.prototype, "hasCompleted", { get: function () { return null; }, enumerable: true, configurable: true }); Object.defineProperty(RegisterConsoleCallbacksCommand.prototype, "name", { get: function () { return "registerConsoleCallbacks"; }, enumerable: true, configurable: true }); Object.defineProperty(RegisterConsoleCallbacksCommand.prototype, "dataReceivedHandler", { get: function () { return this._dataReceivedHandler; }, enumerable: true, configurable: true }); Object.defineProperty(RegisterConsoleCallbacksCommand.prototype, "executedHandler", { get: function () { return null; }, enumerable: true, configurable: true }); return RegisterConsoleCallbacksCommand; })(); MemoryAnalyzer.RegisterConsoleCallbacksCommand = RegisterConsoleCallbacksCommand; var MultipartResponseCommand = (function () { function MultipartResponseCommand(name, args) { this._name = name; this._args = args; this._hasCompleted = false; this._currentPartId = 0; this.actualPartCount = 0; this.expectedPartCount = -1; this._parts = {}; this._processedPartCount = 0; this.executedHandler = this.onExecuted.bind(this); this.dataReceivedHandler = this.onDataReceived.bind(this); } Object.defineProperty(MultipartResponseCommand.prototype, "args", { get: function () { return this._args; }, enumerable: true, configurable: true }); Object.defineProperty(MultipartResponseCommand.prototype, "hasCompleted", { get: function () { return this._hasCompleted; }, enumerable: true, configurable: true }); Object.defineProperty(MultipartResponseCommand.prototype, "name", { get: function () { return this._name; }, enumerable: true, configurable: true }); MultipartResponseCommand.prototype.checkCompleted = function () { if (!this.hasCompleted && this.actualPartCount === this.expectedPartCount && this._processedPartCount === this.expectedPartCount) { this._hasCompleted = true; if (this.allPartsReceivedHandler) { this.allPartsReceivedHandler(this._parts); } if (this.completedHandler) { this.completedHandler(this); } } }; MultipartResponseCommand.prototype.onDataReceived = function (part) { var _this = this; if (part.partId === -1) { if (this.errorHandler) { var error; if (part.data) { error = new Error(part.data); } else { error = new Error(Plugin.Resources.getString("ERRoutOfMemory")); } this.errorHandler(error); } return; } ++this.actualPartCount; this._parts[part.partId] = part.data; if (this.partProcessingHandler) { while (typeof this._parts[this._currentPartId] !== "undefined") { var currentPart = this._parts[this._currentPartId]; this.partProcessingHandler(currentPart).done(function () { _this._processedPartCount++; _this.checkCompleted(); }, function (err) { if (_this.errorHandler) { _this.errorHandler(err); } }); delete this._parts[this._currentPartId]; ++this._currentPartId; } } else { this._processedPartCount++; } this.checkCompleted(); }; MultipartResponseCommand.prototype.onExecuted = function (args) { if (typeof args !== "undefined") { this.expectedPartCount = args; } else { if (this.errorHandler) { this.errorHandler(new Error(Plugin.Resources.getErrorString("JSPerf.1059"))); } } }; return MultipartResponseCommand; })(); MemoryAnalyzer.MultipartResponseCommand = MultipartResponseCommand; var TakeSnapshotCommand = (function (_super) { __extends(TakeSnapshotCommand, _super); function TakeSnapshotCommand(args, file) { var _this = this; _super.call(this, "takeSnapshot", args); this._file = file; this.partProcessingHandler = function (data) { return _this._file.write(data); }; } return TakeSnapshotCommand; })(MultipartResponseCommand); MemoryAnalyzer.TakeSnapshotCommand = TakeSnapshotCommand; })(MemoryAnalyzer || (MemoryAnalyzer = {})); var MemoryAnalyzer; (function (MemoryAnalyzer) { "use strict"; var __BROWSERTOOLS_FileReaderReadyState; (function (__BROWSERTOOLS_FileReaderReadyState) { __BROWSERTOOLS_FileReaderReadyState[__BROWSERTOOLS_FileReaderReadyState["Empty"] = 0] = "Empty"; __BROWSERTOOLS_FileReaderReadyState[__BROWSERTOOLS_FileReaderReadyState["Loading"] = 1] = "Loading"; __BROWSERTOOLS_FileReaderReadyState[__BROWSERTOOLS_FileReaderReadyState["Done"] = 2] = "Done"; })(__BROWSERTOOLS_FileReaderReadyState || (__BROWSERTOOLS_FileReaderReadyState = {})); var __BROWSERTOOLS_RemoteCode = (function () { function __BROWSERTOOLS_RemoteCode() { expectedWindowProperty = "__BROWSERTOOLS_MEMORYANALYZER_ADDED"; } __BROWSERTOOLS_RemoteCode.prototype.initialize = function () { browser.addEventListener("beforeScriptExecute", this.onBeforeScriptExecute.bind(this)); this.consoleNotificationQueue = []; var messageHandlers = []; messageHandlers["takeSnapshot"] = this.takeSnapshot.bind(this); messageHandlers["registerConsoleCallbacks"] = this.registerConsoleCallbacks.bind(this); this._remoteHelper = new Common.PerfTools.__BROWSERTOOLS_RemoteHelper(messageHandlers); this._remoteHelper.initialize("MemoryAnalyzerPort", this.initializePage.bind(this), this.onDetach.bind(this)); }; __BROWSERTOOLS_RemoteCode.appendSnapshotPart = function (record, snapshot) { if (!record) { return; } var part = JSON.parse(record); if (!snapshot.version && part.version) { snapshot.version = part.version; } if (part.data) { if (!snapshot.data) { snapshot.data = []; } for (var i = 0; i < part.data.length; ++i) { snapshot.data.push(part.data[i]); } } if (!snapshot.privateBytes && part.privateBytes) { snapshot.privateBytes = part.privateBytes; } if (!snapshot.pointerSize && part.pointerSize) { snapshot.pointerSize = part.pointerSize; } if (!snapshot.base64Image && part.base64Image) { snapshot.base64Image = part.base64Image; } }; __BROWSERTOOLS_RemoteCode.readAndChunk = function (blob, chunkSize, callback) { var reader = new FileReader(); reader.onloadend = function (e) { if (reader.readyState === 2 /* Done */) { try { if (!reader.result) { throw new Error(); } var partCount = Math.ceil(blob.size / chunkSize); for (var partId = 0; partId < partCount; ++partId) { var start = partId * chunkSize; var end = Math.min(start + chunkSize, blob.size); var data = reader.result.substring(start, end); var response = { partId: partId, data: data }; callback(response); } } catch (ex) { var errorResponse = { partId: -1, data: ex.message }; callback(errorResponse); } finally { blob.msClose(); resources.memory.triggerGarbageCollection(); } } }; reader.readAsText(blob); }; __BROWSERTOOLS_RemoteCode.prototype.addRemotePageFunctions = function (realWindow) { realWindow[expectedWindowProperty] = browser.createSafeFunction(realWindow, function () { }); }; __BROWSERTOOLS_RemoteCode.prototype.initializeConsole = function (realWindow) { var _this = this; if (realWindow.Console && realWindow.Console.prototype) { if (!realWindow.Console.prototype.takeHeapSnapshot) { realWindow.Console.prototype.takeHeapSnapshot = browser.createSafeFunction(realWindow, function (message) { _this.onConsoleExecute("takeHeapSnapshot", message); }); } } var __BROWSERTOOLS_detachHandler = function () { _this.onDetach(); toolUI.removeEventListener("detach", __BROWSERTOOLS_detachHandler); }; var __BROWSERTOOLS_unloadHandlerSafe = browser.createSafeFunction(realWindow, function () { toolUI.removeEventListener("detach", __BROWSERTOOLS_detachHandler); }); if (realWindow.addEventListener) { realWindow.addEventListener("unload", __BROWSERTOOLS_unloadHandlerSafe); } else { realWindow.attachEvent("onunload", __BROWSERTOOLS_unloadHandlerSafe); } toolUI.addEventListener("detach", __BROWSERTOOLS_detachHandler); }; __BROWSERTOOLS_RemoteCode.prototype.initializeConsoles = function (windowToAttach) { var realWindow = null; try { realWindow = windowToAttach.document.parentWindow; } catch (ex) { return; } this.initializeConsole(realWindow); if (realWindow.frames) { for (var i = 0; i < realWindow.frames.length; i++) { var frame = realWindow.frames[i]; if (frame) { var iframe = dom.getCrossSiteWindow(realWindow, frame); if (iframe) { this.initializeConsoles(iframe); } } } } }; __BROWSERTOOLS_RemoteCode.prototype.initializePage = function () { try { if (browser.document.documentMode >= 10) { this.addRemotePageFunctions(browser.document.parentWindow); this.initializeConsoles(browser); } var connectionInfo = { docMode: browser.document.documentMode, contextInfo: browser.document.parentWindow.location.href }; this._remoteHelper.port.postMessage("Handshake:" + JSON.stringify(connectionInfo)); this._remoteHelper.initializeDocumentTries = 0; } catch (ex) { this.onDocumentNotReady(); } }; __BROWSERTOOLS_RemoteCode.prototype.onBeforeScriptExecute = function (dispatchWindow) { if (dispatchWindow && dispatchWindow.browserOrWindow) { dispatchWindow = dispatchWindow.browserOrWindow; } var realWindow = null; try { realWindow = dispatchWindow.document.parentWindow; } catch (ex) { return; } if (realWindow === browser.document.parentWindow && this._remoteHelper.port) { this._remoteHelper.postAllMessages(); this.initializePage(); } }; __BROWSERTOOLS_RemoteCode.prototype.onConsoleExecute = function (functionId, data) { if (!this.notifyCallback) { this.consoleNotificationQueue.push({ notifyType: functionId, message: data }); } else { this.notifyCallback({ notifyType: functionId, message: data }); } }; __BROWSERTOOLS_RemoteCode.prototype.onDetach = function () { this._remoteHelper.initializeDocumentTries = 0; try { var realWindow = browser.document.parentWindow; if (realWindow[expectedWindowProperty]) { delete realWindow[expectedWindowProperty]; } } catch (ex) { } }; __BROWSERTOOLS_RemoteCode.prototype.onDocumentNotReady = function () { if (this._remoteHelper.initializeDocumentTries < this._remoteHelper.initializeDocumentMaxTries) { ++this._remoteHelper.initializeDocumentTries; this._remoteHelper.port.postMessage("DocumentNotYetReady"); } else { this._remoteHelper.errorHandler.handleError("Document timed out", "Remote.js", 0); } }; __BROWSERTOOLS_RemoteCode.prototype.registerConsoleCallbacks = function (notifyCallback) { this.notifyCallback = notifyCallback; for (var i = 0; i < this.consoleNotificationQueue.length; i++) { var notification = this.consoleNotificationQueue[i]; this.onConsoleExecute(notification.notifyType, notification.message); } }; __BROWSERTOOLS_RemoteCode.prototype.takeSnapshot = function (chunkSize, targetWidth, targetHeight, keepAspectRatio, callback) { try { var snapshot = resources.memory.getMemoryProfile(); var screenshot; try { screenshot = browser.takeVisualSnapshot(targetWidth, targetHeight, keepAspectRatio); } catch (e) { } var pointerSize = resources.memory.processPointerSize; var privateBytes = resources.memory.processPrivateBytes.toString(); var snapshotPartCount = Math.ceil(snapshot.size / chunkSize); var screenshotPartCount = screenshot ? Math.ceil(screenshot.size / chunkSize) : 0; var totalPartCount = snapshotPartCount + screenshotPartCount + 1; var newline = "\r\n"; __BROWSERTOOLS_RemoteCode.readAndChunk(snapshot, chunkSize, callback); if (screenshot) { var screenshotPartStartId = snapshotPartCount; var screenshotReader = new FileReader(); screenshotReader.onloadend = function (e) { if (screenshotReader.readyState === 2 /* Done */) { try { var object = { base64Image: screenshotReader.result }; var data = newline + JSON.stringify(object) + newline; var response; for (var chunkId = 0; chunkId < screenshotPartCount; ++chunkId) { var start = chunkId * chunkSize; var end; if (chunkId === screenshotPartCount - 1) { end = data.length; } else { end = (chunkId + 1) * chunkSize; } response = { partId: chunkId + screenshotPartStartId, data: data.substring(start, end) }; callback(response); } } catch (ex) { var errorResponse = { partId: -1, data: ex.message }; callback(errorResponse); } finally { screenshot.msClose(); } } }; screenshotReader.readAsText(screenshot); } var clientName = browser.document.parentWindow.navigator.appName; var clientVersion = browser.document.parentWindow.navigator.appVersion; var docMode = browser.documentMode / 10000; var object = { pointerSize: pointerSize, privateBytes: privateBytes, clientName: clientName, clientVersion: clientVersion, docMode: docMode }; var data = JSON.stringify(object) + newline; if (!screenshot) { data = newline + data; } var response = { partId: totalPartCount - 1, data: data }; callback(response); return totalPartCount; } catch (ex) { var errorResponse = { partId: -1, data: ex.message }; callback(errorResponse); } }; return __BROWSERTOOLS_RemoteCode; })(); MemoryAnalyzer.__BROWSERTOOLS_RemoteCode = __BROWSERTOOLS_RemoteCode; })(MemoryAnalyzer || (MemoryAnalyzer = {})); var remoteCode = new MemoryAnalyzer.__BROWSERTOOLS_RemoteCode(); remoteCode.initialize(); .snapshotTilesContainer { -ms-grid-row: 3; color: TRANSPARENT; /*[{plugin-color}]*/ display: -ms-flexbox; flex-wrap: wrap; font-size: 9pt; /*[{plugin-font-size}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ padding-left: 14px; padding-right: 14px; } .snapshotTilesContainer a:focus { outline: 1px dotted TRANSPARENT; /*[1px dotted {plugin-perftools-focusdots}]*/ } .snapshotTile { position: relative; } .snapshotTile > .snapshotTileInner { -ms-grid-columns: 1fr; -ms-grid-rows: auto auto auto; box-sizing: border-box; display: -ms-grid; font-size: small; margin: 5px 10px 5px 0px; min-height: 243px; min-width: 262px; position: relative; } .snapshotTileInner > .snapshotTileHeader { -ms-grid-columns: auto auto 1fr; -ms-grid-row: 1; -ms-grid-rows: auto; display: -ms-grid; padding: 5px; background-color: TRANSPARENT; /*[{plugin-memory-snapshot-tile-header}]*/ border-bottom: 1px solid TRANSPARENT; /*[1px solid {plugin-memory-snapshot-tile-border}]*/ margin-bottom: 5px; position: relative; width: 100%; } .snapshotTileInner > .snapshotTileHeader > .snapshotTileTitle { padding-top: 1px; display: inline-block; -ms-grid-column: 1; } .snapshotTileInner > .snapshotTileHeader > .snapshotTakenDate { margin-left: 5px; display: inline-block; -ms-grid-column: 2; } .snapshotTileInner > .snapshotTileHeader > .snapshotTileDetachedDomNodeInfo { -ms-flex-align: center; -ms-flex-item-align: center; -ms-grid-column: 3; -ms-grid-column-align: end; display: -ms-flexbox; margin-right: 5px; visibility: hidden; } .snapshotTileInner > .snapshotTileHeader > .snapshotTileDetachedDomNodeInfo > .detachedDomNodeWarning { display: inline-block; height: 15px; margin-right: 3px; width: 15px; } .snapshotTileInner > .snapshotTileHeader > .snapshotTileDetachedDomNodeInfo > .snapshotTileDetachedDomNodeCount { vertical-align: top; } .snapshotTileInner > .snapshotTileGrid { -ms-grid-row: 2; -ms-grid-rows: auto auto; -ms-grid-columns: auto auto 1fr auto auto; color: TRANSPARENT; /*[{plugin-link-color}]*/ display: -ms-grid; margin-left: 5px; margin-right: 5px; } .snapshotTileInner > .snapshotTileGrid a { margin-top: 5px; white-space: nowrap; } .snapshotTileInner > .snapshotTileGrid .bottomRow { margin-top: 4px; -ms-grid-row: 2; } .snapshotTileInner > .snapshotTileGrid .rightColumn { -ms-grid-column: 4; } .snapshotTileInner > .snapshotTileGrid .rightalign { -ms-grid-column-align: end; } .snapshotTileInner > .snapshotTileGrid .heapIcon { -ms-grid-column: 2; -ms-grid-row-align: center; margin-left: 3px; } .snapshotTileInner > .snapshotTileGrid .objectsIcon { -ms-grid-column: 5; -ms-grid-row-align: center; margin-left: 3px; } .snapshotTileInner > .snapshotTileGrid .heapDecreaseIcon { background: url('images/status_heap_decrease.png') no-repeat 0px 0px; /*[url({image-heap-decrease}) no-repeat 0px 0px]*/ background-size: 10px 11px; height: 11px; width: 10px; } .snapshotTileInner > .snapshotTileGrid .heapIncreaseIcon { background: url('images/status_heap_increase.png') no-repeat 0px 0px; /*[url({image-heap-increase}) no-repeat 0px 0px]*/ background-size: 10px 11px; height: 11px; width: 10px; } .snapshotTileInner > .snapshotTileGrid .baselineText { color: TRANSPARENT; /*[{plugin-memory-snapshot-tile-baseline-text}]*/ text-decoration: none; } .snapshotTileInner > .snapshotTileImageHolder { -ms-grid-row: 3; display: -ms-grid; -ms-grid-columns: 1fr auto 1fr; margin-top: 10px; margin-bottom: 10px; } .snapshotTileInner > .snapshotTileImageHolder > .snapshotTileImage { -ms-grid-column: 2; max-width: 250px; max-height: 150px; } .snapshotTileTaken > .snapshotTileInner { background-color: TRANSPARENT; /*[{plugin-memory-snapshot-tile}]*/ border: 1px solid TRANSPARENT; /*[1px solid {plugin-memory-snapshot-tile-border}]*/ } .snapshotTileBlank { -ms-grid-columns: 1fr; -ms-grid-rows: auto 1fr; background-color: transparent; border: none; display: -ms-grid; } .snapshotTileBlank > .snapshotError { -ms-grid-row: 1; color: red; /*[{plugin-memory-snapshot-tile-error-text}]*/ display: none; font-weight: 600; margin: 10px; text-align: center; text-transform: none; top: 10%; width: 200px; } .snapshotTileBlank > .snapshotTileInner { -ms-grid-row: 2; background-color: transparent; box-sizing: border-box; display: table; min-height: 150px; min-width: 200px; padding: 0; width: 100%; } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton { display: table-cell; text-align: center; vertical-align: middle; border-width: 1px; border-style: solid; padding: 0; background-image: none; font-size: 1.0em; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ background-color: TRANSPARENT; /*[{plugin-memory-snapshot-button}]*/ border-color: TRANSPARENT; /*[{plugin-memory-snapshot-button-border}]*/ color: TRANSPARENT; /*[{plugin-link-color}]*/ } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton:hover:enabled { background-color: TRANSPARENT; /*[{plugin-memory-snapshot-button-hover}]*/ border-color: TRANSPARENT; /*[{plugin-memory-snapshot-button-border-hover}]*/ color: TRANSPARENT; /*[{plugin-memory-snapshot-button-hover-text}]*/ } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton:focus:enabled { background-color: TRANSPARENT; /*[{plugin-memory-snapshot-button-hover}]*/ color: TRANSPARENT; /*[{plugin-memory-snapshot-button-hover-text}]*/ } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton:active:enabled { background-color: TRANSPARENT; /*[{plugin-memory-snapshot-button-active}]*/ border-color: TRANSPARENT; /*[{plugin-memory-snapshot-button-border-active}]*/ color: TRANSPARENT; /*[{plugin-memory-snapshot-button-active-text}]*/ } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton.disabled { background-color: TRANSPARENT; /*[{plugin-memory-snapshot-button-disabled}]*/ color: TRANSPARENT; /*[{plugin-memory-snapshot-button-disabled-text}]*/ } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton.disabled .takeSnapshotIcon { background-position-y: -64px; } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton .snapshotTileTextContainer { -ms-grid-columns: 1fr; -ms-grid-rows: 1fr 1fr; display: -ms-grid; } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton .snapshotTileTextContainer .takeSnapshotIcon { -ms-grid-column: 1; -ms-grid-column-align: center; -ms-grid-row: 1; -ms-grid-row-align: end; background: url('images/takeSnapshot.png') no-repeat 0px 0px; /*[url({image-snapshot}) no-repeat 0px 0px]*/ background-size: 32px 96px; height: 32px; margin-right: 5px; width: 32px; } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton .snapshotTileTextContainer .takeSnapshotLabel { -ms-grid-column: 1; -ms-grid-column-align: center; -ms-grid-row: 2; -ms-grid-row-align: start; } .snapshotTileBlank > .snapshotTileInner .takeSnapshotButton progress { width: 50%; margin: auto; display: none; color: TRANSPARENT; /*[{plugin-perftools-progress}]*/ } PNG  IHDR `|"ptEXtSoftwareAdobe ImageReadyqe<!iTXtXML:com.adobe.xmp &%IDATxYM0#(#t|1` Q#:3A@RUΎwŽ'{ϧCm[tQUhFIEP 'Ǟ뚘MFB.]2-'6豦}%@a.#4Q `b^QK *-=>hsK8R{nHeNb\!A[d7 =~YF4zH)yYw{kSJLjȑ\}ˑW:D=| &}ۈV\KA,Ɗ1J}:039[~|@bHJ"@N+vԕ-+yJiGDIP[bvAzlaD uDkSJLOO+.]2-'6X(|1!uDG8=ZWPi39,'TL+u hі? %dWuIENDB`PNG  IHDRr ߔ pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FQIDATxڼMMa9sga42ac(yKBfP,PBd! J!ElXdF,,䵰0Čqϵ\;s_̯y=9Em]PIH C7ˤ-lĴ "b'vHEa|I2r BMq&RrF6W pTlwQg{-NnNq+lÁIJGmֆء9M2Lsp zJ?TЖغ2_n,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEVC-hj9sWdda. V17(`O&ÓS ^[1 4ׯ~K N:A ,5e`E\y΀A%~xַժ\yOYo_L/)fIuu(3{PaH LKiz1aOvG!f{syf#;|6gpT vOLbj8X}boqDP19|)P3foC`)PWO18*{KB38*G⍕-} 3xb0qwsK@|H)+f}x*g8)ԁdR1`.[e1J͢SI FL I &HVIENDB`PNG  IHDR6l!PAL pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-8_iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-04-09T14:16:50-07:00 2014-04-09T14:19:26-07:00 2014-04-09T14:19:26-07:00 image/png 3 sRGB IEC61966-2.1 xmp.iid:3d55df56-ba72-7d4b-bfd8-a919668cc922 xmp.did:3d55df56-ba72-7d4b-bfd8-a919668cc922 xmp.did:3d55df56-ba72-7d4b-bfd8-a919668cc922 created xmp.iid:3d55df56-ba72-7d4b-bfd8-a919668cc922 2014-04-09T14:16:50-07:00 Adobe Photoshop CC (Windows) 1 720000/10000 720000/10000 2 1 54 108 { cHRMz%u0`:o_FIDATx=@߸|)>tHFNx7q)O'FUE*.ȁ2BҨ^Gj >y3dY9gWh`7ߘ7LZX1`Y1 _z8^TLUS ;y^1U x$AU{T@|gUxLκRՙתs8YA>ah:m_;mG3m}L0})ϲ@d+VP~`PڏX1"֌*~>[1188nXzÛO?jc^Zũ\U`<+7;^T,phG2}LU fK&SʼnO,3ʍwU1[psn\xWX.<ș1ϙ1#ޏTŊl67~f|qŌ1:zSDKU$nQ5Ǭc\c#Xqp1JoXVb/Xۂ4UbbE=\A[kE$5<61IYZDR{Yăg8Aȣת("vǃvÃ6@Dz>T>Ƀ1#ǺX11`g.!0(IENDB`PNG  IHDRA pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxԽ@0&F5LSMb:R+OGT~%7N"s,`Sfc .`޸E.1Q~ zTzÂ`bQ0GPAXx@' `U9LIENDB`PNG  IHDRA pHYs+ OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FrIDATxҭ0 NBcYɻ (i#{.yO(ZKa{*= Xe&l~Qv`Y셚A?R '8AM{8>XHqIENDB`PNG  IHDR@egAMA a pHYsktEXtSoftwarePaint.NET v3.5.100rAIDATx^qHE3+ *~Yel.] A!(/TDOpg}N6.ك$}AAA޾}ݻw*}իWߘFZ hro&Z.S O=z7?AvF>B62 }3{m4.Q`ӧntGԪ6OםNApBZҫgSه. l]PCfåKDi[Tx#{t6&^K͸ћ%]Qe&G7JsQL@I[hm[oaglw     "~ϟ*Jk+46?A~,/4~ߚٴ@GSm͏nr yqݛ]}ZvS'|/ с@q<^H?cE$`񇢘!^VB[";#:~,8Uc8Omx!{mx!{mȹ/E_).F/P6뷄KHAAAOy?Z)H+IENDB`/* * TabControl styles */ .tabControl { height: 100%; display: -ms-grid; -ms-grid-columns: 1fr; -ms-grid-rows: auto 1fr; box-sizing: border-box; width: 100%; } .tabControl > .tabHeader { -ms-grid-column: 1; -ms-grid-columns: auto 1fr auto; -ms-grid-row: 1; background-color: TRANSPARENT; /*[{plugin-memory-tab-header}]*/ display: -ms-grid; } .tabControl > .tabHeader > .beforeBarContainer { -ms-grid-column: 1; -ms-grid-row: 1; box-sizing: border-box; display: table-cell; float: left; } .tabControl > .tabHeader > .tabBarContainer { -ms-grid-column: 2; -ms-grid-row: 1; -ms-grid-column-align: end; -ms-grid-row-align: center; box-sizing: border-box; display: table-cell; } .tabControl > .tabHeader > .tabBarContainerLeftAlign { -ms-grid-column-align: start; } .tabControl > .tabHeader > .afterBarContainer { -ms-grid-column: 3; -ms-grid-row: 1; box-sizing: border-box; display: table-cell; float: right; } .tabControl ul.tabBar { list-style-type: none; margin: 0; padding: 0; cursor: default; } .tabControl ul.tabBar li { display: inline-block; margin: 5px 14px 5px 14px; color: TRANSPARENT; /*[{plugin-memory-tab-text}]*/ font-size: 90%; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ } .tabControl ul.tabBar li:hover { background-color: TRANSPARENT; /*[{plugin-memory-tab-hover}]*/ color: TRANSPARENT; /*[{plugin-memory-tab-hover-text}]*/ cursor: pointer; } .tabControl ul.tabBar li:focus { outline: 1px dotted TRANSPARENT; /*[1px dotted {plugin-perftools-focusdots}]*/ } .tabControl ul.tabBar li.active { background-color: TRANSPARENT; /*[{plugin-memory-tab-hover}]*/ color: TRANSPARENT; /*[{plugin-memory-tab-hover-text}]*/ font-weight: 600; } .tabControl > .tabContentPane { -ms-grid-column: 1; -ms-grid-column-span: 3; -ms-grid-row: 2; box-sizing: border-box; } .tabControl > .tabContentPane > .tabItemContent { display: none; } .tabControl > .tabContentPane > .active { display: block; } .dataImageDecoding { background: #79d7f2; stroke: #79d7f2; fill: none; opacity: 1; } .dataLoading { background: #0072c6; stroke: #0072c6; fill: none; opacity: 1; } .dataOther { background: #b5b5b5; stroke: #b5b5b5; fill: none; opacity: 1; } .dataRendering { background: #9b4f96; stroke: #9b4f96; fill: none; opacity: 1; } .dataScripting { background: #dd5900; stroke: #dd5900; fill: none; opacity: 1; } .dataScriptingGc { background: #f1ad00; stroke: #f1ad00; fill: none; opacity: 1; } .dataStyling { background: #7fba00; stroke: #7fba00; fill: none; opacity: 1; } .graph-div .dataImageDecoding { stroke: none; fill: #79d7f2; } .graph-div .dataLoading { stroke: none; fill: #0072c6; } .graph-div .dataOther { stroke: none; fill: #b5b5b5; } .graph-div .dataRendering { stroke: none; fill: #9b4f96; } .graph-div .dataScripting { stroke: none; fill: #dd5900; } .graph-div .dataScriptingGc { stroke: none; fill: #f1ad00; } .graph-div .dataStyling { stroke: none; fill: #7fba00; } .dataMeasure { background: #555555; stroke: #555555; fill: none; opacity: 1; } .dataFrame { background: #555555; stroke: #555555; fill: none; opacity: 1; } { "start_url": "PerfTools\\VisualProfiler\\VisualProfiler.html", "domain": "http://microsoft.com", "name": "JavaScript Visual Profiler", "version": "1.1", "f12": { "start_url": "VisualProfiler.html", "file_aliases": { "DiagnosticsHub.DataWarehouseHost": { "path": "DiagnosticsHub.ScriptedSandboxPlugin.dll" }, "PerformanceTraceExtension": { "path": "PerformanceTrace.dll", "optional": true } }, "localized_tab_resource": "F12ToolTitle", "localized_tooltip_id": 3173, "resource_aliases": { "VisualProfiler": { "is_default": true }, "Common":{ } }, "themed_images": { "f12-image-host-error-alert": { "bitmap_source": "..\\..\\pluginhost\\theme\\i_alerterror.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-host-error-close": { "bitmap_source": "..\\..\\pluginhost\\theme\\closeErrorBox.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-host-error-help": { "bitmap_source": "..\\..\\pluginhost\\theme\\helpErrorBox.png", "background_color": "plugin-font-editor-background-color" }, "f12-image-contextmenu-chartzoom-in": { "bitmap_source": "images\\i_f12_context_chartzoom_in.png", "background_color": "plugin-background-color" }, "f12-image-contextmenu-chartzoom-in-disabled": { "bitmap_source": "images\\i_f12_context_chartzoom_in_disabled.png", "background_color": "plugin-background-color" }, "f12-image-contextmenu-chartzoom-reset": { "bitmap_source": "images\\i_f12_context_chartzoom_reset.png", "background_color": "plugin-background-color" }, "f12-image-contextmenu-chartzoom-reset-disabled": { "bitmap_source": "images\\i_f12_context_chartzoom_reset_disabled.png", "background_color": "plugin-background-color" }, "f12-image-contextmenu-chartselection-clear": { "bitmap_source": "images\\i_f12_context_chartselection_clear.png", "background_color": "plugin-background-color" }, "f12-image-contextmenu-chartselection-clear-disabled": { "bitmap_source": "images\\i_f12_context_chartselection_clear_disabled.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-chartzoom-in": { "bitmap_source": "images\\i_f12_chartzoom_in.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-chartzoom-reset": { "bitmap_source": "images\\i_f12_chartzoom_reset.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-chartselection-clear": { "bitmap_source": "images\\i_f12_chartselection_clear.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-open": { "bitmap_source": "..\\Common\\images\\i_open.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-save": { "bitmap_source": "..\\Common\\images\\i_save.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-start": { "bitmap_source": "..\\Common\\images\\i_start.png", "background_color": "plugin-background-color" }, "f12-image-toolbar-stop": { "bitmap_source": "..\\Common\\images\\i_stop.png", "background_color": "plugin-background-color" }, "vs-image-icon-tree-expanded": { "bitmap_source": "..\\Common\\images\\itemExpandedIcon.png", "background_color": "plugin-background-color" }, "vs-image-icon-tree-collapsed": { "bitmap_source": "..\\Common\\images\\itemCollapsedIcon.png", "background_color": "plugin-background-color" }, "vs-image-graph-user-mark": { "bitmap_source": "..\\Common\\images\\i_usermark.png", "background_color": "plugin-background-color" }, "vs-image-graph-app-event": { "bitmap_source": "..\\Common\\images\\i_appevent.png", "background_color": "plugin-background-color" }, "vs-image-graph-aggregated-event": { "bitmap_source": "..\\Common\\Images\\CustomMark5_18x.png", "background_color": "plugin-background-color" }, "image-checkered-background": { "bitmap_source": "images\\i_checkered_background.png", "background_color": "plugin-background-color" }, "image-checkmark": { "bitmap_source": "..\\Common\\images\\checkmark.png", "background_color": "plugin-memory-drop-down-button" }, "image-filtering": { "bitmap_source": "images\\i_filtering_options.png", "background_color": "plugin-background-color" }, "image-frame-grouping": { "bitmap_source": "images\\i_frame_grouping.png", "background_color": "plugin-background-color" } } }, "file_aliases": { "PerformanceTraceExtension": { "path": "PerfTools\\PerformanceTrace.dll", "optional": true }, "DiagnosticsHub.DataWarehouseHost": {} }, "vs": { "resource_aliases": { "VisualProfiler": { "path": "PerfTools\\VisualProfiler\\Resources\\Resources", "is_default": true } }, "guid_symbols": { "GuidPerfToolHostCmdSet": "5D4B80C3-23AB-4391-9F90-794C201831CE", "GuidPerfToolGridContextMenu": "DB731D4D-421B-4944-9695-28538DD8A563" }, "theme_token_aliases": { "diagnostics-host-border": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "Border" }, "diagnostics-host-graph-cursor": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "GraphCursor" }, "diagnostics-host-graph-line": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "GraphLine" }, "diagnostics-host-graph-scale": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "GraphScale" }, "diagnostics-host-ruler-slider": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "RulerSlider" }, "diagnostics-host-ruler-slider-active": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "RulerSliderActive" }, "diagnostics-host-ruler-tickmark": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "RulerTickmark" }, "diagnostics-host-swimlane-border": { "category": "f8a8b2a5-dd35-43f6-a382-fd6a61325c22", "key_type": "BackgroundColor", "name": "SwimlaneBorder" }, "f12-toolbar-button-hover-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseOverBackgroundBegin" }, "f12-toolbar-button-hover-text-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarTextHover" }, "f12-toolbar-button-selected-border-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarSelectedBorder" }, "f12-toolbar-button-selected-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarSelected" }, "f12-toolbar-button-selected-text-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarTextSelected" }, "f12-toolbar-button-pressed-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBackgroundBegin" }, "plugin-menucontrol-background-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "Menu" }, "plugin-perftools-detail-pane": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "DetailPane" }, "plugin-perftools-drop-down-button-focus": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBackgroundMiddle" }, "plugin-perftools-drop-down-button-focus-border": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBorder" }, "plugin-perftools-focusdots": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "FocusDots" }, "plugin-perftools-grid-column-sizer": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "GridColumnSizer" }, "plugin-perftools-grid-header-hover": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "GridHeaderHover" }, "plugin-perftools-grid-header-hover-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "GridHeaderHover" }, "plugin-perftools-grid-header-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "GridHeaderText" }, "plugin-perftools-menu": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "Menu" }, "plugin-perftools-menu-border": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "MenuBorder" }, "plugin-perftools-menu-drop-shadow": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ThreeDLightShadow" }, "plugin-perftools-menu-focus": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "MenuFocus" }, "plugin-perftools-menu-focus-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "MenuFocus" }, "plugin-perftools-menu-hover": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "MenuHover" }, "plugin-perftools-menu-hover-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "MenuHover" }, "plugin-perftools-progress": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "Progress" }, "plugin-perftools-splitter": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "Splitter" }, "plugin-perftools-watermark-text": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "ForegroundColor", "name": "WatermarkText" }, "plugin-responsiveness-drop-down-button-hover": { "category": "6ADCF200-0249-47F3-B14F-AB041A443E9B", "key_type": "BackgroundColor", "name": "DropDownButtonHover" }, "plugin-responsiveness-graph-border": { "category": "6ADCF200-0249-47F3-B14F-AB041A443E9B", "key_type": "BackgroundColor", "name": "GraphBorder" }, "plugin-searchcontrol-mouseover-background-background-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "MouseOverBackground" }, "plugin-searchcontrol-mouseover-watermark-text-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "MouseOverWatermarkText" }, "plugin-searchcontrol-unfocused-background-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "Unfocused" }, "plugin-searchcontrol-unfocused-watermark-text-color": { "category": "f1095fad-881f-45f1-8580-589e10325eb8", "key_type": "BackgroundColor", "name": "UnfocusedWatermarkText" }, "vs-command-bar-gradient-begin-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarGradientBegin" }, "vs-command-bar-menu-separator-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMenuSeparator" }, "vs-command-bar-mouse-down-background-end-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBackgroundEnd" }, "vs-command-bar-mouse-down-border-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseDownBorder" }, "vs-command-bar-mouse-over-background-middle1-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarMouseOverBackgroundMiddle1" }, "vs-command-bar-selected-border-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarSelectedBorder" }, "vs-command-bar-text-inactive-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarTextInactive" }, "vs-command-bar-text-selected-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "CommandBarTextSelected" }, "vs-tool-window-text-color": { "category": "624ed9c3-bdfd-41fa-96c3-7c824ea32e3d", "key_type": "BackgroundColor", "name": "ToolWindowText" }, "plugin-font-editor-string-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "String" }, "plugin-font-editor-number-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "Number" }, "plugin-font-editor-html-element-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Element Name" }, "plugin-font-editor-html-tag-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Tag Delimiter" }, "plugin-font-editor-html-attribute-name-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Attribute" }, "plugin-font-editor-html-attribute-value-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Attribute Value" }, "plugin-font-editor-html-operator-color": { "category": "75a05685-00a8-4ded-bae5-e7a50bfa929a", "key_type": "ForegroundColor", "name": "HTML Operator" }, "plugin-perftools-treeview-content-inactive-selected-background-color": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "InactiveSelectedBackgroundColor" }, "plugin-perftools-treeview-content-inactive-selected-color": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "InactiveSelectedText" }, "plugin-perftools-treeview-content-mouseover-background-color": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "MouseOverBackgroundColor" }, "plugin-perftools-treeview-content-mouseover-color": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "MouseOverText" }, "plugin-perftools-treeview-content-selected-background-color": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "SelectedBackgroundColor" }, "plugin-perftools-treeview-content-selected-color": { "category": "634eef98-6af2-4f63-8d9f-36351e18b606", "key_type": "BackgroundColor", "name": "SelectedText" } }, "themed_images": { "vs-image-contextmenu-chartzoom-in": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartzoom_in.png", "background_color": "plugin-contextmenu-background-color" }, "vs-image-contextmenu-chartzoom-in-disabled": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartzoom_in_disabled.png", "background_color": "plugin-contextmenu-background-color" }, "vs-image-contextmenu-chartzoom-reset": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartzoom_reset.png", "background_color": "plugin-contextmenu-background-color" }, "vs-image-contextmenu-chartzoom-reset-disabled": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartzoom_reset_disabled.png", "background_color": "plugin-contextmenu-background-color" }, "vs-image-contextmenu-chartselection-clear": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartselection_clear.png", "background_color": "plugin-contextmenu-background-color" }, "vs-image-contextmenu-chartselection-clear-disabled": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartselection_clear_disabled.png", "background_color": "plugin-contextmenu-background-color" }, "vs-image-icon-tree-expanded": { "bitmap_source": "PerfTools\\Common\\images\\itemExpandedIcon.png", "background_color": "plugin-background-color" }, "vs-image-icon-tree-collapsed": { "bitmap_source": "PerfTools\\Common\\images\\itemCollapsedIcon.png", "background_color": "plugin-background-color" }, "vs-image-toolbar-chartzoom-in": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartzoom_in.png", "background_color": "vs-command-bar-gradient-begin-color" }, "vs-image-toolbar-chartzoom-in-disabled": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartzoom_in_disabled.png", "background_color": "vs-command-bar-gradient-begin-color" }, "vs-image-toolbar-chartzoom-reset": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartzoom_reset.png", "background_color": "vs-command-bar-gradient-begin-color" }, "vs-image-toolbar-chartzoom-reset-disabled": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartzoom_reset_disabled.png", "background_color": "vs-command-bar-gradient-begin-color" }, "vs-image-toolbar-chartselection-clear": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartselection_clear.png", "background_color": "vs-command-bar-gradient-begin-color" }, "vs-image-toolbar-chartselection-clear-disabled": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_chartselection_clear_disabled.png", "background_color": "vs-command-bar-gradient-begin-color" }, "vs-image-graph-user-mark": { "bitmap_source": "PerfTools\\Common\\images\\i_usermark.png", "background_color": "plugin-background-color" }, "vs-image-graph-app-event": { "bitmap_source": "PerfTools\\Common\\images\\i_appevent.png", "background_color": "plugin-background-color" }, "vs-image-graph-aggregated-event": { "bitmap_source": "PerfTools\\Common\\Images\\CustomMark5_18x.png", "background_color": "plugin-background-color" }, "image-checkered-background": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_checkered_background.png", "background_color": "plugin-background-color" }, "image-checkmark": { "bitmap_source": "PerfTools\\Common\\images\\checkmark.png", "background_color": "plugin-background-color" }, "image-filtering": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_filtering_options.png", "background_color": "plugin-background-color" }, "image-frame-grouping": { "bitmap_source": "PerfTools\\VisualProfiler\\images\\i_frame_grouping.png", "background_color": "plugin-background-color" } } } }html, body { -ms-high-contrast-adjust: none; cursor: default; height: 100%; width: 100%; } * { margin: 0; padding: 0; overflow: hidden; box-sizing: border-box; } .mainView { -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; display: -ms-grid; height: 100vh; width: 100vw; } .mainView .BPT-ToolbarContents * { overflow: visible; } .mainView .dataViewContainer { -ms-grid-columns: minmax(670px, 1fr); -ms-grid-row: 1; -ms-grid-rows: auto minmax(calc(21em), 1fr); display: -ms-grid; padding-left: 14px; padding-right: 14px; position: relative; overflow: auto; } .mainView .dataViewContainer .warningViewContainer { -ms-grid-columns: 1fr auto; -ms-grid-row: 1; display: -ms-grid; } .mainView .dataViewContainer .warningViewContainer .warningView { -ms-grid-column: 1; display: none; padding: 4px 0px 7px 0px; } .mainView .dataViewContainer .warningViewContainer .warningView .warningMessage { background-repeat: no-repeat; background-position-y: -18px; background-image: url('../common/images/i_warning.png'); /*[url({image-warning})]*/ background-size: 18px 54px; color: TRANSPARENT; /*[{plugin-color}]*/ display: inline; height: 18px; padding-left: 21px; width: 18px; } .mainView .dataViewContainer .warningViewContainer .loadFileView { -ms-grid-column: 2; } .mainView .dataViewContainer .detailedViewsContainer { -ms-grid-columns: 1fr; -ms-grid-row: 2; -ms-grid-rows: 1fr; display: -ms-grid; overflow: visible; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer { -ms-grid-row: 1; margin-bottom: 10px; margin-top: 15px; overflow: visible; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup { -ms-grid-column: 1; -ms-grid-columns: 1fr max-content; -ms-grid-row: 1; -ms-grid-rows: auto 4px 1fr; display: -ms-grid; height: 100%; overflow: visible; width: 100%; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineLabel { -ms-grid-column: 1; -ms-grid-row: 1; -ms-grid-row-align: end; font-weight: 600; width: 100%; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .sortFilterSection { -ms-grid-column: 2; -ms-grid-row: 1; overflow: visible; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .sortFilterSection > * { overflow: visible; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails { -ms-grid-column-span: 2; -ms-grid-columns: 1fr 3px 250px; -ms-grid-row: 3; -ms-grid-rows: auto 1fr; border-top: 1px solid grey; /*[1px solid {plugin-responsiveness-graph-border}]*/ display: -ms-grid; height: 100%; position: relative; width: 100%; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails .timelineEventHeaderLabel { -ms-grid-row-align: center; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails .timelineEventHeaderDivider { background-color: TRANSPARENT; /*[{plugin-perftools-splitter}]*/ height: 100%; position: relative; width: 3px; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails .timelineRuler { -ms-grid-column: 1; -ms-grid-row: 1; border-bottom: 1px solid TRANSPARENT; /*[1px solid {diagnostics-host-border}]*/ } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails .timelineView { -ms-grid-column: 1; -ms-grid-row: 2; height: 100%; position: relative; width: 100%; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails .timelineView .verticalRulerLine { background-color: lightgrey; /*[{diagnostics-host-graph-line}]*/ margin-top: 1px; position: absolute; width: 1px; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails .timelineDetailsHeader { -ms-grid-column: 3; -ms-grid-row: 1; color: white; font-weight: 600; overflow: hidden; padding: 0px 10px 0px 10px; text-overflow: ellipsis; white-space: nowrap; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails .timelineDetailsHeader span { vertical-align: middle; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails .timelineDetailsPaneContainer { -ms-grid-column: 3; -ms-grid-row: 2; } .eventDetails { background-color: TRANSPARENT; /*[{plugin-perftools-detail-pane}]*/ border-left: 1px solid TRANSPARENT; /*[1px solid {plugin-responsiveness-graph-border}]*/ height: 100%; overflow-y: auto; padding-top: 2px; } .eventDetails .eventDetailsTable { display: table; table-layout: fixed; width: 100%; } .eventDetails .eventRow { display: table-row; } .eventDetails .eventCell { display: table-cell; overflow: hidden; padding: 2px 10px 2px 10px; text-overflow: ellipsis; white-space: nowrap; } .eventDetails .name { width: 130px; } .eventDetails .value { -ms-user-select: text; width: calc(100% - 130px); } .eventDetails .detailSeparator { border-bottom: 1px solid TRANSPARENT; /*[1px solid {plugin-perftools-splitter}]*/ height: 0px; left: 0px; margin: 5px 10px 5px 10px; } .eventDetails .eventDetailsDescription { margin: 5px 10px 10px 10px; } .eventDetails .imagePreviewContainer { display: block; margin: 5px 10px 10px 10px; } .eventDetails .imagePreview { background-image: url('images/i_checkered_background.png'); /*[url({image-checkered-background})]*/ box-shadow: 2px 2px 2px transparent; /*[2px 2px 2px {plugin-textbox-border-color rgba(0.5)}]*/ margin-top: 7px; max-width: calc(100% - 2px); } .timelineView > .timelineFocus { height: 0px; width: 100%; } .BPT-listItemContainerHover { background-color: TRANSPARENT; /*[{plugin-perftools-treeview-content-mouseover-background-color}]*/ color: TRANSPARENT; /*[{plugin-perftools-treeview-content-mouseover-color}]*/ } .BPT-listItemContainerHover .BPT-FileLink, .BPT-listItemContainerHover .BPT-FileLink:hover { color: TRANSPARENT; /*[{plugin-treeview-content-mouseover-color}]*/ } .BPT-listItemSelected { background-color: TRANSPARENT; /*[{plugin-perftools-treeview-content-inactive-selected-background-color}]*/ color: TRANSPARENT; /*[{plugin-perftools-treeview-content-inactive-selected-color}]*/ } .BPT-listItemSelected .BPT-FileLink, .BPT-listItemSelected .BPT-FileLink:hover { color: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-color}]*/ } .BPT-listItemSelected .eventDataTemplate > .eventDataTemplateDataCell > .bracket, .BPT-listItemSelected .eventDataTemplate > .eventDataTemplateDataCell > .bracket:hover { border-left-color: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-color}]*/ border-right-color: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-color}]*/ border-top-color: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-color}]*/ } .BPT-listItemSelectedActive { background-color: TRANSPARENT; /*[{plugin-perftools-treeview-content-selected-background-color}]*/ color: TRANSPARENT; /*[{plugin-perftools-treeview-content-selected-color}]*/ } .BPT-listItemSelectedActive .BPT-FileLink, .BPT-itemSelectedActive .BPT-FileLink:hover { color: TRANSPARENT; /*[{plugin-treeview-content-selected-color}]*/ } .BPT-listItemSelectedActive .eventDataTemplate > .eventDataTemplateDataCell > .bracket, .BPT-listItemSelectedActive .eventDataTemplate > .eventDataTemplateDataCell > .bracket:hover { border-left-color: TRANSPARENT; /*[{plugin-treeview-content-selected-color}]*/ border-right-color: TRANSPARENT; /*[{plugin-treeview-content-selected-color}]*/ border-top-color: TRANSPARENT; /*[{plugin-treeview-content-selected-color}]*/ } .eventDataTemplate { -ms-grid-columns: 185px 3px 1fr; -ms-grid-rows: 1fr; display: -ms-grid; } .eventDataTemplate .eventDataTemplateNameCell { -ms-grid-column: 1; -ms-grid-row: 1; align-items: center; display: -ms-flexbox; position: relative; } .eventDataTemplate .eventDataTemplateNameCell .eventDataTemplateName { margin-left: 5px; margin-right: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .eventDataTemplate .eventDataTemplateNameCell .eventDataTemplateName .measureName { font-weight: bold; } .eventDataTemplate > .eventDataTemplateDataCell { -ms-flex-align: center; -ms-grid-column: 3; -ms-grid-row: 1; display: -ms-flexbox; height: 100%; overflow: hidden; } .eventDataTemplate > .eventDataTemplateDataCell > .eventBar { flex-shrink: 0; height: 1em; margin-top: 2px; min-width: 3px; } .eventDataTemplate > .eventDataTemplateDataCell > .bracket { background: none; border-left: 3px solid black; /*[3px solid {plugin-color}]*/ border-right: 3px solid black; /*[3px solid {plugin-color}]*/ border-top: 2px solid black; /*[2px solid {plugin-color}]*/ height: 50%; } .eventDataTemplate > .eventDataTemplateDataCell > .durationText { flex-shrink: 0; margin-left: 5px; } .emptyHeader { background-color: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-background-color}]*/ } .errorGrid { -ms-grid-rows: auto 1fr; display: -ms-grid; } .errorGrid .errorFrown { -ms-grid-row: 1; font-size: 100px; } .errorGrid .errorMessage { -ms-grid-row: 2; font-size: 20px; word-wrap: break-word; } /*From the DOM/Console common "toolwindow.css"*/ .BPT-FileLink, .BPT-HelpLink { color: TRANSPARENT; /*[{plugin-link-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextColorKey*/ cursor: pointer; } .BPT-FileLink:hover, .BPT-HelpLink:hover { color: TRANSPARENT; /*[{plugin-link-hover-color}]*/ /*EnvironmentColors.CommandBarMenuLinkTextHoverColorKey*/ text-decoration: underline; } .filteringBar { display: -ms-flexbox; margin-bottom: 1px; } .filteringBar .timelineSort { margin-right: 8px; } .filteringBar .timelineSort .timelineSortLabel { padding-right: 5px; } .filteringBar .timelineSort .timelineSortSelector option { padding-left: 5px; padding-right: 5px; } .filteringBar .frameGroupingButton { height: 20px; margin-right: 8px; } .filteringBar .frameGroupingButton .buttonIcon { background-image: url('images/i_frame_grouping.png'); /*[url({image-frame-grouping})]*/ margin-top: -2px; } .filteringBar .filteringMenuButton { height: 20px; padding: 0px; } .filteringBar .filteringMenuButton .buttonIcon { background-image: url('images/i_filtering_options.png'); /*[url({image-filtering})]*/ width: 18px; } .BPT-menuContent .eventNameFilter .BPT-TextBox { width: 140px; } .BPT-donutChartText { fill: transparent; /*[{plugin-color}]*/ } .dataIdle { background: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-background-color}]*/ fill: none; opacity: 1; stroke: TRANSPARENT; /*[{plugin-treeview-content-inactive-selected-background-color}]*/ } /* F12 specific CSS */ .mainView { -ms-grid-columns: 1fr; -ms-grid-rows: auto 1fr; display: -ms-grid; } .mainView .toolbarContainer { -ms-grid-row: 1; } .mainView .dataViewContainer { -ms-grid-row: 2; -ms-grid-rows: auto minmax(calc(21em + 150px), 1fr); } .mainView .dataViewContainer .detailedViewsContainer { -ms-grid-columns: 1fr; -ms-grid-rows: auto 1fr; display: -ms-grid; } .mainView .dataViewContainer .detailedViewsContainer .swimLanesViewContainer { -ms-grid-row: 1; } .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer { -ms-grid-row: 2; margin-bottom: 10px; margin-top: 5px; } .mainView .dataViewContainer .progressContainer { -ms-grid-row: 2; display: table; height: 100%; width: 100%; } .mainView .dataViewContainer .progressContainer:focus { outline: 0; } .mainView .dataViewContainer .progressContainer .progressContent { display: table-cell; max-width: 300px; text-align: center; vertical-align: middle; } .mainView .dataViewContainer .progressContainer .progressContent .progress { margin-top: 10px; } .mainView .profilingPrompt { -ms-grid-column-align: center; -ms-grid-columns: 1fr; -ms-grid-row: 2; -ms-grid-row-align: center; -ms-grid-rows: auto 20px auto; display: -ms-grid; } .mainView .profilingPrompt .profilingMessage { -ms-grid-column: 1; -ms-grid-column-align: center; -ms-grid-row: 1; font-size: 14px; font-weight: 500; } .mainView .profilingPrompt progress { -ms-grid-column: 1; -ms-grid-row: 3; } .swimLanesView { -ms-grid-columns: 1fr; -ms-grid-rows: auto auto; display: -ms-grid; } .swimLanesView .graphRulerViewContainer { -ms-grid-column: 1; -ms-grid-row: 1; } .swimLanesView .swimlanesContainer { -ms-grid-column: 1; -ms-grid-row: 2; } .BPT-listItemContainerHover { background-color: rgba(191, 205, 219, 0.25); /*[{plugin-font-editor-inactive-selected-background-color rgba(0.05)}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .BPT-listItemSelected { background-color: rgba(191, 205, 219, 0.25); /*[{plugin-font-editor-inactive-selected-background-color rgba(0.05)}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ } .BPT-listItemSelectedActive { background-color: rgba(51, 153, 255, 0.18); /*[{plugin-perftools-list-item-selected-active-background-color rgba(0.18)}]*/ } .BPT-Toolbar .BPT-ToolbarContents { overflow: visible; } .BPT-Toolbar .BPT-button.startToolbarButton .buttonIcon { background-image: url('../Common/images/i_start.png'); /*[url({f12-image-toolbar-start})]*/ } .BPT-Toolbar .BPT-button.stopToolbarButton .buttonIcon { background-image: url('../Common/images/i_stop.png'); /*[url({f12-image-toolbar-stop})]*/ } .BPT-Toolbar .BPT-button.openSessionButton .buttonIcon { background-image: url('../Common/images/i_open.png'); /*[url({f12-image-toolbar-open})]*/ } .BPT-Toolbar .BPT-button.saveSessionButton .buttonIcon { background-image: url('../Common/images/i_save.png'); /*[url({f12-image-toolbar-save})]*/ } .BPT-Toolbar .BPT-button.zoomInButton .buttonIcon { background-image: url('images/i_f12_chartzoom_in.png'); /*[url({f12-image-toolbar-chartzoom-in})]*/ } .BPT-Toolbar .BPT-button.resetZoomButton .buttonIcon { background-image: url('images/i_f12_chartzoom_reset.png'); /*[url({f12-image-toolbar-chartzoom-reset})]*/ } .BPT-Toolbar .BPT-button.clearSelectionButton .buttonIcon { background-image: url('images/i_f12_chartselection_clear.png'); /*[url({f12-image-toolbar-chartselection-clear})]*/ } /* We only show a blue hover state for icons in f12 */ .mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .sortFilterSection .filteringMenuButton:hover .filteringIcon { background-position-y: -18px !important; } /* * Overriden from the hub, reduce the margin on title text */ .title-container { -ms-grid-columns: 15px 1fr; margin-left: 0px; } .legend-color-div { margin-left: 10px; } .legend-text-div { margin-right: 0px; } .ruler-legend-container { margin-right: 0px; } .ruler-legend-text-div { margin-right: 0px; } .ruler-legend-color-div { margin-left: 10px; } UI Responsiveness
          // // Copyright (C) Microsoft. All rights reserved. // // // VisualProfiler.templates.ts var ControlTemplates; (function (ControlTemplates) { var VisualProfiler = (function () { function VisualProfiler() { } VisualProfiler.toolbarButtonsPanel = "\
          \
          \
          \
          \
          \
          \
          \
          \
          \ "; VisualProfiler.filteringBarTemplate = "\
          \
          \ \
          \
          \
          \
          \
          \ "; VisualProfiler.filteringMenuDropDown = "\
            \
            \
            \
            \
            \
            \
            \
            \
            \
          \ "; return VisualProfiler; })(); ControlTemplates.VisualProfiler = VisualProfiler; })(ControlTemplates || (ControlTemplates = {})); // GlobalRuler.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var GlobalRuler = (function () { function GlobalRuler(totalRange) { this._totalRange = totalRange; this._activeRange = this._selection = this._totalRange; this._selectionWasFinal = false; this._onViewSelectionChangedHandler = this.onViewSelectionChanged.bind(this); this._publisher = new Plugin.Utilities.EventManager(); this._viewEventManager = DiagnosticsHub.getViewEventManager(); this._viewEventManager.selectionChanged.addEventListener(this._onViewSelectionChangedHandler); } Object.defineProperty(GlobalRuler.prototype, "totalRange", { get: function () { return this._totalRange; }, enumerable: true, configurable: true }); Object.defineProperty(GlobalRuler.prototype, "selection", { get: function () { return this._selection; }, enumerable: true, configurable: true }); Object.defineProperty(GlobalRuler.prototype, "activeRange", { get: function () { return this._activeRange; }, enumerable: true, configurable: true }); GlobalRuler.prototype.deinitialize = function () { this._viewEventManager.selectionChanged.removeEventListener(this._onViewSelectionChangedHandler); }; GlobalRuler.prototype.setSelection = function (newSelection, isIntermittent) { if (typeof isIntermittent === "undefined") { isIntermittent = false; } this.setSelectionInternal(newSelection, isIntermittent, false); }; GlobalRuler.prototype.setActiveRange = function (newRange) { if (!this._activeRange.equals(newRange)) { this._activeRange = newRange; this._publisher.dispatchEvent(GlobalRuler.ActiveRangeChangedEventType); } }; GlobalRuler.prototype.addEventListener = function (eventType, func) { this._publisher.addEventListener(eventType, func); }; GlobalRuler.prototype.removeEventListener = function (eventType, func) { this._publisher.removeEventListener(eventType, func); }; GlobalRuler.prototype.setSelectionInternal = function (newSelection, isIntermittent, viaHubSelection) { if (typeof isIntermittent === "undefined") { isIntermittent = false; } if (typeof viaHubSelection === "undefined") { viaHubSelection = false; } var selectionChanged = !this._selection.equals(newSelection); var selectionFinalChanged = this._selectionWasFinal !== !isIntermittent; this._selectionWasFinal = !isIntermittent; if (selectionChanged || (selectionFinalChanged && !isIntermittent)) { VisualProfiler.Program.traceWriter.raiseEvent(109 /* Timeline_UserSelectedTimeSlice_Start */); var begin = VisualProfiler.TimeStamp.fromNanoseconds(Math.max(newSelection.begin.nsec, this._activeRange.begin.nsec)); var end = VisualProfiler.TimeStamp.fromNanoseconds(Math.min(newSelection.end.nsec, this._activeRange.end.nsec)); this._selection = new VisualProfiler.TimeSpan(begin, end); if (!viaHubSelection) { this._viewEventManager.selectionChanged.raiseEvent({ position: this._selection.toJsonTimespan(), isIntermittent: isIntermittent }); } this._publisher.dispatchEvent(GlobalRuler.SelectionChangedEventType, { data: { isIntermittent: isIntermittent, newSelection: newSelection } }); Notifications.notify(VisualProfiler.ResponsivenessNotifications.UserSelectedTimeslice); VisualProfiler.Program.traceWriter.raiseEvent(110 /* Timeline_UserSelectedTimeSlice_Stop */); } }; GlobalRuler.prototype.onViewSelectionChanged = function (args) { var newSelection = VisualProfiler.TimeSpan.fromJsonTimespan(args.position); this.setSelectionInternal(newSelection, args.isIntermittent, true); }; GlobalRuler.SelectionChangedEventType = "selectionChanged"; GlobalRuler.ActiveRangeChangedEventType = "activeRangeChanged"; return GlobalRuler; })(); VisualProfiler.GlobalRuler = GlobalRuler; })(VisualProfiler || (VisualProfiler = {})); // userSettings.ts var VisualProfiler; (function (VisualProfiler) { (function (Extensions) { "use strict"; var UserSettingsProxy = (function () { function UserSettingsProxy() { } UserSettingsProxy.prototype.getUserSettings = function () { return new Plugin.Promise(function (completed) { Plugin.Settings.get("JavaScriptPerfTools").done(function (result) { completed(result); }, function (error) { completed({}); }); }, null); }; return UserSettingsProxy; })(); Extensions.UserSettingsHelper = new UserSettingsProxy(); })(VisualProfiler.Extensions || (VisualProfiler.Extensions = {})); var Extensions = VisualProfiler.Extensions; })(VisualProfiler || (VisualProfiler = {})); // TimeSpan.ts var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var VisualProfiler; (function (VisualProfiler) { "use strict"; var TimeStamp = (function () { function TimeStamp(nsec) { if (typeof nsec === "undefined") { nsec = 0; } this._nsec = nsec; } Object.defineProperty(TimeStamp.prototype, "nsec", { get: function () { return this._nsec; }, enumerable: true, configurable: true }); Object.defineProperty(TimeStamp.prototype, "msec", { get: function () { return this._nsec / TimeStamp.nanoSecInMillSec; }, enumerable: true, configurable: true }); Object.defineProperty(TimeStamp.prototype, "sec", { get: function () { return this._nsec / TimeStamp.nanoSecInSec; }, enumerable: true, configurable: true }); TimeStamp.fromBigNumber = function (bigNumber) { var l = bigNumber.jsonValue.l; var h = bigNumber.jsonValue.h; if (l < 0) { l = l >>> 0; } if (h < 0) { h = h >>> 0; } var nsec = h * 0x100000000 + l; return TimeStamp.fromNanoseconds(nsec); }; TimeStamp.fromNanoseconds = function (nsec) { return new TimeStamp(nsec); }; TimeStamp.fromMilliseconds = function (msec) { return new TimeStamp(msec * TimeStamp.nanoSecInMillSec); }; TimeStamp.fromSeconds = function (sec) { return new TimeStamp(sec * TimeStamp.nanoSecInSec); }; TimeStamp.prototype.equals = function (other) { return this._nsec === other.nsec; }; TimeStamp.prototype.toBigNumber = function () { return DiagnosticsHub.BigNumber.convertFromNumber(this._nsec); }; TimeStamp.nanoSecInMillSec = 1000 * 1000; TimeStamp.nanoSecInSec = 1000 * 1000 * 1000; return TimeStamp; })(); VisualProfiler.TimeStamp = TimeStamp; var TimeSpan = (function () { function TimeSpan(begin, end) { if (typeof begin === "undefined") { begin = new TimeStamp(); } if (typeof end === "undefined") { end = new TimeStamp(); } this._begin = begin; this._end = end; if (this._begin.nsec > this._end.nsec) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1042")); } } Object.defineProperty(TimeSpan.prototype, "begin", { get: function () { return this._begin; }, enumerable: true, configurable: true }); Object.defineProperty(TimeSpan.prototype, "end", { get: function () { return this._end; }, enumerable: true, configurable: true }); Object.defineProperty(TimeSpan.prototype, "elapsed", { get: function () { return new TimeStamp(this._end.nsec - this.begin.nsec); }, enumerable: true, configurable: true }); TimeSpan.fromJsonTimespan = function (jsonTimespan) { var begin = TimeStamp.fromBigNumber(jsonTimespan.begin); var end = TimeStamp.fromBigNumber(jsonTimespan.end); return new TimeSpan(begin, end); }; TimeSpan.prototype.equals = function (other) { return this.begin.equals(other.begin) && this.end.equals(other.end); }; TimeSpan.prototype.toJsonTimespan = function () { return new DiagnosticsHub.JsonTimespan(this._begin.toBigNumber(), this._end.toBigNumber()); }; return TimeSpan; })(); VisualProfiler.TimeSpan = TimeSpan; })(VisualProfiler || (VisualProfiler = {})); // DragDirection.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; (function (DragDirection) { DragDirection[DragDirection["none"] = 0] = "none"; DragDirection[DragDirection["left"] = 1] = "left"; DragDirection[DragDirection["right"] = 2] = "right"; })(VisualProfiler.DragDirection || (VisualProfiler.DragDirection = {})); var DragDirection = VisualProfiler.DragDirection; })(VisualProfiler || (VisualProfiler = {})); // DonutChart.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var DonutChart = (function () { function DonutChart(container, tooltipCallback, addSectorAriaLabelCallback, donutViewConfig) { this._totalValue = 0; this._container = container; this._sectBaseData = []; this._labelOffset = 8; this._pathOpacity = 1; this._renderTooltipCallback = tooltipCallback; this._addSectorAriaLabelCallback = addSectorAriaLabelCallback; var svgTextFontSize = Plugin.Theme.getValue("plugin-font-size"); if (svgTextFontSize.indexOf("px") !== -1) { this._textFontPx = parseInt(svgTextFontSize.substring(0, svgTextFontSize.indexOf("px"))); } else if (svgTextFontSize.indexOf("pt") !== -1) { this._textFontPx = Math.round(parseInt(svgTextFontSize.substring(0, svgTextFontSize.indexOf("pt"))) / 0.75); } else { this._textFontPx = 0; } this._config = donutViewConfig || { explosionFactor: 2, radius: 55, strokeWidth: 25, minDonutArcAngle: 10, containerWidth: 200, containerHeight: 200, clockwiseRotation: true }; if (typeof this._config.containerWidth === "undefined" || typeof this._config.containerHeight === "undefined") { if ((container.style.width !== "" || container.getAttribute("width") !== null) && (container.style.height !== "" || container.getAttribute("height") !== null)) { this._containerWidth = parseInt(container.getAttribute("width") !== null ? container.getAttribute("width") : container.style.width); this._containerHeight = parseInt(container.getAttribute("height") !== null ? container.getAttribute("height") : container.style.height); } else { this._containerWidth = 200; this._containerHeight = 200; } } else { this._containerWidth = this._config.containerWidth; this._containerHeight = this._config.containerHeight; } this._centerX = this._config.containerWidth / 2; this._centerY = this._config.containerHeight / 2; this._div = this.createDivContainer(); this._container.appendChild(this._div); } Object.defineProperty(DonutChart.prototype, "centerX", { get: function () { return this._centerX; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChart.prototype, "centerY", { get: function () { return this._centerY; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChart.prototype, "containerHeight", { get: function () { return this._config.containerHeight; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChart.prototype, "containerWidth", { get: function () { return this._config.containerWidth; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChart.prototype, "clockwiseRotation", { get: function () { return this._config.clockwiseRotation; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChart.prototype, "explosionFactor", { get: function () { return this._config.explosionFactor; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChart.prototype, "radius", { get: function () { return this._config.radius; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChart.prototype, "strokeWidth", { get: function () { return this._config.strokeWidth; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChart.prototype, "sectors", { get: function () { return this._sectBaseData; }, enumerable: true, configurable: true }); DonutChart.prototype.addSector = function (sectorInfo) { this.addSectorToBaseSeries(sectorInfo); }; DonutChart.prototype.addSectors = function (sectors) { for (var i = 0; i < sectors.length; i++) { this.addSector(sectors[i]); } }; DonutChart.prototype.removeSector = function (sectorInfo) { var index = this.getSectorIndex(sectorInfo); if (index === -1) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1061")); } else { this._totalValue -= sectorInfo.value; this._sectBaseData.splice(index, 1); } }; DonutChart.prototype.removeSectors = function (sectors) { for (var i = 0; i < sectors.length; i++) { this.removeSector(sectors[i]); } }; DonutChart.prototype.render = function () { var donutSectorInfo = this.buildChartData(this._sectBaseData); var donutSectorPoints = this.calculatePoints(donutSectorInfo); this.draw(donutSectorPoints); }; DonutChart.prototype.resetDonutChart = function () { this._totalValue = 0; this._sectBaseData = []; this._container.removeChild(this._svg); this._svg = this.createSVG(); this._container.appendChild(this._svg); }; DonutChart.prototype.addSectorToBaseSeries = function (sector) { this._totalValue += sector.value; this._sectBaseData.push(sector); }; DonutChart.prototype.buildChartData = function (sectBaseData) { var sectDonutData = []; if (sectBaseData.length === 1) { sectDonutData.push({ startAngle: 0, endAngle: 360, percentValue: 100, info: { name: sectBaseData[0].name, cssClass: sectBaseData[0].cssClass, value: sectBaseData[0].value } }); } else { var currAngle = 0; var currValue = 0; var i = 0; var angleReductionFactor = this.getReductionFactor(sectBaseData); for (i = 0; i < sectBaseData.length - 1; i++) { currValue = sectBaseData[i].value; var arcAngle = Math.round(360 * currValue / this._totalValue); var percentValue = parseFloat((100 * currValue / this._totalValue).toFixed(2)); arcAngle = (arcAngle < this._config.minDonutArcAngle) ? this._config.minDonutArcAngle : Math.round(angleReductionFactor * arcAngle); sectDonutData.push({ startAngle: currAngle, endAngle: currAngle + arcAngle - this._config.explosionFactor, percentValue: percentValue, info: { name: sectBaseData[i].name, cssClass: sectBaseData[i].cssClass, value: sectBaseData[i].value } }); currAngle += arcAngle; if (currAngle >= 360) { break; } } if (i === sectBaseData.length - 1 && currAngle < 360) { currValue = sectBaseData[i].value; var arcAngle = 360 - currAngle; var percentValue = parseFloat((100 * currValue / this._totalValue).toFixed(2)); sectDonutData.push({ startAngle: currAngle, endAngle: currAngle + arcAngle - this._config.explosionFactor, percentValue: percentValue, info: { name: sectBaseData[i].name, cssClass: sectBaseData[i].cssClass, value: sectBaseData[i].value } }); currAngle += arcAngle; } } return sectDonutData; }; DonutChart.prototype.calculatePoints = function (sectDonutData) { var radius = this._config.radius; var labelRadius = this._config.radius + (this._config.strokeWidth / 2) + this._labelOffset; var sectDonutPoints = []; var anchor; for (var i = 0; i < sectDonutData.length; i++) { var sAngle = sectDonutData[i].startAngle; var eAngle = sectDonutData[i].endAngle; var midAngle = (sectDonutData.length === 1) ? 0 : (sAngle + eAngle) / 2; var sx = radius * Math.sin(sAngle * Math.PI / 180); var sy = radius * Math.cos(sAngle * Math.PI / 180) * -1; var ex = radius * Math.sin(eAngle * Math.PI / 180); var ey = radius * Math.cos(eAngle * Math.PI / 180) * -1; if (midAngle < 180 && midAngle > 0) { labelRadius = (sectDonutData[i].percentValue > 9) ? labelRadius + (this._textFontPx / 2) : labelRadius; anchor = "start"; } else if (midAngle > 180) { anchor = "end"; } else { anchor = "middle"; } var tx = labelRadius * Math.sin(midAngle * Math.PI / 180); var ty = labelRadius * Math.cos(midAngle * Math.PI / 180) * -1; var largeArcFlag = (eAngle - sAngle) > 180 ? 1 : 0; var sweepFlag = (this._config.clockwiseRotation) ? 1 : 0; sectDonutPoints.push({ startPoint: { x: sx, y: sy }, endPoint: { x: ex, y: ey }, label: { point: { x: tx, y: ty }, anchor: anchor }, percentValue: sectDonutData[i].percentValue, largeArc: largeArcFlag, sweepFlag: sweepFlag, info: sectDonutData[i].info }); } return sectDonutPoints; }; DonutChart.prototype.createDivContainer = function () { var div = document.createElement("div"); div.style.width = "100%"; div.style.height = "100%"; return div; }; DonutChart.prototype.createSVG = function () { var svg = document.createElementNS(DonutChart.SvgNS, "svg"); svg.setAttribute("version", "1.1"); svg.setAttribute("width", this._config.containerWidth + "px"); svg.setAttribute("height", this._config.containerHeight + "px"); svg.setAttribute("focusable", "false"); return svg; }; DonutChart.prototype.createSVGPath = function (cssClass, dAttribute, strokeWidth, sectorDonutPoint) { var _this = this; var path = document.createElementNS(DonutChart.SvgNS, "path"); path.setAttribute("class", cssClass); path.setAttribute("d", dAttribute); path.setAttribute("stroke-width", strokeWidth.toString()); if (this._renderTooltipCallback) { path.onmouseover = function () { return _this.showToolTip(sectorDonutPoint.info, sectorDonutPoint.percentValue); }; path.onmouseout = function (mouseEvent) { return Plugin.Tooltip.dismiss(); }; } if (this._addSectorAriaLabelCallback) { this._addSectorAriaLabelCallback(sectorDonutPoint.info, sectorDonutPoint.percentValue); } return path; }; DonutChart.prototype.createSVGText = function (xPosition, yPosition, anchor, percentValue) { var text = document.createElementNS(DonutChart.SvgNS, "text"); text.setAttribute("x", xPosition.toString()); text.setAttribute("y", yPosition.toString()); text.setAttribute("text-anchor", anchor); text.setAttribute("class", "BPT-donutChartText"); text.textContent = Plugin.Resources.getString("InclusiveTimeSVGLabelString", Math.floor(percentValue)); return text; }; DonutChart.prototype.draw = function (sectDonutPoints) { if (typeof this._svg !== "undefined") { this._div.removeChild(this._svg); } this._svg = this.createSVG(); if (sectDonutPoints.length === 1) { var i = 0; var dPath = "M " + this._centerX + "," + this._centerY + " M " + (this._centerX + sectDonutPoints[i].startPoint.x) + ", " + (this._centerY + sectDonutPoints[i].startPoint.y) + " A " + this._config.radius + "," + this._config.radius + " 1 " + sectDonutPoints[i].largeArc + ", " + sectDonutPoints[i].sweepFlag + " " + (this._centerX + sectDonutPoints[i].startPoint.x) + "," + (this._centerY + sectDonutPoints[i].startPoint.y + this._config.radius * 2) + " A " + this._config.radius + "," + this._config.radius + " 1 " + sectDonutPoints[i].largeArc + ", " + sectDonutPoints[i].sweepFlag + " " + (this._centerX + sectDonutPoints[i].endPoint.x) + "," + (this._centerY + sectDonutPoints[i].endPoint.y); var arc = this.createSVGPath(sectDonutPoints[i].info.cssClass, dPath, this._config.strokeWidth, sectDonutPoints[i]); this._svg.appendChild(arc); var text = this.createSVGText(this._centerX + sectDonutPoints[i].label.point.x, this._centerY + sectDonutPoints[i].label.point.y, sectDonutPoints[i].label.anchor, sectDonutPoints[i].percentValue); this._svg.appendChild(text); } else if (sectDonutPoints.length > 1) { for (var i = 0; i < sectDonutPoints.length; i++) { var dPath = "M " + this._centerX + "," + this._centerY + " M " + (this._centerX + sectDonutPoints[i].startPoint.x) + ", " + (this._centerY + sectDonutPoints[i].startPoint.y) + " A " + this._config.radius + "," + this._config.radius + " 1 " + sectDonutPoints[i].largeArc + ", " + sectDonutPoints[i].sweepFlag + " " + (this._centerX + sectDonutPoints[i].endPoint.x) + "," + (this._centerY + sectDonutPoints[i].endPoint.y); var arc = this.createSVGPath(sectDonutPoints[i].info.cssClass, dPath, this._config.strokeWidth, sectDonutPoints[i]); this._svg.appendChild(arc); if (sectDonutPoints[i].percentValue > Math.round(this._config.minDonutArcAngle * 100 / 360)) { var text = this.createSVGText(this._centerX + sectDonutPoints[i].label.point.x, this._centerY + sectDonutPoints[i].label.point.y, sectDonutPoints[i].label.anchor, sectDonutPoints[i].percentValue); this._svg.appendChild(text); } } } this._div.appendChild(this._svg); }; DonutChart.prototype.getReductionFactor = function (sectBaseData) { var currAngle = 0; var i = 0; var angleDifference = 0; for (i = 0; i < sectBaseData.length; i++) { currAngle = Math.round(360 * sectBaseData[i].value / this._totalValue); angleDifference += (currAngle < this._config.minDonutArcAngle) ? this._config.minDonutArcAngle - currAngle : 0; } return (1 - angleDifference / 360); }; DonutChart.prototype.getResizedRadius = function (dimension) { return dimension / DonutChart.RadiusResizeFactor; }; DonutChart.prototype.getResizedWidth = function (dimension) { return dimension / DonutChart.WidthResizeFactor; }; DonutChart.prototype.getSectorIndex = function (sector) { for (var i = 0; i < this._sectBaseData.length; i++) { if (this._sectBaseData[i] === sector || (this._sectBaseData[i].name === sector.name && this._sectBaseData[i].cssClass === sector.cssClass && this._sectBaseData[i].value === sector.value)) { return i; } } return -1; }; DonutChart.prototype.resizeDimensions = function () { var smallDimension = (this._config.containerHeight > this._config.containerWidth) ? this._config.containerWidth : this._config.containerHeight; this._config.radius = this.getResizedRadius(smallDimension); this._config.strokeWidth = this.getResizedWidth(this._config.radius); }; DonutChart.prototype.showToolTip = function (sector, percentValue) { var toolTipContent = this._renderTooltipCallback(sector, percentValue); if (toolTipContent !== "" && toolTipContent !== null && typeof toolTipContent !== "undefined") { var config = { content: toolTipContent }; Plugin.Tooltip.show(config); } }; DonutChart.SvgNS = "http://www.w3.org/2000/svg"; DonutChart.RadiusResizeFactor = 4; DonutChart.WidthResizeFactor = 2.5; return DonutChart; })(); VisualProfiler.DonutChart = DonutChart; })(VisualProfiler || (VisualProfiler = {})); // DataUtilities.ts var VisualProfiler; (function (VisualProfiler) { (function (Graphs) { "use strict"; var DataUtilities = (function () { function DataUtilities() { } DataUtilities.getFilteredResult = function (dataWarehouse, analyzerId, counterId, timespan, customData) { var contextData = { timeDomain: timespan, customDomain: { CounterId: counterId } }; if (customData) { for (var key in customData) { if (customData.hasOwnProperty(key)) { contextData.customDomain[key] = customData[key]; } } } return dataWarehouse.getFilteredData(contextData, analyzerId); }; return DataUtilities; })(); Graphs.DataUtilities = DataUtilities; })(VisualProfiler.Graphs || (VisualProfiler.Graphs = {})); var Graphs = VisualProfiler.Graphs; })(VisualProfiler || (VisualProfiler = {})); // GraphResources.ts var VisualProfiler; (function (VisualProfiler) { (function (Graphs) { "use strict"; var GraphResources = (function () { function GraphResources(resources) { this._graphResources = resources; } GraphResources.prototype.getString = function (resourceId) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } if (this._graphResources) { var resourceString = this._graphResources[resourceId]; if (resourceString !== undefined) { resourceString = GraphResources.format(resourceId, resourceString, args); return resourceString; } } try { return Plugin.Resources.getString.apply(Plugin.Resources, arguments); } catch (e) { } return resourceId; }; GraphResources.format = function (resourceId, format, args) { return format.replace(GraphResources.FORMAT_REG_EXP, function (match, index) { var replacer; switch (match) { case "{{": replacer = "{"; break; case "}}": replacer = "}"; break; case "{": case "}": throw new Error(Plugin.Resources.getErrorString("JSPlugin.3002")); default: var argsIndex = parseInt(index); if (args && argsIndex < args.length) { replacer = args[argsIndex]; } else { throw new Error(Plugin.Resources.getErrorString("JSPlugin.3003") + " (resourceId = " + resourceId + ")"); } break; } if (replacer === undefined || replacer === null) { replacer = ""; } if (typeof replacer !== "string") { replacer = replacer.toString(); } return replacer; }); }; GraphResources.FORMAT_REG_EXP = /\{{2}|\{(\d+)\}|\}{2}|\{|\}/g; return GraphResources; })(); Graphs.GraphResources = GraphResources; })(VisualProfiler.Graphs || (VisualProfiler.Graphs = {})); var Graphs = VisualProfiler.Graphs; })(VisualProfiler || (VisualProfiler = {})); // StackedBarChart.ts var VisualProfiler; (function (VisualProfiler) { (function (Graphs) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var DataSeriesInfo = (function () { function DataSeriesInfo(name, cssClass, sortOrder) { if (!name || sortOrder === undefined || sortOrder === null) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1044")); } this._name = name; this._cssClass = cssClass; this._sortOrder = sortOrder; } Object.defineProperty(DataSeriesInfo.prototype, "cssClass", { get: function () { return this._cssClass; }, enumerable: true, configurable: true }); Object.defineProperty(DataSeriesInfo.prototype, "name", { get: function () { return this._name; }, enumerable: true, configurable: true }); Object.defineProperty(DataSeriesInfo.prototype, "sortOrder", { get: function () { return this._sortOrder; }, enumerable: true, configurable: true }); return DataSeriesInfo; })(); Graphs.DataSeriesInfo = DataSeriesInfo; var StackedBarChartPresenter = (function () { function StackedBarChartPresenter(options) { this._data = []; this._dataSeriesInfo = {}; this._maximumYValue = Number.NEGATIVE_INFINITY; this.viewModel = []; this._options = options; this.validateOptions(); this._pixelHorizontalValue = this.xWidth / this._options.width; } Object.defineProperty(StackedBarChartPresenter.prototype, "maximumYValue", { get: function () { return this._maximumYValue; }, enumerable: true, configurable: true }); Object.defineProperty(StackedBarChartPresenter.prototype, "xWidth", { get: function () { return this._options.maxX - this._options.minX; }, enumerable: true, configurable: true }); StackedBarChartPresenter.prototype.addData = function (chartData) { var _this = this; chartData.forEach(function (dataItem) { if (_this._dataSeriesInfo.hasOwnProperty(dataItem.series)) { _this._data.push(dataItem); } else { throw new Error(Plugin.Resources.getErrorString("JSPerf.1043")); } }); this.generateViewModel(); }; StackedBarChartPresenter.prototype.addSeries = function (seriesInfo) { for (var i = 0; i < seriesInfo.length; i++) { var info = seriesInfo[i]; if (this._dataSeriesInfo.hasOwnProperty(info.name)) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1045")); } this._dataSeriesInfo[info.name] = info; } }; StackedBarChartPresenter.prototype.getViewOptions = function () { var viewOptions = { ariaDescription: this._options.ariaDescription, ariaLabelCallback: this._options.ariaLabelCallback, height: this._options.height, width: this._options.width, tooltipCallback: this._options.tooltipCallback, legendData: this._dataSeriesInfo }; return viewOptions; }; StackedBarChartPresenter.prototype.convertChartAreaPercentToDataValue = function (percent) { return Math.round(percent * this.xWidth / 100) + this._options.minX; }; StackedBarChartPresenter.prototype.determineYAxisScale = function (allBars) { for (var i = 0; i < allBars.length; i++) { var totalStackHeight = 0; var currentBar = allBars[i]; for (var j = 0; j < currentBar.length; j++) { var stackComponent = currentBar[j]; if (stackComponent.height > 0) { totalStackHeight += stackComponent.height; } } this._maximumYValue = Math.max(this._maximumYValue, totalStackHeight); } this._maximumYValue = Math.floor(Math.max(this._options.minYHeight, this._maximumYValue)); var availableAxisHight = this._options.height - StackedBarChartPresenter.YAXIS_PIXEL_PADDING; if (availableAxisHight <= 0) { availableAxisHight = this._options.height; } var proposedNewMax = Math.floor(this._maximumYValue / 100) * 100; var proposedPixelVerticalValue = proposedNewMax / availableAxisHight; proposedNewMax = this._options.height * proposedPixelVerticalValue; if (proposedNewMax < this._maximumYValue) { proposedNewMax = Math.ceil(this._maximumYValue / 100) * 100; proposedPixelVerticalValue = proposedNewMax / availableAxisHight; proposedNewMax = this._options.height * proposedPixelVerticalValue; } this._pixelVerticalValue = proposedPixelVerticalValue; this._maximumYValue = proposedNewMax; }; StackedBarChartPresenter.prototype.generateViewModel = function () { var allBars = [[]]; var singleBar = []; var barWidthAndMargin = this._options.barWidth + this._options.barGap; var currentXValue = this._options.minX; var prevValue = Number.NEGATIVE_INFINITY; var x = 0; var i = 0; while (i < this._data.length) { var dataItem = this._data[i]; if (dataItem.x < prevValue) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1046")); } if (dataItem.x > this._options.maxX) { break; } prevValue = dataItem.x; var currentXValue = Math.floor(x * this._pixelHorizontalValue + this._options.minX); var currentBarMinValue = currentXValue; var currentBarMaxValue = currentXValue + Math.floor((this._options.barWidth + this._options.barGap) * this._pixelHorizontalValue); if (dataItem.x < currentBarMinValue) { i++; continue; } if (dataItem.x < currentBarMaxValue) { dataItem.x = x; singleBar.push(dataItem); i++; } else { allBars.push(singleBar); singleBar = []; x += barWidthAndMargin; } } allBars.push(singleBar); this.determineYAxisScale(allBars); for (var i = 0; i < allBars.length; i++) { this.generateViewModelForSingleStack(allBars[i]); } }; StackedBarChartPresenter.prototype.generateViewModelForSingleStack = function (dataItems) { if (!dataItems || dataItems.length === 0) { return; } dataItems.sort(this.sortBySeries.bind(this)); var accumulatedHeight = 0; var maxHeightExceeded = false; var singleBarViewModel = []; var rectangle = null; for (var i = dataItems.length - 1; i >= 0; i--) { var dataItem = dataItems[i]; if (dataItem.height <= 0) { continue; } var barHeight = Math.round(dataItem.height / this._pixelVerticalValue); if (dataItem.height > 0 && barHeight === 0) { barHeight = 1; } var startY = this._options.height - accumulatedHeight - barHeight; if (startY < 0) { barHeight = this._options.height - accumulatedHeight; startY = 0; maxHeightExceeded = true; } accumulatedHeight += barHeight; if (this._options.showStackGap && i !== dataItems.length - 1) { if (barHeight > 1) { barHeight -= 1; } else { if (rectangle && rectangle.height > 1) { rectangle.height -= 1; rectangle.y += 1; } } } rectangle = { x: dataItem.x, y: startY, height: barHeight, width: this._options.barWidth, className: this._dataSeriesInfo[dataItem.series].cssClass, chartItem: dataItem }; this.viewModel.push(rectangle); if (maxHeightExceeded) { break; } } }; StackedBarChartPresenter.prototype.sortBySeries = function (chartItem1, chartItem2) { return this._dataSeriesInfo[chartItem2.series].sortOrder - this._dataSeriesInfo[chartItem1.series].sortOrder; }; StackedBarChartPresenter.prototype.validateOptions = function () { if (!this._options) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1047")); } if ((this._options.minX === undefined || this._options.minX === null) || (this._options.maxX === undefined || this._options.maxX === null) || (this._options.minY === undefined || this._options.minY === null) || (this._options.minX > this._options.maxX) || !(this._options.height >= 0 && this._options.width >= 0) || (!this._options.barWidth || this._options.barWidth < 0)) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1048")); } this._options.barGap = this._options.barGap || 0; this._options.showStackGap = this._options.showStackGap || false; this._options.minYHeight = this._options.minYHeight || this._options.minY; }; StackedBarChartPresenter.YAXIS_PIXEL_PADDING = 10; return StackedBarChartPresenter; })(); Graphs.StackedBarChartPresenter = StackedBarChartPresenter; var StackedBarChartView = (function () { function StackedBarChartView() { this._idCount = 0; this.rootElement = document.createElement("div"); this.rootElement.style.width = this.rootElement.style.height = "100%"; this._selectedId = null; } Object.defineProperty(StackedBarChartView.prototype, "presenter", { set: function (value) { this._presenter = value; this._viewData = this._presenter.viewModel; this._options = value.getViewOptions(); this._barGraphWidth = this._options.width; this.drawChart(); }, enumerable: true, configurable: true }); StackedBarChartView.svgAddCssClass = function (element, className) { element.setAttribute("class", element.getAttribute("class") + " " + className); }; StackedBarChartView.svgRemoveCssClass = function (element, className) { var classList = element.getAttribute("class"); classList = classList.replace(className, "").trim(); element.setAttribute("class", classList); }; StackedBarChartView.prototype.convertPageXToChartAreaPercent = function (pageX) { var rect = this._chartAreaContainer.getBoundingClientRect(); return (pageX - rect.left) / this._barGraphWidth * 100; }; StackedBarChartView.prototype.createContainer = function () { var _this = this; if (!this._chartAreaContainer) { this._chartAreaContainer = document.createElement("div"); this.rootElement.appendChild(this._chartAreaContainer); this._chartAreaContainer.addEventListener("keydown", function (event) { return _this.onBarGraphKeydown(event); }); this._chartAreaContainer.addEventListener("focus", function (event) { return _this.onGraphFocusIn(event); }); this._chartAreaContainer.addEventListener("focusout", function (event) { return _this.onGraphFocusOut(event); }); } else { this._chartAreaContainer.innerHTML = ""; } if (!this._barAriaLabel) { this._barAriaLabel = document.createElement("div"); } else { this._barAriaLabel.innerHTML = ""; } this._chartAreaContainer.style.width = this._options.width + "px"; this._chartAreaContainer.style.height = this._options.height + "px"; this._chartAreaContainer.classList.add("stackedBarChart"); this._chartAreaContainer.style.display = "-ms-grid"; this._chartAreaContainer.setAttribute("tabIndex", "0"); this._barAriaLabel.setAttribute("aria-live", "assertive"); this._barAriaLabel.style.display = "none"; }; StackedBarChartView.prototype.createRect = function (x, y, height, width, className) { var rect = document.createElementNS(StackedBarChartView.SVG_NAMESPACE, "rect"); rect.id = StackedBarChartView.BAR_ID_PREFIX + this._idCount; this._idCount++; rect.setAttribute("focusable", "false"); rect.setAttribute("x", x + "px"); rect.setAttribute("y", y + "px"); rect.setAttribute("class", "bar " + className); rect.setAttribute("height", height + "px"); rect.setAttribute("width", width + "px"); return rect; }; StackedBarChartView.prototype.drawChart = function () { if (!this._viewData) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1049")); } this.createContainer(); this.initializeBarGraph(); this._barGraph.parentElement = this._chartAreaContainer; this.renderViewData(this._barGraph, this._viewData); this._chartAreaContainer.appendChild(this._barGraph); this._chartAreaContainer.appendChild(this._barAriaLabel); if (this._options.ariaDescription) { this._chartAreaContainer.setAttribute("aria-label", this._options.ariaDescription); } }; StackedBarChartView.prototype.initializeBarGraph = function () { this._selectedId = -1; this._idCount = 0; this._barGraph = document.createElementNS(StackedBarChartView.SVG_NAMESPACE, "svg"); this._barGraph.setAttribute("class", "barGraph"); this._barGraph.setAttribute("focusable", "false"); this._barGraph.setAttribute("height", this._options.height + "px"); this._barGraph.setAttribute("width", this._barGraphWidth + "px"); this._barGraph.setAttribute("role", "img"); if (this._options.ariaDescription) { this._barGraph.setAttribute("aria-label", this._options.ariaDescription); } }; StackedBarChartView.prototype.onGraphFocusIn = function (event) { if (this._selectedId === null || this._selectedId < 0) { this._selectedId = -1; } else { var bar = document.getElementById(StackedBarChartView.BAR_ID_PREFIX + this._selectedId); if (bar) { StackedBarChartView.svgAddCssClass(bar, StackedBarChartView.FOCUSED_CSS_CLASSNAME); } } }; StackedBarChartView.prototype.onGraphFocusOut = function (event) { var bar = document.getElementById(StackedBarChartView.BAR_ID_PREFIX + this._selectedId); if (bar) { StackedBarChartView.svgRemoveCssClass(bar, StackedBarChartView.FOCUSED_CSS_CLASSNAME); } if (this._options.ariaDescription) { this._chartAreaContainer.setAttribute("aria-label", this._options.ariaDescription); } Plugin.Tooltip.dismiss(); }; StackedBarChartView.prototype.onBarFocusIn = function (chartItem, bar) { StackedBarChartView.svgAddCssClass(bar, StackedBarChartView.FOCUSED_CSS_CLASSNAME); if (this._options.ariaLabelCallback) { var ariaLabel = this._options.ariaLabelCallback(chartItem); this._barAriaLabel.textContent = ariaLabel; } }; StackedBarChartView.prototype.onBarFocusOut = function (chartItem, bar) { StackedBarChartView.svgRemoveCssClass(bar, StackedBarChartView.FOCUSED_CSS_CLASSNAME); }; StackedBarChartView.prototype.onBarGraphKeydown = function (event) { Plugin.Tooltip.dismiss(); var bar; if (this._selectedId !== -1) { bar = document.getElementById(StackedBarChartView.BAR_ID_PREFIX + this._selectedId); } if (event.keyCode === DiagnosticsHub.Common.KeyCodes.ArrowLeft || event.keyCode === DiagnosticsHub.Common.KeyCodes.ArrowRight || event.keyCode === DiagnosticsHub.Common.KeyCodes.Escape) { if (bar && bar.onlostfocus) { bar.onlostfocus(); } if (event.keyCode === DiagnosticsHub.Common.KeyCodes.Escape) { this._selectedId = -1; } else { if (event.keyCode === DiagnosticsHub.Common.KeyCodes.ArrowLeft) { if ((this._selectedId === 0) || (this._selectedId === -1)) { this._selectedId = this._idCount; } this._selectedId--; } else if (event.keyCode === DiagnosticsHub.Common.KeyCodes.ArrowRight) { this._selectedId++; if (this._selectedId === this._idCount) { this._selectedId = 0; } } bar = document.getElementById(StackedBarChartView.BAR_ID_PREFIX + this._selectedId); if (bar && bar.ongotfocus) { bar.ongotfocus(); } } event.preventDefault(); event.stopPropagation(); return false; } else if (bar && bar.onkeydown) { return bar.onkeydown(event); } return true; }; StackedBarChartView.prototype.onBarKeydown = function (objectForTooltip, event) { if (event.keyCode === DiagnosticsHub.Common.KeyCodes.Enter) { var element = event.currentTarget; var offsetX = objectForTooltip.x; var offsetY = element.offsetHeight; while (element) { offsetX += element.offsetLeft; offsetY += element.offsetTop; element = element.offsetParent; } this.showTooltip(objectForTooltip, offsetX, offsetY); event.preventDefault(); event.stopPropagation(); return false; } return true; }; StackedBarChartView.prototype.renderViewData = function (container, viewData) { for (var i = 0; i < viewData.length; i++) { var barInfo = viewData[i]; var rectangle = this.createRect(barInfo.x, barInfo.y, barInfo.height, barInfo.width, barInfo.className); rectangle.onmouseover = this.showTooltip.bind(this, barInfo.chartItem); rectangle.onmouseout = function (ev) { Plugin.Tooltip.dismiss(); }; rectangle.onkeydown = this.onBarKeydown.bind(this, barInfo.chartItem); rectangle.ongotfocus = this.onBarFocusIn.bind(this, barInfo.chartItem, rectangle); rectangle.onlostfocus = this.onBarFocusOut.bind(this, barInfo.chartItem, rectangle); rectangle.parentElement = container.parentElement; container.appendChild(rectangle); } }; StackedBarChartView.prototype.showTooltip = function (chartItem, x, y) { if (this._options.tooltipCallback) { var toolTipContent = this._options.tooltipCallback(chartItem); var config = { content: toolTipContent, delay: 0, x: x, y: y, contentContainsHTML: true }; Plugin.Tooltip.show(config); } }; StackedBarChartView.BAR_ID_PREFIX = "bar"; StackedBarChartView.FOCUSED_CSS_CLASSNAME = "focused"; StackedBarChartView.SVG_NAMESPACE = "http://www.w3.org/2000/svg"; return StackedBarChartView; })(); Graphs.StackedBarChartView = StackedBarChartView; })(VisualProfiler.Graphs || (VisualProfiler.Graphs = {})); var Graphs = VisualProfiler.Graphs; })(VisualProfiler || (VisualProfiler = {})); // StackedBarGraph.ts var VisualProfiler; (function (VisualProfiler) { (function (Graphs) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var StackedBarGraph = (function () { function StackedBarGraph(config) { this._config = config; this._graphResources = new Graphs.GraphResources(this._config.resources); this._timeRange = this._config.timeRange || new DiagnosticsHub.JsonTimespan(new DiagnosticsHub.BigNumber(0, 0), new DiagnosticsHub.BigNumber(0, 0)); StackedBarGraph.validateConfiguration(this._config); this._dataSource = this._config.jsonConfig.Series[0].DataSource; if (config.pathToScriptFolder && config.loadCss) { config.loadCss(config.pathToScriptFolder + "/js/hubGraphs/StackedBarChart.css"); config.loadCss(config.pathToScriptFolder + "/DataCategoryStyles.css"); } this._config.scale = this._config.scale || {}; this._config.scale.minimum = 0; this._config.scale.maximum = 120; this._config.scale.axes = []; for (var i = 1; i < 64; i++) { this._config.scale.axes.push({ value: i * 100 }); } this._config.legend = this._config.legend || {}; this._config.legend.data = this._config.legend.data || []; var seriesCollection = this._config.jsonConfig.Series; for (var i = 0; i < seriesCollection.length; i++) { var series = seriesCollection[i]; this._config.legend.data.push({ color: series.Color, legendText: this._graphResources.getString(series.Legend), legendTooltip: (series.LegendTooltip ? this._graphResources.getString(series.LegendTooltip) : null) }); } } Object.defineProperty(StackedBarGraph.prototype, "containerOffsetWidth", { get: function () { if (this._containerOffsetWidth === undefined) { if (!this._container) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1069")); } this._containerOffsetWidth = this._container.offsetWidth; } return this._containerOffsetWidth; }, enumerable: true, configurable: true }); StackedBarGraph.prototype.addSeriesData = function (counterId, points, fullRender, dropOldData) { }; StackedBarGraph.prototype.deinitialize = function () { }; StackedBarGraph.prototype.getDataPresenter = function () { var presenterOptions = { ariaDescription: this._graphResources.getString("CPUGraphAriaLabel"), height: this._config.height, width: this.containerOffsetWidth, minX: parseInt(this._timeRange.begin.value), maxX: parseInt(this._timeRange.end.value), minY: 0, minYHeight: 100, barWidth: this._config.jsonConfig.BarWidth, barGap: this._config.jsonConfig.BarGap, showStackGap: this._config.jsonConfig.ShowStackGap, tooltipCallback: this.createTooltip.bind(this), ariaLabelCallback: this.createAriaLabel.bind(this) }; var presenter = new Graphs.StackedBarChartPresenter(presenterOptions); var dataSeriesInfo = []; var stackedDataSeries = this._config.jsonConfig.Series; for (var i = 0; i < stackedDataSeries.length; i++) { var seriesItem = stackedDataSeries[i]; dataSeriesInfo.push({ cssClass: seriesItem.CssClass, name: seriesItem.Category, sortOrder: i + 1 }); } presenter.addSeries(dataSeriesInfo); return presenter; }; StackedBarGraph.prototype.getGranularity = function () { var bucketWidth = this._config.jsonConfig.BarGap + this._config.jsonConfig.BarWidth; var graphDuration = parseInt(this._timeRange.elapsed.value); if (graphDuration <= 0 || this.containerOffsetWidth <= 0) { return 0; } return Math.floor(bucketWidth / this.containerOffsetWidth * graphDuration); }; StackedBarGraph.prototype.getViewPortTimeRange = function () { return this._timeRange; }; StackedBarGraph.prototype.getGraphConfiguration = function () { return this._config; }; StackedBarGraph.prototype.removeInvalidPoints = function (base) { }; StackedBarGraph.prototype.render = function (fullRender, refresh) { if (fullRender) { this._containerOffsetWidth = undefined; } if (!this._container) { this.initializeGraphUi(); } if (this._config.jsonConfig.GraphBehaviour == DiagnosticsHub.GraphBehaviourType.PostMortem) { this.setData(this._timeRange); } }; StackedBarGraph.prototype.resize = function (evt) { this.render(true, false); }; StackedBarGraph.prototype.setGraphState = function (graphState) { }; StackedBarGraph.prototype.setViewPortTimeRange = function (viewPort) { this._timeRange = viewPort; this.render(); }; StackedBarGraph.validateConfiguration = function (config) { if (!config) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1070")); } var jsonObject = config.jsonConfig; if (!jsonObject) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1071")); } if (!jsonObject.Series || jsonObject.Series.length === 0) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1072")); } jsonObject.BarWidth = jsonObject.BarWidth || 4; jsonObject.BarGap = jsonObject.BarGap || 0; jsonObject.ShowStackGap = jsonObject.ShowStackGap || false; if ((!config.height || config.height < 0) || jsonObject.BarWidth < 0) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1048")); } }; StackedBarGraph.prototype.createTooltip = function (cpuUsage) { var tooltip = this._graphResources.getString("CPUTooltipCategoryLabel") + ": " + this._graphResources.getString(cpuUsage.series) + "
          "; tooltip += this._graphResources.getString("CPUTooltipUtilizationLabel") + ": " + (Math.round(cpuUsage.height * 100) / 100).toLocaleString(undefined, { minimumFractionDigits: 2 }) + "%"; return tooltip; }; StackedBarGraph.prototype.createAriaLabel = function (cpuUsage) { var percentageUtilization = (Math.round(cpuUsage.height * 100) / 100).toLocaleString(undefined, { minimumFractionDigits: 2 }); var formattedTime = DiagnosticsHub.RulerUtilities.formatTime(DiagnosticsHub.BigNumber.convertFromNumber(cpuUsage.x), DiagnosticsHub.UnitFormat.fullName); return this._graphResources.getString("CPUBarAriaLabel", this._graphResources.getString(cpuUsage.series), percentageUtilization, formattedTime); }; StackedBarGraph.prototype.initializeGraphUi = function () { this._container = document.getElementById(this._config.containerId); if (!this._container) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1073")); } }; StackedBarGraph.prototype.setData = function (timeRange) { var _this = this; if (this._settingDataPromise) { this._settingDataPromise.cancel(); this._settingDataPromise = null; } if (!this._dataSource || !this._dataSource.CounterId || !this._dataSource.AnalyzerId) { return; } this._settingDataPromise = this.getDataWarehouse().then(function (dataWarehouse) { var granuality = _this.getGranularity(); if (granuality > 0) { return Graphs.DataUtilities.getFilteredResult(dataWarehouse, _this._dataSource.AnalyzerId, _this._dataSource.CounterId, timeRange, { granularity: granuality.toString() }); } else { return Plugin.Promise.as({ p: [] }); } }).then(function (cpuUsageResult) { if (_this._chart) { _this._container.removeChild(_this._chart.rootElement); _this._chart = null; } if (cpuUsageResult && cpuUsageResult.p) { var chartItems = []; for (var i = 0; i < cpuUsageResult.p.length; i++) { var cpuUsagePoint = cpuUsageResult.p[i]; var time = cpuUsagePoint.t.h * 0x100000000 + cpuUsagePoint.t.l; chartItems.push({ series: cpuUsagePoint.c, x: time, height: cpuUsagePoint.u }); } var dataPresenter = _this.getDataPresenter(); dataPresenter.addData(chartItems); _this._chart = new Graphs.StackedBarChartView(); _this._chart.presenter = dataPresenter; _this._config.invokeEventListener(DiagnosticsHub.GraphEvents.ScaleInfoChanged, { minimum: 0, maximum: dataPresenter.maximumYValue }); _this._container.appendChild(_this._chart.rootElement); } }).then(function () { _this._settingDataPromise = null; }); }; StackedBarGraph.prototype.getDataWarehouse = function () { var _this = this; if (this._dataWarehouse) { return Plugin.Promise.as(this._dataWarehouse); } else { return DiagnosticsHub.DataWarehouse.loadDataWarehouse().then(function (dataWarehouse) { _this._dataWarehouse = dataWarehouse; return _this._dataWarehouse; }); } }; return StackedBarGraph; })(); Graphs.StackedBarGraph = StackedBarGraph; })(VisualProfiler.Graphs || (VisualProfiler.Graphs = {})); var Graphs = VisualProfiler.Graphs; })(VisualProfiler || (VisualProfiler = {})); // FormattingHelpers.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var FormattingHelpers = (function () { function FormattingHelpers() { } FormattingHelpers.convertFormatString = function (originalFormat) { var newFormat = originalFormat; var i = 0; while (true) { var placeholder = "{" + i + "}"; if (newFormat.indexOf(placeholder) === -1) { break; } while (newFormat.indexOf(placeholder) >= 0) { newFormat = newFormat.replace(placeholder, "%s"); } i++; } return newFormat; }; FormattingHelpers.getPrettyPrintTime = function (time) { var value; var unitAbbreviation; if (time.nsec === 0) { value = 0; unitAbbreviation = Plugin.Resources.getString("SecondsAbbreviation"); } else if (time.nsec < (1000 * 1000)) { value = parseFloat(time.msec.toPrecision(2)); unitAbbreviation = Plugin.Resources.getString("MillisecondsAbbreviation"); } else if (time.nsec < (1000 * 1000 * 1000)) { value = time.msec; value = Math.floor(value * 100) / 100; unitAbbreviation = Plugin.Resources.getString("MillisecondsAbbreviation"); } else { value = time.sec; value = Math.floor(value * 100) / 100; unitAbbreviation = Plugin.Resources.getString("SecondsAbbreviation"); } return Common.FormattingHelpers.getDecimalLocaleString(value, true) + " " + unitAbbreviation; }; return FormattingHelpers; })(); VisualProfiler.FormattingHelpers = FormattingHelpers; })(VisualProfiler || (VisualProfiler = {})); // RulerView.f12.ts var VisualProfiler; (function (VisualProfiler) { (function (F12) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var RulerViewModel = (function () { function RulerViewModel(globalRuler, markEventModel) { this.leftPadding = 40; this.rightPadding = 40; this._globalRuler = globalRuler; this._markEventModel = markEventModel; } Object.defineProperty(RulerViewModel.prototype, "globalRuler", { get: function () { return this._globalRuler; }, enumerable: true, configurable: true }); RulerViewModel.prototype.getMarks = function (category) { return this._markEventModel.getMarkEvents(this._globalRuler.totalRange, category); }; RulerViewModel.prototype.getMarkTooltip = function (mark) { return this._markEventModel.getMarkTooltip(mark); }; RulerViewModel.prototype.setSelectionRange = function (newSelection, isIntermittent) { if (typeof isIntermittent === "undefined") { isIntermittent = false; } this._globalRuler.setSelection(newSelection, isIntermittent); }; RulerViewModel.prototype.setActiveRange = function (newRange) { this._globalRuler.setActiveRange(newRange); }; return RulerViewModel; })(); F12.RulerViewModel = RulerViewModel; var RulerView = (function () { function RulerView(containerId) { this._parentContainer = document.getElementById(containerId); if (!this._parentContainer) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1034")); } } Object.defineProperty(RulerView.prototype, "minSelectionWidthInPixels", { set: function (value) { this._minSelectionWidthInPixels = value; }, enumerable: true, configurable: true }); Object.defineProperty(RulerView.prototype, "viewModel", { set: function (model) { this.unregisterViewModelEvents(); this._viewModel = model; this.registerViewModelEvents(); }, enumerable: true, configurable: true }); RulerView.prototype.focus = function () { this._focusRequested = false; if (this._rulerControl) { this._rulerControl.focus(); } else { this._focusRequested = true; } }; RulerView.prototype.render = function () { var _this = this; if (this._gettingMarksPromise) { this._gettingMarksPromise.cancel(); this._gettingMarksPromise = null; } this._parentContainer.innerHTML = ""; if (this._rulerControl) { this._rulerControl.deinitialize(); } var rulerConfig = new DiagnosticsHub.RulerConfig(this._parentContainer.id); rulerConfig.doubleSlider.timeRange = this._viewModel.globalRuler.totalRange.toJsonTimespan(); rulerConfig.doubleSlider.bar.left = this._viewModel.leftPadding; rulerConfig.doubleSlider.bar.right = this._viewModel.rightPadding; if (this._minSelectionWidthInPixels) { rulerConfig.doubleSlider.minimumRangeInPixel = this._minSelectionWidthInPixels; } var lifecycleData = []; var userMarkData = []; var lifecycleMarksPromise = this._viewModel.getMarks(0).then(function (lifecycleMarks) { lifecycleData = lifecycleMarks; }); var userMarksPromise = this._viewModel.getMarks(1).then(function (userMarks) { userMarkData = userMarks; }); this._gettingMarksPromise = Plugin.Promise.join([lifecycleMarksPromise, userMarksPromise]).then(function () { rulerConfig.doubleSlider.markSeries = [ { id: DiagnosticsHub.MarkType.UserMark, label: Plugin.Resources.getString("RulerUserMarkLabel"), tooltip: Plugin.Resources.getString("UserMarkTooltip"), data: userMarkData }, { id: DiagnosticsHub.MarkType.LifeCycleEvent, label: Plugin.Resources.getString("RulerLifecycleMarkLabel"), tooltip: Plugin.Resources.getString("LifecycleMarkTooltip"), data: lifecycleData } ]; _this._rulerControl = new DiagnosticsHub.Ruler(rulerConfig); _this._rulerControl.render(); if (_this._focusRequested) { _this.focus(); } }); this._gettingMarksPromise.done(function () { _this._gettingMarksPromise = null; }); }; RulerView.prototype.unregisterViewModelEvents = function () { if (this._viewModel) { this._viewModel.globalRuler.removeEventListener(VisualProfiler.GlobalRuler.SelectionChangedEventType, this.onGlobalRulerSelectionChanged.bind(this)); this._viewModel.globalRuler.removeEventListener(VisualProfiler.GlobalRuler.ActiveRangeChangedEventType, this.onGlobalRulerActiveRangeChange.bind(this)); } }; RulerView.prototype.registerViewModelEvents = function () { if (this._viewModel) { this._viewModel.globalRuler.addEventListener(VisualProfiler.GlobalRuler.SelectionChangedEventType, this.onGlobalRulerSelectionChanged.bind(this)); this._viewModel.globalRuler.addEventListener(VisualProfiler.GlobalRuler.ActiveRangeChangedEventType, this.onGlobalRulerActiveRangeChange.bind(this)); } }; RulerView.prototype.adjustSelection = function (selection, isIntermittent) { if (typeof isIntermittent === "undefined") { isIntermittent = false; } if (this._viewModel) { this._viewModel.setSelectionRange(selection, isIntermittent); } }; RulerView.prototype.onGlobalRulerActiveRangeChange = function (args) { if (this._viewModel && this._rulerControl) { this._rulerControl.zoom(this._viewModel.globalRuler.activeRange.toJsonTimespan(), this._viewModel.globalRuler.activeRange.toJsonTimespan()); this._rulerControl.setHandlePosition(this._viewModel.globalRuler.selection.toJsonTimespan()); } }; RulerView.prototype.onGlobalRulerSelectionChanged = function (args) { if (this._viewModel && this._rulerControl) { this._rulerControl.setHandlePosition(this._viewModel.globalRuler.selection.toJsonTimespan()); } }; return RulerView; })(); F12.RulerView = RulerView; })(VisualProfiler.F12 || (VisualProfiler.F12 = {})); var F12 = VisualProfiler.F12; })(VisualProfiler || (VisualProfiler = {})); // Divider.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var VisualProfiler; (function (VisualProfiler) { "use strict"; var Divider = (function (_super) { __extends(Divider, _super); function Divider(container, initialOffsetX) { _super.call(this, "dividerTemplate"); this._callbacks = []; this._container = container; this._backdrop = this.findElement("dividerBackdrop"); this._divider = this.findElement("divider"); this._divider.addEventListener("mousedown", this.onMouseDown.bind(this), true); this._container.appendChild(this._backdrop); this._container.appendChild(this._divider); this._minX = 0; this.offsetX = initialOffsetX; this._onMouseMoveHandler = this.onMouseMove.bind(this); this._onMouseUpHandler = this.onMouseUp.bind(this); } Object.defineProperty(Divider.prototype, "height", { set: function (value) { this._divider.style.height = value + "px"; this._backdrop.style.height = value + "px"; }, enumerable: true, configurable: true }); Object.defineProperty(Divider.prototype, "offsetX", { get: function () { if (this._divider.style.left) { var leftValue = parseInt(this._divider.style.left); if (!isNaN(leftValue)) { return leftValue; } } return this._divider.offsetLeft; }, set: function (value) { var xPos = value; if (xPos < this._minX) { xPos = this._minX; } else if (xPos > this._maxX) { xPos = this._maxX; } this._divider.style.left = xPos + "px"; }, enumerable: true, configurable: true }); Object.defineProperty(Divider.prototype, "minX", { get: function () { return this._minX; }, set: function (value) { this._minX = value; if (this.offsetX < this._minX) { this.offsetX = this._minX; } }, enumerable: true, configurable: true }); Object.defineProperty(Divider.prototype, "maxX", { get: function () { return this._maxX; }, set: function (value) { this._maxX = value; if (this.offsetX > this._maxX) { this.offsetX = this._maxX; } }, enumerable: true, configurable: true }); Divider.prototype.onMouseDown = function (e) { this._backdrop.style.zIndex = "1000"; this._backdrop.appendChild(this._divider); this._backdrop.setCapture(); this._backdrop.addEventListener("mousemove", this._onMouseMoveHandler, true); this._backdrop.addEventListener("mouseup", this._onMouseUpHandler, true); }; Divider.prototype.onMouseMove = function (e) { if (this.updateOffsetX(e.offsetX)) { if (this.onMoved) { this.onMoved(this._divider.offsetLeft); } } e.stopImmediatePropagation(); e.preventDefault(); }; Divider.prototype.onMouseUp = function (e) { if (this._container.firstChild) { this._container.insertBefore(this._divider, this._container.firstChild); } else { this._container.appendChild(this._divider); } this._backdrop.releaseCapture(); this._backdrop.style.zIndex = "-1"; this._backdrop.removeEventListener("mousemove", this._onMouseMoveHandler, true); this._backdrop.removeEventListener("mouseup", this._onMouseUpHandler, true); if (this.updateOffsetX(e.offsetX)) { if (this.onMoved) { this.onMoved(this._divider.offsetLeft); } } }; Divider.prototype.updateOffsetX = function (x) { var isOutsideDivider = x < this._divider.offsetLeft || x > (this._divider.offsetLeft + this._divider.offsetWidth); if (isOutsideDivider) { this.offsetX = x; return true; } return false; }; return Divider; })(Common.Controls.Legacy.TemplateControl); VisualProfiler.Divider = Divider; })(VisualProfiler || (VisualProfiler = {})); // SwimlanesView.f12.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var VisualProfiler; (function (VisualProfiler) { (function (F12) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var SwimlanesViewModel = (function () { function SwimlanesViewModel(globalRuler, markEventModel, session, leftPadding, rightPadding, toolbarViewModel) { this._globalRuler = globalRuler; this._graphConfigs = []; this._session = session; this.leftPadding = leftPadding; this.rightPadding = rightPadding; this.toolbarViewModel = toolbarViewModel; this._graphRulerViewModel = new F12.RulerViewModel(globalRuler, markEventModel); this._graphRulerViewModel.leftPadding = leftPadding; this._graphRulerViewModel.rightPadding = rightPadding; } Object.defineProperty(SwimlanesViewModel.prototype, "globalRuler", { get: function () { return this._globalRuler; }, enumerable: true, configurable: true }); Object.defineProperty(SwimlanesViewModel.prototype, "graphConfigs", { get: function () { return this._graphConfigs; }, set: function (configs) { this._graphConfigs = configs; }, enumerable: true, configurable: true }); Object.defineProperty(SwimlanesViewModel.prototype, "graphRulerViewModel", { get: function () { return this._graphRulerViewModel; }, enumerable: true, configurable: true }); SwimlanesViewModel.prototype.getSwimlaneConfigurationFromManagedConfig = function (config) { var swimlaneConfig = new DiagnosticsHub.SwimLaneConfiguration(); if (config.JavaScriptClassName) { swimlaneConfig.body.graph.registeredClass = DiagnosticsHub.RegisterNamespace.getRegisteredGraph(config.JavaScriptClassName); } else { swimlaneConfig.body.graph.registeredClass = DiagnosticsHub.RegisterNamespace.getRegisteredGraph("Microsoft.VisualStudio.DiagnosticsHub.MultiLineGraph"); } swimlaneConfig.body.graph.jsonConfig = config.JsonObject; swimlaneConfig.body.graph.jsonConfig.GraphBehaviour = DiagnosticsHub.GraphBehaviourType.PostMortem; swimlaneConfig.body.graph.resources = config.Resources; swimlaneConfig.body.graph.description = config.Description; swimlaneConfig.body.graph.height = config.JsonObject.Height; config.JsonObject.RefreshDataOnResizeAndZoom = config.JsonObject.RefreshDataOnResizeAndZoom || false; swimlaneConfig.body.leftScale.isVisible = true; swimlaneConfig.body.leftScale.width = this.leftPadding; swimlaneConfig.body.leftScale.minimum = config.JsonObject.MinValue; swimlaneConfig.body.leftScale.maximum = config.JsonObject.MaxValue; swimlaneConfig.body.rightScale.isVisible = true; swimlaneConfig.body.rightScale.width = this.rightPadding; swimlaneConfig.body.rightScale.minimum = config.JsonObject.MinValue; swimlaneConfig.body.rightScale.maximum = config.JsonObject.MaxValue; swimlaneConfig.timeRange = this.globalRuler.activeRange.toJsonTimespan(); swimlaneConfig.header.title.titleText = config.Title; swimlaneConfig.header.legend.data = []; swimlaneConfig.header.title.isGraphCollapsible = true; swimlaneConfig.getVerticalRulerLinePositions = DiagnosticsHub.RulerUtilities.getVerticalLinePositions; swimlaneConfig.isSelectionEnabled = true; swimlaneConfig.isZoomEnabled = true; return swimlaneConfig; }; return SwimlanesViewModel; })(); F12.SwimlanesViewModel = SwimlanesViewModel; var SwimlanesView = (function (_super) { __extends(SwimlanesView, _super); function SwimlanesView(containerId) { _super.call(this, "swimLanesView"); var parentContainer = document.getElementById(containerId); if (!containerId) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1034")); } parentContainer.appendChild(this.rootElement); this._swimlanes = []; this._swimlanesContainer = this.findElement("swimlanesContainer"); this._graphRulerView = new F12.RulerView(this.findElement("graphRulerView").id); this._onGlobalRulerActiveRangeChange = this.onGlobalRulerActiveRangeChange.bind(this); this._onGlobalRulerSelectionChanged = this.onGlobalRulerSelectionChanged.bind(this); this._triggerResize = function () { return VisualProfiler.Program.triggerResize(); }; } Object.defineProperty(SwimlanesView.prototype, "viewModel", { get: function () { return this._viewModel; }, set: function (value) { this.unregisterViewModelEvents(); this.removeSwimlanes(); this._viewModel = value; if (this._viewModel) { this._graphRulerView.minSelectionWidthInPixels = this._viewModel.minSelectionWidthInPixel; this._graphRulerView.viewModel = this._viewModel.graphRulerViewModel; this.setupSwimlanes(); } this.registerViewModelEvents(); }, enumerable: true, configurable: true }); SwimlanesView.prototype.focusOnRuler = function () { this._graphRulerView.focus(); }; SwimlanesView.prototype.render = function () { this._graphRulerView.render(); this._swimlanes.forEach(function (swimlane) { swimlane.render(); }); }; SwimlanesView.prototype.getNewSwimlaneContainer = function () { var swimlaneContainer = document.createElement("div"); swimlaneContainer.id = SwimlanesView.SWIMLANE_CONTAINER_ID_PREFIX + this._swimlanesContainer.childElementCount.toString(); this._swimlanesContainer.appendChild(swimlaneContainer); return swimlaneContainer; }; SwimlanesView.prototype.getToolbarViewModel = function () { return this._viewModel && this._viewModel.toolbarViewModel; }; SwimlanesView.prototype.registerViewModelEvents = function () { if (this._viewModel) { this._viewModel.globalRuler.addEventListener(VisualProfiler.GlobalRuler.SelectionChangedEventType, this._onGlobalRulerSelectionChanged); this._viewModel.globalRuler.addEventListener(VisualProfiler.GlobalRuler.ActiveRangeChangedEventType, this._onGlobalRulerActiveRangeChange); } }; SwimlanesView.prototype.unregisterViewModelEvents = function () { if (this._viewModel) { this._viewModel.globalRuler.removeEventListener(VisualProfiler.GlobalRuler.SelectionChangedEventType, this._onGlobalRulerSelectionChanged); this._viewModel.globalRuler.removeEventListener(VisualProfiler.GlobalRuler.ActiveRangeChangedEventType, this._onGlobalRulerActiveRangeChange); } }; SwimlanesView.prototype.removeSwimlanes = function () { while (this._swimlanes.length > 0) { var swimlane = this._swimlanes.pop(); swimlane.removeEventListener(DiagnosticsHub.SwimlaneEvents.Visibility, this._triggerResize); swimlane.deinitialize(); } this._swimlanesContainer.innerHTML = ""; }; SwimlanesView.prototype.setupSwimlanes = function () { if (this._viewModel.graphConfigs) { for (var i = 0; i < this._viewModel.graphConfigs.length; i++) { var graphManagedConfig = this._viewModel.graphConfigs[i]; var swimlaneContainer = this.getNewSwimlaneContainer(); this.setupSelectionContextMenu(swimlaneContainer); var swimlaneConfiguration = this._viewModel.getSwimlaneConfigurationFromManagedConfig(graphManagedConfig); swimlaneConfiguration.minSelectionWidthInPixels = this._viewModel.minSelectionWidthInPixel; swimlaneConfiguration.containerId = swimlaneContainer.id; var swimlane = new DiagnosticsHub.SwimLane(swimlaneConfiguration); swimlane.addEventListener(DiagnosticsHub.SwimlaneEvents.Visibility, this._triggerResize); this._swimlanes.push(swimlane); } } }; SwimlanesView.prototype.setupSelectionContextMenu = function () { var _this = this; var elements = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { elements[_i] = arguments[_i + 0]; } var iconNames = this.getSelectionContextMenuIconNames(); var zoomInMenuItem = { callback: function () { if (_this.getToolbarViewModel()) { _this.getToolbarViewModel().zoomIn(); } }, disabled: function () { return _this.getToolbarViewModel() ? !_this.getToolbarViewModel().zoomInEnabled : true; }, iconEnabled: iconNames.zoomin.enabled, iconDisabled: iconNames.zoomin.disabled, label: Plugin.Resources.getString("ToolbarButtonZoomIn"), type: 1 /* command */ }; var resetZoomMenuItem = { callback: function () { if (_this.getToolbarViewModel()) { _this.getToolbarViewModel().resetZoom(); } }, disabled: function () { return _this.getToolbarViewModel() ? !_this.getToolbarViewModel().resetZoomEnabled : true; }, iconEnabled: iconNames.resetZoom.enabled, iconDisabled: iconNames.resetZoom.disabled, label: Plugin.Resources.getString("ToolbarButtonResetZoom"), type: 1 /* command */ }; var clearSelectionMenuItem = { callback: function () { if (_this.getToolbarViewModel()) { _this.getToolbarViewModel().clearSelection(); } }, disabled: function () { return _this.getToolbarViewModel() ? !_this.getToolbarViewModel().clearSelectionEnabled : true; }, iconEnabled: iconNames.clearSelection.enabled, iconDisabled: iconNames.clearSelection.disabled, label: Plugin.Resources.getString("ToolbarButtonClearSelection"), type: 1 /* command */ }; this._selectionActionContextMenu = Plugin.ContextMenu.create([zoomInMenuItem, resetZoomMenuItem, clearSelectionMenuItem]); for (var index = 0; index < elements.length; index++) { this._selectionActionContextMenu.attach(elements[index]); } }; SwimlanesView.prototype.getSelectionContextMenuIconNames = function () { return { zoomin: { enabled: "f12-image-contextmenu-chartzoom-in", disabled: "f12-image-contextmenu-chartzoom-in-disabled" }, resetZoom: { enabled: "f12-image-contextmenu-chartzoom-reset", disabled: "f12-image-contextmenu-chartzoom-reset-disabled" }, clearSelection: { enabled: "f12-image-contextmenu-chartselection-clear", disabled: "f12-image-contextmenu-chartselection-clear-disabled" } }; }; SwimlanesView.prototype.onGlobalRulerActiveRangeChange = function (args) { var _this = this; if (this._viewModel) { this._swimlanes.forEach(function (swimlane) { swimlane.updateTimeRange(_this._viewModel.globalRuler.activeRange.toJsonTimespan()); swimlane.setSelection(_this._viewModel.globalRuler.selection.toJsonTimespan()); }); } }; SwimlanesView.prototype.onGlobalRulerSelectionChanged = function (args) { var _this = this; if (this._viewModel) { this._swimlanes.forEach(function (swimlane) { swimlane.setSelection(_this._viewModel.globalRuler.selection.toJsonTimespan()); }); } }; SwimlanesView.SWIMLANE_CONTAINER_ID_PREFIX = "swimlaneContainer_"; return SwimlanesView; })(Common.Controls.Legacy.TemplateControl); F12.SwimlanesView = SwimlanesView; })(VisualProfiler.F12 || (VisualProfiler.F12 = {})); var F12 = VisualProfiler.F12; })(VisualProfiler || (VisualProfiler = {})); // SwimlaneConfigurations.f12.ts var VisualProfiler; (function (VisualProfiler) { (function (F12) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var SwimlaneConfigurations = (function () { function SwimlaneConfigurations() { this.configurations = [ SwimlaneConfigurations.getCpuUsageConfiguration(), SwimlaneConfigurations.getVisualThroughputConfiguration() ]; } SwimlaneConfigurations.getCpuUsageConfiguration = function () { var graphJsonConfigString = "\ {\ \"View\": \"Graph\",\ \"GraphBehaviour\": 2,\ \"Series\": [{\ \"Legend\": \"Loading_Category\",\ \"LegendTooltip\": \"LoadingLegendTooltip\",\ \"Category\": \"Loading_Category\",\ \"Color\": \"#0072c6\",\ \"CssClass\": \"dataLoading\",\ \"DataSource\": {\ \"CounterId\": \"CPUUsage\",\ \"AnalyzerId\": \"3A649979-5A30-4542-A12F-1E0C09858804\"\ }\ }, {\ \"Legend\": \"Scripting_Category\",\ \"LegendTooltip\": \"ScriptingLegendTooltip\",\ \"Category\": \"Scripting_Category\",\ \"Color\": \"#dd5900\",\ \"CssClass\": \"dataScripting\"\ }, {\ \"Legend\": \"GC_Category\",\ \"LegendTooltip\": \"GCLegendTooltip\",\ \"Category\": \"GC_Category\",\ \"Color\": \"#f1ad00\",\ \"CssClass\": \"dataScriptingGc\"\ }, {\ \"Legend\": \"Styling_Category\",\ \"LegendTooltip\": \"StylingLegendTooltip\",\ \"Category\": \"Styling_Category\",\ \"Color\": \"#7fba00\",\ \"CssClass\": \"dataStyling\"\ }, {\ \"Legend\": \"Rendering_Category\",\ \"LegendTooltip\": \"RenderingLegendTooltip\",\ \"Category\": \"Rendering_Category\",\ \"Color\": \"#9b4f96\",\ \"CssClass\": \"dataRendering\"\ }, {\ \"Legend\": \"ImageDecoding_Category\",\ \"LegendTooltip\": \"ImageDecodingLegendTooltip\",\ \"Category\": \"ImageDecoding_Category\",\ \"Color\": \"#79d7f2\",\ \"CssClass\": \"dataImageDecoding\"\ }],\ \"BarWidth\": 4,\ \"BarGap\": 1,\ \"ShowStackGap\": true,\ \"Height\": 60\ }"; var graphJsonObject = JSON.parse(graphJsonConfigString); var managedConfig = { Title: Plugin.Resources.getString("CPUChartTitle"), Description: Plugin.Resources.getString("CPUGraphAriaLabel"), JsonObject: graphJsonObject, JsonConfiguration: graphJsonConfigString, JavaScriptClassName: "VisualProfiler.Graphs.StackedBarGraph", Resources: { CPUBarAriaLabel: Plugin.Resources.getString("CPUBarAriaLabel"), CPUGraphAriaLabel: Plugin.Resources.getString("CPUGraphAriaLabel"), CPUTooltipCategoryLabel: Plugin.Resources.getString("CPUTooltipCategoryLabel"), CPUTooltipUtilizationLabel: Plugin.Resources.getString("CPUTooltipUtilizationLabel"), GC_Category: Plugin.Resources.getString("GC_Category"), GCLegendTooltip: Plugin.Resources.getString("GCLegendTooltip"), ImageDecoding_Category: Plugin.Resources.getString("ImageDecoding_Category"), ImageDecodingLegendTooltip: Plugin.Resources.getString("ImageDecodingLegendTooltip"), Loading_Category: Plugin.Resources.getString("Loading_Category"), LoadingLegendTooltip: Plugin.Resources.getString("LoadingLegendTooltip"), Rendering_Category: Plugin.Resources.getString("Rendering_Category"), RenderingLegendTooltip: Plugin.Resources.getString("RenderingLegendTooltip"), Scripting_Category: Plugin.Resources.getString("Scripting_Category"), ScriptingLegendTooltip: Plugin.Resources.getString("ScriptingLegendTooltip"), Styling_Category: Plugin.Resources.getString("Styling_Category"), StylingLegendTooltip: Plugin.Resources.getString("StylingLegendTooltip"), Unknown_Category: Plugin.Resources.getString("Unknown_Category"), UnknownLegendTooltip: Plugin.Resources.getString("UnknownLegendTooltip") } }; DiagnosticsHub.RegisterNamespace.register("VisualProfiler.Graphs.StackedBarGraph"); return managedConfig; }; SwimlaneConfigurations.getVisualThroughputConfiguration = function () { var graphJsonConfigString = "\ {\ \"View\": \"Graph\",\ \"GraphBehaviour\": 2,\ \"Series\": [{\ \"SeriesType\": \"StepLine\",\ \"Legend\": \"AFG_Legend\",\ \"DataSource\": {\ \"CounterId\": \"frameRate\",\ \"AnalyzerId\": \"3A649979-5A30-4542-A12F-1E0C09858804\"\ }\ }],\ \"Axes\": [{ \"value\": 30 }, { \"value\": 60 }],\ \"ScaleType\": 2,\ \"MinValue\": 0,\ \"MaxValue\": 70,\ \"Unit\": \"AFG_Unit\",\ \"Height\": 50\ }"; var graphJsonObject = JSON.parse(graphJsonConfigString); var managedConfig = { Title: Plugin.Resources.getString("AFG_Title"), Description: Plugin.Resources.getString("VisualThroughputGraphAriaLabel"), JsonObject: graphJsonObject, JsonConfiguration: graphJsonConfigString, Resources: { AFG_Legend: Plugin.Resources.getString("AFG_Legend"), AFG_Unit: Plugin.Resources.getString("AFG_Unit") } }; return managedConfig; }; return SwimlaneConfigurations; })(); F12.SwimlaneConfigurations = SwimlaneConfigurations; })(VisualProfiler.F12 || (VisualProfiler.F12 = {})); var F12 = VisualProfiler.F12; })(VisualProfiler || (VisualProfiler = {})); // EventsTimelineListControl.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var VisualProfiler; (function (VisualProfiler) { "use strict"; (function (EventCategory) { EventCategory[EventCategory["ImageDecoding"] = 0] = "ImageDecoding"; EventCategory[EventCategory["GC"] = 1] = "GC"; EventCategory[EventCategory["Loading"] = 2] = "Loading"; EventCategory[EventCategory["Rendering"] = 3] = "Rendering"; EventCategory[EventCategory["Scripting"] = 4] = "Scripting"; EventCategory[EventCategory["Styling"] = 5] = "Styling"; EventCategory[EventCategory["Measure"] = 6] = "Measure"; EventCategory[EventCategory["Frame"] = 7] = "Frame"; EventCategory[EventCategory["Idle"] = 8] = "Idle"; })(VisualProfiler.EventCategory || (VisualProfiler.EventCategory = {})); var EventCategory = VisualProfiler.EventCategory; (function (TextFormat) { TextFormat[TextFormat["Html"] = 0] = "Html"; TextFormat[TextFormat["String"] = 1] = "String"; })(VisualProfiler.TextFormat || (VisualProfiler.TextFormat = {})); var TextFormat = VisualProfiler.TextFormat; var EventDataTooltip = (function (_super) { __extends(EventDataTooltip, _super); function EventDataTooltip(event) { _super.call(this, "eventDataTooltip"); var durationExclusive = this.findElement("durationExc"); var durationInclusive = this.findElement("durationInc"); var startTime = this.findElement("startTime"); durationExclusive.textContent = Plugin.Resources.getString("DurationLabelExclusive", VisualProfiler.FormattingHelpers.getPrettyPrintTime(event.exclusiveDuration)); durationInclusive.textContent = Plugin.Resources.getString("DurationLabelInclusive", VisualProfiler.FormattingHelpers.getPrettyPrintTime(event.timeSpan.elapsed)); startTime.textContent = Plugin.Resources.getString("StartTimeLabel", VisualProfiler.FormattingHelpers.getPrettyPrintTime(event.timeSpan.begin)); } return EventDataTooltip; })(Common.Controls.Legacy.TemplateControl); VisualProfiler.EventDataTooltip = EventDataTooltip; var EventDataTemplate = (function (_super) { __extends(EventDataTemplate, _super); function EventDataTemplate() { var _this = this; _super.call(this, "eventDataTemplate"); this._bar = this.findElement("bar"); this._durationText = this.findElement("durationText"); this._eventDataTemplateNameCell = this.findElement("eventDataTemplateNameCell"); this._eventData = this.findElement("eventData"); this._eventName = this.findElement("eventName"); this._bar.addEventListener("mouseover", function (e) { return _this.showBarTooltip(); }); this._bar.addEventListener("mouseout", function (e) { return Plugin.Tooltip.dismiss(); }); this._eventName.addEventListener("mouseover", function (e) { return _this.showEventNameTooltip(e); }); this._eventName.addEventListener("mouseout", function (e) { return Plugin.Tooltip.dismiss(); }); } Object.defineProperty(EventDataTemplate.prototype, "canViewSource", { get: function () { var sourceInfo = this._event.context ? this._event.context.sourceInfo : null; return EventDataTemplate.hasViewSourceInfo(sourceInfo); }, enumerable: true, configurable: true }); EventDataTemplate.addTokens = function (text, div, textFormat) { var tokens; switch (textFormat) { case 0 /* Html */: tokens = Common.TokenExtractor.getHtmlTokens(text); break; case 1 /* String */: tokens = Common.TokenExtractor.getStringTokens(text); break; } if (tokens && tokens.length > 0) { for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; var tokenSpan = document.createElement("span"); tokenSpan.className = Common.TokenExtractor.getCssClass(token.type); tokenSpan.textContent = token.value; div.appendChild(tokenSpan); } } else { div.textContent = text; } }; EventDataTemplate.hasViewSourceInfo = function (sourceInfo) { return sourceInfo && sourceInfo.source !== ""; }; EventDataTemplate.setViewSourceHandler = function (element, sourceInfo, keyboardNavigable, event) { element.addEventListener("mouseover", function (e) { return EventDataTemplate.showSourceInfoTooltip(e, sourceInfo, event); }); element.addEventListener("mouseout", function (e) { return Plugin.Tooltip.dismiss(); }); element.onclick = EventDataTemplate.contextMouseHandler.bind(this, sourceInfo); if (keyboardNavigable) { element.tabIndex = 0; element.onkeydown = EventDataTemplate.contextKeyHandler.bind(this, sourceInfo); } }; EventDataTemplate.showSourceInfoTooltip = function (mouseEvent, sourceInfo, event) { if (sourceInfo) { var tooltip = new Common.Controls.Legacy.SourceInfoTooltip(sourceInfo, event, "SourceInfoEventLabel"); var config = { content: tooltip.html, contentContainsHTML: true }; Plugin.Tooltip.show(config); mouseEvent.stopImmediatePropagation(); } }; EventDataTemplate.prototype.tryViewSource = function () { if (this.canViewSource) { var sourceInfo = this._event.context.sourceInfo; EventDataTemplate.viewSource(sourceInfo.source, sourceInfo.line, sourceInfo.column); } }; EventDataTemplate.prototype.updateEvent = function (event, parentTimeSpan) { if (this._event !== event || !this._parentTimeSpan || !this._parentTimeSpan.equals(parentTimeSpan)) { this._event = event; this._parentTimeSpan = parentTimeSpan; this.updateData(event); } }; EventDataTemplate.prototype.updateUiOverride = function (event) { _super.prototype.updateUiOverride.call(this, event); if (event.context) { this._eventName.textContent = ""; var appendSpan = function (text, parent) { if (text) { var span = document.createElement("span"); span.textContent = text; parent.appendChild(span); } }; appendSpan(event.fullName.substring(0, event.context.span.startIndex), this._eventName); var text = event.fullName.substring(event.context.span.startIndex, event.context.span.endIndex); var span = this.getContextSpan(event.name, text, event.context.sourceInfo); this._eventName.appendChild(span); appendSpan(event.fullName.substring(event.context.span.endIndex), this._eventName); } else if (event instanceof VisualProfiler.ProfilerEvent && Common.TokenExtractor.isHtmlExpression(event.fullName)) { this._eventName.textContent = ""; EventDataTemplate.addTokens(event.fullName, this._eventName, 0 /* Html */); } else if (event instanceof VisualProfiler.ProfilerEvent && Common.TokenExtractor.isStringExpression(event.fullName)) { this._eventName.textContent = ""; EventDataTemplate.addTokens(event.fullName, this._eventName, 1 /* String */); } else { this._eventName.textContent = event.fullName; } var left = (event.timeSpan.begin.nsec - this._parentTimeSpan.begin.nsec) / this._parentTimeSpan.elapsed.nsec * 100; var width = event.timeSpan.elapsed.nsec / this._parentTimeSpan.elapsed.nsec * 100; this._bar.style.marginLeft = left + "%"; this._bar.style.width = width + "%"; EventDataTemplate.setBarCss(this._bar, event); var durationText = VisualProfiler.FormattingHelpers.getPrettyPrintTime(event.timeSpan.elapsed); if (!event.exclusiveDuration.equals(event.timeSpan.elapsed)) { durationText += " (" + VisualProfiler.FormattingHelpers.getPrettyPrintTime(event.exclusiveDuration) + ")"; } this._durationText.textContent = durationText; }; EventDataTemplate.contextKeyHandler = function (sourceInfo, evt) { if ((evt.keyCode === 13 /* Enter */ || evt.keyCode === 32 /* Space */) && !evt.ctrlKey && !evt.altKey && !evt.shiftKey) { EventDataTemplate.viewSource(sourceInfo.source, sourceInfo.line, sourceInfo.column); } }; EventDataTemplate.contextMouseHandler = function (sourceInfo) { window.setImmediate(function () { EventDataTemplate.viewSource(sourceInfo.source, sourceInfo.line, sourceInfo.column); }); }; EventDataTemplate.setBarCss = function (bar, event) { bar.className = "eventBar " + event.getCssClass(); var barCssClass = event.getBarCssClass(); if (barCssClass) { bar.classList.add(barCssClass); } }; EventDataTemplate.viewSource = function (unshortenedUrl, line, column) { Plugin.Host.showDocument(unshortenedUrl, line, column).done(function () { }, function (err) { VisualProfiler.Program.hostShell.setStatusBarText(Plugin.Resources.getString("UnableToNavigateToSource"), true); }); }; EventDataTemplate.prototype.getContextSpan = function (eventName, linkText, sourceInfo) { var contextLink = document.createElement("span"); contextLink.textContent = linkText; var sourceInfo = this._event.context ? this._event.context.sourceInfo : null; if (EventDataTemplate.hasViewSourceInfo(sourceInfo)) { contextLink.className = "BPT-FileLink"; EventDataTemplate.setViewSourceHandler(contextLink, sourceInfo, false, eventName); } return contextLink; }; EventDataTemplate.prototype.showBarTooltip = function () { if (this._event) { var toolTipControl = new EventDataTooltip(this._event); var config = { content: toolTipControl.rootElement.innerHTML, contentContainsHTML: true }; Plugin.Tooltip.show(config); } }; EventDataTemplate.prototype.showEventNameTooltip = function (mouseEvent) { if (this._event) { var eventDiv = mouseEvent.currentTarget; var tooltip = this._eventName.textContent; if (eventDiv.offsetWidth < eventDiv.scrollWidth) { var config = { content: tooltip }; Plugin.Tooltip.show(config); } } }; return EventDataTemplate; })(Common.Controls.Legacy.TreeItemDataTemplate); VisualProfiler.EventDataTemplate = EventDataTemplate; var EventsTimelineListControl = (function (_super) { __extends(EventsTimelineListControl, _super); function EventsTimelineListControl(rootElement) { var _this = this; _super.call(this, rootElement); this._columnsCssRule = this.getColumnsCssRule(); this.ariaLabel = Plugin.Resources.getString("EventsTimelineAriaLabel"); this.dataItemTemplateType = VisualProfiler.EventDataTemplate; this.onGetItemContainerAriaLabel = function (ic) { return _this.getItemContainerAriaLabel(ic); }; this.onScrolled = function (e) { Notifications.notify(VisualProfiler.ResponsivenessNotifications.GridScrolled); VisualProfiler.Program.traceWriter.raiseEvent(107 /* Timeline_GridScrolled */); }; VisualProfiler.Program.addEventListener(VisualProfiler.ProgramEvents.Resize, function () { _this._columnsCssRule = _this.getColumnsCssRule(); _this.invalidateSizeCache(); if (_this._viewModel) { _this.setDividerBounds(); _this.resizeColumns(_this._divider.offsetX); } _this.onWindowResize(); }); this._divider = new VisualProfiler.Divider(this.panel.rootElement, this.eventNameColumnWidth); this._divider.minX = 90; this._divider.onMoved = function (offsetX) { _this.resizeColumns(offsetX); VisualProfiler.Program.triggerResize(); }; this.setDividerBounds(); this._verticalRulerLineElementsFactory = Common.ElementRecyclerFactory.forDivWithClass(this.rootElement, "verticalRulerLine"); this.invalidateSizeCache(); } Object.defineProperty(EventsTimelineListControl.prototype, "dataColumnLeft", { get: function () { var columns = this._columnsCssRule.style.msGridColumns.split(" "); return parseInt(columns[0]) + parseInt(columns[1]); }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineListControl.prototype, "dataColumnWidth", { get: function () { if (this._dataColumnWidth === null) { var panelScrollBarWidth = this.panel.rootElement.offsetWidth - this.panel.rootElement.clientWidth; this._dataColumnWidth = this.rootElement.offsetWidth - this.dataColumnLeft - panelScrollBarWidth; } return this._dataColumnWidth; }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineListControl.prototype, "eventNameColumnWidth", { get: function () { var columns = this._columnsCssRule.style.msGridColumns.split(" "); return parseInt(columns[0]); }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineListControl.prototype, "rulerScale", { get: function () { return this._rulerScale; }, set: function (rulerScale) { if (this._rulerScale !== rulerScale) { this._rulerScale = rulerScale; } }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineListControl.prototype, "timeSpan", { set: function (value) { this._timeSpan = value; }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineListControl.prototype, "viewModel", { set: function (value) { this._viewModel = value; }, enumerable: true, configurable: true }); EventsTimelineListControl.prototype.filterToEvent = function () { var _this = this; var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer) { selectedItemContainer.template.expand(); var event = this.selectedItem; var filterTimeSpan = this.getFilterTimeSpan(event); var activeRange = this._viewModel.globalRuler.activeRange; if (!activeRange.equals(this._viewModel.globalRuler.totalRange)) { var begin = (filterTimeSpan.begin.nsec < activeRange.begin.nsec) ? filterTimeSpan.begin : activeRange.begin; var end = (filterTimeSpan.end.nsec > activeRange.end.nsec) ? filterTimeSpan.end : activeRange.end; this._viewModel.globalRuler.setActiveRange(new VisualProfiler.TimeSpan(begin, end)); } this._viewModel.timeSpan = filterTimeSpan; this._viewModel.globalRuler.setSelection(filterTimeSpan); window.setImmediate(function () { var selectedItemContainer = _this.getSelectedItemContainer(); if (selectedItemContainer) { selectedItemContainer.focus(); } }); } }; EventsTimelineListControl.prototype.invalidateSizeCache = function () { this._dataColumnWidth = null; _super.prototype.invalidateSizeCache.call(this); }; EventsTimelineListControl.prototype.onInvalidated = function () { this.updateDividerHeight(); }; EventsTimelineListControl.prototype.onKeyDownOverride = function (event) { var handled = false; switch (event.keyCode) { case 13 /* Enter */: this.onViewSource(); handled = true; break; } if (!handled) { handled = _super.prototype.onKeyDownOverride.call(this, event); } return handled; }; EventsTimelineListControl.prototype.onShowContextMenu = function () { var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer && this._contextMenu) { var rect = selectedItemContainer.template.rootElement.getBoundingClientRect(); this._contextMenu.show(rect.left + rect.width / 2, rect.top + rect.height / 2, rect.width); } }; EventsTimelineListControl.prototype.renderVerticalRulerLines = function () { var positions = this._viewModel.getVerticalRulerLinePositions(this.dataColumnWidth); this._verticalRulerLineElementsFactory.start(); for (var i = 0; i < positions.length; ++i) { var line = this._verticalRulerLineElementsFactory.getNext(); var x = this.dataColumnWidth * positions[i] / 100 + this.dataColumnLeft; this.positionVerticalRulerLine(line, x, this.panel.viewportHeight); } this._verticalRulerLineElementsFactory.stop(); }; EventsTimelineListControl.prototype.updateTemplateData = function (template, data) { template.updateEvent(data, this._timeSpan); if (!template.rootElement.getAttributeNode("data-plugin-contextmenu")) { this.setupEventContextMenu(template.rootElement); } }; EventsTimelineListControl.prototype.positionVerticalRulerLine = function (line, x, height) { line.style.left = x + "px"; line.style.height = height + "px"; line.style.top = "0px"; }; EventsTimelineListControl.prototype.getColumnsCssRule = function () { return VisualProfiler.EventsTimelineView.getCssRule("VisualProfiler.css", ".eventDataTemplate"); }; EventsTimelineListControl.prototype.resizeColumns = function (offsetX) { this._dataColumnWidth = null; this.updateColumnWidth(offsetX); if (this.dataColumnWidthChanged) { this.dataColumnWidthChanged(); } this.renderVerticalRulerLines(); }; EventsTimelineListControl.prototype.setupEventContextMenu = function () { var _this = this; var elements = []; for (var _i = 0; _i < (arguments.length - 0); _i++) { elements[_i] = arguments[_i + 0]; } if (!this._contextMenu) { var iconNames = this.getSelectionContextMenuIconNames(); var filterToEventItem = { callback: function () { _this.filterToEvent(); }, label: Plugin.Resources.getString("FilterToEventContextMenu"), type: 1 /* command */, disabled: function () { return false; } }; var clearSelection = { callback: function () { _this.clearSelection(); }, label: Plugin.Resources.getString("ToolbarButtonClearSelection"), type: 1 /* command */, iconEnabled: iconNames.clearSelection.enabled, iconDisabled: iconNames.clearSelection.disabled, disabled: function () { return _this.isClearFilterDisabled(); } }; var separatorMenuItem = { type: 3 /* separator */ }; var viewSourceMenuItem = { accessKey: Plugin.Resources.getString("EnterKey"), callback: function () { return window.setImmediate(_this.onViewSource.bind(_this)); }, disabled: this.isViewSourceCommandDisabled.bind(this), label: Plugin.Resources.getString("ViewSourceLabel"), type: 1 /* command */ }; this._contextMenu = Plugin.ContextMenu.create([filterToEventItem, clearSelection, separatorMenuItem, viewSourceMenuItem]); } for (var index = 0; index < elements.length; index++) { this._contextMenu.attach(elements[index]); } }; EventsTimelineListControl.prototype.getSelectionContextMenuIconNames = function () { if (VisualProfiler.Program.hostType === 1 /* F12 */) { return { zoomin: { enabled: "f12-image-contextmenu-chartzoom-in", disabled: "f12-image-contextmenu-chartzoom-in-disabled" }, resetZoom: { enabled: "f12-image-contextmenu-chartzoom-reset", disabled: "f12-image-contextmenu-chartzoom-reset-disabled" }, clearSelection: { enabled: "f12-image-contextmenu-chartselection-clear", disabled: "f12-image-contextmenu-chartselection-clear-disabled" } }; } else if (VisualProfiler.Program.hostType === 0 /* VS */) { return { zoomin: { enabled: "vs-image-contextmenu-chartzoom-in", disabled: "vs-image-contextmenu-chartzoom-in-disabled" }, resetZoom: { enabled: "vs-image-contextmenu-chartzoom-reset", disabled: "vs-image-contextmenu-chartzoom-reset-disabled" }, clearSelection: { enabled: "vs-image-contextmenu-chartselection-clear", disabled: "vs-image-contextmenu-chartselection-clear-disabled" } }; } }; EventsTimelineListControl.prototype.isClearFilterDisabled = function () { return this._viewModel.globalRuler.selection.equals(this._viewModel.globalRuler.activeRange); }; EventsTimelineListControl.prototype.isViewSourceCommandDisabled = function () { var itemContainer = this.getSelectedItemContainer(); if (!itemContainer) { return false; } var dataTemplate = itemContainer.template; return dataTemplate && !dataTemplate.canViewSource; }; EventsTimelineListControl.prototype.getFilterTimeSpan = function (event) { var paddingPixels = 50; var eventTimeSpan = event.timeSpan; var sessionTimeSpan = this._viewModel.globalRuler.totalRange; var begin = Math.max(eventTimeSpan.begin.nsec, sessionTimeSpan.begin.nsec); var end = Math.min(eventTimeSpan.end.nsec, sessionTimeSpan.end.nsec); return new VisualProfiler.TimeSpan(new VisualProfiler.TimeStamp(begin), new VisualProfiler.TimeStamp(end)); }; EventsTimelineListControl.prototype.clearSelection = function () { var _this = this; var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer) { selectedItemContainer.template.collapse(); } this._viewModel.globalRuler.setSelection(this._viewModel.globalRuler.activeRange); window.setImmediate(function () { var selectedItemContainer = _this.getSelectedItemContainer(); if (selectedItemContainer) { selectedItemContainer.focus(); } }); }; EventsTimelineListControl.prototype.onViewSource = function () { var selectedItemContainer = this.getSelectedItemContainer(); if (selectedItemContainer) { var dataTemplate = selectedItemContainer.template; if (dataTemplate) { dataTemplate.tryViewSource(); } } }; EventsTimelineListControl.prototype.setDividerBounds = function () { var containerWidth = this.panel.rootElement.offsetWidth; if (containerWidth > 0) { this._divider.maxX = containerWidth / 2; } }; EventsTimelineListControl.prototype.getItemContainerAriaLabel = function (itemContainer) { var ariaLabel; var event = itemContainer.item; if (event) { ariaLabel = event.name; ariaLabel += " , " + Plugin.Resources.getString("StartTimeLabel", VisualProfiler.FormattingHelpers.getPrettyPrintTime(event.timeSpan.begin)); ariaLabel += " , " + Plugin.Resources.getString("DurationLabelInclusive", VisualProfiler.FormattingHelpers.getPrettyPrintTime(event.timeSpan.elapsed)); if (!event.timeSpan.elapsed.equals(event.exclusiveDuration)) { ariaLabel += " , " + Plugin.Resources.getString("DurationLabelExclusive", VisualProfiler.FormattingHelpers.getPrettyPrintTime(event.exclusiveDuration)); } ariaLabel += " , " + Plugin.Resources.getString("ThreadContextLabel", event.contextThreadId || Plugin.Resources.getString("UIThreadContext")); var additionalInfo = this._viewModel.getEventDetails(event); for (var i = 0; i < additionalInfo.length; i++) { ariaLabel += " , " + additionalInfo[i].localizedName + ": " + additionalInfo[i].localizedValue; } ariaLabel += " , " + event.getDescription(); itemContainer.rootElement.setAttribute("aria-label", ariaLabel); } else { itemContainer.rootElement.removeAttribute("aria-label"); } return ariaLabel; }; EventsTimelineListControl.prototype.updateColumnWidth = function (offsetX) { if (offsetX === null || typeof offsetX === "undefined") { offsetX = this._divider.offsetX; } var columns = this._columnsCssRule.style.msGridColumns.split(" "); columns[0] = offsetX + "px"; this._columnsCssRule.style.msGridColumns = columns.join(" "); }; EventsTimelineListControl.prototype.updateDividerHeight = function () { var height = Math.max(this.panel.virtualHeight, this.panel.actualHeight); this._divider.height = height; }; return EventsTimelineListControl; })(Common.Controls.Legacy.TreeListControl); VisualProfiler.EventsTimelineListControl = EventsTimelineListControl; })(VisualProfiler || (VisualProfiler = {})); // EventsTimelineView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var VisualProfiler; (function (VisualProfiler) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var ProfilerEvent = (function () { function ProfilerEvent(interval, category, uiThreadId) { this.details = []; this._interval = interval; this._category = category; this._contextThreadId = ProfilerEvent.getContextThreadId(interval, uiThreadId); this._timeSpan = new VisualProfiler.TimeSpan(VisualProfiler.TimeStamp.fromNanoseconds(interval.begin), VisualProfiler.TimeStamp.fromNanoseconds(interval.end)); this._exclusiveTimeSpan = VisualProfiler.TimeStamp.fromNanoseconds(interval.exclusiveDuration); } Object.defineProperty(ProfilerEvent.prototype, "category", { get: function () { return this._category; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "childrenCount", { get: function () { return this._interval.childrenCount; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "context", { get: function () { return this._interval.context; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "contextThreadId", { get: function () { return this._contextThreadId; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "exclusiveDuration", { get: function () { return this._exclusiveTimeSpan; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "fullName", { get: function () { return this._interval.fullName; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "hasChildren", { get: function () { return this.childrenCount > 0; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "id", { get: function () { return this._interval.id; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "interval", { get: function () { return this._interval; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "isExpanded", { get: function () { return this._interval.isExpanded; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "level", { get: function () { return this._interval.level; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "name", { get: function () { if (typeof this._name === "undefined") { this._name = this.createName(); } return this._name; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "timeSpan", { get: function () { return this._timeSpan; }, enumerable: true, configurable: true }); Object.defineProperty(ProfilerEvent.prototype, "title", { get: function () { return this.name; }, enumerable: true, configurable: true }); ProfilerEvent.convertBooleanToYesNoLabel = function (value) { return value ? "YesLabel" : "NoLabel"; }; ProfilerEvent.convertPropagationStatus = function (propagationStatus) { var result = { preventDefaultCalled: (propagationStatus & 1) != 0, stopImmediatePropagationCalled: (propagationStatus & 2) != 0, stopPropagationCalled: (propagationStatus & 4) != 0 }; return result; }; ProfilerEvent.createElementString = function (tag, id, cssClass) { var elementValue = ""; var hasAnyElementInfo = false; if (tag !== "") { hasAnyElementInfo = true; elementValue += "<" + tag; } else { elementValue += "<" + Plugin.Resources.getString("UnknownElement"); } if (id !== "") { hasAnyElementInfo = true; elementValue += " id=\"" + id + "\""; } if (cssClass !== "") { hasAnyElementInfo = true; elementValue += " class=\"" + cssClass + "\""; } elementValue += ">"; if (hasAnyElementInfo === false) { elementValue = ""; } return elementValue; }; ProfilerEvent.createShortenedUrlTextWithQueryString = function (url) { if (!url || url.indexOf("data:image") === 0) { return url; } var urlParts = url.split("/"); if (ProfilerEvent.isFile(url)) { return urlParts[urlParts.length - 1]; } if (ProfilerEvent.isUrl(url) && urlParts.length > 3) { return "/" + urlParts.slice(3, urlParts.length).join("/"); } return url; }; ProfilerEvent.prototype.createDetailInfo = function (name, value, nameLocalizationKey, valueLocalizationKey, sourceInfo) { var localizedValue; if (valueLocalizationKey) { localizedValue = Plugin.Resources.getString(valueLocalizationKey); } else { localizedValue = value; } var localizedName; if (nameLocalizationKey) { localizedName = Plugin.Resources.getString(nameLocalizationKey); } else { localizedName = name; } var additionalInfo = { propertyName: name, propertyValue: value, localizedName: localizedName, localizedValue: localizedValue }; if (sourceInfo) { additionalInfo.sourceInfo = sourceInfo; } return additionalInfo; }; ProfilerEvent.prototype.createName = function () { return Plugin.Resources.getString(this._interval.name); }; ProfilerEvent.prototype.getBarCssClass = function () { if (this._category === 6 /* Measure */) { return "bracket"; } return null; }; ProfilerEvent.prototype.getCssClass = function () { switch (this._category) { case 1 /* GC */: return "dataScriptingGc"; case 0 /* ImageDecoding */: return "dataImageDecoding"; case 2 /* Loading */: return "dataLoading"; case 3 /* Rendering */: return "dataRendering"; case 4 /* Scripting */: return "dataScripting"; case 5 /* Styling */: return "dataStyling"; case 6 /* Measure */: return "dataMeasure"; case 7 /* Frame */: return "dataFrame"; default: throw new Error(Plugin.Resources.getErrorString("JSPerf.1033")); } }; ProfilerEvent.prototype.getDescription = function () { return ""; }; ProfilerEvent.prototype.getDetails = function (sourceInfo) { return []; }; ProfilerEvent.prototype.getEventDetailsRequestInformation = function () { return []; }; ProfilerEvent.prototype.getThreadContext = function () { return this._contextThreadId === null ? "" : " [" + this._contextThreadId + "]"; }; ProfilerEvent.prototype.setSourceDetails = function (sourceInfo, additionalInfos) { var shortenedUrl = ProfilerEvent.createShortenedUrlText(sourceInfo.source); var additionalInfo = { propertyName: "CallbackFunction", propertyValue: sourceInfo.name, localizedName: Plugin.Resources.getString("CallbackFunction"), localizedValue: sourceInfo.name, sourceInfo: sourceInfo }; additionalInfos.push(additionalInfo); }; ProfilerEvent.getContextThreadId = function (interval, uiThreadId) { if (interval.beginThreadId !== uiThreadId) { return interval.beginThreadId; } if (interval.endThreadId !== uiThreadId) { return interval.endThreadId; } return null; }; ProfilerEvent.createShortenedUrlText = function (url) { if (!ProfilerEvent.isUrl(url)) { return url; } return Common.ToolWindowHelpers.createShortenedUrlText(url); }; ProfilerEvent.isFile = function (url) { return url.match(/^(file|res|ms-appx):/i) ? true : false; }; ProfilerEvent.isUrl = function (url) { return url.match(/^(https?|file|res|ms-appx):/i) ? true : false; }; return ProfilerEvent; })(); VisualProfiler.ProfilerEvent = ProfilerEvent; var CssCalculationEvent = (function (_super) { __extends(CssCalculationEvent, _super); function CssCalculationEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } CssCalculationEvent.prototype.getDescription = function () { return Plugin.Resources.getString("CssCalculationEventDescription"); }; return CssCalculationEvent; })(ProfilerEvent); VisualProfiler.CssCalculationEvent = CssCalculationEvent; var CssParsingEvent = (function (_super) { __extends(CssParsingEvent, _super); function CssParsingEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } CssParsingEvent.prototype.getDescription = function () { return Plugin.Resources.getString("CssParsingEventDescription"); }; CssParsingEvent.prototype.getDetails = function (sourceInfo) { var result = []; var styleUrl = this.getStyleUrl(); if (styleUrl) { result.push(this.createDetailInfo("StylesheetUrl", styleUrl, "StylesheetUrlLabel", null, { name: ProfilerEvent.createShortenedUrlTextWithQueryString(styleUrl), line: 1, column: 1, source: styleUrl })); } return result; }; CssParsingEvent.prototype.getStyleUrl = function () { var cssParsingInterval = this.interval; if (cssParsingInterval.url) { return cssParsingInterval.url; } return null; }; CssParsingEvent.prototype.isStylesheetInline = function () { var cssParsingInterval = this.interval; return cssParsingInterval.isInline; }; return CssParsingEvent; })(ProfilerEvent); VisualProfiler.CssParsingEvent = CssParsingEvent; var DomEvent = (function (_super) { __extends(DomEvent, _super); function DomEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } DomEvent.prototype.getDescription = function () { return Plugin.Resources.getString("DomEventDescription"); }; DomEvent.prototype.getDetails = function (sourceInfo) { var result = []; result.push(this.createDetailInfo("EventName", this.getEventName(), "EventNameLabel", null)); var domEventInterval = this.interval; var endingPropagation = { stopPropagationCalled: false, stopImmediatePropagationCalled: false, preventDefaultCalled: false }; if (domEventInterval.endingPropagationStatus) { endingPropagation = ProfilerEvent.convertPropagationStatus(domEventInterval.endingPropagationStatus); } if (endingPropagation.preventDefaultCalled) { result.push(this.createDetailInfo("DefaultPrevented", domEventInterval.endingPropagationStatus, "DefaultPreventedLabel", ProfilerEvent.convertBooleanToYesNoLabel(endingPropagation.preventDefaultCalled))); } if (endingPropagation.stopImmediatePropagationCalled) { result.push(this.createDetailInfo("stopImmediatePropagation()", domEventInterval.endingPropagationStatus, "ImmediatePropagationStoppedLabel", ProfilerEvent.convertBooleanToYesNoLabel(endingPropagation.stopImmediatePropagationCalled))); } if (endingPropagation.stopPropagationCalled) { result.push(this.createDetailInfo("stopPropagation()", domEventInterval.endingPropagationStatus, "PropagationStoppedLabel", ProfilerEvent.convertBooleanToYesNoLabel(endingPropagation.stopPropagationCalled))); } return result; }; DomEvent.prototype.getEventName = function () { var domEventInterval = this.interval; if (typeof domEventInterval.eventName !== "undefined") { return domEventInterval.eventName; } return null; }; return DomEvent; })(ProfilerEvent); VisualProfiler.DomEvent = DomEvent; var EvaluatingScriptEvent = (function (_super) { __extends(EvaluatingScriptEvent, _super); function EvaluatingScriptEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } EvaluatingScriptEvent.prototype.getDescription = function () { return Plugin.Resources.getString("EvaluatingScriptEventDescription"); }; EvaluatingScriptEvent.prototype.getDetails = function (sourceInfo) { var result = []; var scriptUrl = this.getScriptUrl(); var scriptPreview = this.getScriptPreview(); if (typeof scriptUrl !== "undefined") { var sourceInfo = { name: ProfilerEvent.createShortenedUrlTextWithQueryString(scriptUrl), line: 1, column: 1, source: scriptUrl }; result.push(this.createDetailInfo("ScriptUrl", scriptUrl, "ScriptUrlLabel", null, sourceInfo)); } if (typeof scriptPreview !== "undefined") { result.push(this.createDetailInfo("ContentPreview", scriptPreview, "ScriptContentPreviewLabel", null)); } return result; }; EvaluatingScriptEvent.prototype.getScriptUrl = function () { var scriptEventInterval = this.interval; return scriptEventInterval.url; }; EvaluatingScriptEvent.prototype.getScriptPreview = function () { var scriptEventInterval = this.interval; var script = scriptEventInterval.inlineScript; if (script) { var oneLinePattern = /(\r\n|\r|\n)\s*/gm; script = script.replace(oneLinePattern, " "); script = script.trim(); } return script; }; return EvaluatingScriptEvent; })(ProfilerEvent); VisualProfiler.EvaluatingScriptEvent = EvaluatingScriptEvent; var EventHandlerEvent = (function (_super) { __extends(EventHandlerEvent, _super); function EventHandlerEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } EventHandlerEvent.prototype.getDescription = function () { return Plugin.Resources.getString("EventHandlerEventDescription"); }; EventHandlerEvent.prototype.getDetails = function (sourceInfo) { var eventHandlerInterval = this.interval; var result = []; if (sourceInfo) { this.setSourceDetails(sourceInfo, result); } var eventPhaseLabelKey; if (eventHandlerInterval.eventPhase) { switch (eventHandlerInterval.eventPhase) { case 1: eventPhaseLabelKey = "CapturingEventPhaseLabel"; break; case 2: eventPhaseLabelKey = "AtTargetEventPhaseLabel"; break; case 3: eventPhaseLabelKey = "BubblingEventPhaseLabel"; break; } result.push(this.createDetailInfo("EventPhase", eventHandlerInterval.eventPhase.toString(), "EventPhaseLabel", eventPhaseLabelKey)); } var endingPropagation = { stopPropagationCalled: false, stopImmediatePropagationCalled: false, preventDefaultCalled: false }; if (eventHandlerInterval.endingPropagationStatus) { endingPropagation = ProfilerEvent.convertPropagationStatus(eventHandlerInterval.endingPropagationStatus); } if (endingPropagation.preventDefaultCalled) { result.push(this.createDetailInfo("DefaultPrevented", eventHandlerInterval.endingPropagationStatus, "DefaultPreventedLabel", ProfilerEvent.convertBooleanToYesNoLabel(endingPropagation.preventDefaultCalled))); } if (endingPropagation.stopImmediatePropagationCalled) { result.push(this.createDetailInfo("stopImmediatePropagation()", eventHandlerInterval.endingPropagationStatus, "ImmediatePropagationStoppedLabel", ProfilerEvent.convertBooleanToYesNoLabel(endingPropagation.stopImmediatePropagationCalled))); } if (endingPropagation.stopPropagationCalled) { result.push(this.createDetailInfo("stopPropagation()", eventHandlerInterval.endingPropagationStatus, "PropagationStoppedLabel", ProfilerEvent.convertBooleanToYesNoLabel(endingPropagation.stopPropagationCalled))); } if (eventHandlerInterval.usesCapture) { result.push(this.createDetailInfo("ListenerUsesCapture", eventHandlerInterval.usesCapture, "ListenerUsesCaptureLabel", ProfilerEvent.convertBooleanToYesNoLabel(eventHandlerInterval.usesCapture))); } var elementValue = ProfilerEvent.createElementString(this.getDDTrackerElementTag(), this.getDDTrackerElementId(), this.getDDTrackerElementClass()); if (elementValue !== "") { result.push(this.createDetailInfo("TargetElement", elementValue, "EventTargetLabel", null)); } return result; }; EventHandlerEvent.prototype.getEventDetailsRequestInformation = function () { var eventDetailsRequest = []; if (this.context && this.context.sourceInfo) { eventDetailsRequest.push({ sourceInfo: this.context.sourceInfo, isSourceRequest: true }); } return eventDetailsRequest; }; EventHandlerEvent.prototype.getDDTrackerElementTag = function () { if (typeof this._ddtrackerElementTag === "undefined") { this._ddtrackerElementTag = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.tag) { this._ddtrackerElementTag = ddtrackerInterval.element.tag.toLowerCase(); } } return this._ddtrackerElementTag; }; EventHandlerEvent.prototype.getDDTrackerElementId = function () { if (typeof this._ddtrackerElementId === "undefined") { this._ddtrackerElementId = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.id) { this._ddtrackerElementId = ddtrackerInterval.element.id; } } return this._ddtrackerElementId; }; EventHandlerEvent.prototype.getDDTrackerElementClass = function () { if (typeof this._ddtrackerElementClass === "undefined") { this._ddtrackerElementClass = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.class) { this._ddtrackerElementClass = ddtrackerInterval.element.class; } } return this._ddtrackerElementClass; }; return EventHandlerEvent; })(ProfilerEvent); VisualProfiler.EventHandlerEvent = EventHandlerEvent; var GarbageCollectionEvent = (function (_super) { __extends(GarbageCollectionEvent, _super); function GarbageCollectionEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } GarbageCollectionEvent.prototype.getDescription = function () { return Plugin.Resources.getString("GarbageCollectionEventDescription"); }; return GarbageCollectionEvent; })(ProfilerEvent); VisualProfiler.GarbageCollectionEvent = GarbageCollectionEvent; var HtmlParsingEvent = (function (_super) { __extends(HtmlParsingEvent, _super); function HtmlParsingEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } HtmlParsingEvent.prototype.getDescription = function () { return Plugin.Resources.getString("HtmlParsingEventDescription"); }; return HtmlParsingEvent; })(ProfilerEvent); VisualProfiler.HtmlParsingEvent = HtmlParsingEvent; var HtmlSpeculativeDownloadingEvent = (function (_super) { __extends(HtmlSpeculativeDownloadingEvent, _super); function HtmlSpeculativeDownloadingEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } HtmlSpeculativeDownloadingEvent.prototype.getDescription = function () { return Plugin.Resources.getString("HtmlSpeculativeDownloadingEventDescription"); }; return HtmlSpeculativeDownloadingEvent; })(ProfilerEvent); VisualProfiler.HtmlSpeculativeDownloadingEvent = HtmlSpeculativeDownloadingEvent; var HttpRequestEvent = (function (_super) { __extends(HttpRequestEvent, _super); function HttpRequestEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } HttpRequestEvent.prototype.getDescription = function () { return Plugin.Resources.getString("HttpRequestEventDescription"); }; HttpRequestEvent.prototype.getDetails = function (sourceInfo) { var result = []; var httpRequestEvent = this.interval; if (httpRequestEvent.url) { result.push(this.createDetailInfo("AddressName", httpRequestEvent.url, "AddressNameLabel", null)); } if (httpRequestEvent.statusLine) { result.push(this.createDetailInfo("StatusCode", httpRequestEvent.statusLine, "StatusCodeLabel", null)); } return result; }; HttpRequestEvent.prototype.getEventDetailsRequestInformation = function () { var eventDetailsRequest = []; eventDetailsRequest.push({ isSourceRequest: false }); return eventDetailsRequest; }; return HttpRequestEvent; })(ProfilerEvent); VisualProfiler.HttpRequestEvent = HttpRequestEvent; var IdleEvent = (function (_super) { __extends(IdleEvent, _super); function IdleEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } return IdleEvent; })(ProfilerEvent); VisualProfiler.IdleEvent = IdleEvent; var ImageDecodedEvent = (function (_super) { __extends(ImageDecodedEvent, _super); function ImageDecodedEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } ImageDecodedEvent.prototype.getDescription = function () { return Plugin.Resources.getString("ImageDecodedEventDescription"); }; ImageDecodedEvent.prototype.getDetails = function (sourceInfo) { var result = []; result.push(this.createDetailInfo("ImageUrl", this.getImageUrl(), "ImageUrlLabel", null)); return result; }; ImageDecodedEvent.prototype.getImageUrl = function () { var imageDecodeEventInterval = this.interval; if (typeof imageDecodeEventInterval.url !== "undefined") { return imageDecodeEventInterval.url; } else { return null; } }; return ImageDecodedEvent; })(ProfilerEvent); VisualProfiler.ImageDecodedEvent = ImageDecodedEvent; var LayoutEvent = (function (_super) { __extends(LayoutEvent, _super); function LayoutEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } LayoutEvent.prototype.getDescription = function () { return Plugin.Resources.getString("LayoutEventDescription"); }; return LayoutEvent; })(ProfilerEvent); VisualProfiler.LayoutEvent = LayoutEvent; var MeasureEvent = (function (_super) { __extends(MeasureEvent, _super); function MeasureEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } MeasureEvent.prototype.getDescription = function () { return Plugin.Resources.getString("MeasureDescription"); }; MeasureEvent.prototype.getDetails = function (sourceInfo) { var measureEventInterval = this.interval; var result = []; if (measureEventInterval.measureName) { result.push(this.createDetailInfo("Name", measureEventInterval.measureName, "MeasureName", null)); } if (measureEventInterval.startMarkName) { result.push(this.createDetailInfo("Start mark", measureEventInterval.startMarkName, "StartMarkName", null)); } if (measureEventInterval.endMarkName) { result.push(this.createDetailInfo("End mark", measureEventInterval.endMarkName, "EndMarkName", null)); } return result; }; return MeasureEvent; })(ProfilerEvent); VisualProfiler.MeasureEvent = MeasureEvent; var MediaQueryListenerEvent = (function (_super) { __extends(MediaQueryListenerEvent, _super); function MediaQueryListenerEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } MediaQueryListenerEvent.prototype.getDescription = function () { return Plugin.Resources.getString("MediaQueryListenerEventDescription"); }; MediaQueryListenerEvent.prototype.getDetails = function (sourceInfo) { var result = []; var listenerEvent = this.interval; if (sourceInfo) { this.setSourceDetails(sourceInfo, result); } if (listenerEvent.mediaQuery) { result.push(this.createDetailInfo("MediaQuery", listenerEvent.mediaQuery, "MediaQueryLabel", null)); } return result; }; MediaQueryListenerEvent.prototype.getEventDetailsRequestInformation = function () { var eventDetailsRequest = []; if (this.context && this.context.sourceInfo) { eventDetailsRequest.push({ sourceInfo: this.context.sourceInfo, isSourceRequest: true }); } return eventDetailsRequest; }; return MediaQueryListenerEvent; })(ProfilerEvent); VisualProfiler.MediaQueryListenerEvent = MediaQueryListenerEvent; var MutationObserverEvent = (function (_super) { __extends(MutationObserverEvent, _super); function MutationObserverEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } MutationObserverEvent.prototype.getDescription = function () { return Plugin.Resources.getString("MutationObserverEventDescription"); }; MutationObserverEvent.prototype.getDetails = function (sourceInfo) { var result = []; if (sourceInfo) { this.setSourceDetails(sourceInfo, result); } return result; }; MutationObserverEvent.prototype.getEventDetailsRequestInformation = function () { var eventDetailsRequest = []; if (this.context && this.context.sourceInfo) { eventDetailsRequest.push({ sourceInfo: this.context.sourceInfo, isSourceRequest: true }); } return eventDetailsRequest; }; return MutationObserverEvent; })(ProfilerEvent); VisualProfiler.MutationObserverEvent = MutationObserverEvent; var PaintRect = (function () { function PaintRect(paintRect) { this._paintRect = paintRect; } Object.defineProperty(PaintRect.prototype, "bottom", { get: function () { return this._paintRect.bottom; }, enumerable: true, configurable: true }); Object.defineProperty(PaintRect.prototype, "height", { get: function () { return this._paintRect.bottom - this._paintRect.top; }, enumerable: true, configurable: true }); Object.defineProperty(PaintRect.prototype, "left", { get: function () { return this._paintRect.left; }, enumerable: true, configurable: true }); Object.defineProperty(PaintRect.prototype, "right", { get: function () { return this._paintRect.right; }, enumerable: true, configurable: true }); Object.defineProperty(PaintRect.prototype, "top", { get: function () { return this._paintRect.top; }, enumerable: true, configurable: true }); Object.defineProperty(PaintRect.prototype, "width", { get: function () { return this._paintRect.right - this._paintRect.left; }, enumerable: true, configurable: true }); return PaintRect; })(); VisualProfiler.PaintRect = PaintRect; var PaintRectEventBase = (function (_super) { __extends(PaintRectEventBase, _super); function PaintRectEventBase(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); this._paintRect = PaintRectEventBase.getPaintRect(interval); } Object.defineProperty(PaintRectEventBase.prototype, "paintRect", { get: function () { return this._paintRect; }, enumerable: true, configurable: true }); Object.defineProperty(PaintRectEventBase.prototype, "widthByHeight", { get: function () { if (this._paintRect) { return this._paintRect.width + "x" + this._paintRect.height; } return null; }, enumerable: true, configurable: true }); PaintRectEventBase.getPaintRect = function (interval) { var paintRectInterval = interval; if (typeof paintRectInterval.paintRect !== "undefined" && typeof paintRectInterval.paintRect.top !== "undefined" && typeof paintRectInterval.paintRect.left !== "undefined" && typeof paintRectInterval.paintRect.right !== "undefined" && typeof paintRectInterval.paintRect.bottom !== "undefined") { return new PaintRect(paintRectInterval.paintRect); } return null; }; PaintRectEventBase.prototype.getDetails = function (sourceInfo) { var result = []; if (this._paintRect && this.widthByHeight && this.widthByHeight !== "0x0") { result.push(this.createDetailInfo("Origin", this._paintRect.left + ", " + this._paintRect.top, "OriginLabel", null)); result.push(this.createDetailInfo("Dimensions", this.widthByHeight, "DimensionsLabel", null)); } return result; }; return PaintRectEventBase; })(ProfilerEvent); VisualProfiler.PaintRectEventBase = PaintRectEventBase; var PaintEvent = (function (_super) { __extends(PaintEvent, _super); function PaintEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } PaintEvent.prototype.getDescription = function () { return Plugin.Resources.getString("PaintEventDescription"); }; return PaintEvent; })(PaintRectEventBase); VisualProfiler.PaintEvent = PaintEvent; var RenderLayerEvent = (function (_super) { __extends(RenderLayerEvent, _super); function RenderLayerEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } Object.defineProperty(RenderLayerEvent.prototype, "title", { get: function () { return Plugin.Resources.getString("RenderLayer"); }, enumerable: true, configurable: true }); RenderLayerEvent.prototype.createName = function () { var elementValue = ProfilerEvent.createElementString(this.getDDTrackerElementTag(), this.getDDTrackerElementId(), this.getDDTrackerElementClass()); if (elementValue) { return elementValue; } return Plugin.Resources.getString("RenderLayer"); }; RenderLayerEvent.prototype.getDescription = function () { return Plugin.Resources.getString("RenderLayoutEventDescription"); }; RenderLayerEvent.prototype.getDetails = function () { var result = _super.prototype.getDetails.call(this); var elementValue = ProfilerEvent.createElementString(this.getDDTrackerElementTag(), this.getDDTrackerElementId(), this.getDDTrackerElementClass()); if (elementValue) { result.push(this.createDetailInfo("Element", elementValue, "DDTrackerElementLabel", null)); } return result; }; RenderLayerEvent.prototype.getDDTrackerElementTag = function () { if (typeof this._ddtrackerElementTag === "undefined") { this._ddtrackerElementTag = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.tag) { this._ddtrackerElementTag = ddtrackerInterval.element.tag.toLowerCase(); } } return this._ddtrackerElementTag; }; RenderLayerEvent.prototype.getDDTrackerElementId = function () { if (typeof this._ddtrackerElementId === "undefined") { this._ddtrackerElementId = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.id) { this._ddtrackerElementId = ddtrackerInterval.element.id; } } return this._ddtrackerElementId; }; RenderLayerEvent.prototype.getDDTrackerElementClass = function () { if (typeof this._ddtrackerElementClass === "undefined") { this._ddtrackerElementClass = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.class) { this._ddtrackerElementClass = ddtrackerInterval.element.class; } } return this._ddtrackerElementClass; }; return RenderLayerEvent; })(PaintRectEventBase); VisualProfiler.RenderLayerEvent = RenderLayerEvent; var TimerFiredEvent = (function (_super) { __extends(TimerFiredEvent, _super); function TimerFiredEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } TimerFiredEvent.prototype.getDescription = function () { return Plugin.Resources.getString("TimerFiredEventDescription"); }; TimerFiredEvent.prototype.getDetails = function (sourceInfo) { var result = []; var timerFiredEventInterval = this.interval; if (sourceInfo) { this.setSourceDetails(sourceInfo, result); } var timerTypeValueLabel; switch (timerFiredEventInterval.timerType) { case 0: timerTypeValueLabel = "TimeoutTimerTypeLabel"; break; case 1: timerTypeValueLabel = "IntervalTimerTypeLabel"; break; case 2: timerTypeValueLabel = "ImmediateTimerTypeLabel"; break; case 3: timerTypeValueLabel = "AnimationFrameTimerTypeLabel"; } if (timerFiredEventInterval.timerType !== 3) { result.push(this.createDetailInfo("TimerType", timerFiredEventInterval.timerType, "TimerTypeLabel", timerTypeValueLabel)); } if ((timerFiredEventInterval.timerType === 0 || timerFiredEventInterval.timerType === 1) && typeof timerFiredEventInterval.timeoutValue === "number") { result.push(this.createDetailInfo("TimeoutValue", VisualProfiler.FormattingHelpers.getPrettyPrintTime(VisualProfiler.TimeStamp.fromMilliseconds(timerFiredEventInterval.timeoutValue)), "TimeoutLabel", null)); } return result; }; TimerFiredEvent.prototype.getEventDetailsRequestInformation = function () { var eventDetailsRequest = []; if (this.context && this.context.sourceInfo) { eventDetailsRequest.push({ sourceInfo: this.context.sourceInfo, isSourceRequest: true }); } return eventDetailsRequest; }; return TimerFiredEvent; })(ProfilerEvent); VisualProfiler.TimerFiredEvent = TimerFiredEvent; var AnimationFrameEvent = (function (_super) { __extends(AnimationFrameEvent, _super); function AnimationFrameEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } AnimationFrameEvent.prototype.createName = function () { return Plugin.Resources.getString("AnimationFrame"); }; AnimationFrameEvent.prototype.getDescription = function () { return Plugin.Resources.getString("AnimationFrameEventDescription"); }; return AnimationFrameEvent; })(TimerFiredEvent); VisualProfiler.AnimationFrameEvent = AnimationFrameEvent; var WindowsRuntimeEvent = (function (_super) { __extends(WindowsRuntimeEvent, _super); function WindowsRuntimeEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } WindowsRuntimeEvent.prototype.getDescription = function () { return Plugin.Resources.getString("WindowsRuntimeEventDescription"); }; WindowsRuntimeEvent.prototype.getDetails = function (sourceInfo) { var result = []; result.push(this.createDetailInfo("EventName", this.getEventName(), "EventNameLabel", null)); return result; }; WindowsRuntimeEvent.prototype.getEventName = function () { var winRuntimeEventInterval = this.interval; if (typeof winRuntimeEventInterval.eventName !== "undefined") { return winRuntimeEventInterval.eventName; } return null; }; return WindowsRuntimeEvent; })(ProfilerEvent); VisualProfiler.WindowsRuntimeEvent = WindowsRuntimeEvent; var WindowsRuntimeAsyncCallback = (function (_super) { __extends(WindowsRuntimeAsyncCallback, _super); function WindowsRuntimeAsyncCallback(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } WindowsRuntimeAsyncCallback.prototype.getDescription = function () { return Plugin.Resources.getString("WindowsRuntimeAsyncCallbackDescription"); }; return WindowsRuntimeAsyncCallback; })(ProfilerEvent); VisualProfiler.WindowsRuntimeAsyncCallback = WindowsRuntimeAsyncCallback; var DDTrackerEvent = (function (_super) { __extends(DDTrackerEvent, _super); function DDTrackerEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } DDTrackerEvent.prototype.createName = function () { var ddtrackerInterval = this.interval; if (ddtrackerInterval.ddtrackerBaseClass) { switch (ddtrackerInterval.ddtrackerBaseClass) { case "DOM": return Plugin.Resources.getString("DOMAccessEvent"); case "Layout": return Plugin.Resources.getString("DDTrackerLayoutDetailHeader"); case "CSS": if (ddtrackerInterval.ddtrackerTaskResource == "TASK_Fi") { return Plugin.Resources.getString("CssCalculation"); } return Plugin.Resources.getString("DDTrackerStyleComputationDetailHeader"); } } return ""; }; DDTrackerEvent.prototype.getDetails = function (sourceInfo) { var result = []; var ddtrackerInterval = this.interval; if (ddtrackerInterval.ddtrackerBaseClass) { switch (ddtrackerInterval.ddtrackerBaseClass) { case "DOM": result.push(this.createDetailInfo("Access type", this.getDDTrackerTaskName(), "AccessTypeLabel", null)); break; case "Layout": var layoutMode = this.getDDTrackerTaskName(); if (layoutMode) { result.push(this.createDetailInfo("Category", layoutMode, "LayoutModeLabel", null)); } break; } } var elementValue = ProfilerEvent.createElementString(this.getDDTrackerElementTag(), this.getDDTrackerElementId(), this.getDDTrackerElementClass()); if (elementValue !== "" && elementValue !== "") { result.push(this.createDetailInfo("Element", elementValue, "DDTrackerElementLabel", null)); } return result; }; DDTrackerEvent.prototype.getDescription = function () { if (typeof this._description === "undefined") { this._description = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.ddtrackerBaseClass) { switch (ddtrackerInterval.ddtrackerBaseClass) { case "DOM": this._description = Plugin.Resources.getString("DDTrackerDOMDescription"); break; case "Layout": this._description = Plugin.Resources.getString("DDTrackerLayoutDescription"); break; case "CSS": if (ddtrackerInterval.ddtrackerTaskResource == "TASK_Fi") { this._description = Plugin.Resources.getString("CssCalculationEventDescription"); } else { this._description = Plugin.Resources.getString("DDTrackerStyleChangeDescription"); } break; } } } return this._description; }; DDTrackerEvent.prototype.getDDTrackerTaskName = function () { if (typeof this._ddtrackerTaskName === "undefined") { var ddtrackerInterval = this.interval; if (ddtrackerInterval.isSetStyle) { var styleProp = Common.FormattingHelpers.stripNewLine(ddtrackerInterval.styleProperty); var newValue = Common.FormattingHelpers.stripNewLine(ddtrackerInterval.newValue); this._ddtrackerTaskName = Plugin.Resources.getString("DDTrackerSetStyleContextName", styleProp, newValue); } else { this._ddtrackerTaskName = ""; if (ddtrackerInterval.ddtrackerBaseClass != "CSS") { if (ddtrackerInterval.ddtrackerTaskString) { this._ddtrackerTaskName = ddtrackerInterval.ddtrackerTaskString; } else if (ddtrackerInterval.ddtrackerTaskResource) { var resourceArgs = [ddtrackerInterval.ddtrackerTaskResource]; if (ddtrackerInterval.ddtrackerTaskResourceArgs) { resourceArgs = resourceArgs.concat(ddtrackerInterval.ddtrackerTaskResourceArgs); } this._ddtrackerTaskName = Plugin.Resources.getString.apply(Plugin.Resources, resourceArgs); } } } } return this._ddtrackerTaskName; }; DDTrackerEvent.prototype.getDDTrackerElementTag = function () { if (typeof this._ddtrackerElementTag === "undefined") { this._ddtrackerElementTag = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.tag) { this._ddtrackerElementTag = ddtrackerInterval.element.tag.toLowerCase(); } } return this._ddtrackerElementTag; }; DDTrackerEvent.prototype.getDDTrackerElementId = function () { if (typeof this._ddtrackerElementId === "undefined") { this._ddtrackerElementId = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.id) { this._ddtrackerElementId = ddtrackerInterval.element.id; } } return this._ddtrackerElementId; }; DDTrackerEvent.prototype.getDDTrackerElementClass = function () { if (typeof this._ddtrackerElementClass === "undefined") { this._ddtrackerElementClass = ""; var ddtrackerInterval = this.interval; if (ddtrackerInterval.element && ddtrackerInterval.element.class) { this._ddtrackerElementClass = ddtrackerInterval.element.class; } } return this._ddtrackerElementClass; }; return DDTrackerEvent; })(ProfilerEvent); VisualProfiler.DDTrackerEvent = DDTrackerEvent; var FrameEvent = (function (_super) { __extends(FrameEvent, _super); function FrameEvent(interval, category, uiThreadId) { _super.call(this, interval, category, uiThreadId); } FrameEvent.prototype.getDescription = function () { return Plugin.Resources.getString("PaintEventDescription"); }; return FrameEvent; })(ProfilerEvent); VisualProfiler.FrameEvent = FrameEvent; var EventFactory = (function () { function EventFactory() { this._nameToEventMap = {}; this._nameToEventMap["CssCalculation"] = CssCalculationEvent; this._nameToEventMap["CssParsing"] = CssParsingEvent; this._nameToEventMap["DDTracker"] = DDTrackerEvent; this._nameToEventMap["DomEvent"] = DomEvent; this._nameToEventMap["EvaluatingScript"] = EvaluatingScriptEvent; this._nameToEventMap["EventHandler"] = EventHandlerEvent; this._nameToEventMap["Frame"] = FrameEvent; this._nameToEventMap["GarbageCollection"] = GarbageCollectionEvent; this._nameToEventMap["HtmlParsing"] = HtmlParsingEvent; this._nameToEventMap["HtmlSpeculativeDownloading"] = HtmlSpeculativeDownloadingEvent; this._nameToEventMap["HttpRequest"] = HttpRequestEvent; this._nameToEventMap["Idle"] = IdleEvent; this._nameToEventMap["ImageDecoded"] = ImageDecodedEvent; this._nameToEventMap["Layout"] = LayoutEvent; this._nameToEventMap["Measure"] = MeasureEvent; this._nameToEventMap["MediaQueryListener"] = MediaQueryListenerEvent; this._nameToEventMap["MutationObserver"] = MutationObserverEvent; this._nameToEventMap["Paint"] = PaintEvent; this._nameToEventMap["RenderLayer"] = RenderLayerEvent; this._nameToEventMap["TimerFired"] = TimerFiredEvent; this._nameToEventMap["WindowsRuntimeEvent"] = WindowsRuntimeEvent; this._nameToEventMap["WindowsRuntimeAsyncCallback"] = WindowsRuntimeAsyncCallback; } EventFactory.prototype.createEvent = function (interval, uiThreadId) { var category = (VisualProfiler.EventCategory[interval.category]); if (interval.name === "TimerFired") { var timerFiredEventInterval = interval; if (timerFiredEventInterval.timerType === 3) { return new AnimationFrameEvent(timerFiredEventInterval, category, uiThreadId); } } var eventType = this._nameToEventMap[interval.name]; if (eventType) { return new eventType(interval, category, uiThreadId); } else { throw new Error(Plugin.Resources.getErrorString("JSPerf.1040")); } }; return EventFactory; })(); VisualProfiler.EventFactory = EventFactory; var EventsTimelineDataSource = (function () { function EventsTimelineDataSource(queryResult, uiThreadId, lowestObservedDocumentMode, timeSpan, eventsFactory) { this._queryResult = queryResult; this._count = this._queryResult.getIntervalsCount(); this._uiThreadId = uiThreadId; this._lowestObservedDocumentMode = lowestObservedDocumentMode; this._data = []; this._dataPrevious = []; this._eventsFactory = eventsFactory; this._currentIndex = null; this._timeSpan = timeSpan; } Object.defineProperty(EventsTimelineDataSource.prototype, "count", { get: function () { return this._count; }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineDataSource.prototype, "timeSpan", { get: function () { return this._timeSpan; }, enumerable: true, configurable: true }); EventsTimelineDataSource.prototype.collapseBranch = function (index) { this._queryResult.collapseIntervalBranch(index); this.resetData(); }; EventsTimelineDataSource.prototype.expandBranch = function (index) { this._queryResult.expandIntervalBranch(index); this.resetData(); }; EventsTimelineDataSource.prototype.expandFrameForEvent = function (eventId) { this._queryResult.expandFrameForEvent(eventId); this.resetData(); }; EventsTimelineDataSource.prototype.getNext = function (skip) { if (this._currentIndex === null) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1057")); } if (this._currentIndex >= this.count) { return null; } var event = this._data[this._currentIndex]; if (!event) { if (!this.fetchFromPrevious(this._currentIndex, EventsTimelineDataSource._prefetchSize)) { this.fetchData(this._currentIndex, EventsTimelineDataSource._prefetchSize); } event = this._data[this._currentIndex]; } this._currentIndex++; if (!isNaN(skip)) { this._currentIndex += skip; } return event; }; EventsTimelineDataSource.prototype.indexOfItem = function (eventId) { return this._queryResult.indexOfInterval(eventId); }; EventsTimelineDataSource.prototype.indexOfParent = function (id) { return this._queryResult.indexOfParentInterval(id); }; EventsTimelineDataSource.prototype.getAggregatedDescendantsForEvent = function (eventId) { return this._queryResult.getAggregatedDescendantsForEvent(eventId); }; EventsTimelineDataSource.prototype.getSelectionSummary = function () { return this._queryResult.getSelectionSummary(); }; EventsTimelineDataSource.prototype.startAt = function (index) { if (this._currentIndex !== null) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1058")); } if (isNaN(index) || index < 0 || index >= this.count) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1036")); } this._currentIndex = index; this._data = []; }; EventsTimelineDataSource.prototype.stop = function () { this._currentIndex = null; this._dataPrevious = this._data; this._data = null; }; EventsTimelineDataSource.prototype.fetchData = function (index, max) { var fromIndex = Math.max(0, index - max); var toIndex = Math.min(this._count, index + max) - 1; var intervals = this._queryResult.getIntervals(fromIndex, toIndex); var dataIndex = fromIndex; for (var i = 0; i < intervals.length; i++, dataIndex++) { if (!this._data[dataIndex]) { var interval = intervals[i]; this._data[dataIndex] = this._eventsFactory.createEvent(interval, this._uiThreadId); } } }; EventsTimelineDataSource.prototype.fetchFromPrevious = function (index, max) { if (this._dataPrevious[index]) { var fromIndex = Math.max(0, index - max); var toIndex = Math.min(this._dataPrevious.length, index + max) - 1; for (var i = fromIndex; i <= toIndex; i++) { var item = this._dataPrevious[i]; if (item) { this._data[i] = item; } } return true; } return false; }; EventsTimelineDataSource.prototype.resetData = function () { this._dataPrevious = []; this._data = []; this._count = this._queryResult.getIntervalsCount(); }; EventsTimelineDataSource._prefetchSize = 30; return EventsTimelineDataSource; })(); VisualProfiler.EventsTimelineDataSource = EventsTimelineDataSource; var EventsTimelineModel = (function () { function EventsTimelineModel(session) { this._eventFactory = new EventFactory(); this._session = session; } EventsTimelineModel.prototype.getEvents = function (timeSpan, sort, filter) { var _this = this; return this._session.queryEventIntervals(timeSpan.begin.nsec, timeSpan.end.nsec, sort, filter).then(function (intervalsQuery) { var uiThreadId = _this._session.getUIThreadId(); var lowestObservedDocumentMode = _this._session.getLowestObservedDocumentMode(); return new EventsTimelineDataSource(intervalsQuery, uiThreadId, lowestObservedDocumentMode, timeSpan, _this._eventFactory); }); }; return EventsTimelineModel; })(); VisualProfiler.EventsTimelineModel = EventsTimelineModel; var EventsTimelineViewModel = (function (_super) { __extends(EventsTimelineViewModel, _super); function EventsTimelineViewModel(model, globalRuler, markEventModel) { var _this = this; _super.call(this); this._model = model; this._globalRuler = globalRuler; this._markEventModel = markEventModel; this._globalRuler.addEventListener(VisualProfiler.GlobalRuler.SelectionChangedEventType, function (e) { return _this.onRulerSelectionChanged(e); }); this.timeSpan = this._globalRuler.totalRange; var msAbbreviation = Plugin.Resources.getString("MillisecondsAbbreviation"); this.durationFilterOptions = [ { value: "0", text: Plugin.Resources.getString("DurationFilterAll"), tooltip: Plugin.Resources.getString("DurationFilterTooltip") }, { value: EventsTimelineViewModel.ONE_MS_IN_NS.toString(), text: Plugin.Resources.getString("DurationFilterTimed", EventsTimelineViewModel.ONE_MS_IN_NS / 1000 / 1000 + msAbbreviation), tooltip: Plugin.Resources.getString("DurationFilterTooltip") } ]; this.sortOptions = [ { value: "0", text: Plugin.Resources.getString("TimelineSortStartTime"), tooltip: Plugin.Resources.getString("TimelineSortTooltip") }, { value: "1", text: Plugin.Resources.getString("TimelineSortDuration"), tooltip: Plugin.Resources.getString("TimelineSortTooltip") } ]; } Object.defineProperty(EventsTimelineViewModel.prototype, "globalRuler", { get: function () { return this._globalRuler; }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineViewModel.prototype, "selectedEvent", { get: function () { return this._selectedEvent; }, set: function (event) { if (this._selectedEvent !== event) { this._selectedEvent = event; if (this.selectedEventChanged) { this.selectedEventChanged(this._selectedEvent); } Notifications.notify(VisualProfiler.ResponsivenessNotifications.GridRowSelected); } }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineViewModel.prototype, "timeSpan", { get: function () { return this._timeSpan; }, set: function (value) { if ((value === undefined && this._timeSpan !== undefined) || (value !== undefined && this._timeSpan === undefined) || (value !== undefined && this._timeSpan !== undefined && !value.equals(this._timeSpan))) { this._timeSpan = value; this._isDataSourceInvalid = true; if (this.timeSpanChanged) { this.timeSpanChanged(); } } }, enumerable: true, configurable: true }); EventsTimelineViewModel.initialize = function () { Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.DisplayBackgroundActivitiesPropertyName, false, function (obj) { return obj.onFilterChange(); }, function (obj) { return obj.onFilterChanging(); }); Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.DisplayFramesPropertyName, false, function (obj) { return obj.onFilterChange(); }, function (obj) { return obj.onFilterChanging(); }); Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.DisplayMeasuresPropertyName, true, function (obj) { return obj.onFilterChange(); }, function (obj) { return obj.onFilterChanging(); }); Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.DisplayNetworkActivitiesPropertyName, true, function (obj) { return obj.onFilterChange(); }, function (obj) { return obj.onFilterChanging(); }); Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.DisplayUIActivitiesPropertyName, true, function (obj) { return obj.onFilterChange(); }, function (obj) { return obj.onFilterChanging(); }); Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.DurationFilterPropertyName, 0, function (obj) { return obj.onFilterChange(); }, function (obj) { return obj.onFilterChanging(); }); Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.EventNameFilterPropertyName, "", function (obj) { return obj.onFilterChange(); }, function (obj) { return obj.onFilterChanging(); }); Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.HasFilterPropertyName, true, null, null); Common.ObservableHelpers.defineProperty(EventsTimelineViewModel, EventsTimelineViewModel.SortPropertyName, 0, null, function (obj) { return obj.onFilterChanging(); }); }; EventsTimelineViewModel.prototype.getEventDetails = function (event) { var detailsRequests = event.getEventDetailsRequestInformation(); if (!detailsRequests || detailsRequests.length === 0) { return event.getDetails(); } var result = []; for (var i = 0; i < detailsRequests.length; i++) { var detailRequest = detailsRequests[i]; if (detailRequest.isSourceRequest) { var sourceRequest = detailRequest; try { var sourceDetails = sourceRequest.sourceInfo; result = result.concat(event.getDetails(sourceDetails)); } catch (e) { } } else { result = result.concat(event.getDetails()); } } return result; }; EventsTimelineViewModel.prototype.getEvents = function () { var _this = this; if (this._gettingEventsPromise) { this._gettingEventsPromise.cancel(); this._gettingEventsPromise = null; } if (this._isDataSourceInvalid) { var filter = { eventNameFilter: this.eventNameFilter, filterBackgroundActivities: !this.displayBackgroundActivities, filterFrames: !this.displayFrames, filterMeasures: !this.displayMeasures, filterNegligibleUIActivities: this.durationFilter, filterNetworkActivities: !this.displayNetworkActivities, filterUIActivities: !this.displayUIActivities }; this._gettingEventsPromise = this._model.getEvents(this._timeSpan, this.sort, filter).then(function (dataSource) { _this._dataSource = dataSource; _this._isDataSourceInvalid = false; _this._gettingEventsPromise = null; if (_this.displayFrames && _this._selectedEvent) { _this._dataSource.expandFrameForEvent(_this._selectedEvent.id); } return _this._dataSource; }); return this._gettingEventsPromise; } return Plugin.Promise.as(this._dataSource); }; EventsTimelineViewModel.prototype.getMarks = function (category) { return this._markEventModel.getMarkEvents(this._globalRuler.totalRange, category); }; EventsTimelineViewModel.prototype.getMarkTooltip = function (mark) { return this._markEventModel.getMarkTooltip(mark); }; EventsTimelineViewModel.prototype.getVerticalRulerLinePositions = function (viewWidth) { return DiagnosticsHub.RulerUtilities.getVerticalLinePositions(this._timeSpan.toJsonTimespan(), viewWidth); }; EventsTimelineViewModel.prototype.resetFilter = function () { this.displayBackgroundActivities = undefined; this.displayFrames = undefined; this.displayMeasures = undefined; this.displayNetworkActivities = undefined; this.displayUIActivities = undefined; this.durationFilter = undefined; this.eventNameFilter = undefined; this.hasFilter = undefined; this.sort = undefined; }; EventsTimelineViewModel.prototype.onFilterChange = function () { this.hasFilter = !this.displayBackgroundActivities || !this.displayMeasures || !this.displayNetworkActivities || !this.displayUIActivities || this.durationFilter > 0 || !!this.eventNameFilter; }; EventsTimelineViewModel.prototype.onFilterChanging = function () { this._isDataSourceInvalid = true; }; EventsTimelineViewModel.prototype.onRulerSelectionChanged = function (args) { this.timeSpan = new VisualProfiler.TimeSpan(this._globalRuler.selection.begin, this._globalRuler.selection.end); }; EventsTimelineViewModel.ONE_MS_IN_NS = 1 * 1000 * 1000; EventsTimelineViewModel.DisplayBackgroundActivitiesPropertyName = "displayBackgroundActivities"; EventsTimelineViewModel.DisplayFramesPropertyName = "displayFrames"; EventsTimelineViewModel.DisplayMeasuresPropertyName = "displayMeasures"; EventsTimelineViewModel.DisplayNetworkActivitiesPropertyName = "displayNetworkActivities"; EventsTimelineViewModel.DisplayUIActivitiesPropertyName = "displayUIActivities"; EventsTimelineViewModel.DurationFilterPropertyName = "durationFilter"; EventsTimelineViewModel.EventNameFilterPropertyName = "eventNameFilter"; EventsTimelineViewModel.HasFilterPropertyName = "hasFilter"; EventsTimelineViewModel.SortPropertyName = "sort"; return EventsTimelineViewModel; })(Common.Observable); VisualProfiler.EventsTimelineViewModel = EventsTimelineViewModel; EventsTimelineViewModel.initialize(); var EventDetailsView = (function (_super) { __extends(EventDetailsView, _super); function EventDetailsView(event, details, descendants, timeSpan) { var _this = this; _super.call(this, "eventDetailsTemplate"); this.initializeEventGroup(); this._imagePreviewSeparator = this.findElement("imagePreviewSeparator"); this._imagePreviewContainer = this.findElement("imagePreviewContainer"); this._aggregatedDescendants = descendants; if (event === null) { if (this._aggregatedDescendants) { this.displaySelectionSummaryFields(timeSpan.elapsed, timeSpan.begin); this.displayInclusiveTimeSummary(false); } } else { this._details = details; this._event = event; this.displayCommonFields(); this.displayEventSpecificFields(); this.displayInclusiveTimeSummary(true); if (this._event instanceof HttpRequestEvent || this._event instanceof ImageDecodedEvent) { this.displayImagePreview(); } var cells = this.findElementsByClassName("eventCell"); for (var cellIndex = 0; cellIndex < cells.length; cellIndex++) { var cell = cells[cellIndex]; (function (value) { if (cell.classList.contains("BPT-FileLink")) { cell.addEventListener("mouseover", function (e) { return VisualProfiler.EventDataTemplate.showSourceInfoTooltip(e, _this._event.context.sourceInfo); }); } else { cell.addEventListener("mouseover", function (e) { return EventDetailsView.showCellTooltip(e, value); }); } cell.addEventListener("mouseout", function (e) { return Plugin.Tooltip.dismiss(); }); })(cell.textContent); } } } EventDetailsView.getCssClass = function (category) { switch (category) { case "Loading": return "dataLoading"; case "Scripting": return "dataScripting"; case "GC": return "dataScriptingGc"; case "Styling": return "dataStyling"; case "Rendering": return "dataRendering"; case "ImageDecoding": return "dataImageDecoding"; case "Frame": return "dataFrame"; case "Idle": return "dataIdle"; case "Unknown": return "dataOther"; default: throw new Error(Plugin.Resources.getErrorString("JSPerf.1033")); } }; EventDetailsView.isValidImageUrl = function (url) { return (EventDetailsView.IMG_URL_REGEX.test(url) && navigator.onLine) || EventDetailsView.IMG_DATA_URI_REGEX.test(url) || EventDetailsView.MS_APP_IMG_REGEX.test(url); }; EventDetailsView.showCellTooltip = function (mouseEvent, text) { var div = mouseEvent.currentTarget; if (div.offsetWidth < div.scrollWidth) { var config = { content: text }; Plugin.Tooltip.show(config); } }; EventDetailsView.prototype.createDiv = function (value) { var classNames = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { classNames[_i] = arguments[_i + 1]; } var div = document.createElement("div"); if (Common.TokenExtractor.isHtmlExpression(value)) { VisualProfiler.EventDataTemplate.addTokens(value, div, 0 /* Html */); } else if (Common.TokenExtractor.isStringExpression(value)) { VisualProfiler.EventDataTemplate.addTokens(value, div, 1 /* String */); } else { div.textContent = value; } if (classNames) { for (var index = 0; index < classNames.length; index++) { div.classList.add(classNames[index]); } } return div; }; EventDetailsView.prototype.displayCommonFields = function () { var durationLabelExc = this.findElement("durationLabelExc"); var durationValueExc = this.findElement("durationValueExc"); var durationIncRow = this.findElement("durationIncRow"); var durationLabelInc = this.findElement("durationLabelInc"); var durationValueInc = this.findElement("durationValueInc"); var startTimeLabel = this.findElement("startTimeLabel"); var startTimeValue = this.findElement("startTimeValue"); var threadContextRow = this.findElement("threadContextRow"); var threadContextLabel = this.findElement("threadContextLabel"); var threadContextValue = this.findElement("threadContextValue"); var description = this.findElement("eventDetailsDescription"); durationIncRow.classList.remove("BPT-hidden"); durationLabelExc.textContent = Plugin.Resources.getString("DurationLabelExclusive", ""); durationValueExc.textContent = VisualProfiler.FormattingHelpers.getPrettyPrintTime(this._event.exclusiveDuration); durationLabelInc.textContent = Plugin.Resources.getString("DurationLabelInclusive", ""); durationValueInc.textContent = VisualProfiler.FormattingHelpers.getPrettyPrintTime(this._event.timeSpan.elapsed); startTimeLabel.textContent = Plugin.Resources.getString("StartTimeLabel", ""); startTimeValue.textContent = VisualProfiler.FormattingHelpers.getPrettyPrintTime(this._event.timeSpan.begin); var threadContext = this.getThreadContext(); if (threadContext !== "0") { threadContextRow.classList.remove("BPT-hidden"); threadContextLabel.textContent = Plugin.Resources.getString("ThreadContextLabel", ""); threadContextValue.textContent = threadContext; } description.classList.remove("BPT-hidden"); description.textContent = this._event.getDescription(); }; EventDetailsView.prototype.displayImagePreview = function () { var _this = this; var url; for (var i = 0; i < this._details.length; i++) { if (this._details[i].localizedName === Plugin.Resources.getString("AddressNameLabel") || this._details[i].localizedName === Plugin.Resources.getString("ImageUrlLabel")) { url = this._details[i].localizedValue; break; } } if (this._event instanceof ImageDecodedEvent || EventDetailsView.isValidImageUrl(url)) { var img = this.findElement("imagePreview"); img.onload = function (e) { if (img.width > 1 && img.height > 1) { var div = _this.findElement("imagePreviewHeader"); div.textContent = Plugin.Resources.getString("ImagePreviewHeader", img.width, img.height); _this._imagePreviewSeparator.classList.remove("BPT-hidden"); _this._imagePreviewContainer.classList.remove("BPT-hidden"); } }; if (EventDetailsView.MS_APP_IMG_REGEX.test(url)) { Plugin.Host.getDocumentLocation(url).done(function (imgPath) { img.src = imgPath; }); } else { img.src = url; } } }; EventDetailsView.prototype.displayInclusiveTimeSummary = function (isEventSelected) { var _this = this; var donutContainer = this.findElement("inclusiveTimeBreakDownDetails"); if ((isEventSelected && this._aggregatedDescendants.length <= 1) || (!isEventSelected && this._aggregatedDescendants.length === 0)) { return; } if (typeof this._donutChartViewModel === "undefined") { this._donutChartViewModel = new VisualProfiler.DonutChartViewModel(donutContainer); this._donutChartViewModel.view.addSectorAriaLabel = function (sector, percent) { var timeStamp = VisualProfiler.FormattingHelpers.getPrettyPrintTime(new VisualProfiler.TimeStamp(sector.value)); return Plugin.Resources.getString("DonutSectorAriaLabel", sector.name, percent, timeStamp); }; } if (this._event) { this._donutChartViewModel.model.headerText = Plugin.Resources.getString("InclusiveTimeDetailsHeader"); } else { this._donutChartViewModel.model.headerText = Plugin.Resources.getString("UIThreadSummaryHeader"); } var sectors = this.createSectors(this._aggregatedDescendants); sectors.forEach(function (sector) { _this._donutChartViewModel.model.addSector(sector); }); var sectorCount = this._donutChartViewModel.model.sectors.length; if ((isEventSelected && sectorCount > 1) || (!isEventSelected && sectorCount > 0)) { donutContainer.classList.remove("BPT-hidden"); if (isEventSelected) { var inclusiveSeparator = this.findElement("inclusiveTimeDetailSeparator"); inclusiveSeparator.classList.remove("BPT-hidden"); } this._donutChartViewModel.view.render(); } }; EventDetailsView.prototype.createSectors = function (eventDatas) { var eventFactory = new EventFactory(); var sectors = []; for (var i = 0; i < eventDatas.length; i++) { var eventData = eventDatas[i]; var interval = { begin: 0, beginThreadId: 0, category: eventData.category, childrenCount: 0, end: 0, endThreadId: 0, exclusiveDuration: 0, fullName: undefined, id: -1, isExpanded: false, level: -1, name: eventData.name }; if (eventData.name === "DDTracker" && typeof eventData.ddTrackerProp !== "undefined") { var ddTrackerInterval = interval; ddTrackerInterval.ddtrackerTaskString = eventData.ddTrackerProp.ddtrackerTaskString; ddTrackerInterval.ddtrackerTaskResource = eventData.ddTrackerProp.ddtrackerTaskResource; ddTrackerInterval.ddtrackerTaskResourceArgs = eventData.ddTrackerProp.ddtrackerTaskResourceArgs; ddTrackerInterval.ddtrackerBaseClass = eventData.ddTrackerProp.ddtrackerBaseClass; } var event = eventFactory.createEvent(interval, 0); sectors.push({ name: event.name, cssClass: EventDetailsView.getCssClass(eventData.category), value: eventData.value }); } return this.groupEventTypes(sectors); }; EventDetailsView.prototype.initializeEventGroup = function () { this._eventGroupsMap = {}; this._eventGroupsMap[Plugin.Resources.getString("DomEvent")] = Plugin.Resources.getString("DomEvent"); this._eventGroupsMap[Plugin.Resources.getString("EventHandler")] = Plugin.Resources.getString("DomEvent"); this._eventGroupsMap[Plugin.Resources.getString("Layout")] = Plugin.Resources.getString("Layout"); this._eventGroupsMap[Plugin.Resources.getString("DDTrackerLayoutDetailHeader")] = Plugin.Resources.getString("Layout"); this._eventGroupsMap[Plugin.Resources.getString("CssCalculation")] = Plugin.Resources.getString("CssCalculation"); this._eventGroupsMap[Plugin.Resources.getString("DDTrackerStyleComputationDetailHeader")] = Plugin.Resources.getString("CssCalculation"); this._eventGroupsMap[Plugin.Resources.getString("Paint")] = Plugin.Resources.getString("Paint"); this._eventGroupsMap[Plugin.Resources.getString("RenderLayer")] = Plugin.Resources.getString("Paint"); }; EventDetailsView.prototype.groupEventTypes = function (sectors) { var group; var groupMap = {}; for (var i = 0; i < sectors.length; i++) { var sector = sectors[i]; var groupEventName = this._eventGroupsMap[sector.name]; if (typeof groupEventName !== "undefined") { group = groupMap[groupEventName]; if (typeof group === "undefined") { groupMap[groupEventName] = sector; groupMap[groupEventName].name = groupEventName; } else { if (sector.name === groupEventName) { groupMap[groupEventName] = sector; sector.value += group.value; } else { group.value += sector.value; } } } else { groupMap[sector.name] = sector; } } var groupedSectors = []; for (var key in groupMap) { groupedSectors.push(groupMap[key]); } return groupedSectors; }; EventDetailsView.prototype.displayEventSpecificFields = function () { if (!this._details) { return; } var additionalDetailsContainer = this.findElement("additionalDetails"); for (var i = 0; i < this._details.length; i++) { var detail = this._details[i]; if (detail.sourceInfo && detail.sourceInfo.source === "") { continue; } var nameDiv = this.createDiv(detail.localizedName + ":", "eventCell", "name"); var valueDiv = this.createDiv(detail.localizedValue, "eventCell", "value"); if (detail.sourceInfo) { valueDiv.className += " BPT-FileLink"; valueDiv.setAttribute("role", "link"); VisualProfiler.EventDataTemplate.setViewSourceHandler(valueDiv, detail.sourceInfo, true); } var additionalDetailsLabelValuePair = this.createDiv("", "eventRow"); additionalDetailsLabelValuePair.appendChild(nameDiv); additionalDetailsLabelValuePair.appendChild(valueDiv); additionalDetailsContainer.appendChild(additionalDetailsLabelValuePair); } }; EventDetailsView.prototype.displaySelectionSummaryFields = function (duration, start) { var durationLabelExc = this.findElement("durationLabelExc"); var durationValueExc = this.findElement("durationValueExc"); var startTimeLabel = this.findElement("startTimeLabel"); var startTimeValue = this.findElement("startTimeValue"); durationLabelExc.textContent = Plugin.Resources.getString("SelectionDurationLabel", ""); durationValueExc.textContent = VisualProfiler.FormattingHelpers.getPrettyPrintTime(duration); startTimeLabel.textContent = Plugin.Resources.getString("StartTimeLabel", ""); startTimeValue.textContent = VisualProfiler.FormattingHelpers.getPrettyPrintTime(start); }; EventDetailsView.prototype.getThreadContext = function () { var threadId = this._event.contextThreadId; if (threadId !== null) { if (this._event.category === 3 /* Rendering */) { return Plugin.Resources.getString("RenderThread"); } else if (this._event instanceof HttpRequestEvent) { return Plugin.Resources.getString("DownloadThread"); } else { return threadId.toString(); } } return Plugin.Resources.getString("UIThreadContext"); }; EventDetailsView.IMG_URL_REGEX = /^(http|https).*([.jpg]|[.jpeg]|[.gif]|[.png])$/i; EventDetailsView.IMG_DATA_URI_REGEX = /^(data:image\/).*$/i; EventDetailsView.MS_APP_IMG_REGEX = /^(ms-appx(-web)?:\/\/).*$/i; return EventDetailsView; })(Common.Controls.Legacy.TemplateControl); VisualProfiler.EventDetailsView = EventDetailsView; var EventsTimelineView = (function (_super) { __extends(EventsTimelineView, _super); function EventsTimelineView(parentContainerId) { var _this = this; _super.call(this, "timelineViewTemplate"); this._parentContainer = document.getElementById(parentContainerId); if (!this._parentContainer) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1034")); } this._eventDetailsHeaderClass = "emptyHeader"; this._eventDetailsTitle = this.findElement("eventDetailsTitle"); this._timelineDetailsHeader = this.findElement("timelineDetailsHeader"); this._timelineDetailsPaneContainer = this.findElement("timelineDetailsPaneContainer"); this._timelineViewAndDetailsContainer = this.findElement("timelineViewAndDetails"); this._timelineLabel = this.findElement("timelineLabel"); this._timelineView = this.findElement("timelineView"); this._timelineLabel.textContent = Plugin.Resources.getString("TimelineLabel"); var sortFilterSection = this.findElement("sortFilterSection"); this._filteringBar = new Common.TemplateControl("VisualProfiler.filteringBarTemplate"); sortFilterSection.appendChild(this._filteringBar.rootElement); this._listControl = new VisualProfiler.EventsTimelineListControl(this._timelineView); this._listControl.dataColumnWidthChanged = this.onListControlDataColumnWidthChanged.bind(this); this._parentContainer.appendChild(this.rootElement); this._onResizeHandler = function () { _this._columnsCssRule = _this.getColumnsCssRule(); _this._listControl.invalidateSizeCache(); _this.updateDetailsDivider(); _this.render(); }; this.registerResizeEvent(); this._eventHeaderDivider = this.findElement("timelineEventHeaderDivider"); this._eventHeaderDivider.style.left = this._listControl.eventNameColumnWidth + "px"; this._eventHeaderLabel = this.findElement("timelineEventHeaderLabel"); this._eventHeaderLabel.textContent = Plugin.Resources.getString("EventHeaderLabel"); this._eventHeaderLabel.style.width = this._listControl.eventNameColumnWidth + "px"; this._rulerContainer = this.findElement("timelineRuler"); this._columnsCssRule = this.getColumnsCssRule(); this._eventDetailsDivider = new VisualProfiler.Divider(this._timelineViewAndDetailsContainer, 0); this._eventDetailsDivider.onMoved = this.onResizeDetails.bind(this); this.createFilteringMenu(); } Object.defineProperty(EventsTimelineView.prototype, "detailsView", { get: function () { return this._detailsView; }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineView.prototype, "listControl", { get: function () { return this._listControl; }, enumerable: true, configurable: true }); Object.defineProperty(EventsTimelineView.prototype, "viewModel", { get: function () { return this._viewModel; }, set: function (value) { this.unregisterViewModelEvents(); this._listControl.dataSource = null; this._viewModel = value; this._filteringBar.model = this._viewModel; this._filteringMenu.model = this._viewModel; this.createRuler(); this.updateDetailsPane(null); this.updateDetailsDivider(); this.registerViewModelEvents(); }, enumerable: true, configurable: true }); EventsTimelineView.getCssRule = function (styleSheetName, selectorName) { var styleSheet = document.styleSheets[styleSheetName]; if (styleSheet) { for (var i = 0; i < styleSheet.rules.length; ++i) { var rule = styleSheet.rules[i]; if (rule && rule.selectorText === selectorName) { return rule; } } } return null; }; EventsTimelineView.prototype.render = function () { var _this = this; if (this._viewModel) { this.unregisterResizeEvent(); return this._viewModel.getEvents().then(function (dataSource) { var timeSpan = _this._viewModel.timeSpan; _this._listControl.dataSource = dataSource; _this._listControl.timeSpan = timeSpan; _this._listControl.viewModel = _this._viewModel; _this._listControl.rulerScale = _this._rulerScale; _this._listControl.selectedItemChanged = _this.onSelectedEventChanged.bind(_this); _this._listControl.render(); _this.setRulerRect(); _this._rulerScale.setTimeRange(timeSpan.toJsonTimespan()); _this._rulerScale.render(); _this._listControl.renderVerticalRulerLines(); if (!_this._listControl.selectedItem) { _this.updateDetailsPane(null); } _this.registerResizeEvent(); }, function (err) { _this.registerResizeEvent(); }); } else { return Plugin.Promise.as(null); } }; EventsTimelineView.showTooltip = function (resourceId) { var config = { content: Plugin.Resources.getString(resourceId) }; Plugin.Tooltip.show(config); }; EventsTimelineView.prototype.createFilteringMenu = function () { var filteringMenuButton = this._filteringBar.getNamedControl("filteringMenuButton"); this._filteringMenu = new Common.Controls.MenuControl(); this._filteringMenu.menuItemsTemplateId = "VisualProfiler.filteringMenuDropDown"; this._filteringMenu.targetButtonElement = filteringMenuButton.rootElement; this._filteringMenu.dismissOnMenuItemClick = true; this._filteringMenu.dismissOnTargetButtonClick = true; this.rootElement.appendChild(this._filteringMenu.rootElement); }; EventsTimelineView.prototype.createRuler = function () { var _this = this; if (this._gettingMarksPromise) { this._gettingMarksPromise.cancel(); this._gettingMarksPromise = null; } var lifecycleData = []; var userMarkData = []; if (this._rulerScale) { this._rulerScale.deinitialize(); } this._rulerScale = new DiagnosticsHub.RulerScale({ containerId: this._rulerContainer.id, timeRange: this._viewModel ? this._viewModel.timeSpan.toJsonTimespan() : new DiagnosticsHub.JsonTimespan(new DiagnosticsHub.BigNumber(0, 0), new DiagnosticsHub.BigNumber(0, 0)), series: [] }); if (this._viewModel) { var lifecycleMarksPromise = this._viewModel.getMarks(0).then(function (lifecycleMarks) { lifecycleData = lifecycleMarks; }); var userMarksPromise = this._viewModel.getMarks(1).then(function (userMarks) { userMarkData = userMarks; }); this._gettingMarksPromise = Plugin.Promise.join([lifecycleMarksPromise, userMarksPromise]).then(function () { _this._rulerScale = new DiagnosticsHub.RulerScale({ id: undefined, className: undefined, containerId: _this._rulerContainer.id, timeRange: _this._viewModel.timeSpan.toJsonTimespan(), imageTokenList: ["vs-image-graph-user-mark", "vs-image-graph-app-event"], aggregatedImageToken: "vs-image-graph-aggregated-event", series: [ { index: 0, id: DiagnosticsHub.MarkType.UserMark, label: Plugin.Resources.getString("RulerUserMarkLabel"), data: userMarkData }, { index: 1, id: DiagnosticsHub.MarkType.LifeCycleEvent, label: Plugin.Resources.getString("RulerLifecycleMarkLabel"), data: lifecycleData } ] }); _this._rulerScale.render(); }); this._gettingMarksPromise.done(function () { _this._gettingMarksPromise = null; }); } else { this._rulerScale.render(); } }; EventsTimelineView.prototype.getColumnsCssRule = function () { return EventsTimelineView.getCssRule("VisualProfiler.css", ".mainView .dataViewContainer .detailedViewsContainer .timelineViewContainer .timelineViewGroup .timelineViewAndDetails"); }; EventsTimelineView.prototype.onResizeDetails = function (offsetX) { this.updateColumnWidth(offsetX); VisualProfiler.Program.triggerResize(); }; EventsTimelineView.prototype.onSelectedEventChanged = function (event) { this._viewModel.selectedEvent = event; }; EventsTimelineView.prototype.onListControlDataColumnWidthChanged = function () { this._eventHeaderDivider.style.left = this._listControl.eventNameColumnWidth + "px"; this._eventHeaderLabel.style.width = this._listControl.eventNameColumnWidth + "px"; this.setRulerRect(); this._rulerScale.render(); }; EventsTimelineView.prototype.onSortChanged = function () { VisualProfiler.Program.traceWriter.raiseEvent(103 /* Timeline_GridSort_Start */); this.render().done(function () { Notifications.notify(VisualProfiler.ResponsivenessNotifications.SortFinishedOnGrid); VisualProfiler.Program.traceWriter.raiseEvent(104 /* Timeline_GridSort_Stop */); }); }; EventsTimelineView.prototype.onTimeSpanChanged = function () { this.render().done(function () { Notifications.notify(VisualProfiler.ResponsivenessNotifications.GridUpdatedForTimeSelection); }); }; EventsTimelineView.prototype.onToggleFilter = function (traceEventStart, traceEventStop) { if (traceEventStart !== undefined) { VisualProfiler.Program.traceWriter.raiseEvent(traceEventStart); } this.render().done(function () { if (traceEventStop !== undefined) { VisualProfiler.Program.traceWriter.raiseEvent(traceEventStop); } }); }; EventsTimelineView.prototype.onEventNameFilterChange = function () { var _this = this; clearTimeout(this._eventNameFilterResponseTimeoutHandle); this._eventNameFilterResponseTimeoutHandle = setTimeout(function () { VisualProfiler.Program.traceWriter.raiseEvent(119 /* Timeline_GridUpdatedForFilterName_Start */); _this.render().done(function () { VisualProfiler.Program.traceWriter.raiseEvent(120 /* Timeline_GridUpdatedForFilterName_Stop */); Notifications.notify(VisualProfiler.ResponsivenessNotifications.GridUpdatedForFilter); }); }, 200); }; EventsTimelineView.prototype.onViewModelPropertyChanged = function (propName) { switch (propName) { case EventsTimelineViewModel.DisplayBackgroundActivitiesPropertyName: this.onToggleFilter(111 /* Timeline_GridUpdatedForFilterBackground_Start */, 112 /* Timeline_GridUpdatedForFilterBackground_Stop */); break; case EventsTimelineViewModel.DisplayFramesPropertyName: this.onToggleFilter(117 /* Timeline_GridUpdatedForFilterFrames_Start */, 118 /* Timeline_GridUpdatedForFilterFrames_Stop */); break; case EventsTimelineViewModel.DisplayMeasuresPropertyName: this.onToggleFilter(115 /* Timeline_GridUpdatedForFilterMeasures_Start */, 116 /* Timeline_GridUpdatedForFilterMeasures_Stop */); break; case EventsTimelineViewModel.DisplayNetworkActivitiesPropertyName: this.onToggleFilter(113 /* Timeline_GridUpdatedForFilterNetwork_Start */, 114 /* Timeline_GridUpdatedForFilterNetwork_Stop */); break; case EventsTimelineViewModel.DisplayUIActivitiesPropertyName: case EventsTimelineViewModel.DurationFilterPropertyName: this.onToggleFilter(); break; case EventsTimelineViewModel.EventNameFilterPropertyName: this.onEventNameFilterChange(); break; case EventsTimelineViewModel.SortPropertyName: this.onSortChanged(); break; } }; EventsTimelineView.prototype.onViewModelSelectionChanged = function (event) { this._listControl.selectedItem = event; this.updateDetailsPane(event); }; EventsTimelineView.prototype.registerResizeEvent = function () { VisualProfiler.Program.addEventListener(VisualProfiler.ProgramEvents.Resize, this._onResizeHandler); }; EventsTimelineView.prototype.registerViewModelEvents = function () { if (this._viewModel) { this._viewModelPropertyChangeEvtReg = this._viewModel.propertyChanged.addHandler(this.onViewModelPropertyChanged.bind(this)); this._viewModel.timeSpanChanged = this.onTimeSpanChanged.bind(this); this._viewModel.selectedEventChanged = this.onViewModelSelectionChanged.bind(this); } }; EventsTimelineView.prototype.setDetailsDividerBounds = function () { var containerWidth = this._timelineViewAndDetailsContainer.offsetWidth; this._eventDetailsDivider.minX = containerWidth / 2; this._eventDetailsDivider.maxX = containerWidth; }; EventsTimelineView.prototype.setRulerRect = function () { var rulerMarginLeft = this._listControl.dataColumnLeft + "px"; var rulerWidth = this._listControl.dataColumnWidth + "px"; if (this._rulerContainer.style.marginLeft !== rulerMarginLeft || this._rulerContainer.style.width !== rulerWidth) { this._rulerContainer.style.marginLeft = rulerMarginLeft; this._rulerContainer.style.width = rulerWidth; if (this._rulerScale) { this._rulerScale.invalidateSizeCache(); } } }; EventsTimelineView.prototype.updateDetailsPane = function (event) { var currentDataSource = this._listControl.dataSource; if (!currentDataSource) { return; } this._timelineDetailsHeader.classList.remove(this._eventDetailsHeaderClass); var sectorData; var timeSpan; if (event === null) { if (currentDataSource) { this._eventDetailsTitle.textContent = ""; this._eventDetailsHeaderClass = "emptyHeader"; sectorData = currentDataSource.getSelectionSummary(); timeSpan = currentDataSource.timeSpan; } this._detailsView = new EventDetailsView(null, null, sectorData, timeSpan); } else { this._eventDetailsTitle.textContent = event.title; this._eventDetailsHeaderClass = event.getCssClass(); var details = this._viewModel.getEventDetails(event); sectorData = currentDataSource.getAggregatedDescendantsForEvent(event.id); this._detailsView = new EventDetailsView(event, details, sectorData, timeSpan); } this._timelineDetailsHeader.classList.add(this._eventDetailsHeaderClass); this._timelineDetailsPaneContainer.innerHTML = ""; this._timelineDetailsPaneContainer.appendChild(this._detailsView.rootElement); Notifications.notify(VisualProfiler.ResponsivenessNotifications.DetailsPaneLoaded); }; EventsTimelineView.prototype.updateColumnWidth = function (offsetX) { if (offsetX === null || typeof offsetX === "undefined") { offsetX = this._eventDetailsDivider.offsetX; } var columns = this._columnsCssRule.style.msGridColumns.split(" "); columns[2] = (this._timelineViewAndDetailsContainer.clientWidth - offsetX) + "px"; this._columnsCssRule.style.msGridColumns = columns.join(" "); }; EventsTimelineView.prototype.updateDetailsDivider = function () { this.setDetailsDividerBounds(); this._eventDetailsDivider.offsetX = this._timelineView.offsetWidth; this.updateColumnWidth(this._eventDetailsDivider.offsetX + 3); }; EventsTimelineView.prototype.unregisterResizeEvent = function () { VisualProfiler.Program.removeEventListener(VisualProfiler.ProgramEvents.Resize, this._onResizeHandler); }; EventsTimelineView.prototype.unregisterViewModelEvents = function () { if (this._viewModel) { this._viewModel.timeSpanChanged = null; this._viewModel.selectedEventChanged = null; } if (this._viewModelPropertyChangeEvtReg) { this._viewModelPropertyChangeEvtReg.unregister(); this._viewModelPropertyChangeEvtReg = null; } }; return EventsTimelineView; })(Common.Controls.Legacy.TemplateControl); VisualProfiler.EventsTimelineView = EventsTimelineView; })(VisualProfiler || (VisualProfiler = {})); // ToolbarView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var VisualProfiler; (function (VisualProfiler) { "use strict"; (function (CollectionState) { CollectionState[CollectionState["None"] = 0] = "None"; CollectionState[CollectionState["Profiling"] = 1] = "Profiling"; CollectionState[CollectionState["Analyzing"] = 2] = "Analyzing"; CollectionState[CollectionState["Interactive"] = 3] = "Interactive"; })(VisualProfiler.CollectionState || (VisualProfiler.CollectionState = {})); var CollectionState = VisualProfiler.CollectionState; var ToolbarViewModel = (function (_super) { __extends(ToolbarViewModel, _super); function ToolbarViewModel(controller) { _super.call(this); this._controller = controller; this._eventManager = new Plugin.Utilities.EventManager(); this._startProfilingEnabled = true; } Object.defineProperty(ToolbarViewModel.prototype, "startProfilingEnabled", { get: function () { return this._startProfilingEnabled && !this.isAtBreakpoint; }, set: function (value) { if (value !== this._startProfilingEnabled) { this._startProfilingEnabled = value; this.propertyChanged.invoke(ToolbarViewModel.StartProfilingEnabledPropertyName); } }, enumerable: true, configurable: true }); ToolbarViewModel.initialize = function () { Common.ObservableHelpers.defineProperty(ToolbarViewModel, ToolbarViewModel.ClearSelectionEnabledPropertyName, false); Common.ObservableHelpers.defineProperty(ToolbarViewModel, ToolbarViewModel.CollectionStatePropertyName, 0 /* None */); Common.ObservableHelpers.defineProperty(ToolbarViewModel, ToolbarViewModel.IsAtBreakpointPropertyName, false, function (obj, oldValue, newValue) { return obj.onIsAtBreakpointChanged(); }); Common.ObservableHelpers.defineProperty(ToolbarViewModel, ToolbarViewModel.OpenSessionPropertyName, true); Common.ObservableHelpers.defineProperty(ToolbarViewModel, ToolbarViewModel.ResetZoomEnabledPropertyName, false); Common.ObservableHelpers.defineProperty(ToolbarViewModel, ToolbarViewModel.SaveSessionPropertyName, false); Common.ObservableHelpers.defineProperty(ToolbarViewModel, ToolbarViewModel.StopProfilingEnabledPropertyName, false); Common.ObservableHelpers.defineProperty(ToolbarViewModel, ToolbarViewModel.ZoomInEnabledPropertyName, false); }; ToolbarViewModel.prototype.clearSelection = function () { if (this._globalRuler) { this._globalRuler.setSelection(this._globalRuler.activeRange); } }; ToolbarViewModel.prototype.resetZoom = function () { if (this._globalRuler) { this._globalRuler.setActiveRange(this._globalRuler.totalRange); this._globalRuler.setSelection(this._lastZoomSelection); this.zoomInEnabled = true; this.clearSelectionEnabled = true; } Notifications.notify(VisualProfiler.ResponsivenessNotifications.ResetZoomFinished); }; ToolbarViewModel.prototype.setGlobalRuler = function (globalRuler) { if (this._globalRuler) { this._globalRuler.removeEventListener(VisualProfiler.GlobalRuler.ActiveRangeChangedEventType, this.onActiveRangeChanged.bind(this)); this._globalRuler.removeEventListener(VisualProfiler.GlobalRuler.SelectionChangedEventType, this.onSelectionChanged.bind(this)); } this._globalRuler = globalRuler; if (this._globalRuler) { this._globalRuler.addEventListener(VisualProfiler.GlobalRuler.ActiveRangeChangedEventType, this.onActiveRangeChanged.bind(this)); this._globalRuler.addEventListener(VisualProfiler.GlobalRuler.SelectionChangedEventType, this.onSelectionChanged.bind(this)); } }; ToolbarViewModel.prototype.openSession = function () { var _this = this; Plugin.Storage.openFileDialog({ name: "", extensions: ["diagsession"] }, { access: 1 /* read */, encoding: "BINARY", persistence: 1 /* temporary */, type: 0 /* binary */ }).then(function (stream) { return _this._controller.openSession(stream); }).done(function () { }, function (error) { if (error.number !== undefined && error.number === Common.Constants.E_ABORT) { return; } Plugin.F12.ErrorDisplay.show(Plugin.Resources.getString("OpenSessionFailedMessage")); }); }; ToolbarViewModel.prototype.saveSession = function () { var _this = this; Plugin.Storage.saveFileDialog({ name: "", extensions: ["diagsession"] }, { access: 3 /* readWrite */, encoding: "BINARY", persistence: 1 /* temporary */, type: 0 /* binary */ }).then(function (stream) { _this._controller.saveSession(stream); }).done(function () { Notifications.notify(VisualProfiler.ResponsivenessNotifications.SaveSessionFinished); }, function (error) { if (error.number !== undefined && error.number === Common.Constants.E_ABORT) { return; } Plugin.F12.ErrorDisplay.show(Plugin.Resources.getString("SaveSessionFailedMessage")); }); }; ToolbarViewModel.prototype.startProfiling = function () { var _this = this; this.clearSelectionEnabled = false; this.openSessionEnabled = false; this.resetZoomEnabled = false; this.saveSessionEnabled = false; this.startProfilingEnabled = false; this.stopProfilingEnabled = false; this.zoomInEnabled = false; this.collectionState = 0 /* None */; this._controller.startProfiling().done(function () { _this.stopProfilingEnabled = true; _this.collectionState = 1 /* Profiling */; }, function (err) { _this.startProfilingEnabled = true; _this.openSessionEnabled = VisualProfiler.Program.packager !== null; VisualProfiler.Program.reportError(err, Plugin.Resources.getErrorString("JSPerf.1067")); }); }; ToolbarViewModel.prototype.stopProfiling = function () { var _this = this; this.clearSelectionEnabled = false; this.openSessionEnabled = false; this.resetZoomEnabled = false; this.saveSessionEnabled = false; this.startProfilingEnabled = false; this.stopProfilingEnabled = false; this.zoomInEnabled = false; this.collectionState = 2 /* Analyzing */; this._controller.stopProfiling().done(function () { _this.openSessionEnabled = VisualProfiler.Program.packager !== null; _this.saveSessionEnabled = VisualProfiler.Program.packager !== null; _this.startProfilingEnabled = true; _this.collectionState = 3 /* Interactive */; }, function (err) { _this.startProfilingEnabled = true; _this.collectionState = 0 /* None */; VisualProfiler.Program.reportError(err, Plugin.Resources.getErrorString("JSPerf.1068")); }); }; ToolbarViewModel.prototype.zoomIn = function () { VisualProfiler.Program.traceWriter.raiseEvent(101 /* Timeline_Zoom_Start */); if (this._globalRuler) { this._lastZoomSelection = this._globalRuler.selection; this._globalRuler.setActiveRange(this._globalRuler.selection); this.clearSelection(); this.zoomInEnabled = false; this.clearSelectionEnabled = false; } Notifications.notify(VisualProfiler.ResponsivenessNotifications.ZoomInFinished); VisualProfiler.Program.traceWriter.raiseEvent(102 /* Timeline_Zoom_Stop */); }; ToolbarViewModel.prototype.onActiveRangeChanged = function (args) { this.resetZoomEnabled = !this._globalRuler.activeRange.equals(this._globalRuler.totalRange); }; ToolbarViewModel.prototype.onSelectionChanged = function (args) { var clearSelectionAllowed = !args.data.newSelection.equals(this._globalRuler.activeRange); this.clearSelectionEnabled = clearSelectionAllowed; this.zoomInEnabled = clearSelectionAllowed && (args.data.newSelection.elapsed.nsec > ToolbarViewModel.MinimumZoomLevelInNs); }; ToolbarViewModel.prototype.onIsAtBreakpointChanged = function () { this.propertyChanged.invoke(ToolbarViewModel.StartProfilingEnabledPropertyName); }; ToolbarViewModel.MinimumZoomLevelInNs = 100000; ToolbarViewModel.ClearSelectionEnabledPropertyName = "clearSelectionEnabled"; ToolbarViewModel.CollectionStatePropertyName = "collectionState"; ToolbarViewModel.IsAtBreakpointPropertyName = "isAtBreakpoint"; ToolbarViewModel.OpenSessionPropertyName = "openSessionEnabled"; ToolbarViewModel.ResetZoomEnabledPropertyName = "resetZoomEnabled"; ToolbarViewModel.SaveSessionPropertyName = "saveSessionEnabled"; ToolbarViewModel.StartProfilingEnabledPropertyName = "startProfilingEnabled"; ToolbarViewModel.StopProfilingEnabledPropertyName = "stopProfilingEnabled"; ToolbarViewModel.ZoomInEnabledPropertyName = "zoomInEnabled"; return ToolbarViewModel; })(Common.Observable); VisualProfiler.ToolbarViewModel = ToolbarViewModel; ToolbarViewModel.initialize(); var VisualProfilerToolbarControl = (function (_super) { __extends(VisualProfilerToolbarControl, _super); function VisualProfilerToolbarControl() { _super.call(this); this.title = Plugin.Resources.getString("F12ToolTitle"); this.panelTemplateId = "VisualProfiler.toolbarButtonsPanel"; this.addClickHandlerToButton("startToolbarButton", this.onStartToolbarButtonClick.bind(this)); this.addClickHandlerToButton("stopToolbarButton", this.onStopToolbarButtonClick.bind(this)); this.addClickHandlerToButton("openSessionButton", this.onOpenSessionButtonClick.bind(this)); this.addClickHandlerToButton("saveSessionButton", this.onSaveSessionButtonClick.bind(this)); this.addClickHandlerToButton("zoomInButton", this.onZoomInButtonClick.bind(this)); this.addClickHandlerToButton("resetZoomButton", this.onResetZoomButtonClick.bind(this)); this.addClickHandlerToButton("clearSelectionButton", this.onClearSelectionButtonClick.bind(this)); } VisualProfilerToolbarControl.prototype.onStartToolbarButtonClick = function () { if (this.model) { this.model.startProfiling(); } }; VisualProfilerToolbarControl.prototype.onStopToolbarButtonClick = function () { if (this.model) { this.model.stopProfiling(); } }; VisualProfilerToolbarControl.prototype.onOpenSessionButtonClick = function () { if (this.model) { this.model.openSession(); } }; VisualProfilerToolbarControl.prototype.onSaveSessionButtonClick = function () { if (this.model) { this.model.saveSession(); } }; VisualProfilerToolbarControl.prototype.onZoomInButtonClick = function () { if (this.model) { this.model.zoomIn(); } }; VisualProfilerToolbarControl.prototype.onResetZoomButtonClick = function () { if (this.model) { this.model.resetZoom(); } }; VisualProfilerToolbarControl.prototype.onClearSelectionButtonClick = function () { if (this.model) { this.model.clearSelection(); } }; return VisualProfilerToolbarControl; })(Common.Controls.ToolbarControl); VisualProfiler.VisualProfilerToolbarControl = VisualProfilerToolbarControl; })(VisualProfiler || (VisualProfiler = {})); // DonutChartView.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var VisualProfiler; (function (VisualProfiler) { "use strict"; var DonutChartModel = (function () { function DonutChartModel() { this._sectors = []; } Object.defineProperty(DonutChartModel.prototype, "headerText", { get: function () { return this._headerText; }, set: function (value) { this._headerText = value; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChartModel.prototype, "sectors", { get: function () { return this._sectors; }, enumerable: true, configurable: true }); DonutChartModel.prototype.addSector = function (sector) { this._sectors.push(sector); }; return DonutChartModel; })(); VisualProfiler.DonutChartModel = DonutChartModel; var DonutChartViewModel = (function () { function DonutChartViewModel(container) { this._model = new DonutChartModel(); this._view = new DonutChartView(container, this); } Object.defineProperty(DonutChartViewModel.prototype, "model", { get: function () { return this._model; }, enumerable: true, configurable: true }); Object.defineProperty(DonutChartViewModel.prototype, "view", { get: function () { return this._view; }, enumerable: true, configurable: true }); return DonutChartViewModel; })(); VisualProfiler.DonutChartViewModel = DonutChartViewModel; var DonutChartView = (function (_super) { __extends(DonutChartView, _super); function DonutChartView(container, controller) { _super.call(this, container); this._controller = controller; this.rootElement.tabIndex = 0; var config = { explosionFactor: 2, radius: 45, strokeWidth: 20, minDonutArcAngle: 10, containerWidth: 210, containerHeight: 180, clockwiseRotation: true }; this._donutChart = new VisualProfiler.DonutChart(this.rootElement, this.onRenderSectorTooltip.bind(this), this.onAddSectorAriaLabel.bind(this), config); this.rootElement.setAttribute("aria-label", Plugin.Resources.getString("InclusiveTimeAriaLabel")); } DonutChartView.prototype.render = function () { this.addHeaderElement(); DonutChartView.sortEventsByValue(this._controller.model.sectors); this._donutChart.addSectors(this._controller.model.sectors); this._donutChart.render(); }; DonutChartView.sortEventsByValue = function (sectors) { sectors.sort(function (sector1, sector2) { return sector2.value - sector1.value; }); }; DonutChartView.prototype.addHeaderElement = function () { var div = document.createElement("div"); var span = document.createElement("span"); span.style.marginLeft = "10px"; span.innerText = this._controller.model.headerText; div.appendChild(span); this.rootElement.insertBefore(div, this.rootElement.firstChild); }; DonutChartView.prototype.onAddSectorAriaLabel = function (sector, percent) { if (this.addSectorAriaLabel) { var label = this.addSectorAriaLabel(sector, percent); if (label) { var onAddSectorAriaLabel = this.rootElement.getAttribute("aria-label") + " " + label; this.rootElement.setAttribute("aria-label", onAddSectorAriaLabel); } } }; DonutChartView.prototype.onRenderSectorTooltip = function (sectorInfo, percent) { var timeStamp = VisualProfiler.FormattingHelpers.getPrettyPrintTime(new VisualProfiler.TimeStamp(sectorInfo.value)); return Plugin.Resources.getString("SectorTooltipFormat", sectorInfo.name, Common.FormattingHelpers.getDecimalLocaleString(percent, false), timeStamp); }; return DonutChartView; })(Common.Controls.Legacy.Control); VisualProfiler.DonutChartView = DonutChartView; })(VisualProfiler || (VisualProfiler = {})); // AnalyzerDataSession.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var AnalyzerDataSession = (function () { function AnalyzerDataSession(dataWarehouse) { this._dataWarehouse = dataWarehouse; this._threadId = 0; this._lowestObservedDocumentMode = 0; } AnalyzerDataSession.prototype.initialize = function () { var _this = this; return this._dataWarehouse.getContextService().getGlobalContext().then(function (context) { return context.getTimeDomain(); }).then(function (timespan) { _this._totalDuration = { begin: parseInt(timespan.begin.value), end: parseInt(timespan.end.value) }; return _this.getFilteredResult(AnalyzerDataSession.GET_UITHREAD_ID_OPERATION); }).then(function (result) { _this._threadId = result.getResult(); return _this.getFilteredResult(AnalyzerDataSession.GET_LOWEST_OBSERVED_DOCUMENT_MODE_OPERATION); }).then(function (result) { _this._lowestObservedDocumentMode = result.getResult(); }); }; AnalyzerDataSession.prototype.close = function () { this._dataWarehouse.closeSynchronous(); }; AnalyzerDataSession.prototype.closeAsync = function () { return this._dataWarehouse.close(); }; AnalyzerDataSession.prototype.getTotalDuration = function () { return this._totalDuration; }; AnalyzerDataSession.prototype.initializeResources = function (resources) { var duration = new DiagnosticsHub.JsonTimespan(DiagnosticsHub.BigNumber.convertFromNumber(0), DiagnosticsHub.BigNumber.convertFromNumber(this._totalDuration.end)); return this.getFilteredResult(AnalyzerDataSession.INITIALIZE_RESOURCES_OPERATION, duration, resources); }; AnalyzerDataSession.prototype.queryEventIntervals = function (fromTime, toTime, sort, filter) { var duration = new DiagnosticsHub.JsonTimespan(DiagnosticsHub.BigNumber.convertFromNumber(fromTime), DiagnosticsHub.BigNumber.convertFromNumber(toTime)); var customData = { eventNameFilter: filter && filter.eventNameFilter, minDuration: filter && filter.filterNegligibleUIActivities ? filter.filterNegligibleUIActivities.toString() : "0", sort: sort.toString(), filterBackgroundActivities: filter && filter.filterBackgroundActivities ? "true" : "false", filterFrames: filter && filter.filterFrames ? "true" : "false", filterMeasures: filter && filter.filterMeasures ? "true" : "false", filterNetworkActivities: filter && filter.filterNetworkActivities ? "true" : "false", filterUIActivities: filter && filter.filterUIActivities ? "true" : "false" }; return this.getFilteredResult(AnalyzerDataSession.QUERY_EVENT_INTERVALS, duration, customData); }; AnalyzerDataSession.prototype.queryCPUUsage = function (fromTime, toTime, granularity) { var duration = new DiagnosticsHub.JsonTimespan(DiagnosticsHub.BigNumber.convertFromNumber(fromTime), DiagnosticsHub.BigNumber.convertFromNumber(toTime)); var customData = { granularity: granularity.toString() }; return VisualProfiler.Graphs.DataUtilities.getFilteredResult(this._dataWarehouse, AnalyzerDataSession.TIMELINE_ANALYZER_CLASSID, AnalyzerDataSession.CPU_USAGE_COUNTERID, duration, customData).then(function (data) { var cpuUsage; if (data && data.p) { cpuUsage = data.p.map(function (cpuPoint) { var time = new DiagnosticsHub.BigNumber(cpuPoint.t.h, cpuPoint.t.l); return { category: cpuPoint.c, time: parseInt(time.value), utilization: cpuPoint.u }; }); } return cpuUsage; }); }; AnalyzerDataSession.prototype.queryFrameRate = function (fromTime, toTime) { var duration = new DiagnosticsHub.JsonTimespan(DiagnosticsHub.BigNumber.convertFromNumber(fromTime), DiagnosticsHub.BigNumber.convertFromNumber(toTime)); return VisualProfiler.Graphs.DataUtilities.getFilteredResult(this._dataWarehouse, AnalyzerDataSession.TIMELINE_ANALYZER_CLASSID, AnalyzerDataSession.FRAME_RATE_COUNTERID, duration).then(function (data) { var frameRate; if (data && data.p) { frameRate = data.p.map(function (fpsPoint) { var time = new DiagnosticsHub.BigNumber(fpsPoint.t.h, fpsPoint.t.l); return { fps: fpsPoint.v, time: parseInt(time.value) }; }); } return frameRate; }); }; AnalyzerDataSession.prototype.queryMarkEvents = function (fromTime, toTime, category) { var duration = new DiagnosticsHub.JsonTimespan(DiagnosticsHub.BigNumber.convertFromNumber(fromTime), DiagnosticsHub.BigNumber.convertFromNumber(toTime)); var counterId; if (category === 0) { counterId = AnalyzerDataSession.LIFE_CYCLE_MARKS_COUNTERID; } else { counterId = AnalyzerDataSession.USER_MARKS_COUNTERID; } return VisualProfiler.Graphs.DataUtilities.getFilteredResult(this._dataWarehouse, AnalyzerDataSession.TIMELINE_ANALYZER_CLASSID, counterId, duration).then(function (graphResult) { var markResult; if (graphResult && graphResult.p) { markResult = []; for (var i = 0; i < graphResult.p.length; i++) { var graphPoint = graphResult.p[i]; markResult.push({ time: new DiagnosticsHub.BigNumber(graphPoint.t.h, graphPoint.t.l), tooltip: graphPoint.tt }); } } return markResult; }); }; AnalyzerDataSession.prototype.getUIThreadId = function () { return this._threadId; }; AnalyzerDataSession.prototype.getLowestObservedDocumentMode = function () { return this._lowestObservedDocumentMode; }; AnalyzerDataSession.prototype.getFilteredResult = function (operation, timespan, customData) { var contextData = { timeDomain: timespan, customDomain: { operation: operation } }; if (customData) { for (var key in customData) { if (customData.hasOwnProperty(key)) { contextData.customDomain[key] = customData[key]; } } } return this._dataWarehouse.getFilteredData(contextData, AnalyzerDataSession.TIMELINE_ANALYZER_CLASSID); }; AnalyzerDataSession.GET_UITHREAD_ID_OPERATION = "getUIThreadId"; AnalyzerDataSession.GET_LOWEST_OBSERVED_DOCUMENT_MODE_OPERATION = "getLowestObservedDocumentMode"; AnalyzerDataSession.INITIALIZE_RESOURCES_OPERATION = "initializeResources"; AnalyzerDataSession.QUERY_EVENT_INTERVALS = "queryEventIntervals"; AnalyzerDataSession.TIMELINE_ANALYZER_CLASSID = "3A649979-5A30-4542-A12F-1E0C09858804"; AnalyzerDataSession.CPU_USAGE_COUNTERID = "CPUUsage"; AnalyzerDataSession.FRAME_RATE_COUNTERID = "frameRate"; AnalyzerDataSession.LIFE_CYCLE_MARKS_COUNTERID = "lifeCycleMarks"; AnalyzerDataSession.USER_MARKS_COUNTERID = "userMarks"; return AnalyzerDataSession; })(); VisualProfiler.AnalyzerDataSession = AnalyzerDataSession; })(VisualProfiler || (VisualProfiler = {})); // MarkEventModel.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var MarkEventModel = (function () { function MarkEventModel(session) { this._session = session; } MarkEventModel.prototype.getMarkEvents = function (timeRange, category) { return this._session.queryMarkEvents(timeRange.begin.nsec, timeRange.end.nsec, category); }; MarkEventModel.prototype.getMarkTooltip = function (mark) { var tooltip = mark.toolTip; var time = parseInt(mark.timestamp.value); tooltip += Plugin.Resources.getString("RulerMarkTooltipLabel", VisualProfiler.FormattingHelpers.getPrettyPrintTime(VisualProfiler.TimeStamp.fromNanoseconds(time))); return tooltip; }; return MarkEventModel; })(); VisualProfiler.MarkEventModel = MarkEventModel; })(VisualProfiler || (VisualProfiler = {})); // ProfilingSource.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var DataWarehouseProfilerSource = (function () { function DataWarehouseProfilerSource(dataWarehouse) { this._dataWarehouse = dataWarehouse; } DataWarehouseProfilerSource.prototype.clean = function () { }; DataWarehouseProfilerSource.prototype.getDataSession = function () { var analyzerDataSession = new VisualProfiler.AnalyzerDataSession(this._dataWarehouse); return analyzerDataSession.initialize().then(function () { return analyzerDataSession; }); }; return DataWarehouseProfilerSource; })(); VisualProfiler.DataWarehouseProfilerSource = DataWarehouseProfilerSource; var EtlFileProfilingSource = (function () { function EtlFileProfilingSource(etlFilePath, isUserSpecifiedFile, analyzerDir) { this._etlFilePath = etlFilePath; this._isUserSpecifiedFile = isUserSpecifiedFile; if (analyzerDir) { this._analyzerDir = analyzerDir; if (this._analyzerDir.charAt(this._analyzerDir.length - 1) !== "\\") { this._analyzerDir += "\\"; } } } Object.defineProperty(EtlFileProfilingSource.prototype, "etlPath", { get: function () { return this._etlFilePath; }, enumerable: true, configurable: true }); EtlFileProfilingSource.prototype.clean = function () { if (this._dataWarehouseSource) { this._dataWarehouseSource.clean(); this._dataWarehouseSource = null; } if (Plugin.F12 && this._etlFilePath && !this._isUserSpecifiedFile) { var files = this._etlFilePath.split("|"); for (var i = 0; i < files.length; i++) { var etlFile = files[i]; if (etlFile) { Plugin.F12.deleteFile(etlFile); } } this._etlFilePath = null; } }; EtlFileProfilingSource.prototype.getDataSession = function () { var _this = this; var etwFileDataSourceInfo = { id: this._etlFilePath, identity: DiagnosticsHub.DataWarehouse.ResourceIdentity.EtlFile, type: 1 /* File */, path: this._etlFilePath }; var timelineAnalyzerConfig = { type: 2 /* Custom */, localDllPath: this.getAnalyzerPath("timeline.dll"), clsid: VisualProfiler.AnalyzerDataSession.TIMELINE_ANALYZER_CLASSID }; EtlFileProfilingSource._sessionId++; var dataWarehouseConfig = { sessionId: EtlFileProfilingSource.getSimpleGuid(EtlFileProfilingSource._sessionId), analyzers: [timelineAnalyzerConfig], dataSources: [etwFileDataSourceInfo], symbolCachePath: "", symbolStorePath: "" }; var promise; return new Plugin.Promise(function (completed, error, progress) { promise = DiagnosticsHub.DataWarehouse.loadDataWarehouse(dataWarehouseConfig).then(function (dataWarehouse) { _this._dataWarehouseSource = new DataWarehouseProfilerSource(dataWarehouse); return dataWarehouse.initialize(); }).then(function () { return _this._dataWarehouseSource.getDataSession(); }, error, function (value) { if (progress) { progress(value); } }).then(function (dataSession) { if (completed) { completed(dataSession); } }); }, function () { promise.cancel(); }); }; EtlFileProfilingSource.getSimpleGuid = function (val) { var emptyGuid = "00000000-0000-0000-0000-000000000000"; var lastPart = (val % 0xffffffffffff).toString(16); return emptyGuid.substr(0, emptyGuid.length - lastPart.length) + lastPart; }; EtlFileProfilingSource.prototype.getAnalyzerPath = function (file) { var path; if (this._analyzerDir) { path = this._analyzerDir + file; } else { path = file; } return path; }; EtlFileProfilingSource._sessionId = 0; return EtlFileProfilingSource; })(); VisualProfiler.EtlFileProfilingSource = EtlFileProfilingSource; })(VisualProfiler || (VisualProfiler = {})); // codeMarkerValues.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; (function (CodeMarkerValues) { CodeMarkerValues[CodeMarkerValues["perfBrowserTools_VisualProfilerResultsLoaded"] = 23573] = "perfBrowserTools_VisualProfilerResultsLoaded"; })(VisualProfiler.CodeMarkerValues || (VisualProfiler.CodeMarkerValues = {})); var CodeMarkerValues = VisualProfiler.CodeMarkerValues; })(VisualProfiler || (VisualProfiler = {})); // responsivenessNotifications.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var ResponsivenessNotifications = (function () { function ResponsivenessNotifications() { } ResponsivenessNotifications.DetailsPaneLoaded = "ResponsivenessNotifications.DetailsPaneLoaded"; ResponsivenessNotifications.GraphCollapsed = "ResponsivenessNotifications.GraphCollapsed"; ResponsivenessNotifications.GraphExpanded = "ResponsivenessNotifications.GraphExpanded"; ResponsivenessNotifications.GridRowSelected = "ResponsivenessNotifications.GridRowSelected"; ResponsivenessNotifications.GridScrolled = "ResponsivenessNotifications.GridScrolled"; ResponsivenessNotifications.GridUpdatedForFilter = "ResponsivenessNotifications.GridUpdatedForFilter"; ResponsivenessNotifications.GridUpdatedForTimeSelection = "ResponsivenessNotifications.GridUpdatedForTimeSelection"; ResponsivenessNotifications.ResetZoomFinished = "ResponsivenessNotifications.ResetZoomFinished"; ResponsivenessNotifications.ResultsLoaded = "ResponsivenessNotifications.ResultsLoaded"; ResponsivenessNotifications.SaveSessionFinished = "ResponsivenessNotifications.SaveSessionFinished"; ResponsivenessNotifications.SortFinishedOnGrid = "ResponsivenessNotifications.SortFinishedOnGrid"; ResponsivenessNotifications.UserSelectedTimeslice = "ResponsivenessNotifications.UserSelectedTimeslice"; ResponsivenessNotifications.ZoomInFinished = "ResponsivenessNotifications.ZoomInFinished"; return ResponsivenessNotifications; })(); VisualProfiler.ResponsivenessNotifications = ResponsivenessNotifications; })(VisualProfiler || (VisualProfiler = {})); // Program.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; (function (HostType) { HostType[HostType["VS"] = 0] = "VS"; HostType[HostType["F12"] = 1] = "F12"; HostType[HostType["Test"] = 2] = "Test"; })(VisualProfiler.HostType || (VisualProfiler.HostType = {})); var HostType = VisualProfiler.HostType; var ProgramEvents = (function () { function ProgramEvents() { } ProgramEvents.Resize = "resize"; ProgramEvents.Initialized = "initialized"; return ProgramEvents; })(); VisualProfiler.ProgramEvents = ProgramEvents; })(VisualProfiler || (VisualProfiler = {})); // Program.main.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var ProgramMain = (function () { function ProgramMain() { this._eventManager = new Plugin.Utilities.EventManager(); this._traceWriter = new Common.DefaultTraceWriter(); } Object.defineProperty(ProgramMain.prototype, "controller", { get: function () { return this._visualProfilerController; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "etwDataCollector", { get: function () { return this._etwDataCollector; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "hostType", { get: function () { return this._hostType; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "hostShell", { get: function () { return this._hostShell; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "packager", { get: function () { return this._packager; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "traceWriter", { get: function () { return this._traceWriter; }, enumerable: true, configurable: true }); Object.defineProperty(ProgramMain.prototype, "userSettings", { get: function () { return this._userSettings; }, enumerable: true, configurable: true }); ProgramMain.prototype.addEventListener = function (eventType, func) { if (eventType === VisualProfiler.ProgramEvents.Initialized && this._visualProfilerController) { var event = new Event(); event.controller = this._visualProfilerController; func(event); } else { this._eventManager.addEventListener(eventType, func); } }; ProgramMain.prototype.fireCodeMarker = function (codeMarker) { if (Plugin.VS && Plugin.VS.Internal && Plugin.VS.Internal.CodeMarkers) { Plugin.VS.Internal.CodeMarkers.fire(codeMarker); } }; ProgramMain.prototype.getHostSpecificString = function (resourceId) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } var _resourceId = resourceId + Common.Enum.GetName(VisualProfiler.HostType, this._hostType); return Plugin.Resources.getString(_resourceId, args); }; ProgramMain.prototype.main = function () { var _this = this; if (window.parent && window.parent.getExternalObj) { this._externalObj = window.parent.getExternalObj(); } else if (window.external) { this._externalObj = window.external; } if (Plugin.F12) { this._hostType = 1 /* F12 */; } else { this._hostType = 0 /* VS */; } Plugin.addEventListener("pluginready", function () { Plugin.Tooltip.defaultTooltipContentToHTML = false; if (Plugin.VS && Plugin.VS.Keyboard) { Plugin.VS.Keyboard.setZoomState(false); } var perfTrace; switch (_this.hostType) { case 0 /* VS */: _this._hostShell = new Common.Extensions.HostShellProxy(); perfTrace = Plugin.VS.Utilities.createExternalObject("PerformanceTraceExtension", "{D76A409F-7234-4B71-9BFD-DEF3DC4CCCA6}"); break; case 1 /* F12 */: _this._hostShell = new Common.Extensions.LocalHostShell(); _this._etwDataCollector = new Common.Data.F12EtwDataCollector(_this._externalObj.etwDataCollector); try { _this._packager = new Common.Data.F12Packager(_this._externalObj.packager); } catch (e) { _this._packager = null; } perfTrace = Plugin.F12.TraceWriter; break; default: throw new Error(Plugin.Resources.getErrorString("JSPerf.1056")); } if (perfTrace) { _this._traceWriter = new Common.TraceWriter(perfTrace); } VisualProfiler.Extensions.UserSettingsHelper.getUserSettings().then(function (userSettings) { _this._userSettings = userSettings; _this.initializeErrorReporting(); window.addEventListener("resize", _this.triggerResize.bind(_this)); _this._visualProfilerController = new VisualProfiler.VisualProfilerController(); if (Plugin.F12) { Plugin.F12.TraceWriter.markToolReady(); } _this._eventManager.dispatchEvent(VisualProfiler.ProgramEvents.Initialized); }); }); }; ProgramMain.prototype.initializeErrorReporting = function () { var _this = this; window.onerror = function (e, url, line) { var column; var additionalInfo; if (arguments && arguments[3] && typeof arguments[3] === "number") { column = arguments[3]; } if (arguments && arguments[4] && arguments[4] instanceof Error) { additionalInfo = "Error number: " + arguments[4].number; additionalInfo += "\r\nStack: " + arguments[4].stack; } else { additionalInfo = "Unhandled Error"; } _this.reportError(new Error(e), additionalInfo, url, line, column); return true; }; }; ProgramMain.prototype.removeEventListener = function (eventType, func) { this._eventManager.removeEventListener(eventType, func); }; ProgramMain.prototype.reportError = function (error, additionalInfo, source, line, column) { if (!this.userSettings.disableWER) { var message = (error.message || error.description); var url = source || "Visual Profiler"; var lineNumber = line || 0; var columnNumber = column || 0; var errorInfo = "Error description: " + message; if (error.number) { errorInfo += "\r\nError number: " + error.number; } if (source) { errorInfo += "\r\nSource: " + source; } if (error.stack) { var stack = error.stack; errorInfo += "\r\nError stack: " + stack; if (!message) { var index = stack.indexOf("\n"); if (index > 0) { index = Math.min(index, 50); message = stack.substring(0, index); } } if (typeof source === "undefined") { var matchInfo = stack.match(/(file|res):?([^)]+)\)/); if (matchInfo && matchInfo.length > 2) { url = matchInfo[2]; } } if (typeof line === "undefined") { matchInfo = stack.match(/line ?(\d+)/); if (!matchInfo || matchInfo.length <= 1) { matchInfo = stack.match(/js:?(\d+):/); } if (matchInfo && matchInfo.length > 1) { lineNumber = parseInt(matchInfo[1]); } } } if (additionalInfo) { errorInfo += "\r\nAdditional Info: " + additionalInfo; } Plugin.Diagnostics.reportError(message, url, lineNumber, errorInfo, columnNumber); } }; ProgramMain.prototype.triggerResize = function () { this._eventManager.dispatchEvent(VisualProfiler.ProgramEvents.Resize); }; return ProgramMain; })(); VisualProfiler.ProgramMain = ProgramMain; VisualProfiler.Program = new ProgramMain(); })(VisualProfiler || (VisualProfiler = {})); VisualProfiler.Program.main(); // VisualProfiler.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var DiagnosticsHub = Microsoft.VisualStudio.DiagnosticsHub; var VisualProfilerController = (function () { function VisualProfilerController() { var _this = this; this._toolbarViewModel = new VisualProfiler.ToolbarViewModel(this); if (VisualProfiler.Program.hostType === 1 /* F12 */) { this._view = new VisualProfiler.F12.VisualProfilerView(this, this._toolbarViewModel); Plugin.F12.addEventListener("activated", function () { return _this.onToolActivated(); }); this.onToolActivated(); var external = window.external; external.addEventListener("detach", function () { _this._toolbarViewModel.stopProfiling(); }); external.addEventListener("closing", function () { if (_this._session) { _this._session.close(); _this._session = null; } _this.deleteEtlFile(); VisualProfiler.Program.etwDataCollector.stopCollection(); }); } else { this._view = new VisualProfiler.VS.VisualProfilerView(this); DiagnosticsHub.DataWarehouse.loadDataWarehouse().done(function (dataWarehouse) { _this._view.setSource(new VisualProfiler.DataWarehouseProfilerSource(dataWarehouse)); }); } } Object.defineProperty(VisualProfilerController.prototype, "globalRuler", { get: function () { return this._globalRuler; }, enumerable: true, configurable: true }); Object.defineProperty(VisualProfilerController.prototype, "toolbarViewModel", { get: function () { return this._toolbarViewModel; }, enumerable: true, configurable: true }); Object.defineProperty(VisualProfilerController.prototype, "view", { get: function () { return this._view; }, enumerable: true, configurable: true }); VisualProfilerController.prototype.initializeSession = function (source) { var _this = this; this._profilingSource = source; var promise; return new Plugin.Promise(function (completed, error, progress) { promise = _this._profilingSource.getDataSession().then(function (session) { _this._session = session; return _this.initializeResources(); }, error, function (prog) { if (progress) { progress({ totalStages: prog.stageCount, currentStage: prog.currentStage, errCode: prog.result, isCompleted: prog.finished, max: prog.maxValue, value: prog.progressValue }); } }).then(function () { if (_this._globalRuler) { _this._globalRuler.deinitialize(); } var totalDuration = _this._session.getTotalDuration(); _this._globalRuler = new VisualProfiler.GlobalRuler(new VisualProfiler.TimeSpan(VisualProfiler.TimeStamp.fromNanoseconds(totalDuration.begin), VisualProfiler.TimeStamp.fromNanoseconds(totalDuration.end))); _this._toolbarViewModel.setGlobalRuler(_this._globalRuler); var markEventModel = new VisualProfiler.MarkEventModel(_this._session); var eventTimelineModel = new VisualProfiler.EventsTimelineModel(_this._session); var eventTimelineViewModel = new VisualProfiler.EventsTimelineViewModel(eventTimelineModel, _this._globalRuler, markEventModel); var lowestObservedDocumentMode = _this._session.getLowestObservedDocumentMode(); if (VisualProfiler.Program.hostType === 1 /* F12 */) { var swimlanesViewModel = new VisualProfiler.F12.SwimlanesViewModel(_this._globalRuler, markEventModel, _this._session, VisualProfilerController.LEFT_RIGHT_PADDING, VisualProfilerController.LEFT_RIGHT_PADDING, _this._toolbarViewModel); var swimlanesConfiguration = new VisualProfiler.F12.SwimlaneConfigurations(); swimlanesViewModel.graphConfigs = swimlanesConfiguration.configurations; if (completed) { completed({ eventsTimelineViewModel: eventTimelineViewModel, globalRuler: _this._globalRuler, swimlanesViewModel: swimlanesViewModel, lowestObservedDocumentMode: lowestObservedDocumentMode }); } } else { if (completed) { completed({ eventsTimelineViewModel: eventTimelineViewModel, globalRuler: _this._globalRuler, lowestObservedDocumentMode: lowestObservedDocumentMode }); } } }, error); }, function () { promise.cancel(); }); }; VisualProfilerController.prototype.startProfiling = function () { var _this = this; if (!this._collectionSession) { return this.closeSession().then(function () { Plugin.F12.Profiler.notifyOnStartProfiling(); return VisualProfiler.Program.etwDataCollector.startSession("JavaScriptCollectionAgent.dll", "{8A4373D6-07CA-476E-876F-21E303CB7CF5}").then(function (s) { _this._collectionSession = s; _this._view.onProfilingStarted(); }, function (err) { Plugin.F12.Profiler.notifyOnStopProfiling(); _this._view.onProfilingStartFailed(err); throw err; }); }); } return Plugin.Promise.as(null); }; VisualProfilerController.prototype.stopProfiling = function () { var _this = this; if (this._collectionSession) { this._view.onProfilingStopping(); return this._collectionSession.stop().then(function (file) { Plugin.F12.Profiler.notifyOnStopProfiling(); _this._collectionSession = null; return _this._view.setSource(new VisualProfiler.EtlFileProfilingSource(file, false)); }, function (err) { _this._collectionSession = null; _this._view.onProfilingStopFailed(err); throw err; }); } return Plugin.Promise.as(null); }; VisualProfilerController.prototype.openSession = function (stream) { var _this = this; return new Plugin.Promise(function (completed, error) { try { VisualProfiler.Program.packager.openPackage(stream.streamId); if (!VisualProfiler.Program.packager.hasToolData(Common.Constants.UI_RESPONSIVENESS_TOOL_GUID)) { throw new Error(Plugin.Resources.getErrorString("JSPerf.1076")); } _this.closeSession().then(function () { var resourcePath = VisualProfiler.Program.packager.getResourcePathsByType(VisualProfilerController.ETL_RESOURCE_TYPE); VisualProfiler.Program.packager.closePackage(); _this._view.onProfilingStopping(); _this.toolbarViewModel.openSessionEnabled = true; _this.toolbarViewModel.saveSessionEnabled = true; _this.toolbarViewModel.startProfilingEnabled = true; _this.toolbarViewModel.collectionState = 3 /* Interactive */; _this._view.setSource(new VisualProfiler.EtlFileProfilingSource(resourcePath.join("|"), true)); if (completed) { completed(); } }); } catch (e) { VisualProfiler.Program.packager.closePackage(); if (error) { error(e); } } }); }; VisualProfilerController.prototype.saveSession = function (stream) { var _this = this; return new Plugin.Promise(function (completed, error) { var pathsToEtl; if (_this._profilingSource instanceof VisualProfiler.EtlFileProfilingSource) { pathsToEtl = _this._profilingSource.etlPath.split("|"); } else { throw new Error(Plugin.Resources.getString("WrongDataSource")); } try { var tempPath = VisualProfiler.Program.packager.createPackage(Common.Constants.UI_RESPONSIVENESS_TOOL_GUID); for (var i = 0; i < pathsToEtl.length; ++i) { VisualProfiler.Program.packager.addResource(VisualProfilerController.ETL_RESOURCE_TYPE, pathsToEtl[i], VisualProfilerController.ETL_SAVE_NAME + i + ".etl"); } VisualProfiler.Program.packager.commit(); Plugin.F12.copyFileToStream(tempPath, stream.streamId); return stream.close().then(function () { try { Plugin.F12.deleteFile(tempPath); if (completed) { completed(); } } catch (e) { if (error) { error(e); } } }); } catch (e) { if (error) { error(e); } } }); }; VisualProfilerController.prototype.closeSession = function () { var _this = this; if (this._session) { this._view.resetSource(); return this._session.closeAsync().then(function () { _this._session = null; _this.deleteEtlFile(); }, function (error) { _this._session = null; throw error; }); } return Plugin.Promise.as(null); }; VisualProfilerController.prototype.deleteEtlFile = function () { if (this._profilingSource) { this._profilingSource.clean(); } }; VisualProfilerController.prototype.initializeResources = function () { var resources = {}; var keys = [ "AnimationFrame", "CssCalculation", "CssParsing", "DDTrackDomSet", "DDTrackerSetStyleContextName", "DomEvent", "EvaluatingScript", "EventHandler", "Frame", "GarbageCollection", "HtmlParsing", "HtmlSpeculativeDownloading", "HttpRequest", "Idle", "ImageDecoded", "InlineScriptLabel", "InlineStylesheetLabel", "Layout", "Measure", "MediaQueryListener", "MutationObserver", "Paint", "RenderLayer", "TASK_DocumentResize", "TASK_DoEnReNo", "TASK_DoInsElm", "TASK_Fi", "TASK_FiCmpFmt", "TASK_LineBox", "TASK_PageFrame", "TASK_TableBox", "TASK_TextBlock", "TimerFired", "UnknownElement", "WindowsRuntimeAsyncCallback", "WindowsRuntimeEvent" ]; keys.forEach(function (key) { var value = Plugin.Resources.getString(key); value = VisualProfiler.FormattingHelpers.convertFormatString(value); resources[key] = value; }); return this._session.initializeResources(resources); }; VisualProfilerController.prototype.onToolActivated = function () { var isAtBreakpoint = Plugin.F12.Debugger.getIsAtBreakpoint(); this._toolbarViewModel.isAtBreakpoint = isAtBreakpoint; }; VisualProfilerController.LEFT_RIGHT_PADDING = 34; VisualProfilerController.ETL_RESOURCE_TYPE = "DiagnosticsHub.Resource.EtlFile"; VisualProfilerController.ETL_SAVE_NAME = "Trace"; return VisualProfilerController; })(); VisualProfiler.VisualProfilerController = VisualProfilerController; })(VisualProfiler || (VisualProfiler = {})); // VisualProfilerView.ts var VisualProfiler; (function (VisualProfiler) { "use strict"; var VisualProfilerView = (function () { function VisualProfilerView(mainViewTemplate, controller) { this.controller = controller; var container = document.getElementById("mainContainer"); var mainContainer = new Common.Controls.Legacy.Control(container); this.mainView = new Common.Controls.Legacy.TemplateControl(mainViewTemplate); mainContainer.appendChild(this.mainView); this.dataViewContainer = this.mainView.findElement("dataViewContainer"); this.detailedViewsContainer = this.mainView.findElement("detailedViewsContainer"); this.eventsTimelineView = new VisualProfiler.EventsTimelineView(this.mainView.findElement("timelineViewContainer").id); this._warningView = this.mainView.findElement("warningView"); this._warningView.style.display = "none"; this._warningMessage = this.mainView.findElement("warningMessage"); } VisualProfilerView.prototype.onProcessingStarting = function () { }; VisualProfilerView.prototype.onProcessingCompleted = function () { }; VisualProfilerView.prototype.onProcessingFailed = function (error) { }; VisualProfilerView.prototype.onProcessingProgress = function (progress) { }; VisualProfilerView.prototype.onProfilingStarted = function () { }; VisualProfilerView.prototype.onProfilingStartFailed = function (err) { }; VisualProfilerView.prototype.onProfilingStopping = function () { }; VisualProfilerView.prototype.onProfilingStopFailed = function (err) { }; VisualProfilerView.prototype.setSource = function (source) { var _this = this; VisualProfiler.Program.traceWriter.raiseEvent(105 /* Timeline_LoadGraphs_Start */); this.onProcessingStarting(); this._warningView.style.display = "none"; return this.controller.initializeSession(source).then(function (result) { _this.onProcessingCompleted(); _this.detailedViewsContainer.style.display = ""; if (result.lowestObservedDocumentMode < Common.Constants.MINIMUM_REQUIRED_DOCUMENT_MODE) { _this._warningMessage.innerText = VisualProfiler.Program.getHostSpecificString("WarningIncompatibleStandardsMode"); _this._warningView.style.display = "block"; } _this.setupAnalysisView(result); }, function (error) { _this.onProcessingFailed(error); _this.showError(new Error(Plugin.Resources.getString("GenericDataProcessingError", error.message))); VisualProfiler.Program.reportError(error, Plugin.Resources.getString("GenericDataProcessingError")); }, function (progress) { _this.onProcessingProgress(progress); }); }; VisualProfilerView.prototype.setupAnalysisView = function (result) { this.setupAnalysisViewOverride(result); this.eventsTimelineView.viewModel = result.eventsTimelineViewModel; this.eventsTimelineView.viewModel.resetFilter(); this.eventsTimelineView.render().done(function () { VisualProfiler.Program.fireCodeMarker(23573 /* perfBrowserTools_VisualProfilerResultsLoaded */); Notifications.notify(VisualProfiler.ResponsivenessNotifications.ResultsLoaded); VisualProfiler.Program.traceWriter.raiseEvent(106 /* Timeline_LoadGraphs_Stop */); }); }; VisualProfilerView.prototype.setupAnalysisViewOverride = function (result) { }; VisualProfilerView.prototype.showError = function (error, helpUrl) { }; VisualProfilerView.prototype.resetSource = function () { this.eventsTimelineView.viewModel = null; }; return VisualProfilerView; })(); VisualProfiler.VisualProfilerView = VisualProfilerView; })(VisualProfiler || (VisualProfiler = {})); // VisualProfilerView.f12.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var VisualProfiler; (function (VisualProfiler) { (function (F12) { "use strict"; var VisualProfilerView = (function (_super) { __extends(VisualProfilerView, _super); function VisualProfilerView(controller, toolbarViewModel) { _super.call(this, "mainViewTemplateF12", controller); this.toolbarViewModel = toolbarViewModel; this.dataViewContainer.style.display = "none"; this.detailedViewsContainer.style.display = "none"; this._progress = this.mainView.findElement("progress"); this._progressContainer = this.mainView.findElement("progressContainer"); this._progressContainer.setAttribute("aria-label", Plugin.Resources.getString("AnalyzeDataStatus")); this._progressContainer.style.display = "none"; this._profilingInProgress = false; this._profilingFailed = false; var progressText = this.mainView.findElement("progressText"); progressText.innerText = Plugin.Resources.getString("AnalyzeDataStatus"); this._toolbarControl = new VisualProfiler.VisualProfilerToolbarControl(); this._toolbarControl.model = toolbarViewModel; this.mainView.findElement("toolbarViewContainer").appendChild(this._toolbarControl.rootElement); this._profilingPrompt = this.mainView.findElement("profilingPrompt"); this._profilingLink = this.mainView.findElement("profilingLink"); this._profilingProgress = this.mainView.findElement("profilingProgress"); this._profilingProgress.style.display = "none"; this.setProfilingLinkText(Plugin.Resources.getString("F12StartProfilingMessage")); var clickHandler = this.onProfilingLinkClick.bind(this); this._profilingLink.addEventListener("click", clickHandler); this._profilingLink.addEventListener("keydown", clickHandler); this._swimLanesView = new F12.SwimlanesView(this.mainView.findElement("swimLanesViewContainer").id); Plugin.F12.addEventListener("keydown", this.shortcutHandler.bind(this)); document.addEventListener("keydown", this.shortcutHandler.bind(this)); Plugin.F12.addEventListener("browsershortcut", this.shortcutHandler.bind(this)); this._toolbarViewModel.openSessionEnabled = VisualProfiler.Program.packager !== null; this.updateNavigationFrames(true); Common.NavigationUtilities.registerFocusHandlers(Plugin.F12.PluginId.VisualProfiler); } Object.defineProperty(VisualProfilerView.prototype, "toolbarViewModel", { get: function () { return this._toolbarViewModel; }, set: function (model) { this.unregisterToolbarViewModelEvents(); this._toolbarViewModel = model; this.registerToolbarViewModelEvents(); }, enumerable: true, configurable: true }); VisualProfilerView.prototype.onProcessingStarting = function () { this._progressSoFar = 0; this._progressStageNumber = 0; this._progress.value = 0; this._progress.max = 100; this.detailedViewsContainer.style.display = "none"; this._progressContainer.style.display = ""; }; VisualProfilerView.prototype.onProcessingCompleted = function () { this._progressContainer.style.display = "none"; }; VisualProfilerView.prototype.onProcessingFailed = function (error) { this._progressContainer.style.display = "none"; if (this._profilingPrompt) { this._profilingPrompt.style.display = ""; this.setProfilingLinkText(Plugin.Resources.getString("F12StartProfilingMessage")); } }; VisualProfilerView.prototype.onProcessingProgress = function (progress) { if (this._progressStageNumber !== progress.currentStage) { this._progressStageNumber = progress.currentStage; this._progressSoFar = this._progress.value; } var stagePercentage = (progress.value / progress.max) * 100; var stageTotalContribution = stagePercentage / progress.totalStages; this._progress.value = this._progressSoFar + stageTotalContribution; }; VisualProfilerView.prototype.onProfilingStarted = function () { this._profilingFailed = false; this._profilingInProgress = true; this.dataViewContainer.style.display = "none"; this._profilingPrompt.style.display = ""; this.setProfilingLinkText(Plugin.Resources.getString("F12StopProfilingMessage")); this._profilingProgress.style.display = ""; }; VisualProfilerView.prototype.onProfilingStartFailed = function (err) { this._profilingFailed = true; this._profilingInProgress = false; this._profilingProgress.style.display = "none"; this.dataViewContainer.style.display = "none"; this._profilingPrompt.style.display = ""; this.setProfilingLinkText(Plugin.Resources.getString("F12StartProfilingMessage")); var helpUrl = err.message === "-2147221164" ? "http://go.microsoft.com/fwlink/?LinkID=306020" : null; this.showError(new Error(Plugin.Resources.getString("GenericDataProcessingError", err.message)), helpUrl); }; VisualProfilerView.prototype.onProfilingStopping = function () { this._profilingInProgress = false; this._profilingProgress.style.display = "none"; this.dataViewContainer.style.display = ""; this._profilingPrompt.style.display = "none"; this.detailedViewsContainer.style.display = "none"; this._progress.value = 0; this._progressContainer.style.display = ""; this._progressContainer.focus(); }; VisualProfilerView.prototype.onProfilingStopFailed = function (err) { this._profilingFailed = true; this.dataViewContainer.style.display = "none"; this._profilingPrompt.style.display = ""; this.setProfilingLinkText(Plugin.Resources.getString("F12StartProfilingMessage")); this.showError(new Error(Plugin.Resources.getString("GenericDataProcessingError", err.message))); this.updateNavigationFrames(true); }; VisualProfilerView.prototype.registerToolbarViewModelEvents = function () { if (this.toolbarViewModel) { this._toolbarViewModelPropertyChangedEvtReg = this.toolbarViewModel.propertyChanged.addHandler(this.onToolbarViewModelPropertyChanged.bind(this)); } }; VisualProfilerView.prototype.setupAnalysisViewOverride = function (result) { var _this = this; this._swimLanesView.viewModel = result.swimlanesViewModel; this._swimLanesView.render(); window.setImmediate(function () { VisualProfiler.Program.triggerResize(); _this._swimLanesView.focusOnRuler(); _this.updateNavigationFrames(false); }); }; VisualProfilerView.prototype.showError = function (error, helpUrl) { Plugin.F12.ErrorDisplay.show(error.message, null, helpUrl); }; VisualProfilerView.prototype.unregisterToolbarViewModelEvents = function () { if (this._toolbarViewModelPropertyChangedEvtReg) { this._toolbarViewModelPropertyChangedEvtReg.unregister(); this._toolbarViewModelPropertyChangedEvtReg = null; } }; VisualProfilerView.prototype.onProfilingLinkClick = function (event) { if (this.controller && (event.type === "click" || event.keyCode === 13 /* Enter */ || event.keyCode === 32 /* Space */)) { this.toggleProfiling(); } }; VisualProfilerView.prototype.onToolbarViewModelPropertyChanged = function (propertyName) { switch (propertyName) { case VisualProfiler.ToolbarViewModel.StartProfilingEnabledPropertyName: if (!this._profilingInProgress) { this.updateProfilingLinkState(!this.toolbarViewModel.isAtBreakpoint); } break; case VisualProfiler.ToolbarViewModel.StopProfilingEnabledPropertyName: if (this._profilingInProgress) { this.updateProfilingLinkState(!this.toolbarViewModel.isAtBreakpoint); } break; } }; VisualProfilerView.prototype.shortcutHandler = function (event) { if (event.ctrlKey && !event.shiftKey && !event.altKey) { if (event.keyCode === 69 /* E */) { this.toggleProfiling(); } else if (this.toolbarViewModel.saveSessionEnabled && event.keyCode === 83 /* S */) { this.toolbarViewModel.saveSession(); } else if (this.toolbarViewModel.openSessionEnabled && event.keyCode === 79 /* O */) { this.toolbarViewModel.openSession(); } } }; VisualProfilerView.prototype.toggleProfiling = function () { if (this._profilingInProgress && this.toolbarViewModel.stopProfilingEnabled) { this.toolbarViewModel.stopProfiling(); } else if (this.toolbarViewModel.startProfilingEnabled) { this._profilingFailed = false; this.toolbarViewModel.startProfiling(); this.updateNavigationFrames(true); } }; VisualProfilerView.prototype.setProfilingLinkText = function (linkText) { this._profilingLink.innerText = linkText; this._profilingLink.setAttribute("aria-label", linkText); }; VisualProfilerView.prototype.updateProfilingLinkState = function (enabled) { if (enabled) { this._profilingLink.style.display = ""; if (!this._profilingFailed) { Plugin.F12.ErrorDisplay.close(); } } else { this._profilingLink.style.display = "none"; Plugin.F12.ErrorDisplay.show(Plugin.Resources.getString("VisualProfilerDisabledAtBreakpoint")); } }; VisualProfilerView.prototype.updateNavigationFrames = function (toolbarOnly) { var _this = this; var navigationFrames = [ Common.NavigationUtilities.makeNavigationFrameFromCallback(document.body, function () { return _this._toolbarControl.getActiveElement(); }) ]; if (!toolbarOnly) { navigationFrames.push(Common.NavigationUtilities.makeNavigationFrameFromCallback(this.mainView.findElement("timelineViewContainer"), function () { return document.getElementById("timelineSortSelector"); })); } Common.NavigationUtilities.registerNavigationFrames(navigationFrames); }; return VisualProfilerView; })(VisualProfiler.VisualProfilerView); F12.VisualProfilerView = VisualProfilerView; })(VisualProfiler.F12 || (VisualProfiler.F12 = {})); var F12 = VisualProfiler.F12; })(VisualProfiler || (VisualProfiler = {})); // VisualProfilerView.vs.ts var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var VisualProfiler; (function (VisualProfiler) { (function (VS) { "use strict"; var VisualProfilerView = (function (_super) { __extends(VisualProfilerView, _super); function VisualProfilerView(controller) { _super.call(this, "mainViewTemplateVS", controller); } VisualProfilerView.prototype.setupAnalysisViewOverride = function (result) { VisualProfiler.Program.triggerResize(); }; VisualProfilerView.prototype.showError = function (error, helpUrl) { var errorView = new Common.Controls.Legacy.TemplateControl("errorViewTemplate"); var errorMessageDiv = errorView.findElement("errorMessage"); errorMessageDiv.innerText = error.message; this.mainView.rootElement.innerHTML = ""; this.mainView.rootElement.appendChild(errorView.rootElement); }; return VisualProfilerView; })(VisualProfiler.VisualProfilerView); VS.VisualProfilerView = VisualProfilerView; })(VisualProfiler.VS || (VisualProfiler.VS = {})); var VS = VisualProfiler.VS; })(VisualProfiler || (VisualProfiler = {})); PNG  IHDRh6gAMA a pHYsktEXtSoftwarePaint.NET v3.5.100rX,qVo:ML.P$jSV+zeǸ<J_e 5RL="P 9AAuj#^?74f<:Sg (VK}oX4rNZ¸N(/VSf (0WMͺr6@x*@wb +rx(9UPv ~cw? BʕSА Ȁ Ȁ  o*(&ܱ7$_N pR#OS$ԯF&c,$ I#"(֟P٧U#?Ө[pu౐cQSY% r%lb{QJg=3T@r={" nغGo?:1v+Ǩ_93 Ȁ €c4<Ɨ,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV}\>?}cdgMO}{|_N#fYئr3 #~pAsƐh~Ƹ\ &C8=-1 ^(b(NׄbPwduTEviX# PhTLɒ7F9:z*fג\jS f&S(^?2UByYZXbΟN^́ $wR5]S/l/bRzr!,Oڡ24;Vpjj8`U.]FCWvc!LCH-ߵ>IOYQ4ũB6N/@yxpjuU'ԘLCU*0$gZP cj ߫bq 2b///ϯGְª~ue[X`!Ouwl,Ygl! a|ș1UiISL U:>cLUb(5 5|MM꨸#el*}vGQ1)(-@S1)M]S ^z4#@dT u U/41ACUzQbnd.S f:Sh3Z4c5 Bz{{kFwYO0\/lzR:*&MR-6tA0>>CSYiGR ⏻Mua@?4kJYt.kfC6:3y1+xŬ Hb2MMqPJ?EP:d8`Y U#TP#a{Qjȋ|2P c2/S9\zIENDB`PNG  IHDR$l gAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV"M .# pVf!F.#A B:5[H;@3sfLMZҒ.>@!U$pүXw&fKbaf YBgT\'eٖ Su(Yp_?tM<iFQ.JbnJ:ԙf^CUtbnC^t׳A(w)u+].>aGzQs$M,a2}Xm:E%z,Ű'~7-JucaZO[.wlt(F`y1VŬ H>fl.rW\D :f ZQ8zWTRuJ? 5=,K]P%/BA} ~YIENDB`PNG  IHDR((mgAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV@KiH2܏;}0N.wv2Mz_ZJyy3N,τ#e]ƻA73<^4"f}#ZJU,Or@ טpQ'^?   4o` /T(%t?%r \s"?e1>c<,:GDzR;Z/B1680$sb| jߘYiCH;-05*9 (hHjrn5GiP m Fi fp51(mچ\*J[6A&h(?e+mچܪ_i 6<^J[I|1a=m y !")]S­= ooxa w*Ff rd| \ZIݧv{^ 9A䵆|[$횏`/ŸLzvIENDB`PNG  IHDR((mgAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEVbH.("*!6* boߜvݍǽ93s3wf"N5r"6XN (ކD"ĵJ#:D+q$K\am&%bD狠F`t-4ךDgmtz^/ 3&;(crȒ A#F`eL\ϠxF|ߟt~\DV\dk*9H`@$$UfՊqDJӴf1hGԩD&Ljr~\PU Bugh.JkPF,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV{|^{dJDH4KDFjooPa crggg+`ZYi8t6|Lp Z`ry'|7?Am"4saV`<'Q >X -}^!]g(<lTPG`^5K@k}t!!du)H.3L![ɫ93 t&]g qZS9PF)j𖁦~Y_!m$Úl/vyBPº;c`Y=DnY0ښR S|~ vlN%mAS)U<Πo's0= s!kWh2;U<Πp8:UNcզiKት2;U<ΠPn.NcvNnt΀uեOkGE -̺QPM[hfѾ HVXE5O E MOG)U<ΠN>ʹiSׁ꣗ZkJU<748 )ZLw{ W<@ṝ']XHHT_ۋUށ0кqe$ELTG!aetKOPpk0z@9xІBj۠gE|nˠp0J㌘({)hM =1|_yI!o4+( bym&ev|!o@vry" 5)]Zk8Et yCxu]DXI!t,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEV@d&5AB^p~\€;(op~\„Npu߇GP Vw>)sWK I}iFr*, R"4XJKd7ϛ"tIENDB`PNG  IHDR((mgAMA|Q cHRMR@}y<s,٩<9SbL!GĈ 3,F0+7T3IlpX"61"H _qW,d ėrIKst.ښAdp&+g]RәY2EE44432PuoJEzg`̉j- -b8o׿M]9La.+-%Mȧg3YះuAxEK i<:ŹPcu*@~(  ]o0 ~y*s7g%9%(3H*@C`-pn VH@ A1 jPA3hA'8΃Kn`Lg` a!2D!H҇ dAP B Byf*z: @]h ~L CUp΅ p%;56< ?" GxG iE>&2 oQEGlQP UFFuzQ7QcYG4G۠t]nB/o'Я1 xb"1I>Lf3bX} *QYvGĩp( &q x)&gsF|7:~@&h!$&B%pH$D.q#xx8F|K!\H$!i.%L";r3EHK-AFCbH$^RSIrdd 3Rx)-))zR#RsiSiT#Wd2Z2n2l2d)EBaQ6S))T UEMSPgeedɆfȞ!4--VJ;N g%K-sɵݖ{'OwO%)P_RRۥEK/+))U<د8䡔TtAiF쨜\|FyZbU)W9.Kw+YUEUOUjꂚZZZCu:C=^\G}VCEO#OE&^WOs^K[+\kV֔vv[]n>z^^u}XROm`m3h01$:fь|:kG23hbabhrT4ߴw3=3Y-s.q_vǂbgբ⃥%߲rJ*֪jAe0JOY6rvvtXLǎl&I']$NϝM.6.\ι"En2nnn[g=,=t٪E2}4\j5loDŽǞ~q=''Z^utv&vvEv >mяN9-{ LOgsΝK?7s>xOL n\x }N}g/]>uɫ,u[dS@u]7ot.<30tKn]p;;SwSyoEVߧY;{|ӳ{<+HRyMODDOx#D8#F700z.꠆>8#BJ|ay>@*k0ۆZ.3B`a wPo^'#\N$ q; _ ͠%$܇tFq`'JSji+n›졏N$b]qp]Қ>=AHMw58Q NКʁ'rq8+Dw6  0'w T[SyA"ooƎJԩ`q,<kU83(T)w{Օ] uM]Bٱ q&yPocզikk6;V<ΠPfAεj{㰮i}jQ!&*%k3ѱ Hb+ҍ6vT&)e8 YSyab6ӋWeqǢNT/5po ipPSΕML w2c½VkQ.3)h<<+O%hZ5Bu 7TꙪNlӍ_D E.,OqF(8 NCR \e|6 ^ zI ptV< y֤#Y+g:w&,ґry!OrlOevl!o@vry# 5)]ZkVLEtg YC<AHF7r7S}tu q ^g8d .3XO}Rw>8#+(I9tGIqu[8#5'|w?#~5<ȱ܂*8#*o; if*  f>IENDB`PNG  IHDR6l!PAL pHYs  ;ViTXtXML:com.adobe.xmp xmp.did:884044a4-01c3-bb4e-bf37-18645344f0a9 xmp.did:3648D7FE668411E3A6DCC04D67A67AC1 xmp.iid:d8cfe54b-033c-f542-9c41-293a693abca3 xmp.iid:3f152a30-4c89-2240-bf59-8567b350b73c xmp.did:884044a4-01c3-bb4e-bf37-18645344f0a9 saved xmp.iid:b269f4f9-7bd2-5c4e-850c-68fd89965ab8 2013-12-19T13:45:58-08:00 Adobe Photoshop CC (Windows) / saved xmp.iid:d8cfe54b-033c-f542-9c41-293a693abca3 2013-12-19T15:26:02-08:00 Adobe Photoshop CC (Windows) / Adobe Photoshop CC (Windows) 2013-12-19T13:44:20-08:00 2013-12-19T15:26:02-08:00 2013-12-19T15:26:02-08:00 image/png 3 1 720000/10000 720000/10000 2 65535 54 108 K cHRMz%u0`:o_FIDATx;0{'W ĹHK=¶[6[9M6'0|ErC7PH+6-<8Ϊfj#]ۂ<ϓMcLF C}Ot{v Ps,&\r(7r+S Py/pX7,co.Koy܂ ?xmY("ST+m+o};|mmC$DiMƘ51fYUXT͹-tʲӏ^?3ƜvS[{40k, 5gKMm5s%#F0`5h 5菷d7aѡBN"%TPUA@^C10,W[c*9oOY _JҠ[ODT˵}iZ%Dd`sW+/D*Oͼt`A/kp[cA*|kYqlH0As''r&6α Hq`#F0Z͢(\J)j5jJdfQQ5ht ò7r+w(TQ xhJ=.1~Z=4hҴT5KNi7Ak{K E Zk2&Xk]*N4h<4,ˠ֠GhM0`wFYڿ|tjIENDB`PNG  IHDR$l  pHYs+9iTXtXML:com.adobe.xmp Adobe Photoshop CC (Windows) 2014-03-24T13:19:38-07:00 2014-04-09T14:18:39-07:00 2014-04-09T14:18:39-07:00 image/png 3 xmp.iid:418a4e0c-0985-2449-99e0-9fa5cdaec595 xmp.did:813d0a70-360f-3643-b17d-373e84eb3788 xmp.did:813d0a70-360f-3643-b17d-373e84eb3788 created xmp.iid:813d0a70-360f-3643-b17d-373e84eb3788 2014-03-24T13:19:38-07:00 Adobe Photoshop CC (Windows) saved xmp.iid:418a4e0c-0985-2449-99e0-9fa5cdaec595 2014-04-09T14:18:39-07:00 Adobe Photoshop CC (Windows) / 1 960000/10000 960000/10000 2 65535 36 108 @ cHRMz%u0`:o_FfIDATxM0wp0P&$`pZ)yo7CNw'J)T UЦ7WN==CSYCGC HDD4%[ZGYY_Ҡ'c 0ƀ^c=UEQELn!ӣ|z{;:>@!=V5Plczrcfc@q3S(cnAS6MzN`]1ƞS#A!0T{Y##1FsVySQIENDB`.dividerBackdrop { background-color: transparent; height: 100%; left: 0; position: absolute; top: 0; width: 100%; z-index: -1; } .divider { background-color: #d3d3d3; /*[{plugin-perftools-splitter}]*/ cursor: col-resize !important; height: 100%; position: absolute; top: 0; width: 3px; z-index: 1001; }.graph-canvas-div { height: 100%; width: 100%; -ms-grid-row: 1; -ms-grid-column: 1; position: relative; } .graph-canvas-div:focus { outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/ } .graph-canvas { left: 0px; top: 0px; height: 100%; width: 100%; position: absolute; } .line-separator { height: 1px; background: black; padding: 0px 0px 0px 0px; } .graph-cursor { position: absolute; width: 1px; z-index: 100; background-color: black; /*[{diagnostics-host-graph-cursor}]*/ } .graphContainer { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; display: -ms-grid; -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; color: black; /*[{plugin-color}]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ } .graph-focus { position: absolute; } .graph-focus:focus { outline: 2px solid grey; /*[2px solid {plugin-treeview-content-selected-border-color}]*/ } .graph-unfocused { outline: none !important; } .ruler-body { width: 100%; position: relative; margin: 0; padding: 0; overflow: hidden; z-index: 97; -ms-user-select: none; user-select: none; -ms-grid-row: 2; -ms-grid-column: 1; -ms-grid-row-align: center; border-bottom: 1px solid #c0c0c0; /*[1px solid {diagnostics-host-border}]*/ } .ruler-body:focus { outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/ } .ruler-container { width: 100%; margin: 0; padding: 0; overflow: hidden; display: -ms-grid; -ms-grid-columns: 1fr; -ms-grid-rows: auto 1fr; color: black; /*[{plugin-color}]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ } .ruler-bar { position: absolute; margin: 0; padding: 0; overflow: hidden; top: 0; height: 100%; z-index: 98; } .ruler-bar-left-side { position: absolute; top: 0px; border-right: 1px solid black; /*[1px solid {diagnostics-host-ruler-tickmark}]*/ height: 100%; } .ruler-bar-right-side { position: absolute; top: 0px; border-left: 1px solid black; /*[1px solid {diagnostics-host-ruler-tickmark}]*/ height: 100%; } .ruler-slider { cursor: col-resize !important; height: 100%; position: absolute; top: 0px; background-color: black; /*[{diagnostics-host-ruler-slider}]*/ margin: 0; padding: 0; overflow: hidden; z-index: 100; } .ruler-slider:hover { outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/ background-color: blue; /*[{diagnostics-host-ruler-slider-active}]*/ } .ruler-slider:focus { outline: 1px dotted grey; /*[1px dotted {plugin-treeview-content-selected-border-color}]*/ background-color: blue; /*[{diagnostics-host-ruler-slider-active}]*/ } .ruler-unselected { height: 100%; position: absolute; top: 0px; background-color: rgba(200,200,200,0.50); margin: 0; padding: 0; overflow: hidden; z-index: 99; } .ruler-scale-main { width: 100%; height: 1.8em; display: block; margin: 0; padding: 0; } .ruler-scale-tickmarks { width: 100%; display: block; height: 100%; margin: 0; padding: 0; position: relative; } .ruler-scale-tickmark-big { position: absolute; margin: 0; padding: 0; top: 0; width: 0px; height: 100%; border-left-width: 1px; border-left-style: solid; border-left-color: black; /*[{diagnostics-host-ruler-tickmark}]*/ z-index: 74; } .ruler-scale-tickmark-medium { position: absolute; margin: 0; padding: 0; top: 1em; width: 0px; height: 0.833em; border-left-width: 1px; border-left-style: solid; border-left-color: black; /*[{diagnostics-host-ruler-tickmark}]*/ z-index: 74; } .ruler-scale-tickmark-small { position: absolute; margin: 0; padding: 0; top: 1.333em; width: 0px; height: 0.500em; border-left-width: 1px; border-left-style: solid; border-left-color: black; /*[{diagnostics-host-ruler-tickmark}]*/ z-index: 74; } .ruler-scale-label-text { position: absolute; margin: 0; padding: 0px 2px 0px 2px; top: 0; line-height: 1em; text-overflow: clip; white-space: nowrap; } .ruler-scale-mark-image-event { width: 0.750em; height: 0.750em; background-position-x: left; background-position-y: bottom; background-size: 9px 9px; z-index: 75; background-color: transparent; } .ruler-scale-mark-image-position { position: absolute; top: 1.083em; } .ruler-legend-div { -ms-grid-columns: auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row-align: center; } .ruler-legend-color-div { width: 9px; height: 9px; -ms-grid-column: 1; -ms-grid-row: 1; -ms-grid-row-align: center; } .ruler-legend-text-div { -ms-grid-column: 2; -ms-grid-row: 1; -ms-grid-row-align: center; margin-right: 10px; margin-left: 2px; } .ruler-legend-container { margin-right: 5px; -ms-grid-row: 1; -ms-grid-column: 2; -ms-grid-row-align: center; -ms-flex-direction: row; -ms-flex-wrap: wrap; -ms-grid-column: 3; -ms-grid-column-align: end; display: -ms-flexbox; } .ruler-legend-color { width: 20px; height: 16px; padding: 0px 0px 0px 0px; vertical-align: middle; } .ruler-label-mark-image { width: 9px; height: 9px; background-size: 9px 9px; background-repeat: no-repeat } .ruler-title-container { -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .ruler-title-expand { width: 10px; height: 10px; padding-right: 2px; display: table-cell; } .ruler-title-text { -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; font-weight: 600; margin-left: 10px; } .ruler-header { border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-border}]*/ padding-top: 4px; padding-bottom: 4px; -ms-grid-columns: auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .ruler-area { width: 100%; display: block; vertical-align: middle; } .stackedBarChart { -ms-grid-columns: auto auto auto; display: -ms-grid; } .stackedBarChart .barGraph { -ms-grid-column: 2; background-color: transparent; display: inline-block; position: relative; z-index: 5; } .stackedBarChart .bar { position: absolute; } .graphDiv { width: 100%; height: 100%; } .line-separator { height: 1px; background: black; } .legend-div { -ms-grid-columns: auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row-align: center; } .legend-color-div { width: 12px; height: 12px; -ms-grid-column: 1; -ms-grid-row: 1; -ms-grid-row-align: center; -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; display: -ms-grid; } .legend-text-div { -ms-grid-column: 2; -ms-grid-row: 1; -ms-grid-row-align: center; margin-left: 2px; margin-right: 10px; white-space: nowrap; } .legend-container { -ms-grid-row: 1; -ms-grid-column: 2; -ms-grid-row-align: center; -ms-flex-direction: row; -ms-flex-wrap: wrap; -ms-grid-column-align: end; display: -ms-flexbox; margin-left: 20px; } .legend-color { width: 12px; height: 12px; -ms-grid-column: 1; -ms-grid-row: 1; -ms-grid-row-align: center; } .title-container { margin-left: 5px; -ms-grid-columns: 25px 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .title-expand { -ms-grid-columns: 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .title-text { -ms-grid-row: 1; -ms-grid-column: 2; -ms-grid-row-align: center; font-weight: 600; margin-left: 2px; } .title-expand-button { background: url("../images/itemExpandedIcon.png") no-repeat; /*[url({vs-image-icon-tree-expanded}) no-repeat]*/ background-size: 10px 10px; width: 10px; height: 10px; background-repeat: no-repeat; background-position-x: left; background-position-y: left; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .title-collapse-button { background: url("../images/itemCollapsedIcon.png") no-repeat; /*[url({vs-image-icon-tree-collapsed}) no-repeat]*/ background-size: 10px 10px; width: 10px; height: 10px; background-repeat: no-repeat; background-position-x: left; background-position-y: left; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .title-button-disabled { width: 10px; height: 10px; background-repeat: no-repeat; background-position-x: left; background-position-y: left; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .swimlane-header { border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-swimlane-border}]*/ padding-bottom: 2px; padding-top: 5px; -ms-grid-columns: auto 1fr; -ms-grid-rows: 1fr; display: -ms-grid; -ms-grid-row: 1; -ms-grid-column: 1; -ms-grid-row-align: center; } .swimlane-body { width: 100%; display: -ms-grid; -ms-grid-columns: auto 1fr auto; -ms-grid-rows: 1fr; border-bottom: 1px solid grey; /*[1px solid {diagnostics-host-swimlane-border}]*/ -ms-grid-row: 2; -ms-grid-column: 1; -ms-grid-row-align: center; box-sizing: content-box; } .graph-scale-left { border-right-style: solid; border-right-color: grey; /*[{diagnostics-host-graph-scale}]*/ -ms-grid-row: 1; -ms-grid-column: 1; position: relative; } .graph-scale-right { border-left-style: solid; border-left-color: grey; /*[{diagnostics-host-graph-scale}]*/ -ms-grid-row: 1; -ms-grid-column: 3; position: relative; } .graph-axis-left { position: absolute; text-align: right; right: 5px; } .graph-axis-right { position: absolute; text-align: left; left: 5px; } .graph-div { -ms-grid-row: 1; -ms-grid-column: 2; position: relative; } .graph-div .unselected { background-color: rgba(200, 200, 200, 0.50); position: absolute; z-index: 110; } .graph-div .focused { outline: 1px dotted gray !important; /*[1px dotted {plugin-treeview-content-selected-border-color} !important]*/ stroke: #C0C0C0 !important; /*[{plugin-treeview-content-selected-border-color} !important]*/ stroke-dasharray: 2, 1 !important; stroke-width: 1px !important; } .graph-canvas { left: 0px; top: 0px; height: 100%; width: 100%; position: absolute; } .graph-axis-line { position: absolute; width: 100%; height: 0px; left: 0px; z-index: 99; border-bottom-color: #c0c0c0; /*[{diagnostics-host-graph-line}]*/ border-bottom-width: 1px; border-bottom-style: dashed; } .swimlane-vertical-line { position: absolute; height: 100%; width: 0px; border-right-color: #c0c0c0; /*[{diagnostics-host-graph-line}]*/ border-right-width: 1px; border-right-style: solid; top: 0px; } .threshold-selector { -ms-grid-column: 3; margin-right: 10px; } .threshold-axis { border-bottom-color: #ff0000; /* Threshold axis line color */ } .threshold-legend-color { border-bottom-color: #ff0000; /* Threshold legend color */ border-bottom-width: 1px; border-bottom-style: dashed; height: 1px; } .threshold-legend-text { margin-right: 4px; } var __n = window.__n || function () { };var F12; (function (F12) { (function (Host) { "use strict"; var PluginHost = (function () { function PluginHost() { this._modules = {}; this._modules = { "plugin.host.activitylog": this.createNewActivityLogService.bind(this), "plugin.host.codemarkers": this.createNewCodeMarkersService.bind(this), "plugin.host.contextmenu": this.createNewContextMenuService.bind(this), "plugin.host.core": this.createNewCoreService.bind(this), "plugin.host.culture": this.createNewCultureService.bind(this), "plugin.host.diagnostics": this.createNewDiagnosticsService.bind(this), "plugin.host": this.createNewHostService.bind(this), "plugin.host.output": this.createNewOutputService.bind(this), "plugin.host.resources": this.createNewResourcesService.bind(this), "plugin.host.settings": this.createNewSettingsService.bind(this), "plugin.host.storage": this.createNewStorageService.bind(this), "plugin.host.theme": this.createNewThemeService.bind(this), "plugin.host.tooltip": this.createNewTooltipService.bind(this) }; } PluginHost.prototype.addAriaTabName = function () { var elements = document.getElementsByTagName("html"); if (elements.length > 0) { var htmlElement = elements[0]; if (this._manifest && this._manifest.f12 && typeof this._manifest.f12.localized_tab_resource === "string") { htmlElement.setAttribute("aria-label", Plugin.Resources.getString(this._manifest.f12.localized_tab_resource, "")); } } }; PluginHost.prototype.addHostCss = function () { var style = document.createElement("link"); style.type = "text/css"; style.setAttribute("data-plugin-theme", "true"); style.setAttribute("data-plugin-theme-href", Host.Impl.Theme._hostFilePrefix + "theme/f12.css"); (document.head || document.body).appendChild(style); var elements = document.getElementsByTagName("html"); if (elements.length > 0) { elements[0].classList.add(PluginHost._f12ClassName); } document.addEventListener("focusin", function () { Host.ExternalApis.notifyOnBrowserActivated(); }, true); }; PluginHost.prototype.loadManifest = function () { var manifestFile = Host.Impl.Storage.readPluginFile("manifest.json"); return JSON.parse(manifestFile); }; PluginHost.prototype.onLoaded = function () { var _this = this; Common.blockBrowserAccelerators(); this.addHostCss(); this._manifest = this.loadManifest(); this._f12Extensions = new Host.Impl.F12Extensions(); Plugin.F12 = this._f12Extensions; this.loadModule("plugin.host.diagnostics").triggerInitialized(this._manifest); this.loadModule("plugin.host.theme").triggerInitialized(this._manifest); this.loadModule("plugin.host.culture").triggerInitialized(this._manifest); this.loadModule("plugin.host.resources").triggerInitialized(this._manifest); this.getFileAliasesService().initialize(this._manifest); this.addAriaTabName(); window.setTimeout(function () { _this.loadModule("plugin.host.core").setControlReady(_this._manifest); }, 0); }; PluginHost.prototype.createNewActivityLogService = function () { return new Host.Impl.ActivityLog(); }; PluginHost.prototype.createNewCodeMarkersService = function () { return new Host.Impl.CodeMarkers(); }; PluginHost.prototype.createNewContextMenuService = function () { return new Host.Impl.ContextMenu(); }; PluginHost.prototype.createNewCoreService = function () { return new Host.Impl.Core(); }; PluginHost.prototype.createNewCultureService = function () { return new Host.Impl.Culture(); }; PluginHost.prototype.createNewDiagnosticsService = function () { return new Host.Impl.Diagnostics(); }; PluginHost.prototype.getFileAliasesService = function () { if (!this._filealiases) { this._filealiases = new Host.Impl.FileAliases(); } return this._filealiases; }; PluginHost.prototype.createNewHostService = function () { return new Host.Impl.Host(); }; PluginHost.prototype.createNewOutputService = function () { return new Host.Impl.Output(); }; PluginHost.prototype.createNewResourcesService = function () { return new Host.Impl.Resources(); }; PluginHost.prototype.createNewSettingsService = function () { return new Host.Impl.Settings(); }; PluginHost.prototype.createNewStorageService = function () { return new Host.Impl.Storage(); }; PluginHost.prototype.createNewThemeService = function () { return new Host.Impl.Theme(); }; PluginHost.prototype.createNewTooltipService = function () { return new Host.Impl.Tooltip(); }; PluginHost.prototype.loadModule = function (name) { var res = this._modules[name]; if (typeof res === 'function') { this._modules[name] = res = res(); } return res; }; PluginHost.prototype.triggerContextMenuEvent = function (type, event) { this.loadModule("plugin.host.contextmenu").triggerContextMenuEvent(type, event); }; PluginHost._f12ClassName = "hostedF12"; return PluginHost; })(); Host.PluginHost = PluginHost; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { "use strict"; var App = (function () { function App() { } App.main = function () { App.pluginHost = new Host.PluginHost(); }; return App; })(); Host.App = App; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); F12.Host.App.main(); window.loadModule = F12.Host.App.pluginHost.loadModule.bind(F12.Host.App.pluginHost); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var ErrorAlert = (function () { function ErrorAlert(parentElement, anchorElement) { var _this = this; this._resizeDebounceLastDate = null; this._resizeEventListener = function () { }; this._keyPressEventListener = function () { }; this._anchorElement = null; var box = document.createElement("div"); box.id = "f12HostErrorBox"; box.className = "f12HostErrorContainer"; box.tabIndex = 0; box.innerHTML = '
          \
          \
          \
          \
          \
          '; box.addEventListener("keydown", function (e) { if (!e.ctrlKey && !e.shiftKey && !e.altKey && e.keyCode === 27 /* Escape */) { _this.close(); return false; } return true; }); this._errorBoxElement = box; this._anchorElement = anchorElement; parentElement.appendChild(box); this._resizeEventListener = this.resize.bind(this, false); var errorHelpButton = document.getElementById("f12HostErrorHelp"); var errorHelpString = Plugin.Resources.getString("/Common/HelpButtonTooltip"); errorHelpButton.setAttribute("aria-label", errorHelpString); errorHelpButton.setAttribute("data-plugin-vs-tooltip", errorHelpString); errorHelpButton.addEventListener("click", function () { return _this.showHelpLink(); }); errorHelpButton.addEventListener("keydown", function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { _this.showHelpLink(); return false; } return true; }); var errorCloseButton = document.getElementById("f12HostErrorClose"); var errorCloseString = Plugin.Resources.getString("/Common/CloseButtonTooltip"); errorCloseButton.setAttribute("aria-label", errorCloseString); errorCloseButton.setAttribute("data-plugin-vs-tooltip", errorCloseString); errorCloseButton.addEventListener("click", function () { return _this.close(); }); errorCloseButton.addEventListener("keydown", function (e) { if (e.keyCode === 13 /* Enter */ || e.keyCode === 32 /* Space */) { _this.close(); return false; } return true; }); this._resizeDebounceLastDate = new Date(); this._keyPressEventListener = this.onHelpKeyPressed.bind(this); } Object.defineProperty(ErrorAlert.prototype, "messageText", { get: function () { return this._messageText; }, enumerable: true, configurable: true }); Object.defineProperty(ErrorAlert.prototype, "helpUri", { get: function () { return this._helpUri; }, enumerable: true, configurable: true }); Object.defineProperty(ErrorAlert.prototype, "isShown", { get: function () { return (this._errorBoxElement.style.display === "block"); }, enumerable: true, configurable: true }); ErrorAlert.prototype.show = function (message, timeout, helpUri) { var _this = this; window.addEventListener("resize", this._resizeEventListener); this._messageText = message; this._helpUri = null; var errorMessage = document.getElementById("f12HostErrorMessage"); errorMessage.innerText = message; if (typeof timeout === "number" && timeout > 0) { this._timeoutId = window.setTimeout(function () { return _this.close(); }, timeout); } else { this._timeoutId = null; } var errorHelp = document.getElementById("f12HostErrorHelp"); if (typeof helpUri === "string" && helpUri.length > 0) { this._helpUri = helpUri; errorHelp.style.display = "block"; Plugin.F12.addEventListener("browsershortcut", this._keyPressEventListener); } else { this._helpUri = null; errorHelp.style.display = "none"; } this._errorBoxElement.style.display = "block"; this.resize(true); }; ErrorAlert.prototype.close = function () { if (this._timeoutId) { window.clearTimeout(this._timeoutId); this._timeoutId = null; } window.removeEventListener("resize", this._resizeEventListener); if (this._helpUri !== null) { Plugin.F12.removeEventListener("browsershortcut", this._keyPressEventListener); } this._errorBoxElement.style.display = "none"; this._messageText = null; this._helpUri = null; }; ErrorAlert.prototype.resize = function (force) { var dateNow = Date.now(); if (force || (dateNow - this._resizeDebounceLastDate) > ErrorAlert._resizeDebounceThreshold) { this.setupPosition(); this._resizeDebounceLastDate = dateNow; } }; ErrorAlert.prototype.onHelpKeyPressed = function (e) { if (e.keyCode === 112 /* F1 */) { this.showHelpLink(); return false; } return true; }; ErrorAlert.prototype.setupPosition = function () { var widthOfErrorContainer = this._errorBoxElement.offsetWidth; var widthOfWindow = window.innerWidth; var heightOfErrorContainer = this._errorBoxElement.offsetHeight; var heightOfWindow = window.innerHeight; var left = (widthOfWindow - widthOfErrorContainer) / 2; var top = heightOfWindow; if (this._anchorElement && this._anchorElement.style.display !== "none") { top = this._anchorElement.getBoundingClientRect().top; } var shadowHeight = parseInt(window.getComputedStyle(this._errorBoxElement).boxShadow); if (isNaN(shadowHeight)) { shadowHeight = 0; } top = top - heightOfErrorContainer - shadowHeight; this._errorBoxElement.style.top = top + "px"; this._errorBoxElement.style.left = left + "px"; }; ErrorAlert.prototype.showHelpLink = function () { if (typeof this._helpUri === "string" && this._helpUri.length > 0) { Plugin.F12.openBrowser(this._helpUri); } }; ErrorAlert._resizeDebounceThreshold = 100; return ErrorAlert; })(); Impl.ErrorAlert = ErrorAlert; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { "use strict"; Host.ExternalApis = (window.__externalApis) || (window.external) || {}; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { "use strict"; var EventManager = (function () { function EventManager() { this._listeners = {}; } EventManager.prototype.addEventListener = function (name, callback) { if (!this._listeners.hasOwnProperty(name)) { this._listeners[name] = []; } this._listeners[name].push(callback); if (this._queuedEvents && this._queuedEvents[name]) { var data = this._queuedEvents[name]; this._queuedEvents[name] = null; this.dispatchEvent(name, data); } }; EventManager.prototype.removeEventListener = function (name, callback) { if (this._listeners.hasOwnProperty(name)) { var newListeners = []; for (var i = 0; i < this._listeners[name].length; i++) { if (this._listeners[name][i] !== callback) { newListeners.push(this._listeners[name][i]); } } this._listeners[name] = newListeners; } }; EventManager.prototype.dispatchEvent = function (eventName, data, queueIfNoListeners) { var handled = false; var callbacks = this._listeners[eventName]; if (callbacks) { var e = document.createEvent("Event"); if (data) { for (var prop in data) { if (data.hasOwnProperty(prop)) { e[prop] = data[prop]; } } } for (var i = 0; i < callbacks.length; i++) { var result = callbacks[i](e); if (typeof result != undefined && result === false) { handled = true; } } } else if (queueIfNoListeners) { if (!this._queuedEvents) { this._queuedEvents = {}; } this._queuedEvents[eventName] = data; } return handled; }; return EventManager; })(); Host.EventManager = EventManager; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var F12; (function (F12) { (function (Host) { "use strict"; (function (controlCommands) { controlCommands[controlCommands["none"] = 0] = "none"; controlCommands[controlCommands["portCreated"] = 1] = "portCreated"; controlCommands[controlCommands["portClosed"] = 2] = "portClosed"; controlCommands[controlCommands["portConnected"] = 3] = "portConnected"; controlCommands[controlCommands["controlInitialized"] = 4] = "controlInitialized"; controlCommands[controlCommands["hostReady"] = 5] = "hostReady"; controlCommands[controlCommands["event"] = 6] = "event"; controlCommands[controlCommands["error"] = 7] = "error"; controlCommands[controlCommands["initiateShutdown"] = 8] = "initiateShutdown"; controlCommands[controlCommands["shutdownComplete"] = 9] = "shutdownComplete"; })(Host.controlCommands || (Host.controlCommands = {})); var controlCommands = Host.controlCommands; ; (function (ScriptedHostPortState) { ScriptedHostPortState[ScriptedHostPortState["connected"] = 0] = "connected"; ScriptedHostPortState[ScriptedHostPortState["disconnected"] = 1] = "disconnected"; ScriptedHostPortState[ScriptedHostPortState["closed"] = 2] = "closed"; })(Host.ScriptedHostPortState || (Host.ScriptedHostPortState = {})); var ScriptedHostPortState = Host.ScriptedHostPortState; ; var CustomEvent = (function () { function CustomEvent() { this.supportedForProcessing = false; this.NONE = 0; this.CAPTURING_PHASE = 1; this.AT_TARGET = 2; this.BUBBLING_PHASE = 3; } Object.defineProperty(CustomEvent.prototype, "currentTarget", { get: function () { return this.target; }, enumerable: true, configurable: true }); Object.defineProperty(CustomEvent.prototype, "defaultPrevented", { get: function () { return this._preventDefaultCalled; }, enumerable: true, configurable: true }); Object.defineProperty(CustomEvent.prototype, "isTrusted", { get: function () { return false; }, enumerable: true, configurable: true }); CustomEvent.prototype.stopPropagation = function () { }; CustomEvent.prototype.preventDefault = function () { this._preventDefaultCalled = true; }; CustomEvent.prototype.stopImmediatePropagation = function () { this._stopImmediatePropagationCalled = true; }; CustomEvent.prototype.initEvent = function (eventTypeArg, canBubbleArg, cancelableArg) { }; return CustomEvent; })(); Host.CustomEvent = CustomEvent; var DelayControlReadyToken = (function () { function DelayControlReadyToken(manager, tokenId) { this.manager = manager; this.tokenId = tokenId; } DelayControlReadyToken.prototype.unblockControlReadyEvent = function () { this.manager.unblockControlReadyEvent(this.tokenId); }; return DelayControlReadyToken; })(); Host.DelayControlReadyToken = DelayControlReadyToken; var BeforeControlReadyEventArgs = (function (_super) { __extends(BeforeControlReadyEventArgs, _super); function BeforeControlReadyEventArgs(manager) { _super.call(this); this.manager = manager; } BeforeControlReadyEventArgs.prototype.delayControlReadyEvent = function () { var tokenId = this.manager.delayControlReadyEvent(); return new DelayControlReadyToken(this.manager, tokenId); }; return BeforeControlReadyEventArgs; })(CustomEvent); Host.BeforeControlReadyEventArgs = BeforeControlReadyEventArgs; var PortMessageEventArgs = (function (_super) { __extends(PortMessageEventArgs, _super); function PortMessageEventArgs(message, replyRequested, port, messageId) { _super.call(this); this.message = message; this.replyRequested = replyRequested; this.port = port; this.messageId = messageId; } PortMessageEventArgs.prototype.reply = function (message) { this.port.reply(this.messageId, message); }; PortMessageEventArgs.prototype.reportError = function (error) { this.port.reportError(this.messageId, error); }; return PortMessageEventArgs; })(CustomEvent); Host.PortMessageEventArgs = PortMessageEventArgs; var CustomEventTarget = (function () { function CustomEventTarget() { } CustomEventTarget.prototype.addEventListener = function (type, listener, useCapture) { this.listeners = this.listeners || {}; var eventListeners = (this.listeners[type] = this.listeners[type] || []); for (var i = 0, len = eventListeners.length; i < len; i++) { var l = eventListeners[i]; if (l.listener === listener) { return; } } eventListeners.push({ listener: listener }); }; CustomEventTarget.prototype.removeEventListener = function (type, listener, useCapture) { var listeners = this.listeners && this.listeners[type]; if (listeners) { for (var i = 0, len = listeners.length; i < len; i++) { var l = listeners[i]; if (l.listener === listener) { listeners.splice(i, 1); if (listeners.length === 0) { delete this.listeners[type]; } break; } } } }; CustomEventTarget.prototype.dispatchEvent = function (eventArg) { return false; }; CustomEventTarget.prototype.dispatchEventInternal = function (type, eventArg) { var listeners = this.listeners && this.listeners[type]; if (listeners) { var eventValue = eventArg; listeners = listeners.slice(0, listeners.length); for (var i = 0, len = listeners.length; i < len; i++) { listeners[i].listener(this, eventValue); } return eventValue.defaultPrevented || false; } return false; }; return CustomEventTarget; })(); Host.CustomEventTarget = CustomEventTarget; var Port = (function (_super) { __extends(Port, _super); function Port(manager, name, portId) { _super.call(this); this.manager = manager; this.portName = name; this.portId = portId; this.portState = 1 /* disconnected */; } Object.defineProperty(Port.prototype, "state", { get: function () { return this.portState; }, enumerable: true, configurable: true }); Object.defineProperty(Port.prototype, "name", { get: function () { return this.portName; }, enumerable: true, configurable: true }); Object.defineProperty(Port.prototype, "id", { get: function () { return this.portId; }, enumerable: true, configurable: true }); Port.prototype.connect = function () { if (this.portState !== 1 /* disconnected */) { return; } this.manager.registerPort(this); }; Port.prototype.postMessage = function (message) { if (this.portState !== 0 /* connected */) { return; } this.manager.postPortMessage(this.portId, message); }; Port.prototype.close = function () { if (this.portState === 2 /* closed */) { return; } this.portState = 2 /* closed */; this.manager.unregisterPort(this); this.manager = null; this.dispatchEventInternal("close", document.createEvent("Event")); }; Port.prototype.processMessage = function (messageId, message, replyRequested) { if (this.portState === 0 /* connected */) { var eventArgs = new PortMessageEventArgs(message, replyRequested, this, messageId); this.dispatchEventInternal("message", eventArgs); } }; Port.prototype.processConnect = function () { if (this.portState === 2 /* closed */) { return; } this.portState = 0 /* connected */; this.dispatchEventInternal("connected", document.createEvent("Event")); }; Port.prototype.processDisconnect = function () { if (this.portState === 2 /* closed */) { return; } this.portState = 1 /* disconnected */; }; Port.prototype.reply = function (messageId, message) { if (this.portState === 2 /* closed */) { return; } this.manager.postMessageReply(this.portId, messageId, message); }; Port.prototype.reportError = function (messageId, error) { if (this.portState === 2 /* closed */) { return; } this.manager.postMessageErrorReply(this.portId, messageId, error); }; return Port; })(CustomEventTarget); Host.Port = Port; var PortMarshaller = (function (_super) { __extends(PortMarshaller, _super); function PortMarshaller(port, extension) { _super.call(this); this._port = port; this._extension = extension; this._isInitialized = false; if (typeof extension.initialize === "function") { extension.initialize(this); } this._port.addEventListener("connected", this.onConnected.bind(this)); this._port.addEventListener("message", this.onMessage.bind(this)); } PortMarshaller.prototype.onConnected = function (source, eventArgs) { if (!this._isInitialized) { this._isInitialized = true; } this.dispatchEvent("PortConnected"); }; PortMarshaller.prototype.onMessage = function (source, eventArgs) { try { var message = eventArgs.message; var request = JSON.parse(message); var methodName = request.method; var method = this._extension[methodName]; if (typeof method === "function") { var callResult = method.apply(this._extension, request.args); if (eventArgs.replyRequested) { if (callResult && typeof callResult.then === "function") { callResult.then(function (promiseResult) { var result = { result: promiseResult }; eventArgs.reply(JSON.stringify(result)); }, function (error) { eventArgs.reportError(error); }); } else { var result = { result: callResult || "" }; eventArgs.reply(JSON.stringify(result)); } } } else { throw new Error("Unknown method: " + methodName); } } catch (ex) { if (eventArgs.replyRequested) { eventArgs.reportError(ex); } } }; PortMarshaller.prototype.fireEvent = function (eventName, eventArgs) { var response = { eventName: eventName, arg: eventArgs }; this._port.postMessage(JSON.stringify(response)); }; return PortMarshaller; })(Host.EventManager); Host.PortMarshaller = PortMarshaller; var CommunicationManager = (function (_super) { __extends(CommunicationManager, _super); function CommunicationManager(postMessageToPlugin) { _super.call(this); this.lastMessageId = 0; this.lastPortId = 1; this.registeredPorts = {}; this.registeredPortNames = {}; this.pendingRemotePorts = {}; this.controlReadyWaitTaskList = { length: 0 }; this.lastDelayControlReadyTokenId = 0; this.postMessageToPlugin = postMessageToPlugin; } CommunicationManager.prototype.connectPort = function (portName) { if (!this.registeredPortNames[portName]) { throw new Error("ConnectPort: Port does not exist."); } var localPort = this.registeredPortNames[portName]; if (localPort.state !== 1 /* disconnected */) { throw new Error("ConnectPort: Port state is unexpected."); } var portMessageArgs = [localPort.id, localPort.name]; this.postMessageInternal(CommunicationManager.defaultPort, 3 /* portConnected */, portMessageArgs); localPort.processConnect(); }; CommunicationManager.prototype.disconnectPort = function (id) { if (!this.registeredPorts[id]) { throw new Error("DisconnectPort: Port does not exist."); } var localPort = this.registeredPorts[id]; if (localPort.state !== 0 /* connected */) { throw new Error("DisconnectPort: Port state is unexpected."); } localPort.processDisconnect(); }; CommunicationManager.prototype.disconnectPorts = function () { for (var p in this.registeredPorts) { var port = this.registeredPorts[p]; if (port && port.portId) { port.processDisconnect(); } } }; CommunicationManager.prototype.postMessageInternal = function (portId, command, args, payload, replyId) { var header = { msgId: ++this.lastMessageId, portId: portId }; if (typeof replyId === 'number') { header.replyId = replyId; } header.command = command; if (args) { header.args = args; } var message = JSON.stringify(header); if (typeof payload === 'string') { message += CommunicationManager.messageHeaderDelimiter + payload; } this.postMessageToPlugin(message); }; CommunicationManager.prototype.fireControlReady = function () { this.postMessageInternal(CommunicationManager.defaultPort, 5 /* hostReady */); this.dispatchEventInternal("ControlReady", document.createEvent("Event")); }; CommunicationManager.prototype.processMessage = function (message) { var messageHeaderDelimiterIndex = message.indexOf(CommunicationManager.messageHeaderDelimiter); var controlHeader; var payload = null; if (messageHeaderDelimiterIndex < 0) { controlHeader = message; } else { controlHeader = message.substring(0, messageHeaderDelimiterIndex); payload = message.substring(messageHeaderDelimiterIndex + 1); } var header = JSON.parse(controlHeader); if (header.portId > CommunicationManager.defaultPort) { if (this.registeredPorts[header.portId]) { this.registeredPorts[header.portId].processMessage(header.msgId, payload, header.replyRequested); } else { throw new Error("OnMessage: Unknown portId: " + header.portId); } } else { switch (header.command) { case 4 /* controlInitialized */: this.pendingRemotePorts = {}; this.disconnectPorts(); this.controlReadyWaitTaskList = { length: 0 }; this.dispatchEventInternal("BeforeControlReady", new BeforeControlReadyEventArgs(this)); if (this.controlReadyWaitTaskList.length === 0) { this.fireControlReady(); } break; case 1 /* portCreated */: if (!header.args || header.args.Length <= 0) { throw new Error("OnMessage: Invalid message header for command PortCreated."); } var newPortName = header.args[0]; if (typeof newPortName !== 'string' || newPortName.length <= 0) { throw new Error("OnMessage: Invalid message header for command PortCreated."); } if (this.registeredPortNames[newPortName]) { this.connectPort(newPortName); } else { if (this.pendingRemotePorts[newPortName]) { throw new Error("Received connect event for the same port more than once."); } if (!this.pendingRemotePorts[newPortName]) { this.pendingRemotePorts[newPortName] = {}; } } break; case 2 /* portClosed */: if (!header.args || header.args.Length <= 0) { throw new Error("OnMessage: Invalid message header for command PortClosed."); } var existingPortName = header.args[0]; if (typeof existingPortName !== 'string' || existingPortName.length <= 0) { throw new Error("OnMessage: Invalid message header for command PortClosed."); } if (this.registeredPortNames[existingPortName]) { var port = this.registeredPortNames[existingPortName]; this.disconnectPort(port._portId); } else { if (!this.pendingRemotePorts[existingPortName]) { throw new Error("Received close event before a create event."); } delete this.pendingRemotePorts[existingPortName]; } break; case 9 /* shutdownComplete */: this.dispatchEventInternal("ControlShutdown", document.createEvent("Event")); break; default: throw new Error("OnMessage: Unexpected command: " + header.command); } } }; CommunicationManager.prototype.delayControlReadyEvent = function () { var tokenId = this.lastDelayControlReadyTokenId++; this.controlReadyWaitTaskList[tokenId] = true; this.controlReadyWaitTaskList.length++; return tokenId; }; CommunicationManager.prototype.unblockControlReadyEvent = function (tokenId) { if (this.controlReadyWaitTaskList[tokenId]) { this.controlReadyWaitTaskList[tokenId] = null; this.controlReadyWaitTaskList.length--; if (this.controlReadyWaitTaskList.length === 0) { this.fireControlReady(); } } }; CommunicationManager.prototype.registerPort = function (port) { var _this = this; if (this.registeredPorts[port.id]) { throw new Error("RegisterPort: Port already exists."); } if (!this.registeredPortNames[port.name]) { throw new Error("RegisterPort: Port name is not listed."); } this.registeredPorts[port.id] = port; this.registeredPortNames[port.name] = port; if (this.pendingRemotePorts[port.name]) { window.setImmediate(function () { if (_this.pendingRemotePorts[port.name]) { delete _this.pendingRemotePorts[port.name]; _this.connectPort(port.name); } }); } }; CommunicationManager.prototype.unregisterPort = function (port) { if (!this.registeredPorts[port.id]) { throw new Error("UnregisterPort: Port does not exist."); } if (!this.registeredPortNames[port.name]) { throw new Error("UnregisterPort: Port name does not exist."); } delete this.registeredPorts[port.id]; delete this.registeredPortNames[port.name]; this.pendingRemotePorts[port.name] = {}; this.postMessageInternal(CommunicationManager.defaultPort, 2 /* portClosed */, [port.id]); }; CommunicationManager.prototype.postPortMessage = function (portId, message) { this.postMessageInternal(portId, 0 /* none */, null, message); }; CommunicationManager.prototype.postMessageReply = function (portId, orignalMessageId, message) { this.postMessageInternal(portId, 0 /* none */, null, message, orignalMessageId); }; CommunicationManager.prototype.postMessageErrorReply = function (portId, orignalMessageId, error) { this.postMessageInternal(portId, 7 /* error */, [{ message: error.message, stack: error.stack }], null, orignalMessageId); }; CommunicationManager.prototype.createPort = function (name) { var portId = this.lastPortId++; var port = new Port(this, name, portId); this.registeredPortNames[name] = {}; return port; }; CommunicationManager.prototype.fireEvent = function (eventName, eventArgs) { if (typeof eventName !== 'string' || eventName.length <= 0) { throw new Error("Invalid eventName"); } if (eventName.indexOf(CommunicationManager.messageHeaderDelimiter) > 0) { throw new Error("eventName cannot contain " + CommunicationManager.messageHeaderDelimiter); } this.postMessageInternal(CommunicationManager.defaultPort, 6 /* event */, [eventName, eventArgs]); }; CommunicationManager.prototype.initiateShutdown = function () { this.postMessageInternal(CommunicationManager.defaultPort, 8 /* initiateShutdown */); }; CommunicationManager.defaultPort = 0; CommunicationManager.messageHeaderDelimiter = '$'; return CommunicationManager; })(CustomEventTarget); Host.CommunicationManager = CommunicationManager; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; (function (ResourceLocation) { ResourceLocation[ResourceLocation["Local"] = 2] = "Local"; ResourceLocation[ResourceLocation["Host"] = 3] = "Host"; })(Impl.ResourceLocation || (Impl.ResourceLocation = {})); var ResourceLocation = Impl.ResourceLocation; var Storage = (function () { function Storage() { } Storage.prototype.closeFile = function (streamId) { return new Plugin.Promise(function (complete, error) { try { Storage._storageDispatch.closeFile(streamId); complete(); } catch (ex) { error(ex); } }); }; Storage.prototype.deleteFile = function (path) { return new Plugin.Promise(function (complete, error) { try { Storage._storageDispatch.deleteFile(path); complete(); } catch (ex) { error(ex); } }); }; Storage.prototype.fileDialog = function (mode, dialogOptions, fileOptions) { var fileEncodings = []; if (fileOptions) { fileEncodings.push(fileOptions.encoding); } return new Plugin.Promise(function (complete, error) { try { var streamId = null; switch (mode) { case 0 /* open */: streamId = Storage._storageDispatch.showOpenFileDialog(dialogOptions.name, fileEncodings, dialogOptions.extensions); break; case 1 /* save */: streamId = Storage._storageDispatch.showSaveFileDialog(dialogOptions.name, fileEncodings, dialogOptions.extensions); break; default: throw new Error("Invalid dialog mode"); } complete(streamId); } catch (ex) { error(ex); } }); }; Storage.prototype.getFileList = function (path, persistence, index, count) { if (typeof persistence === "undefined") { persistence = 1 /* temporary */; } if (typeof index === "undefined") { index = 0; } if (typeof count === "undefined") { count = 0; } return new Plugin.Promise(function (complete, error) { try { var fileNames = Storage._storageDispatch.getFileList(path, persistence, index, count); complete(fileNames); } catch (ex) { error(ex); } }); }; Storage.prototype.openFile = function (path, options) { return new Plugin.Promise(function (complete, error) { try { var streamId = Storage._storageDispatch.openFile(path, options.access, options.encoding, options.mode, options.persistence, (typeof options.type !== "undefined" ? options.type : 1 /* text */)); complete(streamId); } catch (ex) { error(ex); } }); }; Storage.prototype.seek = function (streamId, offset, origin) { return new Plugin.Promise(function (complete, error) { try { var newPosition = Storage._storageDispatch.seek(streamId, offset, origin); complete(newPosition); } catch (ex) { error(ex); } }); }; Storage.prototype.read = function (streamId, count, type) { return new Plugin.Promise(function (complete, error) { try { var data; switch (type) { case 0 /* binary */: data = Storage._storageDispatch.readBinaryToByteArray(streamId, count); break; case 1 /* text */: data = Storage._storageDispatch.readText(streamId, count); break; default: throw new Error("Unsupported File Type"); } complete(data); } catch (ex) { error(ex); } }); }; Storage.prototype.write = function (streamId, data, offset, count, type) { return new Plugin.Promise(function (complete, error) { try { switch (type) { case 0 /* binary */: Storage._storageDispatch.writeBinaryFromByteArray(streamId, data, offset, count); break; case 1 /* text */: Storage._storageDispatch.writeText(streamId, data, offset, count); break; default: throw new Error("Unsupported File Type"); } complete(); } catch (ex) { error(ex); } }); }; Storage.getPluginRelativePath = function (absolutePath) { var linkToCss = document.createElement("a"); linkToCss.href = absolutePath; var fileAbs = linkToCss.pathname.replace(/\//g, "\\"); linkToCss.href = document.location.href; var currentAbs = linkToCss.pathname.replace(/\//g, "\\"); var filePath = fileAbs.substr(0, fileAbs.lastIndexOf("\\")); var rootPath = currentAbs.substr(0, currentAbs.lastIndexOf("\\")); var fileParts = filePath.split("\\"); var rootParts = rootPath.split("\\"); var relativeParts = []; var length = Math.max(fileParts.length, rootParts.length); var common = 0; for (var i = 0; i < length; i++) { if (fileParts[i] === rootParts[i]) { common++; } else { break; } } if (rootParts.length > common) { for (var i = common; i < rootParts.length; i++) { relativeParts.push(".."); } } if (fileParts.length > common) { for (var i = common; i < fileParts.length; i++) { relativeParts.push(fileParts[i]); } } relativeParts.push(fileAbs.substr(fileAbs.lastIndexOf("\\") + 1)); return relativeParts.join("/"); }; Storage.getResourceIdFromRelativePath = function (path) { var resourceId = path.replace(/\\/g, "/"); if (resourceId.length > 0 && resourceId[0] === "/") { resourceId = resourceId.substr(1); } return resourceId; }; Storage.readHostFile = function (fileName) { try { return Storage._storageDispatch.readResourceText(fileName, 3 /* Host */); } catch (ex) { return null; } }; Storage.readPluginFile = function (fileName, asBase64) { try { if (!asBase64) { return Storage._storageDispatch.readResourceText(fileName, 2 /* Local */); } else { return Storage._storageDispatch.readResourceBinaryToBase64(fileName, 2 /* Local */); } } catch (ex) { return null; } }; Storage.readEntireFile = function (fileName, options, asBase64) { return new Plugin.Promise(function (complete, error) { try { var streamId = null; var data = null; streamId = Storage._storageDispatch.openFile(fileName, 1 /* read */, options.encoding, options.mode, options.persistence, options.type); if (!asBase64) { data = Storage._storageDispatch.readText(streamId, 0); } else { data = Storage._storageDispatch.readBinaryToBase64(streamId, 0); } if (streamId != null) { Storage._storageDispatch.closeFile(streamId); streamId = null; } complete(data); } catch (ex) { error(ex); } finally { if (streamId != null) { Storage._storageDispatch.closeFile(streamId); } } }); }; Storage.writeEntireFile = function (fileName, data, options, asBase64) { var streamId = null; try { streamId = Storage._storageDispatch.openFile(fileName, 2 /* write */, options.encoding, options.mode, options.persistence, options.type); if (!asBase64) { Storage._storageDispatch.writeText(streamId, data, 0, 0); } else { Storage._storageDispatch.writeBinaryFromBase64(streamId, data, 0, 0); } } catch (ex) { } finally { if (streamId != null) { Storage._storageDispatch.closeFile(streamId); } } }; Storage._storageDispatch = F12.Host.ExternalApis.storage; return Storage; })(); Impl.Storage = Storage; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var Core = (function () { function Core() { var _this = this; this._loadedScriptExtensions = {}; this._communicationManager = new Host.CommunicationManager(this.postMessageToPlugin.bind(this)); this._communicationManager.addEventListener("BeforeControlReady", function (e) { return _this.onBeforeControlReady(e); }); } Core.prototype.loadExtensions = function (manifest) { if (manifest) { var scriptExtensionKey = manifest.f12 || manifest.webhost; if (scriptExtensionKey && scriptExtensionKey.published_objects) { var scriptExtensions = scriptExtensionKey.published_objects; for (var key in scriptExtensions) { var extensionInfo = scriptExtensions[key]; if (extensionInfo.path) { var path = scriptExtensions[key].path.replace(/\//g, "\\"); var data = Impl.Storage.readPluginFile(path); if (data) { try { eval(data); } catch (ex) { Impl.Diagnostics.reportHostError("Invalid host extension at: " + path); break; } var publishedObject = null; try { publishedObject = eval("new " + key + "()"); } catch (ex) { Impl.Diagnostics.reportHostError("Invalid published object class name: " + key); break; } if (!publishedObject) { Impl.Diagnostics.reportHostError("Invalid published object: " + key); break; } this.publishExtension(key, publishedObject); } } else { Impl.Diagnostics.reportHostError("Invalid host extension: " + key); } } } } }; Core.prototype.publishExtension = function (name, publishedObject) { var port = this._communicationManager.createPort(name); var extension = new Host.PortMarshaller(port, publishedObject); this._loadedScriptExtensions[name] = extension; port.connect(); }; Core.prototype.onBeforeControlReady = function (e) { this._delayToken = e.delayControlReadyEvent(); }; Core.prototype.hostDescription = function () { return "F12 Developer Tools"; }; Core.prototype.postMessage = function (message) { var _this = this; window.setTimeout(function () { _this._communicationManager.processMessage(message); }, 0); }; Core.prototype.postMessageToPlugin = function (message) { if (this.messageReceived) { this.messageReceived(message); } }; Core.prototype.setControlReady = function (manifest) { this.loadExtensions(manifest); this._communicationManager.unblockControlReadyEvent(this._delayToken); }; Core.prototype.setMessageCallback = function (callback) { this.messageReceived = callback; }; return Core; })(); Impl.Core = Core; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var Resources = (function (_super) { __extends(Resources, _super); function Resources() { _super.call(this); } Resources.prototype.loadResources = function (manifest) { var resourceMap = {}; var defaultAlias = null; if (manifest) { var isNativeStringTable = (manifest.f12 && manifest.f12.resource_aliases); var aliases = (isNativeStringTable ? manifest.f12.resource_aliases : manifest.resource_aliases); if (aliases) { for (var alias in aliases) { var map = Resources._utilitiesDispatch.getStringTableResources(alias); resourceMap[alias] = map; if (aliases[alias].is_default) { defaultAlias = alias; } } } } return { ResourceMap: resourceMap, DefaultAlias: defaultAlias, GenericError: "An error has occurred" }; }; Resources.prototype.triggerInitialized = function (manifest) { this._loadedResources = this.loadResources(manifest); this.dispatchEvent("resourcesinitialized", this._loadedResources, true); }; Resources.prototype.triggerChanged = function () { this.dispatchEvent("resourceschanged", this._loadedResources); }; Resources._utilitiesDispatch = F12.Host.ExternalApis.utilities; return Resources; })(Host.EventManager); Impl.Resources = Resources; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var Theme = (function (_super) { __extends(Theme, _super); function Theme() { var _this = this; _super.call(this); F12.Host.ExternalApis.addEventListener("syscolorchanged", function () { _this.updateTheme(); }); } Theme.prototype.addImagesToThemeMap = function (themeMap, images, shouldApplyTheme) { for (var key in images) { var imageData = null; if (images[key].bitmap_source) { var imageId = Impl.Storage.getResourceIdFromRelativePath(images[key].bitmap_source); var backgroundColor = themeMap[images[key].background_color]; if (shouldApplyTheme && backgroundColor) { this._conversionElement = this._conversionElement || document.createElement("div"); this._conversionElement.style.backgroundColor = backgroundColor; var parts = this._conversionElement.style.backgroundColor.split(","); F12.Tools.Utility.Assert.isTrue(parts.length === 3, "Unexpected number of RGB parts when adding images to the theme map."); var rgbParts = []; for (var i = 0; i < 3; i++) { rgbParts.push(parseInt(parts[i].replace(Theme._rgbRegEx, ''), 10)); } var fileName = F12.Host.ExternalApis.storage.getResourceFileName(imageId, 2 /* Local */); imageData = F12.Host.ExternalApis.utilities.getThemedImage(fileName, rgbParts[0], rgbParts[1], rgbParts[2]); } if (!imageData) { imageData = Impl.Storage.readPluginFile(imageId, true); } if (imageData) { imageData = "data:image/png;base64," + imageData; themeMap[key] = imageData; } } } }; Theme.prototype.addSVGFilesToThemeMap = function (themeMap, svgFiles, shouldApplyTheme) { for (var key in svgFiles) { if (svgFiles[key].svg_source) { var imageId = Impl.Storage.getResourceIdFromRelativePath(svgFiles[key].svg_source); var imageData = Impl.Storage.readPluginFile(imageId, false); if (imageData) { var injectedStyles = "\n\n"; var svgTagIdx = imageData.indexOf("", svgTagIdx) + 1; imageData = imageData.substr(0, injectionIdx) + injectedStyles + imageData.substr(injectionIdx); imageData = "data:image/svg+xml;base64," + window.btoa(imageData); themeMap[key] = imageData; } } } }; Theme.prototype.loadTheme = function (manifest, isHighContrast) { var themeMap = {}; var cssText = Impl.Storage.readHostFile("theme/plugin.css"); if (isHighContrast) { var themeText = Impl.Storage.readHostFile("theme/" + Theme._highContrastThemeFile + ".json"); var replacementMap = F12.Host.ExternalApis.utilities.getHighContrastReplacements(); for (var key in replacementMap) { themeText = themeText.replace(new RegExp(key, "g"), replacementMap[key]); } themeMap = JSON.parse(themeText); } else { var themeText = Impl.Storage.readHostFile("theme/" + Theme._themeFile + ".json"); themeMap = JSON.parse(themeText); } if (manifest) { if (manifest.f12 && manifest.f12.themed_images) { var images = manifest.f12.themed_images; this.addImagesToThemeMap(themeMap, images, isHighContrast); } if (manifest.f12 && manifest.f12.themed_svg) { var svgFiles = manifest.f12.themed_svg; this.addSVGFilesToThemeMap(themeMap, svgFiles, isHighContrast); } } return { PluginCss: cssText, themeMap: themeMap }; }; Theme.prototype.updateTheme = function () { if (F12.Host.ExternalApis.utilities.isHighContrast() && this._manifest) { var highContrastTheme = this.loadTheme(this._manifest, true); this.dispatchEvent("themechanged", highContrastTheme, true); } else { this.dispatchEvent("themechanged", this._loadedTheme, true); } }; Theme.prototype.fireThemeReady = function () { this.dispatchEvent("themeReady"); }; Theme.prototype.getCssFile = function (name) { if (name.indexOf(Theme._hostFilePrefix) === 0) { name = name.substr(Theme._hostFilePrefix.length); return new Plugin.Promise(function (complete, error) { complete(Impl.Storage.readHostFile(name)); }); } var relativePath = Impl.Storage.getPluginRelativePath(name); return new Plugin.Promise(function (complete, error) { complete(Impl.Storage.readPluginFile(relativePath)); }); }; Theme.prototype.triggerInitialized = function (manifest) { this._manifest = manifest; this._loadedTheme = this.loadTheme(manifest, false); if (F12.Host.ExternalApis.utilities.isHighContrast()) { var highContrastTheme = this.loadTheme(manifest, true); this.dispatchEvent("themeinitialize", highContrastTheme, true); } else { this.dispatchEvent("themeinitialize", this._loadedTheme, true); } }; Theme.prototype.triggerChanged = function () { this.dispatchEvent("themechanged", this._loadedTheme); }; Theme._hostFilePrefix = "F12HOSTFILE__"; Theme._themeFile = "light"; Theme._highContrastThemeFile = "highContrast"; Theme._rgbRegEx = /[^0-9]+/g; return Theme; })(Host.EventManager); Impl.Theme = Theme; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var Culture = (function (_super) { __extends(Culture, _super); function Culture() { _super.call(this); } Culture.prototype.loadCulture = function (manifest) { var culture = window.external.utilities.getCultureInfo(); culture.numberFormat.currencyGroupSizes = this.convertPatternToArray(culture.numberFormat.currencyGroupSizes); culture.numberFormat.numberGroupSizes = this.convertPatternToArray(culture.numberFormat.numberGroupSizes); culture.numberFormat.percentGroupSizes = this.convertPatternToArray(culture.numberFormat.percentGroupSizes); culture.direction = "ltr"; return culture; }; Culture.prototype.convertPatternToArray = function (pattern) { var group = []; var parts = pattern.split(";"); for (var i = 0; i < parts.length; i++) { group.push(parseInt(parts[i], 10)); } return group; }; Culture.prototype.triggerInitialized = function (manifest) { this._loadedCulture = this.loadCulture(manifest); this.dispatchEvent("cultureinitialize", this._loadedCulture, true); }; Culture.prototype.triggerChanged = function () { this.dispatchEvent("culturechanged", this._loadedCulture); }; return Culture; })(Host.EventManager); Impl.Culture = Culture; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var ContextMenu = (function (_super) { __extends(ContextMenu, _super); function ContextMenu() { var _this = this; _super.call(this); this.isListening = false; this.addEventListener("dismiss", function () { _this.dismiss(); }); this.popupMessageCallback = function (e) { return _this.onMessageFromPopup(e); }; } ContextMenu.prototype.triggerDismiss = function (manifest) { this.dispatchEvent("dismiss"); }; ContextMenu.prototype.adjustShowCoordinates = function (coordinates) { return coordinates; }; ContextMenu.prototype.callback = function (id) { var event = { name: "contextmenuclicked", id: id }; document.parentWindow.postMessage(event, document.URL); return Plugin.Promise.wrap(null); }; ContextMenu.prototype.canCreatePopup = function (hasSubmenu) { if (hasSubmenu) { return false; } return true; }; ContextMenu.prototype.disableZoom = function () { }; ContextMenu.prototype.dismiss = function () { if (F12.Host.ExternalApis.pluginId != 12 /* Popup */) { Plugin.F12.Communications.jsonRpcMethodCall(12 /* Popup */, "hidePopup", []); } ContextMenu._isContextMenuActive = false; if (this.isListening) { Plugin.F12.Communications.removeEventListener("popupMessage", this.popupMessageCallback); this.dispatchEvent("contextmenudismissed", { id: this.menuId }); this.isListening = false; } return Plugin.Promise.wrap(null); }; ContextMenu.prototype.dismissCurrent = function (ignoreDismissForRoot) { if (!ignoreDismissForRoot) { var event = { name: "contextmenudismissed" }; document.parentWindow.postMessage(event, document.URL); } return Plugin.Promise.wrap(null); }; ContextMenu.prototype.dismissSubmenus = function (currentCoordinates) { return Plugin.Promise.wrap(null); }; ContextMenu.prototype.fireContentReady = function () { var element = document.getElementById("contextmenu"); element.focus(); return Plugin.Promise.wrap(null); }; ContextMenu.prototype.show = function (menuId, ariaLabel, contextMenus, positionInfo) { this.contextMenus = contextMenus; this.menuId = menuId; this.currentDisplayInfo = ContextMenu.adjustCoordinates(positionInfo.clientCoordinates.X, positionInfo.clientCoordinates.Y, positionInfo.width, positionInfo.height); this.isListening = true; Plugin.F12.Communications.addEventListener("popupMessage", this.popupMessageCallback); var content = JSON.stringify({ contextMenus: contextMenus.innerHTML, id: this.menuId, ariaLabel: ariaLabel }); ContextMenu._isContextMenuActive = true; var popupInfo = { pluginId: F12.Host.ExternalApis.pluginId, x: this.currentDisplayInfo.screenX, y: this.currentDisplayInfo.screenY, width: this.currentDisplayInfo.width, height: this.currentDisplayInfo.height, activate: true, style: "", content: content, isTooltip: false }; return Plugin.F12.Communications.jsonRpcMethodCall(12 /* Popup */, "showPopup", [popupInfo], true); }; ContextMenu.prototype.triggerContextMenuEvent = function (type, event) { this.dispatchEvent(type, event); }; ContextMenu.prototype.onMessageFromPopup = function (event) { switch (event.customData.name) { case "contextmenuclicked": this.dispatchEvent(event.customData.name, { Id: event.customData.id }); break; case "contextmenudismissed": this.dispatchEvent("dismiss"); break; } }; ContextMenu.isContextMenuActive = function () { return ContextMenu._isContextMenuActive; }; ContextMenu.adjustCoordinates = function (clientX, clientY, width, height, useOffset) { var yOffset = useOffset ? 18 : 0; var scaleFactor = screen.deviceXDPI / screen.logicalXDPI; var screenPoint = ContextMenu.utilitiesDispatch.getClientToScreenPoint(clientX * scaleFactor, clientY * scaleFactor); var x = screenPoint.x; var y = screenPoint.y; var scaledWidth = Math.ceil(width * scaleFactor); var scaledHeight = Math.ceil(height * scaleFactor); var screenTop = ContextMenu.utilitiesDispatch.getMonitorTopFromCoord(x, y); var screenLeft = ContextMenu.utilitiesDispatch.getMonitorLeftFromCoord(x, y); var screenRight = ContextMenu.utilitiesDispatch.getMonitorRightFromCoord(x, y); var screenBottom = ContextMenu.utilitiesDispatch.getMonitorBottomFromCoord(x, y); y += yOffset * scaleFactor; var distToScreenRight = screenRight - (x + scaledWidth); if (distToScreenRight < 0) { x += distToScreenRight; var distToScreenLeft = x - screenLeft; if (distToScreenLeft < 0) { x -= distToScreenLeft; } } var distToScreenBottom = screenBottom - (y + height); if (distToScreenBottom < 0) { y -= ((yOffset * scaleFactor) + scaledHeight); var distToScreenTop = y - screenTop; if (distToScreenTop > distToScreenBottom) { if (distToScreenTop < 0) { y -= distToScreenTop; } } } return { screenX: x, screenY: y, width: scaledWidth, height: scaledHeight }; }; ContextMenu.prototype.handleMouseClick = function (event) { var isClickOutsidePopup = ((event.x < this.currentDisplayInfo.screenX || event.x > this.currentDisplayInfo.screenX + this.currentDisplayInfo.width) || (event.y < this.currentDisplayInfo.screenY || event.y > this.currentDisplayInfo.screenY + this.currentDisplayInfo.height)); if (isClickOutsidePopup) { this.dismiss(); } }; ContextMenu._isContextMenuActive = false; ContextMenu.utilitiesDispatch = F12.Host.ExternalApis.utilities; return ContextMenu; })(Host.EventManager); Impl.ContextMenu = ContextMenu; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var Tooltip = (function () { function Tooltip() { this.isFirstShow = true; this.styleHTML = ""; } Tooltip.prototype.getDblClickTime = function () { return Tooltip._utilitiesDispatch.getDoubleClickTime(); }; Tooltip.prototype.canCreatePopup = function () { return true; }; Tooltip.prototype.getScreenSizeForXY = function (screenX, screenY) { var scaleFactor = screen.deviceXDPI / screen.logicalXDPI; var x = screenX * scaleFactor; var y = screenY * scaleFactor; var screenTop = Tooltip._utilitiesDispatch.getMonitorTopFromCoord(x, y); var screenLeft = Tooltip._utilitiesDispatch.getMonitorLeftFromCoord(x, y); var screenRight = Tooltip._utilitiesDispatch.getMonitorRightFromCoord(x, y); var screenBottom = Tooltip._utilitiesDispatch.getMonitorBottomFromCoord(x, y); return { "Width": screenRight - screenLeft, "Height": screenBottom - screenTop }; }; Tooltip.prototype.hostContentInPopup = function (displayParameters) { var _this = this; if (!Impl.ContextMenu.isContextMenuActive()) { var currentDisplayInfo = Impl.ContextMenu.adjustCoordinates(displayParameters.clientCoordinates.X, displayParameters.clientCoordinates.Y, displayParameters.contentSize.Width, displayParameters.contentSize.Height, true); F12.Host.ExternalApis.popup.addEventListener("click", function (event) { _this.dismissPopup(); }); var tooltipContent; if (this.isFirstShow) { var doc = document.implementation.createHTMLDocument("Tooltip Document"); doc.documentElement.innerHTML = displayParameters.content; tooltipContent = doc.getElementById("plugin-vs-tooltip").outerHTML; var styleNodes = document.head.querySelectorAll("style, link[type='text/css']"); for (var i = 0; i < styleNodes.length; i++) { this.styleHTML += styleNodes[i].outerHTML; } this.isFirstShow = false; } else { tooltipContent = displayParameters.content; } var popupInfo = { pluginId: F12.Host.ExternalApis.pluginId, x: currentDisplayInfo.screenX, y: currentDisplayInfo.screenY, width: currentDisplayInfo.width, height: currentDisplayInfo.height, activate: false, style: this.styleHTML, content: tooltipContent, isTooltip: true }; Plugin.F12.Communications.jsonRpcMethodCall(12 /* Popup */, "showPopup", [popupInfo], true); } }; Tooltip.prototype.dismissPopup = function () { if (!F12.Host.Impl.ContextMenu.isContextMenuActive()) { F12.Host.ExternalApis.popup.removeAllEventListeners(); Plugin.F12.Communications.jsonRpcMethodCall(12 /* Popup */, "hidePopup", []); } }; Tooltip._utilitiesDispatch = F12.Host.ExternalApis.utilities; return Tooltip; })(); Impl.Tooltip = Tooltip; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var ActivityLog = (function () { function ActivityLog() { } ActivityLog.prototype.logEntry = function (entryType, message) { console.log("ActivityLog: " + entryType + ", " + message); }; return ActivityLog; })(); Impl.ActivityLog = ActivityLog; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var CodeMarkers = (function () { function CodeMarkers() { if (!Plugin.detect) { Plugin.detect = {}; } } CodeMarkers.prototype.fireCodeMarker = function (marker) { window.msWriteProfilerMark("F12:" + marker); }; return CodeMarkers; })(); Impl.CodeMarkers = CodeMarkers; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (_Host) { (function (Impl) { "use strict"; var Host = (function () { function Host() { } Host.prototype.showDocument = function (documentPath, line, col) { return Plugin.F12.Debugger.showDocument(documentPath, line, col); }; Host.prototype.getDocumentLocation = function (documentPath) { return Plugin.Promise.wrap(documentPath); }; Host.prototype.supportsAllowSetForeground = function () { return true; }; Host.prototype.allowSetForeground = function (processId) { return F12.Host.ExternalApis.allowSetForeground(processId); }; return Host; })(); Impl.Host = Host; })(_Host.Impl || (_Host.Impl = {})); var Impl = _Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var Output = (function () { function Output() { } Output.prototype.log = function (message) { console.log("Output.log: " + message); }; return Output; })(); Impl.Output = Output; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var Diagnostics = (function () { function Diagnostics() { } Diagnostics.prototype.reportError = function (message, url, lineNumber, additionalInfo, columnNumber) { return Diagnostics.reportError(message, url, lineNumber, additionalInfo, columnNumber); }; Diagnostics.reportError = function (message, url, lineNumber, additionalInfo, columnNumber) { if (!message) { message = ""; } if (!url) { url = ""; } if (typeof lineNumber !== "string") { lineNumber = ("" + lineNumber); } if (!columnNumber) { columnNumber = "0"; } if (typeof columnNumber !== "string") { columnNumber = ("" + columnNumber); } var info = ""; if (additionalInfo) { info = ("" + additionalInfo); } return Diagnostics._utilitiesDispatch.reportError(Diagnostics._pluginName, message, url, lineNumber, columnNumber, info); }; Diagnostics.prototype.terminate = function () { }; Diagnostics.reportHostError = function (message, additionalInfo) { this.reportError("Host Error - " + message, "plugin.f12.js", "", additionalInfo); }; Diagnostics.prototype.triggerInitialized = function (manifest) { if (manifest && manifest.name) { Diagnostics._pluginName = manifest.name; } }; Diagnostics._utilitiesDispatch = F12.Host.ExternalApis.utilities; Diagnostics._pluginName = "Plugin"; return Diagnostics; })(); Impl.Diagnostics = Diagnostics; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var FileAliases = (function () { function FileAliases() { } FileAliases.prototype.initialize = function (manifest) { this._fileAliasMap = {}; if (manifest) { this.loadFileAliases(manifest.file_aliases); if (manifest.f12) { this.loadFileAliases(manifest.f12.file_aliases); } } }; FileAliases.prototype.getPath = function (fileAlias) { if (!this._fileAliasMap || !this._fileAliasMap[fileAlias]) { return null; } return this._fileAliasMap[fileAlias].path; }; FileAliases.prototype.loadFileAliases = function (root) { if (root) { for (var alias in root) { if (root.hasOwnProperty(alias)) { this._fileAliasMap[alias] = root[alias]; } } } }; return FileAliases; })(); Impl.FileAliases = FileAliases; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var Common; (function (Common) { "use strict"; var ErrorHandling = (function () { function ErrorHandling() { } ErrorHandling.reportErrorGivenStack = function (error) { var message = error.message; var stack = error.stack; var firstCloseParen = stack.indexOf(")"); if (firstCloseParen > 0) { stack = stack.substr(0, firstCloseParen + 1); } var result = ErrorHandling.StackRegex.exec(stack); if (result) { var file = result[3]; var line = parseInt(result[4], 10); var column = parseInt(result[5], 10); window.reportError(message, file, line, error.stack, column); } }; ErrorHandling.reportErrorDetails = function (errorDetails) { window.reportError(errorDetails.message, errorDetails.file, errorDetails.line, errorDetails.additionalInfo, errorDetails.column); }; ErrorHandling.StackRegex = new RegExp(".* at ([^(]+) \(.*/23/([^:]+):([0-9]+):([0-9]+)\)", "gim"); return ErrorHandling; })(); Common.ErrorHandling = ErrorHandling; })(Common || (Common = {})); if (typeof window !== "undefined") { window.reportError = function (message, file, line, additionalInfo, column) { message = message || ""; file = file || ""; line = line || 0; additionalInfo = additionalInfo || ""; column = column || 0; if (isDebugBuild) { var externalObj; if (window.parent.getExternalObj) { externalObj = window.parent.getExternalObj(); } else if (window.external) { externalObj = window.external; } if (externalObj) { var component = (window.errorComponent ? window.errorComponent : "Common"); console.error([component, message, file, line, column].join("\r\n")); if (window.errorDisplayHandler) { window.errorDisplayHandler(message, file, line, additionalInfo, column); } } } if (Plugin && Plugin.Diagnostics && Plugin.Diagnostics.reportError) { Plugin.Diagnostics.reportError(message, file, line, additionalInfo, column); } }; window.onerror = function (message, file, line, columnNumber) { var column = 0; var additionalInfo = ""; if (arguments) { if (arguments[3] && typeof arguments[3] === "number") { column = arguments[3]; } if (arguments[4] && arguments[4] instanceof Error) { additionalInfo = "Error number: " + arguments[4].number; additionalInfo += "\r\nStack: " + arguments[4].stack; } } window.reportError(message, file, line, additionalInfo, column); return true; }; } var F12; (function (F12) { (function (Tools) { (function (Utility) { "use strict"; var Assert = (function () { function Assert() { } Assert.isTrue = function (condition, message) { if (!condition) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly false."; Assert.fail(message); } }; Assert.isFalse = function (condition, message) { if (condition) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly true."; Assert.fail(message); } }; Assert.isNull = function (value, message) { if (value !== null) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not null."; message += " '" + value + "'"; Assert.fail(message); } }; Assert.isUndefined = function (value, message) { if (undefined !== void 0) { message = "Internal error. Unexpectedly undefined has been redefined."; message += " '" + undefined + "'"; Assert.fail(message); } if (value !== undefined) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not undefined."; message += " '" + value + "'"; Assert.fail(message); } }; Assert.hasValue = function (value, message) { if (undefined !== void 0) { message = "Internal error. Unexpectedly undefined has been redefined."; message += " '" + undefined + "'"; Assert.fail(message); } if (value === null || value === undefined) { message = message ? "Internal error. " + message : ("Internal error. Unexpectedly " + (value === null ? "null" : "undefined") + "."); Assert.fail(message); } }; Assert.areEqual = function (value1, value2, message) { if (value1 !== value2) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly not equal."; message += " '" + value1 + "' !== '" + value2 + "'."; Assert.fail(message); } }; Assert.areNotEqual = function (value1, value2, message) { if (value1 === value2) { message = message ? "Internal error. " + message : "Internal error. Unexpectedly equal."; message += " '" + value1 + "' === '" + value2 + "'."; Assert.fail(message); } }; Assert.fail = function (message) { var error = new Error((message || "Assert failed.") + "\n"); try { throw error; } catch (ex) { if (Common && Common.ErrorHandling) { Common.ErrorHandling.reportErrorGivenStack(ex); } throw ex; } }; Assert.failDebugOnly = function (message) { if (isDebugBuild) { Assert.fail(message); } }; return Assert; })(); Utility.Assert = Assert; })(Tools.Utility || (Tools.Utility = {})); var Utility = Tools.Utility; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Tools) { (function (RPC) { "use strict"; var JsonRPCEndpoint = (function () { function JsonRPCEndpoint(identifier, jsonRpcMethodReceive, jsonRpcNotificationReceive, postMessage, onMessageCapture) { var _this = this; this._ourIdentifier = identifier; this._nextId = 0; this._promiseTable = {}; this._jsonRpcMethodReceive = jsonRpcMethodReceive; this._jsonRpcNotificationReceive = jsonRpcNotificationReceive; this._postMessage = postMessage; if (!Date.now) { Date.now = function now() { return +(new Date); }; } this._startTime = Date.now(); onMessageCapture(function (data) { _this.onMessage(data); }); } JsonRPCEndpoint.prototype.jsonRpcMethodCall = function (method, params, completed, error, identification) { var _this = this; var id = this._ourIdentifier + "|" + this._nextId; this._nextId++; this._promiseTable[id] = { completed: completed, error: error }; var message = JSON.stringify({ id: id, method: method, params: params }); this.logTraffic(message); if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this._postMessage(message, identification); }, message); return true; } else { return this._postMessage(message, identification); } }; JsonRPCEndpoint.prototype.jsonRpcNotification = function (method, params, identification) { var _this = this; var id = this._ourIdentifier + "|" + "NULL"; var message = JSON.stringify({ id: id, method: method, params: params }); this.logTraffic(message); if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this._postMessage(message, identification); }, message); } else { this._postMessage(message, identification); } }; JsonRPCEndpoint.prototype.logTraffic = function (data) { if (isDebugBuild) { var paddedTimestamp = (" " + (Date.now() - this._startTime) / 1000).slice(-9); __rpcLog.push(paddedTimestamp + " | " + data); if (__rpcLog.length > 100) { __rpcLog.shift(); } } }; JsonRPCEndpoint.prototype.onMessage = function (data) { var _this = this; this.logTraffic(data.data); var result = JSON.parse(data.data); var idSplit = (result.id).split("|"); Tools.Utility.Assert.areEqual(idSplit.length, 2); if (idSplit[1] === "NULL") { if (idSplit[0] !== this._ourIdentifier) { this._jsonRpcNotificationReceive(result.method, result.params); } } else if (idSplit[0] === this._ourIdentifier) { if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this.handleReply(result); }, data.data); } else { this.handleReply(result); } } else { if (RpcDelayHook.RandomDelay) { RpcDelayHook.queueData(function () { _this.handleCall(result); }, data.data); } else { this.handleCall(result); } } }; JsonRPCEndpoint.prototype.handleReply = function (result) { Tools.Utility.Assert.hasValue(this._promiseTable[result.id]); if (result.error) { Tools.Utility.Assert.isUndefined(result.data, "Can't have both data and error"); this._promiseTable[result.id].error(result.error); } else { this._promiseTable[result.id].completed(result.data); } delete this._promiseTable[result.id]; }; JsonRPCEndpoint.prototype.handleCall = function (result) { var _this = this; this._jsonRpcMethodReceive(result.method, result.params, function (data, error) { var message; if (data !== null && data !== undefined) { Tools.Utility.Assert.isUndefined(error, "Can't have both data and error"); message = JSON.stringify({ id: result.id, data: data }); } else { Tools.Utility.Assert.hasValue(error, "RPC call returned no value, but no error object either"); message = JSON.stringify({ id: result.id, error: error }); } _this._postMessage(message); }); }; return JsonRPCEndpoint; })(); RPC.JsonRPCEndpoint = JsonRPCEndpoint; var RpcDelayData = (function () { function RpcDelayData(callback, message) { this.callback = callback; this.message = message; } return RpcDelayData; })(); RPC.RpcDelayData = RpcDelayData; var RpcDelayHook = (function () { function RpcDelayHook() { } RpcDelayHook.enableDelay = function (calculateDelayTime, delayedMessage) { RpcDelayHook.RandomDelay = true; RpcDelayHook.CalculateDelayTime = calculateDelayTime; RpcDelayHook.DelayedMessage = delayedMessage; }; RpcDelayHook.disableDelay = function () { RpcDelayHook.RandomDelay = false; if (RpcDelayHook.RandomDelayTimeout) { clearTimeout(RpcDelayHook.RandomDelayTimeout); RpcDelayHook.RandomDelayTimeout = null; RpcDelayHook.clearQueue(); } }; RpcDelayHook.queueData = function (callback, message) { var delayData = new RpcDelayData(callback, message); RpcDelayHook.DelayedQueue.push(delayData); if (!RpcDelayHook.RandomDelayTimeout) { var delay = RpcDelayHook.CalculateDelayTime(message); RpcDelayHook.RandomDelayTimeout = setTimeout(RpcDelayHook.fireRandomly, delay); } }; RpcDelayHook.fireRandomly = function () { var delayData = RpcDelayHook.DelayedQueue.shift(); RpcDelayHook.DelayedMessage(delayData.message); delayData.callback(); if (RpcDelayHook.DelayedQueue.length > 0) { var delay = RpcDelayHook.CalculateDelayTime(RpcDelayHook.DelayedQueue[0].message); RpcDelayHook.RandomDelayTimeout = setTimeout(RpcDelayHook.fireRandomly, delay); } else { RpcDelayHook.RandomDelayTimeout = null; } }; RpcDelayHook.clearQueue = function () { for (var i = 0; i < RpcDelayHook.DelayedQueue.length; i++) { var delayData = RpcDelayHook.DelayedQueue[i]; RpcDelayHook.DelayedMessage(delayData.message); delayData.callback(); } RpcDelayHook.DelayedQueue = []; }; RpcDelayHook.RandomDelay = false; RpcDelayHook.DelayedQueue = []; return RpcDelayHook; })(); RPC.RpcDelayHook = RpcDelayHook; })(Tools.RPC || (Tools.RPC = {})); var RPC = Tools.RPC; })(F12.Tools || (F12.Tools = {})); var Tools = F12.Tools; })(F12 || (F12 = {})); if (isDebugBuild) { var __rpcLog = []; } var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; (function (SettingsScope) { SettingsScope[SettingsScope["user"] = 0] = "user"; SettingsScope[SettingsScope["config"] = 1] = "config"; })(Impl.SettingsScope || (Impl.SettingsScope = {})); var SettingsScope = Impl.SettingsScope; var Settings = (function () { function Settings() { } Settings.prototype.getSettingsData = function () { var _this = this; if (this._loadedData) { return Plugin.Promise.wrap(this._loadedData); } var options = { access: 1 /* read */, encoding: "UTF-8", mode: 4 /* openOrCreate */, share: 0 /* none */, persistence: 0 /* permanent */, type: 1 /* text */ }; return Impl.Storage.readEntireFile(Settings.defaultFileName, options).then(function (fileText) { var data = null; if (fileText) { try { data = JSON.parse(fileText); } catch (ex) { F12.Tools.Utility.Assert.failDebugOnly("JSON format of the settings file is invalid."); data = {}; } } if (!data) { data = {}; } if (!data[0 /* user */]) { data[0 /* user */] = {}; } if (!data[1 /* config */]) { data[1 /* config */] = {}; } _this._loadedData = data; return _this._loadedData; }); }; Settings.prototype.setSettingsData = function (data) { var options = { access: 2 /* write */, encoding: "UTF-8", mode: 1 /* createNew */, share: 0 /* none */, persistence: 0 /* permanent */, type: 1 /* text */ }; var fileText = JSON.stringify(data); Impl.Storage.writeEntireFile(Settings.defaultFileName, fileText, options); this._loadedData = data; }; Settings.prototype.getSettingsInfoFromCollection = function (collection) { var scope = 0 /* user */; var name = collection || ""; if (collection.indexOf(":") == 1) { if (collection[0].toLowerCase() === "c") { scope = 1 /* config */; } name = (collection.substr(2) || ""); } return { scope: scope, name: name }; }; Settings.prototype.getScopedData = function (collection) { var info = this.getSettingsInfoFromCollection(collection); return this.getSettingsData().then(function (data) { var scopedData = data[info.scope]; if (info.name) { if (!scopedData[info.name]) { scopedData[info.name] = {}; } scopedData = scopedData[info.name]; } return scopedData; }); }; Settings.prototype.get = function (collection, requestedProperties) { if (!collection || typeof collection !== "string") { collection = ""; } if (!requestedProperties) { requestedProperties = []; } return this.getScopedData(collection).then(function (scopedData) { if (requestedProperties.length === 0) { requestedProperties = Object.getOwnPropertyNames(scopedData); } var result = {}; for (var i = 0; i < requestedProperties.length; i++) { var key = requestedProperties[i]; if (scopedData.hasOwnProperty(key)) { result[key] = scopedData[key]; } else { result[key] = null; } } return result; }); }; Settings.prototype.set = function (collection, toSet) { var _this = this; if (!collection || typeof collection !== "string") { collection = ""; } if (!toSet) { toSet = {}; } this.getScopedData(collection).done(function (scopedData) { for (var key in toSet) { if (toSet.hasOwnProperty(key)) { scopedData[key] = toSet[key]; } } _this.setSettingsData(_this._loadedData); }); }; Settings.defaultFileName = "settings.json"; return Settings; })(); Impl.Settings = Settings; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; var Communications = (function (_super) { __extends(Communications, _super); function Communications() { _super.call(this); this._methodHandlers = {}; this._rpc = new F12.Tools.RPC.JsonRPCEndpoint("F12_RPC_CLIENT_" + F12.Host.ExternalApis.pluginId, this.jsonRpcMethodReceive.bind(this), this.jsonRpcNotificationReceive.bind(this), function (data, targetPluginId) { if ((typeof targetPluginId === "undefined" || targetPluginId === null) && data) { targetPluginId = F12.Host.Impl.Communications.parsePluginIdFromMessageId(data); } if (typeof targetPluginId !== "undefined" && targetPluginId !== null) { return F12.Host.ExternalApis.sendJsonMessage(targetPluginId, data); } }, function (onMessage) { F12.Host.ExternalApis.addEventListener("jsonmessage", function (data) { onMessage({ data: data }); }); }); } Communications.prototype.registerMethodHandler = function (method, callback, isAsync) { if (this._methodHandlers.hasOwnProperty(method)) { throw new Error("There is already a handler registered for the '" + method + "' method."); } this._methodHandlers[method] = callback; this._methodHandlers[method].isAsync = isAsync; }; Communications.prototype.unregisterMethodHandler = function (method, callback) { if (this._methodHandlers.hasOwnProperty(method)) { delete this._methodHandlers[method]; } }; Communications.prototype.callMethod = function (on, methodName, parameters, shouldActivatePlugin) { return this.jsonRpcMethodCall(on, methodName, parameters, shouldActivatePlugin); }; Communications.prototype.jsonRpcMethodCall = function (pluginId, method, params, activate) { var _this = this; var promise = new Plugin.Promise(function (completed, error) { _this._rpc.jsonRpcMethodCall(method, params, completed, error, pluginId); if (activate) { F12.Host.ExternalApis.activateTab(pluginId); } }); return promise; }; Communications.prototype.directInvoke = function (method, params) { if (this._methodHandlers.hasOwnProperty(method)) { var handler = this._methodHandlers[method]; if (params) { handler.apply(handler, params); } else { handler.apply(handler); } } }; Communications.prototype.fireEvent = function (event, id, customData) { if (typeof customData === "undefined") { customData = {}; } this._rpc.jsonRpcNotification(event, customData, id); }; Communications.prototype.jsonRpcMethodReceive = function (method, params, response) { var result; if (this._methodHandlers.hasOwnProperty(method)) { var handler = this._methodHandlers[method]; if (handler.isAsync) { params = params || []; params.push(response); } if (params) { result = handler.apply(handler, params); } else { result = handler.apply(handler); } if (!handler.isAsync) { response(result, undefined); } return; } response(null, new Error("There was no method handler registered for the '" + method + "' method.")); }; Communications.prototype.jsonRpcNotificationReceive = function (event, customData) { var data = { customData: customData }; this.dispatchEvent(event, data, false); }; Communications.parsePluginIdFromMessageId = function (message) { var parts = message.split("F12_RPC_CLIENT_"); if (parts && parts.length > 1) { parts = parts[1].split("|"); if (parts && parts.length > 0 && !isNaN(parseInt(parts[0]))) { return parseInt(parts[0]); } else { F12.Tools.Utility.Assert.fail("Unable to parse valid target plugin ID from F12 RPC message: " + message); } } return undefined; }; return Communications; })(Host.EventManager); Impl.Communications = Communications; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var F12; (function (F12) { (function (Host) { (function (Impl) { "use strict"; (function (PluginId) { PluginId[PluginId["None"] = -1] = "None"; PluginId[PluginId["Header"] = 0] = "Header"; PluginId[PluginId["Network"] = 1] = "Network"; PluginId[PluginId["Profiler"] = 2] = "Profiler"; PluginId[PluginId["Compat"] = 3] = "Compat"; PluginId[PluginId["Console"] = 4] = "Console"; PluginId[PluginId["Dom"] = 5] = "Dom"; PluginId[PluginId["Debugger"] = 6] = "Debugger"; PluginId[PluginId["Emulation"] = 7] = "Emulation"; PluginId[PluginId["Resources"] = 8] = "Resources"; PluginId[PluginId["Memory"] = 9] = "Memory"; PluginId[PluginId["VisualProfiler"] = 10] = "VisualProfiler"; PluginId[PluginId["IRViewer"] = 11] = "IRViewer"; PluginId[PluginId["Popup"] = 12] = "Popup"; })(Impl.PluginId || (Impl.PluginId = {})); var PluginId = Impl.PluginId; (function (JMCType) { JMCType[JMCType["UserCode"] = 0] = "UserCode"; JMCType[JMCType["Library"] = 1] = "Library"; JMCType[JMCType["Unrelated"] = 2] = "Unrelated"; JMCType[JMCType["Unsure"] = -1] = "Unsure"; })(Impl.JMCType || (Impl.JMCType = {})); var JMCType = Impl.JMCType; var Utilities = (function () { function Utilities() { } Utilities.prototype.createExternalObject = function (fileAlias, clsid) { var fileAliases = Host.App.pluginHost.getFileAliasesService(); var relativePath = fileAliases.getPath(fileAlias); if (!relativePath) { return undefined; } return F12.Host.ExternalApis.utilities.loadExtension(relativePath, clsid); }; Utilities.prototype.readResourceFile = function (fileName, asBase64) { return Impl.Storage.readPluginFile(fileName, asBase64); }; return Utilities; })(); Impl.Utilities = Utilities; var Header = (function () { function Header(communications) { this._communications = communications; } Header.prototype.notifyConsoleErrorsUpdated = function (count) { this._communications.jsonRpcMethodCall(0 /* Header */, "consoleErrorsUpdated", [count]); }; Header.prototype.notifyEmulationStateUpdated = function (state, text, tooltip) { this._communications.jsonRpcMethodCall(0 /* Header */, "emulationStateUpdated", [state, text, tooltip]); }; return Header; })(); Impl.Header = Header; var Debugger = (function () { function Debugger(communications) { this._communications = communications; } Debugger.prototype.notifyOnActiveStackFrameChanged = function () { F12.Host.ExternalApis.notifyOnActiveStackFrameChanged(); }; Debugger.prototype.notifyOnBreak = function (isWorker) { F12.Host.ExternalApis.notifyOnBreak(isWorker); }; Debugger.prototype.notifyOnRun = function () { F12.Host.ExternalApis.notifyOnRun(); }; Debugger.prototype.getIsAtBreakpoint = function () { return F12.Host.ExternalApis.isAtBreakpoint; }; Debugger.prototype.getIsAtBreakpointInWorker = function () { return F12.Host.ExternalApis.isAtBreakpointInWorker; }; Debugger.prototype.executeBreakModeCommand = function (script) { if (this.getIsAtBreakpoint()) { return this._communications.jsonRpcMethodCall(6 /* Debugger */, "breakModeCommand", [script]); } return new Plugin.Promise(function (completed) { completed(false); }); }; Debugger.prototype.addToWatch = function (name) { return this._communications.jsonRpcMethodCall(6 /* Debugger */, "addToWatch", [name], true); }; Debugger.prototype.getLocalsForCurrentStackFrame = function () { return this._communications.jsonRpcMethodCall(6 /* Debugger */, "getLocalsForCurrentStackFrame", [], false); }; Debugger.prototype.abortScriptExecution = function () { return this._communications.jsonRpcMethodCall(6 /* Debugger */, "abortScriptExecution", [], false); }; Debugger.prototype.showDocument = function (documentPath, oneBasedLine, oneBasedColumn, mimeType) { if (typeof oneBasedLine === "undefined") { oneBasedLine = 1; } if (typeof oneBasedColumn === "undefined") { oneBasedColumn = 1; } if (typeof mimeType === "undefined") { mimeType = ""; } return this._communications.jsonRpcMethodCall(6 /* Debugger */, "showDocument", [documentPath, oneBasedLine || 1, oneBasedColumn || 1, mimeType], true); }; return Debugger; })(); Impl.Debugger = Debugger; var Profiler = (function () { function Profiler(communications) { this._communications = communications; } Profiler.prototype.notifyOnStartProfiling = function () { if (F12.Host.ExternalApis.isAtBreakpoint) { throw new Error("Cannot call notifyOnStartProfiling while at a breakpoint."); } return F12.Host.ExternalApis.notifyOnStartProfiling(); }; Profiler.prototype.notifyOnStopProfiling = function () { if (F12.Host.ExternalApis.isAtBreakpoint) { throw new Error("Cannot call notifyOnStopProfiling while at a breakpoint."); } return F12.Host.ExternalApis.notifyOnStopProfiling(); }; Profiler.prototype.getIsProfiling = function () { return F12.Host.ExternalApis.isProfiling; }; return Profiler; })(); Impl.Profiler = Profiler; var ErrorDisplay = (function () { function ErrorDisplay() { } Object.defineProperty(ErrorDisplay.prototype, "messageText", { get: function () { return (this._display ? this._display.messageText : null); }, enumerable: true, configurable: true }); Object.defineProperty(ErrorDisplay.prototype, "helpUri", { get: function () { return (this._display ? this._display.helpUri : null); }, enumerable: true, configurable: true }); Object.defineProperty(ErrorDisplay.prototype, "isShown", { get: function () { return (this._display ? this._display.isShown : false); }, enumerable: true, configurable: true }); ErrorDisplay.prototype.show = function (message, timeout, helpUri, anchorElement) { if (!this._display) { this._display = new Impl.ErrorAlert(document.body, anchorElement); } this._display.show(message, timeout, helpUri); }; ErrorDisplay.prototype.close = function () { if (this._display) { this._display.close(); } }; ErrorDisplay.prototype.resize = function (force) { if (this._display) { this._display.resize(force); } }; return ErrorDisplay; })(); Impl.ErrorDisplay = ErrorDisplay; var JMC = (function () { function JMC(communications) { this._communications = communications; } JMC.prototype.isJMCAvailable = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcIsJMCAvailable"); }; JMC.prototype.getJMCTypeForUrls = function (urls) { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcGetJMCTypeForUrls", [urls]); }; JMC.prototype.getJMCTypeForEval = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcGetJMCTypeForEval"); }; JMC.prototype.getJMCTypeForScriptBlock = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcGetJMCTypeForScriptBlock"); }; JMC.prototype.getJMCTypeForFunction = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcGetJMCTypeForFunction"); }; JMC.prototype.getJMCTypeForUrl = function (url) { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcGetJMCTypeForUrl", [url]); }; JMC.prototype.setJMCTypeForUrl = function (url, type) { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcSetJMCTypeForUrl", [url, type]); }; JMC.prototype.getCurrentRules = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcGetCurrentRules"); }; JMC.prototype.load = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcLoad"); }; JMC.prototype.save = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcSave"); }; JMC.prototype.loadFromJSON = function (jsonToParse) { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcLoadFromJSON", [jsonToParse]); }; JMC.prototype.saveToJSON = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcSaveToJSON"); }; JMC.prototype.getError = function () { return this._communications.jsonRpcMethodCall(0 /* Header */, "jmcGetError"); }; return JMC; })(); Impl.JMC = JMC; var TraceWriter = (function () { function TraceWriter() { this._isReady = false; } TraceWriter.prototype.raiseEvent = function (eventId, traceMessage) { this.raiseEventWithMessage(eventId, traceMessage); }; TraceWriter.prototype.raiseEventWithMessage = function (eventId, traceMessage) { F12.Host.ExternalApis.traceWriter.raiseEvent(eventId, traceMessage); }; TraceWriter.prototype.raiseEventWithKey = function (eventId, key, traceMessage) { F12.Host.ExternalApis.traceWriter.raiseEventWithKey(eventId, key, traceMessage); }; TraceWriter.prototype.markToolReady = function () { if (!this._isReady) { this._isReady = true; F12.Host.ExternalApis.markToolReady(); } }; return TraceWriter; })(); Impl.TraceWriter = TraceWriter; var Test = (function () { function Test(communications) { this._communications = communications; } Test.prototype.storeGlobalTestData = function (collection, settings) { return this._communications.jsonRpcMethodCall(0 /* Header */, "storeglobaltestdata", [collection, settings]); }; Test.prototype.getGlobalTestData = function (collection) { return this._communications.jsonRpcMethodCall(0 /* Header */, "getglobaltestdata", [collection]); }; return Test; })(); Impl.Test = Test; var F12Extensions = (function (_super) { __extends(F12Extensions, _super); function F12Extensions() { var _this = this; _super.call(this); F12.Host.ExternalApis.addEventListener("browsershortcut", function (e) { return _this.dispatchEvent("browsershortcut", e, false); }); F12.Host.ExternalApis.addEventListener("keydown", function (e) { return _this.dispatchEvent("keydown", e, false); }); F12.Host.ExternalApis.addEventListener("hostinfochanged", function (e) { return _this.dispatchEvent("hostinfochanged", e, false); }); F12.Host.ExternalApis.addEventListener("profilingstarted", function (pluginId) { return _this.dispatchEvent("profilingstarted", { pluginId: pluginId }, false); }); F12.Host.ExternalApis.addEventListener("profilingstopped", function (pluginId) { return _this.dispatchEvent("profilingstopped", { pluginId: pluginId }, false); }); F12.Host.ExternalApis.addEventListener("consolestateshown", function () { return _this.dispatchEvent("consolestateshown", null, false); }); F12.Host.ExternalApis.addEventListener("consolestatehidden", function () { return _this.dispatchEvent("consolestatehidden", null, false); }); F12.Host.ExternalApis.addEventListener("activated", function () { return _this.dispatchEvent("activated", null, false); }); F12.Host.ExternalApis.addEventListener("deactivated", function () { return _this.dispatchEvent("deactivated", null, false); }); F12.Host.ExternalApis.addEventListener("navigatesubframes", function (forward, useActiveElement) { return _this.dispatchEvent("navigatesubframes", { isForward: forward, useActiveElement: useActiveElement }, false); }); if (F12.Host.ExternalApis.pluginId === 6 /* Debugger */) { F12.Host.ExternalApis.addEventListener("showdocument", function (e) { _this.Communications.directInvoke("showDocument", [e.url, e.oneBasedLine, e.oneBasedColumn]); }); } if (F12.Host.ExternalApis.pluginId === 0 /* Header */) { F12.Host.ExternalApis.addEventListener("consolebuttonchanged", function (e) { return _this.dispatchEvent("consolebuttonchanged", {}, false); }); } F12.Host.ExternalApis.addEventListener("activeframechanged", function () { return _this.dispatchEvent("activeframechanged", null, false); }); } Object.defineProperty(F12Extensions.prototype, "PluginId", { get: function () { return PluginId; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "JMCType", { get: function () { return JMCType; }, enumerable: true, configurable: true }); F12Extensions.prototype.getFilePathFromStreamId = function (streamId) { return F12.Host.ExternalApis.storage.getFilePathFromStreamId(streamId); }; F12Extensions.prototype.bringPluginToForeground = function () { F12.Host.ExternalApis.bringToolToForeground(); }; F12Extensions.prototype.copyFileToStream = function (sourcePath, destStreamId) { F12.Host.ExternalApis.storage.copyFileToStream(sourcePath, destStreamId); }; F12Extensions.prototype.getDoubleClickTime = function () { return F12.Host.ExternalApis.utilities.getDoubleClickTime(); }; F12Extensions.prototype.setRegEntryForF12 = function (name, value) { F12.Host.ExternalApis.utilities.setRegEntryForF12(name, value); }; F12Extensions.prototype.getRegEntryForF12 = function (name, value) { return F12.Host.ExternalApis.utilities.getRegEntryForF12(name); }; F12Extensions.prototype.isEnterpriseModeMenuOptionEnabled = function () { return F12.Host.ExternalApis.utilities.isEnterpriseModeMenuOptionEnabled(); }; F12Extensions.prototype.getQpcFrequency = function () { return F12.Host.ExternalApis.utilities.getQpcFrequency(); }; F12Extensions.prototype.getQpcTime = function () { return F12.Host.ExternalApis.utilities.getQpcTime(); }; F12Extensions.prototype.getInspectElementId = function () { return F12.Host.ExternalApis.inspectElementId; }; F12Extensions.prototype.setInspectElementId = function (elementId) { F12.Host.ExternalApis.inspectElementId = elementId; }; F12Extensions.prototype.activateTab = function (pluginId) { F12.Host.ExternalApis.activateTab(pluginId); }; F12Extensions.prototype.notifyOnToolActivated = function () { F12.Host.ExternalApis.notifyOnToolActivated(); }; F12Extensions.prototype.openBrowser = function (url) { F12.Host.ExternalApis.openBrowser(url); }; F12Extensions.prototype.getProcessId = function () { return F12.Host.ExternalApis.getProcessId(); }; F12Extensions.prototype.getRemoteProcessId = function () { return F12.Host.ExternalApis.getRemoteProcessId(); }; F12Extensions.prototype.takeForeground = function () { return F12.Host.ExternalApis.takeForeground(); }; F12Extensions.prototype.setForeground = function (hwnd) { return F12.Host.ExternalApis.setForeground(hwnd); }; F12Extensions.prototype.allowSetForeground = function (pid) { return F12.Host.ExternalApis.allowSetForeground(pid); }; F12Extensions.prototype.getHostInfo = function () { return F12.Host.ExternalApis.hostInfo; }; F12Extensions.prototype.getIsShowingConsole = function () { return F12.Host.ExternalApis.isShowingConsole; }; F12Extensions.prototype.setConsoleClientArea = function (left, top, right, bottom) { F12.Host.ExternalApis.setConsoleClientArea(left, top, right, bottom); }; F12Extensions.prototype.showHideConsole = function () { F12.Host.ExternalApis.showHideConsole(); }; F12Extensions.prototype.notifyOnKeydown = function (keyCode, keyFlags) { return F12.Host.ExternalApis.notifyOnKeydown(keyCode, keyFlags); }; F12Extensions.prototype.deleteFile = function (path) { F12.Host.ExternalApis.storage.deleteFile(path); }; Object.defineProperty(F12Extensions.prototype, "traceWriter", { get: function () { return F12.Host.ExternalApis.traceWriter; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "Communications", { get: function () { if (typeof this._communications === "undefined") { this._communications = new Impl.Communications(); } return this._communications; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "Utilities", { get: function () { if (typeof this._utilities === "undefined") { this._utilities = new Utilities(); } return this._utilities; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "Header", { get: function () { if (typeof this._header === "undefined") { this._header = new Header(this.Communications); } return this._header; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "Debugger", { get: function () { if (typeof this._debugger === "undefined") { this._debugger = new Debugger(this.Communications); } return this._debugger; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "Profiler", { get: function () { if (typeof this._profiler === "undefined") { this._profiler = new Profiler(this.Communications); } return this._profiler; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "ErrorDisplay", { get: function () { if (typeof this._errorDisplay === "undefined") { this._errorDisplay = new ErrorDisplay(); } return this._errorDisplay; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "JMC", { get: function () { if (typeof this._jmc === "undefined") { this._jmc = new JMC(this.Communications); } return this._jmc; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "TraceWriter", { get: function () { if (typeof this._traceWriter === "undefined") { this._traceWriter = new TraceWriter(); } return this._traceWriter; }, enumerable: true, configurable: true }); Object.defineProperty(F12Extensions.prototype, "Test", { get: function () { if (typeof this._test === "undefined") { this._test = new Test(this.Communications); } return this._test; }, enumerable: true, configurable: true }); return F12Extensions; })(Host.EventManager); Impl.F12Extensions = F12Extensions; })(Host.Impl || (Host.Impl = {})); var Impl = Host.Impl; })(F12.Host || (F12.Host = {})); var Host = F12.Host; })(F12 || (F12 = {})); var Common; (function (Common) { "use strict"; var Keys = (function () { function Keys() { } Keys.C = "c"; Keys.DEL = "Del"; Keys.DOWN = "Down"; Keys.END = "End"; Keys.ENTER = "Enter"; Keys.F10 = "F10"; Keys.HOME = "Home"; Keys.LEFT = "Left"; Keys.RIGHT = "Right"; Keys.SPACEBAR = "Spacebar"; Keys.UP = "Up"; return Keys; })(); Common.Keys = Keys; (function (KeyCodes) { KeyCodes[KeyCodes["Backspace"] = 8] = "Backspace"; KeyCodes[KeyCodes["Tab"] = 9] = "Tab"; KeyCodes[KeyCodes["Enter"] = 13] = "Enter"; KeyCodes[KeyCodes["Shift"] = 16] = "Shift"; KeyCodes[KeyCodes["Control"] = 17] = "Control"; KeyCodes[KeyCodes["Alt"] = 18] = "Alt"; KeyCodes[KeyCodes["CapsLock"] = 20] = "CapsLock"; KeyCodes[KeyCodes["Escape"] = 27] = "Escape"; KeyCodes[KeyCodes["Space"] = 32] = "Space"; KeyCodes[KeyCodes["PageUp"] = 33] = "PageUp"; KeyCodes[KeyCodes["PageDown"] = 34] = "PageDown"; KeyCodes[KeyCodes["End"] = 35] = "End"; KeyCodes[KeyCodes["Home"] = 36] = "Home"; KeyCodes[KeyCodes["ArrowLeft"] = 37] = "ArrowLeft"; KeyCodes[KeyCodes["ArrowFirst"] = 37] = "ArrowFirst"; KeyCodes[KeyCodes["ArrowUp"] = 38] = "ArrowUp"; KeyCodes[KeyCodes["ArrowRight"] = 39] = "ArrowRight"; KeyCodes[KeyCodes["ArrowDown"] = 40] = "ArrowDown"; KeyCodes[KeyCodes["ArrowLast"] = 40] = "ArrowLast"; KeyCodes[KeyCodes["Insert"] = 45] = "Insert"; KeyCodes[KeyCodes["Delete"] = 46] = "Delete"; KeyCodes[KeyCodes["A"] = 65] = "A"; KeyCodes[KeyCodes["B"] = 66] = "B"; KeyCodes[KeyCodes["C"] = 67] = "C"; KeyCodes[KeyCodes["D"] = 68] = "D"; KeyCodes[KeyCodes["E"] = 69] = "E"; KeyCodes[KeyCodes["F"] = 70] = "F"; KeyCodes[KeyCodes["G"] = 71] = "G"; KeyCodes[KeyCodes["H"] = 72] = "H"; KeyCodes[KeyCodes["I"] = 73] = "I"; KeyCodes[KeyCodes["J"] = 74] = "J"; KeyCodes[KeyCodes["K"] = 75] = "K"; KeyCodes[KeyCodes["L"] = 76] = "L"; KeyCodes[KeyCodes["M"] = 77] = "M"; KeyCodes[KeyCodes["N"] = 78] = "N"; KeyCodes[KeyCodes["O"] = 79] = "O"; KeyCodes[KeyCodes["P"] = 80] = "P"; KeyCodes[KeyCodes["Q"] = 81] = "Q"; KeyCodes[KeyCodes["R"] = 82] = "R"; KeyCodes[KeyCodes["S"] = 83] = "S"; KeyCodes[KeyCodes["T"] = 84] = "T"; KeyCodes[KeyCodes["U"] = 85] = "U"; KeyCodes[KeyCodes["V"] = 86] = "V"; KeyCodes[KeyCodes["W"] = 87] = "W"; KeyCodes[KeyCodes["X"] = 88] = "X"; KeyCodes[KeyCodes["Y"] = 89] = "Y"; KeyCodes[KeyCodes["Z"] = 90] = "Z"; KeyCodes[KeyCodes["ContextMenu"] = 93] = "ContextMenu"; KeyCodes[KeyCodes["Multiply"] = 106] = "Multiply"; KeyCodes[KeyCodes["Plus"] = 107] = "Plus"; KeyCodes[KeyCodes["Minus"] = 109] = "Minus"; KeyCodes[KeyCodes["F1"] = 112] = "F1"; KeyCodes[KeyCodes["F2"] = 113] = "F2"; KeyCodes[KeyCodes["F3"] = 114] = "F3"; KeyCodes[KeyCodes["F4"] = 115] = "F4"; KeyCodes[KeyCodes["F5"] = 116] = "F5"; KeyCodes[KeyCodes["F6"] = 117] = "F6"; KeyCodes[KeyCodes["F7"] = 118] = "F7"; KeyCodes[KeyCodes["F8"] = 119] = "F8"; KeyCodes[KeyCodes["F9"] = 120] = "F9"; KeyCodes[KeyCodes["F10"] = 121] = "F10"; KeyCodes[KeyCodes["F11"] = 122] = "F11"; KeyCodes[KeyCodes["F12"] = 123] = "F12"; KeyCodes[KeyCodes["Comma"] = 188] = "Comma"; KeyCodes[KeyCodes["Period"] = 190] = "Period"; })(Common.KeyCodes || (Common.KeyCodes = {})); var KeyCodes = Common.KeyCodes; (function (MouseButtons) { MouseButtons[MouseButtons["LeftButton"] = 0] = "LeftButton"; MouseButtons[MouseButtons["MiddleButton"] = 1] = "MiddleButton"; MouseButtons[MouseButtons["RightButton"] = 2] = "RightButton"; })(Common.MouseButtons || (Common.MouseButtons = {})); var MouseButtons = Common.MouseButtons; (function (KeyFlags) { KeyFlags[KeyFlags["None"] = 0x0] = "None"; KeyFlags[KeyFlags["Shift"] = 0x1] = "Shift"; KeyFlags[KeyFlags["Ctrl"] = 0x2] = "Ctrl"; KeyFlags[KeyFlags["Alt"] = 0x4] = "Alt"; })(Common.KeyFlags || (Common.KeyFlags = {})); var KeyFlags = Common.KeyFlags; function blockBrowserAccelerators() { document.addEventListener("keydown", function (e) { return preventIEKeys(e); }); document.addEventListener("contextmenu", function (e) { e.preventDefault(); e.stopPropagation(); return false; }); window.addEventListener("mousewheel", function (e) { if (e.ctrlKey) { e.preventDefault(); e.stopPropagation(); return false; } }); } Common.blockBrowserAccelerators = blockBrowserAccelerators; function HasAnyOfAltCtrlShiftKeyFlags(e) { return e.shiftKey || e.ctrlKey || e.altKey; } Common.HasAnyOfAltCtrlShiftKeyFlags = HasAnyOfAltCtrlShiftKeyFlags; function HasOnlyCtrlKeyFlags(e) { return e.ctrlKey && !e.shiftKey && !e.altKey; } Common.HasOnlyCtrlKeyFlags = HasOnlyCtrlKeyFlags; function preventIEKeys(e) { if (e.keyCode === 116 /* F5 */ || e.keyCode === 117 /* F6 */ || (e.keyCode === 121 /* F10 */ && e.shiftKey) || (e.keyCode === 70 /* F */ && e.ctrlKey)) { e.preventDefault(); e.stopPropagation(); return false; } return true; } Common.preventIEKeys = preventIEKeys; })(Common || (Common = {})); var Plugin; (function (Plugin) { (function (VS) { (function (ActivityLog) { "use strict"; var host = loadModule("plugin.host.activitylog"); var EntryType; (function (EntryType) { EntryType[EntryType["ALE_ERROR"] = 1] = "ALE_ERROR"; EntryType[EntryType["ALE_WARNING"] = 2] = "ALE_WARNING"; EntryType[EntryType["ALE_INFORMATION"] = 3] = "ALE_INFORMATION"; })(EntryType || (EntryType = {})); function doLog(entryType, message, args) { host.logEntry(entryType, Plugin.Utilities.formatString(message, args)); } function info(message) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } doLog(3 /* ALE_INFORMATION */, message, args); } ActivityLog.info = info; function warn(message) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } doLog(2 /* ALE_WARNING */, message, args); } ActivityLog.warn = warn; function error(message) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } doLog(1 /* ALE_ERROR */, message, args); } ActivityLog.error = error; })(VS.ActivityLog || (VS.ActivityLog = {})); var ActivityLog = VS.ActivityLog; })(Plugin.VS || (Plugin.VS = {})); var VS = Plugin.VS; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (VS) { (function (Internal) { (function (CodeMarkers) { "use strict"; var host = loadModule("plugin.host.codemarkers"); function verifyMarker(marker) { if (typeof marker !== 'number' || !isFinite(marker)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.6000")); } return marker; } function fire(marker) { host.fireCodeMarker(verifyMarker(marker)); } CodeMarkers.fire = fire; })(Internal.CodeMarkers || (Internal.CodeMarkers = {})); var CodeMarkers = Internal.CodeMarkers; })(VS.Internal || (VS.Internal = {})); var Internal = VS.Internal; })(Plugin.VS || (Plugin.VS = {})); var VS = Plugin.VS; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { "use strict"; var host = loadModule("plugin.host.core"); var controlCommands; (function (controlCommands) { controlCommands[controlCommands["none"] = 0] = "none"; controlCommands[controlCommands["portCreated"] = 1] = "portCreated"; controlCommands[controlCommands["portClosed"] = 2] = "portClosed"; controlCommands[controlCommands["portConnected"] = 3] = "portConnected"; controlCommands[controlCommands["controlInitialized"] = 4] = "controlInitialized"; controlCommands[controlCommands["hostReady"] = 5] = "hostReady"; controlCommands[controlCommands["event"] = 6] = "event"; controlCommands[controlCommands["error"] = 7] = "error"; controlCommands[controlCommands["initiateShutdown"] = 8] = "initiateShutdown"; controlCommands[controlCommands["shutdownComplete"] = 9] = "shutdownComplete"; })(controlCommands || (controlCommands = {})); ; (function (Utilities) { var EventImpl = (function () { function EventImpl(type, additionalProperties, target) { this.type = type; this.timeStamp = Date.now(); this.target = target; var eventObject = this; if (additionalProperties && typeof additionalProperties === "object") { Object.getOwnPropertyNames(additionalProperties).forEach(function (name) { var pd = Object.getOwnPropertyDescriptor(additionalProperties, name); Object.defineProperty(eventObject, name, pd); }); } } Object.defineProperty(EventImpl.prototype, "bubbles", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(EventImpl.prototype, "cancelable", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(EventImpl.prototype, "currentTarget", { get: function () { return this.target; }, enumerable: true, configurable: true }); Object.defineProperty(EventImpl.prototype, "defaultPrevented", { get: function () { return !!this._preventDefaultsCalled; }, enumerable: true, configurable: true }); Object.defineProperty(EventImpl.prototype, "trusted", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(EventImpl.prototype, "isTrusted", { get: function () { return false; }, enumerable: true, configurable: true }); Object.defineProperty(EventImpl.prototype, "CAPTURING_PHASE", { get: function () { return EventImpl.CAPTURING_PHASE; }, enumerable: true, configurable: true }); Object.defineProperty(EventImpl.prototype, "AT_TARGET", { get: function () { return EventImpl.AT_TARGET; }, enumerable: true, configurable: true }); Object.defineProperty(EventImpl.prototype, "BUBBLING_PHASE", { get: function () { return EventImpl.BUBBLING_PHASE; }, enumerable: true, configurable: true }); EventImpl.prototype.preventDefault = function () { this._preventDefaultsCalled = true; }; EventImpl.prototype.stopImmediatePropagation = function () { this._stopImmediatePropagationCalled = true; }; EventImpl.prototype.stopPropagation = function () { }; EventImpl.prototype.initEvent = function (eventTypeArg, canBubbleArg, cancelableArg) { }; EventImpl.supportForProcessing = false; EventImpl.NONE = 0; EventImpl.CAPTURING_PHASE = 1; EventImpl.AT_TARGET = 2; EventImpl.BUBBLING_PHASE = 3; return EventImpl; })(); EventImpl.prototype.eventPhase = 0; EventImpl.prototype.detail = null; var EventManager = (function () { function EventManager() { } EventManager.prototype.addEventListener = function (type, listener) { this.listeners = this.listeners || {}; var eventListeners = (this.listeners[type] = this.listeners[type] || []); for (var i = 0, len = eventListeners.length; i < len; i++) { var l = eventListeners[i]; if (l.listener === listener) { return; } } eventListeners.push({ listener: listener }); }; EventManager.prototype.dispatchEvent = function (type, eventArg) { var listeners = this.listeners && this.listeners[type]; var oneventAttribute = this.target && this.target["on" + type]; if (listeners || typeof oneventAttribute === "function") { var eventValue = new EventImpl(type, eventArg, this.target); if (listeners) { listeners = listeners.slice(0, listeners.length); for (var i = 0, len = listeners.length; i < len && !eventValue._stopImmediatePropagationCalled; i++) { listeners[i].listener(eventValue); } } if (typeof oneventAttribute === "function") { oneventAttribute(eventValue); } return eventValue.defaultPrevented || false; } return false; }; EventManager.prototype.removeEventListener = function (type, listener) { var listeners = this.listeners && this.listeners[type]; if (listeners) { for (var i = 0, len = listeners.length; i < len; i++) { var l = listeners[i]; if (l.listener === listener) { listeners.splice(i, 1); if (listeners.length === 0) { delete this.listeners[type]; } break; } } } }; EventManager.prototype.setTarget = function (value) { this.target = value; }; return EventManager; })(); Utilities.EventManager = EventManager; function marshalHostError(hostErrorObject) { var error = new Error(hostErrorObject.message + "\r\n" + hostErrorObject.stack); error.innerError = hostErrorObject.innerError; error.source = hostErrorObject.source; error.helpLink = hostErrorObject.helpLink; return error; } Utilities.marshalHostError = marshalHostError; function formatString(message, optionalParams) { var currentParameterIndex = 0; var currentSubstringIndex = 0; var result = ""; message = "" + message; while (currentSubstringIndex < message.length) { var replacementIndex = message.indexOf("%", currentSubstringIndex); if (replacementIndex === -1 || replacementIndex === message.length - 1) { result += message.substring(currentSubstringIndex); currentSubstringIndex = message.length; } else { result += message.substring(currentSubstringIndex, replacementIndex); currentSubstringIndex = replacementIndex + 1; var argumentValue = optionalParams[currentParameterIndex]; switch (message[currentSubstringIndex]) { case "d": case "i": if (typeof argumentValue !== "undefined") { if (typeof argumentValue === "number") { argumentValue = argumentValue >= 0 ? Math.floor(argumentValue) : Math.ceil(argumentValue); } else { argumentValue = parseInt(argumentValue); } if (argumentValue !== ~~argumentValue) { argumentValue = 0; } } result += argumentValue; currentParameterIndex++; currentSubstringIndex++; break; case "f": if (argumentValue === null) { argumentValue = 0; } else if (typeof argumentValue !== "undefined") { argumentValue = parseFloat(argumentValue); } result += argumentValue; currentParameterIndex++; currentSubstringIndex++; break; case "s": case "o": if (typeof argumentValue !== "undefined") { argumentValue = "" + argumentValue; } result += argumentValue; currentParameterIndex++; currentSubstringIndex++; break; case "%": result += "%"; currentSubstringIndex++; break; default: result += "%"; break; } } } for (var i = currentParameterIndex; i < optionalParams.length; i++) { result += optionalParams[i]; } return result; } Utilities.formatString = formatString; })(Plugin.Utilities || (Plugin.Utilities = {})); var Utilities = Plugin.Utilities; var defaultPort = 0; var headerDelimiter = "$"; var lastMessageId = 0; var awaitingResultList = []; var globalEventManager = new Utilities.EventManager(); var logger; (function (logger) { var messages = []; var domInitialized = false; function logMessageLocally(message) { if (!domInitialized) { messages.push(message); return; } else { var messagesDiv = document.getElementById("pluginMessages"); if (messagesDiv) { messagesDiv.innerHTML += "
          " + message; } } } if (document.body) { domInitialized = true; } else { globalEventManager.addEventListener("load", function () { domInitialized = true; if (messages) { for (var i = 0; i < messages.length; i++) { logMessageLocally(messages[i]); } messages = null; } ; }); } function log(message) { logMessageLocally(message); } logger.log = log; function logError(message) { log("Error: " + message); } logger.logError = logError; })(logger || (logger = {})); (function (PortState) { PortState[PortState["connected"] = 0] = "connected"; PortState[PortState["disconnected"] = 1] = "disconnected"; PortState[PortState["closed"] = 2] = "closed"; })(Plugin.PortState || (Plugin.PortState = {})); var PortState = Plugin.PortState; var PortImpl = (function () { function PortImpl(name) { this.name = name; this.eventManager = new Utilities.EventManager(); this.eventManager.setTarget(this); this._state = 1 /* disconnected */; } Object.defineProperty(PortImpl.prototype, "state", { get: function () { return this._state; }, enumerable: true, configurable: true }); PortImpl.prototype.removeEventListener = function (type, listener, useCapture) { this.eventManager.removeEventListener(type, listener); }; PortImpl.prototype.addEventListener = function (type, listener, useCapture) { this.eventManager.addEventListener(type, listener); }; PortImpl.prototype.dispatchEvent = function (evt) { return this.eventManager.dispatchEvent(evt); }; PortImpl.prototype.connect = function () { if (this._state !== 1 /* disconnected */) { return false; } var port = this; var cookie = portManager.registerPort(this.name, function onConnect() { if (port._state !== 1 /* disconnected */) { return; } port._state = 0 /* connected */; var eventArgs = { port: port }; port.eventManager.dispatchEvent("connect", eventArgs); }, function onDisconnect() { if (port._state !== 0 /* connected */) { return; } port._state = 1 /* disconnected */; }, function onMessage(message) { if (port._state !== 0 /* connected */) { return; } var eventArgs = { data: message }; port.eventManager.dispatchEvent("message", eventArgs); }); this._cookie = cookie; return true; }; PortImpl.prototype.postMessage = function (message) { if (this._state !== 0 /* connected */) { return; } portManager.postMessage(this._cookie, message); }; PortImpl.prototype.sendMessage = function (message) { if (this._state !== 0 /* connected */) { return; } return portManager.sendMessage(this._cookie, message); }; PortImpl.prototype.close = function () { if (this._state === 2 /* closed */) { return; } this._state = 2 /* closed */; portManager.unregisterPort(this._cookie); var eventArgs = {}; this.eventManager.dispatchEvent("close", eventArgs); }; return PortImpl; })(); var portManager; (function (portManager) { var registeredPorts = {}; var portNameLookupList = {}; var portIdLookupList = {}; var lastPortIndex = 1; function createPort(name) { if (typeof name !== "string" || name.length <= 0) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1001")); } if (portNameLookupList[name]) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1002") + "\r\n" + name); } return new PortImpl(name); } portManager.createPort = createPort; function registerPort(name, onConnect, onDisconnect, onMessage) { if (typeof name !== "string" || name.length <= 0) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1001")); } if (portNameLookupList[name]) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1002") + "\r\n" + name); } if (typeof onConnect !== "function") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1003")); } if (typeof onDisconnect !== "function") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1004")); } if (typeof onMessage !== "function") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1005")); } var cookie = ++lastPortIndex; registeredPorts[cookie] = portNameLookupList[name] = { id: null, name: name, onConnect: onConnect, onDisconnect: onDisconnect, onMessage: onMessage }; postMessageInternal(defaultPort, 1 /* portCreated */, [name]); return cookie; } portManager.registerPort = registerPort; function unregisterPort(cookie) { var entry = registeredPorts[cookie]; if (entry) { delete registeredPorts[cookie]; if (entry.name) { delete portNameLookupList[entry.name]; } if (entry.id) { delete portIdLookupList[entry.id]; } postMessageInternal(defaultPort, 2 /* portClosed */, [entry.name]); } } portManager.unregisterPort = unregisterPort; function postMessage(cookie, message) { if (!registeredPorts[cookie] || registeredPorts[cookie].id === null) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1006")); } postMessageInternal(registeredPorts[cookie].id, 0 /* none */, null, message); } portManager.postMessage = postMessage; function sendMessage(cookie, message) { if (!registeredPorts[cookie] || registeredPorts[cookie].id === null) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1006")); } return sendMessageInternal(registeredPorts[cookie].id, 0 /* none */, null, message); } portManager.sendMessage = sendMessage; function processPortConnectedMessage(id, name) { var entry = portNameLookupList[name]; if (entry) { entry.id = id; portIdLookupList[id] = entry; entry.onConnect(); } else { logger.logError("JSPlugin.1010\r\n" + name); } } portManager.processPortConnectedMessage = processPortConnectedMessage; function processPortClosedMessage(id) { var entry = portIdLookupList[id]; if (entry) { entry.onDisconnect(); } else { logger.logError("JSPlugin.1011\r\n" + id); } } portManager.processPortClosedMessage = processPortClosedMessage; function processMessage(id, message) { var entry = portIdLookupList[id]; if (entry) { entry.onMessage(message); } else { logger.logError("JSPlugin.1012\r\n" + id); } } portManager.processMessage = processMessage; })(portManager || (portManager = {})); function postMessageInternal(portId, command, args, payload, expectResult) { if (lastMessageId >= Infinity) { lastMessageId = 0; } var header = { msgId: ++lastMessageId, portId: portId }; if (command) { header.command = command; } if (args) { header.args = args; } if (expectResult) { header.replyRequested = true; } var message = JSON.stringify(header); if (payload) { message += headerDelimiter + payload; } var result; if (expectResult) { result = new Plugin.Promise(function (complete, error) { awaitingResultList[header.msgId] = { onComplete: complete, onError: error }; }); } host.postMessage(message); return result; } function sendMessageInternal(portId, command, args, payload) { return postMessageInternal(portId, command, args, payload, true); } function marshalHostError(hostErrorObject) { var error = new Error(hostErrorObject.message + "\r\n" + hostErrorObject.stack); error.innerError = hostErrorObject.innerError; error.source = hostErrorObject.source; error.helpLink = hostErrorObject.helpLink; return error; } var InitializationState; (function (InitializationState) { var isHostReady = false; var isDOMLoaded = false; function checkAndFirePluginReady() { if (isHostReady && isDOMLoaded) { globalEventManager.dispatchEvent("pluginready", {}); } } window.addEventListener("DOMContentLoaded", function () { isDOMLoaded = true; checkAndFirePluginReady(); }); function setHostReady() { globalEventManager.dispatchEvent("hostready", {}); isHostReady = true; checkAndFirePluginReady(); } InitializationState.setHostReady = setHostReady; })(InitializationState || (InitializationState = {})); host.messageReceived = function (message) { if (typeof message === "string") { var separatorIndex = message.indexOf(headerDelimiter); if (separatorIndex === -1) { separatorIndex = message.length; } var headerText = message.substr(0, separatorIndex); var header; try { header = JSON.parse(headerText); } catch (e) { logger.logError("JSPlugin.1013"); } var payload = message.substr(separatorIndex + 1); var eventArgs; var i; var port; var portList; var portListItem; if (header.replyId > 0) { var entry = awaitingResultList[header.replyId]; if (entry) { delete awaitingResultList[header.replyId]; switch (header.command) { case 0 /* none */: entry.onComplete(payload); break; case 7 /* error */: if (!header.args || !header.args.length) { logger.logError("JSPlugin.1014"); } entry.onError(header.args[0]); break; default: logger.logError("JSPlugin.1015"); entry.onError(new Error(Plugin.Resources.getErrorString("JSPlugin.1015"))); break; } } else if (header.command === 7 /* error */) { if (header.args && header.args[0]) { throw marshalHostError(header.args[0]); } else { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1007")); } } } else if (header.portId > defaultPort && header.command === 0 /* none */) { portManager.processMessage(header.portId, payload); } else { switch (header.command) { case 5 /* hostReady */: InitializationState.setHostReady(); break; case 2 /* portClosed */: if (!header.args || !header.args.length) { logger.logError("JSPlugin.1016"); } var closedPortId = header.args[0]; if (typeof closedPortId !== "number") { logger.logError("JSPlugin.1016"); return; } portManager.processPortClosedMessage(closedPortId); break; case 3 /* portConnected */: if (!header.args || !header.args.length) { logger.logError("JSPlugin.1017"); } var connectedPortId = header.args[0]; var connectedPortName = header.args[1]; if (typeof connectedPortId !== "number" || typeof connectedPortName !== "string") { logger.logError("JSPlugin.1017"); return; } portManager.processPortConnectedMessage(connectedPortId, connectedPortName); break; case 6 /* event */: if (!header.args || !header.args.length) { logger.logError("JSPlugin.1018"); } var eventName = header.args[0]; eventArgs = header.args[1]; if (typeof eventName !== "string") { logger.logError("JSPlugin.1018"); } globalEventManager.dispatchEvent(eventName, eventArgs); break; case 8 /* initiateShutdown */: globalEventManager.dispatchEvent("close", eventArgs); postMessageInternal(defaultPort, 9 /* shutdownComplete */); break; default: var error; if (header.args && header.args.length) { error = marshalHostError(header.args[0]); } else { error = new Error(Plugin.Resources.getErrorString("JSPlugin.1007")); } throw error; } } } }; function attachToPublishedObject(name, objectDefinition, messageHandler, closeHandler, createOnFirstUse) { if (typeof name !== "string") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1008")); } if (typeof messageHandler !== "function") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.1009")); } var interfacePortName = name; var interfaceObject = objectDefinition || {}; var pendingMessages = []; var portConnectInitiated = false; interfaceObject._forceConnect = function () { if (!portConnectInitiated) { port.connect(); portConnectInitiated = true; } }; interfaceObject._postMessage = function (message) { pendingMessages.push({ message: message }); interfaceObject._forceConnect(); }; interfaceObject._sendMessage = function (message) { var result = new Plugin.Promise(function (complete, error) { pendingMessages.push({ message: message, onComplete: complete, onError: error }); }); interfaceObject._forceConnect(); return result; }; var port = portManager.createPort(interfacePortName); port.addEventListener("connect", function onConnect(e) { port.removeEventListener("connect", onConnect); port.addEventListener("message", function (eventArg) { var serializedMessage = eventArg.data; messageHandler(serializedMessage); }); if (typeof closeHandler === "function") { port.addEventListener("close", closeHandler); } interfaceObject._postMessage = function (message) { return port.postMessage(message); }; interfaceObject._sendMessage = function (message) { return port.sendMessage(message); }; pendingMessages.forEach(function (m) { if (m.onComplete) { port.sendMessage(m.message).done(function (callbackMessage) { m.onComplete(callbackMessage); }, function (error) { m.onError(error); }); } else { port.postMessage(m.message); } }); pendingMessages = null; }); if (!createOnFirstUse) { interfaceObject._forceConnect(); } return interfaceObject; } Plugin.attachToPublishedObject = attachToPublishedObject; function _logError(message) { logger.logError(message); } Plugin._logError = _logError; function addEventListener(type, listener) { globalEventManager.addEventListener(type, listener); } Plugin.addEventListener = addEventListener; function removeEventListener(type, listener) { globalEventManager.removeEventListener(type, listener); } Plugin.removeEventListener = removeEventListener; function createPort(name) { return portManager.createPort(name); } Plugin.createPort = createPort; globalEventManager.setTarget(Plugin); window.addEventListener("load", function () { globalEventManager.dispatchEvent("load", {}); }); globalEventManager.addEventListener("load", function () { var elements = document.getElementsByTagName("*"); for (var i = 0; i < elements.length; i++) { if (elements[i].nodeName === "INPUT" || elements[i].nodeName === "TEXTAREA") { elements[i].className += " selectElement"; } else { elements[i].className += " selectNone"; } } }); document.oncontextmenu = function () { return false; }; document.ondragstart = function () { return false; }; postMessageInternal(defaultPort, 4 /* controlInitialized */); })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Culture) { "use strict"; var host = loadModule("plugin.host.culture"); Culture.dir = ""; Culture.lang = ""; Culture.formatRegion = ""; Culture.DateTimeFormat = {}; Culture.NumberFormat = {}; var domInitialized = false; var eventManager = new Plugin.Utilities.EventManager(); eventManager.setTarget({}); host.addEventListener("cultureinitialize", function (eventArgs) { if (!setCultureInfoAndAttributes(eventArgs.language, eventArgs.direction, eventArgs.formatRegion, eventArgs.dateTimeFormat, eventArgs.numberFormat)) { Plugin.addEventListener("load", function () { return setCultureInfoAndAttributes(eventArgs.language, eventArgs.direction, eventArgs.formatRegion, eventArgs.dateTimeFormat, eventArgs.numberFormat); }); } }); host.addEventListener("culturechanged", function (eventArgs) { setCultureInfoAndAttributes(eventArgs.language, eventArgs.direction, eventArgs.formatRegion, eventArgs.dateTimeFormat, eventArgs.numberFormat); eventManager.dispatchEvent("culturechanged"); }); function setCultureInfoAndAttributes(language, direction, _formatRegion, dateTimeFormat, numberFormat) { Culture.lang = language; Culture.dir = direction; Culture.formatRegion = _formatRegion; Culture.DateTimeFormat = dateTimeFormat; Culture.NumberFormat = numberFormat; if (!domInitialized) { var htmlTags = document.getElementsByTagName("html"); if (htmlTags.length > 0) { domInitialized = true; htmlTags[0].dir = Culture.dir; htmlTags[0].lang = Culture.lang; eventManager.dispatchEvent("cultureinitialize"); } else { return false; } } return true; } function addEventListener(type, listener) { eventManager.addEventListener(type, listener); } Culture.addEventListener = addEventListener; function removeEventListener(type, listener) { eventManager.removeEventListener(type, listener); } Culture.removeEventListener = removeEventListener; })(Plugin.Culture || (Plugin.Culture = {})); var Culture = Plugin.Culture; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Diagnostics) { "use strict"; var host = loadModule("plugin.host.diagnostics"); function onerror(message, uri, lineNumber, columnNumber, error) { if (error) { message = error; } reportError(message, uri, lineNumber, [], columnNumber); terminate(); return true; } Diagnostics.onerror = onerror; window.onerror = onerror; function reportError(error, uri, lineNumber, additionalInfo, columnNumber) { var message; var lineNumberText; var columnNumberText; if (error instanceof Error) { message = error.message ? error.message.toString() : null; var originalAdditionalInfo = additionalInfo; if (error && error.number && (typeof error.number === "number")) { additionalInfo = "Error number: 0x" + (error.number >>> 0).toString(16) + "\r\n"; } additionalInfo += "Stack: " + error.stack; if (originalAdditionalInfo) { var additionalInfoString = originalAdditionalInfo.toString(); if (additionalInfoString && additionalInfoString.length > 0) { additionalInfo += "\r\n\r\nAdditional Info: " + additionalInfoString; } } } else { message = error ? error.toString() : null; additionalInfo = additionalInfo ? additionalInfo.toString() : null; } uri = uri ? uri.toString() : null; lineNumberText = lineNumber ? lineNumber.toString() : null; columnNumberText = columnNumber ? columnNumber.toString() : null; return host.reportError(message, uri, lineNumberText, additionalInfo, columnNumberText); } Diagnostics.reportError = reportError; function terminate() { host.terminate(); } Diagnostics.terminate = terminate; })(Plugin.Diagnostics || (Plugin.Diagnostics = {})); var Diagnostics = Plugin.Diagnostics; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Host) { "use strict"; var host = loadModule("plugin.host"); function showDocument(documentPath, line, col) { return host.showDocument("" + documentPath, +line, +col); } Host.showDocument = showDocument; ; function getDocumentLocation(documentPath) { return host.getDocumentLocation("" + documentPath); } Host.getDocumentLocation = getDocumentLocation; ; function supportsAllowSetForeground() { return host.supportsAllowSetForeground(); } Host.supportsAllowSetForeground = supportsAllowSetForeground; function allowSetForeground(processId) { return host.allowSetForeground(processId); } Host.allowSetForeground = allowSetForeground; ; })(Plugin.Host || (Plugin.Host = {})); var Host = Plugin.Host; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Utilities) { (function (JSONMarshaler) { "use strict"; function attachToPublishedObject(name, objectDefinition, createOnFirstUse) { var eventManager = new Plugin.Utilities.EventManager(); var interfaceObject = Plugin.attachToPublishedObject(name, objectDefinition, function onMessage(serializedMessage) { if (typeof serializedMessage === "string") { var message = JSON.parse(serializedMessage); if (typeof message.eventName === "string") { eventManager.dispatchEvent(message.eventName, message.arg); } else { Plugin._logError("JSPlugin.2000"); } } else { Plugin._logError("JSPlugin.2001"); } }, function onClose(error) { Plugin._logError("JSPlugin.2002\r\n" + name); }, createOnFirstUse); eventManager.setTarget(interfaceObject); interfaceObject._post = function (name) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } var message = { method: name, args: args.length ? args : undefined }; this._postMessage(JSON.stringify(message)); }; interfaceObject._call = function (name) { var message = { method: name, args: arguments.length > 1 ? Array.prototype.slice.call(arguments, 1) : undefined }; return this._sendMessage(JSON.stringify(message)).then(function (responseText) { var response = JSON.parse(responseText); return response.result; }); }; if (createOnFirstUse) { interfaceObject.addEventListener = function (type, listener) { interfaceObject._forceConnect(); eventManager.addEventListener(type, listener); interfaceObject.addEventListener = eventManager.addEventListener.bind(eventManager); }; } else { interfaceObject.addEventListener = eventManager.addEventListener.bind(eventManager); } interfaceObject.removeEventListener = eventManager.removeEventListener.bind(eventManager); return interfaceObject; } JSONMarshaler.attachToPublishedObject = attachToPublishedObject; })(Utilities.JSONMarshaler || (Utilities.JSONMarshaler = {})); var JSONMarshaler = Utilities.JSONMarshaler; })(Plugin.Utilities || (Plugin.Utilities = {})); var Utilities = Plugin.Utilities; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { "use strict"; var host = loadModule("plugin.host.output"); function log(message) { var optionalParams = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { optionalParams[_i] = arguments[_i + 1]; } host.log(Plugin.Utilities.formatString(message, optionalParams)); } Plugin.log = log; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Resources) { "use strict"; var host = loadModule("plugin.host.resources"); var defaultAlias = "Resources"; var error = "An error has occurred. Please try the operation again. You can search for the error online: "; var resourceMap = {}; var formatRegEx = /\{{2}|\{(\d+)\}|\}{2}|\{|\}/g; function processResourceChangeEvent(eventArgs) { if (typeof eventArgs.GenericError !== "string" || eventArgs.GenericError === "") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.3000")); } error = eventArgs.GenericError; var resources = eventArgs.ResourceMap; if (!resources) { Plugin._logError("JSPlugin.3001"); return; } resourceMap = resources; var defaultResource = eventArgs.DefaultAlias; if (defaultResource) { defaultAlias = defaultResource; } } host.addEventListener("resourcesinitialized", processResourceChangeEvent); host.addEventListener("resourceschanged", processResourceChangeEvent); function format(resourceId, format, args) { return format.replace(formatRegEx, function (match, index) { var replacer; switch (match) { case "{{": replacer = "{"; break; case "}}": replacer = "}"; break; case "{": case "}": throw new Error(Plugin.Resources.getErrorString("JSPlugin.3002")); default: var argsIndex = parseInt(index); if (args && args.length - 1 >= argsIndex) { replacer = args[argsIndex]; } else { throw new Error(Plugin.Resources.getErrorString("JSPlugin.3003") + " (resourceId = " + resourceId + ")"); } break; } if (typeof replacer === "undefined" || replacer === null) { replacer = ""; } if (typeof replacer !== "string") { replacer = replacer.toString(); } return replacer; }); } function getString(resourceId) { var args = []; for (var _i = 0; _i < (arguments.length - 1); _i++) { args[_i] = arguments[_i + 1]; } if (typeof resourceId !== "string" || resourceId === "") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.3004")); } var fileName = defaultAlias; var key = ""; var value = ""; var idParts = resourceId.split("/"); switch (idParts.length) { case 1: key = idParts[0]; break; case 3: fileName = idParts[1]; key = idParts[2]; break; default: throw new Error(Plugin.Resources.getErrorString("JSPlugin.3004")); } if (!resourceMap[fileName] || !resourceMap[fileName][key]) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.3005")); } value = resourceMap[fileName][key]; if (args.length > 0) { value = format(resourceId, value, args); } return value; } Resources.getString = getString; function getErrorString(errorId) { if (typeof errorId !== "string" || errorId === "") { throw new Error(error + "JSPlugin.3006"); } return error + errorId; } Resources.getErrorString = getErrorString; function addEventListener(name, callback) { host.addEventListener(name, callback); } Resources.addEventListener = addEventListener; function removeEventListener(name, callback) { host.removeEventListener(name, callback); } Resources.removeEventListener = removeEventListener; })(Plugin.Resources || (Plugin.Resources = {})); var Resources = Plugin.Resources; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Storage) { "use strict"; var host = loadModule("plugin.host.storage"); var TypeScriptFix; (function (FileAccess) { FileAccess[FileAccess["read"] = 1] = "read"; FileAccess[FileAccess["write"] = 2] = "write"; FileAccess[FileAccess["readWrite"] = 3] = "readWrite"; })(Storage.FileAccess || (Storage.FileAccess = {})); var FileAccess = Storage.FileAccess; (function (FileDialogMode) { FileDialogMode[FileDialogMode["open"] = 0] = "open"; FileDialogMode[FileDialogMode["save"] = 1] = "save"; })(Storage.FileDialogMode || (Storage.FileDialogMode = {})); var FileDialogMode = Storage.FileDialogMode; (function (FileMode) { FileMode[FileMode["createNew"] = 1] = "createNew"; FileMode[FileMode["create"] = 2] = "create"; FileMode[FileMode["open"] = 3] = "open"; FileMode[FileMode["openOrCreate"] = 4] = "openOrCreate"; FileMode[FileMode["truncate"] = 5] = "truncate"; FileMode[FileMode["append"] = 6] = "append"; })(Storage.FileMode || (Storage.FileMode = {})); var FileMode = Storage.FileMode; (function (FileShare) { FileShare[FileShare["none"] = 0] = "none"; FileShare[FileShare["read"] = 1] = "read"; FileShare[FileShare["write"] = 2] = "write"; FileShare[FileShare["readWrite"] = 3] = "readWrite"; FileShare[FileShare["delete"] = 4] = "delete"; })(Storage.FileShare || (Storage.FileShare = {})); var FileShare = Storage.FileShare; (function (FileType) { FileType[FileType["binary"] = 0] = "binary"; FileType[FileType["text"] = 1] = "text"; })(Storage.FileType || (Storage.FileType = {})); var FileType = Storage.FileType; (function (FilePersistence) { FilePersistence[FilePersistence["permanent"] = 0] = "permanent"; FilePersistence[FilePersistence["temporary"] = 1] = "temporary"; })(Storage.FilePersistence || (Storage.FilePersistence = {})); var FilePersistence = Storage.FilePersistence; (function (SeekOrigin) { SeekOrigin[SeekOrigin["begin"] = 0] = "begin"; SeekOrigin[SeekOrigin["current"] = 1] = "current"; SeekOrigin[SeekOrigin["end"] = 2] = "end"; })(Storage.SeekOrigin || (Storage.SeekOrigin = {})); var SeekOrigin = Storage.SeekOrigin; var HostFile = (function () { function HostFile(streamId, options) { this.maxBuffer = 32 * 1024; this.id = streamId; this.options = options; } Object.defineProperty(HostFile.prototype, "streamId", { get: function () { return this.id; }, enumerable: true, configurable: true }); HostFile.prototype.close = function () { return host.closeFile(this.streamId); }; HostFile.prototype.read = function (count) { if (!isNullOrUndefined(count) && !isInteger(count)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7005")); } if (isNullOrUndefined(count)) { var concatStart; if (this.options.type === 0 /* binary */) { concatStart = []; } else { concatStart = ""; } return this.readAllHelper(concatStart); } else { return host.read(this.streamId, count, this.options.type); } }; HostFile.prototype.seek = function (offset, origin) { if (!isInteger(offset)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7000")); } if (isNullOrUndefined(origin)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7001")); } return host.seek(this.streamId, offset, origin); }; HostFile.prototype.write = function (data, offset, count) { if (typeof data !== "string" && !(data instanceof Array)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7002")); } if (!isNullOrUndefined(offset) && !isInteger(offset)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7000")); } offset = offset || 0; if (!isNullOrUndefined(count) && !isInteger(count)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7007")); } count = count || data.length; return host.write(this.streamId, data, offset, count, this.options.type); }; HostFile.prototype.readAllHelper = function (content) { var _this = this; return host.read(this.streamId, this.maxBuffer, this.options.type).then(function (result) { if (result === null || result.length === 0) { return content; } else { return _this.readAllHelper(content.concat(result)); } }); }; return HostFile; })(); function getFileList(path, persistence, index, count) { if (!isNullOrUndefined(path) && typeof path !== "string") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7003")); } if (!isNullOrUndefined(index) && !isInteger(index)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7008")); } if (!isNullOrUndefined(count) && !isInteger(count)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7005")); } return host.getFileList(path, persistence, index, count); } Storage.getFileList = getFileList; function createFile(path, options) { if (!isNullOrUndefined(path) && typeof path !== "string") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7006")); } var fileOptions = getDefaultFileOptions(options); fileOptions.mode = 1 /* createNew */; return host.openFile(path, fileOptions).then(function (streamId) { return new HostFile(streamId, fileOptions); }); } Storage.createFile = createFile; function openFile(path, options) { if (typeof path !== "string" || path === "") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.7003")); } var fileOptions = getDefaultFileOptions(options); return host.openFile(path, fileOptions).then(function (streamId) { return new HostFile(streamId, fileOptions); }); } Storage.openFile = openFile; function openFileDialog(dialogOptions, fileOptions) { var openDialogOptions = getDefaultFileDialogOptions(dialogOptions); var openFileOptions = getDefaultFileOptions(fileOptions); return host.fileDialog(0 /* open */, openDialogOptions, openFileOptions).then(function (streamId) { if (streamId !== null && streamId !== "") { return new HostFile(streamId, openFileOptions); } }); } Storage.openFileDialog = openFileDialog; function saveFileDialog(dialogOptions, fileOptions) { var saveDialogOptions = getDefaultFileDialogOptions(dialogOptions); var saveFileOptions = getDefaultFileOptions(fileOptions); saveFileOptions.mode = 4 /* openOrCreate */; return host.fileDialog(1 /* save */, saveDialogOptions, saveFileOptions).then(function (streamId) { if (streamId !== null && streamId !== "") { return new HostFile(streamId, saveFileOptions); } }); } Storage.saveFileDialog = saveFileDialog; function getDefaultFileOptions(options) { var fileOptions = { access: 3 /* readWrite */, encoding: "UTF-8", mode: 3 /* open */, persistence: 1 /* temporary */, share: 0 /* none */, type: 1 /* text */ }; if (options) { fileOptions.access = isNullOrUndefined(options.access) ? fileOptions.access : options.access; fileOptions.encoding = options.encoding || fileOptions.encoding; fileOptions.mode = isNullOrUndefined(options.mode) ? fileOptions.mode : options.mode; fileOptions.persistence = isNullOrUndefined(options.persistence) ? fileOptions.persistence : options.persistence; fileOptions.share = isNullOrUndefined(options.share) ? fileOptions.share : options.share; fileOptions.type = isNullOrUndefined(options.type) ? fileOptions.type : options.type; } return fileOptions; } function getDefaultFileDialogOptions(options) { var dialogOptions = { name: "", extensions: [], extensionsIndex: 0, initialDirectory: "", title: "" }; if (options) { dialogOptions.name = options.name || dialogOptions.name; dialogOptions.extensions = options.extensions || dialogOptions.extensions; dialogOptions.extensionsIndex = options.extensionsIndex || dialogOptions.extensionsIndex; dialogOptions.initialDirectory = options.initialDirectory || dialogOptions.initialDirectory; dialogOptions.title = options.title || dialogOptions.title; } return dialogOptions; } function isInteger(value) { return ((parseFloat(value) === parseInt(value)) && !isNaN(value)); } function isNullOrUndefined(value) { return (value === null || typeof value === "undefined"); } })(Plugin.Storage || (Plugin.Storage = {})); var Storage = Plugin.Storage; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Settings) { "use strict"; var host = loadModule("plugin.host.settings"); function get(collection, requestedProperties) { return host.get(collection, requestedProperties); } Settings.get = get; ; function set(collection, toSet) { return host.set(collection, toSet); } Settings.set = set; ; })(Plugin.Settings || (Plugin.Settings = {})); var Settings = Plugin.Settings; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Theme) { "use strict"; var host = loadModule("plugin.host.theme"); var domInitialized = false; var isInitial = false; var tokenMap = {}; var pluginCss; var tempElement; var rgbaRegEx = /[^0-9]+/g; var declarationRegEx = /^(\s*)([\w\-]+)\s*:\s*([^;^\{\*]+|url\([^\)]+\));\s*\/\*\s*\[([^\[\]]+)\]\s*\*\/(.*)$/gm; var rgbaValueRegex = /\(([^\)]+)\)/; var tokenNameRegex = /\s*([\{\}\w\-]*)/; var rgbaOrHCOnlyFragmentRegex = /(?:\s+((?:rgba\s*\([^\)]+\))|(?:\!HCOnly)))?/; var tokenRegEx = new RegExp("\\{" + tokenNameRegex.source + rgbaOrHCOnlyFragmentRegex.source + rgbaOrHCOnlyFragmentRegex.source + "\\s*\\}", "igm"); var undefinedRegEx = /undefined|null/; var eventManager = new Plugin.Utilities.EventManager(); eventManager.setTarget(host); host.addEventListener("themeinitialize", function (eventArgs) { pluginCss = eventArgs.PluginCss; if (!pluginCss) { Plugin._logError("JSPlugin.4000"); return; } updateTheme(eventArgs.themeMap, true, eventArgs.isHighContrastTheme); eventManager.dispatchEvent("themeinitialize"); }); host.addEventListener("themechanged", function (eventArgs) { updateTheme(eventArgs.themeMap, false, eventArgs.isHighContrastTheme); eventManager.dispatchEvent("themechanged"); }); function updateTheme(themeMap, isFirst, isHighContrast) { tokenMap = themeMap; if (!tokenMap) { Plugin._logError("JSPlugin.4001"); return; } isInitial = isFirst; processCssFiles(isHighContrast); _cssHelpers.processImages(document); } function getValue(key) { if (!tokenMap[key]) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.4002")); } return tokenMap[key]; } Theme.getValue = getValue; function processCssFiles(isHighContrast) { if (!pluginCss) return; var pluginStyle = document.createElement("style"); pluginStyle.type = "text/css"; pluginStyle.innerHTML = tokenReplaceContents(pluginCss, isHighContrast); var firstNode = document.head.firstChild; if (firstNode) { document.head.insertBefore(pluginStyle, firstNode); if (firstNode.id === "pluginCss") { document.head.removeChild(firstNode); } } else { document.head.firstChild = pluginStyle; } pluginStyle.id = "pluginCss"; var cssThemeFiles = (document.querySelectorAll("[data-plugin-theme='true']")); if (isInitial && cssThemeFiles.length === 0) { host.fireThemeReady(); return; } for (var i = 0; i < cssThemeFiles.length; i++) { var styleNode = cssThemeFiles[i]; var href = (!styleNode.href ? styleNode.getAttribute("data-plugin-theme-href") : styleNode.href); var fireThemeReady = (isInitial && (i === cssThemeFiles.length - 1)); _cssHelpers.processCssFileContents(href, document, styleNode, fireThemeReady, isHighContrast); } } (function (_cssHelpers) { function processCssFileContents(href, targetDoc, refNode, fireThemeReady, isHighContrast) { return host.getCssFile(href).done(function (contents) { if (contents) { contents = tokenReplaceContents(contents, isHighContrast); var newStyle = targetDoc.createElement("style"); newStyle.setAttribute("data-plugin-theme", "true"); newStyle.setAttribute("data-plugin-theme-href", href); newStyle.type = "text/css"; newStyle.innerHTML = contents; if (refNode) { if (!refNode.parentNode) { return; } targetDoc.head.insertBefore(newStyle, refNode); targetDoc.head.removeChild(refNode); newStyle.id = refNode.id; } else { targetDoc.head.appendChild(newStyle); } } if (fireThemeReady) { host.fireThemeReady(); } }, function (e) { if (fireThemeReady) { host.fireThemeReady(); } Plugin._logError("JSPlugin.4003\r\n" + e.message + "\r\n" + e.stack); }); } _cssHelpers.processCssFileContents = processCssFileContents; function processImages(targetDoc) { var images = targetDoc.querySelectorAll("[data-plugin-theme-src]"); for (var i = 0; i < images.length; i++) { images[i].src = getValue(images[i].getAttribute("data-plugin-theme-src")); } } _cssHelpers.processImages = processImages; })(Theme._cssHelpers || (Theme._cssHelpers = {})); var _cssHelpers = Theme._cssHelpers; function getRGBACandidate(candidate1, candidate2) { if (candidate1 && (candidate1.match(/rgba/i) !== null)) { return candidate1; } else if (candidate2 && (candidate2.match(/rgba/i) !== null)) { return candidate2; } return null; } function tokenReplaceContents(contents, isHighContrast) { return contents.replace(declarationRegEx, function (declaration, indent, property, defaultValue, replacer, suffix) { var replaceCount = 0; var newValue = replacer.replace(tokenRegEx, function (tokenMatch, token, rgbaOrHCOnlyMatch1, rgbaOrHCOnlyMatch2) { var isHCOnly = false; if (rgbaOrHCOnlyMatch1 && (rgbaOrHCOnlyMatch1.toUpperCase() === "!HCONLY")) { isHCOnly = true; } else if (rgbaOrHCOnlyMatch2 && (rgbaOrHCOnlyMatch2.toUpperCase() === "!HCONLY")) { isHCOnly = true; } if (isHCOnly && ((typeof isHighContrast !== "undefined") && !isHighContrast)) { return null; } replaceCount++; var colorValue = tokenMap[token]; var rgbaMatch = getRGBACandidate(rgbaOrHCOnlyMatch1, rgbaOrHCOnlyMatch2); if (rgbaMatch) { var rgbaValArr = rgbaMatch.match(rgbaValueRegex); var rgba = "1.0"; if (rgbaValArr && rgbaValArr.length >= 1) { rgba = rgbaValArr[0].replace(/\(|\)|\s/g, ""); } tempElement = tempElement || document.createElement("div"); tempElement.style.backgroundColor = colorValue; var parts = tempElement.style.backgroundColor.split(","); if (parts.length === 3) { var rgbParts = []; for (var i = 0; i < 3; i++) { rgbParts.push(parseInt(parts[i].replace(rgbaRegEx, ''), 10)); } tempElement.style.backgroundColor = "rgba(" + rgbParts.join(", ") + ", " + rgba + ")"; colorValue = tempElement.style.backgroundColor; } } return colorValue; }); if (replaceCount === 0 || newValue.match(undefinedRegEx)) { newValue = defaultValue; } return indent + property + ": " + newValue + ";" + suffix; }); } function addEventListener(type, listener) { return eventManager.addEventListener(type, listener); } Theme.addEventListener = addEventListener; function removeEventListener(type, listener) { return eventManager.removeEventListener(type, listener); } Theme.removeEventListener = removeEventListener; })(Plugin.Theme || (Plugin.Theme = {})); var Theme = Plugin.Theme; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (Tooltip) { "use strict"; ; ; ; Tooltip.defaultTooltipContentToHTML = true; var host = loadModule("plugin.host.tooltip"); var tooltipOffsetY = 15; var defaultDelay; var hasShownTooltipPopup = false; var tooltipObject = null; var tooltipReset = true; var scheduledShow; var scheduledDismiss; var mousePosition = { clientX: 0, clientY: 0, screenX: 0, screenY: 0 }; var popupMeasureContainer; function canCreatePopup() { return host.canCreatePopup(); } function invalidatePopupTooltipDocumentCache() { hasShownTooltipPopup = false; } Tooltip.invalidatePopupTooltipDocumentCache = invalidatePopupTooltipDocumentCache; function hostContentInPopup(displayParameters) { var useCachedDocument = (hasShownTooltipPopup && ((typeof displayParameters.useCachedDocument === 'undefined') || (typeof displayParameters.useCachedDocument === 'boolean' && displayParameters.useCachedDocument))); if (!useCachedDocument) { var dir = Plugin.Culture.dir; var lang = Plugin.Culture.lang; var docTypeTag = ""; var htmlAttributes = "xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"" + lang + "\" dir=\"" + dir + "\" style=\"overflow: hidden\""; var htmlOpenTag = ""; var headOpenTag = ""; var modeTag = ""; var charSetTag = ""; var headCloseTag = ""; var preContentHTML = docTypeTag + htmlOpenTag + headOpenTag + modeTag + charSetTag; var styles = document.head.querySelectorAll("style, link[type='text/css']"); for (var i = 0; i < styles.length; i++) { var styleElement = styles[i]; var node = document.createElement(styleElement.nodeName); var attributes = styleElement.attributes; for (var j = 0; j < attributes.length; j++) { if (attributes[j].specified) { node.setAttribute(attributes[j].nodeName, attributes[j].nodeValue); } } node.innerHTML = styleElement.innerHTML; preContentHTML += node.outerHTML; } var bodyOpenTag = ""; preContentHTML += headCloseTag + bodyOpenTag; var bodyCloseTag = ""; var finalHTML = preContentHTML + displayParameters.content + bodyCloseTag; displayParameters.content = finalHTML; } if (!hasShownTooltipPopup) { hasShownTooltipPopup = true; } host.hostContentInPopup(displayParameters); } ; function dismissPopup() { host.dismissPopup(); } ; function resetTooltip(tooltip) { if (tooltip) { var contentDiv = tooltip["contentDiv"]; contentDiv.innerHTML = ""; tooltip["parent"] = null; tooltipReset = true; } } function dismissTooltip(reset) { var parent = null; if (scheduledShow) { clearTimeout(scheduledShow); scheduledShow = null; } if (scheduledDismiss) { clearTimeout(scheduledDismiss); scheduledDismiss = null; } if (tooltipObject) { parent = tooltipObject.parent; var usingPopup = canCreatePopup(); if (usingPopup) { dismissPopup(); } else { if (document.body.contains(tooltipObject)) { document.body.removeChild(tooltipObject); } tooltipObject.style.display = "none"; } if (typeof reset === "undefined" || reset) { resetTooltip(tooltipObject); } } __n("TooltipDismiss", tooltipObject, parent, (typeof reset === "undefined" || reset)); } function dismissTooltipOfParent(element, reset) { if (tooltipObject && tooltipObject.parent === element) { dismissTooltip(reset); } } function createOuterTooltipDiv() { var tooltip = document.createElement("div"); tooltip.setAttribute("id", "plugin-vs-tooltip"); return tooltip; } function createNestedCellDiv() { var nestedCellDiv = document.createElement("div"); nestedCellDiv.setAttribute("id", "plugin-vs-tooltip-nested-cell"); return nestedCellDiv; } function createContentDiv() { var contentDiv = document.createElement("div"); contentDiv.setAttribute("id", "plugin-vs-tooltip-content"); return contentDiv; } function createPopupMeasureContainer() { var measureContainer = document.createElement("div"); measureContainer["style"]["position"] = "absolute"; measureContainer["style"]["display"] = "none"; document.body.appendChild(measureContainer); return measureContainer; } function createTooltip() { var outerMostDiv = createOuterTooltipDiv(); var nestedCellDiv = createNestedCellDiv(); outerMostDiv.appendChild(nestedCellDiv); var contentDiv = createContentDiv(); nestedCellDiv.appendChild(contentDiv); outerMostDiv["contentDiv"] = contentDiv; return outerMostDiv; } function createBlankTooltip() { if (!tooltipReset) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.4004")); } var tooltip = tooltipObject; if (tooltip === null) { tooltip = tooltipObject = createTooltip(); tooltip.contentDiv.addEventListener("mouseover", function () { tooltip.style.display = "none"; __n("TooltipDismiss", tooltip, tooltip.parent, false); }); } return tooltip; } var htmlEncodingDiv = null; function htmlEncode(content) { if (!htmlEncodingDiv) { htmlEncodingDiv = document.createElement("div"); } htmlEncodingDiv.innerText = content; return htmlEncodingDiv.innerHTML; } function createNewTooltipFromContent(config) { var tooltip = createBlankTooltip(); var pContent = tooltip["contentDiv"]; if (pContent) { var hasValidContainsHTMLProperty = typeof config.contentContainsHTML === 'boolean'; var containsHTML = hasValidContainsHTMLProperty ? config.contentContainsHTML : Plugin.Tooltip.defaultTooltipContentToHTML; if (typeof config.content === "string") { pContent.innerHTML = containsHTML ? config.content : htmlEncode(config.content); Plugin.Theme._cssHelpers.processImages(pContent); } else if (config.content) { pContent.innerText = config.content; } } return tooltip; } function createNewTooltipFromString(contentString) { var tooltip = createBlankTooltip(); if (tooltip && contentString) { var pContent = tooltip["contentDiv"]; if (pContent) { pContent.innerText = contentString; } } return tooltip; } function adjustXPosForClientRight(x, width) { var distToClientRight = document.documentElement.clientWidth - (x + width); if (distToClientRight < 0) { x = document.documentElement.clientWidth - (width + 1); } return x; } function adjustYPosForClientBottom(y, height, yOffset) { var distToClientBottom = document.documentElement.clientHeight - (y + height); if (distToClientBottom < 0) { y -= (height + 2 * yOffset + 1); if (y < 0) { y = 0; } } return y; } function styleBoxSizingIsBorderBox(style) { var boxSizingMode = style["box-sizing"]; return ((typeof boxSizingMode === "string") && (boxSizingMode.toLowerCase() === "border-box")); } function convertOffsetHeightToHeight(offsetHeight, style) { if (styleBoxSizingIsBorderBox(style)) { return offsetHeight; } var topBorderWidth = parseInt(style["border-top-width"], 10); var bottomBorderWidth = parseInt(style["border-bottom-width"], 10); var topPadding = parseInt(style["padding-top"], 10); var bottomPadding = parseInt(style["padding-bottom"], 10); return (offsetHeight - (topBorderWidth + bottomBorderWidth + topPadding + bottomPadding)); } function convertOffsetWidthToWidth(offsetWidth, style) { if (styleBoxSizingIsBorderBox(style)) { return offsetWidth; } var leftBorderWidth = parseInt(style["border-right-width"], 10); var rightBorderWidth = parseInt(style["border-left-width"], 10); var leftPadding = parseInt(style["padding-left"], 10); var rightPadding = parseInt(style["padding-right"], 10); return (offsetWidth - (leftBorderWidth + rightBorderWidth + leftPadding + rightPadding)); } function setLeftTopWidthHeight(element, settings) { if (settings.width) { element.style.width = settings.width; } if (settings.height) { element.style.height = settings.height; } if (settings.left) { element.style.left = settings.left; } if (settings.top) { element.style.top = settings.top; } } function propertyIsFiniteNumber(obj, propName) { return (typeof obj[propName] === 'number' && isFinite(obj[propName])); } function areValidScreenBounds(bounds) { return bounds != null && propertyIsFiniteNumber(bounds, "Width") && propertyIsFiniteNumber(bounds, "Height"); } function showTooltipImmediate(args) { if (args.tooltip) { var useMousePosX = (typeof args.position === 'undefined') || (typeof args.position.clientX !== 'number'); var clientX = useMousePosX ? mousePosition.clientX : args.position.clientX; var offsetFactor = 0; var useMousePosY = (typeof args.position === 'undefined') || (typeof args.position.clientY !== 'number'); var clientY = useMousePosY ? mousePosition.clientY : args.position.clientY; if (useMousePosY) { offsetFactor = 1; } args.duration = (typeof args.duration === "number") ? args.duration : ((defaultDelay || (defaultDelay = host.getDblClickTime())) * 10); var layoutScreenX = -500; var layoutScreenY = -500; var usingPopup = canCreatePopup(); if (usingPopup) { if (!popupMeasureContainer) { popupMeasureContainer = createPopupMeasureContainer(); } var currentScreenBounds = host.getScreenSizeForXY(window.screenX + clientX, window.screenY + clientY); if (areValidScreenBounds(currentScreenBounds)) { layoutScreenX = -currentScreenBounds.Width; layoutScreenY = -currentScreenBounds.Height; popupMeasureContainer.style.display = "inline"; popupMeasureContainer.style.top = layoutScreenY + "px"; popupMeasureContainer.style.left = layoutScreenX + "px"; popupMeasureContainer.style["min-width"] = currentScreenBounds.Width + "px"; popupMeasureContainer.style["min-height"] = currentScreenBounds.Height + "px"; } } setLeftTopWidthHeight(args.tooltip, { left: layoutScreenX + "px", top: layoutScreenY + "px", width: "auto", height: "auto" }); if (usingPopup) { popupMeasureContainer.appendChild(args.tooltip); } else { document.body.appendChild(args.tooltip); } args.tooltip.style.display = "table"; var width = args.tooltip.offsetWidth; var height = args.tooltip.offsetHeight; if (usingPopup) { popupMeasureContainer.style.display = "none"; } var yOffset = (offsetFactor * tooltipOffsetY); if (!usingPopup) { clientY += yOffset; } var style = window.getComputedStyle(args.tooltip); if (usingPopup) { setLeftTopWidthHeight(args.tooltip, { left: "0px", top: "0px", width: (convertOffsetWidthToWidth(width, style) + 1) + "px", height: (convertOffsetHeightToHeight(height, style) + 1) + "px" }); width += 1; height += 1; var popupArgs = { content: args.tooltip.outerHTML, clientCoordinates: { X: clientX, Y: clientY }, contentSize: { Width: width, Height: height }, ensureNotUnderMouseCursor: true, placementTargetIsMouseRect: useMousePosY, useCachedDocument: args.useCachedDocument }; hostContentInPopup(popupArgs); args.tooltip.style.display = "none"; popupMeasureContainer.removeChild(args.tooltip); } else { clientX = adjustXPosForClientRight(clientX, width); clientY = adjustYPosForClientBottom(clientY, height, yOffset); clientX += window.pageXOffset; clientY += window.pageYOffset; setLeftTopWidthHeight(args.tooltip, { left: clientX + "px", top: clientY + "px", width: (convertOffsetWidthToWidth(width, style) + 1) + "px", height: (convertOffsetHeightToHeight(height, style) + 1) + "px" }); } } scheduledShow = null; if (args.duration > 0) { scheduledDismiss = setTimeout(function () { dismissTooltip(false); scheduledDismiss = null; }, args.duration); } if (!usingPopup) { __n("TooltipShow", args.tooltip, clientX, clientY, width, height, args.duration, scheduledDismiss); } } function scheduleShowTooltip(tooltip, delay, duration, position, useCachedDocument) { if (!tooltip) { return null; } delay = (typeof delay === "number") ? delay : (defaultDelay || (defaultDelay = host.getDblClickTime())); useCachedDocument = (typeof useCachedDocument !== 'undefined' ? useCachedDocument : hasShownTooltipPopup); if (delay <= 0) { showTooltipImmediate({ tooltip: tooltip, duration: duration, position: position, useCachedDocument: useCachedDocument }); return null; } var timeout = setTimeout(function () { showTooltipImmediate({ tooltip: tooltip, duration: duration, position: position, useCachedDocument: useCachedDocument }); }, delay); __n("TooltipShowScheduled", tooltip, delay); return timeout; } function showTooltip(config, parent) { dismissTooltip(); var useCachedDocument = hasShownTooltipPopup; var tooltip = null; var options = {}; if (config && typeof config === "object") { var tooltipContent; if (useCachedDocument && (typeof config.useCachedDocument === 'boolean')) { useCachedDocument = config.useCachedDocument; } if (config.resource) { if (config.content || config.content === "") { try { tooltip = createNewTooltipFromString(Plugin.Resources.getString(config.resource)); } catch (e) { } } else { tooltip = createNewTooltipFromString(Plugin.Resources.getString(config.resource)); } } if (!tooltip && (config.content || config.content === "")) { tooltip = createNewTooltipFromContent(config); } if (!tooltip) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.4005")); } options = config; } else { tooltip = createNewTooltipFromString(config); } if (!tooltip) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.4006")); } tooltip.parent = parent; tooltipObject = tooltip; tooltipReset = false; scheduledShow = scheduleShowTooltip(tooltip, options.delay, options.duration, { clientX: options.x, clientY: options.y }, useCachedDocument); } function initializeElementTooltip(element) { if (!element || !element.addEventListener) { Plugin._logError("JSPlugin.4007"); return; } function hasChild(element, childCandidate) { var currentParent = childCandidate ? childCandidate.parentNode : null; while (currentParent && currentParent !== document.body) { if (currentParent === element) { return true; } currentParent = currentParent.parentNode; } return false; } function onMouseOver(e) { var currentTarget = e.currentTarget; if (!currentTarget.hasAttribute("data-plugin-vs-tooltip")) { currentTarget.removeEventListener("mouseover", onMouseOver); currentTarget.removeEventListener("mouseout", onMouseOut); currentTarget.removeEventListener("mousedown", onMouseDown); currentTarget.__plugin_tooltip_initialized = false; return; } if (tooltipObject && !tooltipReset && tooltipObject.parent && ((tooltipObject.parent === e.currentTarget) || (tooltipObject.parent === e.target) || (hasChild(tooltipObject.parent, e.target) && hasChild(e.currentTarget, tooltipObject.parent)))) { return; } var tooltipConfigStr = currentTarget.getAttribute("data-plugin-vs-tooltip"); var config; if ((typeof tooltipConfigStr === "string") && (tooltipConfigStr.length > 0) && (tooltipConfigStr[0] === "{")) { config = JSON.parse(tooltipConfigStr); } else { config = tooltipConfigStr; } showTooltip(config, e.currentTarget); } ; element.addEventListener("mouseover", onMouseOver, true); function onMouseOut(e) { if (e.relatedTarget && (e.currentTarget !== e.relatedTarget) && !hasChild(e.currentTarget, e.relatedTarget)) { dismissTooltipOfParent(e.currentTarget); } } ; element.addEventListener("mouseout", onMouseOut); function onMouseDown(e) { dismissTooltipOfParent(e.currentTarget, false); } ; element.addEventListener("mousedown", onMouseDown); element.__plugin_tooltip_initialized = true; } Tooltip.initializeElementTooltip = initializeElementTooltip; document.addEventListener("DOMContentLoaded", function () { var withTooltipData = document.querySelectorAll("[data-plugin-vs-tooltip]"); for (var i = 0; i < withTooltipData.length; i++) { initializeElementTooltip(withTooltipData[i]); } }, false); document.addEventListener("mouseout", function (e) { if (!e.relatedTarget || e.relatedTarget.nodeName === "HTML") { dismissTooltip(); } }, false); document.addEventListener("mouseover", function (e) { var tooltipConfig; if (!e.target.__plugin_tooltip_initialized && e.target.hasAttribute("data-plugin-vs-tooltip")) { initializeElementTooltip(e.target); } }, true); document.addEventListener("mousemove", function (e) { mousePosition.screenX = e.screenX; mousePosition.screenY = e.screenY; mousePosition.clientX = e.clientX; mousePosition.clientY = e.clientY; }, false); function show(config) { showTooltip(config, null); } Tooltip.show = show; function dismiss(reset) { dismissTooltip(reset); } Tooltip.dismiss = dismiss; })(Plugin.Tooltip || (Plugin.Tooltip = {})); var Tooltip = Plugin.Tooltip; })(Plugin || (Plugin = {})); var Plugin; (function (Plugin) { (function (ContextMenu) { "use strict"; var host = loadModule("plugin.host.contextmenu"); var TypeScriptFix; var urlRegEx = /url\(['"]?([^'"]*)['"]?\)/gm; var iconIsTokenRegEx = /^[^\:\.]*$/; (function (MenuItemType) { MenuItemType[MenuItemType["checkbox"] = 0] = "checkbox"; MenuItemType[MenuItemType["command"] = 1] = "command"; MenuItemType[MenuItemType["radio"] = 2] = "radio"; MenuItemType[MenuItemType["separator"] = 3] = "separator"; })(ContextMenu.MenuItemType || (ContextMenu.MenuItemType = {})); var MenuItemType = ContextMenu.MenuItemType; var contextMenuStorage = new Object(); var contextMenuContainer = document.createElement("div"); contextMenuContainer.id = "plugin-contextmenu-container"; Plugin.addEventListener("load", function () { return document.body.appendChild(contextMenuContainer); }); var currentTargetId; var activeElement; var shouldShowInline = false; function dismissAll() { var promise; if (!Plugin.ContextMenu.canCreatePopup()) { var promises = []; for (var key in contextMenuStorage) { if (contextMenuStorage.hasOwnProperty(key)) { promises.push(contextMenuStorage[key].dismiss()); } } promise = Plugin.Promise.join(promises); } else { promise = host.dismiss(); } shouldShowInline = false; return promise; } ContextMenu.dismissAll = dismissAll; function getAbsoluteOffset(target) { var aggregateOffsetTop = target.offsetTop; var aggregateOffsetLeft = target.offsetLeft; while (target = target.offsetParent) { aggregateOffsetTop += target.offsetTop; aggregateOffsetLeft += target.offsetLeft; } return { left: aggregateOffsetLeft, top: aggregateOffsetTop }; } function coordinatesAreOutsideOfVisibleClientArea(x, y) { return (x < 0 || y < 0 || x > document.documentElement.clientWidth || y > document.documentElement.clientHeight); } function determineVisibleTargetWidth(target, absoluteCoordinates) { var targetRight = absoluteCoordinates.left + target.offsetWidth; var visibleWindowAbsolute = { left: window.pageXOffset, top: window.pageYOffset, right: window.pageXOffset + window.document.documentElement.clientWidth, bottom: window.pageYOffset + window.document.documentElement.clientHeight }; var isEntirelyOnScreen = ((absoluteCoordinates.left >= visibleWindowAbsolute.left) && (targetRight <= visibleWindowAbsolute.right)); if (isEntirelyOnScreen) { return target.offsetWidth; } if ((targetRight < visibleWindowAbsolute.left) || (absoluteCoordinates.left > visibleWindowAbsolute.right)) { return 0; } if ((absoluteCoordinates.left < visibleWindowAbsolute.left) && (targetRight <= visibleWindowAbsolute.right)) { return (target.offsetWidth - (visibleWindowAbsolute.left - absoluteCoordinates.left)); } if ((targetRight > visibleWindowAbsolute.right) && (absoluteCoordinates.left >= visibleWindowAbsolute.left)) { return (target.offsetWidth - (targetRight - visibleWindowAbsolute.right)); } return window.document.documentElement.clientWidth; } function determineVisibleTargetHeight(target, absoluteCoordinates) { var targetBottom = absoluteCoordinates.top + target.offsetHeight; var visibleWindowAbsolute = { left: window.pageXOffset, top: window.pageYOffset, right: window.pageXOffset + window.document.documentElement.clientWidth, bottom: window.pageYOffset + window.document.documentElement.clientHeight }; var isEntirelyOnScreen = ((absoluteCoordinates.top >= visibleWindowAbsolute.top) && (targetBottom <= visibleWindowAbsolute.bottom)); if (isEntirelyOnScreen) { return target.offsetHeight; } if ((targetBottom < visibleWindowAbsolute.top) || (absoluteCoordinates.top > visibleWindowAbsolute.bottom)) { return 0; } if ((absoluteCoordinates.top < visibleWindowAbsolute.top) && (targetBottom <= visibleWindowAbsolute.bottom)) { return (target.offsetHeight - (visibleWindowAbsolute.top - absoluteCoordinates.top)); } if ((targetBottom > visibleWindowAbsolute.bottom) && (absoluteCoordinates.top >= visibleWindowAbsolute.top)) { return (target.offsetHeight - (targetBottom - visibleWindowAbsolute.bottom)); } return window.document.documentElement.clientHeight; } function handleContextMenuShow(target, clientX, clientY) { var id; if (!target) { return false; } var originalTarget = target; while (target.parentElement) { id = target.getAttribute("data-plugin-contextmenu"); if (id !== null) { var contextMenu = contextMenuStorage[id]; var coordinates = { X: clientX, Y: clientY }; if (typeof (host.adjustShowCoordinates) === "function") { coordinates = host.adjustShowCoordinates(coordinates); } if (coordinates.X === 0 && coordinates.Y === 0) { var absoluteOffset = getAbsoluteOffset(originalTarget); var onscreenWidth = determineVisibleTargetWidth(originalTarget, absoluteOffset); var onscreenHeight = determineVisibleTargetHeight(originalTarget, absoluteOffset); if (onscreenWidth === 0 || onscreenHeight === 0) { coordinates.X = coordinates.Y = 0; } else { var midPointX = onscreenWidth / 2; var midPointY = onscreenHeight / 2; if (absoluteOffset.left < window.pageXOffset || originalTarget.offsetWidth > window.document.documentElement.clientWidth) { coordinates.X = midPointX; } else { coordinates.X = ((absoluteOffset.left - window.pageXOffset) + midPointX); } if (absoluteOffset.top < window.pageYOffset || originalTarget.offsetHeight > window.document.documentElement.clientHeight) { coordinates.Y = midPointY; } else { coordinates.Y = ((absoluteOffset.top - window.pageYOffset) + midPointY); } } } if (coordinatesAreOutsideOfVisibleClientArea(coordinates.X, coordinates.Y)) { coordinates.X = coordinates.Y = 0; } contextMenu.show(coordinates.X, coordinates.Y, 0, target.id); return true; } target = target.parentElement; if (!target) { return false; } } return false; } document.addEventListener("keydown", function (event) { if (event.key === "F10" && event.shiftKey && !event.altKey && !event.ctrlKey) { var element = document.activeElement; if (handleContextMenuShow(element, 0, 0)) { event.preventDefault(); } } }, false); document.addEventListener("contextmenu", function (event) { handleContextMenuShow(event.target, event.clientX, event.clientY); event.preventDefault(); }, false); document.addEventListener("mousedown", function (event) { var currentElement = event.target; while (currentElement) { if (currentElement.hasAttribute("data-plugin-is-contextmenu")) { return; } currentElement = currentElement.parentElement; } dismissAll(); }, true); window.addEventListener("resize", function (event) { if (!Plugin.ContextMenu.canCreatePopup()) { dismissAll(); } }, false); function stopPropagation(event) { event.stopPropagation(); event.preventDefault(); } ; var DisposableEventListener = (function () { function DisposableEventListener(target, type, listener, useCapture) { this.target = target; this.type = type; this.listener = listener; this.useCapture = useCapture; } DisposableEventListener.prototype.install = function () { this.target.addEventListener(this.type, this.listener, this.useCapture); }; DisposableEventListener.prototype.uninstall = function () { this.target.removeEventListener(this.type, this.listener, this.useCapture); }; return DisposableEventListener; })(); var HostContextMenu = (function () { function HostContextMenu(menuItems, id, ariaLabel, cssClass, callback, parentMenu, parentMenuId) { this.disposableEventListeners = []; if (menuItems === null || typeof (menuItems) === "undefined" || menuItems.length === 0) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5006")); } if (typeof (id) !== "string" && !isNullOrEmpty(id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5015")); } this.id = !isNullOrEmpty(id) ? id : generateId("plugin-contextmenu"); this.ariaLabel = ariaLabel; if (!isNullOrEmpty(contextMenuStorage[this.id])) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5007")); } if (typeof (cssClass) !== "string" && !isNullOrEmpty(cssClass)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5016")); } this.callback = callback; this.eventManager = new Plugin.Utilities.EventManager(); this.eventManager.setTarget(this); var contextMenu = document.createElement("ul"); contextMenu.id = this.id; if (!isNullOrEmpty(parentMenu)) { var fireShowEvent = function (eventManager) { return function (event) { eventManager.dispatchEvent("show"); }; }; this.addDisposableEventListener(parentMenu, "show", fireShowEvent(this.eventManager)); contextMenu.setAttribute("plugin-contextmenu-parent", parentMenuId); } contextMenu.className = "plugin-contextmenu"; if (!isNullOrEmpty(cssClass)) { contextMenu.classList.add(cssClass); } contextMenu.setAttribute("data-plugin-is-contextmenu", "true"); var tabIndex = 1; for (var item in menuItems) { if (!menuItems.hasOwnProperty(item)) { continue; } var contextMenuItem = document.createElement("li"); contextMenuItem.className = "menuitem"; if (menuItems[item].type !== 3 /* separator */) { contextMenuItem.setAttribute("tabIndex", tabIndex.toString()); tabIndex++; } var role = ""; switch (menuItems[item].type) { case 0 /* checkbox */: role = "menuitemcheckbox"; break; case 1 /* command */: role = "menuitem"; break; case 3 /* separator */: role = "separator"; break; case 2 /* radio */: role = "menuitemradio"; break; } contextMenuItem.setAttribute("role", role); var itemId = menuItems[item].id; contextMenuItem.id = !isNullOrEmpty(itemId) ? itemId : generateId("plugin-contextmenuitem"); var mainDiv = document.createElement("div"); mainDiv.className = "main"; var label = menuItems[item].label; var isEmpty = isNullOrEmpty(label); if ((isEmpty && (menuItems[item].type !== 3 /* separator */)) || ((typeof (label) !== "string") && !isEmpty)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5018")); } if (!isEmpty) { mainDiv.innerText = label; } contextMenuItem.appendChild(mainDiv); var enabledIcon = menuItems[item].iconEnabled; if (!isNullOrEmpty(enabledIcon) && typeof (enabledIcon) !== "string") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5019")); } var disabledIcon = menuItems[item].iconDisabled; if (!isNullOrEmpty(disabledIcon) && typeof (disabledIcon) !== "string") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5020")); } var iconImg = document.createElement("img"); iconImg.className = "icon"; iconImg.style.display = "none"; contextMenuItem.appendChild(iconImg); var shortcut = menuItems[item].accessKey; if (!isNullOrEmpty(shortcut) && typeof (shortcut) !== "string") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5021")); } var shortcutDiv = document.createElement("div"); shortcutDiv.className = "shortcut"; if (!isNullOrEmpty(shortcut)) { shortcutDiv.innerText = shortcut; } contextMenuItem.appendChild(shortcutDiv); var menuItemCallback = menuItems[item].callback; if (isNullOrEmpty(menuItemCallback)) { menuItemCallback = this.callback; } if ((typeof (menuItemCallback) !== "function") && (menuItems[item].type !== 3 /* separator */)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5017")); } var passCallbackToClickEvent = function (callback) { return function (event) { var item = event.currentTarget; if (callback && !item.classList.contains("disabled") && isNullOrEmpty(item.getAttribute("data-plugin-contextmenu"))) { var type; switch (item.getAttribute("data-plugin-contextmenu-item-type")) { case "checkbox": type = 0 /* checkbox */; break; case "command": type = 1 /* command */; break; case "separator": type = 3 /* separator */; break; case "radio": type = 2 /* radio */; break; default: throw new Error(Plugin.Resources.getErrorString("JSPlugin.5008")); } var contextMenuItem = { id: item.id, callback: callback, label: item.getElementsByClassName("main")[0].innerText, type: type, iconEnabled: item.getElementsByClassName("icon")[0].src, iconDisabled: "", accessKey: item.getElementsByClassName("shortcut")[0].innerText, hidden: function () { return false; }, disabled: function () { return false; }, checked: function () { return item.getAttribute("aria-checked") === "true"; }, cssClass: item.className, submenu: null }; dismissAll().done(function () { callback(item.parentNode.id, contextMenuItem, currentTargetId); }); } else { stopPropagation(event); } }; }; this.addDisposableEventListener(contextMenuItem, "click", passCallbackToClickEvent(menuItemCallback), false); this.addDisposableEventListener(contextMenuItem, "contextmenu", passCallbackToClickEvent(menuItemCallback), false); var passMenuItemCallbacksToShowEvent = function (isHidden, isDisabled, isChecked, iconEnabled, iconDisabled, type, item) { return function (event) { if (typeof (isHidden) === "function" && isHidden()) { item.classList.add("hidden"); } else { item.classList.remove("hidden"); } var icon; if (typeof (isDisabled) === "function" && isDisabled()) { item.classList.add("disabled"); item.setAttribute("aria-disabled", "true"); icon = iconDisabled; } else { item.classList.remove("disabled"); item.removeAttribute("aria-disabled"); icon = iconEnabled; } var iconImg = item.getElementsByClassName("icon")[0]; switch (type) { case 0 /* checkbox */: item.removeAttribute("aria-checked"); if (typeof (isChecked) === "function" && isChecked()) { var backgroundSrc = getComputedStyle(iconImg).getPropertyValue("background-image"); backgroundSrc = backgroundSrc.replace(urlRegEx, function (urlMatch, src) { return src; }); iconImg.src = backgroundSrc; item.setAttribute("aria-checked", "true"); iconImg.style.display = "block"; } else { item.setAttribute("aria-checked", "false"); iconImg.style.display = "none"; } break; case 1 /* command */: if (!isNullOrEmpty(icon)) { if (iconIsTokenRegEx.test(icon)) { iconImg.setAttribute("data-plugin-theme-src", icon); } else { iconImg.src = icon; iconImg.removeAttribute("data-plugin-theme-src"); } iconImg.style.display = "block"; } else { iconImg.style.display = "none"; } break; } }; }; var isHidden = menuItems[item].hidden; if (!isNullOrEmpty(isHidden) && typeof (isHidden) !== "function") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5023")); } var isDisabled = menuItems[item].disabled; if (!isNullOrEmpty(isDisabled) && typeof (isDisabled) !== "function") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5024")); } var isChecked = menuItems[item].checked; if (!isNullOrEmpty(isChecked) && typeof (isChecked) !== "function") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5025")); } this.addDisposableEventListener(this, "show", passMenuItemCallbacksToShowEvent(isHidden, isDisabled, isChecked, menuItems[item].iconEnabled, menuItems[item].iconDisabled, menuItems[item].type, contextMenuItem)); var itemCssClass = menuItems[item].cssClass; if (!isNullOrEmpty(itemCssClass) && typeof (itemCssClass) !== "string") { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5022")); } if (!isNullOrEmpty(itemCssClass)) { contextMenuItem.classList.add(itemCssClass); } var submenu = menuItems[item].submenu; var isSubmenuNullOrUndefined = (typeof (submenu) === "undefined" || submenu === null); if (!isSubmenuNullOrUndefined && !Array.isArray(submenu)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5026")); } if (!isSubmenuNullOrUndefined) { var submenuId = generateId("plugin-contextsubmenu"); var menu = new HostContextMenu(submenu, submenuId, null, cssClass, menuItemCallback, this, this.id); var arrowDiv = document.createElement("div"); arrowDiv.className = "arrow"; contextMenuItem.setAttribute("data-plugin-contextmenu", submenuId); contextMenuItem.appendChild(arrowDiv); } var deactivateSiblingSubmenus = function (currentTarget) { if (getComputedStyle(currentTarget.parentElement).getPropertyValue("display") !== "none") { var siblings = currentTarget.parentElement.querySelectorAll("[data-plugin-contextmenu]"); for (var i = 0; i < siblings.length; i++) { var sibling = siblings[i]; if (sibling !== currentTarget) { if (typeof (sibling.className) !== "undefined") { sibling.classList.remove("active"); submenuId = sibling.getAttribute("data-plugin-contextmenu"); var currentSubmenu = document.getElementById(submenuId); currentSubmenu.style.display = "none"; } } } } }; this.addDisposableEventListener(contextMenuItem, "mouseover", function (event) { var currentTarget = event.currentTarget; if (shouldFocusMenuItem(currentTarget)) { currentTarget.focus(); } else { deactivateSiblingSubmenus(event.currentTarget); } showSubmenu(currentTarget); }, false); this.addDisposableEventListener(contextMenuItem, "mouseout", handleContextMenuItemMouseOut, false); this.addDisposableEventListener(contextMenuItem, "focus", function (event) { deactivateSiblingSubmenus(event.currentTarget); }, false); this.addDisposableEventListener(contextMenuItem, "keydown", onMenuItemKeyDown, false); switch (menuItems[item].type) { case 0 /* checkbox */: iconImg.classList.add("checkbox"); contextMenuItem.setAttribute("data-plugin-contextmenu-item-type", "checkbox"); break; case 1 /* command */: contextMenuItem.setAttribute("data-plugin-contextmenu-item-type", "command"); break; case 2 /* radio */: throw new Error("Not implemented"); break; case 3 /* separator */: mainDiv.classList.add("hr"); contextMenuItem.setAttribute("data-plugin-contextmenu-item-type", "separator"); break; default: throw new Error(Plugin.Resources.getErrorString("JSPlugin.5008")); } contextMenu.appendChild(contextMenuItem); } this.addDisposableEventListener(contextMenu, "click", stopPropagation, false); this.addDisposableEventListener(contextMenu, "contextmenu", stopPropagation, false); var fireDismiss = function (contextMenu, id) { return function (event) { if (id === event.id) { if (activeElement) { activeElement.focus(); activeElement = null; } contextMenu.eventManager.dispatchEvent("dismiss"); } }; }; host.addEventListener("contextmenudismissed", fireDismiss(this, this.id)); contextMenuContainer.appendChild(contextMenu); contextMenuStorage[contextMenu.id] = this; this.addDisposableEventListener(contextMenu, "keydown", onContextMenuKeyDown, false); } HostContextMenu.prototype.attach = function (element) { if (isNullOrEmpty(this.id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5010")); } element.setAttribute("data-plugin-contextmenu", this.id); }; HostContextMenu.prototype.detach = function (element) { if (isNullOrEmpty(this.id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5010")); } if (element.getAttribute("data-plugin-contextmenu") === this.id) { element.removeAttribute("data-plugin-contextmenu"); } }; HostContextMenu.prototype.dismiss = function () { if (isNullOrEmpty(this.id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5010")); } if (!Plugin.ContextMenu.canCreatePopup()) { var contextMenu = document.getElementById(this.id); if (contextMenu.style.display !== "none") { document.getElementById(this.id).style.display = "none"; if (activeElement) { activeElement.focus(); activeElement = null; } this.eventManager.dispatchEvent("dismiss"); } } else { host.dismiss(); } }; HostContextMenu.prototype.dispose = function () { if (isNullOrEmpty(this.id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5010")); } this.disposableEventListeners.forEach(function (listener) { listener.uninstall(); }); this.disposableEventListeners = []; var nodeList = (document.querySelectorAll("[data-plugin-contextmenu=" + this.id + "]")); for (var i = 0; i < nodeList.length; i++) { nodeList[i].removeAttribute("data-plugin-contextmenu"); } removeContextMenuFromStorage(this.id); this.id = null; this.callback = null; }; HostContextMenu.prototype.show = function (xPosition, yPosition, widthOffset, targetId) { if (isNullOrEmpty(this.id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5010")); } if (!isFiniteNumber(xPosition) || !isFiniteNumber(yPosition)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5012")); } if (!isFiniteNumber(widthOffset) && !isNullOrEmpty(widthOffset)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5013")); } if (typeof (targetId) !== "string" && !isNullOrEmpty(targetId)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5014")); } dismissAll(); currentTargetId = targetId; activeElement = document.activeElement; var offset = widthOffset || 0; var element = document.getElementById(this.id); for (var i = 0; i < element.children.length; i++) { element.children[i].classList.remove("active"); } this.eventManager.dispatchEvent("show"); adjustMenuItemWidth(element); _positionHelpers.show(element, this.ariaLabel, xPosition, yPosition, 0, offset, null, positionContextMenuInsideAirspace, host.show.bind(host)); }; HostContextMenu.prototype.addEventListener = function (type, listener) { if (isNullOrEmpty(this.id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5010")); } this.eventManager.addEventListener(type, listener); }; HostContextMenu.prototype.removeEventListener = function (type, listener) { if (isNullOrEmpty(this.id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5010")); } this.eventManager.removeEventListener(type, listener); }; HostContextMenu.prototype.dispatchEvent = function (evt) { if (isNullOrEmpty(this.id)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5010")); } return this.eventManager.dispatchEvent(evt.type); }; HostContextMenu.prototype.addDisposableEventListener = function (target, type, listener, useCapture) { var disposableListener = new DisposableEventListener(target, type, listener, useCapture); disposableListener.install(); this.disposableEventListeners.push(disposableListener); }; return HostContextMenu; })(); function adjustMenuItemWidth(element) { var maxWidth = 0; var shortcuts = element.querySelectorAll(".shortcut"); for (var i = 0; i < shortcuts.length; i++) { var shortcut = shortcuts[i]; element.style.display = "block"; var width = parseInt(getComputedStyle(shortcut).getPropertyValue("width")); element.style.display = "none"; maxWidth = (width > maxWidth) ? width : maxWidth; } var menuItemMainDivs = element.querySelectorAll(".main"); maxWidth += 50; for (var i = 0; i < menuItemMainDivs.length; i++) { menuItemMainDivs[i].style.paddingRight = maxWidth + "px"; } } function removeContextMenuFromStorage(id) { var menu = document.getElementById(id); contextMenuContainer.removeChild(menu); delete contextMenuStorage[id]; var submenuItems = menu.querySelectorAll("[data-plugin-contextmenu]"); for (var i = 0; i < submenuItems.length; i++) { removeContextMenuFromStorage(submenuItems[i].getAttribute("data-plugin-contextmenu")); } } function create(menuItems, id, ariaLabel, cssClass, callback) { return new HostContextMenu(menuItems, id, ariaLabel, cssClass, callback); } ContextMenu.create = create; function canCreatePopup() { return host.canCreatePopup() && !shouldShowInline; } ContextMenu.canCreatePopup = canCreatePopup; ; (function (_positionHelpers) { function show(element, ariaLabel, xPosition, yPosition, elementOffsetTop, widthOffset, displayType, tryAdjustCoordinates, showOutsideOfAirspace) { var nodeList = element.querySelectorAll("[data-plugin-contextmenu]"); shouldShowInline = shouldShowInline || (nodeList.length > 0 && !host.canCreatePopup(true)); Plugin.Theme._cssHelpers.processImages(element); var display = displayType || "block"; element.style.display = display; var height = element.offsetHeight; var width = element.offsetWidth; element.style.display = "none"; var scrollOffsetTop = window.pageYOffset; var scrollOffsetLeft = window.pageXOffset; var viewPortHeight = document.documentElement.clientHeight; var viewPortWidth = document.documentElement.clientWidth; var positionInfo = { clientCoordinates: { X: xPosition, Y: yPosition }, width: width, height: height, viewPortWidth: viewPortWidth, viewPortHeight: viewPortHeight, scrollOffsetLeft: scrollOffsetLeft, scrollOffsetTop: scrollOffsetTop, elementOffsetTop: elementOffsetTop, widthOffset: widthOffset }; if (Plugin.ContextMenu.canCreatePopup()) { showOutsideOfAirspace(element.id, ariaLabel, contextMenuContainer, positionInfo); return; } var adjustedPositionInfo = positionInfo; if (yPosition + height > viewPortHeight || xPosition + width > viewPortWidth) { if (typeof (tryAdjustCoordinates) === "function") { adjustedPositionInfo = tryAdjustCoordinates(positionInfo); } } element.style.left = adjustedPositionInfo.clientCoordinates.X + scrollOffsetLeft + "px"; element.style.top = adjustedPositionInfo.clientCoordinates.Y + scrollOffsetTop + "px"; element.style.display = display; element.setAttribute("tabindex", "0"); element.focus(); __n("ContextMenuShow", adjustedPositionInfo.clientCoordinates.X + scrollOffsetLeft, adjustedPositionInfo.clientCoordinates.Y + scrollOffsetTop, adjustedPositionInfo.width, adjustedPositionInfo.height); } _positionHelpers.show = show; })(ContextMenu._positionHelpers || (ContextMenu._positionHelpers = {})); var _positionHelpers = ContextMenu._positionHelpers; function positionContextMenuInsideAirspace(positionInfo) { var y = positionInfo.clientCoordinates.Y; var yMirror = positionInfo.clientCoordinates.Y - positionInfo.height; if (positionInfo.clientCoordinates.Y + positionInfo.height > positionInfo.viewPortHeight && yMirror >= 0) { y = yMirror; } var x = positionInfo.clientCoordinates.X; var xMirror = positionInfo.clientCoordinates.X - (positionInfo.width + positionInfo.widthOffset); if (positionInfo.clientCoordinates.X + positionInfo.width > positionInfo.viewPortWidth && xMirror >= 0) { x = xMirror; } positionInfo.clientCoordinates.Y = y; positionInfo.clientCoordinates.X = x; return positionInfo; } function generateId(prefix) { if (isNullOrEmpty(prefix)) { throw new Error(Plugin.Resources.getErrorString("JSPlugin.5009")); } function getHexDigits(count) { var random = ""; while (random.length < count) { random += Math.floor(Math.random() * 65536).toString(16); } return random.substr(0, count); } return prefix + "-" + getHexDigits(8) + "-" + getHexDigits(4) + "-" + getHexDigits(4) + "-" + getHexDigits(4) + "-" + getHexDigits(12); } function isNullOrEmpty(value) { return (value === null || typeof (value) === "undefined" || value === ""); } function isFiniteNumber(value) { return (isFinite(value) && (typeof (value) === "number")); } function handlePopupMenuItemClick(event) { var target = event.currentTarget; if (!target.classList.contains("disabled") && isNullOrEmpty(target.getAttribute("data-plugin-contextmenu"))) { host.callback(target.id); } else if (target.classList.contains("disabled")) { target.focus(); } stopPropagation(event); } function popupDeactivateSiblingSubmenus(currentTarget) { if (!currentTarget.classList.contains("active")) { var coordinates = { X: 1, Y: currentTarget.offsetTop + 1 }; host.dismissSubmenus(coordinates); var siblings = currentTarget.parentNode.querySelectorAll("[data-plugin-contextmenu]"); for (var i = 0; i < siblings.length; i++) { var sibling = siblings[i]; if (sibling !== this) { sibling.classList.remove("active"); } } } } function popupShowSubmenu(currentTarget) { if (!currentTarget.classList.contains("active")) { var submenuId = currentTarget.getAttribute("data-plugin-contextmenu"); if (submenuId !== null && typeof (submenuId) !== "undefined") { var submenu = document.getElementById(submenuId); currentTarget.classList.add("active"); adjustMenuItemWidth(submenu); _positionHelpers.show(submenu, null, 0, 0, currentTarget.offsetTop, 0, null, null, host.show.bind(host)); } } } function handlePopupMenuItemMouseOver(event) { var currentTarget = event.currentTarget; if (shouldFocusMenuItem(currentTarget)) { currentTarget.focus(); } else { popupDeactivateSiblingSubmenus(event.currentTarget); } popupShowSubmenu(currentTarget); } function handleContextMenuItemMouseOut(event) { var currentTarget = event.currentTarget; currentTarget.classList.remove("active"); currentTarget.blur(); } function handlePopupMenuItemFocus(event) { popupDeactivateSiblingSubmenus(event.currentTarget); } host.addEventListener("contextmenufocused", function (event) { focusActiveMenuItem("contextmenu"); }); host.addEventListener("contextmenuinitialized", function (event) { var contextmenu = document.getElementById("contextmenu"); if (isNullOrEmpty(event.id)) { contextmenu.innerHTML = ""; contextmenu.removeAttribute("aria-label"); contextMenuContainer.innerHTML = ""; } else { contextMenuContainer.innerHTML = event.contextMenus; contextmenu.innerHTML = document.getElementById(event.id).innerHTML; if (event.ariaLabel && event.ariaLabel.length !== 0) { contextmenu.setAttribute("aria-label", event.ariaLabel); } contextmenu.addEventListener("click", stopPropagation, false); contextmenu.addEventListener("contextmenu", stopPropagation, false); contextmenu.addEventListener("keydown", onContextMenuKeyDown, false); var menuItems = contextmenu.getElementsByClassName("menuitem"); for (var i = 0; i < menuItems.length; i++) { menuItems[i].addEventListener("mouseover", handlePopupMenuItemMouseOver, false); menuItems[i].addEventListener("mouseout", handleContextMenuItemMouseOut, false); menuItems[i].addEventListener("focus", handlePopupMenuItemFocus, false); menuItems[i].addEventListener("click", handlePopupMenuItemClick, false); menuItems[i].addEventListener("contextmenu", handlePopupMenuItemClick, false); menuItems[i].addEventListener("keydown", onMenuItemKeyDown, false); menuItems[i].addEventListener("DOMAttrModified", onAttrModified, false); } contextmenu.style.display = "block"; contextmenu.setAttribute("tabindex", "0"); host.disableZoom(); host.fireContentReady(); } }); host.addEventListener("contextmenuclicked", function (event) { var contextmenuItem = document.getElementById(event.Id); if (contextmenuItem) { contextmenuItem.click(); } }); host.addEventListener("contextmenuopened", function (event) { __n("ContextMenuShow", event.x, event.y, event.width, event.height); }); function shouldFocusMenuItem(element) { var allowDisabledItemNavigation = element.parentElement.classList.contains("allowDisabledItemNavigation"); var isDisabled = element.classList.contains("disabled"); var isHidden = element.classList.contains("hidden"); return ((allowDisabledItemNavigation || !isDisabled) && !isHidden && element.hasAttribute("tabindex")); } ; function getMenuItemStartIndex(target, currentTarget, menuItems) { var startIndex = 0; if (target !== currentTarget) { for (var i = 0; i < menuItems.length; i++) { var element = menuItems[i]; if (element === target) { startIndex = i + 1; break; } } } return startIndex; } function getPreviousMenuItem(startIndex, menuItems) { var elementToFocus; for (var i = startIndex - 2; i >= 0; i--) { var element = menuItems[i]; if (shouldFocusMenuItem(element)) { elementToFocus = element; break; } } if (!elementToFocus) { for (var i = menuItems.length - 1; i > startIndex - 1; i--) { var element = menuItems[i]; if (shouldFocusMenuItem(element)) { elementToFocus = element; break; } } } return elementToFocus; } ; function getNextMenuItem(startIndex, menuItems) { var elementToFocus; for (var i = startIndex; i < menuItems.length; i++) { var element = menuItems[i]; if (shouldFocusMenuItem(element)) { elementToFocus = element; break; } } if (!elementToFocus) { for (var i = 0; i < startIndex - 1; i++) { var element = menuItems[i]; if (shouldFocusMenuItem(element)) { elementToFocus = element; break; } } } return elementToFocus; } ; function handleDismissCurrent(currentTarget, ignoreDismissForRoot) { if (Plugin.ContextMenu.canCreatePopup()) { host.dismissCurrent(ignoreDismissForRoot); return; } var isRoot = !currentTarget.hasAttribute("plugin-contextmenu-parent"); if (ignoreDismissForRoot && isRoot) { return; } contextMenuStorage[currentTarget.id].dismiss(); if (!isRoot) { focusActiveMenuItem(currentTarget.getAttribute("plugin-contextmenu-parent")); } } ; function focusActiveMenuItem(menuId) { var menu = document.getElementById(menuId); menu.focus(); var menuItems = menu.getElementsByClassName("menuitem"); for (var i = 0; i < menuItems.length; i++) { var element = menuItems[i]; if (element.classList.contains("active")) { element.classList.remove("active"); element.focus(); } } } ; function showSubmenu(currentTarget) { if (!currentTarget.classList.contains("active")) { var submenuId = currentTarget.getAttribute("data-plugin-contextmenu"); if (submenuId !== null && typeof (submenuId) !== "undefined") { currentTarget.classList.add("active"); var submenu = document.getElementById(submenuId); submenu.style.zIndex = (parseInt(getComputedStyle(currentTarget.parentElement).getPropertyValue("z-index")) + 1).toString(); var parentWidth = parseInt(getComputedStyle(currentTarget.parentElement).getPropertyValue("width")); var xPosition = parentWidth + parseInt(getComputedStyle(currentTarget.parentElement).getPropertyValue("left")) - window.pageXOffset; var yPosition = currentTarget.offsetTop + parseInt(getComputedStyle(currentTarget.parentElement).getPropertyValue("top")) - window.pageYOffset; var parentWidthOffset = parentWidth - 3; adjustMenuItemWidth(submenu); _positionHelpers.show(submenu, null, xPosition, yPosition, currentTarget.offsetTop, parentWidthOffset, null, positionContextMenuInsideAirspace, host.show.bind(host)); } } } ; function onMenuItemKeyDown(event) { var target = event.target; switch (event.keyCode) { case 13: showSubmenu(target); target.click(); event.preventDefault(); event.stopImmediatePropagation(); break; case 39: showSubmenu(target); event.preventDefault(); event.stopImmediatePropagation(); break; } } ; function onContextMenuKeyDown(event) { var elementToFocus; var target = event.target; var currentTarget = event.currentTarget; var menuItems = currentTarget.getElementsByClassName("menuitem"); var startIndex = getMenuItemStartIndex(target, currentTarget, menuItems); switch (event.keyCode) { case 9: if (!event.shiftKey) { elementToFocus = getNextMenuItem(startIndex, menuItems); } else { elementToFocus = getPreviousMenuItem(startIndex, menuItems); } event.preventDefault(); break; case 18: dismissAll(); break; case 27: handleDismissCurrent(currentTarget, false); event.preventDefault(); break; case 35: elementToFocus = getPreviousMenuItem(0, menuItems); event.preventDefault(); break; case 36: elementToFocus = getNextMenuItem(0, menuItems); event.preventDefault(); break; case 37: handleDismissCurrent(currentTarget, true); event.preventDefault(); break; case 38: elementToFocus = getPreviousMenuItem(startIndex, menuItems); event.preventDefault(); break; case 40: elementToFocus = getNextMenuItem(startIndex, menuItems); event.preventDefault(); break; case 93: dismissAll(); event.preventDefault(); break; } if (elementToFocus) { elementToFocus.focus(); } } ; function onAttrModified(event) { if (event.attrName === "aria-checked" && event.attrChange === 1) { handlePopupMenuItemClick(event); } } ; })(Plugin.ContextMenu || (Plugin.ContextMenu = {})); var ContextMenu = Plugin.ContextMenu; })(Plugin || (Plugin = {})); (function baseInit(global, undefined) { "use strict"; function initializeProperties(target, members) { var keys = Object.keys(members); var properties; var i, len; for (i = 0, len = keys.length; i < len; i++) { var key = keys[i]; var enumerable = key.charCodeAt(0) !== /*_*/95; var member = members[key]; if (member && typeof member === 'object') { if (member.value !== undefined || typeof member.get === 'function' || typeof member.set === 'function') { if (member.enumerable === undefined) { member.enumerable = enumerable; } properties = properties || {}; properties[key] = member; continue; } } if (!enumerable) { properties = properties || {}; properties[key] = { value: member, enumerable: enumerable, configurable: true, writable: true } continue; } target[key] = member; } if (properties) { Object.defineProperties(target, properties); } } (function (rootNamespace) { // Create the rootNamespace in the global namespace if (!global[rootNamespace]) { global[rootNamespace] = Object.create(Object.prototype); } // Cache the rootNamespace we just created in a local variable var _rootNamespace = global[rootNamespace]; if (!_rootNamespace.Namespace) { _rootNamespace.Namespace = Object.create(Object.prototype); } function defineWithParent(parentNamespace, name, members) { /// /// /// Defines a new namespace with the specified name under the specified parent namespace. /// /// /// The parent namespace. /// /// /// The name of the new namespace. /// /// /// The members of the new namespace. /// /// /// The newly-defined namespace. /// /// var currentNamespace = parentNamespace, namespaceFragments = name.split("."); for (var i = 0, len = namespaceFragments.length; i < len; i++) { var namespaceName = namespaceFragments[i]; if (!currentNamespace[namespaceName]) { Object.defineProperty(currentNamespace, namespaceName, { value: {}, writable: false, enumerable: true, configurable: true } ); } currentNamespace = currentNamespace[namespaceName]; } if (members) { initializeProperties(currentNamespace, members); } return currentNamespace; } function define(name, members) { /// /// /// Defines a new namespace with the specified name. /// /// /// The name of the namespace. This could be a dot-separated name for nested namespaces. /// /// /// The members of the new namespace. /// /// /// The newly-defined namespace. /// /// return defineWithParent(global, name, members); } // Establish members of the "PluginUtilities.Namespace" namespace Object.defineProperties(_rootNamespace.Namespace, { defineWithParent: { value: defineWithParent, writable: true, enumerable: true, configurable: true }, define: { value: define, writable: true, enumerable: true, configurable: true } }); })("PluginUtilities"); (function (PluginUtilities) { function define(constructor, instanceMembers, staticMembers) { /// /// /// Defines a class using the given constructor and the specified instance members. /// /// /// A constructor function that is used to instantiate this class. /// /// /// The set of instance fields, properties, and methods made available on the class. /// /// /// The set of static fields, properties, and methods made available on the class. /// /// /// The newly-defined class. /// /// constructor = constructor || function () { }; PluginUtilities.Utilities.markSupportedForProcessing(constructor); if (instanceMembers) { initializeProperties(constructor.prototype, instanceMembers); } if (staticMembers) { initializeProperties(constructor, staticMembers); } return constructor; } function derive(baseClass, constructor, instanceMembers, staticMembers) { /// /// /// Creates a sub-class based on the supplied baseClass parameter, using prototypal inheritance. /// /// /// The class to inherit from. /// /// /// A constructor function that is used to instantiate this class. /// /// /// The set of instance fields, properties, and methods to be made available on the class. /// /// /// The set of static fields, properties, and methods to be made available on the class. /// /// /// The newly-defined class. /// /// if (baseClass) { constructor = constructor || function () { }; var basePrototype = baseClass.prototype; constructor.prototype = Object.create(basePrototype); PluginUtilities.Utilities.markSupportedForProcessing(constructor); Object.defineProperty(constructor.prototype, "constructor", { value: constructor, writable: true, configurable: true, enumerable: true }); if (instanceMembers) { initializeProperties(constructor.prototype, instanceMembers); } if (staticMembers) { initializeProperties(constructor, staticMembers); } return constructor; } else { return define(constructor, instanceMembers, staticMembers); } } function mix(constructor) { /// /// /// Defines a class using the given constructor and the union of the set of instance members /// specified by all the mixin objects. The mixin parameter list is of variable length. /// /// /// A constructor function that is used to instantiate this class. /// /// /// The newly-defined class. /// /// constructor = constructor || function () { }; var i, len; for (i = 1, len = arguments.length; i < len; i++) { initializeProperties(constructor.prototype, arguments[i]); } return constructor; } // Establish members of "PluginUtilities.Class" namespace PluginUtilities.Namespace.define("PluginUtilities.Class", { define: define, derive: derive, mix: mix }); })(PluginUtilities); })(this); (function baseUtilsInit(global, PluginUtilities) { "use strict"; var hasWinRT = !!global.Windows; var strings = { get notSupportedForProcessing() { return PluginUtilities.Resources._getPluginUtilitiesString("base/notSupportedForProcessing").value; } }; function nop(v) { return v; } function getMemberFiltered(name, root, filter) { return name.split(".").reduce(function (currentNamespace, name) { if (currentNamespace) { return filter(currentNamespace[name]); } return null; }, root); } // Establish members of "PluginUtilities.Utilities" namespace PluginUtilities.Namespace.define("PluginUtilities.Utilities", { // Used for mocking in tests _setHasWinRT: { value: function (value) { hasWinRT = value; }, configurable: false, writable: false, enumerable: false }, /// Determine if WinRT is accessible in this script context. hasWinRT: { get: function () { return hasWinRT; }, configurable: false, enumerable: true }, _getMemberFiltered: getMemberFiltered, getMember: function (name, root) { /// /// /// Gets the leaf-level type or namespace specified by the name parameter. /// /// /// The name of the member. /// /// /// The root to start in. Defaults to the global object. /// /// /// The leaf-level type or namespace in the specified parent namespace. /// /// if (!name) { return null; } return getMemberFiltered(name, root || global, nop); }, ready: function (callback, async) { /// /// /// Ensures that the specified function executes only after the DOMContentLoaded event has fired /// for the current page. /// /// A promise that completes after DOMContentLoaded has occurred. /// /// A function that executes after DOMContentLoaded has occurred. /// /// /// If true, the callback should be executed asynchronously. /// /// return new PluginUtilities.Promise(function (c, e) { function complete() { if (callback) { try { callback(); c(); } catch (err) { e(err); } } else { c(); } } var readyState = PluginUtilities.Utilities.testReadyState; if (!readyState) { if (global.document) { readyState = document.readyState; } else { readyState = "complete"; } } if (readyState === "complete" || (global.document && document.body !== null)) { if (async) { msSetImmediate(complete); } else { complete(); } } else { global.addEventListener("DOMContentLoaded", complete, false); } }); }, /// Determines if strict declarative processing is enabled in this script context. strictProcessing: { get: function () { return true; }, configurable: false, enumerable: true, }, markSupportedForProcessing: { value: function (func) { /// /// /// Marks a function as being compatible with declarative processing, such as PluginUtilities.UI.processAll /// or PluginUtilities.Binding.processAll. /// /// /// The function to be marked as compatible with declarative processing. /// /// /// The input function. /// /// func.supportedForProcessing = true; return func; }, configurable: false, writable: false, enumerable: true }, requireSupportedForProcessing: { value: function (value) { /// /// /// Asserts that the value is compatible with declarative processing, such as PluginUtilities.UI.processAll /// or PluginUtilities.Binding.processAll. If it is not compatible an exception will be thrown. /// /// /// The value to be tested for compatibility with declarative processing. If the /// value is a function it must be marked with a property 'supportedForProcessing' /// with a value of true. /// /// /// The input value. /// /// var supportedForProcessing = true; if (value === global) { supportedForProcessing = false; } else if (value instanceof Function && !value.supportedForProcessing) { supportedForProcessing = false; } if (supportedForProcessing) { return value; } throw new PluginUtilities.ErrorFromName("PluginUtilities.Utilities.requireSupportedForProcessing", PluginUtilities.Resources._formatString(strings.notSupportedForProcessing, value)); }, configurable: false, writable: false, enumerable: true }, }); PluginUtilities.Namespace.define("PluginUtilities", { validation: false, strictProcessing: { value: function () { /// /// /// Strict processing is always enforced, this method has no effect. /// /// }, configurable: false, writable: false, enumerable: false }, }); })(this, PluginUtilities); (function logInit() { "use strict"; var spaceR = /\s+/g; var typeR = /^(error|warn|info|log)$/; function format(message, tag, type) { /// /// /// Adds tags and type to a logging message. /// /// The message to be formatted. /// The tag(s) to be applied to the message. Multiple tags should be separated by spaces. /// The type of the message. /// The formatted message. /// var m = message; if (typeof (m) === "function") { m = m(); } return ((type && typeR.test(type)) ? ("") : (type ? (type + ": ") : "")) + (tag ? tag.replace(spaceR, ":") + ": " : "") + m; } function defAction(message, tag, type) { var m = PluginUtilities.Utilities.formatLog(message, tag, type); console[(type && typeR.test(type)) ? type : "log"](m); } function escape(s) { // \s (whitespace) is used as separator, so don't escape it return s.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"); } PluginUtilities.Namespace.define("PluginUtilities.Utilities", { startLog: function (options) { /// /// /// Configures a logger that writes messages containing the specified tags from PluginUtilities.log to console.log. /// /// The tags for messages to log. Multiple tags should be separated by spaces. /// /// /// /// Configure a logger to write PluginUtilities.log output. /// /// /// May contain .type, .tags, .excludeTags and .action properties. /// - .type is a required tag. /// - .excludeTags is a space-separated list of tags, any of which will result in a message not being logged. /// - .tags is a space-separated list of tags, any of which will result in a message being logged. /// - .action is a function that, if present, will be called with the log message, tags and type. The default is to log to the console. /// /// options = options || {}; if (typeof options === "string") { options = { tags: options }; } var el = options.type && new RegExp("^(" + escape(options.type).replace(spaceR, " ").split(" ").join("|") + ")$"); var not = options.excludeTags && new RegExp("(^|\\s)(" + escape(options.excludeTags).replace(spaceR, " ").split(" ").join("|") + ")(\\s|$)", "i"); var has = options.tags && new RegExp("(^|\\s)(" + escape(options.tags).replace(spaceR, " ").split(" ").join("|") + ")(\\s|$)", "i"); var action = options.action || defAction; if (!el && !not && !has && !PluginUtilities.log) { PluginUtilities.log = action; return; } var result = function (message, tag, type) { if (!((el && !el.test(type)) // if the expected log level is not satisfied || (not && not.test(tag)) // if any of the excluded categories exist || (has && !has.test(tag)))) { // if at least one of the included categories doesn't exist action(message, tag, type); } result.next && result.next(message, tag, type); }; result.next = PluginUtilities.log; PluginUtilities.log = result; }, stopLog: function () { /// /// /// Removes the previously set up logger. /// /// delete PluginUtilities.log; }, formatLog: format }); })(); (function eventsInit(PluginUtilities, undefined) { "use strict"; function createEventProperty(name) { var eventPropStateName = "_on" + name + "state"; return { get: function () { var state = this[eventPropStateName]; return state && state.userHandler; }, set: function (handler) { var state = this[eventPropStateName]; if (handler) { if (!state) { state = { wrapper: function (evt) { return state.userHandler(evt); }, userHandler: handler }; Object.defineProperty(this, eventPropStateName, { value: state, enumerable: false, writable: true, configurable: true }); this.addEventListener(name, state.wrapper, false); } state.userHandler = handler; } else if (state) { this.removeEventListener(name, state.wrapper, false); this[eventPropStateName] = null; } }, enumerable: true } } function createEventProperties(events) { /// /// /// Creates an object that has one property for each name passed to the function. /// /// /// A variable list of property names. /// /// /// The object with the specified properties. The names of the properties are prefixed with 'on'. /// /// var props = {}; for (var i = 0, len = arguments.length; i < len; i++) { var name = arguments[i]; props["on" + name] = createEventProperty(name); } return props; } var EventMixinEvent = PluginUtilities.Class.define( function EventMixinEvent_ctor(type, detail, target) { this.detail = detail; this.target = target; this.timeStamp = Date.now(); this.type = type; }, { bubbles: { value: false, writable: false }, cancelable: { value: false, writable: false }, currentTarget: { get: function () { return this.target; } }, defaultPrevented: { get: function () { return this._preventDefaultCalled; } }, trusted: { value: false, writable: false }, eventPhase: { value: 0, writable: false }, target: null, timeStamp: null, type: null, preventDefault: function () { this._preventDefaultCalled = true; }, stopImmediatePropagation: function () { this._stopImmediatePropagationCalled = true; }, stopPropagation: function () { } }, { supportedForProcessing: false, } ); var eventMixin = { _listeners: null, addEventListener: function (type, listener, useCapture) { /// /// /// Adds an event listener to the control. /// /// /// The type (name) of the event. /// /// /// The listener to invoke when the event gets raised. /// /// /// if true initiates capture, otherwise false. /// /// useCapture = useCapture || false; this._listeners = this._listeners || {}; var eventListeners = (this._listeners[type] = this._listeners[type] || []); for (var i = 0, len = eventListeners.length; i < len; i++) { var l = eventListeners[i]; if (l.useCapture === useCapture && l.listener === listener) { return; } } eventListeners.push({ listener: listener, useCapture: useCapture }); }, dispatchEvent: function (type, details) { /// /// /// Raises an event of the specified type and with the specified additional properties. /// /// /// The type (name) of the event. /// /// /// The set of additional properties to be attached to the event object when the event is raised. /// /// /// true if preventDefault was called on the event. /// /// var listeners = this._listeners && this._listeners[type]; if (listeners) { var eventValue = new EventMixinEvent(type, details, this); // Need to copy the array to protect against people unregistering while we are dispatching listeners = listeners.slice(0, listeners.length); for (var i = 0, len = listeners.length; i < len && !eventValue._stopImmediatePropagationCalled; i++) { listeners[i].listener(eventValue); } return eventValue.defaultPrevented || false; } return false; }, removeEventListener: function (type, listener, useCapture) { /// /// /// Removes an event listener from the control. /// /// /// The type (name) of the event. /// /// /// The listener to remove. /// /// /// Specifies whether to initiate capture. /// /// useCapture = useCapture || false; var listeners = this._listeners && this._listeners[type]; if (listeners) { for (var i = 0, len = listeners.length; i < len; i++) { var l = listeners[i]; if (l.listener === listener && l.useCapture === useCapture) { listeners.splice(i, 1); if (listeners.length === 0) { delete this._listeners[type]; } // Only want to remove one element for each call to removeEventListener break; } } } } }; PluginUtilities.Namespace.define("PluginUtilities.Utilities", { _createEventProperty: createEventProperty, createEventProperties: createEventProperties, eventMixin: eventMixin }); })(PluginUtilities); (function promiseInit(global, undefined) { "use strict"; global.Debug && (global.Debug.setNonUserCodeExceptions = true); var ListenerType = PluginUtilities.Class.mix(PluginUtilities.Class.define(null, { /*empty*/ }, { supportedForProcessing: false }), PluginUtilities.Utilities.eventMixin); var promiseEventListeners = new ListenerType(); // make sure there is a listeners collection so that we can do a more trivial check below promiseEventListeners._listeners = {}; var errorET = "error"; var canceledName = "Canceled"; var tagWithStack = false; var tag = { promise: 0x01, thenPromise: 0x02, errorPromise: 0x04, exceptionPromise: 0x08, completePromise: 0x10, }; tag.all = tag.promise | tag.thenPromise | tag.errorPromise | tag.exceptionPromise | tag.completePromise; // // Global error counter, for each error which enters the system we increment this once and then // the error number travels with the error as it traverses the tree of potential handlers. // // When someone has registered to be told about errors (PluginUtilities.Promise.callonerror) promises // which are in error will get tagged with a ._errorId field. This tagged field is the // contract by which nested promises with errors will be identified as chaining for the // purposes of the callonerror semantics. If a nested promise in error is encountered without // a ._errorId it will be assumed to be foreign and treated as an interop boundary and // a new error id will be minted. // var error_number = 1; // // The state machine has a interesting hiccup in it with regards to notification, in order // to flatten out notification and avoid recursion for synchronous completion we have an // explicit set of *_notify states which are responsible for notifying their entire tree // of children. They can do this because they know that immediate children are always // ThenPromise instances and we can therefore reach into their state to access the // _listeners collection. // // So, what happens is that a Promise will be fulfilled through the _completed or _error // messages at which point it will enter a *_notify state and be responsible for to move // its children into an (as appropriate) success or error state and also notify that child's // listeners of the state transition, until leaf notes are reached. // var state_created, // -> working state_working, // -> error | error_notify | success | success_notify | canceled | waiting state_waiting, // -> error | error_notify | success | success_notify | waiting_canceled state_waiting_canceled, // -> error | error_notify | success | success_notify | canceling state_canceled, // -> error | error_notify | success | success_notify | canceling state_canceling, // -> error_notify state_success_notify, // -> success state_success, // -> . state_error_notify, // -> error state_error; // -> . // Noop function, used in the various states to indicate that they don't support a given // message. Named with the somewhat cute name '_' because it reads really well in the states. function _() { } // Initial state // state_created = { name: "created", enter: function (promise) { promise._setState(state_working); }, cancel: _, done: _, then: _, _completed: _, _error: _, _notify: _, _progress: _, _setCompleteValue: _, _setErrorValue: _ }; // Ready state, waiting for a message (completed/error/progress), able to be canceled // state_working = { name: "working", enter: _, cancel: function (promise) { promise._setState(state_canceled); }, done: done, then: then, _completed: completed, _error: error, _notify: _, _progress: progress, _setCompleteValue: setCompleteValue, _setErrorValue: setErrorValue }; // Waiting state, if a promise is completed with a value which is itself a promise // (has a then() method) it signs up to be informed when that child promise is // fulfilled at which point it will be fulfilled with that value. // state_waiting = { name: "waiting", enter: function (promise) { var waitedUpon = promise._value; var error = function (value) { if (waitedUpon._errorId) { promise._chainedError(value, waitedUpon); } else { // Because this is an interop boundary we want to indicate that this // error has been handled by the promise infrastructure before we // begin a new handling chain. // callonerror(promise, value, detailsForHandledError, waitedUpon, error); promise._error(value); } }; error.handlesOnError = true; waitedUpon.then( promise._completed.bind(promise), error, promise._progress.bind(promise) ); }, cancel: function (promise) { promise._setState(state_waiting_canceled); }, done: done, then: then, _completed: completed, _error: error, _notify: _, _progress: progress, _setCompleteValue: setCompleteValue, _setErrorValue: setErrorValue }; // Waiting canceled state, when a promise has been in a waiting state and receives a // request to cancel its pending work it will forward that request to the child promise // and then waits to be informed of the result. This promise moves itself into the // canceling state but understands that the child promise may instead push it to a // different state. // state_waiting_canceled = { name: "waiting_canceled", enter: function (promise) { // Initiate a transition to canceling. Triggering a cancel on the promise // that we are waiting upon may result in a different state transition // before the state machine pump runs again. promise._setState(state_canceling); var waitedUpon = promise._value; if (waitedUpon.cancel) { waitedUpon.cancel(); } }, cancel: _, done: done, then: then, _completed: completed, _error: error, _notify: _, _progress: progress, _setCompleteValue: setCompleteValue, _setErrorValue: setErrorValue }; // Canceled state, moves to the canceling state and then tells the promise to do // whatever it might need to do on cancelation. // state_canceled = { name: "canceled", enter: function (promise) { // Initiate a transition to canceling. The _cancelAction may change the state // before the state machine pump runs again. promise._setState(state_canceling); promise._cancelAction(); }, cancel: _, done: done, then: then, _completed: completed, _error: error, _notify: _, _progress: progress, _setCompleteValue: setCompleteValue, _setErrorValue: setErrorValue }; // Canceling state, commits to the promise moving to an error state with an error // object whose 'name' and 'message' properties contain the string "Canceled" // state_canceling = { name: "canceling", enter: function (promise) { var error = new Error(canceledName); error.name = error.message; promise._value = error; promise._setState(state_error_notify); }, cancel: _, done: _, then: _, _completed: _, _error: _, _notify: _, _progress: _, _setCompleteValue: _, _setErrorValue: _ }; // Success notify state, moves a promise to the success state and notifies all children // state_success_notify = { name: "complete_notify", enter: function (promise) { promise.done = CompletePromise.prototype.done; promise.then = CompletePromise.prototype.then; if (promise._listeners) { var queue = [promise]; var p; while (queue.length) { p = queue.pop(); p._state._notify(p, queue); } } promise._setState(state_success); }, cancel: _, done: null, /*error to get here */ then: null, /*error to get here */ _completed: _, _error: _, _notify: notifySuccess, _progress: _, _setCompleteValue: _, _setErrorValue: _ }; // Success state, moves a promise to the success state and does NOT notify any children. // Some upstream promise is owning the notification pass. // state_success = { name: "success", enter: function (promise) { promise.done = CompletePromise.prototype.done; promise.then = CompletePromise.prototype.then; promise._cleanupAction(); }, cancel: _, done: null, /*error to get here */ then: null, /*error to get here */ _completed: _, _error: _, _notify: notifySuccess, _progress: _, _setCompleteValue: _, _setErrorValue: _ }; // Error notify state, moves a promise to the error state and notifies all children // state_error_notify = { name: "error_notify", enter: function (promise) { promise.done = ErrorPromise.prototype.done; promise.then = ErrorPromise.prototype.then; if (promise._listeners) { var queue = [promise]; var p; while (queue.length) { p = queue.pop(); p._state._notify(p, queue); } } promise._setState(state_error); }, cancel: _, done: null, /*error to get here*/ then: null, /*error to get here*/ _completed: _, _error: _, _notify: notifyError, _progress: _, _setCompleteValue: _, _setErrorValue: _ }; // Error state, moves a promise to the error state and does NOT notify any children. // Some upstream promise is owning the notification pass. // state_error = { name: "error", enter: function (promise) { promise.done = ErrorPromise.prototype.done; promise.then = ErrorPromise.prototype.then; promise._cleanupAction(); }, cancel: _, done: null, /*error to get here*/ then: null, /*error to get here*/ _completed: _, _error: _, _notify: notifyError, _progress: _, _setCompleteValue: _, _setErrorValue: _ }; // // The statemachine implementation follows a very particular pattern, the states are specified // as static stateless bags of functions which are then indirected through the state machine // instance (a Promise). As such all of the functions on each state have the promise instance // passed to them explicitly as a parameter and the Promise instance members do a little // dance where they indirect through the state and insert themselves in the argument list. // // We could instead call directly through the promise states however then every caller // would have to remember to do things like pumping the state machine to catch state transitions. // var PromiseStateMachine = PluginUtilities.Class.define(null, { _listeners: null, _nextState: null, _state: null, _value: null, cancel: function () { /// /// /// Attempts to cancel the fulfillment of a promised value. If the promise hasn't /// already been fulfilled and cancellation is supported, the promise enters /// the error state with a value of Error("Canceled"). /// /// this._state.cancel(this); this._run(); }, done: function Promise_done(onComplete, onError, onProgress) { /// /// /// Allows you to specify the work to be done on the fulfillment of the promised value, /// the error handling to be performed if the promise fails to fulfill /// a value, and the handling of progress notifications along the way. /// /// After the handlers have finished executing, this function throws any error that would have been returned /// from then() as a promise in the error state. /// /// /// The function to be called if the promise is fulfilled successfully with a value. /// The fulfilled value is passed as the single argument. If the value is null, /// the fulfilled value is returned. The value returned /// from the function becomes the fulfilled value of the promise returned by /// then(). If an exception is thrown while executing the function, the promise returned /// by then() moves into the error state. /// /// /// The function to be called if the promise is fulfilled with an error. The error /// is passed as the single argument. If it is null, the error is forwarded. /// The value returned from the function is the fulfilled value of the promise returned by then(). /// /// /// the function to be called if the promise reports progress. Data about the progress /// is passed as the single argument. Promises are not required to support /// progress. /// /// this._state.done(this, onComplete, onError, onProgress); }, then: function Promise_then(onComplete, onError, onProgress) { /// /// /// Allows you to specify the work to be done on the fulfillment of the promised value, /// the error handling to be performed if the promise fails to fulfill /// a value, and the handling of progress notifications along the way. /// /// /// The function to be called if the promise is fulfilled successfully with a value. /// The value is passed as the single argument. If the value is null, the value is returned. /// The value returned from the function becomes the fulfilled value of the promise returned by /// then(). If an exception is thrown while this function is being executed, the promise returned /// by then() moves into the error state. /// /// /// The function to be called if the promise is fulfilled with an error. The error /// is passed as the single argument. If it is null, the error is forwarded. /// The value returned from the function becomes the fulfilled value of the promise returned by then(). /// /// /// The function to be called if the promise reports progress. Data about the progress /// is passed as the single argument. Promises are not required to support /// progress. /// /// /// The promise whose value is the result of executing the complete or /// error function. /// /// return this._state.then(this, onComplete, onError, onProgress); }, _chainedError: function (value, context) { var result = this._state._error(this, value, detailsForChainedError, context); this._run(); return result; }, _completed: function (value) { var result = this._state._completed(this, value); this._run(); return result; }, _error: function (value) { var result = this._state._error(this, value, detailsForError); this._run(); return result; }, _progress: function (value) { this._state._progress(this, value); }, _setState: function (state) { this._nextState = state; }, _setCompleteValue: function (value) { this._state._setCompleteValue(this, value); this._run(); }, _setChainedErrorValue: function (value, context) { var result = this._state._setErrorValue(this, value, detailsForChainedError, context); this._run(); return result; }, _setExceptionValue: function (value) { var result = this._state._setErrorValue(this, value, detailsForException); this._run(); return result; }, _run: function () { while (this._nextState) { this._state = this._nextState; this._nextState = null; this._state.enter(this); } } }, { supportedForProcessing: false }); // // Implementations of shared state machine code. // function completed(promise, value) { var targetState; if (value && typeof value === "object" && typeof value.then === "function") { targetState = state_waiting; } else { targetState = state_success_notify; } promise._value = value; promise._setState(targetState); } function createErrorDetails(exception, error, promise, id, parent, handler) { return { exception: exception, error: error, promise: promise, handler: handler, id: id, parent: parent }; } function detailsForHandledError(promise, errorValue, context, handler) { var exception = context._isException; var errorId = context._errorId; return createErrorDetails( exception ? errorValue : null, exception ? null : errorValue, promise, errorId, context, handler ); } function detailsForChainedError(promise, errorValue, context) { var exception = context._isException; var errorId = context._errorId; setErrorInfo(promise, errorId, exception); return createErrorDetails( exception ? errorValue : null, exception ? null : errorValue, promise, errorId, context ); } function detailsForError(promise, errorValue) { var errorId = ++error_number; setErrorInfo(promise, errorId); return createErrorDetails( null, errorValue, promise, errorId ); } function detailsForException(promise, exceptionValue) { var errorId = ++error_number; setErrorInfo(promise, errorId, true); return createErrorDetails( exceptionValue, null, promise, errorId ); } function done(promise, onComplete, onError, onProgress) { var asyncOpID = Debug.msTraceAsyncOperationStarting("Plugin.Promise.done"); pushListener(promise, { c: onComplete, e: onError, p: onProgress, asyncOpID: asyncOpID }); } function error(promise, value, onerrorDetails, context) { promise._value = value; callonerror(promise, value, onerrorDetails, context); promise._setState(state_error_notify); } function notifySuccess(promise, queue) { var value = promise._value; var listeners = promise._listeners; if (!listeners) { return; } promise._listeners = null; var i, len; for (i = 0, len = Array.isArray(listeners) ? listeners.length : 1; i < len; i++) { var listener = len === 1 ? listeners : listeners[i]; var onComplete = listener.c; var target = listener.promise; Debug.msTraceAsyncOperationCompleted(listener.asyncOpID, Debug.MS_ASYNC_OP_STATUS_SUCCESS); if (target) { Debug.msTraceAsyncCallbackStarting(listener.asyncOpID); try { target._setCompleteValue(onComplete ? onComplete(value) : value); } catch (ex) { target._setExceptionValue(ex); } finally { Debug.msTraceAsyncCallbackCompleted(); } if (target._state !== state_waiting && target._listeners) { queue.push(target); } } else { CompletePromise.prototype.done.call(promise, onComplete); } } } function notifyError(promise, queue) { var value = promise._value; var listeners = promise._listeners; if (!listeners) { return; } promise._listeners = null; var i, len; for (i = 0, len = Array.isArray(listeners) ? listeners.length : 1; i < len; i++) { var listener = len === 1 ? listeners : listeners[i]; var onError = listener.e; var target = listener.promise; var errorID = (value && value.name === canceledName ? Debug.MS_ASYNC_OP_STATUS_CANCELED : Debug.MS_ASYNC_OP_STATUS_ERROR); Debug.msTraceAsyncOperationCompleted(listener.asyncOpID, errorID); if (target) { var asyncCallbackStarted = false; try { if (onError) { Debug.msTraceAsyncCallbackStarting(listener.asyncOpID); asyncCallbackStarted = true; if (!onError.handlesOnError) { callonerror(target, value, detailsForHandledError, promise, onError); } target._setCompleteValue(onError(value)) } else { target._setChainedErrorValue(value, promise); } } catch (ex) { target._setExceptionValue(ex); } finally { if (asyncCallbackStarted) { Debug.msTraceAsyncCallbackCompleted(); } } if (target._state !== state_waiting && target._listeners) { queue.push(target); } } else { ErrorPromise.prototype.done.call(promise, null, onError); } } } function callonerror(promise, value, onerrorDetailsGenerator, context, handler) { if (promiseEventListeners._listeners[errorET]) { if (value instanceof Error && value.message === canceledName) { return; } promiseEventListeners.dispatchEvent(errorET, onerrorDetailsGenerator(promise, value, context, handler)); } } function progress(promise, value) { var listeners = promise._listeners; if (listeners) { var i, len; for (i = 0, len = Array.isArray(listeners) ? listeners.length : 1; i < len; i++) { var listener = len === 1 ? listeners : listeners[i]; var onProgress = listener.p; if (onProgress) { try { onProgress(value); } catch (ex) { } } if (!(listener.c || listener.e) && listener.promise) { listener.promise._progress(value); } } } } function pushListener(promise, listener) { var listeners = promise._listeners; if (listeners) { // We may have either a single listener (which will never be wrapped in an array) // or 2+ listeners (which will be wrapped). Since we are now adding one more listener // we may have to wrap the single listener before adding the second. listeners = Array.isArray(listeners) ? listeners : [listeners]; listeners.push(listener); } else { listeners = listener; } promise._listeners = listeners; } // The difference beween setCompleteValue()/setErrorValue() and complete()/error() is that setXXXValue() moves // a promise directly to the success/error state without starting another notification pass (because one // is already ongoing). function setErrorInfo(promise, errorId, isException) { promise._isException = isException || false; promise._errorId = errorId; } function setErrorValue(promise, value, onerrorDetails, context) { promise._value = value; callonerror(promise, value, onerrorDetails, context); promise._setState(state_error); } function setCompleteValue(promise, value) { var targetState; if (value && typeof value === "object" && typeof value.then === "function") { targetState = state_waiting; } else { targetState = state_success; } promise._value = value; promise._setState(targetState); } function then(promise, onComplete, onError, onProgress) { var result = new ThenPromise(promise); var asyncOpID = Debug.msTraceAsyncOperationStarting("Plugin.Promise.then"); pushListener(promise, { promise: result, c: onComplete, e: onError, p: onProgress, asyncOpID: asyncOpID }); return result; } // // Internal implementation detail promise, ThenPromise is created when a promise needs // to be returned from a then() method. // var ThenPromise = PluginUtilities.Class.derive(PromiseStateMachine, function (creator) { if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.thenPromise))) { this._stack = PluginUtilities.Promise._getStack(); } this._creator = creator; this._setState(state_created); this._run(); }, { _creator: null, _cancelAction: function () { if (this._creator) { this._creator.cancel(); } }, _cleanupAction: function () { this._creator = null; } }, { supportedForProcessing: false } ); // // Slim promise implementations for already completed promises, these are created // under the hood on synchronous completion paths as well as by PluginUtilities.Promise.wrap // and PluginUtilities.Promise.wrapError. // var ErrorPromise = PluginUtilities.Class.define( function ErrorPromise_ctor(value) { if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.errorPromise))) { this._stack = PluginUtilities.Promise._getStack(); } this._value = value; callonerror(this, value, detailsForError); }, { cancel: function () { /// /// /// Attempts to cancel the fulfillment of a promised value. If the promise hasn't /// already been fulfilled and cancellation is supported, the promise enters /// the error state with a value of Error("Canceled"). /// /// }, done: function ErrorPromise_done(unused, onError) { /// /// /// Allows you to specify the work to be done on the fulfillment of the promised value, /// the error handling to be performed if the promise fails to fulfill /// a value, and the handling of progress notifications along the way. /// /// After the handlers have finished executing, this function throws any error that would have been returned /// from then() as a promise in the error state. /// /// /// The function to be called if the promise is fulfilled successfully with a value. /// The fulfilled value is passed as the single argument. If the value is null, /// the fulfilled value is returned. The value returned /// from the function becomes the fulfilled value of the promise returned by /// then(). If an exception is thrown while executing the function, the promise returned /// by then() moves into the error state. /// /// /// The function to be called if the promise is fulfilled with an error. The error /// is passed as the single argument. If it is null, the error is forwarded. /// The value returned from the function is the fulfilled value of the promise returned by then(). /// /// /// the function to be called if the promise reports progress. Data about the progress /// is passed as the single argument. Promises are not required to support /// progress. /// /// var value = this._value; if (onError) { try { if (!onError.handlesOnError) { callonerror(null, value, detailsForHandledError, this, onError); } var result = onError(value); if (result && typeof result === "object" && typeof result.done === "function") { // If a promise is returned we need to wait on it. result.done(); } return; } catch (ex) { value = ex; } } if (value instanceof Error && value.message === canceledName) { // suppress cancel return; } // force the exception to be thrown asyncronously to avoid any try/catch blocks // msSetImmediate(function () { throw value; }); }, then: function ErrorPromise_then(unused, onError) { /// /// /// Allows you to specify the work to be done on the fulfillment of the promised value, /// the error handling to be performed if the promise fails to fulfill /// a value, and the handling of progress notifications along the way. /// /// /// The function to be called if the promise is fulfilled successfully with a value. /// The value is passed as the single argument. If the value is null, the value is returned. /// The value returned from the function becomes the fulfilled value of the promise returned by /// then(). If an exception is thrown while this function is being executed, the promise returned /// by then() moves into the error state. /// /// /// The function to be called if the promise is fulfilled with an error. The error /// is passed as the single argument. If it is null, the error is forwarded. /// The value returned from the function becomes the fulfilled value of the promise returned by then(). /// /// /// The function to be called if the promise reports progress. Data about the progress /// is passed as the single argument. Promises are not required to support /// progress. /// /// /// The promise whose value is the result of executing the complete or /// error function. /// /// // If the promise is already in a error state and no error handler is provided // we optimize by simply returning the promise instead of creating a new one. // if (!onError) { return this; } var result; var value = this._value; try { if (!onError.handlesOnError) { callonerror(null, value, detailsForHandledError, this, onError); } result = new CompletePromise(onError(value)); } catch (ex) { // If the value throw from the error handler is the same as the value // provided to the error handler then there is no need for a new promise. // if (ex === value) { result = this; } else { result = new ExceptionPromise(ex); } } return result; } }, { supportedForProcessing: false } ); var ExceptionPromise = PluginUtilities.Class.derive(ErrorPromise, function ExceptionPromise_ctor(value) { if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.exceptionPromise))) { this._stack = PluginUtilities.Promise._getStack(); } this._value = value; callonerror(this, value, detailsForException); }, { /* empty */ }, { supportedForProcessing: false } ); var CompletePromise = PluginUtilities.Class.define( function CompletePromise_ctor(value) { if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.completePromise))) { this._stack = PluginUtilities.Promise._getStack(); } if (value && typeof value === "object" && typeof value.then === "function") { var result = new ThenPromise(null); result._setCompleteValue(value); return result; } this._value = value; }, { cancel: function () { /// /// /// Attempts to cancel the fulfillment of a promised value. If the promise hasn't /// already been fulfilled and cancellation is supported, the promise enters /// the error state with a value of Error("Canceled"). /// /// }, done: function CompletePromise_done(onComplete) { /// /// /// Allows you to specify the work to be done on the fulfillment of the promised value, /// the error handling to be performed if the promise fails to fulfill /// a value, and the handling of progress notifications along the way. /// /// After the handlers have finished executing, this function throws any error that would have been returned /// from then() as a promise in the error state. /// /// /// The function to be called if the promise is fulfilled successfully with a value. /// The fulfilled value is passed as the single argument. If the value is null, /// the fulfilled value is returned. The value returned /// from the function becomes the fulfilled value of the promise returned by /// then(). If an exception is thrown while executing the function, the promise returned /// by then() moves into the error state. /// /// /// The function to be called if the promise is fulfilled with an error. The error /// is passed as the single argument. If it is null, the error is forwarded. /// The value returned from the function is the fulfilled value of the promise returned by then(). /// /// /// the function to be called if the promise reports progress. Data about the progress /// is passed as the single argument. Promises are not required to support /// progress. /// /// if (!onComplete) { return; } try { var result = onComplete(this._value); if (result && typeof result === "object" && typeof result.done === "function") { result.done(); } } catch (ex) { // force the exception to be thrown asynchronously to avoid any try/catch blocks msSetImmediate(function () { throw ex; }); } }, then: function CompletePromise_then(onComplete) { /// /// /// Allows you to specify the work to be done on the fulfillment of the promised value, /// the error handling to be performed if the promise fails to fulfill /// a value, and the handling of progress notifications along the way. /// /// /// The function to be called if the promise is fulfilled successfully with a value. /// The value is passed as the single argument. If the value is null, the value is returned. /// The value returned from the function becomes the fulfilled value of the promise returned by /// then(). If an exception is thrown while this function is being executed, the promise returned /// by then() moves into the error state. /// /// /// The function to be called if the promise is fulfilled with an error. The error /// is passed as the single argument. If it is null, the error is forwarded. /// The value returned from the function becomes the fulfilled value of the promise returned by then(). /// /// /// The function to be called if the promise reports progress. Data about the progress /// is passed as the single argument. Promises are not required to support /// progress. /// /// /// The promise whose value is the result of executing the complete or /// error function. /// /// try { // If the value returned from the completion handler is the same as the value // provided to the completion handler then there is no need for a new promise. // var newValue = onComplete ? onComplete(this._value) : this._value; return newValue === this._value ? this : new CompletePromise(newValue); } catch (ex) { return new ExceptionPromise(ex); } } }, { supportedForProcessing: false } ); // // Promise is the user-creatable PluginUtilities.Promise object. // function timeout(timeoutMS) { var id; return new PluginUtilities.Promise( function (c) { if (timeoutMS) { id = setTimeout(c, timeoutMS); } else { msSetImmediate(c); } }, function () { if (id) { clearTimeout(id); } } ); } function timeoutWithPromise(timeout, promise) { var cancelPromise = function () { promise.cancel(); } var cancelTimeout = function () { timeout.cancel(); } timeout.then(cancelPromise); promise.then(cancelTimeout, cancelTimeout); return promise; } var staticCanceledPromise; var Promise = PluginUtilities.Class.derive(PromiseStateMachine, function Promise_ctor(init, oncancel) { /// /// /// A promise provides a mechanism to schedule work to be done on a value that /// has not yet been computed. It is a convenient abstraction for managing /// interactions with asynchronous APIs. /// /// /// The function that is called during construction of the promise. The function /// is given three arguments (complete, error, progress). Inside this function /// you should add event listeners for the notifications supported by this value. /// /// /// The function to call if a consumer of this promise wants /// to cancel its undone work. Promises are not required to /// support cancellation. /// /// if (tagWithStack && (tagWithStack === true || (tagWithStack & tag.promise))) { this._stack = PluginUtilities.Promise._getStack(); } this._oncancel = oncancel; this._setState(state_created); this._run(); try { var complete = this._completed.bind(this); var error = this._error.bind(this); var progress = this._progress.bind(this); init(complete, error, progress); } catch (ex) { this._setExceptionValue(ex); } }, { _oncancel: null, _cancelAction: function () { if (this._oncancel) { try { this._oncancel(); } catch (ex) { } } }, _cleanupAction: function () { this._oncancel = null; } }, { addEventListener: function Promise_addEventListener(eventType, listener, capture) { /// /// /// Adds an event listener to the control. /// /// /// The type (name) of the event. /// /// /// The listener to invoke when the event is raised. /// /// /// Specifies whether or not to initiate capture. /// /// promiseEventListeners.addEventListener(eventType, listener, capture); }, any: function Promise_any(values) { /// /// /// Returns a promise that is fulfilled when one of the input promises /// has been fulfilled. /// /// /// An array that contains promise objects or objects whose property /// values include promise objects. /// /// /// A promise that on fulfillment yields the value of the input (complete or error). /// /// return new Promise( function (complete, error, progress) { var keys = Object.keys(values); var errors = Array.isArray(values) ? [] : {}; if (keys.length === 0) { complete(); } var canceled = 0; keys.forEach(function (key) { Promise.as(values[key]).then( function () { complete({ key: key, value: values[key] }); }, function (e) { if (e instanceof Error && e.name === canceledName) { if ((++canceled) === keys.length) { complete(PluginUtilities.Promise.cancel); } return; } error({ key: key, value: values[key] }); } ); }); }, function () { var keys = Object.keys(values); keys.forEach(function (key) { var promise = Promise.as(values[key]); if (typeof promise.cancel === "function") { promise.cancel(); } }); } ); }, as: function Promise_as(value) { /// /// /// Returns a promise. If the object is already a promise it is returned; /// otherwise the object is wrapped in a promise. /// /// /// The value to be treated as a promise. /// /// /// A promise. /// /// if (value && typeof value === "object" && typeof value.then === "function") { return value; } return new CompletePromise(value); }, /// /// Canceled promise value, can be returned from a promise completion handler /// to indicate cancelation of the promise chain. /// cancel: { get: function () { return (staticCanceledPromise = staticCanceledPromise || new ErrorPromise(new PluginUtilities.ErrorFromName(canceledName))); } }, dispatchEvent: function Promise_dispatchEvent(eventType, details) { /// /// /// Raises an event of the specified type and properties. /// /// /// The type (name) of the event. /// /// /// The set of additional properties to be attached to the event object. /// /// /// Specifies whether preventDefault was called on the event. /// /// return promiseEventListeners.dispatchEvent(eventType, details); }, is: function Promise_is(value) { /// /// /// Determines whether a value fulfills the promise contract. /// /// /// A value that may be a promise. /// /// /// true if the specified value is a promise, otherwise false. /// /// return value && typeof value === "object" && typeof value.then === "function"; }, join: function Promise_join(values) { /// /// /// Creates a promise that is fulfilled when all the values are fulfilled. /// /// /// An object whose fields contain values, some of which may be promises. /// /// /// A promise whose value is an object with the same field names as those of the object in the values parameter, where /// each field value is the fulfilled value of a promise. /// /// return new Promise( function (complete, error, progress) { var keys = Object.keys(values); var errors = Array.isArray(values) ? [] : {}; var results = Array.isArray(values) ? [] : {}; var undefineds = 0; var pending = keys.length; var argDone = function (key) { if ((--pending) === 0) { var errorCount = Object.keys(errors).length; if (errorCount === 0) { complete(results); } else { var canceledCount = 0; keys.forEach(function (key) { var e = errors[key]; if (e instanceof Error && e.name === canceledName) { canceledCount++; } }); if (canceledCount === errorCount) { complete(PluginUtilities.Promise.cancel); } else { error(errors); } } } else { progress({ Key: key, Done: true }); } }; keys.forEach(function (key) { var value = values[key]; if (value === undefined) { undefineds++; } else { Promise.then(value, function (value) { results[key] = value; argDone(key); }, function (value) { errors[key] = value; argDone(key); } ); } }); pending -= undefineds; if (pending === 0) { complete(results); return; } }, function () { Object.keys(values).forEach(function (key) { var promise = Promise.as(values[key]); if (typeof promise.cancel === "function") { promise.cancel(); } }); } ); }, removeEventListener: function Promise_removeEventListener(eventType, listener, capture) { /// /// /// Removes an event listener from the control. /// /// /// The type (name) of the event. /// /// /// The listener to remove. /// /// /// Specifies whether or not to initiate capture. /// /// promiseEventListeners.removeEventListener(eventType, listener, capture); }, supportedForProcessing: false, then: function Promise_then(value, onComplete, onError, onProgress) { /// /// /// A static version of the promise instance method then(). /// /// /// the value to be treated as a promise. /// /// /// The function to be called if the promise is fulfilled with a value. /// If it is null, the promise simply /// returns the value. The value is passed as the single argument. /// /// /// The function to be called if the promise is fulfilled with an error. The error /// is passed as the single argument. /// /// /// The function to be called if the promise reports progress. Data about the progress /// is passed as the single argument. Promises are not required to support /// progress. /// /// /// A promise whose value is the result of executing the provided complete function. /// /// return Promise.as(value).then(onComplete, onError, onProgress); }, thenEach: function Promise_thenEach(values, onComplete, onError, onProgress) { /// /// /// Performs an operation on all the input promises and returns a promise /// that has the shape of the input and contains the result of the operation /// that has been performed on each input. /// /// /// A set of values (which could be either an array or an object) of which some or all are promises. /// /// /// The function to be called if the promise is fulfilled with a value. /// If the value is null, the promise returns the value. /// The value is passed as the single argument. /// /// /// The function to be called if the promise is fulfilled with an error. The error /// is passed as the single argument. /// /// /// The function to be called if the promise reports progress. Data about the progress /// is passed as the single argument. Promises are not required to support /// progress. /// /// /// A promise that is the result of calling Promise.join on the values parameter. /// /// var result = Array.isArray(values) ? [] : {}; Object.keys(values).forEach(function (key) { result[key] = Promise.as(values[key]).then(onComplete, onError, onProgress); }); return Promise.join(result); }, timeout: function Promise_timeout(time, promise) { /// /// /// Creates a promise that is fulfilled after a timeout. /// /// /// The timeout period in milliseconds. If this value is zero or not specified /// msSetImmediate is called, otherwise setTimeout is called. /// /// /// A promise that will be canceled if it doesn't complete before the /// timeout has expired. /// /// /// A promise that is completed asynchronously after the specified timeout. /// /// var to = timeout(time); return promise ? timeoutWithPromise(to, promise) : to; }, wrap: function Promise_wrap(value) { /// /// /// Wraps a non-promise value in a promise. You can use this function if you need /// to pass a value to a function that requires a promise. /// /// /// Some non-promise value to be wrapped in a promise. /// /// /// A promise that is successfully fulfilled with the specified value /// /// return new CompletePromise(value); }, wrapError: function Promise_wrapError(error) { /// /// /// Wraps a non-promise error value in a promise. You can use this function if you need /// to pass an error to a function that requires a promise. /// /// /// A non-promise error value to be wrapped in a promise. /// /// /// A promise that is in an error state with the specified value. /// /// return new ErrorPromise(error); }, _veryExpensiveTagWithStack: { get: function () { return tagWithStack; }, set: function (value) { tagWithStack = value; } }, _veryExpensiveTagWithStack_tag: tag, _getStack: function () { if (Debug.debuggerEnabled) { try { throw new Error(); } catch (e) { return e.stack; } } }, } ); Object.defineProperties(Promise, PluginUtilities.Utilities.createEventProperties(errorET)); var SignalPromise = PluginUtilities.Class.derive(PromiseStateMachine, function (cancel) { this._oncancel = cancel; this._setState(state_created); this._run(); }, { _cancelAction: function () { this._oncancel && this._oncancel(); }, _cleanupAction: function () { this._oncancel = null; } }, { supportedForProcessing: false } ); var Signal = PluginUtilities.Class.define( function Signal_ctor(oncancel) { this._promise = new SignalPromise(oncancel); }, { promise: { get: function () { return this._promise; } }, cancel: function Signal_cancel() { this._promise.cancel(); }, complete: function Signal_complete(value) { this._promise._completed(value); }, error: function Signal_error(value) { this._promise._error(value); }, progress: function Signal_progress(value) { this._promise._progress(value); } }, { supportedForProcessing: false, } ); // Publish PluginUtilities.Promise // PluginUtilities.Namespace.define("PluginUtilities", { Promise: Promise, _Signal: Signal }); Plugin.Promise = Promise; }(this)); (function errorsInit(global, undefined) { "use strict"; PluginUtilities.Namespace.define("PluginUtilities", { // ErrorFromName establishes a simple pattern for returning error codes. // ErrorFromName: PluginUtilities.Class.derive(Error, function (name, message) { /// /// /// Creates an Error object with the specified name and message properties. /// /// The name of this error. The name is meant to be consumed programmatically and should not be localized. /// The message for this error. The message is meant to be consumed by humans and should be localized. /// Error instance with .name and .message properties populated /// this.name = name; this.message = message || name; }, { /* empty */ }, { supportedForProcessing: false, }) }); })(this);// This file is included at the end of the plugin.f12.js file so that // we can trigger the host onload event after daytona has initialized F12.Host.App.pluginHost.onLoaded(); Popup
            html, body, div, span { margin: 0; padding: 0; border: 0; vertical-align: baseline; overflow: hidden; } .headerMenuVisible { background-color: transparent !important; /* no token */ } .headerMenu li.menuitem { background-image: none !important; } .headerMenu { background-color: transparent !important; /* no token */ border-bottom: thin solid TRANSPARENT !important; /*[thin solid {f12-header-popup-border-color} !important]*/ border-left: thin solid TRANSPARENT !important; /*[thin solid {f12-header-popup-border-color} !important]*/ border-right: thin solid TRANSPARENT !important; /*[thin solid {f12-header-popup-border-color} !important]*/ border-top: none !important; /* the top border is handled by the partialTopBorder css class*/ width: calc(100% - 6px); padding-top: 2px !important; } .partialTopBorder { border-top: thin solid TRANSPARENT !important; /*[thin solid {f12-header-popup-border-color} !important]*/ float: right; height: 0px; /* we use negative margins here to line up the border of this div with the border of it's parent, without modifying the padding of parent div */ margin-top: -2px; margin-right: -2px; } .partialTopBorder.overflowButtonTopBorder { width: calc(100% - 23px); } .partialTopBorder.docModeButtonTopBorder { width: calc(100% - 67px); } .badgeType0::after { background-image: url("../header/images/NavOverFlow_Start.png"); } .badgeType1::after { background-image: url("../header/images/NavOverFlow_Warning.png"); } .badgeType2::after { background-image: url("../header/images/badgeError.png"); } .badgeType3::after { background-image: url("../header/images/NavOverFlow_Info.png"); } .badgeType4::after { background-image: url("../header/images/NavOverFlow_Break.png"); } .badgeType0::after, .badgeType1::after, .badgeType2::after, .badgeType3::after, .badgeType4::after { content: ""; background-size: cover; background-repeat: no-repeat; width: 16px; height: 16px; position: absolute; right: 4px; top: 3px; } .headerMenu.plugin-contextmenu .menuitem .checkbox { display: none !important; } .headerMenu.plugin-contextmenu .menuitem[aria-checked=true]::before { background-image: url("../header/images/checkmark.png"); content: ""; background-size: contain; background-repeat: no-repeat; width: 14px; height: 14px; position: absolute; left: 6px; top: 4px; } /* The :focus style is applied on hover, for some reason */ .headerMenu.plugin-contextmenu .menuitem:focus, .plugin-contextmenu .menuitem:active { border: none; padding: 1px; /* typically this is set to 0 to offset the border */ } .headerMenu.plugin-contextmenu .menuitem:hover { background-color: TRANSPARENT !important; /*[{f12-header-popup-hover} !important]*/ } .headerMenu.plugin-contextmenu .menuitem .main { margin-left: 24px !important; } .headerMenu.plugin-contextmenu .menuitem:hover > .shortcut, .headerMenu.plugin-contextmenu .menuitem:focus > .shortcut { top: 3px; padding-right: 23px !important; text-align: right !important; } .headerMenu.plugin-contextmenu .menuitem > .shortcut { top: 3px; padding-right: 22px !important; text-align: right !important; } PNG  IHDRtv pHYsod OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxء0 aϓ2$H,uB ز9?yݓdfyv|~玳M ( (\P1ҼhZwK^]Ö({]A=^.rPFz\ֽr=`r=`r=`r=`3C[1#;3C[1#;ЧRU..E<[&{O ( (zRr|pCIENDB`html { overflow: hidden; -ms-content-zooming:none; } html, body { -ms-high-contrast-adjust: none; scrollbar-3dlight-color: inherit !important; scrollbar-darkshadow-color: inherit !important; scrollbar-highlight-color: inherit !important; scrollbar-shadow-color: inherit !important; scrollbar-track-color: inherit !important; scrollbar-arrow-color: inherit !important; scrollbar-face-color: inherit !important; } #plugin-vs-tooltip { z-index: 9999999; -ms-high-contrast-adjust: none; background-color: #FFFFFF; /*[{plugin-tooltip-background-color}]*/ color: TRANSPARENT ; /*[{plugin-tooltip-text-color}]*/ border: thin solid TRANSPARENT; /*[thin solid {plugin-tooltip-border-color}]*/ padding: 0 5px 1px 5px; } #plugin-vs-tooltip > #plugin-vs-tooltip-nested-cell, #plugin-vs-tooltip > #plugin-vs-tooltip-nested-cell > #plugin-vs-tooltip-content { background-color: #FFFFFF; /*[{plugin-tooltip-background-color}]*/ color: TRANSPARENT; /*[{plugin-tooltip-text-color}]*/ } .f12HostErrorContainer { display: none; background: TRANSPARENT; /*[{plugin-contextmenu-background-color}]*/ color: TRANSPARENT; /*[{plugin-font-editor-color}]*/ min-width: 40em; max-width: 60%; min-height: 54px; border: 1px solid TRANSPARENT; /*[1px solid {plugin-contextmenu-active-border-color}]*/ border-top: 6px solid TRANSPARENT; /*[6px solid {plugin-highlight-background-color}]*/ padding-top: 12px; padding-left: 1em; padding-right: 6px; position: absolute; box-shadow: 2px 2px 2px TRANSPARENT; /*[2px 2px 2px {plugin-textbox-border-color rgba(0.5)}]*/ z-index: 1010; } .f12HostErrorInnerContainer { display: -ms-grid; -ms-grid-columns: auto 1fr auto auto; -ms-grid-rows: auto; } .f12HostCmdIcon { width: 29px; height: 22px; background-repeat: no-repeat; background-position: 0 0; float: right; background-size: 116px 22px; } .f12HostCmdIcon:hover { background-position: -58px 0; } .f12HostCmdIcon > disabled { background-position: -87px 0; } .f12HostCmdIcon > selected { background-position: -29px 0; } #f12HostErrorIcon { -ms-grid-column: 1; background-image: url("../pluginhost/theme/i_alerterror.png"); /*[url({f12-image-host-error-alert})]*/ background-repeat: no-repeat; background-size: 24px 24px; background-position: 0px 4px; margin-top: 3px; width: 32px; } #f12HostErrorMessage { -ms-grid-row: 1; -ms-grid-column: 2; cursor: default; min-height: 3.75em; overflow: auto; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family} , Arial, sans-serif]*/ line-height: 1.3em; margin-top: 3px; -ms-user-select: element; } #f12HostErrorHelp { -ms-grid-row: 1; -ms-grid-column: 3; background-image: url("../pluginhost/theme/helpErrorBox.png"); /*[url({f12-image-host-error-help})]*/ } #f12HostErrorClose { -ms-grid-row: 1; -ms-grid-column: 4; background-image: url("../pluginhost/theme/closeErrorBox.png"); /*[url({f12-image-host-error-close})]*/ } .plugin-contextmenu .menuitem, .plugin-contextmenu li[data-plugin-contextmenu-item-type=separator]:focus, .plugin-contextmenu li[data-plugin-contextmenu-item-type=separator]:active { margin: 0; padding: 1px; border: none; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA9JREFUeNpivn79OkCAAQAFGgKJahd4MAAAAABJRU5ErkJggg==) 27px repeat-y; /*[transparent url(plugin-contextmenu-menuitem-background-image) 27px repeat-y]*/ } .plugin-contextmenu .menuitem:focus, .plugin-contextmenu .menuitem:active, .plugin-contextmenu .active { border: solid 1px #78AEE4; /*[solid 1px {plugin-contextmenu-active-border-color}]*/ background-color: #f9f9fa; /*[{plugin-contextmenu-active-color}]*/ padding: 0; background-position-x: 26px; } .plugin-contextmenu .disabled:active, .plugin-contextmenu .disabled:focus { background-color: #E1E1E1; /*[{plugin-contextmenu-inactive-background-color}]*/ border: solid 1px #AEAEAE; /*[solid 1px {plugin-contextmenu-inactive-border-color}]*/ color: #6D6D6D; /*[{plugin-contextmenu-inactive-text-color}]*/ } .plugin-contextmenu .menuitem .icon { width: 20px; height: 20px; top: 0; margin: 0 16px 0 0; } .plugin-contextmenu .menuitem .main { margin-left: 27px; padding: 2px 0 2px 5px; } .plugin-contextmenu .menuitem .checkbox { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOJJREFUeNpi/P//PwM1ARMDlcEINJAFm+DBe69xxtTTm3fBtLS6MoO9kigjRS788+ELw+SmIoaa7CiG49u2Ue7l2X1NDC9fviAvDLcumAN2EQwcWL2c4dSxg2C2o6sXg6WXF3aNoISNjpPSsv8rKir+d3Fx/b/n7L3/S7cdB/NhYgfuvgJjbHqxRoqqrinD/t3bGO7evcPQUZ7O8OIFxJvc3DwMFZ0zSfcyyDsgb4EAyNCvXyFer+yaxcAiwENeGMaV18MNBYG0onpwUiErHSIbysEjAHc1MYBxtLQZAQYCBBgALn5ztQPAh0IAAAAASUVORK5CYII=); /*[url({plugin-contextmenu-checkbox-icon})]*/ border: solid 1px #25A1DB; /*[solid 1px {plugin-contextmenu-checkbox-border-color}]*/ background-color: #C0DDEA; /*[{plugin-contextmenu-checkbox-background-color}]*/ } .plugin-contextmenu .menuitem:active .checkbox, .plugin-contextmenu .menuitem:focus .checkbox { border: none; border-right: solid 1px #78AEE4; /*[solid 1px {plugin-contextmenu-active-border-color}]*/ background-color: #f9f9fa; /*[{plugin-contextmenu-active-color}]*/ } .plugin-contextmenu .menuitem .hr, .plugin-contextmenu .menuitem:active .hr, .plugin-contextmenu .menuitem:focus .hr { height: 1px; background-color: #cdd0d6; /*[{plugin-contextmenu-separator-color}]*/ padding: 0; border: none; } .plugin-contextmenu .menuitem:active .shortcut, .plugin-contextmenu .menuitem:focus .shortcut { top: 3px; right: -1px; } .plugin-contextmenu .menuitem .arrow { top: 2px; } .plugin-contextmenu .menuitem:active .arrow, .plugin-contextmenu .menuitem:focus .arrow, .plugin-contextmenu .active .arrow { top: 1px; right: 7px; } PNG  IHDRtv pHYsod OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxر @ Fᛇ2MAI2B UVH`!a?Rlkfݟ/S?~m ( ('A{ﶭAyU :ưmf5E`FQ3QӠp5\ Wz=X UMTyC*o!,f4bF@=,0\@Y\@P@P@}]IENDB`{ "plugin-font-family": "\"Segoe UI\"", "plugin-font-size": "12px", "plugin-font-weight": "normal", "plugin-color": "#1E1E1E", "plugin-contextmenu-active-color": "#D0E1F2", "plugin-contextmenu-background-color": "#F0F0F0", "plugin-contextmenu-border-color": "#979797", "plugin-contextmenu-color": "#000000", "plugin-contextmenu-hover-color": "#D0E1F2", "plugin-contextmenu-hover-text-color": "#000000", "plugin-contextmenu-inactive-text-color": "#6D6D6D", "plugin-contextmenu-separator-color": "#D7D7D7", "plugin-contextmenu-active-border-color": "#78AEE4", "plugin-contextmenu-inactive-border-color": "#AEAEAE", "plugin-contextmenu-inactive-background-color": "#E1E1E1", "plugin-contextmenu-checkbox-border-color": "#25A1DB", "plugin-contextmenu-checkbox-background-color": "#C0DDEA", "plugin-contextmenu-checkbox-icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOJJREFUeNpi/P//PwM1ARMDlcEINJAFm+DBe69xxtTTm3fBtLS6MoO9kigjRS788+ELw+SmIoaa7CiG49u2Ue7l2X1NDC9fviAvDLcumAN2EQwcWL2c4dSxg2C2o6sXg6WXF3aNoISNjpPSsv8rKir+d3Fx/b/n7L3/S7cdB/NhYgfuvgJjbHqxRoqqrinD/t3bGO7evcPQUZ7O8OIFxJvc3DwMFZ0zSfcyyDsgb4EAyNCvXyFer+yaxcAiwENeGMaV18MNBYG0onpwUiErHSIbysEjAHc1MYBxtLQZAQYCBBgALn5ztQPAh0IAAAAASUVORK5CYII=", "plugin-contextmenu-menuitem-background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA9JREFUeNpivn79OkCAAQAFGgKJahd4MAAAAABJRU5ErkJggg==", "plugin-background-color": "#FFFFFF", "plugin-border-color": "#CCCEDB", "plugin-box-shadow-color": "#ADADAD", "plugin-inactive-color": "#A2A4A5" , "plugin-link-color": "#0E70C0", "plugin-link-hover-color": "#007ACC", "plugin-link-active-color": "#007ACC", "plugin-link-active-selected-color": "#007ACC", "plugin-highlight-color": "#1E1E1E", "plugin-highlight-background-color": "#3399FF", "plugin-table-border-color": "#F0F0F0", "plugin-scrollbar-background-color": "#E8E8EC", "plugin-scrollbar-face-color": "#D0D1D7", "plugin-select-option-background-color": "#FFFFFF", "plugin-select-option-color": "#1E1E1E", "plugin-select-option-checked-background-color": "rgba(0, 122, 204, 0.2)", "plugin-select-option-checked-border-color": "rgba(0, 122, 204, 0.2)", "plugin-select-option-checked-foreground-color": "#1E1E1E", "plugin-select-option-hover-background-color": "#D9D9D9", "plugin-select-option-hover-border-color": "#D9D9D9", "plugin-select-option-hover-foreground-color": "#1E1E1E", "plugin-select-border-color": "#CCCEDB", "plugin-select-background-color": "#FFFFFF", "plugin-select-foreground-color": "#1E1E1E", "plugin-select-hover-background-color": "#FFFFFF", "plugin-select-hover-border-color": "#007ACC", "plugin-select-hover-foreground-color": "#1E1E1E", "plugin-textbox-disabled-background-color": "#EFEFF2", "plugin-textbox-color": "#1E1E1E", "plugin-textbox-background-color": "#FFFFFF", "plugin-textbox-border-color": "#ADADAD", "plugin-tooltip-background-color": "#FFFFFF", "plugin-tooltip-border-color": "#767676", "plugin-tooltip-text-color": "#575757", "plugin-treeview-content-inactive-selected-background-color": "#D9D9D9", "plugin-treeview-content-inactive-selected-color": "#1E1E1E", "plugin-treeview-content-selected-background-color": "#CCE4F5", "plugin-treeview-content-selected-color": "#1E1E1E", "plugin-treeview-content-selected-border-color": "#3399FF", "plugin-treeview-content-background-color": "#FC9DEF5", "plugin-treeview-content-mouseover-background-color": "#E2E2E2", "plugin-treeview-content-mouseover-color": "#1E1E1E", "plugin-searchcontrol-clear-hover-color": "#EA2E35", "plugin-searchcontrol-selection-color": "#3399FF", "plugin-searchcontrol-unfocused-watermark-text-color": "#717171", "plugin-searchcontrol-unfocused-background-color": "#FFFFFF", "plugin-searchcontrol-unfocused-border-color": "#CCCEDB", "plugin-searchcontrol-mouseover-watermark-text-color": "#1E1E1E", "plugin-searchcontrol-mouseover-background-background-color": "#FFFFFF", "plugin-searchcontrol-mouseover-background-foreground-color": "#1E1E1E", "plugin-searchcontrol-mouseover-border-color": "#007ACC", "plugin-menucontrol-background-color": "#F9FAFC", "plugin-pseudo-class-panel-disabled-color": "#717171", "plugin-styles-deleted-item-color": "#717171", "plugin-styles-changebar-add-color": "#00B294", "plugin-styles-changebar-update-color": "#FF8C00", "plugin-styles-changebar-remove-color": "#BA141A", "vs-combo-box-popup-background-begin-color": "#E7E8EC", "vs-combo-box-popup-border-color": "#CCCEDB", "vs-command-bar-gradient-begin-color": "#EFEFF2", "vs-command-bar-menu-separator-color": "#CCCEDB", "vs-command-bar-mouse-down-background-begin-color": "#007ACC", "vs-command-bar-mouse-down-background-end-color": "#007ACC", "vs-command-bar-mouse-down-border-color": "#007ACC", "vs-command-bar-mouse-over-background-begin-color": "#FEFEFE", "vs-command-bar-mouse-over-background-middle1-color": "#FEFEFE", "vs-command-bar-options-background-color": "#EFEFF2", "vs-command-bar-selected-border-color": "#3399FF", "vs-command-bar-text-inactive-color": "#A2A4A5", "vs-command-bar-text-selected-color": "#1E1E1E", "vs-designer-selection-dots-color": "#999999", "vs-drop-down-background-color": "#FCFCFC", "vs-drop-down-border-color": "#DBDDE6", "vs-drop-down-button-mouse-over-background-color": "#DEDFE8", "vs-drop-down-disabled-text-color": "#A2A4A5", "vs-drop-down-mouse-over-background-begin-color": "#FFFFFF", "vs-drop-down-mouse-over-border-color": "#DBDDE6", "vs-drop-down-mouse-over-text-color": "#1E1E1E", "vs-drop-down-popup-background-begin-color": "#E7E8EC", "vs-drop-down-text-color": "#1E1E1E", "vs-drop-shadow-background-color": "#000000", "vs-file-tab-button-hover-selected-active-border-color": "#1C97EA", "vs-file-tab-hot-gradient-bottom-color": "#1C97EA", "vs-file-tab-hot-text-color": "#FFFFFF", "vs-file-tab-selected-gradient-bottom-color": "#007ACC", "vs-file-tab-selected-text-color": "#FFFFFF", "vs-file-tab-text-color": "#1E1E1E", "vs-horizontal-resize-grip-color": "#CCCEDB", "vs-main-window-button-down-color": "#007ACC", "vs-main-window-button-down-glyph-color": "#FFFFFF", "vs-main-window-button-hover-active-color": "#FFFFFF", "vs-tool-window-background-color": "#F6F6F6", "vs-tool-window-text-color": "#1E1E1E", "vs-toolbox-background-color": "#F6F6F6", "vs-tree-view-selected-item-inactive-color": "#CCCEDB", "f12-header-background-color": "#1E1E1E", "f12-header-background-inactive-color": "#B1B1B1", "f12-header-badge-error-text-color": "rgba(255, 255, 255, 1)", "f12-header-badge-error-selected-text-color": "rgba(30, 30, 30, 1)", "f12-header-logo-text-color": "#999999", "f12-header-disabled-text-color": "#ABABAC", "f12-header-button-selected-border-color": "#717171", "f12-header-divider-color": "#717171", "f12-header-tab-background-color": "#1E1E1E", "f12-header-tab-text-color": "#FFFFFF", "f12-header-tab-selected-background-color": "#FFFFFF", "f12-header-tab-selected-text-color": "#000000", "f12-header-tab-hover-background-color": "#414141", "f12-header-tab-hover-text-color": "#FFFFFF", "f12-header-button-active-background-color": "#414141", "f12-header-button-hover-background-color": "#414141", "f12-toolbar-background-color": "#FFFFFF", "f12-toolbar-button-border-hover-color":"transparent", "f12-toolbar-button-hover-color": "#D9EBF7", "f12-toolbar-button-hover-text-color": "#1E1E1E", "f12-toolbar-button-pressed-color": "#B2D7F0", "f12-toolbar-button-selected-border-color": "#3399FF", "f12-toolbar-button-selected-color": "#F0F7FC", "f12-toolbar-button-selected-text-color": "#1E1E1E", "f12-toolbar-border-color": "#E5E6ED", "f12-intellisense-hover-color": "#1E1E1E", "f12-intellisense-hover-background-color": "#D9D9D9", "f12-intellisense-checked-color": "#1E1E1E", "f12-intellisense-checked-background-color": "rgba(0, 122, 204, 0.2)", "f12-header-popup-hover": "#e2e2e2", "f12-header-popup-border-color": "#3399FF", "diagnostics-host-border": "#CCCEDB", "diagnostics-host-graph-cursor": "#717171", "diagnostics-host-graph-line": "#CCCEDB", "diagnostics-host-graph-scale": "#CCCEDB", "diagnostics-host-ruler-slider": "#1E1E1E", "diagnostics-host-ruler-slider-active": "#007ACC", "diagnostics-host-ruler-tickmark": "#CCCEDB", "diagnostics-host-swimlane-border": "#CCCEDB", "plugin-memory-drop-down-button": "#EEEEEE", "plugin-memory-drop-down-button-hover": "#D9EBF7", "plugin-memory-snapshot-button": "#FFFFFF", "plugin-memory-snapshot-button-active": "#B2D7F0", "plugin-memory-snapshot-button-active-text": "#FFFFFF", "plugin-memory-snapshot-button-border": "#CCCEDB", "plugin-memory-snapshot-button-border-active": "#B2D7F0", "plugin-memory-snapshot-button-border-hover": "#D9EBF7", "plugin-memory-snapshot-button-disabled": "#EFEFF2", "plugin-memory-snapshot-button-disabled-text": "#999999", "plugin-memory-snapshot-button-hover": "#D9EBF7", "plugin-memory-snapshot-button-hover-text": "#0E70C0", "plugin-memory-snapshot-diff-added-text": "#4E8400", "plugin-memory-snapshot-diff-modified-text": "#00829C", "plugin-memory-snapshot-messages-border": "#E5E6ED", "plugin-memory-snapshot-tile": "#FFFFFF", "plugin-memory-snapshot-tile-baseline-text": "#999999", "plugin-memory-snapshot-tile-border": "#D4D4D4", "plugin-memory-snapshot-tile-error-text": "#FF0000", "plugin-memory-snapshot-tile-header": "#EFEFF2", "plugin-memory-tab-header": "#EEEEEE", "plugin-memory-tab-text": "#444444", "plugin-memory-tab-hover": "#EEEEEE", "plugin-memory-tab-hover-text": "#007ACC", "plugin-perftools-detail-pane": "#f9f9f9", "plugin-perftools-drop-down-button-focus": "#F0F7FC", "plugin-perftools-drop-down-button-focus-border": "#3399FF", "plugin-perftools-focusdots": "#999999", "plugin-perftools-grid-column-sizer": "#CCCEDB", "plugin-perftools-grid-border-color": "#1E1E1E", "plugin-perftools-grid-header-hover": "#E5F1FA", "plugin-perftools-grid-header-hover-text": "#717171", "plugin-perftools-grid-header-text": "#717171", "plugin-perftools-grid-groupline-color": "#B6B6B6", "plugin-perftools-list-item-selected-active-background-color":"#007ACC", "plugin-perftools-menu": "#F9FAFC", "plugin-perftools-menu-border": "#3399FF", "plugin-perftools-menu-drop-shadow": "#ADADAD", "plugin-perftools-menu-focus": "#CCE4F5", "plugin-perftools-menu-focus-text": "#1E1E1E", "plugin-perftools-menu-hover": "#e2e2e2", "plugin-perftools-menu-hover-text": "#1E1E1E", "plugin-perftools-progress": "#3399FF", "plugin-perftools-splitter": "#CCCEDB", "plugin-perftools-watermark-text": "#717171", "plugin-responsiveness-drop-down-button-hover": "#D9EBF7", "plugin-responsiveness-graph-border": "#CCCEDB", "plugin-subheading-color": "#717171", "plugin-font-console": "\"Consolas\"", "plugin-font-console-color": "#1E1E1E", "plugin-font-console-background-color": "#FFFFFF", "plugin-font-console-output-color": "#1E1E1E", "plugin-font-console-output-background-color": "#FFFFFF", "plugin-font-console-input-color": "#0000FF", "plugin-font-console-input-background-color": "#FFFFFF", "plugin-font-console-inputarea-color": "#1E1E1E", "plugin-font-console-inputarea-background-color": "#EFEFF2", "plugin-font-console-info-color": "#006400", "plugin-font-console-info-background-color": "#FFFFFF", "plugin-font-console-warning-color": "#606060", "plugin-font-console-warning-background-color": "#FFFFFF", "plugin-font-console-error-color": "#FF0000", "plugin-font-console-error-background-color": "#FFFFFF", "plugin-font-editor": "\"Consolas\"", "plugin-font-editor-color": "#1E1E1E", "plugin-font-editor-background-color": "#FFFFFF", "plugin-font-editor-selected-background-color": "#007ACC", "plugin-font-editor-selected-border-color": "#FFFFFF", "plugin-font-editor-collapse-adornment-color": "#B6B6B6", "plugin-font-editor-keyword-color": "#0000FF", "plugin-font-editor-keyword-background-color": "#FFFFFF", "plugin-font-editor-string-color": "#A31515", "plugin-font-editor-string-background-color": "#FFFFFF", "plugin-font-editor-number-color": "#A31515", "plugin-font-editor-number-background-color": "#FFFFFF", "plugin-font-editor-regexp-color": "#811F3F", "plugin-font-editor-regexp-background-color": "#FFFFFF", "plugin-font-editor-symbol-color": "#2B91AF", "plugin-font-editor-symbol-background-color": "#FFFFFF", "plugin-font-editor-identifier-color": "#001188", "plugin-font-editor-literal-color": "#E00000", "plugin-font-editor-comment-color": "#006400", "plugin-font-editor-html-tag-color": "#0000FF", "plugin-font-editor-html-tag-background-color": "#FFFFFF", "plugin-font-editor-html-element-color": "#800000", "plugin-font-editor-html-element-background-color": "#FFFFFF", "plugin-font-editor-html-comment-color": "#006400", "plugin-font-editor-html-comment-background-color": "#FFFFFF", "plugin-font-editor-html-attribute-name-color": "#FF0000", "plugin-font-editor-html-attribute-name-background-color": "#FFFFFF", "plugin-font-editor-html-attribute-value-color": "#0000FF", "plugin-font-editor-html-attribute-value-background-color": "#FFFFFF", "plugin-font-editor-html-operator-color": "#006400", "plugin-font-editor-html-operator-background-color": "#FFFFFF", "plugin-font-editor-css-name-color": "#FF0000", "plugin-font-editor-css-name-background-color": "#FFFFFF", "plugin-font-editor-css-value-color": "#0000FF", "plugin-font-editor-css-value-background-color": "#FFFFFF", "plugin-font-editor-css-selector-color": "#880000", "plugin-font-editor-css-selector-background-color": "#FFFFFF", "plugin-font-editor-margin-color": "#2B91AF", "plugin-font-editor-margin-background-color": "#E6E7E8", "plugin-font-editor-instruction-pointer-background-color": "#FFEE62", "plugin-font-editor-breakpoint-background-color": "#963A46", "plugin-font-editor-erroradornment-color": "#FFFFFF", "plugin-font-editor-erroradornment-background-color": "#BA141A", "plugin-font-editor-search-result-background-color": "#F6B94D", "plugin-font-editor-current-statement-color": "#B800B8", "plugin-font-editor-current-statement-background-color": "#FFE3FF", "plugin-editor-scrollbar-marker-instruction-pointer-color" : "#FF8C00", "plugin-editor-scrollbar-marker-breakpoint-color" : "#BA141A", "plugin-editor-scrollbar-marker-active-frame-color" : "#00B294", "plugin-editor-scrollbar-marker-search-result-color" : "#0072C6", "plugin-debugger-grid-row-hover-background-color" : "#E2E2E2", "plugin-debugger-grid-row-selected-background-color" : "#007ACC", "plugin-debugger-grid-active-splitter-color" : "#E5E6ED", "plugin-debugger-tab-color" : "#555555", "plugin-debugger-tab-area-background-color" : "#EEEEEE", "plugin-debugger-button-active-background-color" : "#33C1FF", "plugin-debugger-button-toggled-on-background-color" : "#D2E6FA", "plugin-debugger-button-toggled-on-border-color" : "#3399FF", "plugin-debugger-watch-font-color" : "#2B91AF", "plugin-debugger-watch-overlay-color" : "#FFFFFF", "plugin-debugger-filepicker-background-color" : "#F9FAFC", "plugin-tab-header-background-color": "#EEEEEE", "plugin-tab-header-active-background-color": "#EEEEEE", "plugin-tab-header-hover-background-color": "#EEEEEE", "plugin-tab-header-color": "#555555", "plugin-tab-header-active-color": "#007acc", "plugin-tab-header-hover-color": "#007acc", "plugin-breadcrumb-border-color": "#CCCEDB", "plugin-breadcrumb-background-color": "#EEEEEE", "plugin-breadcrumb-hover-color": "#1E1E1E", "plugin-breadcrumb-hover-background-color": "#A8CFF7", "plugin-breadcrumb-selected-color": "#FFFFFF", "plugin-breadcrumb-selected-background-color": "#3399FF", "plugin-breadcrumb-tooltip-color": "#575757", "plugin-breadcrumb-tooltip-background-color": "#ffffff", "plugin-breadcrumb-tooltip-border-color": "#767676" } { "plugin-font-family": "\"Segoe UI\"", "plugin-font-size": "12px", "plugin-font-weight": "normal", "plugin-color": "", "plugin-contextmenu-active-color": "", "plugin-contextmenu-background-color": "", "plugin-contextmenu-border-color": "", "plugin-contextmenu-color": "", "plugin-contextmenu-hover-color": "", "plugin-contextmenu-hover-text-color": "", "plugin-contextmenu-inactive-text-color": "", "plugin-contextmenu-separator-color": "", "plugin-contextmenu-active-border-color": "", "plugin-contextmenu-inactive-border-color": "", "plugin-contextmenu-inactive-background-color": "", "plugin-contextmenu-checkbox-border-color": "", "plugin-contextmenu-checkbox-background-color": "", "plugin-contextmenu-checkbox-icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMBJREFUeNpi/P//PwM1ARMDlcEQNpCRkfE/LtzW1vZ/0qRJ2AMfFCnYMEgKG1ZWVv4PAsbGxv+x6iPVwIMHD/5ft27df4hbKDQQ6iowTbKB3Nzc/1lYWFAMvHTpEtx1JBu4f/9+sPeYmJjAmt3c3FBcR7KBaWlpYAM2btz4X1RU9P/Dhw9RXEdWGB4+fBhs6M+fPzFcR5aB6urqcMPQXUd2LLe0tGB1HdkGsrGx/e/q6sKaJrHpYxwtvgafgQABBgA5A/UQRbg4MQAAAABJRU5ErkJggg==", "plugin-contextmenu-menuitem-background-image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC", "plugin-background-color": "", "plugin-border-color": "", "plugin-box-shadow-color": "", "plugin-inactive-color": "", "plugin-link-color": "", "plugin-link-hover-color": "", "plugin-link-active-color": "", "plugin-link-active-selected-color": "", "plugin-highlight-color": "", "plugin-highlight-background-color": "", "plugin-table-border-color": "", "plugin-scrollbar-background-color": "", "plugin-scrollbar-face-color": "", "plugin-select-option-background-color": "", "plugin-select-option-color": "", "plugin-select-option-checked-background-color": "", "plugin-select-option-checked-border-color": "", "plugin-select-option-checked-foreground-color": "", "plugin-select-option-hover-background-color": "", "plugin-select-option-hover-border-color": "", "plugin-select-option-hover-foreground-color": "", "plugin-select-border-color": "", "plugin-select-background-color": "", "plugin-select-foreground-color": "", "plugin-select-hover-background-color": "", "plugin-select-hover-border-color": "", "plugin-select-hover-foreground-color": "", "plugin-textbox-disabled-background-color": "", "plugin-textbox-color": "", "plugin-textbox-background-color": "", "plugin-textbox-border-color": "", "plugin-tooltip-background-color": "", "plugin-tooltip-border-color": "", "plugin-tooltip-text-color": "", "plugin-treeview-content-inactive-selected-background-color": "", "plugin-treeview-content-inactive-selected-color": "", "plugin-treeview-content-selected-background-color": "", "plugin-treeview-content-selected-color": "", "plugin-treeview-content-selected-border-color": "", "plugin-treeview-content-background-color": "", "plugin-treeview-content-mouseover-color": "", "plugin-treeview-content-mouseover-background-color": "", "plugin-searchcontrol-clear-hover-color": "", "plugin-searchcontrol-selection-color": "", "plugin-searchcontrol-unfocused-watermark-text-color": "", "plugin-searchcontrol-unfocused-background-color": "", "plugin-searchcontrol-unfocused-border-color": "", "plugin-searchcontrol-mouseover-watermark-text-color": "", "plugin-searchcontrol-mouseover-background-background-color": "", "plugin-searchcontrol-mouseover-background-foreground-color": "", "plugin-searchcontrol-mouseover-border-color": "", "plugin-menucontrol-background-color": "", "plugin-pseudo-class-panel-disabled-color": "", "plugin-styles-deleted-item-color": "", "plugin-styles-changebar-add-color": "", "plugin-styles-changebar-update-color": "", "plugin-styles-changebar-remove-color": "", "vs-combo-box-popup-background-begin-color": "", "vs-combo-box-popup-border-color": "", "vs-command-bar-gradient-begin-color": "", "vs-command-bar-menu-separator-color": "", "vs-command-bar-mouse-down-background-begin-color": "", "vs-command-bar-mouse-down-background-end-color": "", "vs-command-bar-mouse-down-border-color": "", "vs-command-bar-mouse-over-background-begin-color": "", "vs-command-bar-mouse-over-background-middle1-color": "", "vs-command-bar-options-background-color": "", "vs-command-bar-selected-border-color": "", "vs-command-bar-text-inactive-color": "", "vs-command-bar-text-selected-color": "", "vs-designer-selection-dots-color": "", "vs-drop-down-background-color": "", "vs-drop-down-border-color": "", "vs-drop-down-button-mouse-over-background-color": "", "vs-drop-down-disabled-text-color": "", "vs-drop-down-mouse-over-background-begin-color": "", "vs-drop-down-mouse-over-border-color": "", "vs-drop-down-mouse-over-text-color": "", "vs-drop-down-popup-background-begin-color": "", "vs-drop-down-text-color": "", "vs-drop-shadow-background-color": "", "vs-file-tab-button-hover-selected-active-border-color": "", "vs-file-tab-hot-gradient-bottom-color": "", "vs-file-tab-hot-text-color": "", "vs-file-tab-selected-gradient-bottom-color": "", "vs-file-tab-selected-text-color": "", "vs-file-tab-text-color": "", "vs-horizontal-resize-grip-color": "", "vs-main-window-button-down-color": "", "vs-main-window-button-down-glyph-color": "", "vs-main-window-button-hover-active-color": "", "vs-tool-window-background-color": "", "vs-tool-window-text-color": "", "vs-toolbox-background-color": "", "vs-tree-view-selected-item-inactive-color": "", "f12-header-background-color": "#000000", "f12-header-background-inactive-color": "#000000", "f12-header-badge-error-text-color": "#FFFFFF", "f12-header-badge-error-selected-text-color": "#000000", "f12-header-logo-text-color": "#FFFFFF", "f12-header-disabled-text-color": "#ABABAC", "f12-header-button-selected-border-color": "#FFFFFF", "f12-header-divider-color": "#FFFFFF", "f12-header-tab-background-color": "#000000", "f12-header-tab-text-color": "#FFFFFF", "f12-header-tab-selected-background-color": "#FFFFFF", "f12-header-tab-selected-text-color": "#000000", "f12-header-tab-hover-background-color": "#0000FF", "f12-header-tab-hover-text-color": "#FFFFFF", "f12-header-button-active-background-color": "#000000", "f12-header-button-hover-background-color": "#0000FF", "f12-toolbar-background-color": "#0000FF", "f12-toolbar-button-border-hover-color":"#FFFFFF", "f12-toolbar-button-hover-color": "#0000FF", "f12-toolbar-button-hover-text-color": "#000000", "f12-toolbar-button-pressed-color": "#FFFFFF", "f12-toolbar-border-color": "#FFFFFF", "f12-toolbar-button-selected-border-color": "#FFFFFF", "f12-toolbar-button-selected-text-color": "#FFFFFF", "f12-toolbar-button-selected-color": "#0000FF", "f12-intellisense-hover-color": "", "f12-intellisense-hover-background-color": "", "f12-intellisense-checked-color": "", "f12-intellisense-checked-background-color": "", "f12-header-popup-hover": "", "f12-header-popup-border-color": "", "diagnostics-host-border": "", "diagnostics-host-graph-cursor": "", "diagnostics-host-graph-line": "", "diagnostics-host-graph-scale": "", "diagnostics-host-ruler-slider": "", "diagnostics-host-ruler-slider-active": "", "diagnostics-host-ruler-tickmark": "", "diagnostics-host-swimlane-border": "", "plugin-memory-drop-down-button": "", "plugin-memory-drop-down-button-hover": "", "plugin-memory-snapshot-button": "", "plugin-memory-snapshot-button-active": "", "plugin-memory-snapshot-button-active-text": "", "plugin-memory-snapshot-button-border": "", "plugin-memory-snapshot-button-border-active": "", "plugin-memory-snapshot-button-border-hover": "", "plugin-memory-snapshot-button-disabled": "", "plugin-memory-snapshot-button-disabled-text": "", "plugin-memory-snapshot-button-hover": "", "plugin-memory-snapshot-button-hover-text": "", "plugin-memory-snapshot-diff-added-text": "", "plugin-memory-snapshot-diff-modified-text": "", "plugin-memory-snapshot-messages-border": "", "plugin-memory-snapshot-tile": "", "plugin-memory-snapshot-tile-baseline-text": "", "plugin-memory-snapshot-tile-border": "", "plugin-memory-snapshot-tile-error-text": "", "plugin-memory-snapshot-tile-header": "", "plugin-memory-tab-header": "", "plugin-memory-tab-text": "", "plugin-memory-tab-hover": "", "plugin-memory-tab-hover-text": "", "plugin-perftools-detail-pane": "", "plugin-perftools-drop-down-button-focus": "", "plugin-perftools-drop-down-button-focus-border": "", "plugin-perftools-focusdots": "", "plugin-perftools-grid-column-sizer": "", "plugin-perftools-grid-border-color": "", "plugin-perftools-grid-header-hover": "", "plugin-perftools-grid-header-hover-text": "", "plugin-perftools-grid-header-text": "", "plugin-perftoots-grid-groupline-color": "", "plugin-perftools-list-item-selected-active-background-color":"", "plugin-perftools-menu": "", "plugin-perftools-menu-border": "", "plugin-perftools-menu-drop-shadow": "", "plugin-perftools-menu-focus": "", "plugin-perftools-menu-focus-text": "", "plugin-perftools-menu-hover": "", "plugin-perftools-menu-hover-text": "", "plugin-perftools-progress": "", "plugin-perftools-splitter": "", "plugin-perftools-watermark-text": "", "plugin-responsiveness-drop-down-button-hover": "", "plugin-responsiveness-graph-border": "", "plugin-subheading-color": "", "plugin-font-console": "\"Consolas\"", "plugin-font-console-color": "", "plugin-font-console-background-color": "", "plugin-font-console-output-color": "", "plugin-font-console-output-background-color": "", "plugin-font-console-input-color": "", "plugin-font-console-input-background-color": "", "plugin-font-console-inputarea-color": "", "plugin-font-console-inputarea-background-color": "", "plugin-font-console-info-color": "", "plugin-font-console-info-background-color": "", "plugin-font-console-warning-color": "", "plugin-font-console-warning-background-color": "", "plugin-font-console-error-color": "", "plugin-font-console-error-background-color": "", "plugin-font-editor": "\"Consolas\"", "plugin-font-editor-color": "", "plugin-font-editor-background-color": "", "plugin-font-editor-selected-background-color": "", "plugin-font-editor-selected-border-color": "", "plugin-font-editor-collapse-adornment-color": "", "plugin-font-editor-keyword-color": "", "plugin-font-editor-keyword-background-color": "", "plugin-font-editor-string-color": "", "plugin-font-editor-string-background-color": "", "plugin-font-editor-number-color": "", "plugin-font-editor-number-background-color": "", "plugin-font-editor-regexp-color": "", "plugin-font-editor-regexp-background-color": "", "plugin-font-editor-symbol-color": "", "plugin-font-editor-symbol-background-color": "", "plugin-font-editor-identifier-color": "", "plugin-font-editor-literal-color": "", "plugin-font-editor-comment-color": "", "plugin-font-editor-html-tag-color": "", "plugin-font-editor-html-tag-background-color": "", "plugin-font-editor-html-element-color": "", "plugin-font-editor-html-element-background-color": "", "plugin-font-editor-html-comment-color": "", "plugin-font-editor-html-comment-background-color": "", "plugin-font-editor-html-attribute-name-color": "", "plugin-font-editor-html-attribute-name-background-color": "", "plugin-font-editor-html-attribute-value-color": "", "plugin-font-editor-html-attribute-value-background-color": "", "plugin-font-editor-html-operator-color": "", "plugin-font-editor-html-operator-background-color": "", "plugin-font-editor-css-name-color": "", "plugin-font-editor-css-name-background-color": "", "plugin-font-editor-css-value-color": "", "plugin-font-editor-css-value-background-color": "", "plugin-font-editor-css-selector-color": "", "plugin-font-editor-css-selector-background-color": "", "plugin-font-editor-margin-color": "", "plugin-font-editor-margin-background-color": "", "plugin-font-editor-instruction-pointer-background-color": "", "plugin-font-editor-breakpoint-background-color": "", "plugin-font-editor-erroradornment-color": "", "plugin-font-editor-erroradornment-background-color": "", "plugin-font-editor-search-result-background-color": "", "plugin-font-editor-current-statement-color": "", "plugin-font-editor-current-statement-background-color": "", "plugin-editor-scrollbar-marker-instruction-pointer-color" : "", "plugin-editor-scrollbar-marker-breakpoint-color" : "", "plugin-editor-scrollbar-marker-active-frame-color" : "", "plugin-editor-scrollbar-marker-search-result-color" : "", "plugin-debugger-grid-row-hover-background-color" : "", "plugin-debugger-grid-row-selected-background-color" : "", "plugin-debugger-grid-active-splitter-color": "", "plugin-debugger-tab-color" : "", "plugin-debugger-tab-area-background-color" : "", "plugin-debugger-button-active-background-color" : "", "plugin-debugger-button-toggled-on-background-color" : "", "plugin-debugger-button-toggled-on-border-color" : "", "plugin-debugger-watch-font-color" : "", "plugin-debugger-watch-overlay-color" : "#888888", "plugin-debugger-filepicker-background-color" : "", "plugin-tab-header-background-color": "", "plugin-tab-header-active-background-color": "", "plugin-tab-header-hover-background-color": "", "plugin-tab-header-color": "", "plugin-tab-header-active-color": "", "plugin-tab-header-hover-color": "", "plugin-breadcrumb-border-color": "", "plugin-breadcrumb-background-color": "", "plugin-breadcrumb-hover-color": "", "plugin-breadcrumb-hover-background-color": "", "plugin-breadcrumb-selected-color": "", "plugin-breadcrumb-selected-background-color": "", "plugin-breadcrumb-tooltip-color": "", "plugin-breadcrumb-tooltip-background-color": "", "plugin-breadcrumb-tooltip-border-color": "" } /* CSS file for the plugin's base styles and themes (light / dark / high contrast) Light theme values are used as defaults but token replacement occurs to provide the correct property for the active theme. Tokens must appear as comments on the same line as the property to replace and are in the following format: [] - indicates token replacement will occur for this css declaration {} - indicates the token value to replace. Anything inside the square brackets ([]) that is not a token will remain as is Example: border-right: 1px solid #8591A2; /*[1px solid {plugin-background-color}] Base plugin tokens available to all hosts: plugin-background-color plugin-color plugin-contextmenu-active-color plugin-contextmenu-background-color plugin-contextmenu-border-color plugin-contextmenu-color plugin-contextmenu-hover-color plugin-contextmenu-hover-text-color plugin-contextmenu-icon-checkbox plugin-contextmenu-inactive-text-color plugin-contextmenu-separator-color plugin-font-family plugin-font-size plugin-font-weight plugin-highlight-background-color plugin-highlight-color plugin-inactive-color plugin-link-color plugin-link-active-color plugin-link-hover-color plugin-scrollbar-arrow-color plugin-scrollbar-background-color plugin-scrollbar-face-color plugin-select-option-background-color plugin-select-option-color plugin-select-option-checked-background-color plugin-select-option-checked-border-color plugin-select-option-checked-foreground-color plugin-select-option-hover-background-color plugin-select-option-hover-border-color plugin-select-option-hover-foreground-color plugin-select-border-color plugin-select-background-color plugin-select-foreground-color plugin-select-hover-background-color plugin-select-hover-border-color plugin-select-hover-foreground-color plugin-table-border-color plugin-table-header-background-color plugin-table-header-color plugin-textbox-border-color plugin-textbox-background-color plugin-textbox-color plugin-textbox-disabled-background-color plugin-textbox-disabled-border-color plugin-textbox-disabled-color plugin-treeview-content-background-color plugin-treeview-content-color plugin-treeview-content-inactive-selected-color plugin-treeview-content-mouseover-background-color plugin-treeview-content-mouseover-color plugin-treeview-content-inactive-selected-color plugin-treeview-content-selected-background-color plugin-treeview-content-selected-border-color plugin-treeview-content-selected-color VS host also has access to all VS themed color key tokens (EnvironmentColors) and category specific tokens. http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.platformui.environmentcolors_properties Please see product documentation for instructions on how to add these tokens to the plugin manifest. */ /* HTML and body styles */ html, body { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family, Arial, sans-serif}]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-weight: normal; /*[{plugin-font-weight}]*/ color: #1E1E1E; /*[{plugin-color}]*/ background-color: #F6F6F6; /*[{plugin-background-color}]*/ scrollbar-3dlight-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-darkshadow-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-highlight-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-shadow-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-track-color: #E8E8EC; /*[{plugin-scrollbar-background-color}]*/ scrollbar-arrow-color: #868999; /*[{plugin-scrollbar-arrow-color}]*/ scrollbar-face-color: #D0D1D7; /*[{plugin-scrollbar-face-color}]*/ } /* Select styles */ select { color: #1E1E1E; /*[{plugin-select-foreground-color}]*/ background-color: #FFFFFF; /*[{plugin-select-background-color}]*/ font: normal 9pt "Segoe UI", Arial, sans-serif; /*[{plugin-font-weight} {plugin-font-size} {plugin-font-family}, Arial, sans-serif]*/ border: 1px solid #CCCEDB; /*[1px solid {plugin-select-border-color}]*/ } select:hover { color: #1E1E1E; /*[{plugin-select-hover-foreground-color}]*/ background-color: #FFFFFF; /*[{plugin-select-hover-background-color}]*/ border: 1px solid #007ACC; /*[1px solid {plugin-select-hover-border-color}]*/ } select[multiple], select option { color: #1E1E1E; /*[{plugin-select-option-color}]*/ background-color: #F6F6F6; /*[{plugin-select-option-background-color}]*/ } select option:hover { color: #1E1E1E; /*[{plugin-select-option-hover-foreground-color}]*/ background-color: #C9DEF5; /*[{plugin-select-option-hover-background-color}]*/ border: 1px solid #C9DEF5; /*[1px solid {plugin-select-option-hover-border-color}]*/ } select option:checked { color: #1E1E1E; /*[{plugin-select-option-checked-foreground-color}]*/ background-color: #C9DEF5; /*[{plugin-select-option-checked-background-color}]*/ border: 1px solid #C9DEF5; /*[1px solid {plugin-select-option-checked-border-color}]*/ } /* Input styles */ input { font: normal 9pt "Segoe UI", Arial, sans-serif; /*[{plugin-font-weight} {plugin-font-size} {plugin-font-family}, Arial, sans-serif]*/ color: #1E1E1E; /*[{plugin-textbox-color}]*/ background-color: #FFFFFF; /*[{plugin-textbox-background-color}]*/ border: 1px solid #DBDDE6; /*[1px solid {plugin-textbox-border-color}]*/ padding: 0 3px; } input:disabled { color: #A2A4A5; /*[{plugin-textbox-disabled-color}]*/ background-color: #FFFFFF; /*[{plugin-textbox-disabled-background-color}]*/ border: 1px solid #DBDDE6; /*[1px solid {plugin-textbox-disabled-border-color}]*/ } input[type="checkbox"], input[type="radio"] { border: none; background-color: inherit; margin-right: 4px; vertical-align: middle; } input[type="file"], input[type="image"] { border: none; background-color: inherit; padding: 0; } /* TextArea styles */ textarea { font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family}, Arial, sans-serif]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-weight: normal; /*[{plugin-font-weight}]*/ color: #1E1E1E; /*[{plugin-color}]*/ background-color: #F6F6F6; /*[{plugin-textbox-background-color}]*/ border: 1px solid #DBDDE6; /*[1px solid {plugin-textbox-border-color}]*/ padding: 0 3px; } /* Button styles */ button, input[type="button"], input[type="reset"], input[type="submit"] { color: #000000; background-image: -ms-linear-gradient(top, #F0F0F0 0%, #E5E5E5 100%); border: 1px solid #ACACAC; font-family: "Segoe UI", Arial, sans-serif; /*[{plugin-font-family}, Arial, sans-serif]*/ font-size: 9pt; /*[{plugin-font-size}]*/ font-weight: normal; /*[{plugin-font-weight}]*/ min-width: 73px; padding: 1px 19px 2px 19px; } button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover { background-image: -ms-linear-gradient(top, #ECF4FC 0%, #DCECFC 100%); border: 1px solid #7EB4EA; } button:focus, input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus { border: 1px solid #569DE5; } button:active, input[type="button"]:active, input[type="reset"]:active, input[type="submit"]:active { background-image: -ms-linear-gradient(top, #DAECFC 0%, #C4E0FC 100%); border: 1px solid #569DE5; } button[disabled], input[type="button"][disabled], input[type="reset"][disabled], input[type="submit"][disabled] { color: #838383; background: #F4F4F4 none; border: 1px solid #B1B1B2; } /* Other form styles */ fieldset { border: 1px solid #DBDDE6; /*[1px solid {plugin-textbox-border-color}]*/ } /* Link styles */ a, a:link, a:visited, a:focus { color: #0E70C0; /*[{plugin-link-color}]*/ text-decoration: none; } a:hover { color: #0E70C0; /*[{plugin-link-hover-color}]*/ text-decoration: underline; } a:active { color: #0E70C0; /*[{plugin-link-active-color}]*/ } /* Table styles */ th { color: #1E1E1E; /*[{plugin-table-header-color}]*/ background-color: #EFEFE2; /*[{plugin-table-header-background-color}]*/ } td, th { border-color: #F0F0F0; /*[{plugin-table-border-color}]*/ } /* Disabled styles */ :disabled { color: #A2A4A5; /*[{plugin-inactive-color}]*/ } /* Highlight styles Use this class when you have a highlighted item, for example a highlighted row in a grid */ .plugin-highlight { color: #FFFFFF; /*[{plugin-highlight-color}]*/ background-color: #3399FF; /*[{plugin-highlight-background-color}]*/ } /* Tooltip styles This class will be included automatically on all tooltips In VS tooltips aren't, by default, themed, so we just copy the WPF tooltip defaults, which is what VS uses for its tooltips. The one exception is that under system high-contrast themes tooltips are in fact themed, so we use the !HCOnly to indicate we only want our color tokens substituted under high-contrast themes. We set its initial display style to none and its initial position to (-500,-500) just to ensure that when we insert it into the document (for measuring) it isn't visible until we have done the layout and calculated its final position. */ #plugin-vs-tooltip { display: none; position: absolute; top: -500px; left: -500px; -ms-high-contrast-adjust: none; color: #575757; /*[{plugin-tooltip-text-color !HCOnly}]*/ background-color: #F1F2F7; /*[{plugin-tooltip-background-color !HCOnly}]*/ border: thin solid #767676; /*[1px solid {plugin-tooltip-border-color !HCOnly}]*/ padding: 1px 5px 4px 5px; line-height: normal; } #plugin-vs-tooltip > #plugin-vs-tooltip-nested-cell { display: table-cell; vertical-align: middle; -ms-high-contrast-adjust: none; color: #575757; /*[{plugin-tooltip-text-color !HCOnly}]*/ background-color: #F1F2F7; /*[{plugin-tooltip-background-color !HCOnly}]*/ } #plugin-vs-tooltip > #plugin-vs-tooltip-nested-cell > #plugin-vs-tooltip-content { -ms-high-contrast-adjust: none; color: #575757; /*[{plugin-tooltip-text-color !HCOnly}]*/ background-color: #F1F2F7; /*[{plugin-tooltip-background-color !HCOnly}]*/ } /* Selection styles */ .selectNone { -ms-user-select: none; } .selectElement { -ms-user-select: element; } /* Context Menu styles */ ul.plugin-contextmenu { background-color: #e9e8ea; /*[{plugin-contextmenu-background-color}]*/ border: thin solid #cdd0d6; /*[thin solid {plugin-contextmenu-border-color}]*/ color: #1E1E1E; /*[{plugin-contextmenu-color}]*/ padding: 1px 2px 2px 2px; margin: 0; position: absolute; display: none; outline: none; z-index: 100; white-space: nowrap; -ms-high-contrast-adjust: none; line-height: normal; } .plugin-contextmenu .menuitem { position: relative; cursor: default; outline: none; list-style: none; margin-top: 1px; } .plugin-contextmenu .menuitem:focus { background-color: #f9f9fa; /*[{plugin-contextmenu-hover-color}]*/ color: #1E1E1E; /*[{plugin-contextmenu-hover-text-color}]*/ } .plugin-contextmenu .menuitem:active, .plugin-contextmenu .active { background-color: #f9f9fa; /*[{plugin-contextmenu-active-color}]*/ color: #1E1E1E; /*[{plugin-contextmenu-hover-text-color}]*/ } .plugin-contextmenu .disabled:hover, .plugin-contextmenu .disabled:active, .plugin-contextmenu .disabled:focus, .plugin-contextmenu .disabled { background-color: #e9e8ea; /*[{plugin-contextmenu-background-color}]*/ color: #a2a4a5; /*[{plugin-contextmenu-inactive-text-color}]*/ } .plugin-contextmenu .menuitem .icon { margin: 0 10px 0 6px; background-color: transparent; width: 16px; height: 16px; position: absolute; top: 4px; left: 0; } .plugin-contextmenu .menuitem .checkbox { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/PbtGwMpgAWIfXx8iFS9ZcsWJgYSAQuctW7tejzqgoIDIQx8Nrx69QqobvKUyciC+DSsXLUSSIaHhROlAWj8/v37HB2dxMTEiNKA1Xh0DR2dHUBHvwIDrMajhBIQJCUmnTp1EmI2VuPRNQDNA5oKNBvIxmo8Fj/ATcVqPLoNEEvwxyALZlziBySnJUZSkzdAgAEAfm84vuieuk0AAAAASUVORK5CYII=); /*[url({plugin-contextmenu-icon-checkbox})]*/ } .plugin-contextmenu .hidden { display: none; } .plugin-contextmenu .disabled { color: #a2a4a5; /*[{plugin-contextmenu-inactive-text-color}]*/ } .plugin-contextmenu .menuitem .main { margin-left: 32px; padding: 4px 0 5px 0; } .plugin-contextmenu .menuitem .shortcut { min-width: 25px; position: absolute; padding-right: 25px; top: 4px; right: 0; } .plugin-contextmenu .menuitem .arrow { width: 5px; height: 7px; position: absolute; top: 4px; right: 8px; overflow: visible; } .plugin-contextmenu .menuitem .arrow:before, .plugin-contextmenu .menuitem.disabled:hover .arrow:before, .plugin-contextmenu .menuitem.disabled:active .arrow:before, .plugin-contextmenu .menuitem.disabled:focus .arrow:before, .plugin-contextmenu .menuitem.disabled .arrow:before { content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFZJREFUeNpiWL5i5X8gYEDGTKdOnmCYOXP2fwYkwAQibt68ztDXP+E/iiAIPHn8iGHChIn/UQSFhIQZCgryGUFsFhAhIyvHUFRYwAg3dMaMWRi2AwQYAAcRMJwq3CX+AAAAAElFTkSuQmCC); } .plugin-contextmenu .menuitem:hover .arrow:before, .plugin-contextmenu .menuitem:active .arrow:before, .plugin-contextmenu .menuitem:focus .arrow:before, .plugin-contextmenu .active .arrow:before { content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAYAAADAp4fuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFRJREFUeNpiKNzy6D8QMCBjBoaqM/+DltxGkWACCjOsu/aRwXrmDZASMGCCMY49+spgP/vmfxRBdRF2hoOp6oxwQSs5boYbhTqMMAUM6JaAMECAAQDqqjmrw1gHVwAAAABJRU5ErkJggg==); } .plugin-contextmenu .menuitem .hr, .plugin-contextmenu .menuitem:hover .hr, .plugin-contextmenu .menuitem:active .hr, .plugin-contextmenu .menuitem:focus .hr, .plugin-contextmenu .active .hr { height: 1px; background-color: #cdd0d6; /*[{plugin-contextmenu-separator-color}]*/ padding: 0; } PNG  IHDR00W pHYs+ cHRMz%u0`:o_FIDATxm0?x.u'2 PD$:HFY6{J1w>#il `t ťSNqE;D )GKOm*5 I}gȓ(GP ;@LnT~6 Ĥ~0,BFAMM37vsS{YwYM彙cP}Z'""gOcMB\cRE"QzlD}k VϠԷ`B?kY;(ܷz&E̅+m-~@7`hj+ڵ  a(h ]Q\ބqs0xI*"as!kikQ%*JH}-,zf,8š+K Uۢ MUIMUIen-USР@ 8